From 7089cda9afdc87ee00de2ea0c26b1a1c818c7bdc Mon Sep 17 00:00:00 2001 From: Flanks255 <32142731+Flanks255@users.noreply.github.com> Date: Sat, 13 Nov 2021 11:16:25 -0600 Subject: [PATCH] More cleanup.... --- .../mod/blocks/BlockFermentingBarrel.java | 8 +++----- .../mod/booklet/chapter/BookletChapterCrusher.java | 7 +++---- .../de/ellpeck/actuallyadditions/mod/items/ItemDust.java | 3 ++- .../de/ellpeck/actuallyadditions/mod/items/ItemFoods.java | 7 +++---- .../actuallyadditions/mod/tile/TileEntityCrusher.java | 6 +++--- .../actuallyadditions/mod/tile/TileEntityEnergizer.java | 5 ++--- .../actuallyadditions/mod/tile/TileEntityFeeder.java | 5 ++--- .../actuallyadditions/mod/tile/TileEntityFireworkBox.java | 5 ++--- .../mod/tile/TileEntityHeatCollector.java | 5 ++--- .../mod/tile/TileEntityLaserRelayEnergy.java | 5 ++--- .../mod/tile/TileEntityLaserRelayEnergyAdvanced.java | 4 +++- .../mod/tile/TileEntityLaserRelayEnergyExtreme.java | 4 +++- .../mod/tile/TileEntityLaserRelayFluids.java | 6 ++---- .../mod/tile/TileEntityLaserRelayItem.java | 7 +++---- .../mod/tile/TileEntityLaserRelayItemAdvanced.java | 5 +++-- .../mod/tile/TileEntityLavaFactoryController.java | 6 ++---- .../mod/tile/TileEntityShockSuppressor.java | 5 ++--- 17 files changed, 42 insertions(+), 51 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFermentingBarrel.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFermentingBarrel.java index 589c8cd5c..990ff3044 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFermentingBarrel.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFermentingBarrel.java @@ -16,7 +16,6 @@ import net.minecraft.block.BlockState; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.ServerPlayerEntity; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ActionResultType; import net.minecraft.util.Hand; @@ -27,9 +26,6 @@ import net.minecraft.util.math.shapes.VoxelShape; import net.minecraft.world.IBlockReader; import net.minecraft.world.World; import net.minecraftforge.common.ToolType; -import net.minecraftforge.fml.network.NetworkHooks; - -import net.minecraft.block.AbstractBlock.Properties; public class BlockFermentingBarrel extends BlockContainerBase { @@ -47,9 +43,11 @@ public class BlockFermentingBarrel extends BlockContainerBase { if (!world.isClientSide) { TileEntityFermentingBarrel press = (TileEntityFermentingBarrel) world.getBlockEntity(pos); if (press != null) { - if (!this.tryUseItemOnTank(player, hand, press.canolaTank) && !this.tryUseItemOnTank(player, hand, press.oilTank)) { + /* if (!this.tryUseItemOnTank(player, hand, press.tanks.canolaTank) && !this.tryUseItemOnTank(player, hand, press.tanks.oilTank)) { NetworkHooks.openGui((ServerPlayerEntity) player, press, pos); } + + */ } return ActionResultType.PASS; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/chapter/BookletChapterCrusher.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/chapter/BookletChapterCrusher.java index 3769aaceb..abb65d270 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/chapter/BookletChapterCrusher.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/chapter/BookletChapterCrusher.java @@ -12,9 +12,6 @@ package de.ellpeck.actuallyadditions.mod.booklet.chapter; import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry; import de.ellpeck.actuallyadditions.api.booklet.IBookletPage; -import de.ellpeck.actuallyadditions.mod.booklet.page.PageCrusherRecipe; -import de.ellpeck.actuallyadditions.mod.crafting.CrusherCrafting; -import de.ellpeck.actuallyadditions.mod.crafting.CrushingRecipe; import net.minecraft.item.ItemStack; import java.util.ArrayList; @@ -30,11 +27,13 @@ public class BookletChapterCrusher extends BookletChapter { private static IBookletPage[] getPages(IBookletPage... pages) { List allPages = new ArrayList<>(); allPages.addAll(Arrays.asList(pages)); - +/* for (CrushingRecipe recipe : CrusherCrafting.MISC_RECIPES) { allPages.add(new PageCrusherRecipe(allPages.size() + 1, recipe).setNoText()); } + */ + return allPages.toArray(new IBookletPage[allPages.size()]); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDust.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDust.java index 05184c540..3f3827794 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDust.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDust.java @@ -17,6 +17,7 @@ import de.ellpeck.actuallyadditions.mod.util.IColorProvidingItem; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.client.renderer.color.IItemColor; import net.minecraft.item.ItemStack; +import net.minecraft.item.Rarity; import net.minecraft.util.NonNullList; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -44,7 +45,7 @@ public class ItemDust extends ItemBase implements IColorProvidingItem { } @Override - public EnumRarity getRarity(ItemStack stack) { + public Rarity getRarity(ItemStack stack) { return stack.getItemDamage() >= ALL_DUSTS.length ? EnumRarity.COMMON : ALL_DUSTS[stack.getItemDamage()].rarity; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFoods.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFoods.java index f5db339b1..944e02ea1 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFoods.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFoods.java @@ -18,9 +18,8 @@ import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.client.renderer.model.ModelResourceLocation; import net.minecraft.entity.item.ItemEntity; import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.EnumAction; -import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; +import net.minecraft.item.Rarity; import net.minecraft.util.NonNullList; import net.minecraft.world.World; import net.minecraftforge.api.distmarker.Dist; @@ -99,9 +98,9 @@ public class ItemFoods extends ItemFoodBase { } @Override - public EnumRarity getRarity(ItemStack stack) { + public Rarity getRarity(ItemStack stack) { return stack.getItemDamage() >= ALL_FOODS.length - ? EnumRarity.COMMON + ? Rarity.COMMON : ALL_FOODS[stack.getItemDamage()].rarity; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCrusher.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCrusher.java index 2d54f6034..1d42a682d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCrusher.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCrusher.java @@ -187,7 +187,7 @@ public class TileEntityCrusher extends TileEntityInventoryBase implements IButto public boolean canCrushOn(int theInput, int theFirstOutput, int theSecondOutput) { if (StackUtil.isValid(this.inv.getStackInSlot(theInput))) { - CrushingRecipe recipe = CrusherRecipeRegistry.getRecipeFromInput(this.inv.getStackInSlot(theInput)); + CrushingRecipe recipe = null;//CrusherRecipeRegistry.getRecipeFromInput(this.inv.getStackInSlot(theInput)); //TODO if (recipe == null) { return false; } @@ -202,7 +202,7 @@ public class TileEntityCrusher extends TileEntityInventoryBase implements IButto outputTwo.setDamage(0); } */ - if ((!StackUtil.isValid(this.inv.getStackInSlot(theFirstOutput)) || this.inv.getStackInSlot(theFirstOutput).sameItem(outputOne) && this.inv.getStackInSlot(theFirstOutput).getCount() <= this.inv.getStackInSlot(theFirstOutput).getMaxStackSize() - outputOne.getCount()) && (!StackUtil.isValid(outputTwo) || !StackUtil.isValid(this.inv.getStackInSlot(theSecondOutput)) || this.inv.getStackInSlot(theSecondOutput).isItemEqual(outputTwo) && this.inv.getStackInSlot(theSecondOutput).getCount() <= this.inv.getStackInSlot(theSecondOutput).getMaxStackSize() - outputTwo.getCount())) { + if ((!StackUtil.isValid(this.inv.getStackInSlot(theFirstOutput)) || this.inv.getStackInSlot(theFirstOutput).sameItem(outputOne) && this.inv.getStackInSlot(theFirstOutput).getCount() <= this.inv.getStackInSlot(theFirstOutput).getMaxStackSize() - outputOne.getCount()) && (!StackUtil.isValid(outputTwo) || !StackUtil.isValid(this.inv.getStackInSlot(theSecondOutput)) || this.inv.getStackInSlot(theSecondOutput).sameItem(outputTwo) && this.inv.getStackInSlot(theSecondOutput).getCount() <= this.inv.getStackInSlot(theSecondOutput).getMaxStackSize() - outputTwo.getCount())) { return true; } } @@ -217,7 +217,7 @@ public class TileEntityCrusher extends TileEntityInventoryBase implements IButto } public void finishCrushing(int theInput, int theFirstOutput, int theSecondOutput) { - CrushingRecipe recipe = CrusherRecipeRegistry.getRecipeFromInput(this.inv.getStackInSlot(theInput)); + CrushingRecipe recipe = null; //CrusherRecipeRegistry.getRecipeFromInput(this.inv.getStackInSlot(theInput));//TODO if (recipe == null) { return; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnergizer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnergizer.java index 21b3b5437..0e34f03a0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnergizer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnergizer.java @@ -10,6 +10,7 @@ package de.ellpeck.actuallyadditions.mod.tile; +import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.inventory.ContainerEnergizer; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IAcceptor; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IRemover; @@ -29,8 +30,6 @@ import net.minecraftforge.energy.IEnergyStorage; import javax.annotation.Nullable; -import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase.NBTType; - public class TileEntityEnergizer extends TileEntityInventoryBase implements INamedContainerProvider { public final CustomEnergyStorage storage = new CustomEnergyStorage(50000, 1000, 0); @@ -38,7 +37,7 @@ public class TileEntityEnergizer extends TileEntityInventoryBase implements INam private int lastEnergy; public TileEntityEnergizer() { - super(ActuallyTiles.ENERGIZER_TILE.get(), 2); + super(ActuallyBlocks.ENERGIZER.getTileEntityType(), 2); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFeeder.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFeeder.java index 258301a64..c5fa3ed4c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFeeder.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFeeder.java @@ -10,6 +10,7 @@ package de.ellpeck.actuallyadditions.mod.tile; +import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.inventory.ContainerFeeder; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IRemover; import net.minecraft.entity.passive.AnimalEntity; @@ -32,8 +33,6 @@ import javax.annotation.Nullable; import java.util.List; import java.util.Optional; -import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase.NBTType; - public class TileEntityFeeder extends TileEntityInventoryBase implements INamedContainerProvider { public static final int THRESHOLD = 30; @@ -44,7 +43,7 @@ public class TileEntityFeeder extends TileEntityInventoryBase implements INamedC private int lastTimer; public TileEntityFeeder() { - super(ActuallyTiles.FEEDER_TILE.get(), 1); + super(ActuallyBlocks.FEEDER.getTileEntityType(), 1); } public int getCurrentTimerToScale(int i) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFireworkBox.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFireworkBox.java index 35fe069f6..2914ecdf8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFireworkBox.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFireworkBox.java @@ -10,6 +10,7 @@ package de.ellpeck.actuallyadditions.mod.tile; +import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.inventory.ContainerFireworkBox; import de.ellpeck.actuallyadditions.mod.network.gui.INumberReactor; import net.minecraft.entity.player.PlayerEntity; @@ -36,8 +37,6 @@ import javax.annotation.Nullable; import java.util.ArrayList; import java.util.List; -import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase.NBTType; - public class TileEntityFireworkBox extends TileEntityBase implements IEnergyDisplay, INumberReactor, INamedContainerProvider { public static final int USE_PER_SHOT = 500; @@ -59,7 +58,7 @@ public class TileEntityFireworkBox extends TileEntityBase implements IEnergyDisp private int oldEnergy; public TileEntityFireworkBox() { - super(ActuallyTiles.FIREWORKBOX_TILE.get()); + super(ActuallyBlocks.FIREWORK_BOX.getTileEntityType()); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityHeatCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityHeatCollector.java index 66e8e225e..561382153 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityHeatCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityHeatCollector.java @@ -10,6 +10,7 @@ package de.ellpeck.actuallyadditions.mod.tile; +import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.block.Block; import net.minecraft.block.BlockState; @@ -25,8 +26,6 @@ import net.minecraftforge.energy.IEnergyStorage; import java.util.ArrayList; -import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase.NBTType; - public class TileEntityHeatCollector extends TileEntityBase implements ISharingEnergyProvider, IEnergyDisplay { public static final int ENERGY_PRODUCE = 40; @@ -37,7 +36,7 @@ public class TileEntityHeatCollector extends TileEntityBase implements ISharingE private int disappearTime; public TileEntityHeatCollector() { - super(ActuallyTiles.HEATCOLLECTOR_TILE.get()); + super(ActuallyBlocks.HEAT_COLLECTOR.getTileEntityType()); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergy.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergy.java index 64b26fff1..dca085eaa 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergy.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergy.java @@ -14,6 +14,7 @@ import de.ellpeck.actuallyadditions.api.laser.IConnectionPair; import de.ellpeck.actuallyadditions.api.laser.LaserType; import de.ellpeck.actuallyadditions.api.laser.Network; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; +import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet; @@ -36,8 +37,6 @@ import java.util.Map; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; -import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase.NBTType; - public class TileEntityLaserRelayEnergy extends TileEntityLaserRelay { public static final int CAP = 1000; @@ -85,7 +84,7 @@ public class TileEntityLaserRelayEnergy extends TileEntityLaserRelay { } public TileEntityLaserRelayEnergy() { - this(ActuallyTiles.LASERRELAYENERGY_TILE.get()); + this(ActuallyBlocks.LASER_RELAY.getTileEntityType()); } private int transmitEnergy(Direction from, int maxTransmit, boolean simulate) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergyAdvanced.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergyAdvanced.java index 3e26841e1..2656c195f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergyAdvanced.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergyAdvanced.java @@ -10,12 +10,14 @@ package de.ellpeck.actuallyadditions.mod.tile; +import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; + public class TileEntityLaserRelayEnergyAdvanced extends TileEntityLaserRelayEnergy { public static final int CAP = 10000; public TileEntityLaserRelayEnergyAdvanced() { - super(ActuallyTiles.LASERRELAYENERGYADVANCED_TILE.get()); + super(ActuallyBlocks.LASER_RELAY_ADVANCED.getTileEntityType()); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergyExtreme.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergyExtreme.java index 808841d2b..3e5c5a44b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergyExtreme.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergyExtreme.java @@ -10,12 +10,14 @@ package de.ellpeck.actuallyadditions.mod.tile; +import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; + public class TileEntityLaserRelayEnergyExtreme extends TileEntityLaserRelayEnergy { public static final int CAP = 100000; public TileEntityLaserRelayEnergyExtreme() { - super(ActuallyTiles.LASERRELAYENERGYEXTREME_TILE.get()); + super(ActuallyBlocks.LASER_RELAY_EXTREME.getTileEntityType()); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayFluids.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayFluids.java index 75f29c20e..9db32ee1c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayFluids.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayFluids.java @@ -14,6 +14,7 @@ import de.ellpeck.actuallyadditions.api.laser.IConnectionPair; import de.ellpeck.actuallyadditions.api.laser.LaserType; import de.ellpeck.actuallyadditions.api.laser.Network; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; +import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayEnergy.Mode; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; @@ -37,9 +38,6 @@ import java.util.Map; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; -import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase.NBTType; -import net.minecraftforge.fluids.capability.IFluidHandler.FluidAction; - public class TileEntityLaserRelayFluids extends TileEntityLaserRelay { public final ConcurrentHashMap handlersAround = new ConcurrentHashMap<>(); @@ -47,7 +45,7 @@ public class TileEntityLaserRelayFluids extends TileEntityLaserRelay { private Mode mode = Mode.BOTH; public TileEntityLaserRelayFluids() { - super(ActuallyTiles.LASERRELAYFLUIDS_TILE.get(), LaserType.FLUID); + super(ActuallyBlocks.LASER_RELAY_FLUIDS.getTileEntityType(), LaserType.FLUID); for (int i = 0; i < this.fluidHandlers.length; i++) { Direction facing = Direction.values()[i]; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayItem.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayItem.java index 0d2980fa4..0ac4ef0c0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayItem.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayItem.java @@ -14,6 +14,7 @@ import de.ellpeck.actuallyadditions.api.laser.IConnectionPair; import de.ellpeck.actuallyadditions.api.laser.LaserType; import de.ellpeck.actuallyadditions.api.laser.Network; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; +import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.tile.TileEntityItemInterface.GenericItemHandlerInfo; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; @@ -35,8 +36,6 @@ import net.minecraftforge.items.IItemHandler; import java.util.*; import java.util.concurrent.ConcurrentHashMap; -import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase.NBTType; - public class TileEntityLaserRelayItem extends TileEntityLaserRelay { public final Map handlersAround = new ConcurrentHashMap<>(); @@ -47,7 +46,7 @@ public class TileEntityLaserRelayItem extends TileEntityLaserRelay { } public TileEntityLaserRelayItem() { - this(ActuallyTiles.LASERRELAYITEM_TILE.get()); + this(ActuallyBlocks.LASER_RELAY_ITEM.getTileEntityType()); } public int getPriority() { @@ -74,7 +73,7 @@ public class TileEntityLaserRelayItem extends TileEntityLaserRelay { BlockPos pos = this.getBlockPos().relative(side); if (this.level.hasChunkAt(pos)) { TileEntity tile = this.level.getBlockEntity(pos); - if (tile != null && !(tile instanceof TileEntityItemViewer) && !(tile instanceof TileEntityLaserRelay)) { + if (tile != null && !(tile instanceof TileEntityItemInterface) && !(tile instanceof TileEntityLaserRelay)) { LazyOptional itemHandler = tile.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, side.getOpposite()); Object slotlessHandler = null; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayItemAdvanced.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayItemAdvanced.java index 4cf0ebfb8..ec8622683 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayItemAdvanced.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayItemAdvanced.java @@ -10,6 +10,7 @@ package de.ellpeck.actuallyadditions.mod.tile; +import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.inventory.ContainerFilter; import de.ellpeck.actuallyadditions.mod.inventory.ContainerLaserRelayItemWhitelist; import de.ellpeck.actuallyadditions.mod.inventory.slot.SlotFilter; @@ -35,7 +36,7 @@ public class TileEntityLaserRelayItemAdvanced extends TileEntityLaserRelayItem i public FilterSettings rightFilter = new FilterSettings(12, true, true, false, false, 0, -2000); public TileEntityLaserRelayItemAdvanced() { - super(ActuallyTiles.LASERRELAYITEMWHITELIST_TILE.get()); + super(ActuallyBlocks.LASER_RELAY_ITEM_ADVANCED.getTileEntityType()); } @Override @@ -131,7 +132,7 @@ public class TileEntityLaserRelayItemAdvanced extends TileEntityLaserRelayItem i public void updateEntity() { super.updateEntity(); - if (!this.world.isRemote) { + if (!this.level.isClientSide) { if ((this.leftFilter.needsUpdateSend() || this.rightFilter.needsUpdateSend()) && this.sendUpdateWithInterval()) { this.leftFilter.updateLasts(); this.rightFilter.updateLasts(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLavaFactoryController.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLavaFactoryController.java index dc436af6f..66238473a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLavaFactoryController.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLavaFactoryController.java @@ -21,8 +21,6 @@ import net.minecraft.util.math.BlockPos; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.energy.IEnergyStorage; -import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase.NBTType; - public class TileEntityLavaFactoryController extends TileEntityBase implements IEnergyDisplay { public static final int NOT_MULTI = 0; @@ -36,7 +34,7 @@ public class TileEntityLavaFactoryController extends TileEntityBase implements I private int oldEnergy; public TileEntityLavaFactoryController() { - super(ActuallyTiles.LAVAFACTORYCONTROLLER_TILE.get()); + super(ActuallyBlocks.LAVA_FACTORY_CONTROLLER.getTileEntityType()); } @Override @@ -82,7 +80,7 @@ public class TileEntityLavaFactoryController extends TileEntityBase implements I BlockPos thisPos = this.worldPosition; BlockPos[] positions = new BlockPos[]{thisPos.offset(1, 1, 0), thisPos.offset(-1, 1, 0), thisPos.offset(0, 1, 1), thisPos.offset(0, 1, -1)}; - if (this.level != null && WorldUtil.hasBlocksInPlacesGiven(positions, ActuallyBlocks.LAVA_CASING.get(), this.level)) { + if (this.level != null && WorldUtil.hasBlocksInPlacesGiven(positions, ActuallyBlocks.LAVA_FACTORY_CASING.get(), this.level)) { BlockPos pos = thisPos.above(); BlockState state = this.level.getBlockState(pos); Block block = state.getBlock(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityShockSuppressor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityShockSuppressor.java index 82890b113..a8ab3239b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityShockSuppressor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityShockSuppressor.java @@ -10,6 +10,7 @@ package de.ellpeck.actuallyadditions.mod.tile; +import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import net.minecraft.nbt.CompoundNBT; import net.minecraft.util.Direction; import net.minecraftforge.common.util.LazyOptional; @@ -18,8 +19,6 @@ import net.minecraftforge.energy.IEnergyStorage; import java.util.ArrayList; import java.util.List; -import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase.NBTType; - public class TileEntityShockSuppressor extends TileEntityBase implements IEnergyDisplay { public static final List SUPPRESSORS = new ArrayList<>(); @@ -32,7 +31,7 @@ public class TileEntityShockSuppressor extends TileEntityBase implements IEnergy private int oldEnergy; public TileEntityShockSuppressor() { - super(ActuallyTiles.SHOCKSUPPRESSOR_TILE.get()); + super(ActuallyBlocks.SHOCK_SUPPRESSOR.getTileEntityType()); } @Override