mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-12-22 19:39:24 +01:00
chore: all blocks ported!
This commit is contained in:
parent
0e4a65354f
commit
4dfe0e04bb
72 changed files with 1575 additions and 2510 deletions
|
@ -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);
|
||||
|
|
|
@ -124,7 +124,7 @@ public final class ActuallyBlocks {
|
|||
public static final RegistryObject<Block> blockFurnaceDouble = BLOCKS.register("block_furnace_double", BlockFurnaceDouble::new);
|
||||
public static final RegistryObject<Block> blockInputter = BLOCKS.register("block_inputter", () -> new BlockInputter(false));
|
||||
public static final RegistryObject<Block> blockInputterAdvanced = BLOCKS.register("block_inputter_advanced", () -> new BlockInputter(true));
|
||||
public static final RegistryObject<Block> blockFurnaceSolar = BLOCKS.register("block_furnace_solar", BlockFurnaceSolar::new);
|
||||
// public static final RegistryObject<Block> blockFurnaceSolar = BLOCKS.register("block_furnace_solar", BlockFurnaceSolar::new);
|
||||
public static final RegistryObject<Block> blockHeatCollector = BLOCKS.register("block_heat_collector", BlockHeatCollector::new);
|
||||
public static final RegistryObject<Block> blockGreenhouseGlass = BLOCKS.register("block_greenhouse_glass", BlockGreenhouseGlass::new);
|
||||
public static final RegistryObject<Block> blockBreaker = BLOCKS.register("block_breaker", () -> new BlockBreaker(false));
|
||||
|
|
|
@ -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();
|
||||
// }
|
||||
//}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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<BlockPos, BlockState, IGrowable> 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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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<Block, BlockState> 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
// }
|
||||
//}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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<AxisAlignedBB> 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)));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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<BlockPos>());
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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<TheMiscBlocks> 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<ItemStack> 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<TheMiscBlocks> 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<ItemStack> 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);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
|
|
@ -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);
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -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<ItemStack> 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<ItemStack> 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);
|
||||
// }
|
||||
//}
|
||||
|
|
|
@ -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<TheWildPlants> TYPE = PropertyEnum.create("type", TheWildPlants.class);
|
||||
// public static final TheWildPlants[] ALL_WILD_PLANTS = TheWildPlants.values();
|
||||
// public static final PropertyEnum<TheWildPlants> 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<ItemStack> list) {
|
||||
for (int j = 0; j < ALL_WILD_PLANTS.length; j++) {
|
||||
list.add(new ItemStack(this, 1, j));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getDrops(NonNullList<ItemStack> 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<ItemStack> list) {
|
||||
// for (int j = 0; j < ALL_WILD_PLANTS.length; j++) {
|
||||
// list.add(new ItemStack(this, 1, j));
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void getDrops(NonNullList<ItemStack> 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();
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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<VoxelShape> shapes = Stream.builder();
|
||||
|
||||
|
@ -660,5 +154,4 @@ public class Shapes {
|
|||
return new ShapeBuilder();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -244,7 +244,7 @@ public final class InitBooklet {
|
|||
new BookletChapter("shockSuppressor", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(ActuallyBlocks.blockShockSuppressor.get()), new PageTextOnly(1).addTextReplacement("<range>", TileEntityShockSuppressor.RANGE).addTextReplacement("<rf>", 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("<rf>", TileEntityFurnaceSolar.PRODUCE), new PageCrafting(2, BlockCrafting.recipeSolar).setNoText());
|
||||
// new BookletChapter("solarPanel", ActuallyAdditionsAPI.entryGeneratingRF, new ItemStack(ActuallyBlocks.blockFurnaceSolar.get()), new PageTextOnly(1).addTextReplacement("<rf>", TileEntityFurnaceSolar.PRODUCE), new PageCrafting(2, BlockCrafting.recipeSolar).setNoText());
|
||||
new BookletChapter("heatCollector", ActuallyAdditionsAPI.entryGeneratingRF, new ItemStack(ActuallyBlocks.blockHeatCollector.get()), new PageTextOnly(1).addTextReplacement("<rf>", TileEntityHeatCollector.ENERGY_PRODUCE).addTextReplacement("<min>", 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("<rf>", ConfigIntValues.LEAF_GENERATOR_CF_PER_LEAF.getValue()).addTextReplacement("<range>", ConfigIntValues.LEAF_GENERATOR_AREA.getValue()), new PageCrafting(2, BlockCrafting.recipeLeafGen)).setImportant();
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -111,9 +111,9 @@ public class GuiPage extends GuiBooklet {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
public void init() {
|
||||
this.itemDisplays.clear();
|
||||
super.initGui();
|
||||
super.init();
|
||||
|
||||
List<String> 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)));
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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, "");
|
||||
|
|
|
@ -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<GuiButton> buttonList) {
|
||||
public FilterSettingsGui(FilterSettings settings, int x, int y, List<Button> buttonList) {
|
||||
this.theSettings = settings;
|
||||
|
||||
this.whitelistButton = new SmallerButton(this.theSettings.whitelistButtonId, x, y, "", true);
|
||||
|
|
|
@ -48,19 +48,19 @@ public class GuiBag extends GuiWtfMojang<ContainerBag> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
public void init() {
|
||||
super.init();
|
||||
|
||||
this.filter = new FilterSettingsGui(this.container.filter, this.guiLeft + 138, this.guiTop + 10, this.buttonList);
|
||||
|
||||
this.buttonAutoInsert = new GuiButton(0, this.guiLeft - 21, this.guiTop + 8, 20, 20, (this.container.autoInsert
|
||||
this.buttonAutoInsert = new Button(0, this.guiLeft - 21, this.guiTop + 8, 20, 20, (this.container.autoInsert
|
||||
? TextFormatting.DARK_GREEN
|
||||
: TextFormatting.RED) + "I");
|
||||
this.addButton(this.buttonAutoInsert);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed(GuiButton button) throws IOException {
|
||||
protected void actionPerformed(Button button) throws IOException {
|
||||
CompoundNBT data = new CompoundNBT();
|
||||
data.setInteger("ButtonID", button.id);
|
||||
data.setInteger("PlayerID", Minecraft.getInstance().player.getEntityId());
|
||||
|
|
|
@ -45,7 +45,7 @@ public class GuiBioReactor extends GuiWtfMojang<ContainerBioReactor> {
|
|||
|
||||
@Override
|
||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
||||
AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.tile);
|
||||
AssetUtil.displayNameString(this.font, this.xSize, -10, this.tile);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -64,7 +64,7 @@ public class GuiBioReactor extends GuiWtfMojang<ContainerBioReactor> {
|
|||
}
|
||||
|
||||
if (this.tile.producePerTick > 0) {
|
||||
this.drawCenteredString(this.fontRenderer, this.tile.producePerTick + " " + I18n.format("actuallyadditions.cft"), this.guiLeft + 87, this.guiTop + 86, 0xFFFFFF);
|
||||
this.drawCenteredString(this.font, this.tile.producePerTick + " " + I18n.format("actuallyadditions.cft"), this.guiLeft + 87, this.guiTop + 86, 0xFFFFFF);
|
||||
}
|
||||
|
||||
this.energy.draw();
|
||||
|
|
|
@ -36,8 +36,8 @@ public class GuiCanolaPress extends GuiWtfMojang<ContainerCanolaPress> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
public void init() {
|
||||
super.init();
|
||||
this.energy = new EnergyDisplay(this.guiLeft + 42, this.guiTop + 5, this.press.storage);
|
||||
this.fluid = new FluidDisplay(this.guiLeft + 116, this.guiTop + 5, this.press.tank);
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ public class GuiCanolaPress extends GuiWtfMojang<ContainerCanolaPress> {
|
|||
|
||||
@Override
|
||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
||||
AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.press);
|
||||
AssetUtil.displayNameString(this.font, this.xSize, -10, this.press);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -34,8 +34,8 @@ public class GuiCoalGenerator extends GuiWtfMojang<ContainerCoalGenerator> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
public void init() {
|
||||
super.init();
|
||||
this.energy = new EnergyDisplay(this.guiLeft + 42, this.guiTop + 5, this.generator.storage);
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ public class GuiCoalGenerator extends GuiWtfMojang<ContainerCoalGenerator> {
|
|||
|
||||
@Override
|
||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
||||
AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.generator);
|
||||
AssetUtil.displayNameString(this.font, this.xSize, -10, this.generator);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -40,10 +40,10 @@ public class GuiCoffeeMachine extends GuiWtfMojang<ContainerCoffeeMachine> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
public void init() {
|
||||
super.init();
|
||||
|
||||
GuiButton buttonOkay = new GuiButton(0, this.guiLeft + 60, this.guiTop + 11, 58, 20, StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.ok"));
|
||||
Button buttonOkay = new Button(0, this.guiLeft + 60, this.guiTop + 11, 58, 20, StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.ok"));
|
||||
this.addButton(buttonOkay);
|
||||
|
||||
this.energy = new EnergyDisplay(this.guiLeft + 16, this.guiTop + 5, this.machine.storage);
|
||||
|
@ -65,7 +65,7 @@ public class GuiCoffeeMachine extends GuiWtfMojang<ContainerCoffeeMachine> {
|
|||
|
||||
@Override
|
||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
||||
AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.machine);
|
||||
AssetUtil.displayNameString(this.font, this.xSize, -10, this.machine);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -96,7 +96,7 @@ public class GuiCoffeeMachine extends GuiWtfMojang<ContainerCoffeeMachine> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void actionPerformed(GuiButton button) {
|
||||
public void actionPerformed(Button button) {
|
||||
PacketHandlerHelper.sendButtonPacket(this.machine, button.id);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,8 +36,8 @@ public class GuiDirectionalBreaker extends GuiWtfMojang<ContainerDirectionalBrea
|
|||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
public void init() {
|
||||
super.init();
|
||||
this.energy = new EnergyDisplay(this.guiLeft + 42, this.guiTop + 5, this.breaker.storage);
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ public class GuiDirectionalBreaker extends GuiWtfMojang<ContainerDirectionalBrea
|
|||
|
||||
@Override
|
||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
||||
AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.breaker);
|
||||
AssetUtil.displayNameString(this.font, this.xSize, -10, this.breaker);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -35,7 +35,7 @@ public class GuiDrill extends GuiWtfMojang<ContainerDrill> {
|
|||
|
||||
@Override
|
||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
||||
AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, StringUtil.localize("container." + ActuallyAdditions.MODID + ".drill.name"));
|
||||
AssetUtil.displayNameString(this.font, this.xSize, -10, StringUtil.localize("container." + ActuallyAdditions.MODID + ".drill.name"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -36,7 +36,7 @@ public class GuiDropper extends GuiWtfMojang<ContainerDropper> {
|
|||
|
||||
@Override
|
||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
||||
AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.dropper);
|
||||
AssetUtil.displayNameString(this.font, this.xSize, -10, this.dropper);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -35,8 +35,8 @@ public class GuiEnergizer extends GuiWtfMojang<ContainerEnergizer> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
public void init() {
|
||||
super.init();
|
||||
this.energy = new EnergyDisplay(this.guiLeft + 56, this.guiTop + 5, this.energizer.storage);
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@ public class GuiEnergizer extends GuiWtfMojang<ContainerEnergizer> {
|
|||
|
||||
@Override
|
||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
||||
AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.energizer);
|
||||
AssetUtil.displayNameString(this.font, this.xSize, -10, this.energizer);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -36,8 +36,8 @@ public class GuiEnervator extends GuiWtfMojang<ContainerEnervator> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
public void init() {
|
||||
super.init();
|
||||
this.energy = new EnergyDisplay(this.guiLeft + 56, this.guiTop + 5, this.enervator.storage);
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ public class GuiEnervator extends GuiWtfMojang<ContainerEnervator> {
|
|||
|
||||
@Override
|
||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
||||
AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.enervator);
|
||||
AssetUtil.displayNameString(this.font, this.xSize, -10, this.enervator);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -37,15 +37,15 @@ public class GuiFarmer extends GuiWtfMojang<ContainerFarmer> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
public void init() {
|
||||
super.init();
|
||||
|
||||
this.energy = new EnergyDisplay(this.guiLeft + 33, this.guiTop + 6, this.farmer.storage);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
||||
AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.farmer);
|
||||
AssetUtil.displayNameString(this.font, this.xSize, -10, this.farmer);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -52,7 +52,7 @@ public class GuiFeeder extends GuiWtfMojang<ContainerFeeder> {
|
|||
|
||||
@Override
|
||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
||||
AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.tileFeeder);
|
||||
AssetUtil.displayNameString(this.font, this.xSize, -10, this.tileFeeder);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -44,15 +44,15 @@ public class GuiFermentingBarrel extends GuiWtfMojang<ContainerFermentingBarrel>
|
|||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
public void init() {
|
||||
super.init();
|
||||
this.input = new FluidDisplay(this.guiLeft + 60, this.guiTop + 5, this.press.canolaTank);
|
||||
this.output = new FluidDisplay(this.guiLeft + 98, this.guiTop + 5, this.press.oilTank);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
||||
AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.press);
|
||||
AssetUtil.displayNameString(this.font, this.xSize, -10, this.press);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -35,7 +35,7 @@ public class GuiFilter extends GuiWtfMojang<ContainerFilter> {
|
|||
|
||||
@Override
|
||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
||||
AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, StringUtil.localize("container." + ActuallyAdditions.MODID + ".filter.name"));
|
||||
AssetUtil.displayNameString(this.font, this.xSize, -10, StringUtil.localize("container." + ActuallyAdditions.MODID + ".filter.name"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -35,8 +35,8 @@ public class GuiFireworkBox extends GuiContainer implements GuiResponder {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
public void init() {
|
||||
super.init();
|
||||
|
||||
this.addButton(new CustomSlider(this, 0, this.guiLeft, this.guiTop, "Value Play", 0F, 5F, this.tile.intValuePlay, IntFormatter.INSTANCE));
|
||||
this.addButton(new CustomSlider(this, 1, this.guiLeft, this.guiTop + 20, "Average Charge Amount", 1F, 4F, this.tile.chargeAmount, IntFormatter.INSTANCE));
|
||||
|
@ -56,7 +56,7 @@ public class GuiFireworkBox extends GuiContainer implements GuiResponder {
|
|||
|
||||
@Override
|
||||
public void setEntryValue(int id, float value) {
|
||||
GuiButton button = this.buttonList.get(id);
|
||||
Button button = this.buttonList.get(id);
|
||||
if (button instanceof GuiSlider) {
|
||||
if (!((GuiSlider) button).isMouseDown) {
|
||||
System.out.println("SETTING VALUE FOR " + id + "!!");
|
||||
|
@ -72,7 +72,7 @@ public class GuiFireworkBox extends GuiContainer implements GuiResponder {
|
|||
|
||||
@Override
|
||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
||||
AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.tile);
|
||||
AssetUtil.displayNameString(this.font, this.xSize, -10, this.tile);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -43,14 +43,14 @@ public class GuiFluidCollector extends GuiWtfMojang<ContainerFluidCollector> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
public void init() {
|
||||
super.init();
|
||||
this.fluid = new FluidDisplay(this.guiLeft + 67, this.guiTop + 5, this.collector.tank);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
||||
AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.collector);
|
||||
AssetUtil.displayNameString(this.font, this.xSize, -10, this.collector);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -34,7 +34,7 @@ public class GuiFurnaceDouble extends GuiWtfMojang<ContainerFurnaceDouble> {
|
|||
private final TileEntityFurnaceDouble tileFurnace;
|
||||
private EnergyDisplay energy;
|
||||
|
||||
private GuiButton buttonAutoSplit;
|
||||
private Button buttonAutoSplit;
|
||||
|
||||
public GuiFurnaceDouble(ContainerFurnaceDouble container, PlayerInventory inventory, ITextComponent title) {
|
||||
super(container, inventory);
|
||||
|
@ -56,8 +56,8 @@ public class GuiFurnaceDouble extends GuiWtfMojang<ContainerFurnaceDouble> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
public void init() {
|
||||
super.init();
|
||||
this.energy = new EnergyDisplay(this.guiLeft + 27, this.guiTop + 5, this.tileFurnace.storage);
|
||||
|
||||
this.buttonAutoSplit = new GuiInputter.SmallerButton(0, this.guiLeft, this.guiTop, "S");
|
||||
|
@ -74,7 +74,7 @@ public class GuiFurnaceDouble extends GuiWtfMojang<ContainerFurnaceDouble> {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed(GuiButton button) throws IOException {
|
||||
protected void actionPerformed(Button button) throws IOException {
|
||||
if (button.id == 0) {
|
||||
PacketHandlerHelper.sendButtonPacket(this.tileFurnace, button.id);
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ public class GuiFurnaceDouble extends GuiWtfMojang<ContainerFurnaceDouble> {
|
|||
|
||||
@Override
|
||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
||||
AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.tileFurnace);
|
||||
AssetUtil.displayNameString(this.font, this.xSize, -10, this.tileFurnace);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -44,20 +44,20 @@
|
|||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void initGui() {
|
||||
// super.initGui();
|
||||
// public void init() {
|
||||
// super.init();
|
||||
//
|
||||
// if (this.page > 0) {
|
||||
// this.addButton(new GuiButton(this.page - 1, this.guiLeft + 13, this.guiTop + 172, 20, 20, "<"));
|
||||
// this.addButton(new Button(this.page - 1, this.guiLeft + 13, this.guiTop + 172, 20, 20, "<"));
|
||||
// }
|
||||
//
|
||||
// if (this.page == 0 && this.chest instanceof TileEntityGiantChestMedium || this.page <= 1 && this.chest instanceof TileEntityGiantChestLarge) {
|
||||
// this.addButton(new GuiButton(this.page + 1, this.guiLeft + 209, this.guiTop + 172, 20, 20, ">"));
|
||||
// this.addButton(new Button(this.page + 1, this.guiLeft + 209, this.guiTop + 172, 20, 20, ">"));
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// protected void actionPerformed(GuiButton button) throws IOException {
|
||||
// protected void actionPerformed(Button button) throws IOException {
|
||||
// if (button.id >= 0 && button.id < 3) {
|
||||
// PacketHandlerHelper.sendButtonPacket(this.chest, button.id);
|
||||
// }
|
||||
|
@ -65,7 +65,7 @@
|
|||
//
|
||||
// @Override
|
||||
// public void drawGuiContainerForegroundLayer(int x, int y) {
|
||||
// AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.chest);
|
||||
// AssetUtil.displayNameString(this.font, this.xSize, -10, this.chest);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
|
|
|
@ -53,8 +53,8 @@ public class GuiGrinder extends GuiWtfMojang<ContainerGrinder> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
public void init() {
|
||||
super.init();
|
||||
this.energy = new EnergyDisplay(this.guiLeft + (this.isDouble
|
||||
? 13
|
||||
: 42), this.guiTop + 5, this.tileGrinder.storage);
|
||||
|
@ -66,7 +66,7 @@ public class GuiGrinder extends GuiWtfMojang<ContainerGrinder> {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed(GuiButton button) throws IOException {
|
||||
protected void actionPerformed(Button button) throws IOException {
|
||||
if (this.isDouble && button.id == 0) {
|
||||
PacketHandlerHelper.sendButtonPacket(this.tileGrinder, button.id);
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ public class GuiGrinder extends GuiWtfMojang<ContainerGrinder> {
|
|||
|
||||
@Override
|
||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
||||
AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.tileGrinder);
|
||||
AssetUtil.displayNameString(this.font, this.xSize, -10, this.tileGrinder);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -17,15 +17,15 @@ import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper;
|
|||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityInputter;
|
||||
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||
import net.java.games.input.Keyboard;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiTextField;
|
||||
import net.minecraft.client.gui.widget.TextFieldWidget;
|
||||
import net.minecraft.client.gui.widget.button.Button;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
@ -38,10 +38,10 @@ public class GuiInputter extends GuiWtfMojang<ContainerInputter> {
|
|||
private static final ResourceLocation RES_LOC_ADVANCED = AssetUtil.getGuiLocation("gui_inputter_advanced");
|
||||
public final TileEntityInputter tileInputter;
|
||||
private final boolean isAdvanced;
|
||||
private GuiTextField fieldPutStart;
|
||||
private GuiTextField fieldPutEnd;
|
||||
private GuiTextField fieldPullStart;
|
||||
private GuiTextField fieldPullEnd;
|
||||
private TextFieldWidget fieldPutStart;
|
||||
private TextFieldWidget fieldPutEnd;
|
||||
private TextFieldWidget fieldPullStart;
|
||||
private TextFieldWidget fieldPullEnd;
|
||||
|
||||
private FilterSettingsGui leftFilter;
|
||||
private FilterSettingsGui rightFilter;
|
||||
|
@ -57,31 +57,31 @@ public class GuiInputter extends GuiWtfMojang<ContainerInputter> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
public void init() {
|
||||
super.init();
|
||||
|
||||
if (this.isAdvanced) {
|
||||
this.leftFilter = new FilterSettingsGui(this.tileInputter.leftFilter, this.guiLeft + 3, this.guiTop + 6, this.buttonList);
|
||||
this.rightFilter = new FilterSettingsGui(this.tileInputter.rightFilter, this.guiLeft + 157, this.guiTop + 6, this.buttonList);
|
||||
}
|
||||
|
||||
this.fieldPullStart = new GuiTextField(3000, this.fontRenderer, this.guiLeft + 6, this.guiTop + 80 + (this.isAdvanced
|
||||
this.fieldPullStart = new TextFieldWidget(3000, this.font, this.guiLeft + 6, this.guiTop + 80 + (this.isAdvanced
|
||||
? OFFSET_ADVANCED
|
||||
: 0), 34, 8);
|
||||
this.fieldPullStart.setMaxStringLength(5);
|
||||
this.fieldPullStart.setEnableBackgroundDrawing(false);
|
||||
this.fieldPullEnd = new GuiTextField(3001, this.fontRenderer, this.guiLeft + 50, this.guiTop + 80 + (this.isAdvanced
|
||||
this.fieldPullEnd = new TextFieldWidget(3001, this.font, this.guiLeft + 50, this.guiTop + 80 + (this.isAdvanced
|
||||
? OFFSET_ADVANCED
|
||||
: 0), 34, 8);
|
||||
this.fieldPullEnd.setMaxStringLength(5);
|
||||
this.fieldPullEnd.setEnableBackgroundDrawing(false);
|
||||
|
||||
this.fieldPutStart = new GuiTextField(3002, this.fontRenderer, this.guiLeft + 91, this.guiTop + 80 + (this.isAdvanced
|
||||
this.fieldPutStart = new TextFieldWidget(3002, this.font, this.guiLeft + 91, this.guiTop + 80 + (this.isAdvanced
|
||||
? OFFSET_ADVANCED
|
||||
: 0), 34, 8);
|
||||
this.fieldPutStart.setMaxStringLength(5);
|
||||
this.fieldPutStart.setEnableBackgroundDrawing(false);
|
||||
this.fieldPutEnd = new GuiTextField(3004, this.fontRenderer, this.guiLeft + 135, this.guiTop + 80 + (this.isAdvanced
|
||||
this.fieldPutEnd = new TextFieldWidget(3004, this.font, this.guiLeft + 135, this.guiTop + 80 + (this.isAdvanced
|
||||
? OFFSET_ADVANCED
|
||||
: 0), 34, 8);
|
||||
this.fieldPutEnd.setMaxStringLength(5);
|
||||
|
@ -120,16 +120,16 @@ public class GuiInputter extends GuiWtfMojang<ContainerInputter> {
|
|||
: 0);
|
||||
//Info Mode on!
|
||||
if (x >= this.guiLeft + 4 && y >= newTopOffset + 65 && x <= this.guiLeft + 4 + 38 && y <= newTopOffset + 65 + 12) {
|
||||
this.drawHoveringText(this.fontRenderer.listFormattedStringToWidth(StringUtil.localizeFormatted("info." + ActuallyAdditions.MODID + ".inputter.info.1").replace("<p>", StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.pull")), 200), x, y);
|
||||
this.drawHoveringText(this.font.listFormattedStringToWidth(StringUtil.localizeFormatted("info." + ActuallyAdditions.MODID + ".inputter.info.1").replace("<p>", StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.pull")), 200), x, y);
|
||||
}
|
||||
if (x >= this.guiLeft + 89 && y >= newTopOffset + 65 && x <= this.guiLeft + 89 + 38 && y <= newTopOffset + 65 + 12) {
|
||||
this.drawHoveringText(this.fontRenderer.listFormattedStringToWidth(StringUtil.localizeFormatted("info." + ActuallyAdditions.MODID + ".inputter.info.1").replace("<p>", StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.put")), 200), x, y);
|
||||
this.drawHoveringText(this.font.listFormattedStringToWidth(StringUtil.localizeFormatted("info." + ActuallyAdditions.MODID + ".inputter.info.1").replace("<p>", StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.put")), 200), x, y);
|
||||
}
|
||||
if (x >= this.guiLeft + 48 && y >= newTopOffset + 65 && x <= this.guiLeft + 48 + 38 && y <= newTopOffset + 65 + 12) {
|
||||
this.drawHoveringText(this.fontRenderer.listFormattedStringToWidth(StringUtil.localizeFormatted("info." + ActuallyAdditions.MODID + ".inputter.info.2").replace("<p>", StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.pull")), 200), x, y);
|
||||
this.drawHoveringText(this.font.listFormattedStringToWidth(StringUtil.localizeFormatted("info." + ActuallyAdditions.MODID + ".inputter.info.2").replace("<p>", StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.pull")), 200), x, y);
|
||||
}
|
||||
if (x >= this.guiLeft + 133 && y >= newTopOffset + 65 && x <= this.guiLeft + 133 + 38 && y <= newTopOffset + 65 + 12) {
|
||||
this.drawHoveringText(this.fontRenderer.listFormattedStringToWidth(StringUtil.localizeFormatted("info." + ActuallyAdditions.MODID + ".inputter.info.2").replace("<p>", StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.put")), 200), x, y);
|
||||
this.drawHoveringText(this.font.listFormattedStringToWidth(StringUtil.localizeFormatted("info." + ActuallyAdditions.MODID + ".inputter.info.2").replace("<p>", StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.put")), 200), x, y);
|
||||
}
|
||||
|
||||
if (this.isAdvanced) {
|
||||
|
@ -140,7 +140,7 @@ public class GuiInputter extends GuiWtfMojang<ContainerInputter> {
|
|||
|
||||
@Override
|
||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
||||
AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.tileInputter);
|
||||
AssetUtil.displayNameString(this.font, this.xSize, -10, this.tileInputter);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -159,30 +159,30 @@ public class GuiInputter extends GuiWtfMojang<ContainerInputter> {
|
|||
? OFFSET_ADVANCED
|
||||
: 0));
|
||||
|
||||
this.fontRenderer.drawString(StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.inbound"), this.guiLeft + 23 + 3, this.guiTop + 32 + (this.isAdvanced
|
||||
this.font.drawString(StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.inbound"), this.guiLeft + 23 + 3, this.guiTop + 32 + (this.isAdvanced
|
||||
? OFFSET_ADVANCED
|
||||
: 0), StringUtil.DECIMAL_COLOR_GRAY_TEXT);
|
||||
this.fontRenderer.drawString(StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.outbound"), this.guiLeft + 104 + 3, this.guiTop + 32 + (this.isAdvanced
|
||||
this.font.drawString(StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.outbound"), this.guiLeft + 104 + 3, this.guiTop + 32 + (this.isAdvanced
|
||||
? OFFSET_ADVANCED
|
||||
: 0), StringUtil.DECIMAL_COLOR_GRAY_TEXT);
|
||||
|
||||
this.fontRenderer.drawString(SIDES[this.tileInputter.sideToPull + 1], this.guiLeft + 24 + 1, this.guiTop + 45 + 3 + (this.isAdvanced
|
||||
this.font.drawString(SIDES[this.tileInputter.sideToPull + 1], this.guiLeft + 24 + 1, this.guiTop + 45 + 3 + (this.isAdvanced
|
||||
? OFFSET_ADVANCED
|
||||
: 0), StringUtil.DECIMAL_COLOR_GRAY_TEXT);
|
||||
this.fontRenderer.drawString(SIDES[this.tileInputter.sideToPut + 1], this.guiLeft + 109 + 1, this.guiTop + 45 + 3 + (this.isAdvanced
|
||||
this.font.drawString(SIDES[this.tileInputter.sideToPut + 1], this.guiLeft + 109 + 1, this.guiTop + 45 + 3 + (this.isAdvanced
|
||||
? OFFSET_ADVANCED
|
||||
: 0), StringUtil.DECIMAL_COLOR_GRAY_TEXT);
|
||||
|
||||
this.fontRenderer.drawString(Integer.toString(this.tileInputter.slotToPutStart), this.guiLeft + 92, this.guiTop + 67 + (this.isAdvanced
|
||||
this.font.drawString(Integer.toString(this.tileInputter.slotToPutStart), this.guiLeft + 92, this.guiTop + 67 + (this.isAdvanced
|
||||
? OFFSET_ADVANCED
|
||||
: 0), StringUtil.DECIMAL_COLOR_WHITE);
|
||||
this.fontRenderer.drawString(Integer.toString(this.tileInputter.slotToPutEnd), this.guiLeft + 136, this.guiTop + 67 + (this.isAdvanced
|
||||
this.font.drawString(Integer.toString(this.tileInputter.slotToPutEnd), this.guiLeft + 136, this.guiTop + 67 + (this.isAdvanced
|
||||
? OFFSET_ADVANCED
|
||||
: 0), StringUtil.DECIMAL_COLOR_WHITE);
|
||||
this.fontRenderer.drawString(Integer.toString(this.tileInputter.slotToPullStart), this.guiLeft + 7, this.guiTop + 67 + (this.isAdvanced
|
||||
this.font.drawString(Integer.toString(this.tileInputter.slotToPullStart), this.guiLeft + 7, this.guiTop + 67 + (this.isAdvanced
|
||||
? OFFSET_ADVANCED
|
||||
: 0), StringUtil.DECIMAL_COLOR_WHITE);
|
||||
this.fontRenderer.drawString(Integer.toString(this.tileInputter.slotToPullEnd), this.guiLeft + 51, this.guiTop + 67 + (this.isAdvanced
|
||||
this.font.drawString(Integer.toString(this.tileInputter.slotToPullEnd), this.guiLeft + 51, this.guiTop + 67 + (this.isAdvanced
|
||||
? OFFSET_ADVANCED
|
||||
: 0), StringUtil.DECIMAL_COLOR_WHITE);
|
||||
|
||||
|
@ -242,7 +242,7 @@ public class GuiInputter extends GuiWtfMojang<ContainerInputter> {
|
|||
}
|
||||
}
|
||||
|
||||
public void setVariable(GuiTextField field, int sendInt) {
|
||||
public void setVariable(TextFieldWidget field, int sendInt) {
|
||||
if (!field.getText().isEmpty()) {
|
||||
this.sendPacket(this.parse(field.getText()), sendInt);
|
||||
field.setText("");
|
||||
|
@ -262,7 +262,7 @@ public class GuiInputter extends GuiWtfMojang<ContainerInputter> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void actionPerformed(GuiButton button) {
|
||||
public void actionPerformed(Button button) {
|
||||
if (button.id == TileEntityInputter.OKAY_BUTTON_ID) {
|
||||
this.setVariable(this.fieldPutStart, 0);
|
||||
this.setVariable(this.fieldPutEnd, 1);
|
||||
|
@ -320,7 +320,7 @@ public class GuiInputter extends GuiWtfMojang<ContainerInputter> {
|
|||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public static class TinyButton extends GuiButton {
|
||||
public static class TinyButton extends Button {
|
||||
|
||||
public final ResourceLocation resLoc = AssetUtil.getGuiLocation("gui_inputter");
|
||||
|
||||
|
|
|
@ -57,8 +57,8 @@ public class GuiLaserRelayItemWhitelist extends GuiWtfMojang<ContainerLaserRelay
|
|||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
public void init() {
|
||||
super.init();
|
||||
|
||||
this.leftFilter = new FilterSettingsGui(this.tile.leftFilter, this.guiLeft + 3, this.guiTop + 6, this.buttonList);
|
||||
this.rightFilter = new FilterSettingsGui(this.tile.rightFilter, this.guiLeft + 157, this.guiTop + 6, this.buttonList);
|
||||
|
@ -81,7 +81,7 @@ public class GuiLaserRelayItemWhitelist extends GuiWtfMojang<ContainerLaserRelay
|
|||
if (this.buttonSmartWhitelistLeft.isMouseOver() || this.buttonSmartWhitelistRight.isMouseOver()) {
|
||||
List<String> list = new ArrayList<>();
|
||||
list.add(TextFormatting.BOLD + StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.smart"));
|
||||
list.addAll(this.fontRenderer.listFormattedStringToWidth(StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.smartInfo"), 200));
|
||||
list.addAll(this.font.listFormattedStringToWidth(StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.smartInfo"), 200));
|
||||
this.drawHoveringText(list, x, y);
|
||||
}
|
||||
|
||||
|
@ -91,12 +91,12 @@ public class GuiLaserRelayItemWhitelist extends GuiWtfMojang<ContainerLaserRelay
|
|||
|
||||
@Override
|
||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
||||
AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.tile);
|
||||
AssetUtil.displayNameString(this.font, this.xSize, -10, this.tile);
|
||||
|
||||
String s1 = StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.inbound");
|
||||
String s2 = StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.outbound");
|
||||
this.fontRenderer.drawString(s1, 46 - this.fontRenderer.getStringWidth(s1) / 2, 80, StringUtil.DECIMAL_COLOR_GRAY_TEXT);
|
||||
this.fontRenderer.drawString(s2, 131 - this.fontRenderer.getStringWidth(s2) / 2, 80, StringUtil.DECIMAL_COLOR_GRAY_TEXT);
|
||||
this.font.drawString(s1, 46 - this.font.getStringWidth(s1) / 2, 80, StringUtil.DECIMAL_COLOR_GRAY_TEXT);
|
||||
this.font.drawString(s2, 131 - this.font.getStringWidth(s2) / 2, 80, StringUtil.DECIMAL_COLOR_GRAY_TEXT);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -37,19 +37,19 @@ public class GuiMiner extends GuiWtfMojang<ContainerMiner> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
public void init() {
|
||||
super.init();
|
||||
|
||||
GuiButton buttonMode = new GuiButton(0, this.guiLeft + this.xSize / 2 - 51, this.guiTop + 75, 50, 20, "Mode");
|
||||
Button buttonMode = new Button(0, this.guiLeft + this.xSize / 2 - 51, this.guiTop + 75, 50, 20, "Mode");
|
||||
this.addButton(buttonMode);
|
||||
|
||||
GuiButton buttonReset = new GuiButton(1, this.guiLeft + this.xSize / 2 + 1, this.guiTop + 75, 50, 20, "Reset");
|
||||
Button buttonReset = new Button(1, this.guiLeft + this.xSize / 2 + 1, this.guiTop + 75, 50, 20, "Reset");
|
||||
this.addButton(buttonReset);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
||||
AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.miner);
|
||||
AssetUtil.displayNameString(this.font, this.xSize, -10, this.miner);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -65,11 +65,11 @@ public class GuiMiner extends GuiWtfMojang<ContainerMiner> {
|
|||
String mining = this.miner.onlyMineOres
|
||||
? "Only Mining Ores"
|
||||
: "Mining Everything";
|
||||
this.fontRenderer.drawString(mining, this.guiLeft + this.xSize / 2 - this.fontRenderer.getStringWidth(mining) / 2, this.guiTop + 8, StringUtil.DECIMAL_COLOR_GRAY_TEXT);
|
||||
this.font.drawString(mining, this.guiLeft + this.xSize / 2 - this.font.getStringWidth(mining) / 2, this.guiTop + 8, StringUtil.DECIMAL_COLOR_GRAY_TEXT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void actionPerformed(GuiButton button) {
|
||||
public void actionPerformed(Button button) {
|
||||
PacketHandlerHelper.sendButtonPacket(this.miner, button.id);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,8 +40,8 @@ public class GuiOilGenerator extends GuiWtfMojang<ContainerOilGenerator> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
public void init() {
|
||||
super.init();
|
||||
this.energy = new EnergyDisplay(this.guiLeft + 42, this.guiTop + 5, this.generator.storage);
|
||||
this.fluid = new FluidDisplay(this.guiLeft + 116, this.guiTop + 5, this.generator.tank);
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ public class GuiOilGenerator extends GuiWtfMojang<ContainerOilGenerator> {
|
|||
|
||||
@Override
|
||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
||||
AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.generator);
|
||||
AssetUtil.displayNameString(this.font, this.xSize, -10, this.generator);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -74,12 +74,12 @@ public class GuiOilGenerator extends GuiWtfMojang<ContainerOilGenerator> {
|
|||
}
|
||||
|
||||
if (this.generator.maxBurnTime > 0 && this.generator.currentEnergyProduce > 0) {
|
||||
this.drawCenteredString(this.fontRenderer, this.generator.currentEnergyProduce + " " + I18n.format("actuallyadditions.cft"), this.guiLeft + 87, this.guiTop + 65, 0xFFFFFF);
|
||||
this.drawCenteredString(this.fontRenderer, "for " + this.generator.maxBurnTime + " t", this.guiLeft + 87, this.guiTop + 75, 0xFFFFFF);
|
||||
this.drawCenteredString(this.font, this.generator.currentEnergyProduce + " " + I18n.format("actuallyadditions.cft"), this.guiLeft + 87, this.guiTop + 65, 0xFFFFFF);
|
||||
this.drawCenteredString(this.font, "for " + this.generator.maxBurnTime + " t", this.guiLeft + 87, this.guiTop + 75, 0xFFFFFF);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.scale(0.75, 0.75, 1);
|
||||
float xS = (this.guiLeft + 87) * 1.365F - this.fontRenderer.getStringWidth("(per 50 mB)") / 2F;
|
||||
StringUtil.renderScaledAsciiString(this.fontRenderer, "(per 50 mB)", xS, (this.guiTop + 85) * 1.345F, 0xFFFFFF, true, 0.75F);
|
||||
float xS = (this.guiLeft + 87) * 1.365F - this.font.getStringWidth("(per 50 mB)") / 2F;
|
||||
StringUtil.renderScaledAsciiString(this.font, "(per 50 mB)", xS, (this.guiTop + 85) * 1.345F, 0xFFFFFF, true, 0.75F);
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
|
|
|
@ -42,11 +42,11 @@ public class GuiPhantomPlacer extends GuiWtfMojang<ContainerPhantomPlacer> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
public void init() {
|
||||
super.init();
|
||||
|
||||
if (!this.placer.isBreaker) {
|
||||
this.addButton(new GuiButton(0, this.guiLeft + 63, this.guiTop + 75, 50, 20, this.getSide()));
|
||||
this.addButton(new Button(0, this.guiLeft + 63, this.guiTop + 75, 50, 20, this.getSide()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -68,13 +68,13 @@ public class GuiPhantomPlacer extends GuiWtfMojang<ContainerPhantomPlacer> {
|
|||
|
||||
List<String> textList = new ArrayList<>();
|
||||
textList.add(TextFormatting.GOLD + StringUtil.localize(loc + ".1"));
|
||||
textList.addAll(this.fontRenderer.listFormattedStringToWidth(StringUtil.localize(loc + ".2"), 200));
|
||||
textList.addAll(this.font.listFormattedStringToWidth(StringUtil.localize(loc + ".2"), 200));
|
||||
this.drawHoveringText(textList, mouseX, mouseY);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed(GuiButton button) throws IOException {
|
||||
protected void actionPerformed(Button button) throws IOException {
|
||||
if (!this.placer.isBreaker) {
|
||||
PacketHandlerHelper.sendButtonPacket(this.placer, button.id);
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ public class GuiPhantomPlacer extends GuiWtfMojang<ContainerPhantomPlacer> {
|
|||
|
||||
@Override
|
||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
||||
AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.placer);
|
||||
AssetUtil.displayNameString(this.font, this.xSize, -10, this.placer);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -38,8 +38,8 @@ public class GuiRangedCollector extends GuiWtfMojang<ContainerRangedCollector> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
public void init() {
|
||||
super.init();
|
||||
|
||||
this.filter = new FilterSettingsGui(this.collector.filter, this.guiLeft + 3, this.guiTop + 6, this.buttonList);
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ public class GuiRangedCollector extends GuiWtfMojang<ContainerRangedCollector> {
|
|||
|
||||
@Override
|
||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
||||
AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.collector);
|
||||
AssetUtil.displayNameString(this.font, this.xSize, -10, this.collector);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -75,7 +75,7 @@ public class GuiRangedCollector extends GuiWtfMojang<ContainerRangedCollector> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void actionPerformed(GuiButton button) {
|
||||
public void actionPerformed(Button button) {
|
||||
PacketHandlerHelper.sendButtonPacket(this.collector, button.id);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,8 +36,8 @@
|
|||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void initGui() {
|
||||
// super.initGui();
|
||||
// public void init() {
|
||||
// super.init();
|
||||
// this.energy = new EnergyDisplay(this.guiLeft + 27, this.guiTop + 5, this.tileRepairer.storage);
|
||||
// }
|
||||
//
|
||||
|
@ -49,7 +49,7 @@
|
|||
//
|
||||
// @Override
|
||||
// public void drawGuiContainerForegroundLayer(int x, int y) {
|
||||
// AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.tileRepairer);
|
||||
// AssetUtil.displayNameString(this.font, this.xSize, -10, this.tileRepairer);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
//import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
|
||||
//import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||
//import net.minecraft.client.Minecraft;
|
||||
//import net.minecraft.client.gui.GuiTextField;
|
||||
//import net.minecraft.client.gui.widget.TextFieldWidget;
|
||||
//import net.minecraft.nbt.CompoundNBT;
|
||||
//import net.minecraft.util.ResourceLocation;
|
||||
//import net.minecraft.util.text.TextFormatting;
|
||||
|
@ -41,7 +41,7 @@
|
|||
// private final int z;
|
||||
// private final World world;
|
||||
// private final TileEntitySmileyCloud cloud;
|
||||
// private GuiTextField nameField;
|
||||
// private TextFieldWidget nameField;
|
||||
//
|
||||
// public GuiSmileyCloud(TileEntityBase tile, int x, int y, int z, World world) {
|
||||
// super(new ContainerSmileyCloud());
|
||||
|
@ -55,10 +55,10 @@
|
|||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void initGui() {
|
||||
// super.initGui();
|
||||
// public void init() {
|
||||
// super.init();
|
||||
//
|
||||
// this.nameField = new GuiTextField(4000, this.fontRenderer, this.guiLeft + 5, this.guiTop + 6, 114, 8);
|
||||
// this.nameField = new TextFieldWidget(4000, this.font, this.guiLeft + 5, this.guiTop + 6, 114, 8);
|
||||
// this.nameField.setMaxStringLength(20);
|
||||
// this.nameField.setEnableBackgroundDrawing(false);
|
||||
// this.nameField.setFocused(true);
|
||||
|
@ -70,7 +70,7 @@
|
|||
// ? ""
|
||||
// : TextFormatting.GOLD + this.cloud.name + TextFormatting.RESET + " " + StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.the") + " ";
|
||||
// String localizedName = name + StringUtil.localize("container." + ActuallyAdditions.MODID + ".cloud.name");
|
||||
// this.fontRenderer.drawString(localizedName, this.xSize / 2 - this.fontRenderer.getStringWidth(localizedName) / 2, -10, StringUtil.DECIMAL_COLOR_WHITE);
|
||||
// this.font.drawString(localizedName, this.xSize / 2 - this.font.getStringWidth(localizedName) / 2, -10, StringUtil.DECIMAL_COLOR_WHITE);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
|
@ -108,7 +108,7 @@
|
|||
// this.nameField.updateCursorCounter();
|
||||
// }
|
||||
//
|
||||
// public void setVariable(GuiTextField field) {
|
||||
// public void setVariable(TextFieldWidget field) {
|
||||
// this.sendPacket(field.getText(), 0);
|
||||
// field.setText("");
|
||||
// }
|
||||
|
|
|
@ -18,7 +18,7 @@ public class ActuallyTiles {
|
|||
public static final RegistryObject<TileEntityType<TileEntityGrinder>> GRINDER_TILE = TILES.register("grinder", () -> TileEntityType.Builder.create(TileEntityGrinder::new, ActuallyBlocks.blockGrinder.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityFurnaceDouble>> FURNACE_DOUBLE_TILE = TILES.register("furnaceDouble", () -> TileEntityType.Builder.create(TileEntityFurnaceDouble::new, ActuallyBlocks.blockFurnaceDouble.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityInputter>> INPUTTER_TILE = TILES.register("inputter", () -> TileEntityType.Builder.create(TileEntityInputter::new, ActuallyBlocks.blockInputter.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityFurnaceSolar>> SOLAR_TILE = TILES.register("solarPanel", () -> TileEntityType.Builder.create(TileEntityFurnaceSolar::new, ActuallyBlocks.blockFurnaceSolar.get()).build(null));
|
||||
// public static final RegistryObject<TileEntityType<TileEntityFurnaceSolar>> SOLAR_TILE = TILES.register("solarPanel", () -> TileEntityType.Builder.create(TileEntityFurnaceSolar::new, ActuallyBlocks.blockFurnaceSolar.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityHeatCollector>> HEATCOLLECTOR_TILE = TILES.register("heatCollector", () -> TileEntityType.Builder.create(TileEntityHeatCollector::new, ActuallyBlocks.blockHeatCollector.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityBreaker>> BREAKER_TILE = TILES.register("breaker", () -> TileEntityType.Builder.create(TileEntityBreaker::new, ActuallyBlocks.blockBreaker.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityDropper>> DROPPER_TILE = TILES.register("dropper", () -> TileEntityType.Builder.create(TileEntityDropper::new, ActuallyBlocks.blockDropper.get()).build(null));
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
package de.ellpeck.actuallyadditions.mod.tile;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.BlockFurnaceDouble;
|
||||
import de.ellpeck.actuallyadditions.mod.inventory.ContainerFurnaceDouble;
|
||||
import de.ellpeck.actuallyadditions.mod.network.gui.IButtonReactor;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA;
|
||||
|
@ -26,6 +25,7 @@ import net.minecraft.inventory.container.INamedContainerProvider;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.FurnaceRecipe;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.state.properties.BlockStateProperties;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.datafix.fixes.FurnaceRecipes;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
|
@ -150,7 +150,7 @@ public class TileEntityFurnaceDouble extends TileEntityInventoryBase implements
|
|||
}
|
||||
|
||||
BlockState currState = this.world.getBlockState(this.pos);
|
||||
boolean current = currState.get(BlockFurnaceDouble.IS_ON);
|
||||
boolean current = currState.get(BlockStateProperties.LIT);
|
||||
boolean changeTo = current;
|
||||
if (this.lastSmelted != smelted) {
|
||||
changeTo = smelted;
|
||||
|
@ -163,7 +163,7 @@ public class TileEntityFurnaceDouble extends TileEntityInventoryBase implements
|
|||
}
|
||||
|
||||
if (changeTo != current) {
|
||||
this.world.setBlockState(this.pos, currState.with(BlockFurnaceDouble.IS_ON, changeTo));
|
||||
this.world.setBlockState(this.pos, currState.with(BlockStateProperties.LIT, changeTo));
|
||||
}
|
||||
|
||||
this.lastSmelted = smelted;
|
||||
|
|
Loading…
Reference in a new issue