Fix spelling, grammar, javadocs, and similar issues (#2784)
* fix naming in ModelSantaHat.java * Fix grammar, spelling, and javadocs in RebornCore * Fix spelling error in datagen * fix missed variable name * fix grammar, spelling, and javadoc errors * fix grammar and spelling errors in project files * specify indent_size in .editorconfig
This commit is contained in:
parent
bd971c12bd
commit
43c0fa9e89
138 changed files with 1007 additions and 924 deletions
|
@ -133,7 +133,7 @@ class MachineRecipeJsonFactory<R extends RebornRecipe> {
|
|||
|
||||
protected void validate() {
|
||||
if (ingredients.isEmpty()) {
|
||||
throw new IllegalStateException("recipe has no ingrendients")
|
||||
throw new IllegalStateException("recipe has no ingredients")
|
||||
}
|
||||
|
||||
if (outputs.isEmpty()) {
|
||||
|
|
|
@ -81,7 +81,7 @@ public class TechReborn implements ModInitializer {
|
|||
|
||||
if (TechRebornConfig.machineSoundVolume > 0) {
|
||||
if (TechRebornConfig.machineSoundVolume > 1) TechRebornConfig.machineSoundVolume = 1F;
|
||||
RecipeCrafter.soundHanlder = new ModSounds.SoundHandler();
|
||||
RecipeCrafter.soundHandler = new ModSounds.SoundHandler();
|
||||
}
|
||||
ModLoot.init();
|
||||
WorldGenerator.initWorldGen();
|
||||
|
|
|
@ -47,7 +47,7 @@ public interface CableElectrocutionEvent {
|
|||
/**
|
||||
* Fired before an entity is electrocuted
|
||||
*
|
||||
* @return true to electrocute the entity (if not other listeners return false), false to do nothing
|
||||
* @return {@code boolean} true to electrocute the entity (if not other listeners return false), false to do nothing
|
||||
*/
|
||||
boolean electrocute(LivingEntity livingEntity, TRContent.Cables cableType, BlockPos blockPos, World world, CableBlockEntity cableBlockEntity);
|
||||
}
|
||||
|
|
|
@ -33,22 +33,24 @@ import java.util.Optional;
|
|||
public class GeneratorRecipeHelper {
|
||||
|
||||
/**
|
||||
* This EnumMap store all the energy recipes for the fluid generators. Each
|
||||
* value of the EFluidGenerator enum is linked to an object holding a set of
|
||||
* FluidGeneratorRecipe.
|
||||
* This {@link EnumMap} store all the energy recipes for the fluid generators. Each
|
||||
* value of the {@link EFluidGenerator} enum is linked to an object holding a set of
|
||||
* {@link FluidGeneratorRecipe}.
|
||||
*/
|
||||
public static EnumMap<EFluidGenerator, FluidGeneratorRecipeList> fluidRecipes = new EnumMap<>(
|
||||
EFluidGenerator.class);
|
||||
|
||||
/**
|
||||
* Register a Fluid energy recipe.
|
||||
* Register a {@link Fluid} energy recipe.
|
||||
*
|
||||
* @param generatorType A value of the EFluidGenerator type in which the fluid is
|
||||
* allowed to be consumed.
|
||||
* @param fluidType
|
||||
* @param energyPerMb Represent the energy / MILLI_BUCKET the fluid will produce.
|
||||
* Some generators use this value to alter their fluid decay
|
||||
* speed to match their maximum energy output.
|
||||
* @param generatorType {@link EFluidGenerator} A value of the {@link EFluidGenerator} type in
|
||||
* which the fluid is allowed to be consumed.
|
||||
* @param fluidType {@link Fluid} The fluid type that will be registered.
|
||||
* @param energyPerMb {@code int} Represent the energy / MILLI_BUCKET the fluid will produce.
|
||||
* <p>
|
||||
* Some generators use this value to alter their fluid decay
|
||||
* speed to match their maximum energy output.
|
||||
* </p>
|
||||
*/
|
||||
public static void registerFluidRecipe(EFluidGenerator generatorType, Fluid fluidType, int energyPerMb) {
|
||||
fluidRecipes.putIfAbsent(generatorType, new FluidGeneratorRecipeList());
|
||||
|
@ -56,10 +58,10 @@ public class GeneratorRecipeHelper {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param generatorType A value of the EFluidGenerator type in which the fluid is
|
||||
* allowed to be consumed.
|
||||
* @return An object holding a set of availables recipes for this type of
|
||||
* FluidGenerator.
|
||||
* @param generatorType {@link EFluidGenerator} A value of the {@link EFluidGenerator} type in
|
||||
* which the fluid is allowed to be consumed.
|
||||
* @return {@link FluidGeneratorRecipeList} An object holding a set of available recipes
|
||||
* for this type of {@link EFluidGenerator}.
|
||||
*/
|
||||
public static FluidGeneratorRecipeList getFluidRecipesForGenerator(EFluidGenerator generatorType) {
|
||||
return fluidRecipes.get(generatorType);
|
||||
|
@ -68,8 +70,9 @@ public class GeneratorRecipeHelper {
|
|||
/**
|
||||
* Removes recipe
|
||||
*
|
||||
* @param generatorType A value of the EFluidGenerator type for which we should remove recipe
|
||||
* @param fluidType Fluid to remove from generator recipes
|
||||
* @param generatorType {@link EFluidGenerator} A value of the {@link EFluidGenerator} type for
|
||||
* which we should remove recipe
|
||||
* @param fluidType {@link Fluid} Fluid to remove from generator recipes
|
||||
*/
|
||||
public static void removeFluidRecipe(EFluidGenerator generatorType, Fluid fluidType) {
|
||||
FluidGeneratorRecipeList recipeList = getFluidRecipesForGenerator(generatorType);
|
||||
|
|
|
@ -38,10 +38,10 @@ import java.util.List;
|
|||
public class ScrapboxRecipeCrafter extends RecipeCrafter {
|
||||
|
||||
/**
|
||||
* @param parent Tile having this crafter
|
||||
* @param inventory Inventory from parent blockEntity
|
||||
* @param inputSlots Slot IDs for input
|
||||
* @param outputSlots Slot IDs for output
|
||||
* @param parent {@link BlockEntity} Tile having this crafter
|
||||
* @param inventory {@link RebornInventory} Inventory from parent blockEntity
|
||||
* @param inputSlots {@code int[]} Slot IDs for input
|
||||
* @param outputSlots {@code int[]} Slot IDs for output
|
||||
*/
|
||||
public ScrapboxRecipeCrafter(BlockEntity parent, RebornInventory<?> inventory, int[] inputSlots, int[] outputSlots) {
|
||||
super(ModRecipes.SCRAPBOX, parent, 1, 1, inventory, inputSlots, outputSlots);
|
||||
|
|
|
@ -89,8 +89,9 @@ public class CableBlockEntity extends BlockEntity
|
|||
* This prevents double transfer rates, and back and forth between two cables.
|
||||
*/
|
||||
int blockedSides = 0;
|
||||
|
||||
/**
|
||||
* This is only used during the cable tick, whereas blockedOperations is used between ticks.
|
||||
* This is only used during the cable tick, whereas {@link #blockedSides} is used between ticks.
|
||||
*/
|
||||
boolean ioBlocked = false;
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ import net.minecraft.util.math.Direction;
|
|||
import team.reborn.energy.api.EnergyStorage;
|
||||
|
||||
/**
|
||||
* EnergyStorage adjacent to an energy cable, with some additional info.
|
||||
* {@link EnergyStorage} adjacent to an energy cable, with some additional info.
|
||||
*/
|
||||
class OfferedEnergyStorage {
|
||||
final CableBlockEntity sourceCable;
|
||||
|
|
|
@ -86,7 +86,8 @@ public class DataDrivenBEProvider extends BlockEntityType<DataDrivenBEProvider.D
|
|||
this.energy = JsonHelper.getInt(jsonObject, "energy");
|
||||
this.maxInput = JsonHelper.getInt(jsonObject, "maxInput");
|
||||
this.slots = DataDrivenSlot.read(JsonHelper.getArray(jsonObject, "slots"));
|
||||
Validate.isTrue(getEnergySlot() > 0); //Ensure there is an energy slot, doing it here so it crashes on game load
|
||||
// Ensure there is an energy slot, doing it here ensures it crashes on game load
|
||||
Validate.isTrue(getEnergySlot() > 0);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
|
|
@ -55,7 +55,7 @@ public record DataDrivenSlot(int id, int x, int y, @NotNull SlotType type) {
|
|||
|
||||
@Environment(EnvType.CLIENT)
|
||||
public void draw(MatrixStack matrixStack, GuiBase<?> guiBase, GuiBase.Layer layer) {
|
||||
//TODO find a better way to do this
|
||||
// TODO find a better way to do this
|
||||
if (type() == SlotType.OUTPUT) {
|
||||
guiBase.drawOutputSlot(matrixStack, x(), y(), layer);
|
||||
} else {
|
||||
|
|
|
@ -30,7 +30,7 @@ import java.util.Arrays;
|
|||
import java.util.function.BiConsumer;
|
||||
|
||||
public enum SlotType {
|
||||
//Im really not a fan of the way I add the slots to the builder here
|
||||
// I'm really not a fan of the way I add the slots to the builder here
|
||||
INPUT((builder, slot) -> {
|
||||
builder.slot(slot.id(), slot.x(), slot.y());
|
||||
}),
|
||||
|
|
|
@ -37,6 +37,7 @@ import reborncore.api.IToolDrop;
|
|||
import reborncore.api.blockentity.InventoryProvider;
|
||||
import reborncore.common.blockentity.MachineBaseBlockEntity;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.fluid.FluidUtils;
|
||||
import reborncore.common.fluid.FluidValue;
|
||||
import reborncore.common.powerSystem.PowerAcceptorBlockEntity;
|
||||
import reborncore.common.util.RebornInventory;
|
||||
|
@ -45,7 +46,6 @@ import techreborn.api.generator.EFluidGenerator;
|
|||
import techreborn.api.generator.FluidGeneratorRecipe;
|
||||
import techreborn.api.generator.FluidGeneratorRecipeList;
|
||||
import techreborn.api.generator.GeneratorRecipeHelper;
|
||||
import reborncore.common.fluid.FluidUtils;
|
||||
|
||||
public abstract class BaseFluidGeneratorBlockEntity extends PowerAcceptorBlockEntity implements IToolDrop, InventoryProvider {
|
||||
|
||||
|
|
|
@ -127,7 +127,7 @@ public class SolarPanelBlockEntity extends PowerAcceptorBlockEntity implements I
|
|||
return getPanel().generationRateN;
|
||||
}
|
||||
|
||||
// At this point, we know a light source is present and it's clear weather. We need to determine
|
||||
// At this point, we know a light source is present, and it's clear weather. We need to determine
|
||||
// the level of generation based on % of time through the day, with peak production at noon and
|
||||
// a smooth transition to night production as sun rises/sets
|
||||
float multiplier;
|
||||
|
|
|
@ -63,7 +63,7 @@ public class SolidFuelGeneratorBlockEntity extends PowerAcceptorBlockEntity impl
|
|||
ItemStack burnItem;
|
||||
|
||||
public SolidFuelGeneratorBlockEntity(BlockPos pos, BlockState state) {
|
||||
super(TRBlockEntities.SOLID_FUEL_GENEREATOR, pos, state);
|
||||
super(TRBlockEntities.SOLID_FUEL_GENERATOR, pos, state);
|
||||
}
|
||||
|
||||
public static int getItemBurnTime(@NotNull ItemStack stack) {
|
||||
|
|
|
@ -46,7 +46,7 @@ import techreborn.init.TRContent;
|
|||
*/
|
||||
public class WaterMillBlockEntity extends PowerAcceptorBlockEntity implements IToolDrop {
|
||||
|
||||
int waterblocks = 0;
|
||||
int waterBlocks = 0;
|
||||
|
||||
public WaterMillBlockEntity(BlockPos pos, BlockState state) {
|
||||
super(TRBlockEntities.WATER_MILL, pos, state);
|
||||
|
@ -62,8 +62,8 @@ public class WaterMillBlockEntity extends PowerAcceptorBlockEntity implements IT
|
|||
if (world.getTime() % 20 == 0) {
|
||||
checkForWater();
|
||||
}
|
||||
if (waterblocks > 0) {
|
||||
addEnergyProbabilistic(waterblocks * TechRebornConfig.waterMillEnergyMultiplier);
|
||||
if (waterBlocks > 0) {
|
||||
addEnergyProbabilistic(waterBlocks * TechRebornConfig.waterMillEnergyMultiplier);
|
||||
world.setBlockState(pos, world.getBlockState(pos).with(BlockMachineBase.ACTIVE, true));
|
||||
} else {
|
||||
world.setBlockState(pos, world.getBlockState(pos).with(BlockMachineBase.ACTIVE, false));
|
||||
|
@ -71,10 +71,10 @@ public class WaterMillBlockEntity extends PowerAcceptorBlockEntity implements IT
|
|||
}
|
||||
|
||||
public void checkForWater() {
|
||||
waterblocks = 0;
|
||||
waterBlocks = 0;
|
||||
for (Direction facing : Direction.values()) {
|
||||
if (facing.getAxis().isHorizontal() && world.getBlockState(pos.offset(facing)).getBlock() == Blocks.WATER) {
|
||||
waterblocks++;
|
||||
waterBlocks++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ public class LampBlockEntity extends PowerAcceptorBlockEntity implements IToolDr
|
|||
return 32;
|
||||
}
|
||||
|
||||
//MachineBaseBlockEntity
|
||||
// MachineBaseBlockEntity
|
||||
@Override
|
||||
public Direction getFacing(){
|
||||
if (world == null){
|
||||
|
|
|
@ -26,6 +26,7 @@ package techreborn.blockentity.machine;
|
|||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.block.entity.BlockEntityType;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -57,11 +58,11 @@ public abstract class GenericMachineBlockEntity extends PowerAcceptorBlockEntity
|
|||
public RecipeCrafter crafter;
|
||||
|
||||
/**
|
||||
* @param name String Name for a blockEntity. Do we need it at all?
|
||||
* @param maxInput int Maximum energy input, value in EU
|
||||
* @param maxEnergy int Maximum energy buffer, value in EU
|
||||
* @param toolDrop Block Block to drop with wrench
|
||||
* @param energySlot int Energy slot to use to charge machine from battery
|
||||
* @param name {@link String} Name for a {@link BlockEntity}. Do we need it at all?
|
||||
* @param maxInput {@code int} Maximum energy input, value in EU
|
||||
* @param maxEnergy {@code int} Maximum energy buffer, value in EU
|
||||
* @param toolDrop {@link Block} Block to drop with wrench
|
||||
* @param energySlot {@code int} Energy slot to use to charge machine from battery
|
||||
*/
|
||||
public GenericMachineBlockEntity(BlockEntityType<?> blockEntityType, BlockPos pos, BlockState state, String name, int maxInput, int maxEnergy, Block toolDrop, int energySlot) {
|
||||
super(blockEntityType, pos, state);
|
||||
|
@ -76,8 +77,8 @@ public abstract class GenericMachineBlockEntity extends PowerAcceptorBlockEntity
|
|||
/**
|
||||
* Returns progress scaled to input value
|
||||
*
|
||||
* @param scale int Maximum value for progress
|
||||
* @return int Scale of progress
|
||||
* @param scale {@code int} Maximum value for progress
|
||||
* @return {@code int} Scale of progress
|
||||
*/
|
||||
public int getProgressScaled(int scale) {
|
||||
if (crafter != null && crafter.currentTickTime != 0 && crafter.currentNeededTicks != 0) {
|
||||
|
|
|
@ -75,8 +75,8 @@ public abstract class AbstractIronMachineBlockEntity extends MachineBaseBlockEnt
|
|||
* Returns the number of ticks that the supplied fuel item will keep the
|
||||
* furnace burning, or 0 if the item isn't fuel
|
||||
*
|
||||
* @param stack Itemstack of fuel
|
||||
* @return Integer Number of ticks
|
||||
* @param stack {@link ItemStack} stack of fuel
|
||||
* @return {@code int} Number of ticks
|
||||
*/
|
||||
private int getItemBurnTime(ItemStack stack) {
|
||||
if (stack.isEmpty()) {
|
||||
|
@ -88,8 +88,8 @@ public abstract class AbstractIronMachineBlockEntity extends MachineBaseBlockEnt
|
|||
/**
|
||||
* Returns remaining fraction of fuel burn time
|
||||
*
|
||||
* @param scale Scale to use for burn time
|
||||
* @return int scaled remaining fuel burn time
|
||||
* @param scale {@code int} Scale to use for burn time
|
||||
* @return {@code int} scaled remaining fuel burn time
|
||||
*/
|
||||
public int getBurnTimeRemainingScaled(int scale) {
|
||||
if (totalBurnTime == 0) {
|
||||
|
@ -102,8 +102,8 @@ public abstract class AbstractIronMachineBlockEntity extends MachineBaseBlockEnt
|
|||
/**
|
||||
* Returns crafting progress
|
||||
*
|
||||
* @param scale Scale to use for crafting progress
|
||||
* @return int Scaled crafting progress
|
||||
* @param scale {@code int} Scale to use for crafting progress
|
||||
* @return {@code int} Scaled crafting progress
|
||||
*/
|
||||
public int getProgressScaled(int scale) {
|
||||
if (totalCookingTime > 0) {
|
||||
|
@ -115,7 +115,7 @@ public abstract class AbstractIronMachineBlockEntity extends MachineBaseBlockEnt
|
|||
/**
|
||||
* Returns true if Iron Machine is burning fuel thus can do work
|
||||
*
|
||||
* @return Boolean True if machine is burning
|
||||
* @return {@code boolean} True if machine is burning
|
||||
*/
|
||||
public boolean isBurning() {
|
||||
return burnTime > 0;
|
||||
|
@ -233,4 +233,4 @@ public abstract class AbstractIronMachineBlockEntity extends MachineBaseBlockEnt
|
|||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,8 +57,8 @@ public class IronAlloyFurnaceBlockEntity extends AbstractIronMachineBlockEntity
|
|||
}
|
||||
for (RebornIngredient ingredient : recipeType.getRebornIngredients()) {
|
||||
boolean hasItem = false;
|
||||
for (int inputslot = 0; inputslot < 2; inputslot++) {
|
||||
if (ingredient.test(inventory.getStack(inputslot))) {
|
||||
for (int inputSlot = 0; inputSlot < 2; inputSlot++) {
|
||||
if (ingredient.test(inventory.getStack(inputSlot))) {
|
||||
hasItem = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
package techreborn.blockentity.machine.multiblock;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NbtCompound;
|
||||
|
@ -107,7 +108,7 @@ public class FusionControlComputerBlockEntity extends GenericMachineBlockEntity
|
|||
/**
|
||||
* Changes size of fusion reactor ring after GUI button click
|
||||
*
|
||||
* @param sizeDelta int Size increment
|
||||
* @param sizeDelta {@code int} Size increment
|
||||
*/
|
||||
public void changeSize(int sizeDelta) {
|
||||
int newSize = size + sizeDelta;
|
||||
|
@ -125,13 +126,13 @@ public class FusionControlComputerBlockEntity extends GenericMachineBlockEntity
|
|||
}
|
||||
|
||||
/**
|
||||
* Checks that ItemStack could be inserted into slot provided, including check
|
||||
* Checks that {@link ItemStack} could be inserted into slot provided, including check
|
||||
* for existing item in slot and maximum stack size
|
||||
*
|
||||
* @param stack ItemStack ItemStack to insert
|
||||
* @param slot int Slot ID to check
|
||||
* @param tags boolean Should we use tags
|
||||
* @return boolean Returns true if ItemStack will fit into slot
|
||||
* @param stack {@link ItemStack} Stack to insert
|
||||
* @param slot {@code int} Slot ID to check
|
||||
* @param tags {@code boolean} Should we use tags
|
||||
* @return {@code boolean} Returns true if ItemStack will fit into slot
|
||||
*/
|
||||
public boolean canFitStack(ItemStack stack, int slot, boolean tags) {// Checks to see if it can
|
||||
// fit the stack
|
||||
|
@ -165,18 +166,18 @@ public class FusionControlComputerBlockEntity extends GenericMachineBlockEntity
|
|||
/**
|
||||
* Validates if reactor has all inputs and can output result
|
||||
*
|
||||
* @param recipe FusionReactorRecipe Recipe to validate
|
||||
* @return Boolean True if we have all inputs and can fit output
|
||||
* @param recipe {@link FusionReactorRecipe} Recipe to validate
|
||||
* @return {@code boolean} True if we have all inputs and can fit output
|
||||
*/
|
||||
private boolean validateRecipe(FusionReactorRecipe recipe) {
|
||||
return hasAllInputs(recipe) && canFitStack(recipe.getOutputs().get(0), outputStackSlot, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if BlockEntity has all necessary inputs for recipe provided
|
||||
* Check if {@link BlockEntity} has all necessary inputs for recipe provided
|
||||
*
|
||||
* @param recipeType RebornRecipe Recipe to check inputs
|
||||
* @return Boolean True if reactor has all inputs for recipe
|
||||
* @param recipeType {@link RebornRecipe} Recipe to check inputs
|
||||
* @return {@code boolean} True if reactor has all inputs for recipe
|
||||
*/
|
||||
private boolean hasAllInputs(RebornRecipe recipeType) {
|
||||
if (recipeType == null) {
|
||||
|
@ -198,7 +199,7 @@ public class FusionControlComputerBlockEntity extends GenericMachineBlockEntity
|
|||
/**
|
||||
* Decrease stack size on the given slot according to recipe input
|
||||
*
|
||||
* @param slot int Slot number
|
||||
* @param slot {@code int} Slot number
|
||||
*/
|
||||
private void useInput(int slot) {
|
||||
if (currentRecipe == null) {
|
||||
|
@ -259,7 +260,7 @@ public class FusionControlComputerBlockEntity extends GenericMachineBlockEntity
|
|||
return;
|
||||
}
|
||||
|
||||
//Move this to here from the nbt read method, as it now requires the world as of 1.14
|
||||
// Move this to here from the nbt read method, as it now requires the world as of 1.14
|
||||
if (checkNBTRecipe) {
|
||||
checkNBTRecipe = false;
|
||||
for (final RebornRecipe reactorRecipe : ModRecipes.FUSION_REACTOR.getRecipes(getWorld())) {
|
||||
|
@ -270,7 +271,7 @@ public class FusionControlComputerBlockEntity extends GenericMachineBlockEntity
|
|||
}
|
||||
|
||||
if (lastTick == world.getTime()) {
|
||||
//Prevent tick accelerators, blame obstinate for this.
|
||||
// Prevent tick accelerators, blame obstinate for this.
|
||||
return;
|
||||
}
|
||||
lastTick = world.getTime();
|
||||
|
@ -308,7 +309,7 @@ public class FusionControlComputerBlockEntity extends GenericMachineBlockEntity
|
|||
if (hasStartedCrafting && craftingTickTime < currentRecipe.getTime()) {
|
||||
// Power gen
|
||||
if (currentRecipe.getPower() > 0) {
|
||||
// Waste power if it has no where to go
|
||||
// Waste power if it has nowhere to go
|
||||
long power = (long) (Math.abs(currentRecipe.getPower()) * getPowerMultiplier());
|
||||
addEnergy(power);
|
||||
powerChange = (power);
|
||||
|
@ -380,7 +381,7 @@ public class FusionControlComputerBlockEntity extends GenericMachineBlockEntity
|
|||
tagCompound.putInt("size", size);
|
||||
}
|
||||
|
||||
//MachineBaseBlockEntity
|
||||
// MachineBaseBlockEntity
|
||||
@Override
|
||||
public double getPowerMultiplier() {
|
||||
double calc = (1F / 2F) * Math.pow(size - 5, 1.8);
|
||||
|
|
|
@ -262,7 +262,7 @@ public class AutoCraftingTableBlockEntity extends PowerAcceptorBlockEntity
|
|||
if (balanceSlot > craftCache.size()) {
|
||||
balanceSlot = 0;
|
||||
}
|
||||
//Find the best slot for each item in a recipe, and move it if needed
|
||||
// Find the best slot for each item in a recipe, and move it if needed
|
||||
ItemStack sourceStack = inventory.getStack(balanceSlot);
|
||||
if (sourceStack.isEmpty()) {
|
||||
return Optional.empty();
|
||||
|
|
|
@ -225,8 +225,8 @@ public class ElectricFurnaceBlockEntity extends PowerAcceptorBlockEntity
|
|||
if (getStored() > getEuPerTick(EnergyPerTick)) {
|
||||
useEnergy(getEuPerTick(EnergyPerTick));
|
||||
cookTime++;
|
||||
if (cookTime == 1 || cookTime % 20 == 0 && RecipeCrafter.soundHanlder != null) {
|
||||
RecipeCrafter.soundHanlder.playSound(false, this);
|
||||
if (cookTime == 1 || cookTime % 20 == 0 && RecipeCrafter.soundHandler != null) {
|
||||
RecipeCrafter.soundHandler.playSound(false, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -111,7 +111,7 @@ public class GreenhouseControllerBlockEntity extends PowerAcceptorBlockEntity
|
|||
|| block instanceof CactusBlock
|
||||
|| block instanceof BambooBlock
|
||||
) {
|
||||
// If we can break bottom block we should at least remove all of them up to top so they don't break automatically
|
||||
// If we can break bottom block we should at least remove all of them up to top, so they don't break automatically
|
||||
boolean breakBlocks = false;
|
||||
for (int y = 1; (blockState = world.getBlockState(blockPos.up(y))).getBlock() == block; y++) {
|
||||
if (y == 1) {
|
||||
|
|
|
@ -60,7 +60,7 @@ import java.util.List;
|
|||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
//TODO add tick and power bars.
|
||||
// TODO add tick and power bars.
|
||||
|
||||
public class RollingMachineBlockEntity extends PowerAcceptorBlockEntity
|
||||
implements IToolDrop, InventoryProvider, BuiltScreenHandlerProvider {
|
||||
|
@ -205,7 +205,7 @@ public class RollingMachineBlockEntity extends PowerAcceptorBlockEntity
|
|||
if (balanceSlot > craftCache.size()) {
|
||||
balanceSlot = 0;
|
||||
}
|
||||
//Find the best slot for each item in a recipe, and move it if needed
|
||||
// Find the best slot for each item in a recipe, and move it if needed
|
||||
ItemStack sourceStack = inventory.getStack(balanceSlot);
|
||||
if (sourceStack.isEmpty()) {
|
||||
return Optional.empty();
|
||||
|
@ -228,7 +228,7 @@ public class RollingMachineBlockEntity extends PowerAcceptorBlockEntity
|
|||
.mapToInt(value -> inventory.getStack(value).getCount()).sum();
|
||||
int slots = possibleSlots.size();
|
||||
|
||||
//This makes an array of ints with the best possible slot EnvTyperibution
|
||||
// This makes an array of ints with the best possible slot distribution
|
||||
int[] split = new int[slots];
|
||||
int remainder = totalItems % slots;
|
||||
Arrays.fill(split, totalItems / slots);
|
||||
|
@ -248,7 +248,7 @@ public class RollingMachineBlockEntity extends PowerAcceptorBlockEntity
|
|||
boolean needsBalance = false;
|
||||
for (int required : split) {
|
||||
if (slotEnvTyperubution.contains(required)) {
|
||||
//We need to remove the int, not at the int, this seems to work around that
|
||||
// We need to remove the int, not at the int, this seems to work around that
|
||||
slotEnvTyperubution.remove(Integer.valueOf(required));
|
||||
} else {
|
||||
needsBalance = true;
|
||||
|
@ -261,7 +261,7 @@ public class RollingMachineBlockEntity extends PowerAcceptorBlockEntity
|
|||
return Optional.empty();
|
||||
}
|
||||
|
||||
//Slot, count
|
||||
// Slot, count
|
||||
Pair<Integer, Integer> bestSlot = null;
|
||||
for (Integer slot : possibleSlots) {
|
||||
ItemStack slotStack = inventory.getStack(slot);
|
||||
|
@ -411,7 +411,7 @@ public class RollingMachineBlockEntity extends PowerAcceptorBlockEntity
|
|||
return this;
|
||||
}
|
||||
|
||||
//Easyest way to sync back to the client
|
||||
// Easiest way to sync back to the client
|
||||
public int getLockedInt() {
|
||||
return locked ? 1 : 0;
|
||||
}
|
||||
|
@ -434,7 +434,7 @@ public class RollingMachineBlockEntity extends PowerAcceptorBlockEntity
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canUse(final PlayerEntity entityplayer) {
|
||||
public boolean canUse(final PlayerEntity playerEntity) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,9 +38,9 @@ import techreborn.init.ModRecipes;
|
|||
import techreborn.init.TRBlockEntities;
|
||||
import techreborn.init.TRContent;
|
||||
|
||||
public class SoildCanningMachineBlockEntity extends GenericMachineBlockEntity implements BuiltScreenHandlerProvider {
|
||||
public class SolidCanningMachineBlockEntity extends GenericMachineBlockEntity implements BuiltScreenHandlerProvider {
|
||||
|
||||
public SoildCanningMachineBlockEntity(BlockPos pos, BlockState state) {
|
||||
public SolidCanningMachineBlockEntity(BlockPos pos, BlockState state) {
|
||||
super(TRBlockEntities.SOLID_CANNING_MACHINE, pos, state, "SolidCanningMachine", TechRebornConfig.solidCanningMachineMaxInput, TechRebornConfig.solidCanningMachineMaxEnergy, TRContent.Machine.SOLID_CANNING_MACHINE.block, 3);
|
||||
final int[] inputs = new int[]{0, 1};
|
||||
final int[] outputs = new int[]{2};
|
|
@ -133,14 +133,14 @@ public class ChunkLoaderBlockEntity extends MachineBaseBlockEntity implements IT
|
|||
}
|
||||
|
||||
@Override
|
||||
public void readNbt(NbtCompound nbttagcompound) {
|
||||
super.readNbt(nbttagcompound);
|
||||
this.radius = nbttagcompound.getInt("radius");
|
||||
this.ownerUdid = nbttagcompound.getString("ownerUdid");
|
||||
public void readNbt(NbtCompound nbtCompound) {
|
||||
super.readNbt(nbtCompound);
|
||||
this.radius = nbtCompound.getInt("radius");
|
||||
this.ownerUdid = nbtCompound.getString("ownerUdid");
|
||||
if (!StringUtils.isBlank(ownerUdid)) {
|
||||
nbttagcompound.putString("ownerUdid", this.ownerUdid);
|
||||
nbtCompound.putString("ownerUdid", this.ownerUdid);
|
||||
}
|
||||
inventory.read(nbttagcompound);
|
||||
inventory.read(nbtCompound);
|
||||
}
|
||||
|
||||
// IToolDrop
|
||||
|
|
|
@ -121,7 +121,7 @@ public class AdjustableSUBlockEntity extends EnergyStorageBlockEntity implements
|
|||
|
||||
@Override
|
||||
public long getBaseMaxInput() {
|
||||
//If we have super conductors increase the max input of the machine
|
||||
// If we have super conductors increase the max input of the machine
|
||||
if (getMaxConfigOutput() > maxOutput) {
|
||||
return getMaxConfigOutput();
|
||||
}
|
||||
|
@ -147,9 +147,9 @@ public class AdjustableSUBlockEntity extends EnergyStorageBlockEntity implements
|
|||
}
|
||||
|
||||
@Override
|
||||
public void readNbt(NbtCompound nbttagcompound) {
|
||||
super.readNbt(nbttagcompound);
|
||||
this.OUTPUT = nbttagcompound.getInt("output");
|
||||
public void readNbt(NbtCompound nbtCompound) {
|
||||
super.readNbt(nbtCompound);
|
||||
this.OUTPUT = nbtCompound.getInt("output");
|
||||
}
|
||||
|
||||
// MachineBaseBlockEntity
|
||||
|
@ -163,14 +163,14 @@ public class AdjustableSUBlockEntity extends EnergyStorageBlockEntity implements
|
|||
public BuiltScreenHandler createScreenHandler(int syncID, PlayerEntity player) {
|
||||
return new ScreenHandlerBuilder("aesu").player(player.getInventory()).inventory().hotbar().armor()
|
||||
.complete(8, 18).addArmor().addInventory().blockEntity(this).energySlot(0, 62, 45).energySlot(1, 98, 45)
|
||||
.syncEnergyValue().sync(this::getCurrentOutput, this::setCurentOutput).addInventory().create(this, syncID);
|
||||
.syncEnergyValue().sync(this::getCurrentOutput, this::setCurrentOutput).addInventory().create(this, syncID);
|
||||
}
|
||||
|
||||
public int getCurrentOutput() {
|
||||
return OUTPUT;
|
||||
}
|
||||
|
||||
public void setCurentOutput(int output) {
|
||||
public void setCurrentOutput(int output) {
|
||||
this.OUTPUT = output;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ public class InterdimensionalSUBlockEntity extends EnergyStorageBlockEntity impl
|
|||
|
||||
public String ownerUdid;
|
||||
|
||||
//This is the energy value that is synced to the client
|
||||
// This is the energy value that is synced to the client
|
||||
private long clientEnergy;
|
||||
|
||||
public InterdimensionalSUBlockEntity(BlockPos pos, BlockState state) {
|
||||
|
@ -123,18 +123,18 @@ public class InterdimensionalSUBlockEntity extends EnergyStorageBlockEntity impl
|
|||
}
|
||||
|
||||
@Override
|
||||
public void readNbt(NbtCompound nbttagcompound) {
|
||||
super.readNbt(nbttagcompound);
|
||||
this.ownerUdid = nbttagcompound.getString("ownerUdid");
|
||||
public void readNbt(NbtCompound nbtCompound) {
|
||||
super.readNbt(nbtCompound);
|
||||
this.ownerUdid = nbtCompound.getString("ownerUdid");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeNbt(NbtCompound nbttagcompound) {
|
||||
super.writeNbt(nbttagcompound);
|
||||
public void writeNbt(NbtCompound nbtCompound) {
|
||||
super.writeNbt(nbtCompound);
|
||||
if (ownerUdid == null || StringUtils.isEmpty(ownerUdid)) {
|
||||
return;
|
||||
}
|
||||
nbttagcompound.putString("ownerUdid", this.ownerUdid);
|
||||
nbtCompound.putString("ownerUdid", this.ownerUdid);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -63,7 +63,7 @@ import techreborn.blockentity.cable.CableBlockEntity;
|
|||
import techreborn.config.TechRebornConfig;
|
||||
import techreborn.init.ModSounds;
|
||||
import techreborn.init.TRContent;
|
||||
import techreborn.utils.damageSources.ElectrialShockSource;
|
||||
import techreborn.utils.damageSources.ElectricalShockSource;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
@ -98,7 +98,7 @@ public class CableBlock extends BlockWithEntity implements Waterloggable {
|
|||
this.type = type;
|
||||
setDefaultState(this.getStateManager().getDefaultState().with(EAST, false).with(WEST, false).with(NORTH, false)
|
||||
.with(SOUTH, false).with(UP, false).with(DOWN, false).with(WATERLOGGED, false).with(COVERED, false));
|
||||
BlockWrenchEventHandler.wrenableBlocks.add(this);
|
||||
BlockWrenchEventHandler.wrenchableBlocks.add(this);
|
||||
}
|
||||
|
||||
// BlockWithEntity
|
||||
|
@ -233,7 +233,7 @@ public class CableBlock extends BlockWithEntity implements Waterloggable {
|
|||
if (type == TRContent.Cables.HV) {
|
||||
entity.setOnFireFor(1);
|
||||
}
|
||||
entity.damage(new ElectrialShockSource(), 1F);
|
||||
entity.damage(new ElectricalShockSource(), 1F);
|
||||
blockEntityCable.setEnergy(0);
|
||||
}
|
||||
if (TechRebornConfig.uninsulatedElectrocutionSound) {
|
||||
|
|
|
@ -65,7 +65,7 @@ public class LampBlock extends BaseBlockEntityProvider {
|
|||
this.shape = genCuboidShapes(depth, width);
|
||||
this.cost = cost;
|
||||
this.setDefaultState(this.getStateManager().getDefaultState().with(FACING, Direction.NORTH).with(ACTIVE, false));
|
||||
BlockWrenchEventHandler.wrenableBlocks.add(this);
|
||||
BlockWrenchEventHandler.wrenchableBlocks.add(this);
|
||||
}
|
||||
|
||||
private static ToIntFunction<BlockState> createLightLevelFromBlockState() {
|
||||
|
@ -148,7 +148,7 @@ public class LampBlock extends BaseBlockEntityProvider {
|
|||
ItemStack stack = playerIn.getStackInHand(Hand.MAIN_HAND);
|
||||
BlockEntity blockEntity = worldIn.getBlockEntity(pos);
|
||||
|
||||
// We extended BaseTileBlock. Thus we should always have blockEntity entity. I hope.
|
||||
// We extended BaseTileBlock. Thus, we should always have blockEntity entity. I hope.
|
||||
if (blockEntity == null) {
|
||||
return ActionResult.FAIL;
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ public class BlockAlarm extends BaseBlockEntityProvider {
|
|||
super(Block.Settings.of(Material.STONE).strength(2f, 2f));
|
||||
this.setDefaultState(this.getStateManager().getDefaultState().with(FACING, Direction.NORTH).with(ACTIVE, false));
|
||||
this.shape = GenCuboidShapes(3, 10);
|
||||
BlockWrenchEventHandler.wrenableBlocks.add(this);
|
||||
BlockWrenchEventHandler.wrenchableBlocks.add(this);
|
||||
}
|
||||
|
||||
private VoxelShape[] GenCuboidShapes(double depth, double width) {
|
||||
|
@ -113,10 +113,10 @@ public class BlockAlarm extends BaseBlockEntityProvider {
|
|||
@Nullable
|
||||
@Override
|
||||
public BlockState getPlacementState(ItemPlacementContext context) {
|
||||
for (Direction enumfacing : context.getPlacementDirections()) {
|
||||
BlockState iblockstate = this.getDefaultState().with(FACING, enumfacing.getOpposite());
|
||||
if (iblockstate.canPlaceAt(context.getWorld(), context.getBlockPos())) {
|
||||
return iblockstate;
|
||||
for (Direction facing : context.getPlacementDirections()) {
|
||||
BlockState state = this.getDefaultState().with(FACING, facing.getOpposite());
|
||||
if (state.canPlaceAt(context.getWorld(), context.getBlockPos())) {
|
||||
return state;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -127,7 +127,7 @@ public class BlockAlarm extends BaseBlockEntityProvider {
|
|||
ItemStack stack = playerIn.getStackInHand(Hand.MAIN_HAND);
|
||||
BlockEntity blockEntity = worldIn.getBlockEntity(pos);
|
||||
|
||||
// We extended BaseTileBlock. Thus we should always have blockEntity entity. I hope.
|
||||
// We extended BaseTileBlock. Thus, we should always have blockEntity entity. I hope.
|
||||
if (blockEntity == null) {
|
||||
return ActionResult.FAIL;
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ public abstract class EnergyStorageBlock extends BaseBlockEntityProvider {
|
|||
this.setDefaultState(this.getStateManager().getDefaultState().with(FACING, Direction.NORTH));
|
||||
this.name = name;
|
||||
this.gui = gui;
|
||||
BlockWrenchEventHandler.wrenableBlocks.add(this);
|
||||
BlockWrenchEventHandler.wrenchableBlocks.add(this);
|
||||
}
|
||||
|
||||
public void setFacing(Direction facing, World world, BlockPos pos) {
|
||||
|
@ -100,7 +100,7 @@ public abstract class EnergyStorageBlock extends BaseBlockEntityProvider {
|
|||
ItemStack stack = playerIn.getStackInHand(Hand.MAIN_HAND);
|
||||
BlockEntity blockEntity = worldIn.getBlockEntity(pos);
|
||||
|
||||
// We extended BlockTileBase. Thus we should always have blockEntity entity. I hope.
|
||||
// We extended BlockTileBase. Thus, we should always have blockEntity entity. I hope.
|
||||
if (blockEntity == null) {
|
||||
return ActionResult.FAIL;
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ public class LSUStorageBlock extends BaseBlockEntityProvider {
|
|||
|
||||
public LSUStorageBlock() {
|
||||
super(FabricBlockSettings.of(Material.METAL).strength(2f, 2f));
|
||||
BlockWrenchEventHandler.wrenableBlocks.add(this);
|
||||
BlockWrenchEventHandler.wrenchableBlocks.add(this);
|
||||
}
|
||||
|
||||
// BaseTileBlock
|
||||
|
@ -87,7 +87,7 @@ public class LSUStorageBlock extends BaseBlockEntityProvider {
|
|||
ItemStack stack = playerIn.getStackInHand(Hand.MAIN_HAND);
|
||||
BlockEntity blockEntity = worldIn.getBlockEntity(pos);
|
||||
|
||||
// We extended BaseTileBlock. Thus we should always have blockEntity entity. I hope.
|
||||
// We extended BaseTileBlock. Thus, we should always have blockEntity entity. I hope.
|
||||
if (blockEntity == null) {
|
||||
return ActionResult.FAIL;
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ public abstract class BlockTransformer extends BaseBlockEntityProvider {
|
|||
super(FabricBlockSettings.of(Material.METAL).strength(2f, 2f));
|
||||
this.setDefaultState(this.getStateManager().getDefaultState().with(FACING, Direction.NORTH));
|
||||
this.name = name;
|
||||
BlockWrenchEventHandler.wrenableBlocks.add(this);
|
||||
BlockWrenchEventHandler.wrenchableBlocks.add(this);
|
||||
}
|
||||
|
||||
public void setFacing(Direction facing, World world, BlockPos pos) {
|
||||
|
@ -94,7 +94,7 @@ public abstract class BlockTransformer extends BaseBlockEntityProvider {
|
|||
ItemStack stack = playerIn.getStackInHand(Hand.MAIN_HAND);
|
||||
BlockEntity blockEntity = worldIn.getBlockEntity(pos);
|
||||
|
||||
// We extended BlockTileBase. Thus we should always have blockEntity entity. I hope.
|
||||
// We extended BlockTileBase. Thus, we should always have blockEntity entity. I hope.
|
||||
if (blockEntity == null) {
|
||||
return ActionResult.FAIL;
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ import java.util.HashMap;
|
|||
import java.util.Map;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
//The meme is here the double suppliers dont cause the client side gui classes to load on the server
|
||||
// The meme is here the double suppliers don't cause the client side gui classes to load on the server
|
||||
public final class GuiType<T extends BlockEntity> implements IMachineGuiHandler {
|
||||
private static final Map<Identifier, GuiType<?>> TYPES = new HashMap<>();
|
||||
|
||||
|
@ -121,7 +121,7 @@ public final class GuiType<T extends BlockEntity> implements IMachineGuiHandler
|
|||
public static final GuiType<SemiFluidGeneratorBlockEntity> SEMIFLUID_GENERATOR = register("semifluid_generator", () -> () -> GuiSemifluidGenerator::new);
|
||||
public static final GuiType<ThermalGeneratorBlockEntity> THERMAL_GENERATOR = register("thermal_generator", () -> () -> GuiThermalGenerator::new);
|
||||
public static final GuiType<VacuumFreezerBlockEntity> VACUUM_FREEZER = register("vacuum_freezer", () -> () -> GuiVacuumFreezer::new);
|
||||
public static final GuiType<SoildCanningMachineBlockEntity> SOLID_CANNING_MACHINE = register("solid_canning_machine", () -> () -> GuiSolidCanningMachine::new);
|
||||
public static final GuiType<SolidCanningMachineBlockEntity> SOLID_CANNING_MACHINE = register("solid_canning_machine", () -> () -> GuiSolidCanningMachine::new);
|
||||
public static final GuiType<WireMillBlockEntity> WIRE_MILL = register("wire_mill", () -> () -> GuiWireMill::new);
|
||||
public static final GuiType<GreenhouseControllerBlockEntity> GREENHOUSE_CONTROLLER = register("greenhouse_controller", () -> () -> GuiGreenhouseController::new);
|
||||
public static final GuiType<FluidReplicatorBlockEntity> FLUID_REPLICATOR = register("fluid_replicator", () -> () -> GuiFluidReplicator::new);
|
||||
|
|
|
@ -29,13 +29,13 @@ import net.minecraft.entity.player.PlayerEntity;
|
|||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.guibuilder.GuiBuilder;
|
||||
import reborncore.client.screen.builder.BuiltScreenHandler;
|
||||
import techreborn.blockentity.machine.tier1.SoildCanningMachineBlockEntity;
|
||||
import techreborn.blockentity.machine.tier1.SolidCanningMachineBlockEntity;
|
||||
|
||||
public class GuiSolidCanningMachine extends GuiBase<BuiltScreenHandler> {
|
||||
|
||||
SoildCanningMachineBlockEntity blockEntity;
|
||||
SolidCanningMachineBlockEntity blockEntity;
|
||||
|
||||
public GuiSolidCanningMachine(int syncID, final PlayerEntity player, final SoildCanningMachineBlockEntity blockEntity) {
|
||||
public GuiSolidCanningMachine(int syncID, final PlayerEntity player, final SolidCanningMachineBlockEntity blockEntity) {
|
||||
super(player, blockEntity, blockEntity.createScreenHandler(syncID, player));
|
||||
this.blockEntity = blockEntity;
|
||||
|
||||
|
|
|
@ -61,8 +61,8 @@ public class ModelHelper {
|
|||
|
||||
public static Reader getReaderForResource(Identifier location) throws IOException {
|
||||
Identifier file = new Identifier(location.getNamespace(), location.getPath() + ".json");
|
||||
Resource iresource = MinecraftClient.getInstance().getResourceManager().getResource(file);
|
||||
return new BufferedReader(new InputStreamReader(iresource.getInputStream(), Charsets.UTF_8));
|
||||
Resource resource = MinecraftClient.getInstance().getResourceManager().getResource(file);
|
||||
return new BufferedReader(new InputStreamReader(resource.getInputStream(), Charsets.UTF_8));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ public class AutoSwitchApiImpl implements AutoSwitchApi {
|
|||
|
||||
@Override
|
||||
public void customDamageSystems(AutoSwitchMap<Class<?>, DurabilityGetter> damageMap) {
|
||||
// Multiple by 100 to get percentage out of decimal form
|
||||
// Multiply by 100 to get percentage out of decimal form
|
||||
damageMap.put(DrillItem.class, stack -> 100 * ItemUtils.getPowerForDurabilityBar(stack));
|
||||
damageMap.put(ChainsawItem.class, stack -> 100 * ItemUtils.getPowerForDurabilityBar(stack));
|
||||
damageMap.put(JackhammerItem.class, stack -> 100 * ItemUtils.getPowerForDurabilityBar(stack));
|
||||
|
|
|
@ -29,7 +29,7 @@ import reborncore.common.config.Config;
|
|||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
//All moved into one class as its a lot easier to find the annotations when you know where they all are
|
||||
// All moved into one class as it's a lot easier to find the annotations when you know where they all are
|
||||
public class TechRebornConfig {
|
||||
|
||||
// Generators
|
||||
|
@ -268,11 +268,11 @@ public class TechRebornConfig {
|
|||
@Config(config = "items", category = "power", key = "lapotronicOrbMaxCharge", comment = "Energy Capacity for Lapotronic Orb")
|
||||
public static int lapotronicOrbMaxCharge = 100_000_000;
|
||||
|
||||
@Config(config = "items", category = "power", key = "cloakingDeviceCharge", comment = "Energy Capacity for Cloacking Device")
|
||||
@Config(config = "items", category = "power", key = "cloakingDeviceCharge", comment = "Energy Capacity for Cloaking Device")
|
||||
public static int cloakingDeviceCharge = 40_000_000;
|
||||
|
||||
@Config(config = "items", category = "power", key = "clockingDeviceEnergyUsage", comment = "Cloacking device energy usage")
|
||||
public static int cloackingDeviceCost = 10;
|
||||
@Config(config = "items", category = "power", key = "clockingDeviceEnergyUsage", comment = "Cloaking device energy usage")
|
||||
public static int cloakingDeviceCost = 10;
|
||||
|
||||
@Config(config = "items", category = "power", key = "quantumSuitCapacity", comment = "Quantum Suit Energy Capacity")
|
||||
public static long quantumSuitCapacity = 40_000_000;
|
||||
|
|
|
@ -117,7 +117,7 @@ public class ModRegistry {
|
|||
RebornRegistry.registerBlockNoItem(TRContent.POTTED_RUBBER_SAPLING = InitUtils.setup(new FlowerPotBlock(TRContent.RUBBER_SAPLING, AbstractBlock.Settings.of(Material.DECORATION).breakInstantly().nonOpaque()), "potted_rubber_sapling"));
|
||||
RebornRegistry.registerBlock(TRContent.COPPER_WALL = InitUtils.setup(new WallBlock(FabricBlockSettings.of(Material.METAL).strength(2f, 2f).sounds(BlockSoundGroup.METAL)), "copper_wall"), itemGroup);
|
||||
|
||||
TechReborn.LOGGER.debug("TechReborns Blocks Loaded");
|
||||
TechReborn.LOGGER.debug("TechReborn's Blocks Loaded");
|
||||
}
|
||||
|
||||
private static void registerItems() {
|
||||
|
@ -233,7 +233,7 @@ public class ModRegistry {
|
|||
RebornRegistry.registerItem(TRContent.CELL = InitUtils.setup(new DynamicCellItem(), "cell"));
|
||||
TRContent.CELL.registerFluidApi();
|
||||
|
||||
TechReborn.LOGGER.debug("TechReborns Items Loaded");
|
||||
TechReborn.LOGGER.debug("TechReborn's Items Loaded");
|
||||
}
|
||||
|
||||
private static void registerFluids() {
|
||||
|
|
|
@ -72,8 +72,8 @@ public class UseBlockHandler implements UseBlockCallback{
|
|||
world.setBlockState(pos, strippedBlock.getDefaultState().with(PillarBlock.AXIS, hitState.get(PillarBlock.AXIS)), 11);
|
||||
|
||||
// Damage axe
|
||||
stack.damage(1, playerEntity, playerx ->
|
||||
playerx.sendToolBreakStatus(hand)
|
||||
stack.damage(1, playerEntity, playerX ->
|
||||
playerX.sendToolBreakStatus(hand)
|
||||
);
|
||||
return ActionResult.SUCCESS;
|
||||
}
|
||||
|
|
|
@ -45,8 +45,8 @@ public class ModLoot {
|
|||
LootPoolEntry tinIngot = makeEntry(Ingots.TIN);
|
||||
LootPoolEntry leadIngot = makeEntry(Ingots.LEAD);
|
||||
LootPoolEntry silverIngot = makeEntry(Ingots.SILVER);
|
||||
LootPoolEntry refinedronIngot = makeEntry(Ingots.REFINED_IRON);
|
||||
LootPoolEntry advancedalloyIngot = makeEntry(Ingots.ADVANCED_ALLOY);
|
||||
LootPoolEntry refinedIronIngot = makeEntry(Ingots.REFINED_IRON);
|
||||
LootPoolEntry advancedAlloyIngot = makeEntry(Ingots.ADVANCED_ALLOY);
|
||||
LootPoolEntry basicFrame = makeEntry(TRContent.MachineBlocks.BASIC.frame.asItem());
|
||||
LootPoolEntry basicCircuit = makeEntry(Parts.ELECTRONIC_CIRCUIT);
|
||||
LootPoolEntry rubberSapling = makeEntry(TRContent.RUBBER_SAPLING, 25);
|
||||
|
@ -73,7 +73,7 @@ public class ModLoot {
|
|||
|
||||
|
||||
LootPool poolBasic = FabricLootPoolBuilder.builder().withEntry(copperIngot).withEntry(tinIngot)
|
||||
.withEntry(leadIngot).withEntry(silverIngot).withEntry(refinedronIngot).withEntry(advancedalloyIngot)
|
||||
.withEntry(leadIngot).withEntry(silverIngot).withEntry(refinedIronIngot).withEntry(advancedAlloyIngot)
|
||||
.withEntry(basicFrame).withEntry(basicCircuit).withEntry(rubberSapling).rolls(UniformLootNumberProvider.create(1.0f, 2.0f))
|
||||
.build();
|
||||
|
||||
|
@ -139,8 +139,8 @@ public class ModLoot {
|
|||
/**
|
||||
* Makes loot entry from item provided
|
||||
*
|
||||
* @param item Item to include into LootEntry
|
||||
* @return LootEntry for item provided
|
||||
* @param item {@link ItemConvertible} Item to include into LootEntry
|
||||
* @return {@link LootPoolEntry} Entry for item provided
|
||||
*/
|
||||
private static LootPoolEntry makeEntry(ItemConvertible item) {
|
||||
return makeEntry(item, 5);
|
||||
|
@ -149,9 +149,9 @@ public class ModLoot {
|
|||
/**
|
||||
* Makes loot entry from item provided with weight provided
|
||||
*
|
||||
* @param item Item to include into LootEntry
|
||||
* @param weight Weight of that item
|
||||
* @return LootEntry for item and weight provided
|
||||
* @param item {@link ItemConvertible} Item to include into LootEntry
|
||||
* @param weight {@code int} Weight of that item
|
||||
* @return {@link LootPoolEntry} Entry for item and weight provided
|
||||
*/
|
||||
private static LootPoolEntry makeEntry(ItemConvertible item, int weight) {
|
||||
return ItemEntry.builder(item).weight(weight)
|
||||
|
|
|
@ -28,7 +28,7 @@ import net.minecraft.block.entity.BlockEntity;
|
|||
import net.minecraft.sound.SoundCategory;
|
||||
import net.minecraft.sound.SoundEvent;
|
||||
import net.minecraft.world.World;
|
||||
import reborncore.common.recipes.ICrafterSoundHanlder;
|
||||
import reborncore.common.recipes.ICrafterSoundHandler;
|
||||
import techreborn.config.TechRebornConfig;
|
||||
|
||||
/**
|
||||
|
@ -46,7 +46,7 @@ public class ModSounds {
|
|||
public static SoundEvent ALARM_2;
|
||||
public static SoundEvent ALARM_3;
|
||||
|
||||
public static class SoundHandler implements ICrafterSoundHanlder {
|
||||
public static class SoundHandler implements ICrafterSoundHandler {
|
||||
|
||||
@Override
|
||||
public void playSound(boolean firstRun, BlockEntity blockEntity) {
|
||||
|
|
|
@ -112,7 +112,7 @@ public class TRBlockEntities {
|
|||
public static final BlockEntityType<FusionControlComputerBlockEntity> FUSION_CONTROL_COMPUTER = register(FusionControlComputerBlockEntity::new, "fusion_control_computer", TRContent.Machine.FUSION_CONTROL_COMPUTER);
|
||||
public static final BlockEntityType<LightningRodBlockEntity> LIGHTNING_ROD = register(LightningRodBlockEntity::new, "lightning_rod", TRContent.Machine.LIGHTNING_ROD);
|
||||
public static final BlockEntityType<IndustrialSawmillBlockEntity> INDUSTRIAL_SAWMILL = register(IndustrialSawmillBlockEntity::new, "industrial_sawmill", TRContent.Machine.INDUSTRIAL_SAWMILL);
|
||||
public static final BlockEntityType<SolidFuelGeneratorBlockEntity> SOLID_FUEL_GENEREATOR = register(SolidFuelGeneratorBlockEntity::new, "solid_fuel_generator", TRContent.Machine.SOLID_FUEL_GENERATOR);
|
||||
public static final BlockEntityType<SolidFuelGeneratorBlockEntity> SOLID_FUEL_GENERATOR = register(SolidFuelGeneratorBlockEntity::new, "solid_fuel_generator", TRContent.Machine.SOLID_FUEL_GENERATOR);
|
||||
public static final BlockEntityType<ExtractorBlockEntity> EXTRACTOR = register(ExtractorBlockEntity::new, "extractor", TRContent.Machine.EXTRACTOR);
|
||||
public static final BlockEntityType<ResinBasinBlockEntity> RESIN_BASIN = register(ResinBasinBlockEntity::new, "resin_basin", TRContent.Machine.RESIN_BASIN);
|
||||
public static final BlockEntityType<CompressorBlockEntity> COMPRESSOR = register(CompressorBlockEntity::new, "compressor", TRContent.Machine.COMPRESSOR);
|
||||
|
@ -135,7 +135,7 @@ public class TRBlockEntities {
|
|||
public static final BlockEntityType<LampBlockEntity> LAMP = register(LampBlockEntity::new, "lamp", TRContent.Machine.LAMP_INCANDESCENT, TRContent.Machine.LAMP_LED);
|
||||
public static final BlockEntityType<AlarmBlockEntity> ALARM = register(AlarmBlockEntity::new, "alarm", TRContent.Machine.ALARM);
|
||||
public static final BlockEntityType<FluidReplicatorBlockEntity> FLUID_REPLICATOR = register(FluidReplicatorBlockEntity::new, "fluid_replicator", TRContent.Machine.FLUID_REPLICATOR);
|
||||
public static final BlockEntityType<SoildCanningMachineBlockEntity> SOLID_CANNING_MACHINE = register(SoildCanningMachineBlockEntity::new, "solid_canning_machine", TRContent.Machine.SOLID_CANNING_MACHINE);
|
||||
public static final BlockEntityType<SolidCanningMachineBlockEntity> SOLID_CANNING_MACHINE = register(SolidCanningMachineBlockEntity::new, "solid_canning_machine", TRContent.Machine.SOLID_CANNING_MACHINE);
|
||||
public static final BlockEntityType<WireMillBlockEntity> WIRE_MILL = register(WireMillBlockEntity::new, "wire_mill", TRContent.Machine.WIRE_MILL);
|
||||
public static final BlockEntityType<GreenhouseControllerBlockEntity> GREENHOUSE_CONTROLLER = register(GreenhouseControllerBlockEntity::new, "greenhouse_controller", TRContent.Machine.GREENHOUSE_CONTROLLER);
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ public class TRCauldronBehavior {
|
|||
}
|
||||
|
||||
return CauldronBehavior.emptyCauldron(state, world, pos, player, hand, stack,
|
||||
DynamicCellItem.getCellWithFluid(Fluids.LAVA), (statex) -> true, SoundEvents.ITEM_BUCKET_FILL);
|
||||
DynamicCellItem.getCellWithFluid(Fluids.LAVA), (stateX) -> true, SoundEvents.ITEM_BUCKET_FILL);
|
||||
};
|
||||
|
||||
CauldronBehavior FILL_CELL_WITH_WATER = (state, world, pos, player, hand, stack) -> {
|
||||
|
@ -62,7 +62,7 @@ public class TRCauldronBehavior {
|
|||
}
|
||||
|
||||
return CauldronBehavior.emptyCauldron(state, world, pos, player, hand, stack,
|
||||
DynamicCellItem.getCellWithFluid(Fluids.WATER), (statex) -> true, SoundEvents.ITEM_BUCKET_FILL_LAVA);
|
||||
DynamicCellItem.getCellWithFluid(Fluids.WATER), (stateX) -> true, SoundEvents.ITEM_BUCKET_FILL_LAVA);
|
||||
};
|
||||
|
||||
CauldronBehavior FILL_FROM_CELL = (state, world, pos, player, hand, stack) -> {
|
||||
|
|
|
@ -618,7 +618,7 @@ public class TRContent {
|
|||
ROLLING_MACHINE(new GenericMachineBlock(GuiType.ROLLING_MACHINE, RollingMachineBlockEntity::new)),
|
||||
SCRAPBOXINATOR(new GenericMachineBlock(GuiType.SCRAPBOXINATOR, ScrapboxinatorBlockEntity::new)),
|
||||
VACUUM_FREEZER(new GenericMachineBlock(GuiType.VACUUM_FREEZER, VacuumFreezerBlockEntity::new)),
|
||||
SOLID_CANNING_MACHINE(new GenericMachineBlock(GuiType.SOLID_CANNING_MACHINE, SoildCanningMachineBlockEntity::new)),
|
||||
SOLID_CANNING_MACHINE(new GenericMachineBlock(GuiType.SOLID_CANNING_MACHINE, SolidCanningMachineBlockEntity::new)),
|
||||
WIRE_MILL(new GenericMachineBlock(GuiType.WIRE_MILL, WireMillBlockEntity::new)),
|
||||
GREENHOUSE_CONTROLLER(new GenericMachineBlock(GuiType.GREENHOUSE_CONTROLLER, GreenhouseControllerBlockEntity::new)),
|
||||
|
||||
|
@ -1157,8 +1157,8 @@ public class TRContent {
|
|||
powerAcceptor = (PowerAcceptorBlockEntity) blockEntity;
|
||||
}
|
||||
if (handler != null) {
|
||||
handler.addSpeedMulti(TechRebornConfig.overclockerSpeed);
|
||||
handler.addPowerMulti(TechRebornConfig.overclockerPower);
|
||||
handler.addSpeedMultiplier(TechRebornConfig.overclockerSpeed);
|
||||
handler.addPowerMultiplier(TechRebornConfig.overclockerPower);
|
||||
}
|
||||
if (powerAcceptor != null) {
|
||||
powerAcceptor.extraPowerInput += powerAcceptor.getMaxInput(null);
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
package techreborn.init;
|
||||
|
||||
import net.minecraft.item.ToolMaterial;
|
||||
import net.minecraft.item.ToolMaterials;
|
||||
import net.minecraft.recipe.Ingredient;
|
||||
import techreborn.TechReborn;
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ import net.minecraft.util.Lazy;
|
|||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
//TODO: Use tags
|
||||
// TODO: Use tags
|
||||
public enum TRToolTier implements ToolMaterial {
|
||||
BRONZE(2, 375, 7.0F, 2.25f, 6, () -> {
|
||||
return Ingredient.ofItems(TRContent.Ingots.BRONZE.asItem());
|
||||
|
|
|
@ -165,7 +165,7 @@ public class DynamicCellItem extends Item implements ItemFluidInfo {
|
|||
public Text getName(ItemStack itemStack) {
|
||||
Fluid fluid = getFluid(itemStack);
|
||||
if (fluid != Fluids.EMPTY) {
|
||||
//TODO use translation keys for fluid and the cell https://fabric.asie.pl/wiki/tutorial:lang?s[]=translation might be useful
|
||||
// TODO use translation keys for fluid and the cell https://fabric.asie.pl/wiki/tutorial:lang?s[]=translation might be useful
|
||||
return new LiteralText(WordUtils.capitalizeFully(FluidUtils.getFluidName(fluid).replaceAll("_", " ")) + " Cell");
|
||||
}
|
||||
return super.getName(itemStack);
|
||||
|
|
|
@ -34,7 +34,6 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.util.collection.DefaultedList;
|
||||
import reborncore.api.items.ArmorBlockEntityTicker;
|
||||
import reborncore.api.items.ArmorRemoveHandler;
|
||||
import reborncore.common.powerSystem.PowerSystem;
|
||||
import reborncore.common.powerSystem.RcEnergyItem;
|
||||
import reborncore.common.util.ItemUtils;
|
||||
import reborncore.common.powerSystem.RcEnergyTier;
|
||||
|
@ -46,7 +45,7 @@ import techreborn.utils.InitUtils;
|
|||
public class CloakingDeviceItem extends TRArmourItem implements RcEnergyItem, ArmorBlockEntityTicker, ArmorRemoveHandler {
|
||||
|
||||
public static int maxCharge = TechRebornConfig.cloakingDeviceCharge;
|
||||
public static int cost = TechRebornConfig.cloackingDeviceCost;
|
||||
public static int cost = TechRebornConfig.cloakingDeviceCost;
|
||||
public static boolean isActive;
|
||||
|
||||
// 40M FE capacity with 10k FE\t charge rate
|
||||
|
|
|
@ -37,7 +37,7 @@ import java.util.UUID;
|
|||
*/
|
||||
public class TRArmourItem extends ArmorItem {
|
||||
|
||||
//Thanks for being private
|
||||
// Thanks for being private
|
||||
public static final UUID[] MODIFIERS = new UUID[]{
|
||||
UUID.fromString("845DB27C-C624-495F-8C9F-6020A9A58B6B"),
|
||||
UUID.fromString("D8499B04-0E66-4726-AB29-64469D734E0D"),
|
||||
|
|
|
@ -80,13 +80,13 @@ public class ChainsawItem extends AxeItem implements RcEnergyItem {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean postHit(ItemStack itemstack, LivingEntity entityliving, LivingEntity entityliving1) {
|
||||
public boolean postHit(ItemStack stack, LivingEntity target, LivingEntity attacker) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// ToolItem
|
||||
@Override
|
||||
public boolean canRepair(ItemStack itemStack_1, ItemStack itemStack_2) {
|
||||
public boolean canRepair(ItemStack stack, ItemStack ingredient) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -94,16 +94,16 @@ public class DebugToolItem extends Item {
|
|||
}
|
||||
|
||||
private String getPropertyString(Entry<Property<?>, Comparable<?>> entryIn) {
|
||||
Property<?> iproperty = entryIn.getKey();
|
||||
Property<?> property = entryIn.getKey();
|
||||
Comparable<?> comparable = entryIn.getValue();
|
||||
String s = Util.getValueAsString(iproperty, comparable);
|
||||
String s = Util.getValueAsString(property, comparable);
|
||||
if (Boolean.TRUE.equals(comparable)) {
|
||||
s = Formatting.GREEN + s;
|
||||
} else if (Boolean.FALSE.equals(comparable)) {
|
||||
s = Formatting.RED + s;
|
||||
}
|
||||
|
||||
return iproperty.getName() + ": " + s;
|
||||
return property.getName() + ": " + s;
|
||||
}
|
||||
|
||||
private String getRegistryName(Block block) {
|
||||
|
|
|
@ -108,7 +108,7 @@ public class DrillItem extends PickaxeItem implements RcEnergyItem, DynamicAttri
|
|||
|
||||
// ToolItem
|
||||
@Override
|
||||
public boolean canRepair(ItemStack itemStack_1, ItemStack itemStack_2) {
|
||||
public boolean canRepair(ItemStack stack, ItemStack ingredient) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ public class JackhammerItem extends PickaxeItem implements RcEnergyItem, Dynamic
|
|||
}
|
||||
|
||||
/*
|
||||
Fabric API doesn't allow to have mining speed less then the one from vanilla ToolMaterials
|
||||
Fabric API doesn't allow to have mining speed less than the one from vanilla ToolMaterials
|
||||
@Override
|
||||
public float getMiningSpeedMultiplier(Tag<Item> tag, BlockState state, ItemStack stack, LivingEntity user) {
|
||||
if (tag.equals(FabricToolTags.PICKAXES) && stack.getItem().isEffectiveOn(state)) {
|
||||
|
|
|
@ -82,13 +82,13 @@ public class RockCutterItem extends PickaxeItem implements RcEnergyItem {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean postHit(ItemStack itemstack, LivingEntity entityliving, LivingEntity entityliving1) {
|
||||
public boolean postHit(ItemStack stack, LivingEntity target, LivingEntity attacker) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// ToolItem
|
||||
@Override
|
||||
public boolean canRepair(ItemStack stack, ItemStack stack2) {
|
||||
public boolean canRepair(ItemStack stack, ItemStack ingredient) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -95,9 +95,9 @@ public class OmniToolItem extends PickaxeItem implements RcEnergyItem, DynamicAt
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean postHit(ItemStack stack, LivingEntity entityliving, LivingEntity attacker) {
|
||||
public boolean postHit(ItemStack stack, LivingEntity target, LivingEntity attacker) {
|
||||
if (tryUseEnergy(stack, hitCost)) {
|
||||
entityliving.damage(DamageSource.player((PlayerEntity) attacker), 8F);
|
||||
target.damage(DamageSource.player((PlayerEntity) attacker), 8F);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -47,7 +47,6 @@ import java.util.Set;
|
|||
/**
|
||||
* @author drcrazy
|
||||
*/
|
||||
|
||||
public class ToolsUtil {
|
||||
public static void breakBlock(ItemStack tool, World world, BlockPos pos, LivingEntity entityLiving, int cost) {
|
||||
if (!(entityLiving instanceof PlayerEntity)) {
|
||||
|
@ -69,26 +68,27 @@ public class ToolsUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* Fills in set of BlockPos which should be broken by AOE mining
|
||||
* Fills in set of {@link BlockPos} which should be broken by AOE mining
|
||||
*
|
||||
* @param worldIn World reference
|
||||
* @param pos BlockPos Position of originally broken block
|
||||
* @param entityLiving LivingEntity Player who broke block
|
||||
* @param radius int Radius of additional blocks to include. E.g. for 3x3 mining radius will be 1
|
||||
* @return Set of BlockPos to process by tool block break logic
|
||||
* @param worldIn {@link World} World reference
|
||||
* @param pos {@link BlockPos} Position of originally broken block
|
||||
* @param entityLiving {@link LivingEntity} Player who broke block
|
||||
* @param radius {@code int} Radius of additional blocks to include. E.g. for 3x3 mining radius will be 1
|
||||
* @return {@link Set} Set of {@link BlockPos} to process by tool block break logic
|
||||
*/
|
||||
public static Set<BlockPos> getAOEMiningBlocks(World worldIn, BlockPos pos, @Nullable LivingEntity entityLiving, int radius) {
|
||||
return getAOEMiningBlocks(worldIn, pos, entityLiving, radius, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fills in set of BlockPos which should be broken by AOE mining
|
||||
* Fills in set of {@link BlockPos} which should be broken by AOE mining
|
||||
*
|
||||
* @param worldIn World reference
|
||||
* @param pos BlockPos Position of originally broken block
|
||||
* @param entityLiving LivingEntity Player who broke block
|
||||
* @param radius int Radius of additional blocks to include. E.g. for 3x3 mining radius will be 1
|
||||
* @return Set of BlockPos to process by tool block break logic
|
||||
* @param worldIn {@link World} World reference
|
||||
* @param pos {@link BlockPos} Position of originally broken block
|
||||
* @param entityLiving {@link LivingEntity} Player who broke block
|
||||
* @param radius {@code int} Radius of additional blocks to include. E.g. for 3x3 mining radius will be 1
|
||||
* @param placeDummyBlocks {@code boolean} Whether to place dummy blocks
|
||||
* @return {@link Set} Set of {@link BlockPos} to process by tool block break logic
|
||||
*/
|
||||
public static Set<BlockPos> getAOEMiningBlocks(World worldIn, BlockPos pos, @Nullable LivingEntity entityLiving, int radius, boolean placeDummyBlocks) {
|
||||
if (!(entityLiving instanceof PlayerEntity playerIn)) {
|
||||
|
@ -167,10 +167,10 @@ public class ToolsUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* Check if JackHammer shouldn't break block. JackHammers should be good on stone, dirt, sand. And shouldn't break ores.
|
||||
* Check if JackHammer shouldn't break block. JackHammers should be good on stone, dirt, sand. And shouldn't break ores.
|
||||
*
|
||||
* @param blockState BlockState to check
|
||||
* @return boolean True if block shouldn't be breakable by JackHammer
|
||||
* @param blockState {@link BlockState} State to check
|
||||
* @return {@code boolean} True if block shouldn't be breakable by JackHammer
|
||||
*/
|
||||
public static boolean JackHammerSkippedBlocks(BlockState blockState){
|
||||
if (blockState.getMaterial() == Material.AIR) {
|
||||
|
@ -191,5 +191,3 @@ public class ToolsUtil {
|
|||
return blockState.getBlock() instanceof RedstoneOreBlock;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -29,8 +29,8 @@ import net.minecraft.entity.damage.DamageSource;
|
|||
/**
|
||||
* Created by modmuss50 on 06/03/2016.
|
||||
*/
|
||||
public class ElectrialShockSource extends DamageSource {
|
||||
public ElectrialShockSource() {
|
||||
public class ElectricalShockSource extends DamageSource {
|
||||
public ElectricalShockSource() {
|
||||
super("shock");
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue