diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/booklet/IBookletPage.java b/src/main/java/de/ellpeck/actuallyadditions/api/booklet/IBookletPage.java index db59dd55f..35939ea51 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/booklet/IBookletPage.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/booklet/IBookletPage.java @@ -45,7 +45,7 @@ public interface IBookletPage { void actionPerformed(GuiBookletBase gui, Button button); @OnlyIn(Dist.CLIENT) - void initGui(GuiBookletBase gui, int startX, int startY); + void init(GuiBookletBase gui, int startX, int startY); @OnlyIn(Dist.CLIENT) void updateScreen(GuiBookletBase gui, int startX, int startY, int pageTimer); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/ActuallyBlocks.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/ActuallyBlocks.java index a61018ea0..154c995b8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/ActuallyBlocks.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/ActuallyBlocks.java @@ -124,7 +124,7 @@ public final class ActuallyBlocks { public static final RegistryObject blockFurnaceDouble = BLOCKS.register("block_furnace_double", BlockFurnaceDouble::new); public static final RegistryObject blockInputter = BLOCKS.register("block_inputter", () -> new BlockInputter(false)); public static final RegistryObject blockInputterAdvanced = BLOCKS.register("block_inputter_advanced", () -> new BlockInputter(true)); - public static final RegistryObject blockFurnaceSolar = BLOCKS.register("block_furnace_solar", BlockFurnaceSolar::new); + // public static final RegistryObject blockFurnaceSolar = BLOCKS.register("block_furnace_solar", BlockFurnaceSolar::new); public static final RegistryObject blockHeatCollector = BLOCKS.register("block_heat_collector", BlockHeatCollector::new); public static final RegistryObject blockGreenhouseGlass = BLOCKS.register("block_greenhouse_glass", BlockGreenhouseGlass::new); public static final RegistryObject blockBreaker = BLOCKS.register("block_breaker", () -> new BlockBreaker(false)); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFurnaceSolar.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFurnaceSolar.java index c7d28c900..8d6c619a0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFurnaceSolar.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFurnaceSolar.java @@ -1,60 +1,39 @@ -/* - * This file ("BlockFurnaceSolar.java") is part of the Actually Additions mod for Minecraft. - * It is created and owned by Ellpeck and distributed - * under the Actually Additions License to be found at - * http://ellpeck.de/actaddlicense - * View the source code at https://github.com/Ellpeck/ActuallyAdditions - * - * © 2015-2017 Ellpeck - */ - -package de.ellpeck.actuallyadditions.mod.blocks; - -import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; -import de.ellpeck.actuallyadditions.mod.tile.TileEntityFurnaceSolar; -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; - -public class BlockFurnaceSolar extends BlockContainerBase { - - private static final AxisAlignedBB AABB = new AxisAlignedBB(0, 0, 0, 1, 6 * 0.0625, 1); - - public BlockFurnaceSolar() { - super(Material.ROCK, this.name); - this.setHarvestLevel("pickaxe", 0); - this.setHardness(1.5F); - this.setResistance(10.0F); - this.setSoundType(SoundType.STONE); - } - - @Override - public AxisAlignedBB getBoundingBox(BlockState state, IBlockAccess source, BlockPos pos) { - return AABB; - } - - @Override - public TileEntity createNewTileEntity(IBlockReader worldIn) { - return new TileEntityFurnaceSolar(); - } - - @Override - public boolean isFullCube(BlockState state) { - return false; - } - - @Override - public boolean isOpaqueCube(BlockState state) { - return false; - } - - @Override - public EnumRarity getRarity(ItemStack stack) { - return EnumRarity.UNCOMMON; - } -} +// TODO: [port][note] not used +///* +// * This file ("BlockFurnaceSolar.java") is part of the Actually Additions mod for Minecraft. +// * It is created and owned by Ellpeck and distributed +// * under the Actually Additions License to be found at +// * http://ellpeck.de/actaddlicense +// * View the source code at https://github.com/Ellpeck/ActuallyAdditions +// * +// * © 2015-2017 Ellpeck +// */ +// +//package de.ellpeck.actuallyadditions.mod.blocks; +// +//import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; +//import de.ellpeck.actuallyadditions.mod.tile.TileEntityFurnaceSolar; +//import net.minecraft.block.BlockState; +//import net.minecraft.block.SoundType; +//import net.minecraft.block.material.Material; +//import net.minecraft.tileentity.TileEntity; +//import net.minecraft.util.math.AxisAlignedBB; +//import net.minecraft.util.math.BlockPos; +//import net.minecraft.world.IBlockAccess; +//import net.minecraft.world.IBlockReader; +// +//public class BlockFurnaceSolar extends BlockContainerBase { +// public BlockFurnaceSolar() { +// super(Material.ROCK, this.name); +// this.setHarvestLevel("pickaxe", 0); +// this.setHardness(1.5F); +// this.setResistance(10.0F); +// this.setSoundType(SoundType.STONE); +// } +// +// +// @Override +// public TileEntity createNewTileEntity(IBlockReader worldIn) { +// return new TileEntityFurnaceSolar(); +// } +//} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGeneric.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGeneric.java index 95f9d8c75..62a4fdfa5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGeneric.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGeneric.java @@ -11,27 +11,9 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.ItemStack; public class BlockGeneric extends BlockBase { - public BlockGeneric() { - this(Material.ROCK, SoundType.STONE, 1.5F, 10.0F, "pickaxe", 0); - } - - public BlockGeneric(String name, Material material, SoundType sound, float hardness, float resistance, String harvestTool, int harvestLevel) { - super(material, name); - this.setHarvestLevel(harvestTool, harvestLevel); - this.setHardness(hardness); - this.setResistance(resistance); - this.setSoundType(sound); - } - - @Override - public EnumRarity getRarity(ItemStack stack) { - return EnumRarity.COMMON; + super(ActuallyBlocks.defaultPickProps(0)); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGreenhouseGlass.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGreenhouseGlass.java index c71e1f0b0..043c80ab9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGreenhouseGlass.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGreenhouseGlass.java @@ -11,71 +11,45 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; -import net.minecraft.block.Block; +import net.minecraft.block.BlockRenderType; +import net.minecraft.block.BlockState; import net.minecraft.block.IGrowable; import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockRenderLayer; -import net.minecraft.util.Direction; import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.world.IBlockReader; import net.minecraft.world.World; -import net.minecraftforge.api.distmarker.Dist; +import net.minecraft.world.server.ServerWorld; import org.apache.commons.lang3.tuple.Triple; import java.util.Random; public class BlockGreenhouseGlass extends BlockBase { - public BlockGreenhouseGlass() { - super(Material.GLASS, name); - this.setHarvestLevel("pickaxe", 0); - this.setHardness(0.5F); - this.setResistance(10.0F); - this.setSoundType(SoundType.GLASS); - this.setTickRandomly(true); + super(ActuallyBlocks.defaultPickProps(0, 0.5F, 10.0F).sound(SoundType.GLASS).tickRandomly()); + } + + + // TODO: [port] figure this out + // @Override + // @Deprecated + // @OnlyIn(Dist.CLIENT) + // public boolean shouldSideBeRendered(BlockState state, IBlockAccess world, BlockPos pos, Direction side) { + // BlockState otherState = world.getBlockState(pos.offset(side)); + // Block block = otherState.getBlock(); + // + // return state != otherState || block != this && super.shouldSideBeRendered(state, world, pos, side); + // } + + + @Override + public BlockRenderType getRenderType(BlockState state) { + return BlockRenderType.INVISIBLE; } @Override - public boolean isOpaqueCube(BlockState state) { - return false; - } - - @Override - public boolean isFullCube(BlockState state) { - return false; - } - - @Override - public int getLightOpacity(BlockState state) { - return 0; - } - - @Override - @Deprecated - @OnlyIn(Dist.CLIENT) - public boolean shouldSideBeRendered(BlockState state, IBlockAccess world, BlockPos pos, Direction side) { - BlockState otherState = world.getBlockState(pos.offset(side)); - Block block = otherState.getBlock(); - - return state != otherState || block != this && super.shouldSideBeRendered(state, world, pos, side); - - } - - @Override - public BlockRenderLayer getRenderLayer() { - return BlockRenderLayer.CUTOUT; - } - - @Override - public EnumRarity getRarity(ItemStack stack) { - return EnumRarity.EPIC; - } - - @Override - public void updateTick(World world, BlockPos pos, BlockState state, Random rand) { + public void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random rand) { if (world.isRemote) { return; } @@ -94,7 +68,7 @@ public class BlockGreenhouseGlass extends BlockBase { } } if (once) { - world.playEvent(2005, trip.getMiddle().isOpaqueCube() + world.playEvent(2005, trip.getMiddle().isOpaqueCube(world, trip.getLeft()) ? trip.getLeft().up() : trip.getLeft(), 0); } @@ -102,14 +76,14 @@ public class BlockGreenhouseGlass extends BlockBase { } public Triple firstBlock(World world, BlockPos glassPos) { - BlockPos.MutableBlockPos mut = new BlockPos.MutableBlockPos(glassPos); + BlockPos.Mutable mut = new BlockPos(glassPos).toMutable(); while (true) { mut.setPos(mut.getX(), mut.getY() - 1, mut.getZ()); if (mut.getY() < 0) { return null; } BlockState state = world.getBlockState(mut); - if (state.isOpaqueCube() || state.getBlock() instanceof IGrowable || state.getBlock() == this) { + if (state.isOpaqueCube(world, mut) || state.getBlock() instanceof IGrowable || state.getBlock() == this) { if (state.getBlock() instanceof IGrowable) { return Triple.of(mut.toImmutable(), state, (IGrowable) state.getBlock()); } else { @@ -118,4 +92,9 @@ public class BlockGreenhouseGlass extends BlockBase { } } } + + @Override + public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + return Shapes.GLASS_SHAPE; + } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGrinder.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGrinder.java index 2a49dfc9a..22aae61c3 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGrinder.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGrinder.java @@ -10,39 +10,40 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; +import static net.minecraft.state.properties.BlockStateProperties.HORIZONTAL_FACING; +import static net.minecraft.state.properties.BlockStateProperties.LIT; + import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; -import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.tile.TileEntityGrinder; import de.ellpeck.actuallyadditions.mod.tile.TileEntityGrinderDouble; -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.BlockStateContainer; +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.ItemStack; +import net.minecraft.item.BlockItemUseContext; +import net.minecraft.particles.ParticleTypes; +import net.minecraft.state.StateContainer; +import net.minecraft.state.properties.BlockStateProperties; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumParticleTypes; +import net.minecraft.util.ActionResultType; +import net.minecraft.util.Direction; import net.minecraft.util.Hand; import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; +import net.minecraft.util.math.BlockRayTraceResult; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.world.IBlockReader; import net.minecraft.world.World; -import net.minecraftforge.api.distmarker.Dist; +import net.minecraft.world.server.ServerWorld; import java.util.Random; public class BlockGrinder extends BlockContainerBase { - private final boolean isDouble; public BlockGrinder(boolean isDouble) { - super(Material.ROCK, this.name); + super(ActuallyBlocks.defaultPickProps(0).tickRandomly()); this.isDouble = isDouble; - this.setHarvestLevel("pickaxe", 0); - this.setHardness(1.5F); - this.setResistance(10.0F); - this.setSoundType(SoundType.STONE); - this.setTickRandomly(true); + this.setDefaultState(this.stateContainer.getBaseState().with(HORIZONTAL_FACING, Direction.NORTH).with(LIT, false)); } @Override @@ -53,64 +54,54 @@ public class BlockGrinder extends BlockContainerBase { } @Override - @OnlyIn(Dist.CLIENT) - public void randomDisplayTick(BlockState state, World world, BlockPos pos, Random rand) { - if (state.getValue(BlockFurnaceDouble.IS_ON)) { + public void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random rand) { + if (state.get(BlockStateProperties.LIT)) { for (int i = 0; i < 5; i++) { double xRand = rand.nextDouble() / 0.75D - 0.5D; double zRand = rand.nextDouble() / 0.75D - 0.5D; - world.spawnParticle(EnumParticleTypes.CRIT, (double) pos.getX() + 0.4F, (double) pos.getY() + 0.8F, (double) pos.getZ() + 0.4F, xRand, 0.5D, zRand); + world.addParticle(ParticleTypes.CRIT, (double) pos.getX() + 0.4F, (double) pos.getY() + 0.8F, (double) pos.getZ() + 0.4F, xRand, 0.5D, zRand); } - world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, (double) pos.getX() + 0.5F, (double) pos.getY() + 1.0F, (double) pos.getZ() + 0.5F, 0.0D, 0.0D, 0.0D); + world.addParticle(ParticleTypes.SMOKE, (double) pos.getX() + 0.5F, (double) pos.getY() + 1.0F, (double) pos.getZ() + 0.5F, 0.0D, 0.0D, 0.0D); } } @Override - public ActionResultType onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { - if (!world.isRemote) { - TileEntityGrinder grinder = (TileEntityGrinder) world.getTileEntity(pos); - if (grinder != null) { - player.openGui(ActuallyAdditions.INSTANCE, this.isDouble - ? GuiHandler.GuiTypes.GRINDER_DOUBLE.ordinal() - : GuiHandler.GuiTypes.GRINDER.ordinal(), world, pos.getX(), pos.getY(), pos.getZ()); - } - return true; + public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { + if (this.isDouble) { + return this.openGui(world, player, pos, TileEntityGrinderDouble.class); } - return true; + + return this.openGui(world, player, pos, TileEntityGrinder.class); } @Override - public int getLightValue(BlockState state, IBlockAccess world, BlockPos pos) { - return this.getMetaFromState(state) == 1 + public BlockState getStateForPlacement(BlockItemUseContext context) { + return this.getDefaultState().with(HORIZONTAL_FACING, context.getNearestLookingDirection().getOpposite()).with(LIT, false); + } + + @Override + protected void fillStateContainer(StateContainer.Builder builder) { + builder.add(LIT).add(HORIZONTAL_FACING); + } + + @Override + public int getLightValue(BlockState state, IBlockReader world, BlockPos pos) { + return state.get(LIT) ? 12 : 0; } @Override - public int damageDropped(BlockState state) { - return 0; - } - - @Override - public EnumRarity getRarity(ItemStack stack) { - return EnumRarity.EPIC; - } - - @Override - public BlockState getStateFromMeta(int meta) { - boolean isOn = meta == 1; - return this.getDefaultState().withProperty(BlockFurnaceDouble.IS_ON, isOn); - } - - @Override - public int getMetaFromState(BlockState state) { - return state.getValue(BlockFurnaceDouble.IS_ON) - ? 1 - : 0; - } - - @Override - protected BlockStateContainer createBlockState() { - return new BlockStateContainer(this, BlockFurnaceDouble.IS_ON); + public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + switch (state.get(HORIZONTAL_FACING)) { + case EAST: + return Shapes.GrinderShapes.SHAPE_E; + case SOUTH: + return Shapes.GrinderShapes.SHAPE_S; + case WEST: + return Shapes.GrinderShapes.SHAPE_W; + default: + return Shapes.GrinderShapes.SHAPE_N; + } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockHeatCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockHeatCollector.java index de682584f..c5218d3b3 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockHeatCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockHeatCollector.java @@ -12,20 +12,16 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityHeatCollector; -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.ItemStack; +import net.minecraft.block.BlockState; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.world.IBlockReader; public class BlockHeatCollector extends BlockContainerBase { - public BlockHeatCollector() { - super(Material.ROCK, this.name); - this.setHarvestLevel("pickaxe", 0); - this.setHardness(2.5F); - this.setResistance(10.0F); - this.setSoundType(SoundType.STONE); + super(ActuallyBlocks.defaultPickProps(0, 2.5F, 10.0F)); } @Override @@ -34,7 +30,7 @@ public class BlockHeatCollector extends BlockContainerBase { } @Override - public EnumRarity getRarity(ItemStack stack) { - return EnumRarity.UNCOMMON; + public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + return Shapes.HEAT_COLLECTOR_SHAPE; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockInputter.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockInputter.java index 889f761b1..c4fed6298 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockInputter.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockInputter.java @@ -10,27 +10,19 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; -import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase; -import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.tile.TileEntityInputter; import de.ellpeck.actuallyadditions.mod.tile.TileEntityInputterAdvanced; -import de.ellpeck.actuallyadditions.mod.util.StringUtil; -import de.ellpeck.actuallyadditions.mod.util.Util; -import net.minecraft.block.Block; -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; +import net.minecraft.block.BlockState; import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ActionResultType; import net.minecraft.util.Hand; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockRayTraceResult; +import net.minecraft.world.IBlockReader; import net.minecraft.world.World; -import java.util.Random; - public class BlockInputter extends BlockContainerBase { public static final int NAME_FLAVOR_AMOUNTS = 15; @@ -38,12 +30,7 @@ public class BlockInputter extends BlockContainerBase { public final boolean isAdvanced; public BlockInputter(boolean isAdvanced) { - super(Material.ROCK, this.name); - this.setHarvestLevel("pickaxe", 0); - this.setHardness(1.5F); - this.setResistance(10.0F); - this.setSoundType(SoundType.STONE); - this.setTickRandomly(true); + super(ActuallyBlocks.defaultPickProps(0).tickRandomly()); this.isAdvanced = isAdvanced; } @@ -55,65 +42,52 @@ public class BlockInputter extends BlockContainerBase { } @Override - public ActionResultType onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { - if (!world.isRemote) { - TileEntityInputter inputter = (TileEntityInputter) world.getTileEntity(pos); - if (inputter != null) { - player.openGui(ActuallyAdditions.INSTANCE, this.isAdvanced - ? GuiHandler.GuiTypes.INPUTTER_ADVANCED.ordinal() - : GuiHandler.GuiTypes.INPUTTER.ordinal(), world, pos.getX(), pos.getY(), pos.getZ()); - } - return true; + public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { + if (this.isAdvanced) { + return this.openGui(world, player, pos, TileEntityInputterAdvanced.class); } - return true; + + return this.openGui(world, player, pos, TileEntityInputter.class); } - @Override - protected ItemBlockBase getItemBlock() { - return new TheItemBlock(this); - } + // TODO: [port] ADD BACK - @Override - public EnumRarity getRarity(ItemStack stack) { - return EnumRarity.EPIC; - } - - public static class TheItemBlock extends ItemBlockBase { - - private final Random rand = new Random(); - private long lastSysTime; - private int toPick; - - public TheItemBlock(Block block) { - super(block); - this.setHasSubtypes(false); - this.setMaxDamage(0); - } - - @Override - public String getTranslationKey(ItemStack stack) { - return this.getTranslationKey(); - } - - @Override - public int getMetadata(int damage) { - return damage; - } - - @Override - public String getItemStackDisplayName(ItemStack stack) { - if (Util.isClient()) { - long sysTime = System.currentTimeMillis(); - - if (this.lastSysTime + 5000 < sysTime) { - this.lastSysTime = sysTime; - this.toPick = this.rand.nextInt(NAME_FLAVOR_AMOUNTS) + 1; - } - - return StringUtil.localize(this.getTranslationKey() + ".name") + " (" + StringUtil.localize("tile." + ActuallyAdditions.MODID + ".block_inputter.add." + this.toPick + ".name") + ")"; - } else { - return super.getItemStackDisplayName(stack); - } - } - } + // public static class TheItemBlock extends ItemBlockBase { + // + // private final Random rand = new Random(); + // private long lastSysTime; + // private int toPick; + // + // public TheItemBlock(Block block) { + // super(block); + // this.setHasSubtypes(false); + // this.setMaxDamage(0); + // } + // + // @Override + // public String getTranslationKey(ItemStack stack) { + // return this.getTranslationKey(); + // } + // + // @Override + // public int getMetadata(int damage) { + // return damage; + // } + // + // @Override + // public String getItemStackDisplayName(ItemStack stack) { + // if (Util.isClient()) { + // long sysTime = System.currentTimeMillis(); + // + // if (this.lastSysTime + 5000 < sysTime) { + // this.lastSysTime = sysTime; + // this.toPick = this.rand.nextInt(NAME_FLAVOR_AMOUNTS) + 1; + // } + // + // return StringUtil.localize(this.getTranslationKey() + ".name") + " (" + StringUtil.localize("tile." + ActuallyAdditions.MODID + ".block_inputter.add." + this.toPick + ".name") + ")"; + // } else { + // return super.getItemStackDisplayName(stack); + // } + // } + // } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockItemRepairer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockItemRepairer.java index d795aff45..d741904d9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockItemRepairer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockItemRepairer.java @@ -1,66 +1,67 @@ -/* - * This file ("BlockItemRepairer.java") is part of the Actually Additions mod for Minecraft. - * It is created and owned by Ellpeck and distributed - * under the Actually Additions License to be found at - * http://ellpeck.de/actaddlicense - * View the source code at https://github.com/Ellpeck/ActuallyAdditions - * - * © 2015-2017 Ellpeck - */ - -package de.ellpeck.actuallyadditions.mod.blocks; - -import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; -import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; -import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Hand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -public class BlockItemRepairer extends BlockContainerBase { - - public BlockItemRepairer() { - super(Material.ROCK, this.name); - this.setHarvestLevel("pickaxe", 0); - this.setHardness(20.0F); - this.setResistance(15.0F); - this.setSoundType(SoundType.STONE); - this.setTickRandomly(true); - } - - @Override - public TileEntity createNewTileEntity(IBlockReader worldIn) { - return new TileEntityItemRepairer(); - } - - @Override - public ActionResultType onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { - if (!world.isRemote) { - TileEntityItemRepairer repairer = (TileEntityItemRepairer) world.getTileEntity(pos); - if (repairer != null) { - player.openGui(ActuallyAdditions.INSTANCE, GuiHandler.GuiTypes.REPAIRER.ordinal(), world, pos.getX(), pos.getY(), pos.getZ()); - } - return true; - } - return true; - } - - @Override - public int getLightValue(BlockState state, IBlockAccess world, BlockPos pos) { - return this.getMetaFromState(state) == 1 - ? 12 - : 0; - } - - @Override - public EnumRarity getRarity(ItemStack stack) { - return EnumRarity.EPIC; - } -} +// TODO: [port] no longer used +///* +// * This file ("BlockItemRepairer.java") is part of the Actually Additions mod for Minecraft. +// * It is created and owned by Ellpeck and distributed +// * under the Actually Additions License to be found at +// * http://ellpeck.de/actaddlicense +// * View the source code at https://github.com/Ellpeck/ActuallyAdditions +// * +// * © 2015-2017 Ellpeck +// */ +// +//package de.ellpeck.actuallyadditions.mod.blocks; +// +//import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; +//import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; +//import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; +//import net.minecraft.block.SoundType; +//import net.minecraft.block.material.Material; +//import net.minecraft.entity.player.PlayerEntity; +//import net.minecraft.item.EnumRarity; +//import net.minecraft.item.ItemStack; +//import net.minecraft.tileentity.TileEntity; +//import net.minecraft.util.Hand; +//import net.minecraft.util.math.BlockPos; +//import net.minecraft.world.IBlockAccess; +//import net.minecraft.world.World; +// +//public class BlockItemRepairer extends BlockContainerBase { +// +// public BlockItemRepairer() { +// super(Material.ROCK, this.name); +// this.setHarvestLevel("pickaxe", 0); +// this.setHardness(20.0F); +// this.setResistance(15.0F); +// this.setSoundType(SoundType.STONE); +// this.setTickRandomly(true); +// } +// +// @Override +// public TileEntity createNewTileEntity(IBlockReader worldIn) { +// return new TileEntityItemRepairer(); +// } +// +// @Override +// public ActionResultType onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { +// if (!world.isRemote) { +// TileEntityItemRepairer repairer = (TileEntityItemRepairer) world.getTileEntity(pos); +// if (repairer != null) { +// player.openGui(ActuallyAdditions.INSTANCE, GuiHandler.GuiTypes.REPAIRER.ordinal(), world, pos.getX(), pos.getY(), pos.getZ()); +// } +// return true; +// } +// return true; +// } +// +// @Override +// public int getLightValue(BlockState state, IBlockAccess world, BlockPos pos) { +// return this.getMetaFromState(state) == 1 +// ? 12 +// : 0; +// } +// +// @Override +// public EnumRarity getRarity(ItemStack stack) { +// return EnumRarity.EPIC; +// } +//} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockItemViewer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockItemViewer.java index 0c78ec42e..1c8ea4754 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockItemViewer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockItemViewer.java @@ -12,30 +12,25 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityItemViewer; -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.ItemStack; +import net.minecraft.block.BlockState; import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.world.IBlockReader; public class BlockItemViewer extends BlockContainerBase { - public BlockItemViewer() { - super(Material.ROCK, this.name); - this.setHarvestLevel("pickaxe", 0); - this.setHardness(1.5F); - this.setResistance(10.0F); - this.setSoundType(SoundType.STONE); + super(ActuallyBlocks.defaultPickProps(0)); } @Override - public TileEntity createNewTileEntity(World worldIn, int meta) { + public TileEntity createNewTileEntity(IBlockReader worldIn) { return new TileEntityItemViewer(); } @Override - public EnumRarity getRarity(ItemStack stack) { - return EnumRarity.RARE; + public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + return Shapes.ITEM_VIEWER_SHAPE; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockItemViewerHopping.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockItemViewerHopping.java index 98291f60d..f5e98360c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockItemViewerHopping.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockItemViewerHopping.java @@ -11,114 +11,25 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.tile.TileEntityItemViewerHopping; -import net.minecraft.block.properties.PropertyDirection; -import net.minecraft.block.state.BlockStateContainer; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; +import net.minecraft.block.BlockState; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockRenderLayer; -import net.minecraft.util.Direction; -import net.minecraft.util.Mirror; -import net.minecraft.util.Rotation; -import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; -import net.minecraftforge.api.distmarker.Dist; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.world.IBlockReader; -import java.util.List; - -//Most of this is just copied from BlockHopper, no credit taken. Or clue what it is. public class BlockItemViewerHopping extends BlockItemViewer { - - public static final PropertyDirection FACING = PropertyDirection.create("facing", facing -> facing != Direction.UP); - - private static final AxisAlignedBB BASE_AABB = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.625D, 1.0D); - private static final AxisAlignedBB SOUTH_AABB = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 0.125D); - private static final AxisAlignedBB NORTH_AABB = new AxisAlignedBB(0.0D, 0.0D, 0.875D, 1.0D, 1.0D, 1.0D); - private static final AxisAlignedBB WEST_AABB = new AxisAlignedBB(0.875D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D); - private static final AxisAlignedBB EAST_AABB = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.125D, 1.0D, 1.0D); - public BlockItemViewerHopping() { - super(this.name); + super(); } @Override - public AxisAlignedBB getBoundingBox(BlockState state, IBlockAccess source, BlockPos pos) { - return FULL_BLOCK_AABB; + public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + return Shapes.HOPPING_ITEM_VIEWER_SHAPE; } @Override - @Deprecated - public void addCollisionBoxToList(BlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List collidingBoxes, Entity entityIn, boolean someBool) { - this.addCollisionBoxToList(pos, entityBox, collidingBoxes, BASE_AABB); - this.addCollisionBoxToList(pos, entityBox, collidingBoxes, EAST_AABB); - this.addCollisionBoxToList(pos, entityBox, collidingBoxes, WEST_AABB); - this.addCollisionBoxToList(pos, entityBox, collidingBoxes, SOUTH_AABB); - this.addCollisionBoxToList(pos, entityBox, collidingBoxes, NORTH_AABB); - } - - @Override - public TileEntity createNewTileEntity(World worldIn, int meta) { + public TileEntity createNewTileEntity(IBlockReader worldIn) { return new TileEntityItemViewerHopping(); } - - @Override - public BlockState getStateForPlacement(World worldIn, BlockPos pos, Direction facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) { - Direction opp = facing.getOpposite(); - return this.getDefaultState().withProperty(FACING, opp == Direction.UP - ? Direction.DOWN - : opp); - } - - @Override //was isFullyOpaque, not sure if correct change. - public boolean isNormalCube(BlockState state) { - return true; - } - - @Override - public boolean isFullCube(BlockState state) { - return false; - } - - @Override - public boolean isOpaqueCube(BlockState state) { - return false; - } - - @Override - @OnlyIn(Dist.CLIENT) - public boolean shouldSideBeRendered(BlockState blockState, IBlockAccess blockAccess, BlockPos pos, Direction side) { - return true; - } - - @Override - public BlockRenderLayer getRenderLayer() { - return BlockRenderLayer.CUTOUT_MIPPED; - } - - @Override - public BlockState getStateFromMeta(int meta) { - return this.getDefaultState().withProperty(FACING, Direction.byIndex(meta)); - } - - @Override - public int getMetaFromState(BlockState state) { - return state.getValue(FACING).getIndex(); - } - - @Override - protected BlockStateContainer createBlockState() { - return new BlockStateContainer(this, FACING); - } - - @Override - public BlockState withRotation(BlockState state, Rotation rot) { - return state.withProperty(FACING, rot.rotate(state.getValue(FACING))); - } - - @Override - public BlockState withMirror(BlockState state, Mirror mirror) { - return this.withRotation(state, mirror.toRotation(state.getValue(FACING))); - } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLampPowerer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLampPowerer.java index 8d7d5c42b..85f42bbf2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLampPowerer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLampPowerer.java @@ -10,58 +10,42 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; +import de.ellpeck.actuallyadditions.mod.blocks.base.FullyDirectionalBlock; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.block.Block; -import net.minecraft.block.BlockDirectional; -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.BlockStateContainer; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.ItemStack; +import net.minecraft.block.BlockState; +import net.minecraft.state.properties.BlockStateProperties; import net.minecraft.util.Direction; -import net.minecraft.util.Mirror; -import net.minecraft.util.Rotation; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.world.IBlockReader; import net.minecraft.world.World; import java.util.ArrayList; import java.util.List; -public class BlockLampPowerer extends BlockBase { +public class BlockLampPowerer extends FullyDirectionalBlock { public BlockLampPowerer() { - super(Material.ROCK, name); - this.setHarvestLevel("pickaxe", 0); - this.setHardness(1.5F); - this.setResistance(10.0F); - this.setSoundType(SoundType.STONE); + super(ActuallyBlocks.defaultPickProps(0)); } @Override - public void neighborChanged(BlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos otherPos) { + public void neighborChanged(BlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos fromPos, boolean isMoving) { this.updateLamp(worldIn, pos); } @Override - public void onBlockAdded(World world, BlockPos pos, BlockState state) { + public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean isMoving) { this.updateLamp(world, pos); } - @Override - public void onBlockPlacedBy(World world, BlockPos pos, BlockState state, EntityLivingBase player, ItemStack stack) { - int rotation = Direction.getDirectionFromEntityLiving(pos, player).ordinal(); - world.setBlockState(pos, this.getStateFromMeta(rotation), 2); - - super.onBlockPlacedBy(world, pos, state, player, stack); - } - private void updateLamp(World world, BlockPos pos) { if (!world.isRemote) { BlockState state = world.getBlockState(pos); BlockPos coords = pos.offset(WorldUtil.getDirectionByPistonRotation(state)); - this.updateLampsAtPos(world, coords, world.getRedstonePowerFromNeighbors(pos) > 0, new ArrayList()); + this.updateLampsAtPos(world, coords, world.getRedstonePowerFromNeighbors(pos) > 0, new ArrayList<>()); } } @@ -69,15 +53,12 @@ public class BlockLampPowerer extends BlockBase { BlockState state = world.getBlockState(pos); Block block = state.getBlock(); if (block instanceof BlockColoredLamp) { - boolean isOn = ((BlockColoredLamp) block).isOn; - if (powered) { - if (!isOn) { - world.setBlockState(pos, ActuallyBlocks.blockColoredLampOn.getDefaultState().withProperty(BlockColoredLamp.TYPE, state.getValue(BlockColoredLamp.TYPE)), 2); - } - } else { - if (isOn) { - world.setBlockState(pos, ActuallyBlocks.blockColoredLamp.getDefaultState().withProperty(BlockColoredLamp.TYPE, state.getValue(BlockColoredLamp.TYPE)), 2); - } + if (state.get(BlockStateProperties.LIT) && !powered) { + world.setBlockState(pos, state.with(BlockStateProperties.LIT, false)); + } + + if (!state.get(BlockStateProperties.LIT) && powered) { + world.setBlockState(pos, state.with(BlockStateProperties.LIT, true)); } this.updateSurrounding(world, pos, powered, updatedAlready); @@ -95,32 +76,16 @@ public class BlockLampPowerer extends BlockBase { } @Override - public EnumRarity getRarity(ItemStack stack) { - return EnumRarity.RARE; - } - - @Override - public BlockState getStateFromMeta(int meta) { - return this.getDefaultState().withProperty(BlockDirectional.FACING, Direction.byIndex(meta)); - } - - @Override - public int getMetaFromState(BlockState state) { - return state.getValue(BlockDirectional.FACING).getIndex(); - } - - @Override - protected BlockStateContainer createBlockState() { - return new BlockStateContainer(this, BlockDirectional.FACING); - } - - @Override - public BlockState withRotation(BlockState state, Rotation rot) { - return state.withProperty(BlockDirectional.FACING, rot.rotate(state.getValue(BlockDirectional.FACING))); - } - - @Override - public BlockState withMirror(BlockState state, Mirror mirror) { - return this.withRotation(state, mirror.toRotation(state.getValue(BlockDirectional.FACING))); + public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + switch (state.get(FACING)) { + case EAST: + return Shapes.LampPowererShapes.SHAPE_E; + case SOUTH: + return Shapes.LampPowererShapes.SHAPE_S; + case WEST: + return Shapes.LampPowererShapes.SHAPE_W; + default: + return Shapes.LampPowererShapes.SHAPE_N; + } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java index 21bcb6c81..901ff8eba 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java @@ -14,153 +14,76 @@ import com.mojang.blaze3d.matrix.MatrixStack; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.laser.Network; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; -import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; +import de.ellpeck.actuallyadditions.mod.blocks.base.FullyDirectionalBlock; import de.ellpeck.actuallyadditions.mod.config.ConfigValues; -import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.items.ItemEngineerGoggles; import de.ellpeck.actuallyadditions.mod.items.ItemLaserRelayUpgrade; import de.ellpeck.actuallyadditions.mod.items.ItemLaserWrench; import de.ellpeck.actuallyadditions.mod.tile.*; import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; -import net.minecraft.block.BlockDirectional; -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.BlockFaceShape; -import net.minecraft.block.state.BlockStateContainer; +import net.minecraft.block.BlockState; import net.minecraft.client.MainWindow; import net.minecraft.client.Minecraft; -import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Direction; +import net.minecraft.util.ActionResultType; import net.minecraft.util.Hand; -import net.minecraft.util.Mirror; -import net.minecraft.util.Rotation; -import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.util.math.RayTraceResult; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.util.math.shapes.VoxelShape; import net.minecraft.util.text.TextFormatting; -import net.minecraft.world.IBlockAccess; +import net.minecraft.world.IBlockReader; import net.minecraft.world.World; import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.entity.player.PlayerInteractEvent; -import net.minecraftforge.fml.common.eventhandler.Event; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import net.minecraftforge.api.distmarker.OnlyIn; -public class BlockLaserRelay extends BlockContainerBase implements IHudDisplay { +public class BlockLaserRelay extends FullyDirectionalBlock.Container implements IHudDisplay { //This took way too much fiddling around. I'm not good with numbers. - private static final float F = 1 / 16F; - private static final AxisAlignedBB AABB_UP = new AxisAlignedBB(2 * F, 0, 2 * F, 1 - 2 * F, 10 * F, 1 - 2 * F); - private static final AxisAlignedBB AABB_DOWN = new AxisAlignedBB(2 * F, 6 * F, 2 * F, 1 - 2 * F, 1, 1 - 2 * F); - private static final AxisAlignedBB AABB_NORTH = new AxisAlignedBB(2 * F, 2 * F, 6 * F, 1 - 2 * F, 1 - 2 * F, 1); - private static final AxisAlignedBB AABB_EAST = new AxisAlignedBB(0, 2 * F, 2 * F, 1 - 6 * F, 1 - 2 * F, 1 - 2 * F); - private static final AxisAlignedBB AABB_SOUTH = new AxisAlignedBB(2 * F, 2 * F, 0, 1 - 2 * F, 1 - 2 * F, 1 - 6 * F); - private static final AxisAlignedBB AABB_WEST = new AxisAlignedBB(6 * F, 2 * F, 2 * F, 1, 1 - 2 * F, 1 - 2 * F); + // private static final float F = 1 / 16F; + // private static final AxisAlignedBB AABB_UP = new AxisAlignedBB(2 * F, 0, 2 * F, 1 - 2 * F, 10 * F, 1 - 2 * F); + // private static final AxisAlignedBB AABB_DOWN = new AxisAlignedBB(2 * F, 6 * F, 2 * F, 1 - 2 * F, 1, 1 - 2 * F); + // private static final AxisAlignedBB AABB_NORTH = new AxisAlignedBB(2 * F, 2 * F, 6 * F, 1 - 2 * F, 1 - 2 * F, 1); + // private static final AxisAlignedBB AABB_EAST = new AxisAlignedBB(0, 2 * F, 2 * F, 1 - 6 * F, 1 - 2 * F, 1 - 2 * F); + // private static final AxisAlignedBB AABB_SOUTH = new AxisAlignedBB(2 * F, 2 * F, 0, 1 - 2 * F, 1 - 2 * F, 1 - 6 * F); + // private static final AxisAlignedBB AABB_WEST = new AxisAlignedBB(6 * F, 2 * F, 2 * F, 1, 1 - 2 * F, 1 - 2 * F); private final Type type; public BlockLaserRelay(Type type) { - super(Material.ROCK, this.name); - this.setHarvestLevel("pickaxe", 0); - this.setHardness(1.5F); - this.setResistance(10.0F); - this.setSoundType(SoundType.STONE); - + super(ActuallyBlocks.defaultPickProps(0)); this.type = type; - if (this.type.ordinal() == 0) { - MinecraftForge.EVENT_BUS.register(this); - } + // TODO: [port] add back once I know what it does. + // if (this.type.ordinal() == 0) { + // MinecraftForge.EVENT_BUS.register(this); + // } } - @SubscribeEvent - public void onBlockRightClick(PlayerInteractEvent.RightClickBlock event) { - PlayerEntity player = event.getEntityPlayer(); - World world = event.getWorld(); - ItemStack stack = event.getItemStack(); - BlockPos pos = event.getPos(); - - if (player != null && world != null && StackUtil.isValid(stack) && pos != null) { - BlockState state = event.getWorld().getBlockState(pos); - if (state != null && state.getBlock() instanceof BlockLaserRelay) { - if (player.isSneaking()) { - event.setUseBlock(Event.Result.ALLOW); - } - } - } - } + // @SubscribeEvent + // public void onBlockRightClick(PlayerInteractEvent.RightClickBlock event) { + // PlayerEntity player = event.getEntityPlayer(); + // World world = event.getWorld(); + // ItemStack stack = event.getItemStack(); + // BlockPos pos = event.getPos(); + // + // if (player != null && world != null && StackUtil.isValid(stack) && pos != null) { + // BlockState state = event.getWorld().getBlockState(pos); + // if (state != null && state.getBlock() instanceof BlockLaserRelay) { + // if (player.isSneaking()) { + // event.setUseBlock(Event.Result.ALLOW); + // } + // } + // } + // } @Override - public AxisAlignedBB getBoundingBox(BlockState state, IBlockAccess source, BlockPos pos) { - switch (this.getMetaFromState(state)) { - case 1: - return AABB_UP; - case 2: - return AABB_NORTH; - case 3: - return AABB_SOUTH; - case 4: - return AABB_WEST; - case 5: - return AABB_EAST; - default: - return AABB_DOWN; - } - } - - @Override - public boolean isFullCube(BlockState state) { - return false; - } - - @Override - public boolean isOpaqueCube(BlockState state) { - return false; - } - - @Override - public BlockState getStateForPlacement(World world, BlockPos pos, Direction side, float hitX, float hitY, float hitZ, int meta, EntityLivingBase base) { - return this.getStateFromMeta(side.ordinal()); - } - - @Override - public EnumRarity getRarity(ItemStack stack) { - return EnumRarity.EPIC; - } - - @Override - public BlockState getStateFromMeta(int meta) { - return this.getDefaultState().withProperty(BlockDirectional.FACING, Direction.byIndex(meta)); - } - - @Override - public int getMetaFromState(BlockState state) { - return state.getValue(BlockDirectional.FACING).getIndex(); - } - - @Override - protected BlockStateContainer createBlockState() { - return new BlockStateContainer(this, BlockDirectional.FACING); - } - - @Override - public BlockState withRotation(BlockState state, Rotation rot) { - return state.withProperty(BlockDirectional.FACING, rot.rotate(state.getValue(BlockDirectional.FACING))); - } - - @Override - public BlockState withMirror(BlockState state, Mirror mirror) { - return this.withRotation(state, mirror.toRotation(state.getValue(BlockDirectional.FACING))); - } - - @Override - public ActionResultType onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { + public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) { ItemStack stack = player.getHeldItem(hand); TileEntity tile = world.getTileEntity(pos); if (tile instanceof TileEntityLaserRelay) { @@ -168,7 +91,7 @@ public class BlockLaserRelay extends BlockContainerBase implements IHudDisplay { if (StackUtil.isValid(stack)) { if (stack.getItem() instanceof ItemLaserWrench) { - return false; + return ActionResultType.FAIL; } else if (stack.getItem() == ConfigValues.itemCompassConfigurator) { if (!world.isRemote) { relay.onCompassAction(player); @@ -182,7 +105,7 @@ public class BlockLaserRelay extends BlockContainerBase implements IHudDisplay { relay.sendUpdate(); } - return true; + return ActionResultType.PASS; } else if (stack.getItem() instanceof ItemLaserRelayUpgrade) { ItemStack inRelay = relay.inv.getStackInSlot(0); if (!StackUtil.isValid(inRelay)) { @@ -195,7 +118,7 @@ public class BlockLaserRelay extends BlockContainerBase implements IHudDisplay { set.setCount(1); relay.inv.setStackInSlot(0, set); } - return true; + return ActionResultType.PASS; } } @@ -211,22 +134,19 @@ public class BlockLaserRelay extends BlockContainerBase implements IHudDisplay { player.entityDropItem(inRelay, 0); } } - return true; + return ActionResultType.PASS; } } if (relay instanceof TileEntityLaserRelayItemWhitelist) { - if (!world.isRemote) { - player.openGui(ActuallyAdditions.INSTANCE, GuiHandler.GuiTypes.LASER_RELAY_ITEM_WHITELIST.ordinal(), world, pos.getX(), pos.getY(), pos.getZ()); - } - return true; + return this.openGui(world, player, pos, TileEntityLaserRelayItemWhitelist.class); } } - return false; + return ActionResultType.FAIL; } @Override - public TileEntity createNewTileEntity(World world, int i) { + public TileEntity createNewTileEntity(IBlockReader world) { switch (this.type) { case ITEM: return new TileEntityLaserRelayItem(); @@ -246,17 +166,22 @@ public class BlockLaserRelay extends BlockContainerBase implements IHudDisplay { @Override @OnlyIn(Dist.CLIENT) public void displayHud(MatrixStack matrices, Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult rayCast, MainWindow resolution) { - if (rayCast != null && rayCast.getBlockPos() != null && minecraft.world != null) { + if (!(rayCast instanceof BlockRayTraceResult)) { + return; + } + + BlockPos pos = ((BlockRayTraceResult) rayCast).getPos(); + if (minecraft.world != null) { boolean wearing = ItemEngineerGoggles.isWearing(player); if (wearing || StackUtil.isValid(stack)) { boolean compass = stack.getItem() == ConfigValues.itemCompassConfigurator; if (wearing || compass || stack.getItem() instanceof ItemLaserWrench) { - TileEntity tile = minecraft.world.getTileEntity(rayCast.getBlockPos()); + TileEntity tile = minecraft.world.getTileEntity(pos); if (tile instanceof TileEntityLaserRelay) { TileEntityLaserRelay relay = (TileEntityLaserRelay) tile; String strg = relay.getExtraDisplayString(); - minecraft.fontRenderer.drawStringWithShadow(strg, resolution.getScaledWidth() / 2 + 5, resolution.getScaledHeight() / 2 + 5, StringUtil.DECIMAL_COLOR_WHITE); + minecraft.fontRenderer.drawStringWithShadow(matrices, strg, resolution.getScaledWidth() / 2f + 5, resolution.getScaledHeight() / 2f + 5, StringUtil.DECIMAL_COLOR_WHITE); String expl; if (compass) { @@ -273,16 +198,20 @@ public class BlockLaserRelay extends BlockContainerBase implements IHudDisplay { } @Override - public void breakBlock(World world, BlockPos pos, BlockState state) { - super.breakBlock(world, pos, state); + public void onReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean isMoving) { + super.onReplaced(state, world, pos, newState, isMoving); - ActuallyAdditionsAPI.connectionHandler.removeRelayFromNetwork(pos, world); - } - - @Override - public BlockFaceShape getBlockFaceShape(IBlockAccess worldIn, BlockState state, BlockPos pos, Direction face) { - return BlockFaceShape.UNDEFINED; + if (state != newState) { + ActuallyAdditionsAPI.connectionHandler.removeRelayFromNetwork(pos, world); + } } + // + // @Override + // public void breakBlock(World world, BlockPos pos, BlockState state) { + // super.breakBlock(world, pos, state); + // + // ActuallyAdditionsAPI.connectionHandler.removeRelayFromNetwork(pos, world); + // } public enum Type { ENERGY_BASIC, @@ -292,4 +221,9 @@ public class BlockLaserRelay extends BlockContainerBase implements IHudDisplay { ITEM, ITEM_WHITELIST } + + @Override + public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + return Shapes.RELAY_SHAPE; + } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLavaFactoryController.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLavaFactoryController.java index b4e284253..5177ba816 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLavaFactoryController.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLavaFactoryController.java @@ -12,29 +12,29 @@ package de.ellpeck.actuallyadditions.mod.blocks; import com.mojang.blaze3d.matrix.MatrixStack; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; -import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; +import de.ellpeck.actuallyadditions.mod.blocks.base.DirectionalBlock; import de.ellpeck.actuallyadditions.mod.tile.TileEntityLavaFactoryController; import de.ellpeck.actuallyadditions.mod.util.StringUtil; -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; +import net.minecraft.block.BlockState; import net.minecraft.client.MainWindow; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.util.math.RayTraceResult; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.world.IBlockReader; import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; -public class BlockLavaFactoryController extends BlockContainerBase implements IHudDisplay { +public class BlockLavaFactoryController extends DirectionalBlock.Container implements IHudDisplay { public BlockLavaFactoryController() { - super(Material.ROCK, this.name); - this.setHarvestLevel("pickaxe", 0); - this.setHardness(4.5F); - this.setResistance(20.0F); - this.setSoundType(SoundType.STONE); + super(ActuallyBlocks.defaultPickProps(0, 4.5F, 20.0F)); } @Override @@ -42,15 +42,14 @@ public class BlockLavaFactoryController extends BlockContainerBase implements IH return new TileEntityLavaFactoryController(); } - @Override - public EnumRarity getRarity(ItemStack stack) { - return EnumRarity.RARE; - } - @Override @OnlyIn(Dist.CLIENT) public void displayHud(MatrixStack matrices, Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult rayCast, MainWindow resolution) { - TileEntityLavaFactoryController factory = (TileEntityLavaFactoryController) minecraft.world.getTileEntity(rayCast.getBlockPos()); + if (!(rayCast instanceof BlockRayTraceResult)) { + return; + } + + TileEntityLavaFactoryController factory = (TileEntityLavaFactoryController) minecraft.world.getTileEntity(((BlockRayTraceResult) rayCast).getPos()); if (factory != null) { int state = factory.isMultiblock(); if (state == TileEntityLavaFactoryController.NOT_MULTI) { @@ -60,4 +59,18 @@ public class BlockLavaFactoryController extends BlockContainerBase implements IH } } } + + @Override + public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + switch (state.get(FACING)) { + case EAST: + return Shapes.LavaFactoryShapes.SHAPE_E; + case SOUTH: + return Shapes.LavaFactoryShapes.SHAPE_S; + case WEST: + return Shapes.LavaFactoryShapes.SHAPE_W; + default: + return Shapes.LavaFactoryShapes.SHAPE_N; + } + } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLeafGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLeafGenerator.java index 2888ba792..22fecd5a1 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLeafGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLeafGenerator.java @@ -10,22 +10,22 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; +import de.ellpeck.actuallyadditions.mod.blocks.base.DirectionalBlock; import de.ellpeck.actuallyadditions.mod.tile.TileEntityLeafGenerator; +import net.minecraft.block.BlockState; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.world.IBlockReader; +import net.minecraftforge.common.ToolType; -public class BlockLeafGenerator extends BlockContainerBase { +public class BlockLeafGenerator extends DirectionalBlock.Container { public BlockLeafGenerator() { - super(Material.IRON, this.name); - this.setHarvestLevel("pickaxe", 0); - this.setHardness(5.0F); - this.setResistance(10.0F); - this.setSoundType(SoundType.METAL); + super(Properties.create(Material.IRON).hardnessAndResistance(5.0F, 10.0F).harvestTool(ToolType.PICKAXE).harvestLevel(0).hardnessAndResistance(5.0F, 10.0F).sound(SoundType.METAL)); } @Override @@ -34,7 +34,16 @@ public class BlockLeafGenerator extends BlockContainerBase { } @Override - public EnumRarity getRarity(ItemStack stack) { - return EnumRarity.EPIC; + public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + switch (state.get(FACING)) { + case EAST: + return Shapes.LeafGeneratorShapes.SHAPE_E; + case SOUTH: + return Shapes.LeafGeneratorShapes.SHAPE_S; + case WEST: + return Shapes.LeafGeneratorShapes.SHAPE_W; + default: + return Shapes.LeafGeneratorShapes.SHAPE_N; + } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMiner.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMiner.java index bfc547494..fa7154fa0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMiner.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMiner.java @@ -11,66 +11,51 @@ package de.ellpeck.actuallyadditions.mod.blocks; import com.mojang.blaze3d.matrix.MatrixStack; -import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; -import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; -import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; +import de.ellpeck.actuallyadditions.mod.blocks.base.DirectionalBlock; import de.ellpeck.actuallyadditions.mod.tile.TileEntityMiner; import de.ellpeck.actuallyadditions.mod.util.StringUtil; -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; +import net.minecraft.block.BlockState; import net.minecraft.client.MainWindow; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ActionResultType; import net.minecraft.util.Hand; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.util.math.RayTraceResult; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.world.IBlockReader; import net.minecraft.world.World; import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; -public class BlockMiner extends BlockContainerBase implements IHudDisplay { +public class BlockMiner extends DirectionalBlock.Container implements IHudDisplay { public BlockMiner() { - super(Material.ROCK, this.name); - this.setHarvestLevel("pickaxe", 0); - this.setHardness(8F); - this.setResistance(30F); - this.setSoundType(SoundType.STONE); - } - - @Override - public boolean isOpaqueCube(BlockState state) { - return false; + super(ActuallyBlocks.defaultPickProps(0, 8F, 30F)); } @Override public ActionResultType onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { - if (!world.isRemote) { - TileEntity tile = world.getTileEntity(pos); - if (tile instanceof TileEntityMiner) { - player.openGui(ActuallyAdditions.INSTANCE, GuiHandler.GuiTypes.MINER.ordinal(), world, pos.getX(), pos.getY(), pos.getZ()); - } - } - return true; + return this.openGui(worldIn, player, pos, TileEntityMiner.class); } @Override - public EnumRarity getRarity(ItemStack stack) { - return EnumRarity.RARE; - } - - @Override - public TileEntity createNewTileEntity(World world, int i) { + public TileEntity createNewTileEntity(IBlockReader world) { return new TileEntityMiner(); } @Override @OnlyIn(Dist.CLIENT) public void displayHud(MatrixStack matrices, Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult rayCast, MainWindow resolution) { - TileEntity tile = minecraft.world.getTileEntity(rayCast.getBlockPos()); + if (!(rayCast instanceof BlockRayTraceResult)) { + return; + } + TileEntity tile = minecraft.world.getTileEntity(((BlockRayTraceResult) rayCast).getPos()); if (tile instanceof TileEntityMiner) { TileEntityMiner miner = (TileEntityMiner) tile; String info = miner.checkY == 0 @@ -78,7 +63,23 @@ public class BlockMiner extends BlockContainerBase implements IHudDisplay { : miner.checkY == -1 ? "Calculating positions..." : "Mining at " + (miner.getPos().getX() + miner.checkX) + ", " + miner.checkY + ", " + (miner.getPos().getZ() + miner.checkZ) + "."; - minecraft.fontRenderer.drawStringWithShadow(info, resolution.getScaledWidth() / 2 + 5, resolution.getScaledHeight() / 2 - 20, StringUtil.DECIMAL_COLOR_WHITE); + minecraft.fontRenderer.drawStringWithShadow(matrices, info, resolution.getScaledWidth() / 2f + 5, resolution.getScaledHeight() / 2f - 20, StringUtil.DECIMAL_COLOR_WHITE); + } + } + + @Override + public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + switch (state.get(FACING)) { + case NORTH: + return Shapes.MinerShapes.SHAPE_N; + case EAST: + return Shapes.MinerShapes.SHAPE_E; + case SOUTH: + return Shapes.MinerShapes.SHAPE_S; + case WEST: + return Shapes.MinerShapes.SHAPE_W; + default: + return Shapes.MinerShapes.SHAPE_N; } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMisc.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMisc.java index cfcfba45e..821cbf3d7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMisc.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMisc.java @@ -1,108 +1,108 @@ -/* - * This file ("BlockMisc.java") is part of the Actually Additions mod for Minecraft. - * It is created and owned by Ellpeck and distributed - * under the Actually Additions License to be found at - * http://ellpeck.de/actaddlicense - * View the source code at https://github.com/Ellpeck/ActuallyAdditions - * - * © 2015-2017 Ellpeck - */ - -package de.ellpeck.actuallyadditions.mod.blocks; - -import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; -import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; -import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase; -import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheMiscBlocks; -import de.ellpeck.actuallyadditions.mod.util.StringUtil; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.block.properties.PropertyEnum; -import net.minecraft.block.state.BlockStateContainer; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.ItemStack; -import net.minecraft.util.NonNullList; - -public class BlockMisc extends BlockBase { - - public static final TheMiscBlocks[] ALL_MISC_BLOCKS = TheMiscBlocks.values(); - public static final PropertyEnum TYPE = PropertyEnum.create("type", TheMiscBlocks.class); - - public BlockMisc() { - super(Material.ROCK); - this.setHardness(1.5F); - this.setResistance(10.0F); - this.setHarvestLevel("pickaxe", 1); - } - - @Override - public int damageDropped(BlockState state) { - return this.getMetaFromState(state); - } - - @Override - public void getSubBlocks(CreativeTabs tab, NonNullList list) { - for (int j = 0; j < ALL_MISC_BLOCKS.length; j++) { - list.add(new ItemStack(this, 1, j)); - } - } - - @Override - protected ItemBlockBase getItemBlock() { - return new TheItemBlock(this); - } - - @Override - public void registerRendering() { - for (int i = 0; i < ALL_MISC_BLOCKS.length; i++) { - ActuallyAdditions.PROXY.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), TYPE.getName() + "=" + ALL_MISC_BLOCKS[i].name); - } - } - - @Override - public EnumRarity getRarity(ItemStack stack) { - return stack.getItemDamage() >= ALL_MISC_BLOCKS.length - ? EnumRarity.COMMON - : ALL_MISC_BLOCKS[stack.getItemDamage()].rarity; - } - - @Override - public BlockState getStateFromMeta(int meta) { - return this.getDefaultState().withProperty(TYPE, TheMiscBlocks.values()[meta]); - } - - @Override - public int getMetaFromState(BlockState state) { - return state.getValue(TYPE).ordinal(); - } - - @Override - protected BlockStateContainer createBlockState() { - return new BlockStateContainer(this, TYPE); - } - - public static class TheItemBlock extends ItemBlockBase { - - public TheItemBlock(Block block) { - super(block); - this.setHasSubtypes(true); - this.setMaxDamage(0); - } - - @Override - public String getTranslationKey(ItemStack stack) { - return stack.getItemDamage() >= ALL_MISC_BLOCKS.length - ? StringUtil.BUGGED_ITEM_NAME - : this.getTranslationKey() + "_" + ALL_MISC_BLOCKS[stack.getItemDamage()].name; - } - - @Override - public int getItemBurnTime(ItemStack stack) { - if (stack.getMetadata() == TheMiscBlocks.CHARCOAL_BLOCK.ordinal()) { - return 16000; - } - return super.getItemBurnTime(stack); - } - } -} +///* +// * This file ("BlockMisc.java") is part of the Actually Additions mod for Minecraft. +// * It is created and owned by Ellpeck and distributed +// * under the Actually Additions License to be found at +// * http://ellpeck.de/actaddlicense +// * View the source code at https://github.com/Ellpeck/ActuallyAdditions +// * +// * © 2015-2017 Ellpeck +// */ +// +//package de.ellpeck.actuallyadditions.mod.blocks; +// +//import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; +//import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; +//import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase; +//import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheMiscBlocks; +//import de.ellpeck.actuallyadditions.mod.util.StringUtil; +//import net.minecraft.block.Block; +//import net.minecraft.block.material.Material; +//import net.minecraft.block.properties.PropertyEnum; +//import net.minecraft.block.state.BlockStateContainer; +//import net.minecraft.creativetab.CreativeTabs; +//import net.minecraft.item.EnumRarity; +//import net.minecraft.item.ItemStack; +//import net.minecraft.util.NonNullList; +// +//public class BlockMisc extends BlockBase { +// +// public static final TheMiscBlocks[] ALL_MISC_BLOCKS = TheMiscBlocks.values(); +// public static final PropertyEnum TYPE = PropertyEnum.create("type", TheMiscBlocks.class); +// +// public BlockMisc() { +// super(Material.ROCK); +// this.setHardness(1.5F); +// this.setResistance(10.0F); +// this.setHarvestLevel("pickaxe", 1); +// } +// +// @Override +// public int damageDropped(BlockState state) { +// return this.getMetaFromState(state); +// } +// +// @Override +// public void getSubBlocks(CreativeTabs tab, NonNullList list) { +// for (int j = 0; j < ALL_MISC_BLOCKS.length; j++) { +// list.add(new ItemStack(this, 1, j)); +// } +// } +// +// @Override +// protected ItemBlockBase getItemBlock() { +// return new TheItemBlock(this); +// } +// +// @Override +// public void registerRendering() { +// for (int i = 0; i < ALL_MISC_BLOCKS.length; i++) { +// ActuallyAdditions.PROXY.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), TYPE.getName() + "=" + ALL_MISC_BLOCKS[i].name); +// } +// } +// +// @Override +// public EnumRarity getRarity(ItemStack stack) { +// return stack.getItemDamage() >= ALL_MISC_BLOCKS.length +// ? EnumRarity.COMMON +// : ALL_MISC_BLOCKS[stack.getItemDamage()].rarity; +// } +// +// @Override +// public BlockState getStateFromMeta(int meta) { +// return this.getDefaultState().withProperty(TYPE, TheMiscBlocks.values()[meta]); +// } +// +// @Override +// public int getMetaFromState(BlockState state) { +// return state.getValue(TYPE).ordinal(); +// } +// +// @Override +// protected BlockStateContainer createBlockState() { +// return new BlockStateContainer(this, TYPE); +// } +// +// public static class TheItemBlock extends ItemBlockBase { +// +// public TheItemBlock(Block block) { +// super(block); +// this.setHasSubtypes(true); +// this.setMaxDamage(0); +// } +// +// @Override +// public String getTranslationKey(ItemStack stack) { +// return stack.getItemDamage() >= ALL_MISC_BLOCKS.length +// ? StringUtil.BUGGED_ITEM_NAME +// : this.getTranslationKey() + "_" + ALL_MISC_BLOCKS[stack.getItemDamage()].name; +// } +// +// @Override +// public int getItemBurnTime(ItemStack stack) { +// if (stack.getMetadata() == TheMiscBlocks.CHARCOAL_BLOCK.ordinal()) { +// return 16000; +// } +// return super.getItemBurnTime(stack); +// } +// } +//} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockOilGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockOilGenerator.java index 5d7bb6303..a873756cc 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockOilGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockOilGenerator.java @@ -10,48 +10,30 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; -import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; -import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; +import de.ellpeck.actuallyadditions.mod.blocks.base.DirectionalBlock; import de.ellpeck.actuallyadditions.mod.tile.TileEntityOilGenerator; -import net.minecraft.block.BlockHorizontal; -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.BlockStateContainer; -import net.minecraft.entity.EntityLivingBase; +import net.minecraft.block.BlockState; import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.ItemStack; +import net.minecraft.entity.player.ServerPlayerEntity; +import net.minecraft.particles.ParticleTypes; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Direction; +import net.minecraft.util.ActionResultType; import net.minecraft.util.Hand; -import net.minecraft.util.Mirror; -import net.minecraft.util.Rotation; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockRayTraceResult; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.world.IBlockReader; import net.minecraft.world.World; -import net.minecraftforge.api.distmarker.Dist; +import net.minecraft.world.server.ServerWorld; +import net.minecraftforge.fml.network.NetworkHooks; import java.util.Random; -public class BlockOilGenerator extends BlockContainerBase { +public class BlockOilGenerator extends DirectionalBlock.Container { public BlockOilGenerator() { - super(Material.ROCK, this.name); - this.setHarvestLevel("pickaxe", 0); - this.setHardness(1.5F); - this.setResistance(10.0F); - this.setSoundType(SoundType.STONE); - this.setTickRandomly(true); - } - - @Override - public boolean isFullCube(BlockState state) { - return false; - } - - @Override - public boolean isOpaqueCube(BlockState state) { - return false; + super(ActuallyBlocks.defaultPickProps(0).tickRandomly()); } @Override @@ -59,67 +41,44 @@ public class BlockOilGenerator extends BlockContainerBase { return new TileEntityOilGenerator(); } + // TODO: Move all of these over to the client version @Override - @OnlyIn(Dist.CLIENT) - public void randomDisplayTick(BlockState state, World world, BlockPos pos, Random rand) { + public void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random random) { TileEntity tile = world.getTileEntity(pos); if (tile instanceof TileEntityOilGenerator) { if (((TileEntityOilGenerator) tile).currentBurnTime > 0) { for (int i = 0; i < 5; i++) { - world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, (double) pos.getX() + 0.5F, (double) pos.getY() + 1.0F, (double) pos.getZ() + 0.5F, 0.0D, 0.0D, 0.0D); + world.addParticle(ParticleTypes.SMOKE, (double) pos.getX() + 0.5F, (double) pos.getY() + 1.0F, (double) pos.getZ() + 0.5F, 0.0D, 0.0D, 0.0D); } } } } @Override - public ActionResultType onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { + public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) { if (!world.isRemote) { TileEntityOilGenerator generator = (TileEntityOilGenerator) world.getTileEntity(pos); if (generator != null) { if (!this.tryUseItemOnTank(player, hand, generator.tank)) { - player.openGui(ActuallyAdditions.INSTANCE, GuiHandler.GuiTypes.OIL_GENERATOR.ordinal(), world, pos.getX(), pos.getY(), pos.getZ()); + NetworkHooks.openGui((ServerPlayerEntity) player, generator, pos); } } - return true; } - return true; + + return ActionResultType.PASS; } @Override - public void onBlockPlacedBy(World world, BlockPos pos, BlockState state, EntityLivingBase player, ItemStack stack) { - world.setBlockState(pos, state.withProperty(BlockHorizontal.FACING, player.getHorizontalFacing().getOpposite()), 2); - - super.onBlockPlacedBy(world, pos, state, player, stack); - } - - @Override - public EnumRarity getRarity(ItemStack stack) { - return EnumRarity.RARE; - } - - @Override - public BlockState getStateFromMeta(int meta) { - return this.getDefaultState().withProperty(BlockHorizontal.FACING, Direction.byHorizontalIndex(meta)); - } - - @Override - public int getMetaFromState(BlockState state) { - return state.getValue(BlockHorizontal.FACING).getHorizontalIndex(); - } - - @Override - protected BlockStateContainer createBlockState() { - return new BlockStateContainer(this, BlockHorizontal.FACING); - } - - @Override - public BlockState withRotation(BlockState state, Rotation rot) { - return state.withProperty(BlockHorizontal.FACING, rot.rotate(state.getValue(BlockHorizontal.FACING))); - } - - @Override - public BlockState withMirror(BlockState state, Mirror mirror) { - return this.withRotation(state, mirror.toRotation(state.getValue(BlockHorizontal.FACING))); + public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + switch (state.get(FACING)) { + case EAST: + return Shapes.OilGeneratorShapes.SHAPE_E; + case SOUTH: + return Shapes.OilGeneratorShapes.SHAPE_S; + case WEST: + return Shapes.OilGeneratorShapes.SHAPE_W; + default: + return Shapes.OilGeneratorShapes.SHAPE_N; + } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantom.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantom.java index 2af936bf6..cf45c8125 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantom.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantom.java @@ -17,25 +17,29 @@ import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.tile.*; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.block.Block; -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; +import net.minecraft.block.BlockState; import net.minecraft.client.MainWindow; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.EnumRarity; +import net.minecraft.entity.player.ServerPlayerEntity; +import net.minecraft.inventory.container.INamedContainerProvider; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ActionResultType; import net.minecraft.util.Direction; import net.minecraft.util.Hand; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.RayTraceResult; -import net.minecraft.util.math.Vec3d; +import net.minecraft.util.math.vector.Vector3d; import net.minecraft.util.text.TextFormatting; -import net.minecraft.world.IBlockAccess; +import net.minecraft.world.IBlockReader; import net.minecraft.world.World; import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import net.minecraftforge.fml.network.NetworkHooks; public class BlockPhantom extends BlockContainerBase implements IHudDisplay { @@ -43,12 +47,8 @@ public class BlockPhantom extends BlockContainerBase implements IHudDisplay { public final Type type; public BlockPhantom(Type type) { - super(Material.ROCK, this.name); + super(ActuallyBlocks.defaultPickProps(0, 4.5F, 10.0F)); this.type = type; - this.setHarvestLevel("pickaxe", 0); - this.setHardness(4.5F); - this.setResistance(10.0F); - this.setSoundType(SoundType.STONE); } @Override @@ -57,7 +57,7 @@ public class BlockPhantom extends BlockContainerBase implements IHudDisplay { } @Override - public int getWeakPower(BlockState state, IBlockAccess world, BlockPos pos, Direction side) { + public int getWeakPower(BlockState blockState, IBlockReader world, BlockPos pos, Direction side) { if (this.type == Type.REDSTONEFACE) { TileEntity tile = world.getTileEntity(pos); if (tile instanceof TileEntityPhantomRedstoneface) { @@ -68,7 +68,7 @@ public class BlockPhantom extends BlockContainerBase implements IHudDisplay { } @Override - public int getStrongPower(BlockState state, IBlockAccess world, BlockPos pos, Direction side) { + public int getStrongPower(BlockState blockState, IBlockReader world, BlockPos pos, Direction side) { if (this.type == Type.REDSTONEFACE) { TileEntity tile = world.getTileEntity(pos); if (tile instanceof TileEntityPhantomRedstoneface) { @@ -101,41 +101,42 @@ public class BlockPhantom extends BlockContainerBase implements IHudDisplay { } } + // TODO: [port] validate this works @Override - public boolean onBlockActivated(World world, BlockPos pos, BlockState state, PlayerEntity player, Hand hand, Direction side, float hitX, float hitY, float hitZ) { + public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { if (this.tryToggleRedstone(world, pos, player)) { - return true; + return ActionResultType.PASS; } + if (!world.isRemote) { TileEntity tile = world.getTileEntity(pos); if (tile instanceof IPhantomTile && ((IPhantomTile) tile).getGuiID() != -1) { - player.openGui(ActuallyAdditions.INSTANCE, ((IPhantomTile) tile).getGuiID(), world, pos.getX(), pos.getY(), pos.getZ()); + NetworkHooks.openGui((ServerPlayerEntity) player, (INamedContainerProvider) tile, pos); } } - return true; - } - - @Override - public EnumRarity getRarity(ItemStack stack) { - return EnumRarity.EPIC; + + return ActionResultType.PASS; } + // TODO: [port] fix all of this, it's a mess @Override @OnlyIn(Dist.CLIENT) public void displayHud(MatrixStack matrices, Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult rayCast, MainWindow resolution) { - TileEntity tile = minecraft.world.getTileEntity(rayCast.getBlockPos()); + if (!(rayCast instanceof BlockRayTraceResult)) { + return; + } + BlockPos pos = ((BlockRayTraceResult) rayCast).getPos(); + TileEntity tile = minecraft.world.getTileEntity(pos); if (tile != null) { if (tile instanceof IPhantomTile) { IPhantomTile phantom = (IPhantomTile) tile; - minecraft.fontRenderer.drawStringWithShadow(TextFormatting.GOLD + StringUtil.localize("tooltip." + ActuallyAdditions.MODID + ".blockPhantomRange.desc") + ": " + phantom.getRange(), resolution.getScaledWidth() / 2 + 5, resolution.getScaledHeight() / 2 - 40, StringUtil.DECIMAL_COLOR_WHITE); + minecraft.fontRenderer.drawStringWithShadow(matrices, TextFormatting.GOLD + StringUtil.localize("tooltip." + ActuallyAdditions.MODID + ".blockPhantomRange.desc") + ": " + phantom.getRange(), resolution.getScaledWidth() / 2 + 5, resolution.getScaledHeight() / 2 - 40, StringUtil.DECIMAL_COLOR_WHITE); if (phantom.hasBoundPosition()) { - int distance = MathHelper.ceil(new Vec3d(rayCast.getBlockPos()).distanceTo(new Vec3d(phantom.getBoundPosition()))); + int distance = MathHelper.ceil(new Vector3d(pos.getX(), pos.getY(), pos.getZ()).distanceTo(new Vector3d(phantom.getBoundPosition().getX(), phantom.getBoundPosition().getY(), phantom.getBoundPosition().getZ()))); BlockState state = minecraft.world.getBlockState(phantom.getBoundPosition()); Block block = state.getBlock(); Item item = Item.getItemFromBlock(block); - String name = item == null - ? "Something Unrecognizable" - : item.getItemStackDisplayName(new ItemStack(block, 1, block.getMetaFromState(state))); + String name = item.getDisplayName(new ItemStack(block)).getString(); StringUtil.drawSplitString(minecraft.fontRenderer, StringUtil.localizeFormatted("tooltip." + ActuallyAdditions.MODID + ".phantom.blockInfo.desc", name, phantom.getBoundPosition().getX(), phantom.getBoundPosition().getY(), phantom.getBoundPosition().getZ(), distance), resolution.getScaledWidth() / 2 + 5, resolution.getScaledHeight() / 2 - 30, 200, StringUtil.DECIMAL_COLOR_WHITE, true); if (phantom.isBoundThingInRange()) { @@ -144,7 +145,7 @@ public class BlockPhantom extends BlockContainerBase implements IHudDisplay { StringUtil.drawSplitString(minecraft.fontRenderer, TextFormatting.DARK_RED + StringUtil.localize("tooltip." + ActuallyAdditions.MODID + ".phantom.connectedNoRange.desc"), resolution.getScaledWidth() / 2 + 5, resolution.getScaledHeight() / 2 + 25, 200, StringUtil.DECIMAL_COLOR_WHITE, true); } } else { - minecraft.fontRenderer.drawStringWithShadow(TextFormatting.RED + StringUtil.localize("tooltip." + ActuallyAdditions.MODID + ".phantom.notConnected.desc"), resolution.getScaledWidth() / 2 + 5, resolution.getScaledHeight() / 2 + 25, StringUtil.DECIMAL_COLOR_WHITE); + minecraft.fontRenderer.drawStringWithShadow(matrices, TextFormatting.RED + StringUtil.localize("tooltip." + ActuallyAdditions.MODID + ".phantom.notConnected.desc"), resolution.getScaledWidth() / 2 + 5, resolution.getScaledHeight() / 2 + 25, StringUtil.DECIMAL_COLOR_WHITE); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantomBooster.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantomBooster.java index cb1a43b61..3ead08a2f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantomBooster.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantomBooster.java @@ -12,50 +12,26 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomBooster; -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.ItemStack; +import net.minecraft.block.BlockState; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.world.IBlockReader; public class BlockPhantomBooster extends BlockContainerBase { - private static final AxisAlignedBB AABB = new AxisAlignedBB(2 * 0.0625, 0, 2 * 0.0625, 1 - 2 * 0.0625, 1, 1 - 2 * 0.0625); - public BlockPhantomBooster() { - super(Material.ROCK, this.name); - this.setHarvestLevel("pickaxe", 0); - this.setHardness(1.5F); - this.setResistance(10.0F); - this.setSoundType(SoundType.STONE); + super(ActuallyBlocks.defaultPickProps(0)); } @Override - public AxisAlignedBB getBoundingBox(BlockState state, IBlockAccess source, BlockPos pos) { - return AABB; - } - - @Override - public boolean isFullCube(BlockState state) { - return false; - } - - @Override - public boolean isOpaqueCube(BlockState state) { - return false; - } - - @Override - public EnumRarity getRarity(ItemStack stack) { - return EnumRarity.EPIC; - } - - @Override - public TileEntity createNewTileEntity(World world, int i) { + public TileEntity createNewTileEntity(IBlockReader world) { return new TileEntityPhantomBooster(); } + + @Override + public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + return Shapes.BOOSTER_SHAPE; + } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPlayerInterface.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPlayerInterface.java index 6b1da55e2..446b5c9e6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPlayerInterface.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPlayerInterface.java @@ -14,30 +14,28 @@ import com.mojang.blaze3d.matrix.MatrixStack; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityPlayerInterface; import de.ellpeck.actuallyadditions.mod.util.StringUtil; -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; +import net.minecraft.block.BlockState; import net.minecraft.client.MainWindow; import net.minecraft.client.Minecraft; -import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.LivingEntity; import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.util.math.RayTraceResult; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.util.math.shapes.VoxelShape; import net.minecraft.util.text.TextFormatting; +import net.minecraft.world.IBlockReader; import net.minecraft.world.World; import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; public class BlockPlayerInterface extends BlockContainerBase implements IHudDisplay { - public BlockPlayerInterface() { - super(Material.ROCK, this.name); - this.setHarvestLevel("pickaxe", 0); - this.setHardness(4.5F); - this.setResistance(10.0F); - this.setSoundType(SoundType.STONE); + super(ActuallyBlocks.defaultPickProps(0, 4.5F, 10.0F)); } @Override @@ -46,18 +44,13 @@ public class BlockPlayerInterface extends BlockContainerBase implements IHudDisp } @Override - public EnumRarity getRarity(ItemStack stack) { - return EnumRarity.EPIC; - } - - @Override - public void onBlockPlacedBy(World world, BlockPos pos, BlockState state, EntityLivingBase player, ItemStack stack) { + public void onBlockPlacedBy(World world, BlockPos pos, BlockState state, LivingEntity player, ItemStack stack) { TileEntity tile = world.getTileEntity(pos); if (tile instanceof TileEntityPlayerInterface) { TileEntityPlayerInterface face = (TileEntityPlayerInterface) tile; if (face.connectedPlayer == null) { face.connectedPlayer = player.getUniqueID(); - face.playerName = player.getName(); + face.playerName = player.getName().getString(); face.markDirty(); face.sendUpdate(); } @@ -69,16 +62,25 @@ public class BlockPlayerInterface extends BlockContainerBase implements IHudDisp @Override @OnlyIn(Dist.CLIENT) public void displayHud(MatrixStack matrices, Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult rayCast, MainWindow resolution) { - TileEntity tile = minecraft.world.getTileEntity(rayCast.getBlockPos()); + if (!(rayCast instanceof BlockRayTraceResult)) { + return; + } + + TileEntity tile = minecraft.world.getTileEntity(((BlockRayTraceResult) rayCast).getPos()); if (tile != null) { if (tile instanceof TileEntityPlayerInterface) { TileEntityPlayerInterface face = (TileEntityPlayerInterface) tile; String name = face.playerName == null ? "Unknown" : face.playerName; - minecraft.fontRenderer.drawStringWithShadow("Bound to: " + TextFormatting.RED + name, resolution.getScaledWidth() / 2 + 5, resolution.getScaledHeight() / 2 + 5, StringUtil.DECIMAL_COLOR_WHITE); - minecraft.fontRenderer.drawStringWithShadow("UUID: " + TextFormatting.DARK_GREEN + face.connectedPlayer, resolution.getScaledWidth() / 2 + 5, resolution.getScaledHeight() / 2 + 15, StringUtil.DECIMAL_COLOR_WHITE); + minecraft.fontRenderer.drawStringWithShadow(matrices, "Bound to: " + TextFormatting.RED + name, resolution.getScaledWidth() / 2f + 5, resolution.getScaledHeight() / 2f + 5, StringUtil.DECIMAL_COLOR_WHITE); + minecraft.fontRenderer.drawStringWithShadow(matrices, "UUID: " + TextFormatting.DARK_GREEN + face.connectedPlayer, resolution.getScaledWidth() / 2f + 5, resolution.getScaledHeight() / 2f + 15, StringUtil.DECIMAL_COLOR_WHITE); } } } + + @Override + public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + return Shapes.PLAYER_INTERFACE_SHAPE; + } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockRangedCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockRangedCollector.java index 94ea6f0df..9d45a4ec7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockRangedCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockRangedCollector.java @@ -10,28 +10,24 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; -import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.tile.TileEntityRangedCollector; -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; +import net.minecraft.block.BlockState; import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ActionResultType; import net.minecraft.util.Hand; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockRayTraceResult; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.world.IBlockReader; import net.minecraft.world.World; public class BlockRangedCollector extends BlockContainerBase { public BlockRangedCollector() { - super(Material.ROCK, this.name); - this.setHarvestLevel("pickaxe", 0); - this.setHardness(1.5F); - this.setResistance(10.0F); - this.setSoundType(SoundType.STONE); + super(ActuallyBlocks.defaultPickProps(0)); } @Override @@ -40,22 +36,16 @@ public class BlockRangedCollector extends BlockContainerBase { } @Override - public ActionResultType onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { + public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { if (this.tryToggleRedstone(world, pos, player)) { - return true; + return ActionResultType.PASS; } - if (!world.isRemote) { - TileEntityRangedCollector breaker = (TileEntityRangedCollector) world.getTileEntity(pos); - if (breaker != null) { - player.openGui(ActuallyAdditions.INSTANCE, GuiHandler.GuiTypes.RANGED_COLLECTOR.ordinal(), world, pos.getX(), pos.getY(), pos.getZ()); - } - return true; - } - return true; - } + return this.openGui(world, player, pos, TileEntityRangedCollector.class); + } + @Override - public EnumRarity getRarity(ItemStack stack) { - return EnumRarity.EPIC; + public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + return Shapes.COLLECTOR_SHAPE; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockShockSuppressor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockShockSuppressor.java index 3d297883e..a337ec522 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockShockSuppressor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockShockSuppressor.java @@ -12,17 +12,17 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityShockSuppressor; -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; +import net.minecraft.block.BlockState; import net.minecraft.entity.Entity; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.world.IBlockReader; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.world.ExplosionEvent; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; import java.util.ArrayList; import java.util.Collections; @@ -31,12 +31,7 @@ import java.util.List; public class BlockShockSuppressor extends BlockContainerBase { public BlockShockSuppressor() { - super(Material.ROCK, this.name); - this.setHarvestLevel("pickaxe", 0); - this.setHardness(20.0F); - this.setResistance(2000.0F); - this.setSoundType(SoundType.STONE); - + super(ActuallyBlocks.defaultPickProps(0, 20F, 2000.0F)); MinecraftForge.EVENT_BUS.register(this); } @@ -63,7 +58,7 @@ public class BlockShockSuppressor extends BlockContainerBase { } } for (Entity entity : affectedEntities) { - if (entity.getPositionVector().squareDistanceTo(supPos.getX(), supPos.getY(), supPos.getZ()) <= rangeSq) { + if (entity.getPositionVec().squareDistanceTo(supPos.getX(), supPos.getY(), supPos.getZ()) <= rangeSq) { entitiesToRemove.add(entity); } } @@ -93,12 +88,12 @@ public class BlockShockSuppressor extends BlockContainerBase { } @Override - public EnumRarity getRarity(ItemStack stack) { - return EnumRarity.EPIC; + public TileEntity createNewTileEntity(IBlockReader worldIn) { + return new TileEntityShockSuppressor(); } @Override - public TileEntity createNewTileEntity(World worldIn, int meta) { - return new TileEntityShockSuppressor(); + public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + return Shapes.SUPPRESSOR_SHAPE; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSlabs.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSlabs.java index abbe0ebf3..d7d8fcfe4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSlabs.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSlabs.java @@ -1,187 +1,187 @@ -/* - * This file ("BlockSlabs.java") is part of the Actually Additions mod for Minecraft. - * It is created and owned by Ellpeck and distributed - * under the Actually Additions License to be found at - * http://ellpeck.de/actaddlicense - * View the source code at https://github.com/Ellpeck/ActuallyAdditions - * - * © 2015-2017 Ellpeck - */ - -package de.ellpeck.actuallyadditions.mod.blocks; - -import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; -import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase; -import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.block.Block; -import net.minecraft.block.BlockSlab; -import net.minecraft.block.SoundType; -import net.minecraft.block.state.BlockStateContainer; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.ItemStack; -import net.minecraft.util.Direction; -import net.minecraft.util.EnumActionResult; -import net.minecraft.util.Hand; -import net.minecraft.util.SoundCategory; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - - -public class BlockSlabs extends BlockBase { - - public static final AxisAlignedBB AABB_BOTTOM_HALF = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.5D, 1.0D); - private static final AxisAlignedBB AABB_TOP_HALF = new AxisAlignedBB(0.0D, 0.5D, 0.0D, 1.0D, 1.0D, 1.0D); - - private final BlockState fullBlockState; - - public BlockSlabs(String name, Block fullBlock) { - this(name, fullBlock.getDefaultState()); - } - - public BlockSlabs(String name, BlockState fullBlockState) { - super(fullBlockState.getMaterial(), name); - this.setHardness(1.5F); - this.setResistance(10.0F); - this.fullBlockState = fullBlockState; - } - - @Override - public boolean isOpaqueCube(BlockState state) { - return false; - } - - @Override - public boolean isFullCube(BlockState state) { - return false; - } - - @Override - public BlockState getStateForPlacement(World world, BlockPos pos, Direction facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) { - if (facing.ordinal() == 1) { - return this.getStateFromMeta(meta); - } - if (facing.ordinal() == 0 || hitY >= 0.5F) { - return this.getStateFromMeta(meta + 1); - } - return this.getStateFromMeta(meta); - } - - @Override - public AxisAlignedBB getBoundingBox(BlockState state, IBlockAccess source, BlockPos pos) { - return state.getValue(BlockSlab.HALF) == BlockSlab.EnumBlockHalf.TOP - ? AABB_TOP_HALF - : AABB_BOTTOM_HALF; - } - - @Override - protected ItemBlockBase getItemBlock() { - return new TheItemBlock(this); - } - - @Override - public EnumRarity getRarity(ItemStack stack) { - return EnumRarity.COMMON; - } - - @Override - public BlockState getStateFromMeta(int meta) { - return this.getDefaultState().withProperty(BlockSlab.HALF, meta == 0 - ? BlockSlab.EnumBlockHalf.BOTTOM - : BlockSlab.EnumBlockHalf.TOP); - } - - @Override - public int getMetaFromState(BlockState state) { - return state.getValue(BlockSlab.HALF) == BlockSlab.EnumBlockHalf.BOTTOM - ? 0 - : 1; - } - - @Override - protected BlockStateContainer createBlockState() { - return new BlockStateContainer(this, BlockSlab.HALF); - } - - public static class TheItemBlock extends ItemBlockBase { - - public TheItemBlock(Block block) { - super(block); - this.setHasSubtypes(false); - this.setMaxDamage(0); - } - - @Override - public EnumActionResult onItemUse(PlayerEntity player, World world, BlockPos pos, Hand hand, Direction facing, float hitX, float hitY, float hitZ) { - ItemStack stack = player.getHeldItem(hand); - if (StackUtil.isValid(stack) && player.canPlayerEdit(pos.offset(facing), facing, stack)) { - BlockState state = world.getBlockState(pos); - - if (state.getBlock() == this.block) { - BlockSlabs theBlock = (BlockSlabs) this.block; - if (facing == Direction.UP && state.getValue(BlockSlab.HALF) == BlockSlab.EnumBlockHalf.BOTTOM || facing == Direction.DOWN && state.getValue(BlockSlab.HALF) == BlockSlab.EnumBlockHalf.TOP) { - BlockState newState = theBlock.fullBlockState; - AxisAlignedBB bound = newState.getCollisionBoundingBox(world, pos); - - if (bound != Block.NULL_AABB && world.checkNoEntityCollision(bound.offset(pos)) && world.setBlockState(pos, newState, 11)) { - SoundType soundtype = theBlock.fullBlockState.getBlock().getSoundType(theBlock.fullBlockState, world, pos, player); - world.playSound(player, pos, soundtype.getPlaceSound(), SoundCategory.BLOCKS, (soundtype.getVolume() + 1.0F) / 2.0F, soundtype.getPitch() * 0.8F); - player.setHeldItem(hand, StackUtil.shrink(stack, 1)); - } - - return EnumActionResult.SUCCESS; - } - } - - return this.tryPlace(player, stack, hand, world, pos.offset(facing)) - ? EnumActionResult.SUCCESS - : super.onItemUse(player, world, pos, hand, facing, hitX, hitY, hitZ); - } else { - return EnumActionResult.FAIL; - } - } - - @Override - @OnlyIn(Dist.CLIENT) - public boolean canPlaceBlockOnSide(World worldIn, BlockPos pos, Direction side, PlayerEntity player, ItemStack stack) { - BlockState state = worldIn.getBlockState(pos); - - if (state.getBlock() == this.block) { - if (side == Direction.UP && state.getValue(BlockSlab.HALF) == BlockSlab.EnumBlockHalf.BOTTOM || side == Direction.DOWN && state.getValue(BlockSlab.HALF) == BlockSlab.EnumBlockHalf.TOP) { - return true; - } - } - - return worldIn.getBlockState(pos.offset(side)).getBlock() == this.block || super.canPlaceBlockOnSide(worldIn, pos, side, player, stack); - } - - private boolean tryPlace(PlayerEntity player, ItemStack stack, Hand hand, World world, BlockPos pos) { - BlockState iblockstate = world.getBlockState(pos); - - if (iblockstate.getBlock() == this.block) { - BlockSlabs theBlock = (BlockSlabs) this.block; - BlockState newState = theBlock.fullBlockState; - AxisAlignedBB bound = newState.getCollisionBoundingBox(world, pos); - - if (bound != Block.NULL_AABB && world.checkNoEntityCollision(bound.offset(pos)) && world.setBlockState(pos, newState, 11)) { - SoundType soundtype = theBlock.fullBlockState.getBlock().getSoundType(theBlock.fullBlockState, world, pos, player); - world.playSound(player, pos, soundtype.getPlaceSound(), SoundCategory.BLOCKS, (soundtype.getVolume() + 1.0F) / 2.0F, soundtype.getPitch() * 0.8F); - - player.setHeldItem(hand, StackUtil.shrink(stack, 1)); - } - - return true; - } - - return false; - } - - @Override - public String getTranslationKey(ItemStack stack) { - return this.getTranslationKey(); - } - } -} +///* +// * This file ("BlockSlabs.java") is part of the Actually Additions mod for Minecraft. +// * It is created and owned by Ellpeck and distributed +// * under the Actually Additions License to be found at +// * http://ellpeck.de/actaddlicense +// * View the source code at https://github.com/Ellpeck/ActuallyAdditions +// * +// * © 2015-2017 Ellpeck +// */ +// +//package de.ellpeck.actuallyadditions.mod.blocks; +// +//import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; +//import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase; +//import de.ellpeck.actuallyadditions.mod.util.StackUtil; +//import net.minecraft.block.Block; +//import net.minecraft.block.BlockSlab; +//import net.minecraft.block.SoundType; +//import net.minecraft.block.state.BlockStateContainer; +//import net.minecraft.entity.EntityLivingBase; +//import net.minecraft.entity.player.PlayerEntity; +//import net.minecraft.item.EnumRarity; +//import net.minecraft.item.ItemStack; +//import net.minecraft.util.Direction; +//import net.minecraft.util.EnumActionResult; +//import net.minecraft.util.Hand; +//import net.minecraft.util.SoundCategory; +//import net.minecraft.util.math.AxisAlignedBB; +//import net.minecraft.util.math.BlockPos; +//import net.minecraft.world.IBlockAccess; +//import net.minecraft.world.World; +// +// +//public class BlockSlabs extends BlockBase { +// +// public static final AxisAlignedBB AABB_BOTTOM_HALF = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.5D, 1.0D); +// private static final AxisAlignedBB AABB_TOP_HALF = new AxisAlignedBB(0.0D, 0.5D, 0.0D, 1.0D, 1.0D, 1.0D); +// +// private final BlockState fullBlockState; +// +// public BlockSlabs(String name, Block fullBlock) { +// this(name, fullBlock.getDefaultState()); +// } +// +// public BlockSlabs(String name, BlockState fullBlockState) { +// super(fullBlockState.getMaterial(), name); +// this.setHardness(1.5F); +// this.setResistance(10.0F); +// this.fullBlockState = fullBlockState; +// } +// +// @Override +// public boolean isOpaqueCube(BlockState state) { +// return false; +// } +// +// @Override +// public boolean isFullCube(BlockState state) { +// return false; +// } +// +// @Override +// public BlockState getStateForPlacement(World world, BlockPos pos, Direction facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) { +// if (facing.ordinal() == 1) { +// return this.getStateFromMeta(meta); +// } +// if (facing.ordinal() == 0 || hitY >= 0.5F) { +// return this.getStateFromMeta(meta + 1); +// } +// return this.getStateFromMeta(meta); +// } +// +// @Override +// public AxisAlignedBB getBoundingBox(BlockState state, IBlockAccess source, BlockPos pos) { +// return state.getValue(BlockSlab.HALF) == BlockSlab.EnumBlockHalf.TOP +// ? AABB_TOP_HALF +// : AABB_BOTTOM_HALF; +// } +// +// @Override +// protected ItemBlockBase getItemBlock() { +// return new TheItemBlock(this); +// } +// +// @Override +// public EnumRarity getRarity(ItemStack stack) { +// return EnumRarity.COMMON; +// } +// +// @Override +// public BlockState getStateFromMeta(int meta) { +// return this.getDefaultState().withProperty(BlockSlab.HALF, meta == 0 +// ? BlockSlab.EnumBlockHalf.BOTTOM +// : BlockSlab.EnumBlockHalf.TOP); +// } +// +// @Override +// public int getMetaFromState(BlockState state) { +// return state.getValue(BlockSlab.HALF) == BlockSlab.EnumBlockHalf.BOTTOM +// ? 0 +// : 1; +// } +// +// @Override +// protected BlockStateContainer createBlockState() { +// return new BlockStateContainer(this, BlockSlab.HALF); +// } +// +// public static class TheItemBlock extends ItemBlockBase { +// +// public TheItemBlock(Block block) { +// super(block); +// this.setHasSubtypes(false); +// this.setMaxDamage(0); +// } +// +// @Override +// public EnumActionResult onItemUse(PlayerEntity player, World world, BlockPos pos, Hand hand, Direction facing, float hitX, float hitY, float hitZ) { +// ItemStack stack = player.getHeldItem(hand); +// if (StackUtil.isValid(stack) && player.canPlayerEdit(pos.offset(facing), facing, stack)) { +// BlockState state = world.getBlockState(pos); +// +// if (state.getBlock() == this.block) { +// BlockSlabs theBlock = (BlockSlabs) this.block; +// if (facing == Direction.UP && state.getValue(BlockSlab.HALF) == BlockSlab.EnumBlockHalf.BOTTOM || facing == Direction.DOWN && state.getValue(BlockSlab.HALF) == BlockSlab.EnumBlockHalf.TOP) { +// BlockState newState = theBlock.fullBlockState; +// AxisAlignedBB bound = newState.getCollisionBoundingBox(world, pos); +// +// if (bound != Block.NULL_AABB && world.checkNoEntityCollision(bound.offset(pos)) && world.setBlockState(pos, newState, 11)) { +// SoundType soundtype = theBlock.fullBlockState.getBlock().getSoundType(theBlock.fullBlockState, world, pos, player); +// world.playSound(player, pos, soundtype.getPlaceSound(), SoundCategory.BLOCKS, (soundtype.getVolume() + 1.0F) / 2.0F, soundtype.getPitch() * 0.8F); +// player.setHeldItem(hand, StackUtil.shrink(stack, 1)); +// } +// +// return EnumActionResult.SUCCESS; +// } +// } +// +// return this.tryPlace(player, stack, hand, world, pos.offset(facing)) +// ? EnumActionResult.SUCCESS +// : super.onItemUse(player, world, pos, hand, facing, hitX, hitY, hitZ); +// } else { +// return EnumActionResult.FAIL; +// } +// } +// +// @Override +// @OnlyIn(Dist.CLIENT) +// public boolean canPlaceBlockOnSide(World worldIn, BlockPos pos, Direction side, PlayerEntity player, ItemStack stack) { +// BlockState state = worldIn.getBlockState(pos); +// +// if (state.getBlock() == this.block) { +// if (side == Direction.UP && state.getValue(BlockSlab.HALF) == BlockSlab.EnumBlockHalf.BOTTOM || side == Direction.DOWN && state.getValue(BlockSlab.HALF) == BlockSlab.EnumBlockHalf.TOP) { +// return true; +// } +// } +// +// return worldIn.getBlockState(pos.offset(side)).getBlock() == this.block || super.canPlaceBlockOnSide(worldIn, pos, side, player, stack); +// } +// +// private boolean tryPlace(PlayerEntity player, ItemStack stack, Hand hand, World world, BlockPos pos) { +// BlockState iblockstate = world.getBlockState(pos); +// +// if (iblockstate.getBlock() == this.block) { +// BlockSlabs theBlock = (BlockSlabs) this.block; +// BlockState newState = theBlock.fullBlockState; +// AxisAlignedBB bound = newState.getCollisionBoundingBox(world, pos); +// +// if (bound != Block.NULL_AABB && world.checkNoEntityCollision(bound.offset(pos)) && world.setBlockState(pos, newState, 11)) { +// SoundType soundtype = theBlock.fullBlockState.getBlock().getSoundType(theBlock.fullBlockState, world, pos, player); +// world.playSound(player, pos, soundtype.getPlaceSound(), SoundCategory.BLOCKS, (soundtype.getVolume() + 1.0F) / 2.0F, soundtype.getPitch() * 0.8F); +// +// player.setHeldItem(hand, StackUtil.shrink(stack, 1)); +// } +// +// return true; +// } +// +// return false; +// } +// +// @Override +// public String getTranslationKey(ItemStack stack) { +// return this.getTranslationKey(); +// } +// } +//} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockTinyTorch.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockTinyTorch.java index da9fee499..13519b662 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockTinyTorch.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockTinyTorch.java @@ -11,24 +11,9 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; -import net.minecraft.block.Block; -import net.minecraft.block.BlockTorch; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; -import net.minecraft.block.state.BlockFaceShape; -import net.minecraft.block.state.BlockStateContainer; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.util.Direction; -import net.minecraft.util.Mirror; -import net.minecraft.util.Rotation; import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; -import net.minecraftforge.api.distmarker.Dist; - -import javax.annotation.Nullable; -import java.util.Random; //Copied from BlockTorch. //I have no idea what all of this means. @@ -43,230 +28,230 @@ public class BlockTinyTorch extends BlockBase { private static final AxisAlignedBB TORCH_EAST_AABB = new AxisAlignedBB(0.0D, 0.25D, 0.4375D, 0.1875D, 0.5625D, 0.5625D); public BlockTinyTorch() { - super(Material.CIRCUITS, name); - this.setDefaultState(this.blockState.getBaseState().withProperty(BlockTorch.FACING, Direction.UP)); - this.setTickRandomly(true); + super(Properties.create(Material.MISCELLANEOUS).sound(SoundType.WOOD).hardnessAndResistance(0.0F, 0.8F)); + // TorchBlock + // this.setDefaultState(this.blockState.getBaseState().withProperty(BlockTorch.FACING, Direction.UP)); + // this.setTickRandomly(true); - this.setHardness(0.0F); - this.setLightLevel(0.8F); - this.setSoundType(SoundType.WOOD); } - @Override - public AxisAlignedBB getBoundingBox(BlockState state, IBlockAccess source, BlockPos pos) { - switch (state.getValue(BlockTorch.FACING)) { - case EAST: - return TORCH_EAST_AABB; - case WEST: - return TORCH_WEST_AABB; - case SOUTH: - return TORCH_SOUTH_AABB; - case NORTH: - return TORCH_NORTH_AABB; - default: - return STANDING_AABB; - } - } - - @Nullable - @Override - public AxisAlignedBB getCollisionBoundingBox(BlockState blockState, IBlockAccess worldIn, BlockPos pos) { - return NULL_AABB; - } - - @Override - public boolean isOpaqueCube(BlockState state) { - return false; - } - - @Override - public boolean isFullCube(BlockState state) { - return false; - } - - @Override - public boolean isNormalCube(BlockState state) { - return false; - } - - @Override - public BlockFaceShape getBlockFaceShape(IBlockAccess world, BlockState state, BlockPos pos, Direction facing) { - return BlockFaceShape.UNDEFINED; - } - - private boolean canPlaceOn(World worldIn, BlockPos pos) { - BlockState state = worldIn.getBlockState(pos); - return state.isSideSolid(worldIn, pos, Direction.UP) || state.getBlock().canPlaceTorchOnTop(state, worldIn, pos); - } - - @Override - public boolean canPlaceBlockAt(World worldIn, BlockPos pos) { - for (Direction enumfacing : BlockTorch.FACING.getAllowedValues()) { - if (this.canPlaceAt(worldIn, pos, enumfacing)) { - return true; - } - } - - return false; - } - - private boolean canPlaceAt(World worldIn, BlockPos pos, Direction facing) { - BlockPos blockpos = pos.offset(facing.getOpposite()); - boolean flag = facing.getAxis().isHorizontal(); - return flag && worldIn.isSideSolid(blockpos, facing, true) || facing.equals(Direction.UP) && this.canPlaceOn(worldIn, blockpos); - } - - @Override - public BlockState getStateForPlacement(World worldIn, BlockPos pos, Direction facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) { - if (this.canPlaceAt(worldIn, pos, facing)) { - return this.getDefaultState().withProperty(BlockTorch.FACING, facing); - } else { - for (Direction enumfacing : Direction.Plane.HORIZONTAL) { - if (worldIn.isSideSolid(pos.offset(enumfacing.getOpposite()), enumfacing, true)) { - return this.getDefaultState().withProperty(BlockTorch.FACING, enumfacing); - } - } - - return this.getDefaultState(); - } - } - - @Override - public void onBlockAdded(World worldIn, BlockPos pos, BlockState state) { - this.checkForDrop(worldIn, pos, state); - } - - @Override - public void neighborChanged(BlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos otherPos) { - this.onNeighborChangeInternal(worldIn, pos, state); - } - - protected boolean onNeighborChangeInternal(World worldIn, BlockPos pos, BlockState state) { - if (!this.checkForDrop(worldIn, pos, state)) { - return true; - } else { - Direction enumfacing = state.getValue(BlockTorch.FACING); - Direction.Axis axis = enumfacing.getAxis(); - Direction enumfacing1 = enumfacing.getOpposite(); - boolean flag = false; - - if (axis.isHorizontal() && !worldIn.isSideSolid(pos.offset(enumfacing1), enumfacing, true)) { - flag = true; - } else if (axis.isVertical() && !this.canPlaceOn(worldIn, pos.offset(enumfacing1))) { - flag = true; - } - - if (flag) { - this.dropBlockAsItem(worldIn, pos, state, 0); - worldIn.setBlockState(pos, Blocks.AIR.getDefaultState()); - return true; - } else { - return false; - } - } - } - - protected boolean checkForDrop(World worldIn, BlockPos pos, BlockState state) { - if (state.getBlock() == this && this.canPlaceAt(worldIn, pos, state.getValue(BlockTorch.FACING))) { - return true; - } else { - if (worldIn.getBlockState(pos).getBlock() == this) { - this.dropBlockAsItem(worldIn, pos, state, 0); - worldIn.setBlockState(pos, Blocks.AIR.getDefaultState()); - } - - return false; - } - } - - @Override - @OnlyIn(Dist.CLIENT) - public void randomDisplayTick(BlockState stateIn, World worldIn, BlockPos pos, Random rand) { - if (rand.nextBoolean()) { - Direction enumfacing = stateIn.getValue(BlockTorch.FACING); - double d0 = pos.getX() + 0.5D; - double d1 = pos.getY() + 0.4D; - double d2 = pos.getZ() + 0.5D; - - if (enumfacing.getAxis().isHorizontal()) { - Direction enumfacing1 = enumfacing.getOpposite(); - worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 + 0.35D * enumfacing1.getXOffset(), d1 + 0.22D, d2 + 0.35D * enumfacing1.getZOffset(), 0.0D, 0.0D, 0.0D); - worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 + 0.35D * enumfacing1.getXOffset(), d1 + 0.22D, d2 + 0.35D * enumfacing1.getZOffset(), 0.0D, 0.0D, 0.0D); - } else { - worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0, d1, d2, 0.0D, 0.0D, 0.0D); - worldIn.spawnParticle(EnumParticleTypes.FLAME, d0, d1, d2, 0.0D, 0.0D, 0.0D); - } - } - } - - @Override - public BlockState getStateFromMeta(int meta) { - BlockState iblockstate = this.getDefaultState(); - - switch (meta) { - case 1: - iblockstate = iblockstate.withProperty(BlockTorch.FACING, Direction.EAST); - break; - case 2: - iblockstate = iblockstate.withProperty(BlockTorch.FACING, Direction.WEST); - break; - case 3: - iblockstate = iblockstate.withProperty(BlockTorch.FACING, Direction.SOUTH); - break; - case 4: - iblockstate = iblockstate.withProperty(BlockTorch.FACING, Direction.NORTH); - break; - case 5: - default: - iblockstate = iblockstate.withProperty(BlockTorch.FACING, Direction.UP); - } - - return iblockstate; - } - - @Override - public BlockRenderLayer getRenderLayer() { - return BlockRenderLayer.CUTOUT; - } - - @Override - public int getMetaFromState(BlockState state) { - int i = 0; - - switch (state.getValue(BlockTorch.FACING)) { - case EAST: - i = i | 1; - break; - case WEST: - i = i | 2; - break; - case SOUTH: - i = i | 3; - break; - case NORTH: - i = i | 4; - break; - case DOWN: - case UP: - default: - i = i | 5; - } - - return i; - } - - @Override - public BlockState withRotation(BlockState state, Rotation rot) { - return state.withProperty(BlockTorch.FACING, rot.rotate(state.getValue(BlockTorch.FACING))); - } - - @Override - public BlockState withMirror(BlockState state, Mirror mirrorIn) { - return state.withRotation(mirrorIn.toRotation(state.getValue(BlockTorch.FACING))); - } - - @Override - protected BlockStateContainer createBlockState() { - return new BlockStateContainer(this, BlockTorch.FACING); - } + // TODO: [port] add back + // + // @Override + // public AxisAlignedBB getBoundingBox(BlockState state, IBlockAccess source, BlockPos pos) { + // switch (state.getValue(BlockTorch.FACING)) { + // case EAST: + // return TORCH_EAST_AABB; + // case WEST: + // return TORCH_WEST_AABB; + // case SOUTH: + // return TORCH_SOUTH_AABB; + // case NORTH: + // return TORCH_NORTH_AABB; + // default: + // return STANDING_AABB; + // } + // } + // + // @Nullable + // @Override + // public AxisAlignedBB getCollisionBoundingBox(BlockState blockState, IBlockAccess worldIn, BlockPos pos) { + // return NULL_AABB; + // } + // + // @Override + // public boolean isOpaqueCube(BlockState state) { + // return false; + // } + // + // @Override + // public boolean isFullCube(BlockState state) { + // return false; + // } + // + // @Override + // public boolean isNormalCube(BlockState state) { + // return false; + // } + // + // @Override + // public BlockFaceShape getBlockFaceShape(IBlockAccess world, BlockState state, BlockPos pos, Direction facing) { + // return BlockFaceShape.UNDEFINED; + // } + // + // private boolean canPlaceOn(World worldIn, BlockPos pos) { + // BlockState state = worldIn.getBlockState(pos); + // return state.isSideSolid(worldIn, pos, Direction.UP) || state.getBlock().canPlaceTorchOnTop(state, worldIn, pos); + // } + // + // @Override + // public boolean canPlaceBlockAt(World worldIn, BlockPos pos) { + // for (Direction enumfacing : BlockTorch.FACING.getAllowedValues()) { + // if (this.canPlaceAt(worldIn, pos, enumfacing)) { + // return true; + // } + // } + // + // return false; + // } + // + // private boolean canPlaceAt(World worldIn, BlockPos pos, Direction facing) { + // BlockPos blockpos = pos.offset(facing.getOpposite()); + // boolean flag = facing.getAxis().isHorizontal(); + // return flag && worldIn.isSideSolid(blockpos, facing, true) || facing.equals(Direction.UP) && this.canPlaceOn(worldIn, blockpos); + // } + // + // @Override + // public BlockState getStateForPlacement(World worldIn, BlockPos pos, Direction facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) { + // if (this.canPlaceAt(worldIn, pos, facing)) { + // return this.getDefaultState().withProperty(BlockTorch.FACING, facing); + // } else { + // for (Direction enumfacing : Direction.Plane.HORIZONTAL) { + // if (worldIn.isSideSolid(pos.offset(enumfacing.getOpposite()), enumfacing, true)) { + // return this.getDefaultState().withProperty(BlockTorch.FACING, enumfacing); + // } + // } + // + // return this.getDefaultState(); + // } + // } + // + // @Override + // public void onBlockAdded(World worldIn, BlockPos pos, BlockState state) { + // this.checkForDrop(worldIn, pos, state); + // } + // + // @Override + // public void neighborChanged(BlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos otherPos) { + // this.onNeighborChangeInternal(worldIn, pos, state); + // } + // + // protected boolean onNeighborChangeInternal(World worldIn, BlockPos pos, BlockState state) { + // if (!this.checkForDrop(worldIn, pos, state)) { + // return true; + // } else { + // Direction enumfacing = state.getValue(BlockTorch.FACING); + // Direction.Axis axis = enumfacing.getAxis(); + // Direction enumfacing1 = enumfacing.getOpposite(); + // boolean flag = false; + // + // if (axis.isHorizontal() && !worldIn.isSideSolid(pos.offset(enumfacing1), enumfacing, true)) { + // flag = true; + // } else if (axis.isVertical() && !this.canPlaceOn(worldIn, pos.offset(enumfacing1))) { + // flag = true; + // } + // + // if (flag) { + // this.dropBlockAsItem(worldIn, pos, state, 0); + // worldIn.setBlockState(pos, Blocks.AIR.getDefaultState()); + // return true; + // } else { + // return false; + // } + // } + // } + // + // protected boolean checkForDrop(World worldIn, BlockPos pos, BlockState state) { + // if (state.getBlock() == this && this.canPlaceAt(worldIn, pos, state.getValue(BlockTorch.FACING))) { + // return true; + // } else { + // if (worldIn.getBlockState(pos).getBlock() == this) { + // this.dropBlockAsItem(worldIn, pos, state, 0); + // worldIn.setBlockState(pos, Blocks.AIR.getDefaultState()); + // } + // + // return false; + // } + // } + // + // @Override + // @OnlyIn(Dist.CLIENT) + // public void randomDisplayTick(BlockState stateIn, World worldIn, BlockPos pos, Random rand) { + // if (rand.nextBoolean()) { + // Direction enumfacing = stateIn.getValue(BlockTorch.FACING); + // double d0 = pos.getX() + 0.5D; + // double d1 = pos.getY() + 0.4D; + // double d2 = pos.getZ() + 0.5D; + // + // if (enumfacing.getAxis().isHorizontal()) { + // Direction enumfacing1 = enumfacing.getOpposite(); + // worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 + 0.35D * enumfacing1.getXOffset(), d1 + 0.22D, d2 + 0.35D * enumfacing1.getZOffset(), 0.0D, 0.0D, 0.0D); + // worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 + 0.35D * enumfacing1.getXOffset(), d1 + 0.22D, d2 + 0.35D * enumfacing1.getZOffset(), 0.0D, 0.0D, 0.0D); + // } else { + // worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0, d1, d2, 0.0D, 0.0D, 0.0D); + // worldIn.spawnParticle(EnumParticleTypes.FLAME, d0, d1, d2, 0.0D, 0.0D, 0.0D); + // } + // } + // } + // + // @Override + // public BlockState getStateFromMeta(int meta) { + // BlockState iblockstate = this.getDefaultState(); + // + // switch (meta) { + // case 1: + // iblockstate = iblockstate.withProperty(BlockTorch.FACING, Direction.EAST); + // break; + // case 2: + // iblockstate = iblockstate.withProperty(BlockTorch.FACING, Direction.WEST); + // break; + // case 3: + // iblockstate = iblockstate.withProperty(BlockTorch.FACING, Direction.SOUTH); + // break; + // case 4: + // iblockstate = iblockstate.withProperty(BlockTorch.FACING, Direction.NORTH); + // break; + // case 5: + // default: + // iblockstate = iblockstate.withProperty(BlockTorch.FACING, Direction.UP); + // } + // + // return iblockstate; + // } + // + // @Override + // public BlockRenderLayer getRenderLayer() { + // return BlockRenderLayer.CUTOUT; + // } + // + // @Override + // public int getMetaFromState(BlockState state) { + // int i = 0; + // + // switch (state.getValue(BlockTorch.FACING)) { + // case EAST: + // i = i | 1; + // break; + // case WEST: + // i = i | 2; + // break; + // case SOUTH: + // i = i | 3; + // break; + // case NORTH: + // i = i | 4; + // break; + // case DOWN: + // case UP: + // default: + // i = i | 5; + // } + // + // return i; + // } + // + // @Override + // public BlockState withRotation(BlockState state, Rotation rot) { + // return state.withProperty(BlockTorch.FACING, rot.rotate(state.getValue(BlockTorch.FACING))); + // } + // + // @Override + // public BlockState withMirror(BlockState state, Mirror mirrorIn) { + // return state.withRotation(mirrorIn.toRotation(state.getValue(BlockTorch.FACING))); + // } + // + // @Override + // protected BlockStateContainer createBlockState() { + // return new BlockStateContainer(this, BlockTorch.FACING); + // } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWallAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWallAA.java index 5d7ec6e1d..ef0568250 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWallAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWallAA.java @@ -1,136 +1,136 @@ -/* - * This file ("BlockWallAA.java") is part of the Actually Additions mod for Minecraft. - * It is created and owned by Ellpeck and distributed - * under the Actually Additions License to be found at - * http://ellpeck.de/actaddlicense - * View the source code at https://github.com/Ellpeck/ActuallyAdditions - * - * © 2015-2017 Ellpeck - */ - -package de.ellpeck.actuallyadditions.mod.blocks; - -import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; -import net.minecraft.block.Block; -import net.minecraft.block.BlockFenceGate; -import net.minecraft.block.BlockWall; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.BlockStateContainer; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.util.Direction; -import net.minecraft.util.NonNullList; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; -import net.minecraftforge.api.distmarker.Dist; - - -public class BlockWallAA extends BlockBase { - - protected static final AxisAlignedBB[] AABB_BY_INDEX = new AxisAlignedBB[]{new AxisAlignedBB(0.25D, 0.0D, 0.25D, 0.75D, 1.0D, 0.75D), new AxisAlignedBB(0.25D, 0.0D, 0.25D, 0.75D, 1.0D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.25D, 0.75D, 1.0D, 0.75D), new AxisAlignedBB(0.0D, 0.0D, 0.25D, 0.75D, 1.0D, 1.0D), new AxisAlignedBB(0.25D, 0.0D, 0.0D, 0.75D, 1.0D, 0.75D), new AxisAlignedBB(0.3125D, 0.0D, 0.0D, 0.6875D, 0.875D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.75D, 1.0D, 0.75D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.75D, 1.0D, 1.0D), new AxisAlignedBB(0.25D, 0.0D, 0.25D, 1.0D, 1.0D, 0.75D), new AxisAlignedBB(0.25D, 0.0D, 0.25D, 1.0D, 1.0D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.3125D, 1.0D, 0.875D, 0.6875D), new AxisAlignedBB(0.0D, 0.0D, 0.25D, 1.0D, 1.0D, 1.0D), new AxisAlignedBB(0.25D, 0.0D, 0.0D, 1.0D, 1.0D, 0.75D), new AxisAlignedBB(0.25D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 0.75D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D)}; - protected static final AxisAlignedBB[] CLIP_AABB_BY_INDEX = new AxisAlignedBB[]{AABB_BY_INDEX[0].setMaxY(1.5D), AABB_BY_INDEX[1].setMaxY(1.5D), AABB_BY_INDEX[2].setMaxY(1.5D), AABB_BY_INDEX[3].setMaxY(1.5D), AABB_BY_INDEX[4].setMaxY(1.5D), AABB_BY_INDEX[5].setMaxY(1.5D), AABB_BY_INDEX[6].setMaxY(1.5D), AABB_BY_INDEX[7].setMaxY(1.5D), AABB_BY_INDEX[8].setMaxY(1.5D), AABB_BY_INDEX[9].setMaxY(1.5D), AABB_BY_INDEX[10].setMaxY(1.5D), AABB_BY_INDEX[11].setMaxY(1.5D), AABB_BY_INDEX[12].setMaxY(1.5D), AABB_BY_INDEX[13].setMaxY(1.5D), AABB_BY_INDEX[14].setMaxY(1.5D), AABB_BY_INDEX[15].setMaxY(1.5D)}; - - @SuppressWarnings("deprecation") - public BlockWallAA(Block blocc) { - super(blocc.getDefaultState().getMaterial(), name); - this.setHardness(1.5F); - this.setResistance(10F); - this.setSoundType(blocc.getSoundType()); - this.setDefaultState(this.blockState.getBaseState().withProperty(BlockWall.UP, false).withProperty(BlockWall.NORTH, false).withProperty(BlockWall.EAST, false).withProperty(BlockWall.SOUTH, false).withProperty(BlockWall.WEST, false)); - } - - private static int yesThisIsCopyPastedFromBlockWallAndIHaveNoIdeaWhatThisMethodDoes(BlockState state) { - int i = 0; - - if (state.getValue(BlockWall.NORTH)) { - i |= 1 << Direction.NORTH.getHorizontalIndex(); - } - - if (state.getValue(BlockWall.EAST)) { - i |= 1 << Direction.EAST.getHorizontalIndex(); - } - - if (state.getValue(BlockWall.SOUTH)) { - i |= 1 << Direction.SOUTH.getHorizontalIndex(); - } - - if (state.getValue(BlockWall.WEST)) { - i |= 1 << Direction.WEST.getHorizontalIndex(); - } - - return i; - } - - @Override - public BlockState getActualState(BlockState state, IBlockAccess worldIn, BlockPos pos) { - boolean flag = this.canConnectTo(worldIn, pos.north()); - boolean flag1 = this.canConnectTo(worldIn, pos.east()); - boolean flag2 = this.canConnectTo(worldIn, pos.south()); - boolean flag3 = this.canConnectTo(worldIn, pos.west()); - boolean flag4 = flag && !flag1 && flag2 && !flag3 || !flag && flag1 && !flag2 && flag3; - return state.withProperty(BlockWall.UP, !flag4 || !worldIn.isAirBlock(pos.up())).withProperty(BlockWall.NORTH, flag).withProperty(BlockWall.EAST, flag1).withProperty(BlockWall.SOUTH, flag2).withProperty(BlockWall.WEST, flag3); - } - - @Override - public boolean isFullCube(BlockState state) { - return false; - } - - @Override - public boolean isPassable(IBlockAccess worldIn, BlockPos pos) { - return false; - } - - @Override - @OnlyIn(Dist.CLIENT) - @Deprecated - public boolean shouldSideBeRendered(BlockState blockState, IBlockAccess blockAccess, BlockPos pos, Direction side) { - return side != Direction.DOWN || super.shouldSideBeRendered(blockState, blockAccess, pos, side); - } - - @Override - public AxisAlignedBB getBoundingBox(BlockState state, IBlockAccess source, BlockPos pos) { - state = this.getActualState(state, source, pos); - return AABB_BY_INDEX[yesThisIsCopyPastedFromBlockWallAndIHaveNoIdeaWhatThisMethodDoes(state)]; - } - - @Override - public AxisAlignedBB getCollisionBoundingBox(BlockState blockState, IBlockAccess worldIn, BlockPos pos) { - blockState = this.getActualState(blockState, worldIn, pos); - return CLIP_AABB_BY_INDEX[yesThisIsCopyPastedFromBlockWallAndIHaveNoIdeaWhatThisMethodDoes(blockState)]; - } - - @Override - public boolean isOpaqueCube(BlockState state) { - return false; - } - - @Override - @OnlyIn(Dist.CLIENT) - public void getSubBlocks(CreativeTabs tab, NonNullList list) { - list.add(new ItemStack(this, 1, 0)); - } - - public boolean canConnectTo(IBlockAccess worldIn, BlockPos pos) { - BlockState state = worldIn.getBlockState(pos); - Block block = state.getBlock(); - return block != Blocks.BARRIER && (!(block != this && !(block instanceof BlockFenceGate)) || state.getMaterial().isOpaque() && state.isFullCube() && state.getMaterial() != Material.GOURD); - } - - @Override - public BlockState getStateFromMeta(int meta) { - return this.getDefaultState(); - } - - @Override - public int getMetaFromState(BlockState state) { - return 0; - } - - @Override - protected BlockStateContainer createBlockState() { - return new BlockStateContainer(this, BlockWall.UP, BlockWall.NORTH, BlockWall.EAST, BlockWall.WEST, BlockWall.SOUTH); - } -} +///* +// * This file ("BlockWallAA.java") is part of the Actually Additions mod for Minecraft. +// * It is created and owned by Ellpeck and distributed +// * under the Actually Additions License to be found at +// * http://ellpeck.de/actaddlicense +// * View the source code at https://github.com/Ellpeck/ActuallyAdditions +// * +// * © 2015-2017 Ellpeck +// */ +// +//package de.ellpeck.actuallyadditions.mod.blocks; +// +//import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; +//import net.minecraft.block.Block; +//import net.minecraft.block.BlockFenceGate; +//import net.minecraft.block.BlockWall; +//import net.minecraft.block.material.Material; +//import net.minecraft.block.state.BlockStateContainer; +//import net.minecraft.creativetab.CreativeTabs; +//import net.minecraft.init.Blocks; +//import net.minecraft.item.ItemStack; +//import net.minecraft.util.Direction; +//import net.minecraft.util.NonNullList; +//import net.minecraft.util.math.AxisAlignedBB; +//import net.minecraft.util.math.BlockPos; +//import net.minecraft.world.IBlockAccess; +//import net.minecraftforge.api.distmarker.Dist; +// +// +//public class BlockWallAA extends BlockBase { +// +// protected static final AxisAlignedBB[] AABB_BY_INDEX = new AxisAlignedBB[]{new AxisAlignedBB(0.25D, 0.0D, 0.25D, 0.75D, 1.0D, 0.75D), new AxisAlignedBB(0.25D, 0.0D, 0.25D, 0.75D, 1.0D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.25D, 0.75D, 1.0D, 0.75D), new AxisAlignedBB(0.0D, 0.0D, 0.25D, 0.75D, 1.0D, 1.0D), new AxisAlignedBB(0.25D, 0.0D, 0.0D, 0.75D, 1.0D, 0.75D), new AxisAlignedBB(0.3125D, 0.0D, 0.0D, 0.6875D, 0.875D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.75D, 1.0D, 0.75D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.75D, 1.0D, 1.0D), new AxisAlignedBB(0.25D, 0.0D, 0.25D, 1.0D, 1.0D, 0.75D), new AxisAlignedBB(0.25D, 0.0D, 0.25D, 1.0D, 1.0D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.3125D, 1.0D, 0.875D, 0.6875D), new AxisAlignedBB(0.0D, 0.0D, 0.25D, 1.0D, 1.0D, 1.0D), new AxisAlignedBB(0.25D, 0.0D, 0.0D, 1.0D, 1.0D, 0.75D), new AxisAlignedBB(0.25D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 0.75D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D)}; +// protected static final AxisAlignedBB[] CLIP_AABB_BY_INDEX = new AxisAlignedBB[]{AABB_BY_INDEX[0].setMaxY(1.5D), AABB_BY_INDEX[1].setMaxY(1.5D), AABB_BY_INDEX[2].setMaxY(1.5D), AABB_BY_INDEX[3].setMaxY(1.5D), AABB_BY_INDEX[4].setMaxY(1.5D), AABB_BY_INDEX[5].setMaxY(1.5D), AABB_BY_INDEX[6].setMaxY(1.5D), AABB_BY_INDEX[7].setMaxY(1.5D), AABB_BY_INDEX[8].setMaxY(1.5D), AABB_BY_INDEX[9].setMaxY(1.5D), AABB_BY_INDEX[10].setMaxY(1.5D), AABB_BY_INDEX[11].setMaxY(1.5D), AABB_BY_INDEX[12].setMaxY(1.5D), AABB_BY_INDEX[13].setMaxY(1.5D), AABB_BY_INDEX[14].setMaxY(1.5D), AABB_BY_INDEX[15].setMaxY(1.5D)}; +// +// @SuppressWarnings("deprecation") +// public BlockWallAA(Block blocc) { +// super(blocc.getDefaultState().getMaterial(), name); +// this.setHardness(1.5F); +// this.setResistance(10F); +// this.setSoundType(blocc.getSoundType()); +// this.setDefaultState(this.blockState.getBaseState().withProperty(BlockWall.UP, false).withProperty(BlockWall.NORTH, false).withProperty(BlockWall.EAST, false).withProperty(BlockWall.SOUTH, false).withProperty(BlockWall.WEST, false)); +// } +// +// private static int yesThisIsCopyPastedFromBlockWallAndIHaveNoIdeaWhatThisMethodDoes(BlockState state) { +// int i = 0; +// +// if (state.getValue(BlockWall.NORTH)) { +// i |= 1 << Direction.NORTH.getHorizontalIndex(); +// } +// +// if (state.getValue(BlockWall.EAST)) { +// i |= 1 << Direction.EAST.getHorizontalIndex(); +// } +// +// if (state.getValue(BlockWall.SOUTH)) { +// i |= 1 << Direction.SOUTH.getHorizontalIndex(); +// } +// +// if (state.getValue(BlockWall.WEST)) { +// i |= 1 << Direction.WEST.getHorizontalIndex(); +// } +// +// return i; +// } +// +// @Override +// public BlockState getActualState(BlockState state, IBlockAccess worldIn, BlockPos pos) { +// boolean flag = this.canConnectTo(worldIn, pos.north()); +// boolean flag1 = this.canConnectTo(worldIn, pos.east()); +// boolean flag2 = this.canConnectTo(worldIn, pos.south()); +// boolean flag3 = this.canConnectTo(worldIn, pos.west()); +// boolean flag4 = flag && !flag1 && flag2 && !flag3 || !flag && flag1 && !flag2 && flag3; +// return state.withProperty(BlockWall.UP, !flag4 || !worldIn.isAirBlock(pos.up())).withProperty(BlockWall.NORTH, flag).withProperty(BlockWall.EAST, flag1).withProperty(BlockWall.SOUTH, flag2).withProperty(BlockWall.WEST, flag3); +// } +// +// @Override +// public boolean isFullCube(BlockState state) { +// return false; +// } +// +// @Override +// public boolean isPassable(IBlockAccess worldIn, BlockPos pos) { +// return false; +// } +// +// @Override +// @OnlyIn(Dist.CLIENT) +// @Deprecated +// public boolean shouldSideBeRendered(BlockState blockState, IBlockAccess blockAccess, BlockPos pos, Direction side) { +// return side != Direction.DOWN || super.shouldSideBeRendered(blockState, blockAccess, pos, side); +// } +// +// @Override +// public AxisAlignedBB getBoundingBox(BlockState state, IBlockAccess source, BlockPos pos) { +// state = this.getActualState(state, source, pos); +// return AABB_BY_INDEX[yesThisIsCopyPastedFromBlockWallAndIHaveNoIdeaWhatThisMethodDoes(state)]; +// } +// +// @Override +// public AxisAlignedBB getCollisionBoundingBox(BlockState blockState, IBlockAccess worldIn, BlockPos pos) { +// blockState = this.getActualState(blockState, worldIn, pos); +// return CLIP_AABB_BY_INDEX[yesThisIsCopyPastedFromBlockWallAndIHaveNoIdeaWhatThisMethodDoes(blockState)]; +// } +// +// @Override +// public boolean isOpaqueCube(BlockState state) { +// return false; +// } +// +// @Override +// @OnlyIn(Dist.CLIENT) +// public void getSubBlocks(CreativeTabs tab, NonNullList list) { +// list.add(new ItemStack(this, 1, 0)); +// } +// +// public boolean canConnectTo(IBlockAccess worldIn, BlockPos pos) { +// BlockState state = worldIn.getBlockState(pos); +// Block block = state.getBlock(); +// return block != Blocks.BARRIER && (!(block != this && !(block instanceof BlockFenceGate)) || state.getMaterial().isOpaque() && state.isFullCube() && state.getMaterial() != Material.GOURD); +// } +// +// @Override +// public BlockState getStateFromMeta(int meta) { +// return this.getDefaultState(); +// } +// +// @Override +// public int getMetaFromState(BlockState state) { +// return 0; +// } +// +// @Override +// protected BlockStateContainer createBlockState() { +// return new BlockStateContainer(this, BlockWall.UP, BlockWall.NORTH, BlockWall.EAST, BlockWall.WEST, BlockWall.SOUTH); +// } +//} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java index 6138d1a56..3171c323f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java @@ -10,125 +10,107 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBushBase; -import de.ellpeck.actuallyadditions.mod.blocks.base.BlockPlant; -import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase; -import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheWildPlants; -import de.ellpeck.actuallyadditions.mod.util.StringUtil; -import net.minecraft.block.Block; -import net.minecraft.block.BlockCrops; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; -import net.minecraft.block.properties.PropertyEnum; -import net.minecraft.block.state.BlockStateContainer; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.ItemStack; -import net.minecraft.util.Direction; -import net.minecraft.util.NonNullList; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; public class BlockWildPlant extends BlockBushBase { - public static final TheWildPlants[] ALL_WILD_PLANTS = TheWildPlants.values(); - public static final PropertyEnum TYPE = PropertyEnum.create("type", TheWildPlants.class); + // public static final TheWildPlants[] ALL_WILD_PLANTS = TheWildPlants.values(); + // public static final PropertyEnum TYPE = PropertyEnum.create("type", TheWildPlants.class); public BlockWildPlant() { - super(this.name); - this.setSoundType(SoundType.PLANT); + super(Properties.create(Material.PLANTS).sound(SoundType.PLANT).harvestLevel(0).hardnessAndResistance(0, 0)); + // this.setSoundType(SoundType.PLANT); } - @Override - public boolean canBlockStay(World world, BlockPos pos, BlockState state) { - BlockPos offset = pos.down(); - BlockState offsetState = world.getBlockState(offset); - Block offsetBlock = offsetState.getBlock(); - return state.getValue(TYPE) == TheWildPlants.RICE - ? offsetState.getMaterial() == Material.WATER - : offsetBlock.canSustainPlant(offsetState, world, offset, Direction.UP, this); - } - - @Override - public ItemStack getPickBlock(BlockState state, RayTraceResult target, World world, BlockPos pos, PlayerEntity player) { - BlockPlant normal = (BlockPlant) state.getValue(TYPE).getNormalVersion(); - return new ItemStack(normal.seedItem); - } - - @Override - public void getSubBlocks(CreativeTabs tab, NonNullList list) { - for (int j = 0; j < ALL_WILD_PLANTS.length; j++) { - list.add(new ItemStack(this, 1, j)); - } - } - - @Override - public void getDrops(NonNullList drops, IBlockAccess world, BlockPos pos, BlockState state, int fortune) { - Block normal = state.getValue(TYPE).getNormalVersion(); - normal.getDrops(drops, world, pos, normal.getDefaultState().withProperty(BlockCrops.AGE, 7), fortune); - } - - @Override - public boolean canSilkHarvest(World world, BlockPos pos, BlockState state, PlayerEntity player) { - return false; - } - - @Override - protected ItemBlockBase getItemBlock() { - return new TheItemBlock(this); - } - - @Override - public boolean shouldAddCreative() { - return false; - } - - @Override - public void registerRendering() { - for (int i = 0; i < ALL_WILD_PLANTS.length; i++) { - ActuallyAdditions.PROXY.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), TYPE.getName() + "=" + ALL_WILD_PLANTS[i].getName()); - } - } - - @Override - public BlockState getStateFromMeta(int meta) { - return this.getDefaultState().withProperty(TYPE, TheWildPlants.values()[meta]); - } - - @Override - public int getMetaFromState(BlockState state) { - return state.getValue(TYPE).ordinal(); - } - - @Override - protected BlockStateContainer createBlockState() { - return new BlockStateContainer(this, TYPE); - } - - @Override - public EnumRarity getRarity(ItemStack stack) { - return stack.getItemDamage() >= ALL_WILD_PLANTS.length - ? EnumRarity.COMMON - : ALL_WILD_PLANTS[stack.getItemDamage()].getRarity(); - } - - public static class TheItemBlock extends ItemBlockBase { - - public TheItemBlock(Block block) { - super(block); - this.setHasSubtypes(true); - this.setMaxDamage(0); - } - - @Override - public String getTranslationKey(ItemStack stack) { - return stack.getItemDamage() >= ALL_WILD_PLANTS.length - ? StringUtil.BUGGED_ITEM_NAME - : this.getTranslationKey() + "_" + ALL_WILD_PLANTS[stack.getItemDamage()].getName(); - } - } + // TODO: [port] ADD BACK + // @Override + // public boolean canBlockStay(World world, BlockPos pos, BlockState state) { + // BlockPos offset = pos.down(); + // BlockState offsetState = world.getBlockState(offset); + // Block offsetBlock = offsetState.getBlock(); + // return state.getValue(TYPE) == TheWildPlants.RICE + // ? offsetState.getMaterial() == Material.WATER + // : offsetBlock.canSustainPlant(offsetState, world, offset, Direction.UP, this); + // } + // + // @Override + // public ItemStack getPickBlock(BlockState state, RayTraceResult target, World world, BlockPos pos, PlayerEntity player) { + // BlockPlant normal = (BlockPlant) state.getValue(TYPE).getNormalVersion(); + // return new ItemStack(normal.seedItem); + // } + // + // @Override + // public void getSubBlocks(CreativeTabs tab, NonNullList list) { + // for (int j = 0; j < ALL_WILD_PLANTS.length; j++) { + // list.add(new ItemStack(this, 1, j)); + // } + // } + // + // @Override + // public void getDrops(NonNullList drops, IBlockAccess world, BlockPos pos, BlockState state, int fortune) { + // Block normal = state.getValue(TYPE).getNormalVersion(); + // normal.getDrops(drops, world, pos, normal.getDefaultState().withProperty(BlockCrops.AGE, 7), fortune); + // } + // + // @Override + // public boolean canSilkHarvest(World world, BlockPos pos, BlockState state, PlayerEntity player) { + // return false; + // } + // + // @Override + // protected ItemBlockBase getItemBlock() { + // return new TheItemBlock(this); + // } + // + // @Override + // public boolean shouldAddCreative() { + // return false; + // } + // + // @Override + // public void registerRendering() { + // for (int i = 0; i < ALL_WILD_PLANTS.length; i++) { + // ActuallyAdditions.PROXY.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), TYPE.getName() + "=" + ALL_WILD_PLANTS[i].getName()); + // } + // } + // + // @Override + // public BlockState getStateFromMeta(int meta) { + // return this.getDefaultState().withProperty(TYPE, TheWildPlants.values()[meta]); + // } + // + // @Override + // public int getMetaFromState(BlockState state) { + // return state.getValue(TYPE).ordinal(); + // } + // + // @Override + // protected BlockStateContainer createBlockState() { + // return new BlockStateContainer(this, TYPE); + // } + // + // @Override + // public EnumRarity getRarity(ItemStack stack) { + // return stack.getItemDamage() >= ALL_WILD_PLANTS.length + // ? EnumRarity.COMMON + // : ALL_WILD_PLANTS[stack.getItemDamage()].getRarity(); + // } + // + // public static class TheItemBlock extends ItemBlockBase { + // + // public TheItemBlock(Block block) { + // super(block); + // this.setHasSubtypes(true); + // this.setMaxDamage(0); + // } + // + // @Override + // public String getTranslationKey(ItemStack stack) { + // return stack.getItemDamage() >= ALL_WILD_PLANTS.length + // ? StringUtil.BUGGED_ITEM_NAME + // : this.getTranslationKey() + "_" + ALL_WILD_PLANTS[stack.getItemDamage()].getName(); + // } + // } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockXPSolidifier.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockXPSolidifier.java index 74833300e..3beb6827c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockXPSolidifier.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockXPSolidifier.java @@ -10,34 +10,23 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; -import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; -import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; +import de.ellpeck.actuallyadditions.mod.blocks.base.DirectionalBlock; import de.ellpeck.actuallyadditions.mod.tile.TileEntityXPSolidifier; -import net.minecraft.block.BlockHorizontal; -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.BlockStateContainer; -import net.minecraft.entity.EntityLivingBase; +import net.minecraft.block.BlockState; import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Direction; +import net.minecraft.util.ActionResultType; import net.minecraft.util.Hand; -import net.minecraft.util.Mirror; -import net.minecraft.util.Rotation; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockRayTraceResult; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.world.IBlockReader; import net.minecraft.world.World; -public class BlockXPSolidifier extends BlockContainerBase { - +public class BlockXPSolidifier extends DirectionalBlock.Container { public BlockXPSolidifier() { - super(Material.ROCK, this.name); - this.setHarvestLevel("pickaxe", 0); - this.setHardness(2.5F); - this.setResistance(10.0F); - this.setSoundType(SoundType.STONE); + super(ActuallyBlocks.defaultPickProps(0, 2.5F, 10.0F)); } @Override @@ -47,50 +36,11 @@ public class BlockXPSolidifier extends BlockContainerBase { @Override public ActionResultType onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { - if (!world.isRemote) { - TileEntityXPSolidifier solidifier = (TileEntityXPSolidifier) world.getTileEntity(pos); - if (solidifier != null) { - player.openGui(ActuallyAdditions.INSTANCE, GuiHandler.GuiTypes.XP_SOLIDIFIER.ordinal(), world, pos.getX(), pos.getY(), pos.getZ()); - } - return true; - } - return true; + return this.openGui(worldIn, player, pos, TileEntityXPSolidifier.class); } @Override - public EnumRarity getRarity(ItemStack stack) { - return EnumRarity.EPIC; - } - - @Override - public void onBlockPlacedBy(World world, BlockPos pos, BlockState state, EntityLivingBase player, ItemStack stack) { - world.setBlockState(pos, state.withProperty(BlockHorizontal.FACING, player.getHorizontalFacing().getOpposite()), 2); - - super.onBlockPlacedBy(world, pos, state, player, stack); - } - - @Override - public BlockState getStateFromMeta(int meta) { - return this.getDefaultState().withProperty(BlockHorizontal.FACING, Direction.byHorizontalIndex(meta)); - } - - @Override - public int getMetaFromState(BlockState state) { - return state.getValue(BlockHorizontal.FACING).getHorizontalIndex(); - } - - @Override - protected BlockStateContainer createBlockState() { - return new BlockStateContainer(this, BlockHorizontal.FACING); - } - - @Override - public BlockState withRotation(BlockState state, Rotation rot) { - return state.withProperty(BlockHorizontal.FACING, rot.rotate(state.getValue(BlockHorizontal.FACING))); - } - - @Override - public BlockState withMirror(BlockState state, Mirror mirror) { - return this.withRotation(state, mirror.toRotation(state.getValue(BlockHorizontal.FACING))); + public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + return Shapes.SOLIDIFIER_SHAPE; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/Shapes.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/Shapes.java index 7b269ae4c..c454fb23c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/Shapes.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/Shapes.java @@ -9,623 +9,109 @@ import java.util.Optional; import java.util.stream.Stream; public class Shapes { - static final VoxelShape CANOLA_PRESS_SHAPE = Stream.of( - Block.makeCuboidShape(13, 0, 1, 15, 15.5, 3), Block.makeCuboidShape(2, 0, 2, 14, 6, 14), - Block.makeCuboidShape(2, 10, 2, 14, 15, 14), Block.makeCuboidShape(3, 6, 3, 13, 10, 13), - Block.makeCuboidShape(1, 0, 1, 3, 15.5, 3), Block.makeCuboidShape(1, 0, 13, 3, 15.5, 15), - Block.makeCuboidShape(13, 0, 13, 15, 15.5, 15), Block.makeCuboidShape(0.9, 0, 0.9, 3.1, 0.5, 3.1), - Block.makeCuboidShape(0.9, 0, 12.9, 3.1, 0.5, 15.1), Block.makeCuboidShape(0.9, 5, 12.9, 3.1, 6.5, 15.1), - Block.makeCuboidShape(0.9, 5, 0.9, 3.1, 6.5, 3.1), Block.makeCuboidShape(12.9, 5, 12.9, 15.1, 6.5, 15.1), - Block.makeCuboidShape(12.9, 5, 0.9, 15.1, 6.5, 3.1), Block.makeCuboidShape(0.9, 9.5, 12.9, 3.1, 11, 15.1), - Block.makeCuboidShape(0.9, 9.5, 0.9, 3.1, 11, 3.1), Block.makeCuboidShape(12.9, 9.5, 12.9, 15.1, 11, 15.1), - Block.makeCuboidShape(12.9, 9.5, 0.9, 15.1, 11, 3.1), Block.makeCuboidShape(12.9, 0, 0.9, 15.1, 0.5, 3.1), - Block.makeCuboidShape(12.9, 0, 12.9, 15.1, 0.5, 15.1), Block.makeCuboidShape(12.9, 15.5, 0.9, 15.1, 16, 3.1), - Block.makeCuboidShape(12.9, 15.5, 12.9, 15.1, 16, 15.1), Block.makeCuboidShape(0.9, 15.5, 0.9, 3.1, 16, 3.1), - Block.makeCuboidShape(0.9, 15.5, 12.9, 3.1, 16, 15.1) - ).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); - - public static final VoxelShape CRYSTAL_CLUSTER_SHAPE = Stream.of( - Block.makeCuboidShape(5, 4, 5, 10, 19, 10), Block.makeCuboidShape(4, 0, 4, 11, 5, 11), - Block.makeCuboidShape(3, 0, 3, 5, 4, 5), Block.makeCuboidShape(10, 0, 3, 12, 2, 5), - Block.makeCuboidShape(12, 0, 4, 13, 1, 5), Block.makeCuboidShape(11, 0, 5, 12, 1, 6), - Block.makeCuboidShape(10, 0, 10, 12, 3, 12), Block.makeCuboidShape(3, 0, 10, 5, 1, 12), - Block.makeCuboidShape(9, 0, 3, 10, 3, 4), Block.makeCuboidShape(8, 0, 2, 11, 1, 4), - Block.makeCuboidShape(4, 0, 2, 5, 2, 3), Block.makeCuboidShape(5, 0, 3, 7, 1, 4), - Block.makeCuboidShape(2, 0, 4, 4, 1, 6), Block.makeCuboidShape(3, 0, 5, 4, 3, 6.5), - Block.makeCuboidShape(3, 0, 9, 4, 2, 10), Block.makeCuboidShape(2, 0, 8, 4, 1, 10), - Block.makeCuboidShape(5, 0, 11, 7, 2, 13), Block.makeCuboidShape(7, 0, 11, 11, 1, 13), - Block.makeCuboidShape(10, 0, 9, 13, 1, 11), Block.makeCuboidShape(11, 0, 7, 12, 3, 9) - ).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); - - static final VoxelShape DISPLAY_STAND_SHAPE = Stream.of( - Block.makeCuboidShape(1, 7, 0, 15, 8, 1), Block.makeCuboidShape(0, 0, 0, 16, 1, 16), - Block.makeCuboidShape(1, 1, 1, 15, 7, 15), Block.makeCuboidShape(6, 7, 6, 10, 9, 10), - Block.makeCuboidShape(0, 1, 0, 1, 7, 1), Block.makeCuboidShape(15, 1, 0, 16, 7, 1), - Block.makeCuboidShape(15, 1, 15, 16, 7, 16), Block.makeCuboidShape(0, 1, 15, 1, 7, 16), - Block.makeCuboidShape(0, 7, 0, 1, 8, 16), Block.makeCuboidShape(15, 7, 0, 16, 8, 16), - Block.makeCuboidShape(1, 7, 15, 15, 8, 16), Block.makeCuboidShape(5, 7, 5, 6, 9, 6), - Block.makeCuboidShape(5, 7, 10, 6, 9, 11), Block.makeCuboidShape(10, 7, 10, 11, 9, 11), - Block.makeCuboidShape(10, 7, 5, 11, 9, 6) - ).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); - - - static final VoxelShape EMPOWERER_SHAPE = Stream.of( - Block.makeCuboidShape(0, 0, 0, 16, 1, 16), Block.makeCuboidShape(1, 1, 1, 15, 6, 15), - Block.makeCuboidShape(1, 6, 1, 15, 7, 15), Block.makeCuboidShape(0, 7, 0, 16, 8, 1), - Block.makeCuboidShape(0, 7, 15, 16, 8, 16), Block.makeCuboidShape(0, 7, 1, 1, 8, 15), - Block.makeCuboidShape(15, 7, 1, 16, 8, 15), Block.makeCuboidShape(4, 7, 4, 12, 9, 12), - Block.makeCuboidShape(0, 1, 0, 1, 7, 1), Block.makeCuboidShape(15, 1, 0, 16, 7, 1), - Block.makeCuboidShape(15, 1, 15, 16, 7, 16), Block.makeCuboidShape(0, 1, 15, 1, 7, 16), - Block.makeCuboidShape(3, 7, 4, 4, 8, 5), Block.makeCuboidShape(3, 7, 11, 4, 8, 12), - Block.makeCuboidShape(4, 7, 12, 5, 8, 13), Block.makeCuboidShape(11, 7, 12, 12, 8, 13), - Block.makeCuboidShape(12, 7, 11, 13, 8, 12), Block.makeCuboidShape(12, 7, 4, 13, 8, 5), - Block.makeCuboidShape(11, 7, 3, 12, 8, 4), Block.makeCuboidShape(4, 7, 3, 5, 8, 4) - ).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); - - static final VoxelShape ENERGIZER_SHAPE = Stream.of( - Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), - Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), - Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), - Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(0, 0, 0, 1, 1, 16), - Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), - Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), - Block.makeCuboidShape(1, 14, 1, 15, 15, 15), Block.makeCuboidShape(1, 1, 1, 15, 2, 15), - Block.makeCuboidShape(14, 2, 1, 15, 14, 15), Block.makeCuboidShape(1, 2, 1, 2, 14, 15), - Block.makeCuboidShape(2, 2, 14, 14, 14, 15), Block.makeCuboidShape(2, 2, 1, 14, 14, 2), - Block.makeCuboidShape(9, 3, 0, 13, 4, 1), Block.makeCuboidShape(3, 3, 15, 7, 4, 16), - Block.makeCuboidShape(9, 12, 0, 13, 13, 1), Block.makeCuboidShape(3, 12, 15, 7, 13, 16), - Block.makeCuboidShape(10, 4, 0, 12, 12, 1), Block.makeCuboidShape(4, 4, 15, 6, 12, 16), - Block.makeCuboidShape(0, 3, 3, 1, 4, 7), Block.makeCuboidShape(15, 3, 9, 16, 4, 13), - Block.makeCuboidShape(0, 12, 3, 1, 13, 7), Block.makeCuboidShape(15, 12, 9, 16, 13, 13), - Block.makeCuboidShape(0, 4, 4, 1, 12, 6), Block.makeCuboidShape(15, 4, 10, 16, 12, 12) - ).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); - - static final VoxelShape BARREL_SHAPE = Stream.of( - Block.makeCuboidShape(0, 12, 0, 16, 14, 1), Block.makeCuboidShape(1, 0.5, 1, 15, 15, 15), - Block.makeCuboidShape(0, 2, 15, 16, 4, 16), Block.makeCuboidShape(0, 7, 15, 16, 9, 16), - Block.makeCuboidShape(0, 12, 15, 16, 14, 16), Block.makeCuboidShape(0, 2, 0, 16, 4, 1), - Block.makeCuboidShape(0, 7, 0, 16, 9, 1), Block.makeCuboidShape(0, 2, 1, 1, 4, 15), - Block.makeCuboidShape(0, 7, 1, 1, 9, 15), Block.makeCuboidShape(0, 12, 1, 1, 14, 15), - Block.makeCuboidShape(15, 12, 1, 16, 14, 15), Block.makeCuboidShape(15, 7, 1, 16, 9, 15), - Block.makeCuboidShape(15, 2, 1, 16, 4, 15), Block.makeCuboidShape(7, 0, 0.5, 9, 16, 1.5), - Block.makeCuboidShape(0.5, 0, 7, 1.5, 16, 9), Block.makeCuboidShape(7, 0, 14.5, 9, 16, 15.5), - Block.makeCuboidShape(14.5, 0, 7, 15.5, 16, 9), Block.makeCuboidShape(2, 0, 0.5, 5, 16, 1.5), - Block.makeCuboidShape(0.5, 0, 11, 1.5, 16, 14), Block.makeCuboidShape(2, 0, 14.5, 5, 16, 15.5), - Block.makeCuboidShape(14.5, 0, 11, 15.5, 16, 14), Block.makeCuboidShape(11, 0, 0.5, 14, 16, 1.5), - Block.makeCuboidShape(0.5, 0, 2, 1.5, 16, 5), Block.makeCuboidShape(11, 0, 14.5, 14, 16, 15.5), - Block.makeCuboidShape(14.5, 0, 2, 15.5, 16, 5), Block.makeCuboidShape(4, 15, 7, 6, 15.3, 9), - Block.makeCuboidShape(2, 15, 4, 3, 15.3, 12), Block.makeCuboidShape(4, 15, 13, 12, 15.3, 14), - Block.makeCuboidShape(4, 15, 2, 12, 15.3, 3), Block.makeCuboidShape(13, 15, 4, 14, 15.3, 12), - Block.makeCuboidShape(3, 15, 3, 4, 15.3, 4), Block.makeCuboidShape(3, 15, 12, 4, 15.3, 13), - Block.makeCuboidShape(12, 15, 3, 13, 15.3, 4), Block.makeCuboidShape(12, 15, 12, 13, 15.3, 13) - ).reduce((v1, v2) -> { - return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR); - }).get(); - static final VoxelShape FIREWORKS_BOX_SHAPE = Stream.of( - Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), - Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), - Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), - Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), - Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), - Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), - Block.makeCuboidShape(10, 14, 9, 12, 15, 10), Block.makeCuboidShape(7, 14, 9, 9, 15, 10), - Block.makeCuboidShape(4, 14, 9, 6, 15, 10), Block.makeCuboidShape(10, 14, 6, 12, 15, 7), - Block.makeCuboidShape(7, 14, 6, 9, 15, 7), Block.makeCuboidShape(4, 14, 6, 6, 15, 7), - Block.makeCuboidShape(6, 14, 4, 7, 15, 12), Block.makeCuboidShape(9, 14, 4, 10, 15, 12), - Block.makeCuboidShape(4, 14, 12, 12, 15, 14), Block.makeCuboidShape(4, 14, 2, 12, 15, 4), - Block.makeCuboidShape(12, 14, 2, 14, 15, 14), Block.makeCuboidShape(2, 14, 2, 4, 15, 14), - Block.makeCuboidShape(2, 13, 2, 14, 14, 14), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), - Block.makeCuboidShape(1, 0, 2, 2, 15, 14), Block.makeCuboidShape(14, 0, 2, 15, 15, 14), - Block.makeCuboidShape(1, 0, 1, 15, 15, 2), Block.makeCuboidShape(1, 0, 14, 15, 15, 15) - ).reduce((v1, v2) -> { - return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR); - }).get(); - + static final VoxelShape CANOLA_PRESS_SHAPE = Stream.of(Block.makeCuboidShape(13, 0, 1, 15, 15.5, 3), Block.makeCuboidShape(2, 0, 2, 14, 6, 14), Block.makeCuboidShape(2, 10, 2, 14, 15, 14), Block.makeCuboidShape(3, 6, 3, 13, 10, 13), Block.makeCuboidShape(1, 0, 1, 3, 15.5, 3), Block.makeCuboidShape(1, 0, 13, 3, 15.5, 15), Block.makeCuboidShape(13, 0, 13, 15, 15.5, 15), Block.makeCuboidShape(0.9, 0, 0.9, 3.1, 0.5, 3.1), Block.makeCuboidShape(0.9, 0, 12.9, 3.1, 0.5, 15.1), Block.makeCuboidShape(0.9, 5, 12.9, 3.1, 6.5, 15.1), Block.makeCuboidShape(0.9, 5, 0.9, 3.1, 6.5, 3.1), Block.makeCuboidShape(12.9, 5, 12.9, 15.1, 6.5, 15.1), Block.makeCuboidShape(12.9, 5, 0.9, 15.1, 6.5, 3.1), Block.makeCuboidShape(0.9, 9.5, 12.9, 3.1, 11, 15.1), Block.makeCuboidShape(0.9, 9.5, 0.9, 3.1, 11, 3.1), Block.makeCuboidShape(12.9, 9.5, 12.9, 15.1, 11, 15.1), Block.makeCuboidShape(12.9, 9.5, 0.9, 15.1, 11, 3.1), Block.makeCuboidShape(12.9, 0, 0.9, 15.1, 0.5, 3.1), Block.makeCuboidShape(12.9, 0, 12.9, 15.1, 0.5, 15.1), Block.makeCuboidShape(12.9, 15.5, 0.9, 15.1, 16, 3.1), Block.makeCuboidShape(12.9, 15.5, 12.9, 15.1, 16, 15.1), Block.makeCuboidShape(0.9, 15.5, 0.9, 3.1, 16, 3.1), Block.makeCuboidShape(0.9, 15.5, 12.9, 3.1, 16, 15.1)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape CRYSTAL_CLUSTER_SHAPE = Stream.of(Block.makeCuboidShape(5, 4, 5, 10, 19, 10), Block.makeCuboidShape(4, 0, 4, 11, 5, 11), Block.makeCuboidShape(3, 0, 3, 5, 4, 5), Block.makeCuboidShape(10, 0, 3, 12, 2, 5), Block.makeCuboidShape(12, 0, 4, 13, 1, 5), Block.makeCuboidShape(11, 0, 5, 12, 1, 6), Block.makeCuboidShape(10, 0, 10, 12, 3, 12), Block.makeCuboidShape(3, 0, 10, 5, 1, 12), Block.makeCuboidShape(9, 0, 3, 10, 3, 4), Block.makeCuboidShape(8, 0, 2, 11, 1, 4), Block.makeCuboidShape(4, 0, 2, 5, 2, 3), Block.makeCuboidShape(5, 0, 3, 7, 1, 4), Block.makeCuboidShape(2, 0, 4, 4, 1, 6), Block.makeCuboidShape(3, 0, 5, 4, 3, 6.5), Block.makeCuboidShape(3, 0, 9, 4, 2, 10), Block.makeCuboidShape(2, 0, 8, 4, 1, 10), Block.makeCuboidShape(5, 0, 11, 7, 2, 13), Block.makeCuboidShape(7, 0, 11, 11, 1, 13), Block.makeCuboidShape(10, 0, 9, 13, 1, 11), Block.makeCuboidShape(11, 0, 7, 12, 3, 9)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape DISPLAY_STAND_SHAPE = Stream.of(Block.makeCuboidShape(1, 7, 0, 15, 8, 1), Block.makeCuboidShape(0, 0, 0, 16, 1, 16), Block.makeCuboidShape(1, 1, 1, 15, 7, 15), Block.makeCuboidShape(6, 7, 6, 10, 9, 10), Block.makeCuboidShape(0, 1, 0, 1, 7, 1), Block.makeCuboidShape(15, 1, 0, 16, 7, 1), Block.makeCuboidShape(15, 1, 15, 16, 7, 16), Block.makeCuboidShape(0, 1, 15, 1, 7, 16), Block.makeCuboidShape(0, 7, 0, 1, 8, 16), Block.makeCuboidShape(15, 7, 0, 16, 8, 16), Block.makeCuboidShape(1, 7, 15, 15, 8, 16), Block.makeCuboidShape(5, 7, 5, 6, 9, 6), Block.makeCuboidShape(5, 7, 10, 6, 9, 11), Block.makeCuboidShape(10, 7, 10, 11, 9, 11), Block.makeCuboidShape(10, 7, 5, 11, 9, 6)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape EMPOWERER_SHAPE = Stream.of(Block.makeCuboidShape(0, 0, 0, 16, 1, 16), Block.makeCuboidShape(1, 1, 1, 15, 6, 15), Block.makeCuboidShape(1, 6, 1, 15, 7, 15), Block.makeCuboidShape(0, 7, 0, 16, 8, 1), Block.makeCuboidShape(0, 7, 15, 16, 8, 16), Block.makeCuboidShape(0, 7, 1, 1, 8, 15), Block.makeCuboidShape(15, 7, 1, 16, 8, 15), Block.makeCuboidShape(4, 7, 4, 12, 9, 12), Block.makeCuboidShape(0, 1, 0, 1, 7, 1), Block.makeCuboidShape(15, 1, 0, 16, 7, 1), Block.makeCuboidShape(15, 1, 15, 16, 7, 16), Block.makeCuboidShape(0, 1, 15, 1, 7, 16), Block.makeCuboidShape(3, 7, 4, 4, 8, 5), Block.makeCuboidShape(3, 7, 11, 4, 8, 12), Block.makeCuboidShape(4, 7, 12, 5, 8, 13), Block.makeCuboidShape(11, 7, 12, 12, 8, 13), Block.makeCuboidShape(12, 7, 11, 13, 8, 12), Block.makeCuboidShape(12, 7, 4, 13, 8, 5), Block.makeCuboidShape(11, 7, 3, 12, 8, 4), Block.makeCuboidShape(4, 7, 3, 5, 8, 4)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape ENERGIZER_SHAPE = Stream.of(Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(1, 14, 1, 15, 15, 15), Block.makeCuboidShape(1, 1, 1, 15, 2, 15), Block.makeCuboidShape(14, 2, 1, 15, 14, 15), Block.makeCuboidShape(1, 2, 1, 2, 14, 15), Block.makeCuboidShape(2, 2, 14, 14, 14, 15), Block.makeCuboidShape(2, 2, 1, 14, 14, 2), Block.makeCuboidShape(9, 3, 0, 13, 4, 1), Block.makeCuboidShape(3, 3, 15, 7, 4, 16), Block.makeCuboidShape(9, 12, 0, 13, 13, 1), Block.makeCuboidShape(3, 12, 15, 7, 13, 16), Block.makeCuboidShape(10, 4, 0, 12, 12, 1), Block.makeCuboidShape(4, 4, 15, 6, 12, 16), Block.makeCuboidShape(0, 3, 3, 1, 4, 7), Block.makeCuboidShape(15, 3, 9, 16, 4, 13), Block.makeCuboidShape(0, 12, 3, 1, 13, 7), Block.makeCuboidShape(15, 12, 9, 16, 13, 13), Block.makeCuboidShape(0, 4, 4, 1, 12, 6), Block.makeCuboidShape(15, 4, 10, 16, 12, 12)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape BARREL_SHAPE = Stream.of(Block.makeCuboidShape(0, 12, 0, 16, 14, 1), Block.makeCuboidShape(1, 0.5, 1, 15, 15, 15), Block.makeCuboidShape(0, 2, 15, 16, 4, 16), Block.makeCuboidShape(0, 7, 15, 16, 9, 16), Block.makeCuboidShape(0, 12, 15, 16, 14, 16), Block.makeCuboidShape(0, 2, 0, 16, 4, 1), Block.makeCuboidShape(0, 7, 0, 16, 9, 1), Block.makeCuboidShape(0, 2, 1, 1, 4, 15), Block.makeCuboidShape(0, 7, 1, 1, 9, 15), Block.makeCuboidShape(0, 12, 1, 1, 14, 15), Block.makeCuboidShape(15, 12, 1, 16, 14, 15), Block.makeCuboidShape(15, 7, 1, 16, 9, 15), Block.makeCuboidShape(15, 2, 1, 16, 4, 15), Block.makeCuboidShape(7, 0, 0.5, 9, 16, 1.5), Block.makeCuboidShape(0.5, 0, 7, 1.5, 16, 9), Block.makeCuboidShape(7, 0, 14.5, 9, 16, 15.5), Block.makeCuboidShape(14.5, 0, 7, 15.5, 16, 9), Block.makeCuboidShape(2, 0, 0.5, 5, 16, 1.5), Block.makeCuboidShape(0.5, 0, 11, 1.5, 16, 14), Block.makeCuboidShape(2, 0, 14.5, 5, 16, 15.5), Block.makeCuboidShape(14.5, 0, 11, 15.5, 16, 14), Block.makeCuboidShape(11, 0, 0.5, 14, 16, 1.5), Block.makeCuboidShape(0.5, 0, 2, 1.5, 16, 5), Block.makeCuboidShape(11, 0, 14.5, 14, 16, 15.5), Block.makeCuboidShape(14.5, 0, 2, 15.5, 16, 5), Block.makeCuboidShape(4, 15, 7, 6, 15.3, 9), Block.makeCuboidShape(2, 15, 4, 3, 15.3, 12), Block.makeCuboidShape(4, 15, 13, 12, 15.3, 14), Block.makeCuboidShape(4, 15, 2, 12, 15.3, 3), Block.makeCuboidShape(13, 15, 4, 14, 15.3, 12), Block.makeCuboidShape(3, 15, 3, 4, 15.3, 4), Block.makeCuboidShape(3, 15, 12, 4, 15.3, 13), Block.makeCuboidShape(12, 15, 3, 13, 15.3, 4), Block.makeCuboidShape(12, 15, 12, 13, 15.3, 13)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape FIREWORKS_BOX_SHAPE = Stream.of(Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(10, 14, 9, 12, 15, 10), Block.makeCuboidShape(7, 14, 9, 9, 15, 10), Block.makeCuboidShape(4, 14, 9, 6, 15, 10), Block.makeCuboidShape(10, 14, 6, 12, 15, 7), Block.makeCuboidShape(7, 14, 6, 9, 15, 7), Block.makeCuboidShape(4, 14, 6, 6, 15, 7), Block.makeCuboidShape(6, 14, 4, 7, 15, 12), Block.makeCuboidShape(9, 14, 4, 10, 15, 12), Block.makeCuboidShape(4, 14, 12, 12, 15, 14), Block.makeCuboidShape(4, 14, 2, 12, 15, 4), Block.makeCuboidShape(12, 14, 2, 14, 15, 14), Block.makeCuboidShape(2, 14, 2, 4, 15, 14), Block.makeCuboidShape(2, 13, 2, 14, 14, 14), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(1, 0, 2, 2, 15, 14), Block.makeCuboidShape(14, 0, 2, 15, 15, 14), Block.makeCuboidShape(1, 0, 1, 15, 15, 2), Block.makeCuboidShape(1, 0, 14, 15, 15, 15)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape GLASS_SHAPE = Stream.of(Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape HEAT_COLLECTOR_SHAPE = Stream.of(Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(4, 13, 4, 12, 14, 12), Block.makeCuboidShape(11, 14, 4, 12, 15, 5), Block.makeCuboidShape(4, 14, 4, 5, 15, 5), Block.makeCuboidShape(4, 14, 11, 5, 15, 12), Block.makeCuboidShape(11, 14, 11, 12, 15, 12), Block.makeCuboidShape(15, 11, 4, 16, 12, 12), Block.makeCuboidShape(15, 5, 4, 16, 6, 12), Block.makeCuboidShape(15, 7, 4, 16, 8, 12), Block.makeCuboidShape(15, 9, 4, 16, 10, 12), Block.makeCuboidShape(4, 11, 15, 12, 12, 16), Block.makeCuboidShape(4, 9, 15, 12, 10, 16), Block.makeCuboidShape(4, 7, 15, 12, 8, 16), Block.makeCuboidShape(4, 5, 15, 12, 6, 16), Block.makeCuboidShape(0, 11, 4, 1, 12, 12), Block.makeCuboidShape(0, 5, 4, 1, 6, 12), Block.makeCuboidShape(0, 7, 4, 1, 8, 12), Block.makeCuboidShape(0, 9, 4, 1, 10, 12), Block.makeCuboidShape(4, 11, 0, 12, 12, 1), Block.makeCuboidShape(4, 9, 0, 12, 10, 1), Block.makeCuboidShape(4, 7, 0, 12, 8, 1), Block.makeCuboidShape(4, 5, 0, 12, 6, 1), Block.makeCuboidShape(2, 14, 2, 4, 15, 14), Block.makeCuboidShape(4, 14, 2, 12, 15, 4), Block.makeCuboidShape(4, 14, 12, 12, 15, 14), Block.makeCuboidShape(12, 14, 2, 14, 15, 14), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(1, 0, 2, 2, 15, 14), Block.makeCuboidShape(14, 0, 2, 15, 15, 14), Block.makeCuboidShape(1, 0, 1, 15, 15, 2), Block.makeCuboidShape(1, 0, 14, 15, 15, 15)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape ITEM_VIEWER_SHAPE = Stream.of(Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape HOPPING_ITEM_VIEWER_SHAPE = Stream.of(Block.makeCuboidShape(0, 10, 0, 16, 11, 16), Block.makeCuboidShape(1, 11, 1, 2, 15, 15), Block.makeCuboidShape(14, 11, 1, 15, 15, 15), Block.makeCuboidShape(2, 11, 1, 14, 15, 2), Block.makeCuboidShape(2, 11, 14, 14, 15, 15), Block.makeCuboidShape(4, 4, 4, 12, 10, 12), Block.makeCuboidShape(6, 0, 6, 10, 4, 10), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(0, 11, 0, 1, 15, 1), Block.makeCuboidShape(0, 11, 15, 1, 15, 16), Block.makeCuboidShape(15, 11, 15, 16, 15, 16), Block.makeCuboidShape(15, 11, 0, 16, 15, 1)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape BOOSTER_SHAPE = Stream.of(Block.makeCuboidShape(5, 12, 12, 11, 13, 13), Block.makeCuboidShape(6, 0, 6, 10, 16, 10), Block.makeCuboidShape(5, 2, 5, 11, 3, 11), Block.makeCuboidShape(5, 4, 12, 11, 5, 13), Block.makeCuboidShape(5, 6, 12, 11, 7, 13), Block.makeCuboidShape(5, 8, 12, 11, 9, 13), Block.makeCuboidShape(5, 10, 12, 11, 11, 13), Block.makeCuboidShape(5, 4, 3, 11, 5, 4), Block.makeCuboidShape(5, 6, 3, 11, 7, 4), Block.makeCuboidShape(5, 8, 3, 11, 9, 4), Block.makeCuboidShape(5, 10, 3, 11, 11, 4), Block.makeCuboidShape(5, 12, 3, 11, 13, 4), Block.makeCuboidShape(3, 4, 5, 4, 5, 11), Block.makeCuboidShape(3, 6, 5, 4, 7, 11), Block.makeCuboidShape(3, 8, 5, 4, 9, 11), Block.makeCuboidShape(3, 10, 5, 4, 11, 11), Block.makeCuboidShape(3, 12, 5, 4, 13, 11), Block.makeCuboidShape(12, 4, 5, 13, 5, 11), Block.makeCuboidShape(12, 6, 5, 13, 7, 11), Block.makeCuboidShape(12, 8, 5, 13, 9, 11), Block.makeCuboidShape(12, 10, 5, 13, 11, 11), Block.makeCuboidShape(12, 12, 5, 13, 13, 11), Block.makeCuboidShape(5, 14, 5, 11, 15, 11), Block.makeCuboidShape(4, 4, 11, 5, 5, 12), Block.makeCuboidShape(4, 6, 11, 5, 7, 12), Block.makeCuboidShape(4, 8, 11, 5, 9, 12), Block.makeCuboidShape(4, 10, 11, 5, 11, 12), Block.makeCuboidShape(4, 12, 11, 5, 13, 12), Block.makeCuboidShape(4, 4, 4, 5, 5, 5), Block.makeCuboidShape(4, 6, 4, 5, 7, 5), Block.makeCuboidShape(4, 8, 4, 5, 9, 5), Block.makeCuboidShape(4, 10, 4, 5, 11, 5), Block.makeCuboidShape(4, 12, 4, 5, 13, 5), Block.makeCuboidShape(11, 4, 4, 12, 5, 5), Block.makeCuboidShape(11, 6, 4, 12, 7, 5), Block.makeCuboidShape(11, 8, 4, 12, 9, 5), Block.makeCuboidShape(11, 10, 4, 12, 11, 5), Block.makeCuboidShape(11, 12, 4, 12, 13, 5), Block.makeCuboidShape(11, 4, 11, 12, 5, 12), Block.makeCuboidShape(11, 6, 11, 12, 7, 12), Block.makeCuboidShape(11, 8, 11, 12, 9, 12), Block.makeCuboidShape(11, 10, 11, 12, 11, 12), Block.makeCuboidShape(11, 12, 11, 12, 13, 12)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape PLAYER_INTERFACE_SHAPE = Stream.of(Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape COLLECTOR_SHAPE = Stream.of(Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(1, 1, 4, 2, 4, 12), Block.makeCuboidShape(14, 1, 4, 15, 4, 12), Block.makeCuboidShape(4, 1, 1, 12, 4, 2), Block.makeCuboidShape(4, 1, 14, 12, 4, 15), Block.makeCuboidShape(4, 14, 12, 12, 15, 14), Block.makeCuboidShape(1, 12, 4, 2, 15, 12), Block.makeCuboidShape(14, 12, 4, 15, 15, 12), Block.makeCuboidShape(4, 12, 1, 12, 15, 2), Block.makeCuboidShape(4, 12, 14, 12, 15, 15), Block.makeCuboidShape(4, 14, 2, 12, 15, 4), Block.makeCuboidShape(1, 1, 12, 2, 15, 14), Block.makeCuboidShape(14, 1, 2, 15, 15, 4), Block.makeCuboidShape(1, 1, 1, 4, 15, 2), Block.makeCuboidShape(12, 1, 14, 15, 15, 15), Block.makeCuboidShape(12, 14, 2, 14, 15, 14), Block.makeCuboidShape(1, 1, 2, 2, 15, 4), Block.makeCuboidShape(14, 1, 12, 15, 15, 14), Block.makeCuboidShape(12, 1, 1, 15, 15, 2), Block.makeCuboidShape(1, 1, 14, 4, 15, 15), Block.makeCuboidShape(2, 14, 2, 4, 15, 14), Block.makeCuboidShape(2, 2, 2, 14, 14, 14), Block.makeCuboidShape(1, 0, 1, 15, 1, 15)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SUPPRESSOR_SHAPE = Stream.of(Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(1, 14, 1, 15, 15, 15), Block.makeCuboidShape(1, 1, 1, 15, 2, 15), Block.makeCuboidShape(9, 13, 9, 13, 16, 13), Block.makeCuboidShape(9, 2, 9, 13, 3, 13), Block.makeCuboidShape(3, 13, 9, 7, 16, 13), Block.makeCuboidShape(3, 2, 9, 7, 3, 13), Block.makeCuboidShape(9, 13, 3, 13, 16, 7), Block.makeCuboidShape(9, 2, 3, 13, 3, 7), Block.makeCuboidShape(3, 13, 3, 7, 16, 7), Block.makeCuboidShape(3, 2, 3, 7, 3, 7), Block.makeCuboidShape(4, 3, 10, 6, 13, 12), Block.makeCuboidShape(10, 3, 10, 12, 13, 12), Block.makeCuboidShape(10, 3, 4, 12, 13, 6), Block.makeCuboidShape(4, 3, 4, 6, 13, 6)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape RELAY_SHAPE = Stream.of(Block.makeCuboidShape(6, 4, 6, 7, 6, 7), Block.makeCuboidShape(1, 0, 1, 15, 1, 15), Block.makeCuboidShape(4, 2, 4, 12, 4, 12), Block.makeCuboidShape(9, 4, 9, 10, 6, 10), Block.makeCuboidShape(6, 4, 9, 7, 6, 10), Block.makeCuboidShape(3, 1, 12, 4, 5, 13), Block.makeCuboidShape(12, 1, 12, 13, 5, 13), Block.makeCuboidShape(3, 1, 3, 4, 5, 4), Block.makeCuboidShape(12, 1, 3, 13, 5, 4), Block.makeCuboidShape(3, 4, 4, 4, 5, 12), Block.makeCuboidShape(3, 1, 4, 4, 2, 12), Block.makeCuboidShape(12, 4, 4, 13, 5, 12), Block.makeCuboidShape(12, 1, 4, 13, 2, 12), Block.makeCuboidShape(4, 4, 12, 12, 5, 13), Block.makeCuboidShape(4, 4, 3, 12, 5, 4), Block.makeCuboidShape(4, 1, 12, 12, 2, 13), Block.makeCuboidShape(4, 1, 3, 12, 2, 4), Block.makeCuboidShape(9, 4, 6, 10, 6, 7), Block.makeCuboidShape(7, 4, 7, 9, 6, 9), Block.makeCuboidShape(7, 6, 7, 9, 10, 9), Block.makeCuboidShape(6.5, 5, 7, 7, 6, 9), Block.makeCuboidShape(6.5, 7, 7, 7, 7.5, 9), Block.makeCuboidShape(6.5, 9, 7, 7, 9.5, 9), Block.makeCuboidShape(9, 5, 7, 9.5, 6, 9), Block.makeCuboidShape(9, 7, 7, 9.5, 7.5, 9), Block.makeCuboidShape(9, 9, 7, 9.5, 9.5, 9), Block.makeCuboidShape(7, 5, 6.5, 9, 6, 7), Block.makeCuboidShape(7, 7, 6.5, 9, 7.5, 7), Block.makeCuboidShape(7, 9, 6.5, 9, 9.5, 7), Block.makeCuboidShape(7, 5, 9, 9, 6, 9.5), Block.makeCuboidShape(7, 7, 9, 9, 7.5, 9.5), Block.makeCuboidShape(7, 9, 9, 9, 9.5, 9.5)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final class CoalGeneratorShapes { - static final VoxelShape NORTH = Stream.of( - Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), - Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), - Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), - Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), - Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(5, 14, 6, 11, 15, 7), - Block.makeCuboidShape(5, 14, 8, 11, 15, 9), Block.makeCuboidShape(5, 14, 10, 11, 15, 14), - Block.makeCuboidShape(5, 14, 2, 11, 15, 5), Block.makeCuboidShape(11, 14, 2, 14, 15, 14), - Block.makeCuboidShape(2, 14, 2, 5, 15, 14), Block.makeCuboidShape(1, 0, 2, 2, 15, 14), - Block.makeCuboidShape(14, 0, 2, 15, 15, 14), Block.makeCuboidShape(1, 0, 14, 15, 15, 15), - Block.makeCuboidShape(3, 11, 0, 13, 12, 1), Block.makeCuboidShape(5, 3, 1, 6, 8, 2), - Block.makeCuboidShape(10, 3, 1, 11, 8, 2), Block.makeCuboidShape(3, 8, 1, 13, 15, 2), - Block.makeCuboidShape(3, 0, 1, 13, 3, 2), Block.makeCuboidShape(1, 0, 1, 3, 15, 2), - Block.makeCuboidShape(13, 0, 1, 15, 15, 2), Block.makeCuboidShape(5, 13, 5, 11, 14, 10), - Block.makeCuboidShape(2, 3, 2, 14, 8, 3), Block.makeCuboidShape(0, 0, 15, 1, 1, 16), - Block.makeCuboidShape(15, 0, 15, 16, 1, 16), Block.makeCuboidShape(15, 0, 0, 16, 1, 1), - Block.makeCuboidShape(0, 0, 0, 1, 1, 1) - ).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); - - static final VoxelShape EAST = Stream.of( - Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), - Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), - Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), - Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), - Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(9, 14, 5, 10, 15, 11), - Block.makeCuboidShape(7, 14, 5, 8, 15, 11), Block.makeCuboidShape(2, 14, 5, 6, 15, 11), - Block.makeCuboidShape(11, 14, 5, 14, 15, 11), Block.makeCuboidShape(2, 14, 11, 14, 15, 14), - Block.makeCuboidShape(2, 14, 2, 14, 15, 5), Block.makeCuboidShape(2, 0, 1, 14, 15, 2), - Block.makeCuboidShape(2, 0, 14, 14, 15, 15), Block.makeCuboidShape(1, 0, 1, 2, 15, 15), - Block.makeCuboidShape(15, 11, 3, 16, 12, 13), Block.makeCuboidShape(14, 3, 5, 15, 8, 6), - Block.makeCuboidShape(14, 3, 10, 15, 8, 11), Block.makeCuboidShape(14, 8, 3, 15, 15, 13), - Block.makeCuboidShape(14, 0, 3, 15, 3, 13), Block.makeCuboidShape(14, 0, 1, 15, 15, 3), - Block.makeCuboidShape(14, 0, 13, 15, 15, 15), Block.makeCuboidShape(6, 13, 5, 11, 14, 11), - Block.makeCuboidShape(13, 3, 2, 14, 8, 14), Block.makeCuboidShape(0, 0, 0, 1, 1, 1), - Block.makeCuboidShape(0, 0, 15, 1, 1, 16), Block.makeCuboidShape(15, 0, 15, 16, 1, 16), - Block.makeCuboidShape(15, 0, 0, 16, 1, 1) - ).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); - - static final VoxelShape SOUTH = Stream.of( - Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), - Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), - Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), - Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), - Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(5, 14, 9, 11, 15, 10), - Block.makeCuboidShape(5, 14, 7, 11, 15, 8), Block.makeCuboidShape(5, 14, 2, 11, 15, 6), - Block.makeCuboidShape(5, 14, 11, 11, 15, 14), Block.makeCuboidShape(2, 14, 2, 5, 15, 14), - Block.makeCuboidShape(11, 14, 2, 14, 15, 14), Block.makeCuboidShape(14, 0, 2, 15, 15, 14), - Block.makeCuboidShape(1, 0, 2, 2, 15, 14), Block.makeCuboidShape(1, 0, 1, 15, 15, 2), - Block.makeCuboidShape(3, 11, 15, 13, 12, 16), Block.makeCuboidShape(10, 3, 14, 11, 8, 15), - Block.makeCuboidShape(5, 3, 14, 6, 8, 15), Block.makeCuboidShape(3, 8, 14, 13, 15, 15), - Block.makeCuboidShape(3, 0, 14, 13, 3, 15), Block.makeCuboidShape(13, 0, 14, 15, 15, 15), - Block.makeCuboidShape(1, 0, 14, 3, 15, 15), Block.makeCuboidShape(5, 13, 6, 11, 14, 11), - Block.makeCuboidShape(2, 3, 13, 14, 8, 14), Block.makeCuboidShape(15, 0, 0, 16, 1, 1), - Block.makeCuboidShape(0, 0, 0, 1, 1, 1), Block.makeCuboidShape(0, 0, 15, 1, 1, 16), - Block.makeCuboidShape(15, 0, 15, 16, 1, 16) - ).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); - - static final VoxelShape WEST = Stream.of( - Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), - Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), - Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), - Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), - Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(6, 14, 5, 7, 15, 11), - Block.makeCuboidShape(8, 14, 5, 9, 15, 11), Block.makeCuboidShape(10, 14, 5, 14, 15, 11), - Block.makeCuboidShape(2, 14, 5, 5, 15, 11), Block.makeCuboidShape(2, 14, 2, 14, 15, 5), - Block.makeCuboidShape(2, 14, 11, 14, 15, 14), Block.makeCuboidShape(2, 0, 14, 14, 15, 15), - Block.makeCuboidShape(2, 0, 1, 14, 15, 2), Block.makeCuboidShape(14, 0, 1, 15, 15, 15), - Block.makeCuboidShape(0, 11, 3, 1, 12, 13), Block.makeCuboidShape(1, 3, 10, 2, 8, 11), - Block.makeCuboidShape(1, 3, 5, 2, 8, 6), Block.makeCuboidShape(1, 8, 3, 2, 15, 13), - Block.makeCuboidShape(1, 0, 3, 2, 3, 13), Block.makeCuboidShape(1, 0, 13, 2, 15, 15), - Block.makeCuboidShape(1, 0, 1, 2, 15, 3), Block.makeCuboidShape(5, 13, 5, 10, 14, 11), - Block.makeCuboidShape(2, 3, 2, 3, 8, 14), Block.makeCuboidShape(15, 0, 15, 16, 1, 16), - Block.makeCuboidShape(15, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 0, 0, 1, 1, 1), - Block.makeCuboidShape(0, 0, 15, 1, 1, 16) - ).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape NORTH = Stream.of(Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(5, 14, 6, 11, 15, 7), Block.makeCuboidShape(5, 14, 8, 11, 15, 9), Block.makeCuboidShape(5, 14, 10, 11, 15, 14), Block.makeCuboidShape(5, 14, 2, 11, 15, 5), Block.makeCuboidShape(11, 14, 2, 14, 15, 14), Block.makeCuboidShape(2, 14, 2, 5, 15, 14), Block.makeCuboidShape(1, 0, 2, 2, 15, 14), Block.makeCuboidShape(14, 0, 2, 15, 15, 14), Block.makeCuboidShape(1, 0, 14, 15, 15, 15), Block.makeCuboidShape(3, 11, 0, 13, 12, 1), Block.makeCuboidShape(5, 3, 1, 6, 8, 2), Block.makeCuboidShape(10, 3, 1, 11, 8, 2), Block.makeCuboidShape(3, 8, 1, 13, 15, 2), Block.makeCuboidShape(3, 0, 1, 13, 3, 2), Block.makeCuboidShape(1, 0, 1, 3, 15, 2), Block.makeCuboidShape(13, 0, 1, 15, 15, 2), Block.makeCuboidShape(5, 13, 5, 11, 14, 10), Block.makeCuboidShape(2, 3, 2, 14, 8, 3), Block.makeCuboidShape(0, 0, 15, 1, 1, 16), Block.makeCuboidShape(15, 0, 15, 16, 1, 16), Block.makeCuboidShape(15, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 0, 0, 1, 1, 1)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape EAST = Stream.of(Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(9, 14, 5, 10, 15, 11), Block.makeCuboidShape(7, 14, 5, 8, 15, 11), Block.makeCuboidShape(2, 14, 5, 6, 15, 11), Block.makeCuboidShape(11, 14, 5, 14, 15, 11), Block.makeCuboidShape(2, 14, 11, 14, 15, 14), Block.makeCuboidShape(2, 14, 2, 14, 15, 5), Block.makeCuboidShape(2, 0, 1, 14, 15, 2), Block.makeCuboidShape(2, 0, 14, 14, 15, 15), Block.makeCuboidShape(1, 0, 1, 2, 15, 15), Block.makeCuboidShape(15, 11, 3, 16, 12, 13), Block.makeCuboidShape(14, 3, 5, 15, 8, 6), Block.makeCuboidShape(14, 3, 10, 15, 8, 11), Block.makeCuboidShape(14, 8, 3, 15, 15, 13), Block.makeCuboidShape(14, 0, 3, 15, 3, 13), Block.makeCuboidShape(14, 0, 1, 15, 15, 3), Block.makeCuboidShape(14, 0, 13, 15, 15, 15), Block.makeCuboidShape(6, 13, 5, 11, 14, 11), Block.makeCuboidShape(13, 3, 2, 14, 8, 14), Block.makeCuboidShape(0, 0, 0, 1, 1, 1), Block.makeCuboidShape(0, 0, 15, 1, 1, 16), Block.makeCuboidShape(15, 0, 15, 16, 1, 16), Block.makeCuboidShape(15, 0, 0, 16, 1, 1)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SOUTH = Stream.of(Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(5, 14, 9, 11, 15, 10), Block.makeCuboidShape(5, 14, 7, 11, 15, 8), Block.makeCuboidShape(5, 14, 2, 11, 15, 6), Block.makeCuboidShape(5, 14, 11, 11, 15, 14), Block.makeCuboidShape(2, 14, 2, 5, 15, 14), Block.makeCuboidShape(11, 14, 2, 14, 15, 14), Block.makeCuboidShape(14, 0, 2, 15, 15, 14), Block.makeCuboidShape(1, 0, 2, 2, 15, 14), Block.makeCuboidShape(1, 0, 1, 15, 15, 2), Block.makeCuboidShape(3, 11, 15, 13, 12, 16), Block.makeCuboidShape(10, 3, 14, 11, 8, 15), Block.makeCuboidShape(5, 3, 14, 6, 8, 15), Block.makeCuboidShape(3, 8, 14, 13, 15, 15), Block.makeCuboidShape(3, 0, 14, 13, 3, 15), Block.makeCuboidShape(13, 0, 14, 15, 15, 15), Block.makeCuboidShape(1, 0, 14, 3, 15, 15), Block.makeCuboidShape(5, 13, 6, 11, 14, 11), Block.makeCuboidShape(2, 3, 13, 14, 8, 14), Block.makeCuboidShape(15, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 0, 0, 1, 1, 1), Block.makeCuboidShape(0, 0, 15, 1, 1, 16), Block.makeCuboidShape(15, 0, 15, 16, 1, 16)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape WEST = Stream.of(Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(6, 14, 5, 7, 15, 11), Block.makeCuboidShape(8, 14, 5, 9, 15, 11), Block.makeCuboidShape(10, 14, 5, 14, 15, 11), Block.makeCuboidShape(2, 14, 5, 5, 15, 11), Block.makeCuboidShape(2, 14, 2, 14, 15, 5), Block.makeCuboidShape(2, 14, 11, 14, 15, 14), Block.makeCuboidShape(2, 0, 14, 14, 15, 15), Block.makeCuboidShape(2, 0, 1, 14, 15, 2), Block.makeCuboidShape(14, 0, 1, 15, 15, 15), Block.makeCuboidShape(0, 11, 3, 1, 12, 13), Block.makeCuboidShape(1, 3, 10, 2, 8, 11), Block.makeCuboidShape(1, 3, 5, 2, 8, 6), Block.makeCuboidShape(1, 8, 3, 2, 15, 13), Block.makeCuboidShape(1, 0, 3, 2, 3, 13), Block.makeCuboidShape(1, 0, 13, 2, 15, 15), Block.makeCuboidShape(1, 0, 1, 2, 15, 3), Block.makeCuboidShape(5, 13, 5, 10, 14, 11), Block.makeCuboidShape(2, 3, 2, 3, 8, 14), Block.makeCuboidShape(15, 0, 15, 16, 1, 16), Block.makeCuboidShape(15, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 0, 0, 1, 1, 1), Block.makeCuboidShape(0, 0, 15, 1, 1, 16)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); } static class CoffeeMachineShapes { - static final VoxelShape NORTH = Stream.of( - Block.makeCuboidShape(8, 11, 7, 13, 14, 8), Block.makeCuboidShape(1, 0, 1, 15, 1, 15), - Block.makeCuboidShape(7, 1, 8, 14, 9, 14), Block.makeCuboidShape(6, 9, 3, 15, 11, 15), - Block.makeCuboidShape(8, 11, 8, 13, 13, 13), Block.makeCuboidShape(10, 8, 3.5, 11, 9, 4.5), - Block.makeCuboidShape(9, 1, 2, 12, 2, 5), Block.makeCuboidShape(9, 2, 5, 12, 7, 6), - Block.makeCuboidShape(9, 2, 1, 12, 7, 2), Block.makeCuboidShape(12, 2, 2, 13, 7, 5), - Block.makeCuboidShape(8, 2, 2, 9, 7, 5), Block.makeCuboidShape(13, 2, 3, 14, 3, 4), - Block.makeCuboidShape(13, 5, 3, 14, 6, 4), Block.makeCuboidShape(14, 3, 3, 15, 5, 4), - Block.makeCuboidShape(13, 10.2, 4.2, 14, 11.2, 5.2), Block.makeCuboidShape(11, 10.2, 4.2, 12, 11.2, 5.2), - Block.makeCuboidShape(13, 11, 7, 14, 14, 14), Block.makeCuboidShape(7, 11, 7, 8, 14, 14), - Block.makeCuboidShape(8, 11, 13, 13, 14, 14), Block.makeCuboidShape(14, 1, 14, 15, 9, 15), - Block.makeCuboidShape(6, 1, 14, 7, 9, 15), Block.makeCuboidShape(14, 1, 7, 15, 9, 8), - Block.makeCuboidShape(6, 1, 7, 7, 9, 8), Block.makeCuboidShape(6.8, 1.9, 11.9, 7, 3.1, 13.1), - Block.makeCuboidShape(6.8, 1.9, 9.9, 7, 3.1, 11.1), Block.makeCuboidShape(3, 3, 10, 4, 5, 11), - Block.makeCuboidShape(2.9, 4.8, 9.9, 4.1, 5, 11.1), Block.makeCuboidShape(2.9, 4.8, 11.9, 4.1, 5, 13.1), - Block.makeCuboidShape(3, 2, 12, 7, 3, 13), Block.makeCuboidShape(3, 2, 10, 7, 3, 11), - Block.makeCuboidShape(3, 3, 12, 4, 5, 13), Block.makeCuboidShape(2, 5, 9, 5, 11, 14), - Block.makeCuboidShape(2, 11, 11, 4, 12, 13), Block.makeCuboidShape(1, 1, 11, 2, 12, 13) - ).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); - - static final VoxelShape EAST = Stream.of( - Block.makeCuboidShape(8, 11, 8, 9, 14, 13), Block.makeCuboidShape(1, 0, 1, 15, 1, 15), - Block.makeCuboidShape(2, 1, 7, 8, 9, 14), Block.makeCuboidShape(1, 9, 6, 13, 11, 15), - Block.makeCuboidShape(3, 11, 8, 8, 13, 13), Block.makeCuboidShape(11.5, 8, 10, 12.5, 9, 11), - Block.makeCuboidShape(11, 1, 9, 14, 2, 12), Block.makeCuboidShape(10, 2, 9, 11, 7, 12), - Block.makeCuboidShape(14, 2, 9, 15, 7, 12), Block.makeCuboidShape(11, 2, 12, 14, 7, 13), - Block.makeCuboidShape(11, 2, 8, 14, 7, 9), Block.makeCuboidShape(12, 2, 13, 13, 3, 14), - Block.makeCuboidShape(12, 5, 13, 13, 6, 14), Block.makeCuboidShape(12, 3, 14, 13, 5, 15), - Block.makeCuboidShape(10.8, 10.2, 13, 11.8, 11.2, 14), Block.makeCuboidShape(10.8, 10.2, 11, 11.8, 11.2, 12), - Block.makeCuboidShape(2, 11, 13, 9, 14, 14), Block.makeCuboidShape(2, 11, 7, 9, 14, 8), - Block.makeCuboidShape(2, 11, 8, 3, 14, 13), Block.makeCuboidShape(1, 1, 14, 2, 9, 15), - Block.makeCuboidShape(1, 1, 6, 2, 9, 7), Block.makeCuboidShape(8, 1, 14, 9, 9, 15), - Block.makeCuboidShape(8, 1, 6, 9, 9, 7), Block.makeCuboidShape(2.9000000000000004, 1.9, 6.8, 4.1, 3.1, 7), - Block.makeCuboidShape(4.9, 1.9, 6.8, 6.1, 3.1, 7), Block.makeCuboidShape(5, 3, 3, 6, 5, 4), - Block.makeCuboidShape(4.9, 4.8, 2.9000000000000004, 6.1, 5, 4.1), Block.makeCuboidShape(2.9000000000000004, 4.8, 2.9000000000000004, 4.1, 5, 4.1), - Block.makeCuboidShape(3, 2, 3, 4, 3, 7), Block.makeCuboidShape(5, 2, 3, 6, 3, 7), - Block.makeCuboidShape(3, 3, 3, 4, 5, 4), Block.makeCuboidShape(2, 5, 2, 7, 11, 5), - Block.makeCuboidShape(3, 11, 2, 5, 12, 4), Block.makeCuboidShape(3, 1, 1, 5, 12, 2) - ).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); - - static final VoxelShape SOUTH = Stream.of( - Block.makeCuboidShape(3, 11, 8, 8, 14, 9), Block.makeCuboidShape(1, 0, 1, 15, 1, 15), - Block.makeCuboidShape(2, 1, 2, 9, 9, 8), Block.makeCuboidShape(1, 9, 1, 10, 11, 13), - Block.makeCuboidShape(3, 11, 3, 8, 13, 8), Block.makeCuboidShape(5, 8, 11.5, 6, 9, 12.5), - Block.makeCuboidShape(4, 1, 11, 7, 2, 14), Block.makeCuboidShape(4, 2, 10, 7, 7, 11), - Block.makeCuboidShape(4, 2, 14, 7, 7, 15), Block.makeCuboidShape(3, 2, 11, 4, 7, 14), - Block.makeCuboidShape(7, 2, 11, 8, 7, 14), Block.makeCuboidShape(2, 2, 12, 3, 3, 13), - Block.makeCuboidShape(2, 5, 12, 3, 6, 13), Block.makeCuboidShape(1, 3, 12, 2, 5, 13), - Block.makeCuboidShape(2, 10.2, 10.8, 3, 11.2, 11.8), Block.makeCuboidShape(4, 10.2, 10.8, 5, 11.2, 11.8), - Block.makeCuboidShape(2, 11, 2, 3, 14, 9), Block.makeCuboidShape(8, 11, 2, 9, 14, 9), - Block.makeCuboidShape(3, 11, 2, 8, 14, 3), Block.makeCuboidShape(1, 1, 1, 2, 9, 2), - Block.makeCuboidShape(9, 1, 1, 10, 9, 2), Block.makeCuboidShape(1, 1, 8, 2, 9, 9), - Block.makeCuboidShape(9, 1, 8, 10, 9, 9), Block.makeCuboidShape(9, 1.9, 2.9000000000000004, 9.2, 3.1, 4.1), - Block.makeCuboidShape(9, 1.9, 4.9, 9.2, 3.1, 6.1), Block.makeCuboidShape(12, 3, 5, 13, 5, 6), - Block.makeCuboidShape(11.9, 4.8, 4.9, 13.1, 5, 6.1), Block.makeCuboidShape(11.9, 4.8, 2.9000000000000004, 13.1, 5, 4.1), - Block.makeCuboidShape(9, 2, 3, 13, 3, 4), Block.makeCuboidShape(9, 2, 5, 13, 3, 6), - Block.makeCuboidShape(12, 3, 3, 13, 5, 4), Block.makeCuboidShape(11, 5, 2, 14, 11, 7), - Block.makeCuboidShape(12, 11, 3, 14, 12, 5), Block.makeCuboidShape(14, 1, 3, 15, 12, 5) - ).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); - - static final VoxelShape WEST = Stream.of( - Block.makeCuboidShape(7, 11, 3, 8, 14, 8), Block.makeCuboidShape(1, 0, 1, 15, 1, 15), - Block.makeCuboidShape(8, 1, 2, 14, 9, 9), Block.makeCuboidShape(3, 9, 1, 15, 11, 10), - Block.makeCuboidShape(8, 11, 3, 13, 13, 8), Block.makeCuboidShape(3.5, 8, 5, 4.5, 9, 6), - Block.makeCuboidShape(2, 1, 4, 5, 2, 7), Block.makeCuboidShape(5, 2, 4, 6, 7, 7), - Block.makeCuboidShape(1, 2, 4, 2, 7, 7), Block.makeCuboidShape(2, 2, 3, 5, 7, 4), - Block.makeCuboidShape(2, 2, 7, 5, 7, 8), Block.makeCuboidShape(3, 2, 2, 4, 3, 3), - Block.makeCuboidShape(3, 5, 2, 4, 6, 3), Block.makeCuboidShape(3, 3, 1, 4, 5, 2), - Block.makeCuboidShape(4.199999999999999, 10.2, 2, 5.199999999999999, 11.2, 3), Block.makeCuboidShape(4.199999999999999, 10.2, 4, 5.199999999999999, 11.2, 5), - Block.makeCuboidShape(7, 11, 2, 14, 14, 3), Block.makeCuboidShape(7, 11, 8, 14, 14, 9), - Block.makeCuboidShape(13, 11, 3, 14, 14, 8), Block.makeCuboidShape(14, 1, 1, 15, 9, 2), - Block.makeCuboidShape(14, 1, 9, 15, 9, 10), Block.makeCuboidShape(7, 1, 1, 8, 9, 2), - Block.makeCuboidShape(7, 1, 9, 8, 9, 10), Block.makeCuboidShape(11.9, 1.9, 9, 13.1, 3.1, 9.2), - Block.makeCuboidShape(9.9, 1.9, 9, 11.1, 3.1, 9.2), Block.makeCuboidShape(10, 3, 12, 11, 5, 13), - Block.makeCuboidShape(9.9, 4.8, 11.9, 11.1, 5, 13.1), Block.makeCuboidShape(11.9, 4.8, 11.9, 13.1, 5, 13.1), - Block.makeCuboidShape(12, 2, 9, 13, 3, 13), Block.makeCuboidShape(10, 2, 9, 11, 3, 13), - Block.makeCuboidShape(12, 3, 12, 13, 5, 13), Block.makeCuboidShape(9, 5, 11, 14, 11, 14), - Block.makeCuboidShape(11, 11, 12, 13, 12, 14), Block.makeCuboidShape(11, 1, 14, 13, 12, 15) - ).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape NORTH = Stream.of(Block.makeCuboidShape(8, 11, 7, 13, 14, 8), Block.makeCuboidShape(1, 0, 1, 15, 1, 15), Block.makeCuboidShape(7, 1, 8, 14, 9, 14), Block.makeCuboidShape(6, 9, 3, 15, 11, 15), Block.makeCuboidShape(8, 11, 8, 13, 13, 13), Block.makeCuboidShape(10, 8, 3.5, 11, 9, 4.5), Block.makeCuboidShape(9, 1, 2, 12, 2, 5), Block.makeCuboidShape(9, 2, 5, 12, 7, 6), Block.makeCuboidShape(9, 2, 1, 12, 7, 2), Block.makeCuboidShape(12, 2, 2, 13, 7, 5), Block.makeCuboidShape(8, 2, 2, 9, 7, 5), Block.makeCuboidShape(13, 2, 3, 14, 3, 4), Block.makeCuboidShape(13, 5, 3, 14, 6, 4), Block.makeCuboidShape(14, 3, 3, 15, 5, 4), Block.makeCuboidShape(13, 10.2, 4.2, 14, 11.2, 5.2), Block.makeCuboidShape(11, 10.2, 4.2, 12, 11.2, 5.2), Block.makeCuboidShape(13, 11, 7, 14, 14, 14), Block.makeCuboidShape(7, 11, 7, 8, 14, 14), Block.makeCuboidShape(8, 11, 13, 13, 14, 14), Block.makeCuboidShape(14, 1, 14, 15, 9, 15), Block.makeCuboidShape(6, 1, 14, 7, 9, 15), Block.makeCuboidShape(14, 1, 7, 15, 9, 8), Block.makeCuboidShape(6, 1, 7, 7, 9, 8), Block.makeCuboidShape(6.8, 1.9, 11.9, 7, 3.1, 13.1), Block.makeCuboidShape(6.8, 1.9, 9.9, 7, 3.1, 11.1), Block.makeCuboidShape(3, 3, 10, 4, 5, 11), Block.makeCuboidShape(2.9, 4.8, 9.9, 4.1, 5, 11.1), Block.makeCuboidShape(2.9, 4.8, 11.9, 4.1, 5, 13.1), Block.makeCuboidShape(3, 2, 12, 7, 3, 13), Block.makeCuboidShape(3, 2, 10, 7, 3, 11), Block.makeCuboidShape(3, 3, 12, 4, 5, 13), Block.makeCuboidShape(2, 5, 9, 5, 11, 14), Block.makeCuboidShape(2, 11, 11, 4, 12, 13), Block.makeCuboidShape(1, 1, 11, 2, 12, 13)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape EAST = Stream.of(Block.makeCuboidShape(8, 11, 8, 9, 14, 13), Block.makeCuboidShape(1, 0, 1, 15, 1, 15), Block.makeCuboidShape(2, 1, 7, 8, 9, 14), Block.makeCuboidShape(1, 9, 6, 13, 11, 15), Block.makeCuboidShape(3, 11, 8, 8, 13, 13), Block.makeCuboidShape(11.5, 8, 10, 12.5, 9, 11), Block.makeCuboidShape(11, 1, 9, 14, 2, 12), Block.makeCuboidShape(10, 2, 9, 11, 7, 12), Block.makeCuboidShape(14, 2, 9, 15, 7, 12), Block.makeCuboidShape(11, 2, 12, 14, 7, 13), Block.makeCuboidShape(11, 2, 8, 14, 7, 9), Block.makeCuboidShape(12, 2, 13, 13, 3, 14), Block.makeCuboidShape(12, 5, 13, 13, 6, 14), Block.makeCuboidShape(12, 3, 14, 13, 5, 15), Block.makeCuboidShape(10.8, 10.2, 13, 11.8, 11.2, 14), Block.makeCuboidShape(10.8, 10.2, 11, 11.8, 11.2, 12), Block.makeCuboidShape(2, 11, 13, 9, 14, 14), Block.makeCuboidShape(2, 11, 7, 9, 14, 8), Block.makeCuboidShape(2, 11, 8, 3, 14, 13), Block.makeCuboidShape(1, 1, 14, 2, 9, 15), Block.makeCuboidShape(1, 1, 6, 2, 9, 7), Block.makeCuboidShape(8, 1, 14, 9, 9, 15), Block.makeCuboidShape(8, 1, 6, 9, 9, 7), Block.makeCuboidShape(2.9000000000000004, 1.9, 6.8, 4.1, 3.1, 7), Block.makeCuboidShape(4.9, 1.9, 6.8, 6.1, 3.1, 7), Block.makeCuboidShape(5, 3, 3, 6, 5, 4), Block.makeCuboidShape(4.9, 4.8, 2.9000000000000004, 6.1, 5, 4.1), Block.makeCuboidShape(2.9000000000000004, 4.8, 2.9000000000000004, 4.1, 5, 4.1), Block.makeCuboidShape(3, 2, 3, 4, 3, 7), Block.makeCuboidShape(5, 2, 3, 6, 3, 7), Block.makeCuboidShape(3, 3, 3, 4, 5, 4), Block.makeCuboidShape(2, 5, 2, 7, 11, 5), Block.makeCuboidShape(3, 11, 2, 5, 12, 4), Block.makeCuboidShape(3, 1, 1, 5, 12, 2)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SOUTH = Stream.of(Block.makeCuboidShape(3, 11, 8, 8, 14, 9), Block.makeCuboidShape(1, 0, 1, 15, 1, 15), Block.makeCuboidShape(2, 1, 2, 9, 9, 8), Block.makeCuboidShape(1, 9, 1, 10, 11, 13), Block.makeCuboidShape(3, 11, 3, 8, 13, 8), Block.makeCuboidShape(5, 8, 11.5, 6, 9, 12.5), Block.makeCuboidShape(4, 1, 11, 7, 2, 14), Block.makeCuboidShape(4, 2, 10, 7, 7, 11), Block.makeCuboidShape(4, 2, 14, 7, 7, 15), Block.makeCuboidShape(3, 2, 11, 4, 7, 14), Block.makeCuboidShape(7, 2, 11, 8, 7, 14), Block.makeCuboidShape(2, 2, 12, 3, 3, 13), Block.makeCuboidShape(2, 5, 12, 3, 6, 13), Block.makeCuboidShape(1, 3, 12, 2, 5, 13), Block.makeCuboidShape(2, 10.2, 10.8, 3, 11.2, 11.8), Block.makeCuboidShape(4, 10.2, 10.8, 5, 11.2, 11.8), Block.makeCuboidShape(2, 11, 2, 3, 14, 9), Block.makeCuboidShape(8, 11, 2, 9, 14, 9), Block.makeCuboidShape(3, 11, 2, 8, 14, 3), Block.makeCuboidShape(1, 1, 1, 2, 9, 2), Block.makeCuboidShape(9, 1, 1, 10, 9, 2), Block.makeCuboidShape(1, 1, 8, 2, 9, 9), Block.makeCuboidShape(9, 1, 8, 10, 9, 9), Block.makeCuboidShape(9, 1.9, 2.9000000000000004, 9.2, 3.1, 4.1), Block.makeCuboidShape(9, 1.9, 4.9, 9.2, 3.1, 6.1), Block.makeCuboidShape(12, 3, 5, 13, 5, 6), Block.makeCuboidShape(11.9, 4.8, 4.9, 13.1, 5, 6.1), Block.makeCuboidShape(11.9, 4.8, 2.9000000000000004, 13.1, 5, 4.1), Block.makeCuboidShape(9, 2, 3, 13, 3, 4), Block.makeCuboidShape(9, 2, 5, 13, 3, 6), Block.makeCuboidShape(12, 3, 3, 13, 5, 4), Block.makeCuboidShape(11, 5, 2, 14, 11, 7), Block.makeCuboidShape(12, 11, 3, 14, 12, 5), Block.makeCuboidShape(14, 1, 3, 15, 12, 5)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape WEST = Stream.of(Block.makeCuboidShape(7, 11, 3, 8, 14, 8), Block.makeCuboidShape(1, 0, 1, 15, 1, 15), Block.makeCuboidShape(8, 1, 2, 14, 9, 9), Block.makeCuboidShape(3, 9, 1, 15, 11, 10), Block.makeCuboidShape(8, 11, 3, 13, 13, 8), Block.makeCuboidShape(3.5, 8, 5, 4.5, 9, 6), Block.makeCuboidShape(2, 1, 4, 5, 2, 7), Block.makeCuboidShape(5, 2, 4, 6, 7, 7), Block.makeCuboidShape(1, 2, 4, 2, 7, 7), Block.makeCuboidShape(2, 2, 3, 5, 7, 4), Block.makeCuboidShape(2, 2, 7, 5, 7, 8), Block.makeCuboidShape(3, 2, 2, 4, 3, 3), Block.makeCuboidShape(3, 5, 2, 4, 6, 3), Block.makeCuboidShape(3, 3, 1, 4, 5, 2), Block.makeCuboidShape(4.199999999999999, 10.2, 2, 5.199999999999999, 11.2, 3), Block.makeCuboidShape(4.199999999999999, 10.2, 4, 5.199999999999999, 11.2, 5), Block.makeCuboidShape(7, 11, 2, 14, 14, 3), Block.makeCuboidShape(7, 11, 8, 14, 14, 9), Block.makeCuboidShape(13, 11, 3, 14, 14, 8), Block.makeCuboidShape(14, 1, 1, 15, 9, 2), Block.makeCuboidShape(14, 1, 9, 15, 9, 10), Block.makeCuboidShape(7, 1, 1, 8, 9, 2), Block.makeCuboidShape(7, 1, 9, 8, 9, 10), Block.makeCuboidShape(11.9, 1.9, 9, 13.1, 3.1, 9.2), Block.makeCuboidShape(9.9, 1.9, 9, 11.1, 3.1, 9.2), Block.makeCuboidShape(10, 3, 12, 11, 5, 13), Block.makeCuboidShape(9.9, 4.8, 11.9, 11.1, 5, 13.1), Block.makeCuboidShape(11.9, 4.8, 11.9, 13.1, 5, 13.1), Block.makeCuboidShape(12, 2, 9, 13, 3, 13), Block.makeCuboidShape(10, 2, 9, 11, 3, 13), Block.makeCuboidShape(12, 3, 12, 13, 5, 13), Block.makeCuboidShape(9, 5, 11, 14, 11, 14), Block.makeCuboidShape(11, 11, 12, 13, 12, 14), Block.makeCuboidShape(11, 1, 14, 13, 12, 15)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); } static class DirectionalBlockBreakerShapes { - static final VoxelShape SHAPE_U = Stream.of( - Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), - Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), - Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), - Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), - Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), - Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(15, 0, 1, 16, 1, 15), - Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(15, 3, 9, 16, 13, 13), - Block.makeCuboidShape(15, 3, 3, 16, 13, 7), Block.makeCuboidShape(0, 3, 9, 1, 13, 13), - Block.makeCuboidShape(0, 3, 3, 1, 13, 7), Block.makeCuboidShape(5, 15, 5, 11, 16, 11), - Block.makeCuboidShape(3, 15, 6, 5, 16, 10), Block.makeCuboidShape(11, 15, 6, 13, 16, 10) - ).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); - - static final VoxelShape SHAPE_D = Stream.of( - Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), - Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), - Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), - Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), - Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), - Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), - Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(15, 3, 3, 16, 13, 7), - Block.makeCuboidShape(15, 3, 9, 16, 13, 13), Block.makeCuboidShape(0, 3, 3, 1, 13, 7), - Block.makeCuboidShape(0, 3, 9, 1, 13, 13), Block.makeCuboidShape(5, 0, 5, 11, 1, 11), - Block.makeCuboidShape(3, 0, 6, 5, 1, 10), Block.makeCuboidShape(11, 0, 6, 13, 1, 10) - ).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); - - static final VoxelShape SHAPE_N = Stream.of( - Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), - Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), - Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), - Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), - Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), - Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), - Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(15, 9, 3, 16, 13, 13), - Block.makeCuboidShape(15, 3, 3, 16, 7, 13), Block.makeCuboidShape(0, 9, 3, 1, 13, 13), - Block.makeCuboidShape(0, 3, 3, 1, 7, 13), Block.makeCuboidShape(5, 5, 0, 11, 11, 1), - Block.makeCuboidShape(3, 6, 0, 5, 10, 1), Block.makeCuboidShape(11, 6, 0, 13, 10, 1) - ).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); - - - static final VoxelShape SHAPE_E = Stream.of( - Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), - Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), - Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), - Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), - Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), - Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), - Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(3, 9, 15, 13, 13, 16), - Block.makeCuboidShape(3, 3, 15, 13, 7, 16), Block.makeCuboidShape(3, 9, 0, 13, 13, 1), - Block.makeCuboidShape(3, 3, 0, 13, 7, 1), Block.makeCuboidShape(15, 5, 5, 16, 11, 11), - Block.makeCuboidShape(15, 6, 3, 16, 10, 5), Block.makeCuboidShape(15, 6, 11, 16, 10, 13) - ).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); - - static final VoxelShape SHAPE_S = Stream.of( - Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), - Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), - Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), - Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), - Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), - Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), - Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(0, 9, 3, 1, 13, 13), - Block.makeCuboidShape(0, 3, 3, 1, 7, 13), Block.makeCuboidShape(15, 9, 3, 16, 13, 13), - Block.makeCuboidShape(15, 3, 3, 16, 7, 13), Block.makeCuboidShape(5, 5, 15, 11, 11, 16), - Block.makeCuboidShape(11, 6, 15, 13, 10, 16), Block.makeCuboidShape(3, 6, 15, 5, 10, 16) - ).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); - - static final VoxelShape SHAPE_W = Stream.of( - Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), - Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), - Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), - Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), - Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), - Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), - Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(3, 9, 0, 13, 13, 1), - Block.makeCuboidShape(3, 3, 0, 13, 7, 1), Block.makeCuboidShape(3, 9, 15, 13, 13, 16), - Block.makeCuboidShape(3, 3, 15, 13, 7, 16), Block.makeCuboidShape(0, 5, 5, 1, 11, 11), - Block.makeCuboidShape(0, 6, 11, 1, 10, 13), Block.makeCuboidShape(0, 6, 3, 1, 10, 5) - ).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_U = Stream.of(Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(15, 3, 9, 16, 13, 13), Block.makeCuboidShape(15, 3, 3, 16, 13, 7), Block.makeCuboidShape(0, 3, 9, 1, 13, 13), Block.makeCuboidShape(0, 3, 3, 1, 13, 7), Block.makeCuboidShape(5, 15, 5, 11, 16, 11), Block.makeCuboidShape(3, 15, 6, 5, 16, 10), Block.makeCuboidShape(11, 15, 6, 13, 16, 10)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_D = Stream.of(Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(15, 3, 3, 16, 13, 7), Block.makeCuboidShape(15, 3, 9, 16, 13, 13), Block.makeCuboidShape(0, 3, 3, 1, 13, 7), Block.makeCuboidShape(0, 3, 9, 1, 13, 13), Block.makeCuboidShape(5, 0, 5, 11, 1, 11), Block.makeCuboidShape(3, 0, 6, 5, 1, 10), Block.makeCuboidShape(11, 0, 6, 13, 1, 10)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_N = Stream.of(Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(15, 9, 3, 16, 13, 13), Block.makeCuboidShape(15, 3, 3, 16, 7, 13), Block.makeCuboidShape(0, 9, 3, 1, 13, 13), Block.makeCuboidShape(0, 3, 3, 1, 7, 13), Block.makeCuboidShape(5, 5, 0, 11, 11, 1), Block.makeCuboidShape(3, 6, 0, 5, 10, 1), Block.makeCuboidShape(11, 6, 0, 13, 10, 1)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_E = Stream.of(Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(3, 9, 15, 13, 13, 16), Block.makeCuboidShape(3, 3, 15, 13, 7, 16), Block.makeCuboidShape(3, 9, 0, 13, 13, 1), Block.makeCuboidShape(3, 3, 0, 13, 7, 1), Block.makeCuboidShape(15, 5, 5, 16, 11, 11), Block.makeCuboidShape(15, 6, 3, 16, 10, 5), Block.makeCuboidShape(15, 6, 11, 16, 10, 13)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_S = Stream.of(Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(0, 9, 3, 1, 13, 13), Block.makeCuboidShape(0, 3, 3, 1, 7, 13), Block.makeCuboidShape(15, 9, 3, 16, 13, 13), Block.makeCuboidShape(15, 3, 3, 16, 7, 13), Block.makeCuboidShape(5, 5, 15, 11, 11, 16), Block.makeCuboidShape(11, 6, 15, 13, 10, 16), Block.makeCuboidShape(3, 6, 15, 5, 10, 16)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_W = Stream.of(Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(3, 9, 0, 13, 13, 1), Block.makeCuboidShape(3, 3, 0, 13, 7, 1), Block.makeCuboidShape(3, 9, 15, 13, 13, 16), Block.makeCuboidShape(3, 3, 15, 13, 7, 16), Block.makeCuboidShape(0, 5, 5, 1, 11, 11), Block.makeCuboidShape(0, 6, 11, 1, 10, 13), Block.makeCuboidShape(0, 6, 3, 1, 10, 5)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); } static class FarmerShapes { - static final VoxelShape SHAPE_N = Stream.of( - Block.makeCuboidShape(11, 14, 4, 12, 15, 5), Block.makeCuboidShape(0, 0, 0, 1, 1, 16), - Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(15, 0, 0, 16, 1, 16), - Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), - Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), - Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), - Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), - Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(4, 11, 4, 12, 12, 12), - Block.makeCuboidShape(4, 14, 4, 5, 15, 5), Block.makeCuboidShape(3, 12, 5, 4, 14, 11), - Block.makeCuboidShape(12, 12, 5, 13, 14, 11), Block.makeCuboidShape(5, 12, 3, 11, 14, 4), - Block.makeCuboidShape(5, 12, 12, 11, 14, 13), Block.makeCuboidShape(11, 12, 11, 12, 14, 12), - Block.makeCuboidShape(11, 12, 4, 12, 14, 5), Block.makeCuboidShape(4, 12, 4, 5, 14, 5), - Block.makeCuboidShape(4, 12, 11, 5, 14, 12), Block.makeCuboidShape(4, 14, 11, 5, 15, 12), - Block.makeCuboidShape(11, 14, 11, 12, 15, 12), Block.makeCuboidShape(2, 14, 2, 4, 15, 14), - Block.makeCuboidShape(4, 14, 2, 12, 15, 4), Block.makeCuboidShape(4, 14, 12, 12, 15, 14), - Block.makeCuboidShape(12, 14, 2, 14, 15, 14), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), - Block.makeCuboidShape(1, 0, 2, 2, 15, 14), Block.makeCuboidShape(14, 0, 2, 15, 15, 14), - Block.makeCuboidShape(1, 0, 1, 5, 15, 2), Block.makeCuboidShape(5, 5, 2, 11, 11, 3), - Block.makeCuboidShape(5, 0, 1, 11, 5, 2), Block.makeCuboidShape(5, 11, 1, 11, 15, 2), - Block.makeCuboidShape(11, 0, 1, 15, 15, 2), Block.makeCuboidShape(1, 0, 14, 15, 15, 15) - ).reduce((v1, v2) -> { - return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR); - }).get(); - - static final VoxelShape SHAPE_E = Stream.of( - Block.makeCuboidShape(11, 14, 11, 12, 15, 12), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), - Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), - Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), - Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), - Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), - Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), - Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(4, 11, 4, 12, 12, 12), - Block.makeCuboidShape(11, 14, 4, 12, 15, 5), Block.makeCuboidShape(5, 12, 3, 11, 14, 4), - Block.makeCuboidShape(5, 12, 12, 11, 14, 13), Block.makeCuboidShape(12, 12, 5, 13, 14, 11), - Block.makeCuboidShape(3, 12, 5, 4, 14, 11), Block.makeCuboidShape(4, 12, 11, 5, 14, 12), - Block.makeCuboidShape(11, 12, 11, 12, 14, 12), Block.makeCuboidShape(11, 12, 4, 12, 14, 5), - Block.makeCuboidShape(4, 12, 4, 5, 14, 5), Block.makeCuboidShape(4, 14, 4, 5, 15, 5), - Block.makeCuboidShape(4, 14, 11, 5, 15, 12), Block.makeCuboidShape(2, 14, 2, 14, 15, 4), - Block.makeCuboidShape(12, 14, 4, 14, 15, 12), Block.makeCuboidShape(2, 14, 4, 4, 15, 12), - Block.makeCuboidShape(2, 14, 12, 14, 15, 14), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), - Block.makeCuboidShape(2, 0, 1, 14, 15, 2), Block.makeCuboidShape(2, 0, 14, 14, 15, 15), - Block.makeCuboidShape(14, 0, 1, 15, 15, 5), Block.makeCuboidShape(13, 5, 5, 14, 11, 11), - Block.makeCuboidShape(14, 0, 5, 15, 5, 11), Block.makeCuboidShape(14, 11, 5, 15, 15, 11), - Block.makeCuboidShape(14, 0, 11, 15, 15, 15), Block.makeCuboidShape(1, 0, 1, 2, 15, 15) - ).reduce((v1, v2) -> { - return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR); - }).get(); - - static final VoxelShape SHAPE_S = Stream.of( - Block.makeCuboidShape(4, 14, 11, 5, 15, 12), Block.makeCuboidShape(15, 0, 0, 16, 1, 16), - Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(0, 0, 0, 1, 1, 16), - Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), - Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), - Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), - Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), - Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(4, 11, 4, 12, 12, 12), - Block.makeCuboidShape(11, 14, 11, 12, 15, 12), Block.makeCuboidShape(12, 12, 5, 13, 14, 11), - Block.makeCuboidShape(3, 12, 5, 4, 14, 11), Block.makeCuboidShape(5, 12, 12, 11, 14, 13), - Block.makeCuboidShape(5, 12, 3, 11, 14, 4), Block.makeCuboidShape(4, 12, 4, 5, 14, 5), - Block.makeCuboidShape(4, 12, 11, 5, 14, 12), Block.makeCuboidShape(11, 12, 11, 12, 14, 12), - Block.makeCuboidShape(11, 12, 4, 12, 14, 5), Block.makeCuboidShape(11, 14, 4, 12, 15, 5), - Block.makeCuboidShape(4, 14, 4, 5, 15, 5), Block.makeCuboidShape(12, 14, 2, 14, 15, 14), - Block.makeCuboidShape(4, 14, 12, 12, 15, 14), Block.makeCuboidShape(4, 14, 2, 12, 15, 4), - Block.makeCuboidShape(2, 14, 2, 4, 15, 14), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), - Block.makeCuboidShape(14, 0, 2, 15, 15, 14), Block.makeCuboidShape(1, 0, 2, 2, 15, 14), - Block.makeCuboidShape(11, 0, 14, 15, 15, 15), Block.makeCuboidShape(5, 5, 13, 11, 11, 14), - Block.makeCuboidShape(5, 0, 14, 11, 5, 15), Block.makeCuboidShape(5, 11, 14, 11, 15, 15), - Block.makeCuboidShape(1, 0, 14, 5, 15, 15), Block.makeCuboidShape(1, 0, 1, 15, 15, 2) - ).reduce((v1, v2) -> { - return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR); - }).get(); - - static final VoxelShape SHAPE_W = Stream.of( - Block.makeCuboidShape(4, 14, 4, 5, 15, 5), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), - Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), - Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), - Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), - Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), - Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), - Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(4, 11, 4, 12, 12, 12), - Block.makeCuboidShape(4, 14, 11, 5, 15, 12), Block.makeCuboidShape(5, 12, 12, 11, 14, 13), - Block.makeCuboidShape(5, 12, 3, 11, 14, 4), Block.makeCuboidShape(3, 12, 5, 4, 14, 11), - Block.makeCuboidShape(12, 12, 5, 13, 14, 11), Block.makeCuboidShape(11, 12, 4, 12, 14, 5), - Block.makeCuboidShape(4, 12, 4, 5, 14, 5), Block.makeCuboidShape(4, 12, 11, 5, 14, 12), - Block.makeCuboidShape(11, 12, 11, 12, 14, 12), Block.makeCuboidShape(11, 14, 11, 12, 15, 12), - Block.makeCuboidShape(11, 14, 4, 12, 15, 5), Block.makeCuboidShape(2, 14, 12, 14, 15, 14), - Block.makeCuboidShape(2, 14, 4, 4, 15, 12), Block.makeCuboidShape(12, 14, 4, 14, 15, 12), - Block.makeCuboidShape(2, 14, 2, 14, 15, 4), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), - Block.makeCuboidShape(2, 0, 14, 14, 15, 15), Block.makeCuboidShape(2, 0, 1, 14, 15, 2), - Block.makeCuboidShape(1, 0, 11, 2, 15, 15), Block.makeCuboidShape(2, 5, 5, 3, 11, 11), - Block.makeCuboidShape(1, 0, 5, 2, 5, 11), Block.makeCuboidShape(1, 11, 5, 2, 15, 11), - Block.makeCuboidShape(1, 0, 1, 2, 15, 5), Block.makeCuboidShape(14, 0, 1, 15, 15, 15) - ).reduce((v1, v2) -> { - return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR); - }).get(); + static final VoxelShape SHAPE_N = Stream.of(Block.makeCuboidShape(11, 14, 4, 12, 15, 5), Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(4, 11, 4, 12, 12, 12), Block.makeCuboidShape(4, 14, 4, 5, 15, 5), Block.makeCuboidShape(3, 12, 5, 4, 14, 11), Block.makeCuboidShape(12, 12, 5, 13, 14, 11), Block.makeCuboidShape(5, 12, 3, 11, 14, 4), Block.makeCuboidShape(5, 12, 12, 11, 14, 13), Block.makeCuboidShape(11, 12, 11, 12, 14, 12), Block.makeCuboidShape(11, 12, 4, 12, 14, 5), Block.makeCuboidShape(4, 12, 4, 5, 14, 5), Block.makeCuboidShape(4, 12, 11, 5, 14, 12), Block.makeCuboidShape(4, 14, 11, 5, 15, 12), Block.makeCuboidShape(11, 14, 11, 12, 15, 12), Block.makeCuboidShape(2, 14, 2, 4, 15, 14), Block.makeCuboidShape(4, 14, 2, 12, 15, 4), Block.makeCuboidShape(4, 14, 12, 12, 15, 14), Block.makeCuboidShape(12, 14, 2, 14, 15, 14), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(1, 0, 2, 2, 15, 14), Block.makeCuboidShape(14, 0, 2, 15, 15, 14), Block.makeCuboidShape(1, 0, 1, 5, 15, 2), Block.makeCuboidShape(5, 5, 2, 11, 11, 3), Block.makeCuboidShape(5, 0, 1, 11, 5, 2), Block.makeCuboidShape(5, 11, 1, 11, 15, 2), Block.makeCuboidShape(11, 0, 1, 15, 15, 2), Block.makeCuboidShape(1, 0, 14, 15, 15, 15)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_E = Stream.of(Block.makeCuboidShape(11, 14, 11, 12, 15, 12), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(4, 11, 4, 12, 12, 12), Block.makeCuboidShape(11, 14, 4, 12, 15, 5), Block.makeCuboidShape(5, 12, 3, 11, 14, 4), Block.makeCuboidShape(5, 12, 12, 11, 14, 13), Block.makeCuboidShape(12, 12, 5, 13, 14, 11), Block.makeCuboidShape(3, 12, 5, 4, 14, 11), Block.makeCuboidShape(4, 12, 11, 5, 14, 12), Block.makeCuboidShape(11, 12, 11, 12, 14, 12), Block.makeCuboidShape(11, 12, 4, 12, 14, 5), Block.makeCuboidShape(4, 12, 4, 5, 14, 5), Block.makeCuboidShape(4, 14, 4, 5, 15, 5), Block.makeCuboidShape(4, 14, 11, 5, 15, 12), Block.makeCuboidShape(2, 14, 2, 14, 15, 4), Block.makeCuboidShape(12, 14, 4, 14, 15, 12), Block.makeCuboidShape(2, 14, 4, 4, 15, 12), Block.makeCuboidShape(2, 14, 12, 14, 15, 14), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(2, 0, 1, 14, 15, 2), Block.makeCuboidShape(2, 0, 14, 14, 15, 15), Block.makeCuboidShape(14, 0, 1, 15, 15, 5), Block.makeCuboidShape(13, 5, 5, 14, 11, 11), Block.makeCuboidShape(14, 0, 5, 15, 5, 11), Block.makeCuboidShape(14, 11, 5, 15, 15, 11), Block.makeCuboidShape(14, 0, 11, 15, 15, 15), Block.makeCuboidShape(1, 0, 1, 2, 15, 15)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_S = Stream.of(Block.makeCuboidShape(4, 14, 11, 5, 15, 12), Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(4, 11, 4, 12, 12, 12), Block.makeCuboidShape(11, 14, 11, 12, 15, 12), Block.makeCuboidShape(12, 12, 5, 13, 14, 11), Block.makeCuboidShape(3, 12, 5, 4, 14, 11), Block.makeCuboidShape(5, 12, 12, 11, 14, 13), Block.makeCuboidShape(5, 12, 3, 11, 14, 4), Block.makeCuboidShape(4, 12, 4, 5, 14, 5), Block.makeCuboidShape(4, 12, 11, 5, 14, 12), Block.makeCuboidShape(11, 12, 11, 12, 14, 12), Block.makeCuboidShape(11, 12, 4, 12, 14, 5), Block.makeCuboidShape(11, 14, 4, 12, 15, 5), Block.makeCuboidShape(4, 14, 4, 5, 15, 5), Block.makeCuboidShape(12, 14, 2, 14, 15, 14), Block.makeCuboidShape(4, 14, 12, 12, 15, 14), Block.makeCuboidShape(4, 14, 2, 12, 15, 4), Block.makeCuboidShape(2, 14, 2, 4, 15, 14), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(14, 0, 2, 15, 15, 14), Block.makeCuboidShape(1, 0, 2, 2, 15, 14), Block.makeCuboidShape(11, 0, 14, 15, 15, 15), Block.makeCuboidShape(5, 5, 13, 11, 11, 14), Block.makeCuboidShape(5, 0, 14, 11, 5, 15), Block.makeCuboidShape(5, 11, 14, 11, 15, 15), Block.makeCuboidShape(1, 0, 14, 5, 15, 15), Block.makeCuboidShape(1, 0, 1, 15, 15, 2)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_W = Stream.of(Block.makeCuboidShape(4, 14, 4, 5, 15, 5), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(4, 11, 4, 12, 12, 12), Block.makeCuboidShape(4, 14, 11, 5, 15, 12), Block.makeCuboidShape(5, 12, 12, 11, 14, 13), Block.makeCuboidShape(5, 12, 3, 11, 14, 4), Block.makeCuboidShape(3, 12, 5, 4, 14, 11), Block.makeCuboidShape(12, 12, 5, 13, 14, 11), Block.makeCuboidShape(11, 12, 4, 12, 14, 5), Block.makeCuboidShape(4, 12, 4, 5, 14, 5), Block.makeCuboidShape(4, 12, 11, 5, 14, 12), Block.makeCuboidShape(11, 12, 11, 12, 14, 12), Block.makeCuboidShape(11, 14, 11, 12, 15, 12), Block.makeCuboidShape(11, 14, 4, 12, 15, 5), Block.makeCuboidShape(2, 14, 12, 14, 15, 14), Block.makeCuboidShape(2, 14, 4, 4, 15, 12), Block.makeCuboidShape(12, 14, 4, 14, 15, 12), Block.makeCuboidShape(2, 14, 2, 14, 15, 4), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(2, 0, 14, 14, 15, 15), Block.makeCuboidShape(2, 0, 1, 14, 15, 2), Block.makeCuboidShape(1, 0, 11, 2, 15, 15), Block.makeCuboidShape(2, 5, 5, 3, 11, 11), Block.makeCuboidShape(1, 0, 5, 2, 5, 11), Block.makeCuboidShape(1, 11, 5, 2, 15, 11), Block.makeCuboidShape(1, 0, 1, 2, 15, 5), Block.makeCuboidShape(14, 0, 1, 15, 15, 15)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); } static class FluidCollectorShapes { - static final VoxelShape SHAPE_U = Stream.of( - Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), - Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), - Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), - Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), - Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), - Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(15, 0, 1, 16, 1, 15), - Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(15, 3, 6, 16, 13, 10), - Block.makeCuboidShape(0, 3, 6, 1, 13, 10), Block.makeCuboidShape(5, 15, 5, 11, 16, 11), - Block.makeCuboidShape(3, 15, 6, 5, 16, 10), Block.makeCuboidShape(11, 15, 6, 13, 16, 10), - Block.makeCuboidShape(6, 15, 11, 10, 16, 13), Block.makeCuboidShape(6, 15, 3, 10, 16, 5) - ).reduce((v1, v2) -> { - return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR); - }).get(); - - static final VoxelShape SHAPE_D = Stream.of( - Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), - Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), - Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), - Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), - Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), - Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), - Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(15, 3, 6, 16, 13, 10), - Block.makeCuboidShape(0, 3, 6, 1, 13, 10), Block.makeCuboidShape(5, 0, 5, 11, 1, 11), - Block.makeCuboidShape(3, 0, 6, 5, 1, 10), Block.makeCuboidShape(11, 0, 6, 13, 1, 10), - Block.makeCuboidShape(6, 0, 3, 10, 1, 5), Block.makeCuboidShape(6, 0, 11, 10, 1, 13) - ).reduce((v1, v2) -> { - return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR); - }).get(); - - static final VoxelShape SHAPE_N = Stream.of( - Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), - Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), - Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), - Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), - Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), - Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), - Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(15, 6, 3, 16, 10, 13), - Block.makeCuboidShape(0, 6, 3, 1, 10, 13), Block.makeCuboidShape(5, 5, 0, 11, 11, 1), - Block.makeCuboidShape(3, 6, 0, 5, 10, 1), Block.makeCuboidShape(11, 6, 0, 13, 10, 1), - Block.makeCuboidShape(6, 11, 0, 10, 13, 1), Block.makeCuboidShape(6, 3, 0, 10, 5, 1) - ).reduce((v1, v2) -> { - return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR); - }).get(); - - - static final VoxelShape SHAPE_E = Stream.of( - Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), - Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), - Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), - Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), - Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), - Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), - Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(3, 6, 15, 13, 10, 16), - Block.makeCuboidShape(3, 6, 0, 13, 10, 1), Block.makeCuboidShape(15, 5, 5, 16, 11, 11), - Block.makeCuboidShape(15, 6, 3, 16, 10, 5), Block.makeCuboidShape(15, 6, 11, 16, 10, 13), - Block.makeCuboidShape(15, 11, 6, 16, 13, 10), Block.makeCuboidShape(15, 3, 6, 16, 5, 10) - ).reduce((v1, v2) -> { - return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR); - }).get(); - - static final VoxelShape SHAPE_S = Stream.of( - Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), - Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), - Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), - Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), - Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), - Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), - Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(0, 6, 3, 1, 10, 13), - Block.makeCuboidShape(15, 6, 3, 16, 10, 13), Block.makeCuboidShape(5, 5, 15, 11, 11, 16), - Block.makeCuboidShape(11, 6, 15, 13, 10, 16), Block.makeCuboidShape(3, 6, 15, 5, 10, 16), - Block.makeCuboidShape(6, 11, 15, 10, 13, 16), Block.makeCuboidShape(6, 3, 15, 10, 5, 16) - ).reduce((v1, v2) -> { - return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR); - }).get(); - - static final VoxelShape SHAPE_W = Stream.of( - Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), - Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), - Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), - Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), - Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), - Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), - Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(3, 6, 0, 13, 10, 1), - Block.makeCuboidShape(3, 6, 15, 13, 10, 16), Block.makeCuboidShape(0, 5, 5, 1, 11, 11), - Block.makeCuboidShape(0, 6, 11, 1, 10, 13), Block.makeCuboidShape(0, 6, 3, 1, 10, 5), - Block.makeCuboidShape(0, 11, 6, 1, 13, 10), Block.makeCuboidShape(0, 3, 6, 1, 5, 10) - ).reduce((v1, v2) -> { - return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR); - }).get(); + static final VoxelShape SHAPE_U = Stream.of(Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(15, 3, 6, 16, 13, 10), Block.makeCuboidShape(0, 3, 6, 1, 13, 10), Block.makeCuboidShape(5, 15, 5, 11, 16, 11), Block.makeCuboidShape(3, 15, 6, 5, 16, 10), Block.makeCuboidShape(11, 15, 6, 13, 16, 10), Block.makeCuboidShape(6, 15, 11, 10, 16, 13), Block.makeCuboidShape(6, 15, 3, 10, 16, 5)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_D = Stream.of(Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(15, 3, 6, 16, 13, 10), Block.makeCuboidShape(0, 3, 6, 1, 13, 10), Block.makeCuboidShape(5, 0, 5, 11, 1, 11), Block.makeCuboidShape(3, 0, 6, 5, 1, 10), Block.makeCuboidShape(11, 0, 6, 13, 1, 10), Block.makeCuboidShape(6, 0, 3, 10, 1, 5), Block.makeCuboidShape(6, 0, 11, 10, 1, 13)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_N = Stream.of(Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(15, 6, 3, 16, 10, 13), Block.makeCuboidShape(0, 6, 3, 1, 10, 13), Block.makeCuboidShape(5, 5, 0, 11, 11, 1), Block.makeCuboidShape(3, 6, 0, 5, 10, 1), Block.makeCuboidShape(11, 6, 0, 13, 10, 1), Block.makeCuboidShape(6, 11, 0, 10, 13, 1), Block.makeCuboidShape(6, 3, 0, 10, 5, 1)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_E = Stream.of(Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(3, 6, 15, 13, 10, 16), Block.makeCuboidShape(3, 6, 0, 13, 10, 1), Block.makeCuboidShape(15, 5, 5, 16, 11, 11), Block.makeCuboidShape(15, 6, 3, 16, 10, 5), Block.makeCuboidShape(15, 6, 11, 16, 10, 13), Block.makeCuboidShape(15, 11, 6, 16, 13, 10), Block.makeCuboidShape(15, 3, 6, 16, 5, 10)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_S = Stream.of(Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(0, 6, 3, 1, 10, 13), Block.makeCuboidShape(15, 6, 3, 16, 10, 13), Block.makeCuboidShape(5, 5, 15, 11, 11, 16), Block.makeCuboidShape(11, 6, 15, 13, 10, 16), Block.makeCuboidShape(3, 6, 15, 5, 10, 16), Block.makeCuboidShape(6, 11, 15, 10, 13, 16), Block.makeCuboidShape(6, 3, 15, 10, 5, 16)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_W = Stream.of(Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(3, 6, 0, 13, 10, 1), Block.makeCuboidShape(3, 6, 15, 13, 10, 16), Block.makeCuboidShape(0, 5, 5, 1, 11, 11), Block.makeCuboidShape(0, 6, 11, 1, 10, 13), Block.makeCuboidShape(0, 6, 3, 1, 10, 5), Block.makeCuboidShape(0, 11, 6, 1, 13, 10), Block.makeCuboidShape(0, 3, 6, 1, 5, 10)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); } static class FurnaceDoubleShapes { - static final VoxelShape SHAPE_N = Stream.of( - Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), - Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), - Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), - Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), - Block.makeCuboidShape(0, 0, 0, 16, 1, 16), Block.makeCuboidShape(5, 14, 6, 11, 15, 7), - Block.makeCuboidShape(5, 14, 8, 11, 15, 9), Block.makeCuboidShape(5, 14, 10, 11, 15, 14), - Block.makeCuboidShape(5, 14, 2, 11, 15, 5), Block.makeCuboidShape(11, 14, 2, 14, 15, 14), - Block.makeCuboidShape(2, 14, 2, 5, 15, 14), Block.makeCuboidShape(1, 1, 2, 2, 15, 14), - Block.makeCuboidShape(14, 1, 2, 15, 15, 14), Block.makeCuboidShape(1, 1, 14, 15, 15, 15), - Block.makeCuboidShape(7, 3, 1, 9, 7, 2), Block.makeCuboidShape(3, 7, 1, 13, 15, 2), - Block.makeCuboidShape(3, 1, 1, 13, 3, 2), Block.makeCuboidShape(1, 1, 1, 3, 15, 2), - Block.makeCuboidShape(13, 1, 1, 15, 15, 2), Block.makeCuboidShape(5, 13, 5, 11, 14, 10), - Block.makeCuboidShape(2, 3, 2, 14, 8, 3) - ).reduce((v1, v2) -> { - return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR); - }).get(); + static final VoxelShape SHAPE_N = Stream.of(Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 0, 0, 16, 1, 16), Block.makeCuboidShape(5, 14, 6, 11, 15, 7), Block.makeCuboidShape(5, 14, 8, 11, 15, 9), Block.makeCuboidShape(5, 14, 10, 11, 15, 14), Block.makeCuboidShape(5, 14, 2, 11, 15, 5), Block.makeCuboidShape(11, 14, 2, 14, 15, 14), Block.makeCuboidShape(2, 14, 2, 5, 15, 14), Block.makeCuboidShape(1, 1, 2, 2, 15, 14), Block.makeCuboidShape(14, 1, 2, 15, 15, 14), Block.makeCuboidShape(1, 1, 14, 15, 15, 15), Block.makeCuboidShape(7, 3, 1, 9, 7, 2), Block.makeCuboidShape(3, 7, 1, 13, 15, 2), Block.makeCuboidShape(3, 1, 1, 13, 3, 2), Block.makeCuboidShape(1, 1, 1, 3, 15, 2), Block.makeCuboidShape(13, 1, 1, 15, 15, 2), Block.makeCuboidShape(5, 13, 5, 11, 14, 10), Block.makeCuboidShape(2, 3, 2, 14, 8, 3)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_E = Stream.of(Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 0, 0, 16, 1, 16), Block.makeCuboidShape(9, 14, 5, 10, 15, 11), Block.makeCuboidShape(7, 14, 5, 8, 15, 11), Block.makeCuboidShape(2, 14, 5, 6, 15, 11), Block.makeCuboidShape(11, 14, 5, 14, 15, 11), Block.makeCuboidShape(2, 14, 11, 14, 15, 14), Block.makeCuboidShape(2, 14, 2, 14, 15, 5), Block.makeCuboidShape(2, 1, 1, 14, 15, 2), Block.makeCuboidShape(2, 1, 14, 14, 15, 15), Block.makeCuboidShape(1, 1, 1, 2, 15, 15), Block.makeCuboidShape(14, 3, 7, 15, 7, 9), Block.makeCuboidShape(14, 7, 3, 15, 15, 13), Block.makeCuboidShape(14, 1, 3, 15, 3, 13), Block.makeCuboidShape(14, 1, 1, 15, 15, 3), Block.makeCuboidShape(14, 1, 13, 15, 15, 15), Block.makeCuboidShape(6, 13, 5, 11, 14, 11), Block.makeCuboidShape(13, 3, 2, 14, 8, 14)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_S = Stream.of(Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(0, 0, 0, 16, 1, 16), Block.makeCuboidShape(5, 14, 9, 11, 15, 10), Block.makeCuboidShape(5, 14, 7, 11, 15, 8), Block.makeCuboidShape(5, 14, 2, 11, 15, 6), Block.makeCuboidShape(5, 14, 11, 11, 15, 14), Block.makeCuboidShape(2, 14, 2, 5, 15, 14), Block.makeCuboidShape(11, 14, 2, 14, 15, 14), Block.makeCuboidShape(14, 1, 2, 15, 15, 14), Block.makeCuboidShape(1, 1, 2, 2, 15, 14), Block.makeCuboidShape(1, 1, 1, 15, 15, 2), Block.makeCuboidShape(7, 3, 14, 9, 7, 15), Block.makeCuboidShape(3, 7, 14, 13, 15, 15), Block.makeCuboidShape(3, 1, 14, 13, 3, 15), Block.makeCuboidShape(13, 1, 14, 15, 15, 15), Block.makeCuboidShape(1, 1, 14, 3, 15, 15), Block.makeCuboidShape(5, 13, 6, 11, 14, 11), Block.makeCuboidShape(2, 3, 13, 14, 8, 14)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_W = Stream.of(Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(0, 0, 0, 16, 1, 16), Block.makeCuboidShape(6, 14, 5, 7, 15, 11), Block.makeCuboidShape(8, 14, 5, 9, 15, 11), Block.makeCuboidShape(10, 14, 5, 14, 15, 11), Block.makeCuboidShape(2, 14, 5, 5, 15, 11), Block.makeCuboidShape(2, 14, 2, 14, 15, 5), Block.makeCuboidShape(2, 14, 11, 14, 15, 14), Block.makeCuboidShape(2, 1, 14, 14, 15, 15), Block.makeCuboidShape(2, 1, 1, 14, 15, 2), Block.makeCuboidShape(14, 1, 1, 15, 15, 15), Block.makeCuboidShape(1, 3, 7, 2, 7, 9), Block.makeCuboidShape(1, 7, 3, 2, 15, 13), Block.makeCuboidShape(1, 1, 3, 2, 3, 13), Block.makeCuboidShape(1, 1, 13, 2, 15, 15), Block.makeCuboidShape(1, 1, 1, 2, 15, 3), Block.makeCuboidShape(5, 13, 5, 10, 14, 11), Block.makeCuboidShape(2, 3, 2, 3, 8, 14)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + } - static final VoxelShape SHAPE_E = Stream.of( - Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), - Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), - Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), - Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), - Block.makeCuboidShape(0, 0, 0, 16, 1, 16), Block.makeCuboidShape(9, 14, 5, 10, 15, 11), - Block.makeCuboidShape(7, 14, 5, 8, 15, 11), Block.makeCuboidShape(2, 14, 5, 6, 15, 11), - Block.makeCuboidShape(11, 14, 5, 14, 15, 11), Block.makeCuboidShape(2, 14, 11, 14, 15, 14), - Block.makeCuboidShape(2, 14, 2, 14, 15, 5), Block.makeCuboidShape(2, 1, 1, 14, 15, 2), - Block.makeCuboidShape(2, 1, 14, 14, 15, 15), Block.makeCuboidShape(1, 1, 1, 2, 15, 15), - Block.makeCuboidShape(14, 3, 7, 15, 7, 9), Block.makeCuboidShape(14, 7, 3, 15, 15, 13), - Block.makeCuboidShape(14, 1, 3, 15, 3, 13), Block.makeCuboidShape(14, 1, 1, 15, 15, 3), - Block.makeCuboidShape(14, 1, 13, 15, 15, 15), Block.makeCuboidShape(6, 13, 5, 11, 14, 11), - Block.makeCuboidShape(13, 3, 2, 14, 8, 14) - ).reduce((v1, v2) -> { - return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR); - }).get(); + static final class GrinderShapes { + static final VoxelShape SHAPE_N = Stream.of(Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(14, 12, 4, 15, 15, 12), Block.makeCuboidShape(1, 0, 4, 2, 4, 12), Block.makeCuboidShape(14, 0, 4, 15, 4, 12), Block.makeCuboidShape(4, 13, 4, 12, 14, 12), Block.makeCuboidShape(11, 14, 4, 12, 15, 5), Block.makeCuboidShape(4, 14, 4, 5, 15, 5), Block.makeCuboidShape(3, 12, 5, 4, 14, 11), Block.makeCuboidShape(12, 12, 5, 13, 14, 11), Block.makeCuboidShape(5, 12, 3, 11, 14, 4), Block.makeCuboidShape(5, 12, 12, 11, 14, 13), Block.makeCuboidShape(11, 12, 11, 12, 14, 12), Block.makeCuboidShape(11, 12, 4, 12, 14, 5), Block.makeCuboidShape(4, 12, 4, 5, 14, 5), Block.makeCuboidShape(4, 12, 11, 5, 14, 12), Block.makeCuboidShape(4, 14, 11, 5, 15, 12), Block.makeCuboidShape(11, 14, 11, 12, 15, 12), Block.makeCuboidShape(2, 14, 2, 4, 15, 14), Block.makeCuboidShape(4, 14, 2, 12, 15, 4), Block.makeCuboidShape(4, 14, 12, 12, 15, 14), Block.makeCuboidShape(12, 14, 2, 14, 15, 14), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(1, 0, 2, 2, 15, 4), Block.makeCuboidShape(14, 0, 2, 15, 15, 4), Block.makeCuboidShape(1, 0, 12, 2, 15, 14), Block.makeCuboidShape(14, 0, 12, 15, 15, 14), Block.makeCuboidShape(1, 0, 1, 15, 15, 2), Block.makeCuboidShape(1, 0, 14, 15, 15, 15), Block.makeCuboidShape(13, 4, 4, 14, 12, 12), Block.makeCuboidShape(2, 4, 4, 3, 12, 12), Block.makeCuboidShape(3, 8, 0, 6, 10, 1), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(1, 12, 4, 2, 15, 12), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_E = Stream.of(Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(4, 12, 14, 12, 15, 15), Block.makeCuboidShape(4, 0, 1, 12, 4, 2), Block.makeCuboidShape(4, 0, 14, 12, 4, 15), Block.makeCuboidShape(4, 13, 4, 12, 14, 12), Block.makeCuboidShape(11, 14, 11, 12, 15, 12), Block.makeCuboidShape(11, 14, 4, 12, 15, 5), Block.makeCuboidShape(5, 12, 3, 11, 14, 4), Block.makeCuboidShape(5, 12, 12, 11, 14, 13), Block.makeCuboidShape(12, 12, 5, 13, 14, 11), Block.makeCuboidShape(3, 12, 5, 4, 14, 11), Block.makeCuboidShape(4, 12, 11, 5, 14, 12), Block.makeCuboidShape(11, 12, 11, 12, 14, 12), Block.makeCuboidShape(11, 12, 4, 12, 14, 5), Block.makeCuboidShape(4, 12, 4, 5, 14, 5), Block.makeCuboidShape(4, 14, 4, 5, 15, 5), Block.makeCuboidShape(4, 14, 11, 5, 15, 12), Block.makeCuboidShape(2, 14, 2, 14, 15, 4), Block.makeCuboidShape(12, 14, 4, 14, 15, 12), Block.makeCuboidShape(2, 14, 4, 4, 15, 12), Block.makeCuboidShape(2, 14, 12, 14, 15, 14), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(12, 0, 1, 14, 15, 2), Block.makeCuboidShape(12, 0, 14, 14, 15, 15), Block.makeCuboidShape(2, 0, 1, 4, 15, 2), Block.makeCuboidShape(2, 0, 14, 4, 15, 15), Block.makeCuboidShape(14, 0, 1, 15, 15, 15), Block.makeCuboidShape(1, 0, 1, 2, 15, 15), Block.makeCuboidShape(4, 4, 13, 12, 12, 14), Block.makeCuboidShape(4, 4, 2, 12, 12, 3), Block.makeCuboidShape(15, 8, 3, 16, 10, 6), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(4, 12, 1, 12, 15, 2), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_S = Stream.of(Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(1, 12, 4, 2, 15, 12), Block.makeCuboidShape(14, 0, 4, 15, 4, 12), Block.makeCuboidShape(1, 0, 4, 2, 4, 12), Block.makeCuboidShape(4, 13, 4, 12, 14, 12), Block.makeCuboidShape(4, 14, 11, 5, 15, 12), Block.makeCuboidShape(11, 14, 11, 12, 15, 12), Block.makeCuboidShape(12, 12, 5, 13, 14, 11), Block.makeCuboidShape(3, 12, 5, 4, 14, 11), Block.makeCuboidShape(5, 12, 12, 11, 14, 13), Block.makeCuboidShape(5, 12, 3, 11, 14, 4), Block.makeCuboidShape(4, 12, 4, 5, 14, 5), Block.makeCuboidShape(4, 12, 11, 5, 14, 12), Block.makeCuboidShape(11, 12, 11, 12, 14, 12), Block.makeCuboidShape(11, 12, 4, 12, 14, 5), Block.makeCuboidShape(11, 14, 4, 12, 15, 5), Block.makeCuboidShape(4, 14, 4, 5, 15, 5), Block.makeCuboidShape(12, 14, 2, 14, 15, 14), Block.makeCuboidShape(4, 14, 12, 12, 15, 14), Block.makeCuboidShape(4, 14, 2, 12, 15, 4), Block.makeCuboidShape(2, 14, 2, 4, 15, 14), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(14, 0, 12, 15, 15, 14), Block.makeCuboidShape(1, 0, 12, 2, 15, 14), Block.makeCuboidShape(14, 0, 2, 15, 15, 4), Block.makeCuboidShape(1, 0, 2, 2, 15, 4), Block.makeCuboidShape(1, 0, 14, 15, 15, 15), Block.makeCuboidShape(1, 0, 1, 15, 15, 2), Block.makeCuboidShape(2, 4, 4, 3, 12, 12), Block.makeCuboidShape(13, 4, 4, 14, 12, 12), Block.makeCuboidShape(10, 8, 15, 13, 10, 16), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(14, 12, 4, 15, 15, 12), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_W = Stream.of(Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(4, 12, 1, 12, 15, 2), Block.makeCuboidShape(4, 0, 14, 12, 4, 15), Block.makeCuboidShape(4, 0, 1, 12, 4, 2), Block.makeCuboidShape(4, 13, 4, 12, 14, 12), Block.makeCuboidShape(4, 14, 4, 5, 15, 5), Block.makeCuboidShape(4, 14, 11, 5, 15, 12), Block.makeCuboidShape(5, 12, 12, 11, 14, 13), Block.makeCuboidShape(5, 12, 3, 11, 14, 4), Block.makeCuboidShape(3, 12, 5, 4, 14, 11), Block.makeCuboidShape(12, 12, 5, 13, 14, 11), Block.makeCuboidShape(11, 12, 4, 12, 14, 5), Block.makeCuboidShape(4, 12, 4, 5, 14, 5), Block.makeCuboidShape(4, 12, 11, 5, 14, 12), Block.makeCuboidShape(11, 12, 11, 12, 14, 12), Block.makeCuboidShape(11, 14, 11, 12, 15, 12), Block.makeCuboidShape(11, 14, 4, 12, 15, 5), Block.makeCuboidShape(2, 14, 12, 14, 15, 14), Block.makeCuboidShape(2, 14, 4, 4, 15, 12), Block.makeCuboidShape(12, 14, 4, 14, 15, 12), Block.makeCuboidShape(2, 14, 2, 14, 15, 4), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(2, 0, 14, 4, 15, 15), Block.makeCuboidShape(2, 0, 1, 4, 15, 2), Block.makeCuboidShape(12, 0, 14, 14, 15, 15), Block.makeCuboidShape(12, 0, 1, 14, 15, 2), Block.makeCuboidShape(1, 0, 1, 2, 15, 15), Block.makeCuboidShape(14, 0, 1, 15, 15, 15), Block.makeCuboidShape(4, 4, 2, 12, 12, 3), Block.makeCuboidShape(4, 4, 13, 12, 12, 14), Block.makeCuboidShape(0, 8, 10, 1, 10, 13), Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(4, 12, 14, 12, 15, 15), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + } - static final VoxelShape SHAPE_S = Stream.of( - Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), - Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), - Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), - Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), - Block.makeCuboidShape(0, 0, 0, 16, 1, 16), Block.makeCuboidShape(5, 14, 9, 11, 15, 10), - Block.makeCuboidShape(5, 14, 7, 11, 15, 8), Block.makeCuboidShape(5, 14, 2, 11, 15, 6), - Block.makeCuboidShape(5, 14, 11, 11, 15, 14), Block.makeCuboidShape(2, 14, 2, 5, 15, 14), - Block.makeCuboidShape(11, 14, 2, 14, 15, 14), Block.makeCuboidShape(14, 1, 2, 15, 15, 14), - Block.makeCuboidShape(1, 1, 2, 2, 15, 14), Block.makeCuboidShape(1, 1, 1, 15, 15, 2), - Block.makeCuboidShape(7, 3, 14, 9, 7, 15), Block.makeCuboidShape(3, 7, 14, 13, 15, 15), - Block.makeCuboidShape(3, 1, 14, 13, 3, 15), Block.makeCuboidShape(13, 1, 14, 15, 15, 15), - Block.makeCuboidShape(1, 1, 14, 3, 15, 15), Block.makeCuboidShape(5, 13, 6, 11, 14, 11), - Block.makeCuboidShape(2, 3, 13, 14, 8, 14) - ).reduce((v1, v2) -> { - return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR); - }).get(); + static final class LampPowererShapes { + static final VoxelShape SHAPE_N = Stream.of(Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(3, 3, 15, 13, 13, 16), Block.makeCuboidShape(1, 14, 1, 15, 15, 15), Block.makeCuboidShape(1, 1, 1, 15, 2, 15), Block.makeCuboidShape(14, 2, 1, 15, 14, 15), Block.makeCuboidShape(1, 2, 1, 2, 14, 15), Block.makeCuboidShape(2, 2, 14, 14, 14, 15), Block.makeCuboidShape(2, 2, 1, 14, 14, 2), Block.makeCuboidShape(0, 7, 7, 1, 9, 10), Block.makeCuboidShape(15, 7, 6, 16, 9, 9)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_E = Stream.of(Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 3, 3, 1, 13, 13), Block.makeCuboidShape(1, 14, 1, 15, 15, 15), Block.makeCuboidShape(1, 1, 1, 15, 2, 15), Block.makeCuboidShape(1, 2, 14, 15, 14, 15), Block.makeCuboidShape(1, 2, 1, 15, 14, 2), Block.makeCuboidShape(1, 2, 2, 2, 14, 14), Block.makeCuboidShape(14, 2, 2, 15, 14, 14), Block.makeCuboidShape(6, 7, 0, 9, 9, 1), Block.makeCuboidShape(7, 7, 15, 10, 9, 16)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_S = Stream.of(Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(3, 3, 0, 13, 13, 1), Block.makeCuboidShape(1, 14, 1, 15, 15, 15), Block.makeCuboidShape(1, 1, 1, 15, 2, 15), Block.makeCuboidShape(1, 2, 1, 2, 14, 15), Block.makeCuboidShape(14, 2, 1, 15, 14, 15), Block.makeCuboidShape(2, 2, 1, 14, 14, 2), Block.makeCuboidShape(2, 2, 14, 14, 14, 15), Block.makeCuboidShape(15, 7, 6, 16, 9, 9), Block.makeCuboidShape(0, 7, 7, 1, 9, 10)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_W = Stream.of(Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 3, 3, 16, 13, 13), Block.makeCuboidShape(1, 14, 1, 15, 15, 15), Block.makeCuboidShape(1, 1, 1, 15, 2, 15), Block.makeCuboidShape(1, 2, 1, 15, 14, 2), Block.makeCuboidShape(1, 2, 14, 15, 14, 15), Block.makeCuboidShape(14, 2, 2, 15, 14, 14), Block.makeCuboidShape(1, 2, 2, 2, 14, 14), Block.makeCuboidShape(7, 7, 15, 10, 9, 16), Block.makeCuboidShape(6, 7, 0, 9, 9, 1)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + } - static final VoxelShape SHAPE_W = Stream.of( - Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), - Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), - Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), - Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), - Block.makeCuboidShape(0, 0, 0, 16, 1, 16), Block.makeCuboidShape(6, 14, 5, 7, 15, 11), - Block.makeCuboidShape(8, 14, 5, 9, 15, 11), Block.makeCuboidShape(10, 14, 5, 14, 15, 11), - Block.makeCuboidShape(2, 14, 5, 5, 15, 11), Block.makeCuboidShape(2, 14, 2, 14, 15, 5), - Block.makeCuboidShape(2, 14, 11, 14, 15, 14), Block.makeCuboidShape(2, 1, 14, 14, 15, 15), - Block.makeCuboidShape(2, 1, 1, 14, 15, 2), Block.makeCuboidShape(14, 1, 1, 15, 15, 15), - Block.makeCuboidShape(1, 3, 7, 2, 7, 9), Block.makeCuboidShape(1, 7, 3, 2, 15, 13), - Block.makeCuboidShape(1, 1, 3, 2, 3, 13), Block.makeCuboidShape(1, 1, 13, 2, 15, 15), - Block.makeCuboidShape(1, 1, 1, 2, 15, 3), Block.makeCuboidShape(5, 13, 5, 10, 14, 11), - Block.makeCuboidShape(2, 3, 2, 3, 8, 14) - ).reduce((v1, v2) -> { - return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR); - }).get(); + static final class OilGeneratorShapes { + static final VoxelShape SHAPE_N = Stream.of(Block.makeCuboidShape(4, 3, 1.5, 12, 4, 2), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(12, 3, 1, 13, 4, 2), Block.makeCuboidShape(3, 3, 1, 4, 4, 2), Block.makeCuboidShape(3, 7, 1, 4, 8, 2), Block.makeCuboidShape(12, 7, 1, 13, 8, 2), Block.makeCuboidShape(4, 10, 0.5, 6, 11, 1), Block.makeCuboidShape(4, 13, 0.5, 6, 14, 1), Block.makeCuboidShape(3, 11, 0.5, 4, 13, 1), Block.makeCuboidShape(6, 11, 0.5, 7, 13, 1), Block.makeCuboidShape(4, 11, 0, 6, 13, 1), Block.makeCuboidShape(5, 5, 1.5, 6, 6, 2), Block.makeCuboidShape(6, 4, 1.5, 7, 5, 2), Block.makeCuboidShape(10, 5, 1.5, 11, 6, 2), Block.makeCuboidShape(9, 6, 1.5, 10, 7, 2), Block.makeCuboidShape(4, 7, 1.5, 12, 8, 2), Block.makeCuboidShape(3, 4, 1.5, 4, 7, 2), Block.makeCuboidShape(12, 4, 1.5, 13, 7, 2), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(5, 14, 6, 11, 15, 7), Block.makeCuboidShape(5, 14, 8, 11, 15, 9), Block.makeCuboidShape(5, 14, 10, 11, 15, 14), Block.makeCuboidShape(5, 14, 2, 11, 15, 5), Block.makeCuboidShape(11, 14, 2, 14, 15, 14), Block.makeCuboidShape(2, 14, 2, 5, 15, 14), Block.makeCuboidShape(1, 0, 2, 2, 15, 14), Block.makeCuboidShape(14, 0, 2, 15, 15, 14), Block.makeCuboidShape(1, 0, 14, 15, 15, 15), Block.makeCuboidShape(3, 8, 1, 13, 15, 2), Block.makeCuboidShape(3, 0, 1, 13, 3, 2), Block.makeCuboidShape(1, 0, 1, 3, 15, 2), Block.makeCuboidShape(13, 0, 1, 15, 15, 2), Block.makeCuboidShape(5, 13, 5, 11, 14, 10), Block.makeCuboidShape(2, 3, 2, 14, 8, 3), Block.makeCuboidShape(0, 0, 15, 1, 1, 16), Block.makeCuboidShape(15, 0, 15, 16, 1, 16), Block.makeCuboidShape(15, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 0, 0, 1, 1, 1)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_E = Stream.of(Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(14, 3, 12, 15, 4, 13), Block.makeCuboidShape(14, 3, 3, 15, 4, 4), Block.makeCuboidShape(14, 7, 3, 15, 8, 4), Block.makeCuboidShape(14, 7, 12, 15, 8, 13), Block.makeCuboidShape(15, 10, 4, 15.5, 11, 6), Block.makeCuboidShape(15, 13, 4, 15.5, 14, 6), Block.makeCuboidShape(15, 11, 3, 15.5, 13, 4), Block.makeCuboidShape(15, 11, 6, 15.5, 13, 7), Block.makeCuboidShape(15, 11, 4, 16, 13, 6), Block.makeCuboidShape(14, 5, 5, 14.5, 6, 6), Block.makeCuboidShape(14, 4, 6, 14.5, 5, 7), Block.makeCuboidShape(14, 5, 10, 14.5, 6, 11), Block.makeCuboidShape(14, 6, 9, 14.5, 7, 10), Block.makeCuboidShape(14, 3, 4, 14.5, 4, 12), Block.makeCuboidShape(14, 7, 4, 14.5, 8, 12), Block.makeCuboidShape(14, 4, 3, 14.5, 7, 4), Block.makeCuboidShape(14, 4, 12, 14.5, 7, 13), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(9, 14, 5, 10, 15, 11), Block.makeCuboidShape(7, 14, 5, 8, 15, 11), Block.makeCuboidShape(2, 14, 5, 6, 15, 11), Block.makeCuboidShape(11, 14, 5, 14, 15, 11), Block.makeCuboidShape(2, 14, 11, 14, 15, 14), Block.makeCuboidShape(2, 14, 2, 14, 15, 5), Block.makeCuboidShape(2, 0, 1, 14, 15, 2), Block.makeCuboidShape(2, 0, 14, 14, 15, 15), Block.makeCuboidShape(1, 0, 1, 2, 15, 15), Block.makeCuboidShape(14, 8, 3, 15, 15, 13), Block.makeCuboidShape(14, 0, 3, 15, 3, 13), Block.makeCuboidShape(14, 0, 1, 15, 15, 3), Block.makeCuboidShape(14, 0, 13, 15, 15, 15), Block.makeCuboidShape(6, 13, 5, 11, 14, 11), Block.makeCuboidShape(13, 3, 2, 14, 8, 14), Block.makeCuboidShape(0, 0, 0, 1, 1, 1), Block.makeCuboidShape(0, 0, 15, 1, 1, 16), Block.makeCuboidShape(15, 0, 15, 16, 1, 16), Block.makeCuboidShape(15, 0, 0, 16, 1, 1)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_S = Stream.of(Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(3, 3, 14, 4, 4, 15), Block.makeCuboidShape(12, 3, 14, 13, 4, 15), Block.makeCuboidShape(12, 7, 14, 13, 8, 15), Block.makeCuboidShape(3, 7, 14, 4, 8, 15), Block.makeCuboidShape(10, 10, 15, 12, 11, 15.5), Block.makeCuboidShape(10, 13, 15, 12, 14, 15.5), Block.makeCuboidShape(12, 11, 15, 13, 13, 15.5), Block.makeCuboidShape(9, 11, 15, 10, 13, 15.5), Block.makeCuboidShape(10, 11, 15, 12, 13, 16), Block.makeCuboidShape(10, 5, 14, 11, 6, 14.5), Block.makeCuboidShape(9, 4, 14, 10, 5, 14.5), Block.makeCuboidShape(5, 5, 14, 6, 6, 14.5), Block.makeCuboidShape(6, 6, 14, 7, 7, 14.5), Block.makeCuboidShape(4, 3, 14, 12, 4, 14.5), Block.makeCuboidShape(4, 7, 14, 12, 8, 14.5), Block.makeCuboidShape(12, 4, 14, 13, 7, 14.5), Block.makeCuboidShape(3, 4, 14, 4, 7, 14.5), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(5, 14, 9, 11, 15, 10), Block.makeCuboidShape(5, 14, 7, 11, 15, 8), Block.makeCuboidShape(5, 14, 2, 11, 15, 6), Block.makeCuboidShape(5, 14, 11, 11, 15, 14), Block.makeCuboidShape(2, 14, 2, 5, 15, 14), Block.makeCuboidShape(11, 14, 2, 14, 15, 14), Block.makeCuboidShape(14, 0, 2, 15, 15, 14), Block.makeCuboidShape(1, 0, 2, 2, 15, 14), Block.makeCuboidShape(1, 0, 1, 15, 15, 2), Block.makeCuboidShape(3, 8, 14, 13, 15, 15), Block.makeCuboidShape(3, 0, 14, 13, 3, 15), Block.makeCuboidShape(13, 0, 14, 15, 15, 15), Block.makeCuboidShape(1, 0, 14, 3, 15, 15), Block.makeCuboidShape(5, 13, 6, 11, 14, 11), Block.makeCuboidShape(2, 3, 13, 14, 8, 14), Block.makeCuboidShape(15, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 0, 0, 1, 1, 1), Block.makeCuboidShape(0, 0, 15, 1, 1, 16), Block.makeCuboidShape(15, 0, 15, 16, 1, 16)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_W = Stream.of(Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(1, 3, 3, 2, 4, 4), Block.makeCuboidShape(1, 3, 12, 2, 4, 13), Block.makeCuboidShape(1, 7, 12, 2, 8, 13), Block.makeCuboidShape(1, 7, 3, 2, 8, 4), Block.makeCuboidShape(0.5, 10, 10, 1, 11, 12), Block.makeCuboidShape(0.5, 13, 10, 1, 14, 12), Block.makeCuboidShape(0.5, 11, 12, 1, 13, 13), Block.makeCuboidShape(0.5, 11, 9, 1, 13, 10), Block.makeCuboidShape(0, 11, 10, 1, 13, 12), Block.makeCuboidShape(1.5, 5, 10, 2, 6, 11), Block.makeCuboidShape(1.5, 4, 9, 2, 5, 10), Block.makeCuboidShape(1.5, 5, 5, 2, 6, 6), Block.makeCuboidShape(1.5, 6, 6, 2, 7, 7), Block.makeCuboidShape(1.5, 3, 4, 2, 4, 12), Block.makeCuboidShape(1.5, 7, 4, 2, 8, 12), Block.makeCuboidShape(1.5, 4, 12, 2, 7, 13), Block.makeCuboidShape(1.5, 4, 3, 2, 7, 4), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(6, 14, 5, 7, 15, 11), Block.makeCuboidShape(8, 14, 5, 9, 15, 11), Block.makeCuboidShape(10, 14, 5, 14, 15, 11), Block.makeCuboidShape(2, 14, 5, 5, 15, 11), Block.makeCuboidShape(2, 14, 2, 14, 15, 5), Block.makeCuboidShape(2, 14, 11, 14, 15, 14), Block.makeCuboidShape(2, 0, 14, 14, 15, 15), Block.makeCuboidShape(2, 0, 1, 14, 15, 2), Block.makeCuboidShape(14, 0, 1, 15, 15, 15), Block.makeCuboidShape(1, 8, 3, 2, 15, 13), Block.makeCuboidShape(1, 0, 3, 2, 3, 13), Block.makeCuboidShape(1, 0, 13, 2, 15, 15), Block.makeCuboidShape(1, 0, 1, 2, 15, 3), Block.makeCuboidShape(5, 13, 5, 10, 14, 11), Block.makeCuboidShape(2, 3, 2, 3, 8, 14), Block.makeCuboidShape(15, 0, 15, 16, 1, 16), Block.makeCuboidShape(15, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 0, 0, 1, 1, 1), Block.makeCuboidShape(0, 0, 15, 1, 1, 16)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + } + + static final class MinerShapes { + static final VoxelShape SHAPE_N = Stream.of(Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(15, 3, 3, 16, 13, 13), Block.makeCuboidShape(0, 3, 3, 1, 13, 13), Block.makeCuboidShape(4, 11, 4, 12, 12, 12), Block.makeCuboidShape(11, 14, 4, 12, 15, 5), Block.makeCuboidShape(4, 14, 4, 5, 15, 5), Block.makeCuboidShape(3, 12, 5, 4, 14, 11), Block.makeCuboidShape(12, 12, 5, 13, 14, 11), Block.makeCuboidShape(5, 12, 3, 11, 14, 4), Block.makeCuboidShape(5, 12, 12, 11, 14, 13), Block.makeCuboidShape(11, 12, 11, 12, 14, 12), Block.makeCuboidShape(11, 12, 4, 12, 14, 5), Block.makeCuboidShape(4, 12, 4, 5, 14, 5), Block.makeCuboidShape(4, 12, 11, 5, 14, 12), Block.makeCuboidShape(4, 14, 11, 5, 15, 12), Block.makeCuboidShape(11, 14, 11, 12, 15, 12), Block.makeCuboidShape(2, 14, 2, 4, 15, 14), Block.makeCuboidShape(4, 14, 2, 12, 15, 4), Block.makeCuboidShape(4, 14, 12, 12, 15, 14), Block.makeCuboidShape(12, 14, 2, 14, 15, 14), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(1, 0, 2, 2, 15, 14), Block.makeCuboidShape(14, 0, 2, 15, 15, 14), Block.makeCuboidShape(1, 0, 1, 15, 15, 2), Block.makeCuboidShape(1, 0, 14, 15, 15, 15)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_E = Stream.of(Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(3, 3, 15, 13, 13, 16), Block.makeCuboidShape(3, 3, 0, 13, 13, 1), Block.makeCuboidShape(4, 11, 4, 12, 12, 12), Block.makeCuboidShape(11, 14, 11, 12, 15, 12), Block.makeCuboidShape(11, 14, 4, 12, 15, 5), Block.makeCuboidShape(5, 12, 3, 11, 14, 4), Block.makeCuboidShape(5, 12, 12, 11, 14, 13), Block.makeCuboidShape(12, 12, 5, 13, 14, 11), Block.makeCuboidShape(3, 12, 5, 4, 14, 11), Block.makeCuboidShape(4, 12, 11, 5, 14, 12), Block.makeCuboidShape(11, 12, 11, 12, 14, 12), Block.makeCuboidShape(11, 12, 4, 12, 14, 5), Block.makeCuboidShape(4, 12, 4, 5, 14, 5), Block.makeCuboidShape(4, 14, 4, 5, 15, 5), Block.makeCuboidShape(4, 14, 11, 5, 15, 12), Block.makeCuboidShape(2, 14, 2, 14, 15, 4), Block.makeCuboidShape(12, 14, 4, 14, 15, 12), Block.makeCuboidShape(2, 14, 4, 4, 15, 12), Block.makeCuboidShape(2, 14, 12, 14, 15, 14), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(2, 0, 1, 14, 15, 2), Block.makeCuboidShape(2, 0, 14, 14, 15, 15), Block.makeCuboidShape(14, 0, 1, 15, 15, 15), Block.makeCuboidShape(1, 0, 1, 2, 15, 15)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_S = Stream.of(Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(0, 3, 3, 1, 13, 13), Block.makeCuboidShape(15, 3, 3, 16, 13, 13), Block.makeCuboidShape(4, 11, 4, 12, 12, 12), Block.makeCuboidShape(4, 14, 11, 5, 15, 12), Block.makeCuboidShape(11, 14, 11, 12, 15, 12), Block.makeCuboidShape(12, 12, 5, 13, 14, 11), Block.makeCuboidShape(3, 12, 5, 4, 14, 11), Block.makeCuboidShape(5, 12, 12, 11, 14, 13), Block.makeCuboidShape(5, 12, 3, 11, 14, 4), Block.makeCuboidShape(4, 12, 4, 5, 14, 5), Block.makeCuboidShape(4, 12, 11, 5, 14, 12), Block.makeCuboidShape(11, 12, 11, 12, 14, 12), Block.makeCuboidShape(11, 12, 4, 12, 14, 5), Block.makeCuboidShape(11, 14, 4, 12, 15, 5), Block.makeCuboidShape(4, 14, 4, 5, 15, 5), Block.makeCuboidShape(12, 14, 2, 14, 15, 14), Block.makeCuboidShape(4, 14, 12, 12, 15, 14), Block.makeCuboidShape(4, 14, 2, 12, 15, 4), Block.makeCuboidShape(2, 14, 2, 4, 15, 14), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(14, 0, 2, 15, 15, 14), Block.makeCuboidShape(1, 0, 2, 2, 15, 14), Block.makeCuboidShape(1, 0, 14, 15, 15, 15), Block.makeCuboidShape(1, 0, 1, 15, 15, 2)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_W = Stream.of(Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(3, 3, 0, 13, 13, 1), Block.makeCuboidShape(3, 3, 15, 13, 13, 16), Block.makeCuboidShape(4, 11, 4, 12, 12, 12), Block.makeCuboidShape(4, 14, 4, 5, 15, 5), Block.makeCuboidShape(4, 14, 11, 5, 15, 12), Block.makeCuboidShape(5, 12, 12, 11, 14, 13), Block.makeCuboidShape(5, 12, 3, 11, 14, 4), Block.makeCuboidShape(3, 12, 5, 4, 14, 11), Block.makeCuboidShape(12, 12, 5, 13, 14, 11), Block.makeCuboidShape(11, 12, 4, 12, 14, 5), Block.makeCuboidShape(4, 12, 4, 5, 14, 5), Block.makeCuboidShape(4, 12, 11, 5, 14, 12), Block.makeCuboidShape(11, 12, 11, 12, 14, 12), Block.makeCuboidShape(11, 14, 11, 12, 15, 12), Block.makeCuboidShape(11, 14, 4, 12, 15, 5), Block.makeCuboidShape(2, 14, 12, 14, 15, 14), Block.makeCuboidShape(2, 14, 4, 4, 15, 12), Block.makeCuboidShape(12, 14, 4, 14, 15, 12), Block.makeCuboidShape(2, 14, 2, 14, 15, 4), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(2, 0, 14, 14, 15, 15), Block.makeCuboidShape(2, 0, 1, 14, 15, 2), Block.makeCuboidShape(1, 0, 1, 2, 15, 15), Block.makeCuboidShape(14, 0, 1, 15, 15, 15)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + } + + static final class LeafGeneratorShapes { + static final VoxelShape SHAPE_N = Stream.of(Block.makeCuboidShape(1, 0, 14, 15, 15, 15), Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(5, 11, 0, 11, 12, 1), Block.makeCuboidShape(0, 11, 5, 1, 12, 11), Block.makeCuboidShape(15, 11, 5, 16, 12, 11), Block.makeCuboidShape(5, 4, 0, 11, 5, 1), Block.makeCuboidShape(0, 4, 5, 1, 5, 11), Block.makeCuboidShape(15, 4, 5, 16, 5, 11), Block.makeCuboidShape(4, 4, 0, 5, 12, 1), Block.makeCuboidShape(0, 4, 4, 1, 12, 5), Block.makeCuboidShape(15, 4, 4, 16, 12, 5), Block.makeCuboidShape(11, 4, 0, 12, 12, 1), Block.makeCuboidShape(0, 4, 11, 1, 12, 12), Block.makeCuboidShape(15, 4, 11, 16, 12, 12), Block.makeCuboidShape(4, 13, 4, 12, 14, 12), Block.makeCuboidShape(4, 14, 11, 5, 15, 12), Block.makeCuboidShape(11, 14, 11, 12, 15, 12), Block.makeCuboidShape(11, 14, 4, 12, 15, 5), Block.makeCuboidShape(4, 14, 4, 5, 15, 5), Block.makeCuboidShape(12, 14, 2, 14, 15, 14), Block.makeCuboidShape(4, 14, 12, 12, 15, 14), Block.makeCuboidShape(4, 14, 2, 12, 15, 4), Block.makeCuboidShape(2, 14, 2, 4, 15, 14), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(1, 0, 1, 15, 15, 2), Block.makeCuboidShape(1, 0, 2, 2, 5, 14), Block.makeCuboidShape(2, 1, 2, 3, 14, 14), Block.makeCuboidShape(1, 11, 2, 2, 15, 14), Block.makeCuboidShape(1, 5, 2, 2, 11, 5), Block.makeCuboidShape(1, 5, 11, 2, 11, 14), Block.makeCuboidShape(13, 1, 2, 14, 14, 14), Block.makeCuboidShape(14, 11, 2, 15, 15, 14), Block.makeCuboidShape(14, 5, 11, 15, 11, 14), Block.makeCuboidShape(14, 5, 2, 15, 11, 5), Block.makeCuboidShape(14, 0, 2, 15, 5, 14)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_E = Stream.of(Block.makeCuboidShape(1, 0, 1, 2, 15, 15), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 11, 5, 16, 12, 11), Block.makeCuboidShape(5, 11, 0, 11, 12, 1), Block.makeCuboidShape(5, 11, 15, 11, 12, 16), Block.makeCuboidShape(15, 4, 5, 16, 5, 11), Block.makeCuboidShape(5, 4, 0, 11, 5, 1), Block.makeCuboidShape(5, 4, 15, 11, 5, 16), Block.makeCuboidShape(15, 4, 4, 16, 12, 5), Block.makeCuboidShape(11, 4, 0, 12, 12, 1), Block.makeCuboidShape(11, 4, 15, 12, 12, 16), Block.makeCuboidShape(15, 4, 11, 16, 12, 12), Block.makeCuboidShape(4, 4, 0, 5, 12, 1), Block.makeCuboidShape(4, 4, 15, 5, 12, 16), Block.makeCuboidShape(4, 13, 4, 12, 14, 12), Block.makeCuboidShape(4, 14, 4, 5, 15, 5), Block.makeCuboidShape(4, 14, 11, 5, 15, 12), Block.makeCuboidShape(11, 14, 11, 12, 15, 12), Block.makeCuboidShape(11, 14, 4, 12, 15, 5), Block.makeCuboidShape(2, 14, 12, 14, 15, 14), Block.makeCuboidShape(2, 14, 4, 4, 15, 12), Block.makeCuboidShape(12, 14, 4, 14, 15, 12), Block.makeCuboidShape(2, 14, 2, 14, 15, 4), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(14, 0, 1, 15, 15, 15), Block.makeCuboidShape(2, 0, 1, 14, 5, 2), Block.makeCuboidShape(2, 1, 2, 14, 14, 3), Block.makeCuboidShape(2, 11, 1, 14, 15, 2), Block.makeCuboidShape(11, 5, 1, 14, 11, 2), Block.makeCuboidShape(2, 5, 1, 5, 11, 2), Block.makeCuboidShape(2, 1, 13, 14, 14, 14), Block.makeCuboidShape(2, 11, 14, 14, 15, 15), Block.makeCuboidShape(2, 5, 14, 5, 11, 15), Block.makeCuboidShape(11, 5, 14, 14, 11, 15), Block.makeCuboidShape(2, 0, 14, 14, 5, 15)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_S = Stream.of(Block.makeCuboidShape(1, 0, 1, 15, 15, 2), Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(5, 11, 15, 11, 12, 16), Block.makeCuboidShape(15, 11, 5, 16, 12, 11), Block.makeCuboidShape(0, 11, 5, 1, 12, 11), Block.makeCuboidShape(5, 4, 15, 11, 5, 16), Block.makeCuboidShape(15, 4, 5, 16, 5, 11), Block.makeCuboidShape(0, 4, 5, 1, 5, 11), Block.makeCuboidShape(11, 4, 15, 12, 12, 16), Block.makeCuboidShape(15, 4, 11, 16, 12, 12), Block.makeCuboidShape(0, 4, 11, 1, 12, 12), Block.makeCuboidShape(4, 4, 15, 5, 12, 16), Block.makeCuboidShape(15, 4, 4, 16, 12, 5), Block.makeCuboidShape(0, 4, 4, 1, 12, 5), Block.makeCuboidShape(4, 13, 4, 12, 14, 12), Block.makeCuboidShape(11, 14, 4, 12, 15, 5), Block.makeCuboidShape(4, 14, 4, 5, 15, 5), Block.makeCuboidShape(4, 14, 11, 5, 15, 12), Block.makeCuboidShape(11, 14, 11, 12, 15, 12), Block.makeCuboidShape(2, 14, 2, 4, 15, 14), Block.makeCuboidShape(4, 14, 2, 12, 15, 4), Block.makeCuboidShape(4, 14, 12, 12, 15, 14), Block.makeCuboidShape(12, 14, 2, 14, 15, 14), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(1, 0, 14, 15, 15, 15), Block.makeCuboidShape(14, 0, 2, 15, 5, 14), Block.makeCuboidShape(13, 1, 2, 14, 14, 14), Block.makeCuboidShape(14, 11, 2, 15, 15, 14), Block.makeCuboidShape(14, 5, 11, 15, 11, 14), Block.makeCuboidShape(14, 5, 2, 15, 11, 5), Block.makeCuboidShape(2, 1, 2, 3, 14, 14), Block.makeCuboidShape(1, 11, 2, 2, 15, 14), Block.makeCuboidShape(1, 5, 2, 2, 11, 5), Block.makeCuboidShape(1, 5, 11, 2, 11, 14), Block.makeCuboidShape(1, 0, 2, 2, 5, 14)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_W = Stream.of(Block.makeCuboidShape(14, 0, 1, 15, 15, 15), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 11, 5, 1, 12, 11), Block.makeCuboidShape(5, 11, 15, 11, 12, 16), Block.makeCuboidShape(5, 11, 0, 11, 12, 1), Block.makeCuboidShape(0, 4, 5, 1, 5, 11), Block.makeCuboidShape(5, 4, 15, 11, 5, 16), Block.makeCuboidShape(5, 4, 0, 11, 5, 1), Block.makeCuboidShape(0, 4, 11, 1, 12, 12), Block.makeCuboidShape(4, 4, 15, 5, 12, 16), Block.makeCuboidShape(4, 4, 0, 5, 12, 1), Block.makeCuboidShape(0, 4, 4, 1, 12, 5), Block.makeCuboidShape(11, 4, 15, 12, 12, 16), Block.makeCuboidShape(11, 4, 0, 12, 12, 1), Block.makeCuboidShape(4, 13, 4, 12, 14, 12), Block.makeCuboidShape(11, 14, 11, 12, 15, 12), Block.makeCuboidShape(11, 14, 4, 12, 15, 5), Block.makeCuboidShape(4, 14, 4, 5, 15, 5), Block.makeCuboidShape(4, 14, 11, 5, 15, 12), Block.makeCuboidShape(2, 14, 2, 14, 15, 4), Block.makeCuboidShape(12, 14, 4, 14, 15, 12), Block.makeCuboidShape(2, 14, 4, 4, 15, 12), Block.makeCuboidShape(2, 14, 12, 14, 15, 14), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(1, 0, 1, 2, 15, 15), Block.makeCuboidShape(2, 0, 14, 14, 5, 15), Block.makeCuboidShape(2, 1, 13, 14, 14, 14), Block.makeCuboidShape(2, 11, 14, 14, 15, 15), Block.makeCuboidShape(2, 5, 14, 5, 11, 15), Block.makeCuboidShape(11, 5, 14, 14, 11, 15), Block.makeCuboidShape(2, 1, 2, 14, 14, 3), Block.makeCuboidShape(2, 11, 1, 14, 15, 2), Block.makeCuboidShape(11, 5, 1, 14, 11, 2), Block.makeCuboidShape(2, 5, 1, 5, 11, 2), Block.makeCuboidShape(2, 0, 1, 14, 5, 2)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + } + + static final class LavaFactoryShapes { + static final VoxelShape SHAPE_N = Stream.of(Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(12, 15, 5, 13, 16, 11), Block.makeCuboidShape(3, 15, 5, 4, 16, 11), Block.makeCuboidShape(11, 14, 11, 12, 16, 12), Block.makeCuboidShape(11, 14, 4, 12, 16, 5), Block.makeCuboidShape(4, 14, 11, 5, 16, 12), Block.makeCuboidShape(4, 14, 4, 5, 16, 5), Block.makeCuboidShape(4, 13, 4, 12, 14, 12), Block.makeCuboidShape(4, 14, 12, 12, 15, 15), Block.makeCuboidShape(4, 14, 1, 12, 15, 4), Block.makeCuboidShape(1, 14, 1, 4, 15, 15), Block.makeCuboidShape(12, 14, 1, 15, 15, 15), Block.makeCuboidShape(1, 1, 1, 15, 2, 15), Block.makeCuboidShape(14, 2, 1, 15, 14, 15), Block.makeCuboidShape(1, 2, 1, 2, 14, 15), Block.makeCuboidShape(2, 2, 14, 14, 14, 15), Block.makeCuboidShape(2, 2, 1, 14, 14, 2), Block.makeCuboidShape(5, 15, 3, 11, 16, 4), Block.makeCuboidShape(5, 15, 12, 11, 16, 13)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_E = Stream.of(Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(5, 15, 12, 11, 16, 13), Block.makeCuboidShape(5, 15, 3, 11, 16, 4), Block.makeCuboidShape(4, 14, 11, 5, 16, 12), Block.makeCuboidShape(11, 14, 11, 12, 16, 12), Block.makeCuboidShape(4, 14, 4, 5, 16, 5), Block.makeCuboidShape(11, 14, 4, 12, 16, 5), Block.makeCuboidShape(4, 13, 4, 12, 14, 12), Block.makeCuboidShape(1, 14, 4, 4, 15, 12), Block.makeCuboidShape(12, 14, 4, 15, 15, 12), Block.makeCuboidShape(1, 14, 1, 15, 15, 4), Block.makeCuboidShape(1, 14, 12, 15, 15, 15), Block.makeCuboidShape(1, 1, 1, 15, 2, 15), Block.makeCuboidShape(1, 2, 14, 15, 14, 15), Block.makeCuboidShape(1, 2, 1, 15, 14, 2), Block.makeCuboidShape(1, 2, 2, 2, 14, 14), Block.makeCuboidShape(14, 2, 2, 15, 14, 14), Block.makeCuboidShape(12, 15, 5, 13, 16, 11), Block.makeCuboidShape(3, 15, 5, 4, 16, 11)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_S = Stream.of(Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(3, 15, 5, 4, 16, 11), Block.makeCuboidShape(12, 15, 5, 13, 16, 11), Block.makeCuboidShape(4, 14, 4, 5, 16, 5), Block.makeCuboidShape(4, 14, 11, 5, 16, 12), Block.makeCuboidShape(11, 14, 4, 12, 16, 5), Block.makeCuboidShape(11, 14, 11, 12, 16, 12), Block.makeCuboidShape(4, 13, 4, 12, 14, 12), Block.makeCuboidShape(4, 14, 1, 12, 15, 4), Block.makeCuboidShape(4, 14, 12, 12, 15, 15), Block.makeCuboidShape(12, 14, 1, 15, 15, 15), Block.makeCuboidShape(1, 14, 1, 4, 15, 15), Block.makeCuboidShape(1, 1, 1, 15, 2, 15), Block.makeCuboidShape(1, 2, 1, 2, 14, 15), Block.makeCuboidShape(14, 2, 1, 15, 14, 15), Block.makeCuboidShape(2, 2, 1, 14, 14, 2), Block.makeCuboidShape(2, 2, 14, 14, 14, 15), Block.makeCuboidShape(5, 15, 12, 11, 16, 13), Block.makeCuboidShape(5, 15, 3, 11, 16, 4)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_W = Stream.of(Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(5, 15, 3, 11, 16, 4), Block.makeCuboidShape(5, 15, 12, 11, 16, 13), Block.makeCuboidShape(11, 14, 4, 12, 16, 5), Block.makeCuboidShape(4, 14, 4, 5, 16, 5), Block.makeCuboidShape(11, 14, 11, 12, 16, 12), Block.makeCuboidShape(4, 14, 11, 5, 16, 12), Block.makeCuboidShape(4, 13, 4, 12, 14, 12), Block.makeCuboidShape(12, 14, 4, 15, 15, 12), Block.makeCuboidShape(1, 14, 4, 4, 15, 12), Block.makeCuboidShape(1, 14, 12, 15, 15, 15), Block.makeCuboidShape(1, 14, 1, 15, 15, 4), Block.makeCuboidShape(1, 1, 1, 15, 2, 15), Block.makeCuboidShape(1, 2, 1, 15, 14, 2), Block.makeCuboidShape(1, 2, 14, 15, 14, 15), Block.makeCuboidShape(14, 2, 2, 15, 14, 14), Block.makeCuboidShape(1, 2, 2, 2, 14, 14), Block.makeCuboidShape(3, 15, 5, 4, 16, 11), Block.makeCuboidShape(12, 15, 5, 13, 16, 11)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); } public static final VoxelShape FEEDER_SHAPE = ShapeBuilder.get() @@ -640,6 +126,14 @@ public class Shapes { .add(1, 2, 1, 2, 14, 15).add(2, 2, 14, 14, 14, 15).add(2, 2, 1, 14, 14, 2) .standardReduceBuild().get(); + public static final VoxelShape SOLIDIFIER_SHAPE = ShapeBuilder.get() + .add(15, 0, 1, 16, 1, 15).add(1, 1, 1, 15, 15, 15).add(0, 0, 0, 16, 1, 1) + .add(0, 0, 15, 16, 1, 16).add(0, 15, 0, 16, 16, 1).add(0, 15, 15, 16, 16, 16) + .add(0, 0, 1, 1, 1, 15).add(0, 15, 1, 1, 16, 15).add(15, 15, 1, 16, 16, 15) + .add(0, 1, 0, 1, 15, 1).add(0, 1, 15, 1, 15, 16).add(15, 1, 15, 16, 15, 16) + .add(15, 1, 0, 16, 15, 1) + .standardReduceBuild().get(); + public static class ShapeBuilder { Stream.Builder shapes = Stream.builder(); @@ -660,5 +154,4 @@ public class Shapes { return new ShapeBuilder(); } } - } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java index 830502101..134bd1326 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java @@ -244,7 +244,7 @@ public final class InitBooklet { new BookletChapter("shockSuppressor", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(ActuallyBlocks.blockShockSuppressor.get()), new PageTextOnly(1).addTextReplacement("", TileEntityShockSuppressor.RANGE).addTextReplacement("", TileEntityShockSuppressor.USE_PER), new PageCrafting(2, BlockCrafting.recipeShockSuppressor)); //RF Generating Blocks - new BookletChapter("solarPanel", ActuallyAdditionsAPI.entryGeneratingRF, new ItemStack(ActuallyBlocks.blockFurnaceSolar.get()), new PageTextOnly(1).addTextReplacement("", TileEntityFurnaceSolar.PRODUCE), new PageCrafting(2, BlockCrafting.recipeSolar).setNoText()); + // new BookletChapter("solarPanel", ActuallyAdditionsAPI.entryGeneratingRF, new ItemStack(ActuallyBlocks.blockFurnaceSolar.get()), new PageTextOnly(1).addTextReplacement("", TileEntityFurnaceSolar.PRODUCE), new PageCrafting(2, BlockCrafting.recipeSolar).setNoText()); new BookletChapter("heatCollector", ActuallyAdditionsAPI.entryGeneratingRF, new ItemStack(ActuallyBlocks.blockHeatCollector.get()), new PageTextOnly(1).addTextReplacement("", TileEntityHeatCollector.ENERGY_PRODUCE).addTextReplacement("", TileEntityHeatCollector.BLOCKS_NEEDED), new PageCrafting(2, BlockCrafting.recipeHeatCollector).setNoText()); new BookletChapter("canola", ActuallyAdditionsAPI.entryGeneratingRF, new ItemStack(ActuallyBlocks.blockFermentingBarrel.get()), new PageTextOnly(1).addItemsToPage(new ItemStack(InitItems.itemMisc.get(), 1, TheMiscItems.CANOLA.ordinal())).addItemsToPage(new ItemStack(InitItems.itemCanolaSeed.get())).addFluidToPage(InitFluids.fluidCanolaOil), new PageTextOnly(2).addFluidToPage(InitFluids.fluidRefinedCanolaOil).addFluidToPage(InitFluids.fluidCrystalOil).addFluidToPage(InitFluids.fluidEmpoweredOil), new PageCrafting(3, BlockCrafting.recipeCanolaPress).setNoText(), new PageCrafting(4, BlockCrafting.recipeFermentingBarrel), new PageCrafting(5, BlockCrafting.recipeOilGen), new PageReconstructor(6, LensRecipeHandler.recipeCrystallizedCanolaSeed).setNoText(), new PageEmpowerer(7, EmpowererHandler.recipeEmpoweredCanolaSeed).setNoText()); new BookletChapter("leafGen", ActuallyAdditionsAPI.entryGeneratingRF, new ItemStack(ActuallyBlocks.blockLeafGenerator.get()), new PageTextOnly(1).addTextReplacement("", ConfigIntValues.LEAF_GENERATOR_CF_PER_LEAF.getValue()).addTextReplacement("", ConfigIntValues.LEAF_GENERATOR_AREA.getValue()), new PageCrafting(2, BlockCrafting.recipeLeafGen)).setImportant(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/gui/GuiEntry.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/gui/GuiEntry.java index b549d611a..b90d0a057 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/gui/GuiEntry.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/gui/GuiEntry.java @@ -76,8 +76,8 @@ public class GuiEntry extends GuiBooklet { } @Override - public void initGui() { - super.initGui(); + public void init() { + super.init(); if (this.hasSearchBar() && this.searchText != null) { this.searchField.setText(this.searchText); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/gui/GuiPage.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/gui/GuiPage.java index d98dfff66..180e3af8d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/gui/GuiPage.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/gui/GuiPage.java @@ -111,9 +111,9 @@ public class GuiPage extends GuiBooklet { } @Override - public void initGui() { + public void init() { this.itemDisplays.clear(); - super.initGui(); + super.init(); List links = this.getWebLinks(); if (links != null && !links.isEmpty()) { @@ -124,7 +124,7 @@ public class GuiPage extends GuiBooklet { for (int i = 0; i < this.pages.length; i++) { IBookletPage page = this.pages[i]; if (page != null) { - page.initGui(this, this.guiLeft + 6 + i * 142, this.guiTop + 7); + page.init(this, this.guiLeft + 6 + i * 142, this.guiTop + 7); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/misc/GuiAAAchievements.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/misc/GuiAAAchievements.java index 1e5a84736..051f346ae 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/misc/GuiAAAchievements.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/misc/GuiAAAchievements.java @@ -41,8 +41,8 @@ public class GuiAAAchievements extends GuiAchievements{ } @Override - public void initGui(){ - super.initGui(); + public void init(){ + super.init(); try{ this.buttonList.remove(1); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/BookletPage.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/BookletPage.java index 1a89ccf1e..c4aa77b73 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/BookletPage.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/BookletPage.java @@ -117,7 +117,7 @@ public class BookletPage implements IBookletPage { @Override @OnlyIn(Dist.CLIENT) - public void initGui(GuiBookletBase gui, int startX, int startY) { + public void init(GuiBookletBase gui, int startX, int startY) { } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCoffeeMachine.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCoffeeMachine.java index e280ceadc..4287cdc77 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCoffeeMachine.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCoffeeMachine.java @@ -59,8 +59,8 @@ public class PageCoffeeMachine extends BookletPage { @Override @OnlyIn(Dist.CLIENT) - public void initGui(GuiBookletBase gui, int startX, int startY) { - super.initGui(gui, startX, startY); + public void init(GuiBookletBase gui, int startX, int startY) { + super.init(gui, startX, startY); gui.addOrModifyItemRenderer(this.stacks[0], startX + 5 + 82, startY + 10 + 1, 1F, true); gui.addOrModifyItemRenderer(this.outcome, startX + 5 + 36, startY + 10 + 42, 1F, false); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrafting.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrafting.java index 0d06bc7fd..c7cf5502d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrafting.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrafting.java @@ -97,8 +97,8 @@ public class PageCrafting extends BookletPage { } @Override - public void initGui(GuiBookletBase gui, int startX, int startY) { - super.initGui(gui, startX, startY); + public void init(GuiBookletBase gui, int startX, int startY) { + super.init(gui, startX, startY); this.findRecipe(gui, startX, startY); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrusherRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrusherRecipe.java index 64d88478f..567f1f5ba 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrusherRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrusherRecipe.java @@ -55,8 +55,8 @@ public class PageCrusherRecipe extends BookletPage { @Override @OnlyIn(Dist.CLIENT) - public void initGui(GuiBookletBase gui, int startX, int startY) { - super.initGui(gui, startX, startY); + public void init(GuiBookletBase gui, int startX, int startY) { + super.init(gui, startX, startY); if (this.recipe != null) { gui.addOrModifyItemRenderer(this.stacks[this.rotate++ % this.stacks.length], startX + 38 + 18, startY + 6 + 1, 1F, true); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageEmpowerer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageEmpowerer.java index 250c41418..52208e5c9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageEmpowerer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageEmpowerer.java @@ -63,8 +63,8 @@ public class PageEmpowerer extends BookletPage { @Override @OnlyIn(Dist.CLIENT) - public void initGui(GuiBookletBase gui, int startX, int startY) { - super.initGui(gui, startX, startY); + public void init(GuiBookletBase gui, int startX, int startY) { + super.init(gui, startX, startY); if (this.recipe != null) { gui.addOrModifyItemRenderer(this.stand1[0], startX + 5 + 26, startY + 10 + 1, 1F, true); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageFurnace.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageFurnace.java index 9a5b83ffa..225591dc2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageFurnace.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageFurnace.java @@ -66,8 +66,8 @@ public class PageFurnace extends BookletPage { @Override @OnlyIn(Dist.CLIENT) - public void initGui(GuiBookletBase gui, int startX, int startY) { - super.initGui(gui, startX, startY); + public void init(GuiBookletBase gui, int startX, int startY) { + super.init(gui, startX, startY); gui.addOrModifyItemRenderer(this.input, startX + 23 + 1, startY + 10 + 5, 1F, true); gui.addOrModifyItemRenderer(this.output, startX + 23 + 59, startY + 10 + 5, 1F, false); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageLinkButton.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageLinkButton.java index 6ea54e29c..0ab45e496 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageLinkButton.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageLinkButton.java @@ -37,8 +37,8 @@ public class PageLinkButton extends BookletPage { @Override @OnlyIn(Dist.CLIENT) - public void initGui(GuiBookletBase gui, int startX, int startY) { - super.initGui(gui, startX, startY); + public void init(GuiBookletBase gui, int startX, int startY) { + super.init(gui, startX, startY); gui.getButtonList().add(new Button(this.buttonId, startX + 125 / 2 - 50, startY + 130, 100, 20, StringUtil.localize("booklet." + ActuallyAdditions.MODID + ".chapter." + this.chapter.getIdentifier() + ".button." + this.localizationKey))); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageReconstructor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageReconstructor.java index cf63b44ee..26dd270da 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageReconstructor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageReconstructor.java @@ -59,8 +59,8 @@ public class PageReconstructor extends BookletPage { @Override @OnlyIn(Dist.CLIENT) - public void initGui(GuiBookletBase gui, int startX, int startY) { - super.initGui(gui, startX, startY); + public void init(GuiBookletBase gui, int startX, int startY) { + super.init(gui, startX, startY); if (this.recipe != null) { gui.addOrModifyItemRenderer(this.stacks[0], startX + 30 + 1, startY + 10 + 13, 1F, true); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageTrials.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageTrials.java index 981b8190c..f0901166a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageTrials.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageTrials.java @@ -46,8 +46,8 @@ public class PageTrials extends BookletPage { @Override @OnlyIn(Dist.CLIENT) - public void initGui(GuiBookletBase gui, int startX, int startY) { - super.initGui(gui, startX, startY); + public void init(GuiBookletBase gui, int startX, int startY) { + super.init(gui, startX, startY); if (this.buttonId >= 0) { this.button = new Button(this.buttonId, startX + 125 / 2 - 50, startY + 120, 100, 20, ""); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/FilterSettingsGui.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/FilterSettingsGui.java index a3ca51d55..a8ea51801 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/FilterSettingsGui.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/FilterSettingsGui.java @@ -15,9 +15,11 @@ import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiInputter.SmallerButton; import de.ellpeck.actuallyadditions.mod.tile.FilterSettings; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.Gui; +import net.minecraft.client.gui.widget.button.Button; import net.minecraft.util.text.TextFormatting; -import net.minecraftforge.fml.client.config.GuiUtils; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import net.minecraftforge.fml.client.gui.GuiUtils; import java.util.ArrayList; import java.util.Collections; @@ -34,7 +36,7 @@ public class FilterSettingsGui extends Gui { public SmallerButton modButton; public SmallerButton oredictButton; - public FilterSettingsGui(FilterSettings settings, int x, int y, List buttonList) { + public FilterSettingsGui(FilterSettings settings, int x, int y, List