mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 23:28:35 +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);
|
void actionPerformed(GuiBookletBase gui, Button button);
|
||||||
|
|
||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
void initGui(GuiBookletBase gui, int startX, int startY);
|
void init(GuiBookletBase gui, int startX, int startY);
|
||||||
|
|
||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
void updateScreen(GuiBookletBase gui, int startX, int startY, int pageTimer);
|
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> 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> 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> 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> 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> blockGreenhouseGlass = BLOCKS.register("block_greenhouse_glass", BlockGreenhouseGlass::new);
|
||||||
public static final RegistryObject<Block> blockBreaker = BLOCKS.register("block_breaker", () -> new BlockBreaker(false));
|
public static final RegistryObject<Block> blockBreaker = BLOCKS.register("block_breaker", () -> new BlockBreaker(false));
|
||||||
|
|
|
@ -1,60 +1,39 @@
|
||||||
/*
|
// 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
|
// * This file ("BlockFurnaceSolar.java") is part of the Actually Additions mod for Minecraft.
|
||||||
* under the Actually Additions License to be found at
|
// * It is created and owned by Ellpeck and distributed
|
||||||
* http://ellpeck.de/actaddlicense
|
// * under the Actually Additions License to be found at
|
||||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
// * http://ellpeck.de/actaddlicense
|
||||||
*
|
// * View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||||
* © 2015-2017 Ellpeck
|
// *
|
||||||
*/
|
// * © 2015-2017 Ellpeck
|
||||||
|
// */
|
||||||
package de.ellpeck.actuallyadditions.mod.blocks;
|
//
|
||||||
|
//package de.ellpeck.actuallyadditions.mod.blocks;
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
//
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFurnaceSolar;
|
//import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
||||||
import net.minecraft.block.SoundType;
|
//import de.ellpeck.actuallyadditions.mod.tile.TileEntityFurnaceSolar;
|
||||||
import net.minecraft.block.material.Material;
|
//import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.item.EnumRarity;
|
//import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.item.ItemStack;
|
//import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
//import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.math.AxisAlignedBB;
|
//import net.minecraft.util.math.AxisAlignedBB;
|
||||||
import net.minecraft.util.math.BlockPos;
|
//import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.IBlockAccess;
|
//import net.minecraft.world.IBlockAccess;
|
||||||
|
//import net.minecraft.world.IBlockReader;
|
||||||
public class BlockFurnaceSolar extends BlockContainerBase {
|
//
|
||||||
|
//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);
|
||||||
public BlockFurnaceSolar() {
|
// this.setHarvestLevel("pickaxe", 0);
|
||||||
super(Material.ROCK, this.name);
|
// this.setHardness(1.5F);
|
||||||
this.setHarvestLevel("pickaxe", 0);
|
// this.setResistance(10.0F);
|
||||||
this.setHardness(1.5F);
|
// this.setSoundType(SoundType.STONE);
|
||||||
this.setResistance(10.0F);
|
// }
|
||||||
this.setSoundType(SoundType.STONE);
|
//
|
||||||
}
|
//
|
||||||
|
// @Override
|
||||||
@Override
|
// public TileEntity createNewTileEntity(IBlockReader worldIn) {
|
||||||
public AxisAlignedBB getBoundingBox(BlockState state, IBlockAccess source, BlockPos pos) {
|
// return new TileEntityFurnaceSolar();
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -11,27 +11,9 @@
|
||||||
package de.ellpeck.actuallyadditions.mod.blocks;
|
package de.ellpeck.actuallyadditions.mod.blocks;
|
||||||
|
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase;
|
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 class BlockGeneric extends BlockBase {
|
||||||
|
|
||||||
public BlockGeneric() {
|
public BlockGeneric() {
|
||||||
this(Material.ROCK, SoundType.STONE, 1.5F, 10.0F, "pickaxe", 0);
|
super(ActuallyBlocks.defaultPickProps(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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,71 +11,45 @@
|
||||||
package de.ellpeck.actuallyadditions.mod.blocks;
|
package de.ellpeck.actuallyadditions.mod.blocks;
|
||||||
|
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase;
|
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.IGrowable;
|
||||||
import net.minecraft.block.SoundType;
|
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.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.minecraft.world.World;
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
import net.minecraft.world.server.ServerWorld;
|
||||||
import org.apache.commons.lang3.tuple.Triple;
|
import org.apache.commons.lang3.tuple.Triple;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
public class BlockGreenhouseGlass extends BlockBase {
|
public class BlockGreenhouseGlass extends BlockBase {
|
||||||
|
|
||||||
public BlockGreenhouseGlass() {
|
public BlockGreenhouseGlass() {
|
||||||
super(Material.GLASS, name);
|
super(ActuallyBlocks.defaultPickProps(0, 0.5F, 10.0F).sound(SoundType.GLASS).tickRandomly());
|
||||||
this.setHarvestLevel("pickaxe", 0);
|
}
|
||||||
this.setHardness(0.5F);
|
|
||||||
this.setResistance(10.0F);
|
|
||||||
this.setSoundType(SoundType.GLASS);
|
// TODO: [port] figure this out
|
||||||
this.setTickRandomly(true);
|
// @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
|
@Override
|
||||||
public boolean isOpaqueCube(BlockState state) {
|
public void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random rand) {
|
||||||
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) {
|
|
||||||
if (world.isRemote) {
|
if (world.isRemote) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -94,7 +68,7 @@ public class BlockGreenhouseGlass extends BlockBase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (once) {
|
if (once) {
|
||||||
world.playEvent(2005, trip.getMiddle().isOpaqueCube()
|
world.playEvent(2005, trip.getMiddle().isOpaqueCube(world, trip.getLeft())
|
||||||
? trip.getLeft().up()
|
? trip.getLeft().up()
|
||||||
: trip.getLeft(), 0);
|
: trip.getLeft(), 0);
|
||||||
}
|
}
|
||||||
|
@ -102,14 +76,14 @@ public class BlockGreenhouseGlass extends BlockBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Triple<BlockPos, BlockState, IGrowable> firstBlock(World world, BlockPos glassPos) {
|
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) {
|
while (true) {
|
||||||
mut.setPos(mut.getX(), mut.getY() - 1, mut.getZ());
|
mut.setPos(mut.getX(), mut.getY() - 1, mut.getZ());
|
||||||
if (mut.getY() < 0) {
|
if (mut.getY() < 0) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
BlockState state = world.getBlockState(mut);
|
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) {
|
if (state.getBlock() instanceof IGrowable) {
|
||||||
return Triple.of(mut.toImmutable(), state, (IGrowable) state.getBlock());
|
return Triple.of(mut.toImmutable(), state, (IGrowable) state.getBlock());
|
||||||
} else {
|
} 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;
|
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.blocks.base.BlockContainerBase;
|
||||||
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityGrinder;
|
import de.ellpeck.actuallyadditions.mod.tile.TileEntityGrinder;
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityGrinderDouble;
|
import de.ellpeck.actuallyadditions.mod.tile.TileEntityGrinderDouble;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.state.BlockStateContainer;
|
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.item.EnumRarity;
|
import net.minecraft.item.BlockItemUseContext;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.particles.ParticleTypes;
|
||||||
|
import net.minecraft.state.StateContainer;
|
||||||
|
import net.minecraft.state.properties.BlockStateProperties;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
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.Hand;
|
||||||
import net.minecraft.util.math.BlockPos;
|
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.minecraft.world.World;
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
import net.minecraft.world.server.ServerWorld;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
public class BlockGrinder extends BlockContainerBase {
|
public class BlockGrinder extends BlockContainerBase {
|
||||||
|
|
||||||
private final boolean isDouble;
|
private final boolean isDouble;
|
||||||
|
|
||||||
public BlockGrinder(boolean isDouble) {
|
public BlockGrinder(boolean isDouble) {
|
||||||
super(Material.ROCK, this.name);
|
super(ActuallyBlocks.defaultPickProps(0).tickRandomly());
|
||||||
this.isDouble = isDouble;
|
this.isDouble = isDouble;
|
||||||
this.setHarvestLevel("pickaxe", 0);
|
this.setDefaultState(this.stateContainer.getBaseState().with(HORIZONTAL_FACING, Direction.NORTH).with(LIT, false));
|
||||||
this.setHardness(1.5F);
|
|
||||||
this.setResistance(10.0F);
|
|
||||||
this.setSoundType(SoundType.STONE);
|
|
||||||
this.setTickRandomly(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -53,64 +54,54 @@ public class BlockGrinder extends BlockContainerBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@OnlyIn(Dist.CLIENT)
|
public void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random rand) {
|
||||||
public void randomDisplayTick(BlockState state, World world, BlockPos pos, Random rand) {
|
if (state.get(BlockStateProperties.LIT)) {
|
||||||
if (state.getValue(BlockFurnaceDouble.IS_ON)) {
|
|
||||||
for (int i = 0; i < 5; i++) {
|
for (int i = 0; i < 5; i++) {
|
||||||
double xRand = rand.nextDouble() / 0.75D - 0.5D;
|
double xRand = rand.nextDouble() / 0.75D - 0.5D;
|
||||||
double zRand = 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
|
@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 (!world.isRemote) {
|
if (this.isDouble) {
|
||||||
TileEntityGrinder grinder = (TileEntityGrinder) world.getTileEntity(pos);
|
return this.openGui(world, player, pos, TileEntityGrinderDouble.class);
|
||||||
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;
|
|
||||||
}
|
return this.openGui(world, player, pos, TileEntityGrinder.class);
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getLightValue(BlockState state, IBlockAccess world, BlockPos pos) {
|
public BlockState getStateForPlacement(BlockItemUseContext context) {
|
||||||
return this.getMetaFromState(state) == 1
|
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
|
? 12
|
||||||
: 0;
|
: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int damageDropped(BlockState state) {
|
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
|
||||||
return 0;
|
switch (state.get(HORIZONTAL_FACING)) {
|
||||||
}
|
case EAST:
|
||||||
|
return Shapes.GrinderShapes.SHAPE_E;
|
||||||
@Override
|
case SOUTH:
|
||||||
public EnumRarity getRarity(ItemStack stack) {
|
return Shapes.GrinderShapes.SHAPE_S;
|
||||||
return EnumRarity.EPIC;
|
case WEST:
|
||||||
}
|
return Shapes.GrinderShapes.SHAPE_W;
|
||||||
|
default:
|
||||||
@Override
|
return Shapes.GrinderShapes.SHAPE_N;
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,20 +12,16 @@ package de.ellpeck.actuallyadditions.mod.blocks;
|
||||||
|
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityHeatCollector;
|
import de.ellpeck.actuallyadditions.mod.tile.TileEntityHeatCollector;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.material.Material;
|
|
||||||
import net.minecraft.item.EnumRarity;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
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 class BlockHeatCollector extends BlockContainerBase {
|
||||||
|
|
||||||
public BlockHeatCollector() {
|
public BlockHeatCollector() {
|
||||||
super(Material.ROCK, this.name);
|
super(ActuallyBlocks.defaultPickProps(0, 2.5F, 10.0F));
|
||||||
this.setHarvestLevel("pickaxe", 0);
|
|
||||||
this.setHardness(2.5F);
|
|
||||||
this.setResistance(10.0F);
|
|
||||||
this.setSoundType(SoundType.STONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -34,7 +30,7 @@ public class BlockHeatCollector extends BlockContainerBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public EnumRarity getRarity(ItemStack stack) {
|
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
|
||||||
return EnumRarity.UNCOMMON;
|
return Shapes.HEAT_COLLECTOR_SHAPE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,27 +10,19 @@
|
||||||
|
|
||||||
package de.ellpeck.actuallyadditions.mod.blocks;
|
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.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.TileEntityInputter;
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityInputterAdvanced;
|
import de.ellpeck.actuallyadditions.mod.tile.TileEntityInputterAdvanced;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
import net.minecraft.block.BlockState;
|
||||||
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.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.item.EnumRarity;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.ActionResultType;
|
||||||
import net.minecraft.util.Hand;
|
import net.minecraft.util.Hand;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.math.BlockRayTraceResult;
|
||||||
|
import net.minecraft.world.IBlockReader;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockInputter extends BlockContainerBase {
|
public class BlockInputter extends BlockContainerBase {
|
||||||
|
|
||||||
public static final int NAME_FLAVOR_AMOUNTS = 15;
|
public static final int NAME_FLAVOR_AMOUNTS = 15;
|
||||||
|
@ -38,12 +30,7 @@ public class BlockInputter extends BlockContainerBase {
|
||||||
public final boolean isAdvanced;
|
public final boolean isAdvanced;
|
||||||
|
|
||||||
public BlockInputter(boolean isAdvanced) {
|
public BlockInputter(boolean isAdvanced) {
|
||||||
super(Material.ROCK, this.name);
|
super(ActuallyBlocks.defaultPickProps(0).tickRandomly());
|
||||||
this.setHarvestLevel("pickaxe", 0);
|
|
||||||
this.setHardness(1.5F);
|
|
||||||
this.setResistance(10.0F);
|
|
||||||
this.setSoundType(SoundType.STONE);
|
|
||||||
this.setTickRandomly(true);
|
|
||||||
this.isAdvanced = isAdvanced;
|
this.isAdvanced = isAdvanced;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,65 +42,52 @@ public class BlockInputter extends BlockContainerBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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 (!world.isRemote) {
|
if (this.isAdvanced) {
|
||||||
TileEntityInputter inputter = (TileEntityInputter) world.getTileEntity(pos);
|
return this.openGui(world, player, pos, TileEntityInputterAdvanced.class);
|
||||||
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;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
return this.openGui(world, player, pos, TileEntityInputter.class);
|
||||||
protected ItemBlockBase getItemBlock() {
|
|
||||||
return new TheItemBlock(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
// TODO: [port] ADD BACK
|
||||||
public EnumRarity getRarity(ItemStack stack) {
|
|
||||||
return EnumRarity.EPIC;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class TheItemBlock extends ItemBlockBase {
|
// public static class TheItemBlock extends ItemBlockBase {
|
||||||
|
//
|
||||||
private final Random rand = new Random();
|
// private final Random rand = new Random();
|
||||||
private long lastSysTime;
|
// private long lastSysTime;
|
||||||
private int toPick;
|
// private int toPick;
|
||||||
|
//
|
||||||
public TheItemBlock(Block block) {
|
// public TheItemBlock(Block block) {
|
||||||
super(block);
|
// super(block);
|
||||||
this.setHasSubtypes(false);
|
// this.setHasSubtypes(false);
|
||||||
this.setMaxDamage(0);
|
// this.setMaxDamage(0);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public String getTranslationKey(ItemStack stack) {
|
// public String getTranslationKey(ItemStack stack) {
|
||||||
return this.getTranslationKey();
|
// return this.getTranslationKey();
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public int getMetadata(int damage) {
|
// public int getMetadata(int damage) {
|
||||||
return damage;
|
// return damage;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public String getItemStackDisplayName(ItemStack stack) {
|
// public String getItemStackDisplayName(ItemStack stack) {
|
||||||
if (Util.isClient()) {
|
// if (Util.isClient()) {
|
||||||
long sysTime = System.currentTimeMillis();
|
// long sysTime = System.currentTimeMillis();
|
||||||
|
//
|
||||||
if (this.lastSysTime + 5000 < sysTime) {
|
// if (this.lastSysTime + 5000 < sysTime) {
|
||||||
this.lastSysTime = sysTime;
|
// this.lastSysTime = sysTime;
|
||||||
this.toPick = this.rand.nextInt(NAME_FLAVOR_AMOUNTS) + 1;
|
// 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") + ")";
|
// return StringUtil.localize(this.getTranslationKey() + ".name") + " (" + StringUtil.localize("tile." + ActuallyAdditions.MODID + ".block_inputter.add." + this.toPick + ".name") + ")";
|
||||||
} else {
|
// } else {
|
||||||
return super.getItemStackDisplayName(stack);
|
// return super.getItemStackDisplayName(stack);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,66 +1,67 @@
|
||||||
/*
|
// 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
|
// * This file ("BlockItemRepairer.java") is part of the Actually Additions mod for Minecraft.
|
||||||
* under the Actually Additions License to be found at
|
// * It is created and owned by Ellpeck and distributed
|
||||||
* http://ellpeck.de/actaddlicense
|
// * under the Actually Additions License to be found at
|
||||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
// * http://ellpeck.de/actaddlicense
|
||||||
*
|
// * View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||||
* © 2015-2017 Ellpeck
|
// *
|
||||||
*/
|
// * © 2015-2017 Ellpeck
|
||||||
|
// */
|
||||||
package de.ellpeck.actuallyadditions.mod.blocks;
|
//
|
||||||
|
//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.ActuallyAdditions;
|
||||||
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
//import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
||||||
import net.minecraft.block.SoundType;
|
//import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
||||||
import net.minecraft.block.material.Material;
|
//import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
//import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.item.EnumRarity;
|
//import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.item.ItemStack;
|
//import net.minecraft.item.EnumRarity;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
//import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.Hand;
|
//import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.math.BlockPos;
|
//import net.minecraft.util.Hand;
|
||||||
import net.minecraft.world.IBlockAccess;
|
//import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
//import net.minecraft.world.IBlockAccess;
|
||||||
|
//import net.minecraft.world.World;
|
||||||
public class BlockItemRepairer extends BlockContainerBase {
|
//
|
||||||
|
//public class BlockItemRepairer extends BlockContainerBase {
|
||||||
public BlockItemRepairer() {
|
//
|
||||||
super(Material.ROCK, this.name);
|
// public BlockItemRepairer() {
|
||||||
this.setHarvestLevel("pickaxe", 0);
|
// super(Material.ROCK, this.name);
|
||||||
this.setHardness(20.0F);
|
// this.setHarvestLevel("pickaxe", 0);
|
||||||
this.setResistance(15.0F);
|
// this.setHardness(20.0F);
|
||||||
this.setSoundType(SoundType.STONE);
|
// this.setResistance(15.0F);
|
||||||
this.setTickRandomly(true);
|
// this.setSoundType(SoundType.STONE);
|
||||||
}
|
// this.setTickRandomly(true);
|
||||||
|
// }
|
||||||
@Override
|
//
|
||||||
public TileEntity createNewTileEntity(IBlockReader worldIn) {
|
// @Override
|
||||||
return new TileEntityItemRepairer();
|
// public TileEntity createNewTileEntity(IBlockReader worldIn) {
|
||||||
}
|
// return new TileEntityItemRepairer();
|
||||||
|
// }
|
||||||
@Override
|
//
|
||||||
public ActionResultType onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
|
// @Override
|
||||||
if (!world.isRemote) {
|
// public ActionResultType onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
|
||||||
TileEntityItemRepairer repairer = (TileEntityItemRepairer) world.getTileEntity(pos);
|
// if (!world.isRemote) {
|
||||||
if (repairer != null) {
|
// TileEntityItemRepairer repairer = (TileEntityItemRepairer) world.getTileEntity(pos);
|
||||||
player.openGui(ActuallyAdditions.INSTANCE, GuiHandler.GuiTypes.REPAIRER.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
// if (repairer != null) {
|
||||||
}
|
// player.openGui(ActuallyAdditions.INSTANCE, GuiHandler.GuiTypes.REPAIRER.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||||
return true;
|
// }
|
||||||
}
|
// return true;
|
||||||
return true;
|
// }
|
||||||
}
|
// return true;
|
||||||
|
// }
|
||||||
@Override
|
//
|
||||||
public int getLightValue(BlockState state, IBlockAccess world, BlockPos pos) {
|
// @Override
|
||||||
return this.getMetaFromState(state) == 1
|
// public int getLightValue(BlockState state, IBlockAccess world, BlockPos pos) {
|
||||||
? 12
|
// return this.getMetaFromState(state) == 1
|
||||||
: 0;
|
// ? 12
|
||||||
}
|
// : 0;
|
||||||
|
// }
|
||||||
@Override
|
//
|
||||||
public EnumRarity getRarity(ItemStack stack) {
|
// @Override
|
||||||
return EnumRarity.EPIC;
|
// 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.blocks.base.BlockContainerBase;
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityItemViewer;
|
import de.ellpeck.actuallyadditions.mod.tile.TileEntityItemViewer;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.material.Material;
|
|
||||||
import net.minecraft.item.EnumRarity;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
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 class BlockItemViewer extends BlockContainerBase {
|
||||||
|
|
||||||
public BlockItemViewer() {
|
public BlockItemViewer() {
|
||||||
super(Material.ROCK, this.name);
|
super(ActuallyBlocks.defaultPickProps(0));
|
||||||
this.setHarvestLevel("pickaxe", 0);
|
|
||||||
this.setHardness(1.5F);
|
|
||||||
this.setResistance(10.0F);
|
|
||||||
this.setSoundType(SoundType.STONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World worldIn, int meta) {
|
public TileEntity createNewTileEntity(IBlockReader worldIn) {
|
||||||
return new TileEntityItemViewer();
|
return new TileEntityItemViewer();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public EnumRarity getRarity(ItemStack stack) {
|
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
|
||||||
return EnumRarity.RARE;
|
return Shapes.ITEM_VIEWER_SHAPE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,114 +11,25 @@
|
||||||
package de.ellpeck.actuallyadditions.mod.blocks;
|
package de.ellpeck.actuallyadditions.mod.blocks;
|
||||||
|
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityItemViewerHopping;
|
import de.ellpeck.actuallyadditions.mod.tile.TileEntityItemViewerHopping;
|
||||||
import net.minecraft.block.properties.PropertyDirection;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.state.BlockStateContainer;
|
|
||||||
import net.minecraft.entity.Entity;
|
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
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.util.math.BlockPos;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.util.math.shapes.ISelectionContext;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.util.math.shapes.VoxelShape;
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
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 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() {
|
public BlockItemViewerHopping() {
|
||||||
super(this.name);
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AxisAlignedBB getBoundingBox(BlockState state, IBlockAccess source, BlockPos pos) {
|
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
|
||||||
return FULL_BLOCK_AABB;
|
return Shapes.HOPPING_ITEM_VIEWER_SHAPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Deprecated
|
public TileEntity createNewTileEntity(IBlockReader worldIn) {
|
||||||
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) {
|
|
||||||
return new TileEntityItemViewerHopping();
|
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;
|
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 de.ellpeck.actuallyadditions.mod.util.WorldUtil;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockDirectional;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.state.properties.BlockStateProperties;
|
||||||
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.util.Direction;
|
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.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.minecraft.world.World;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class BlockLampPowerer extends BlockBase {
|
public class BlockLampPowerer extends FullyDirectionalBlock {
|
||||||
|
|
||||||
public BlockLampPowerer() {
|
public BlockLampPowerer() {
|
||||||
super(Material.ROCK, name);
|
super(ActuallyBlocks.defaultPickProps(0));
|
||||||
this.setHarvestLevel("pickaxe", 0);
|
|
||||||
this.setHardness(1.5F);
|
|
||||||
this.setResistance(10.0F);
|
|
||||||
this.setSoundType(SoundType.STONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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);
|
this.updateLamp(worldIn, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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);
|
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) {
|
private void updateLamp(World world, BlockPos pos) {
|
||||||
if (!world.isRemote) {
|
if (!world.isRemote) {
|
||||||
BlockState state = world.getBlockState(pos);
|
BlockState state = world.getBlockState(pos);
|
||||||
BlockPos coords = pos.offset(WorldUtil.getDirectionByPistonRotation(state));
|
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);
|
BlockState state = world.getBlockState(pos);
|
||||||
Block block = state.getBlock();
|
Block block = state.getBlock();
|
||||||
if (block instanceof BlockColoredLamp) {
|
if (block instanceof BlockColoredLamp) {
|
||||||
boolean isOn = ((BlockColoredLamp) block).isOn;
|
if (state.get(BlockStateProperties.LIT) && !powered) {
|
||||||
if (powered) {
|
world.setBlockState(pos, state.with(BlockStateProperties.LIT, false));
|
||||||
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, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
this.updateSurrounding(world, pos, powered, updatedAlready);
|
this.updateSurrounding(world, pos, powered, updatedAlready);
|
||||||
|
@ -95,32 +76,16 @@ public class BlockLampPowerer extends BlockBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public EnumRarity getRarity(ItemStack stack) {
|
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
|
||||||
return EnumRarity.RARE;
|
switch (state.get(FACING)) {
|
||||||
}
|
case EAST:
|
||||||
|
return Shapes.LampPowererShapes.SHAPE_E;
|
||||||
@Override
|
case SOUTH:
|
||||||
public BlockState getStateFromMeta(int meta) {
|
return Shapes.LampPowererShapes.SHAPE_S;
|
||||||
return this.getDefaultState().withProperty(BlockDirectional.FACING, Direction.byIndex(meta));
|
case WEST:
|
||||||
}
|
return Shapes.LampPowererShapes.SHAPE_W;
|
||||||
|
default:
|
||||||
@Override
|
return Shapes.LampPowererShapes.SHAPE_N;
|
||||||
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)));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,153 +14,76 @@ import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
||||||
import de.ellpeck.actuallyadditions.api.laser.Network;
|
import de.ellpeck.actuallyadditions.api.laser.Network;
|
||||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
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.config.ConfigValues;
|
||||||
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
|
||||||
import de.ellpeck.actuallyadditions.mod.items.ItemEngineerGoggles;
|
import de.ellpeck.actuallyadditions.mod.items.ItemEngineerGoggles;
|
||||||
import de.ellpeck.actuallyadditions.mod.items.ItemLaserRelayUpgrade;
|
import de.ellpeck.actuallyadditions.mod.items.ItemLaserRelayUpgrade;
|
||||||
import de.ellpeck.actuallyadditions.mod.items.ItemLaserWrench;
|
import de.ellpeck.actuallyadditions.mod.items.ItemLaserWrench;
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.*;
|
import de.ellpeck.actuallyadditions.mod.tile.*;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||||
import net.minecraft.block.BlockDirectional;
|
import net.minecraft.block.BlockState;
|
||||||
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.client.MainWindow;
|
import net.minecraft.client.MainWindow;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.item.EnumRarity;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.Direction;
|
import net.minecraft.util.ActionResultType;
|
||||||
import net.minecraft.util.Hand;
|
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.BlockPos;
|
||||||
|
import net.minecraft.util.math.BlockRayTraceResult;
|
||||||
import net.minecraft.util.math.RayTraceResult;
|
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.util.text.TextFormatting;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockReader;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||||
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
|
|
||||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
|
||||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
|
||||||
|
|
||||||
|
|
||||||
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.
|
//This took way too much fiddling around. I'm not good with numbers.
|
||||||
private static final float F = 1 / 16F;
|
// 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_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_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_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_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_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 AxisAlignedBB AABB_WEST = new AxisAlignedBB(6 * F, 2 * F, 2 * F, 1, 1 - 2 * F, 1 - 2 * F);
|
||||||
|
|
||||||
private final Type type;
|
private final Type type;
|
||||||
|
|
||||||
public BlockLaserRelay(Type type) {
|
public BlockLaserRelay(Type type) {
|
||||||
super(Material.ROCK, this.name);
|
super(ActuallyBlocks.defaultPickProps(0));
|
||||||
this.setHarvestLevel("pickaxe", 0);
|
|
||||||
this.setHardness(1.5F);
|
|
||||||
this.setResistance(10.0F);
|
|
||||||
this.setSoundType(SoundType.STONE);
|
|
||||||
|
|
||||||
this.type = type;
|
this.type = type;
|
||||||
|
|
||||||
if (this.type.ordinal() == 0) {
|
// TODO: [port] add back once I know what it does.
|
||||||
MinecraftForge.EVENT_BUS.register(this);
|
// if (this.type.ordinal() == 0) {
|
||||||
}
|
// MinecraftForge.EVENT_BUS.register(this);
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
// @SubscribeEvent
|
||||||
public void onBlockRightClick(PlayerInteractEvent.RightClickBlock event) {
|
// public void onBlockRightClick(PlayerInteractEvent.RightClickBlock event) {
|
||||||
PlayerEntity player = event.getEntityPlayer();
|
// PlayerEntity player = event.getEntityPlayer();
|
||||||
World world = event.getWorld();
|
// World world = event.getWorld();
|
||||||
ItemStack stack = event.getItemStack();
|
// ItemStack stack = event.getItemStack();
|
||||||
BlockPos pos = event.getPos();
|
// BlockPos pos = event.getPos();
|
||||||
|
//
|
||||||
if (player != null && world != null && StackUtil.isValid(stack) && pos != null) {
|
// if (player != null && world != null && StackUtil.isValid(stack) && pos != null) {
|
||||||
BlockState state = event.getWorld().getBlockState(pos);
|
// BlockState state = event.getWorld().getBlockState(pos);
|
||||||
if (state != null && state.getBlock() instanceof BlockLaserRelay) {
|
// if (state != null && state.getBlock() instanceof BlockLaserRelay) {
|
||||||
if (player.isSneaking()) {
|
// if (player.isSneaking()) {
|
||||||
event.setUseBlock(Event.Result.ALLOW);
|
// event.setUseBlock(Event.Result.ALLOW);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AxisAlignedBB getBoundingBox(BlockState state, IBlockAccess source, BlockPos pos) {
|
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
|
||||||
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) {
|
|
||||||
ItemStack stack = player.getHeldItem(hand);
|
ItemStack stack = player.getHeldItem(hand);
|
||||||
TileEntity tile = world.getTileEntity(pos);
|
TileEntity tile = world.getTileEntity(pos);
|
||||||
if (tile instanceof TileEntityLaserRelay) {
|
if (tile instanceof TileEntityLaserRelay) {
|
||||||
|
@ -168,7 +91,7 @@ public class BlockLaserRelay extends BlockContainerBase implements IHudDisplay {
|
||||||
|
|
||||||
if (StackUtil.isValid(stack)) {
|
if (StackUtil.isValid(stack)) {
|
||||||
if (stack.getItem() instanceof ItemLaserWrench) {
|
if (stack.getItem() instanceof ItemLaserWrench) {
|
||||||
return false;
|
return ActionResultType.FAIL;
|
||||||
} else if (stack.getItem() == ConfigValues.itemCompassConfigurator) {
|
} else if (stack.getItem() == ConfigValues.itemCompassConfigurator) {
|
||||||
if (!world.isRemote) {
|
if (!world.isRemote) {
|
||||||
relay.onCompassAction(player);
|
relay.onCompassAction(player);
|
||||||
|
@ -182,7 +105,7 @@ public class BlockLaserRelay extends BlockContainerBase implements IHudDisplay {
|
||||||
relay.sendUpdate();
|
relay.sendUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return ActionResultType.PASS;
|
||||||
} else if (stack.getItem() instanceof ItemLaserRelayUpgrade) {
|
} else if (stack.getItem() instanceof ItemLaserRelayUpgrade) {
|
||||||
ItemStack inRelay = relay.inv.getStackInSlot(0);
|
ItemStack inRelay = relay.inv.getStackInSlot(0);
|
||||||
if (!StackUtil.isValid(inRelay)) {
|
if (!StackUtil.isValid(inRelay)) {
|
||||||
|
@ -195,7 +118,7 @@ public class BlockLaserRelay extends BlockContainerBase implements IHudDisplay {
|
||||||
set.setCount(1);
|
set.setCount(1);
|
||||||
relay.inv.setStackInSlot(0, set);
|
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);
|
player.entityDropItem(inRelay, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return ActionResultType.PASS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (relay instanceof TileEntityLaserRelayItemWhitelist) {
|
if (relay instanceof TileEntityLaserRelayItemWhitelist) {
|
||||||
if (!world.isRemote) {
|
return this.openGui(world, player, pos, TileEntityLaserRelayItemWhitelist.class);
|
||||||
player.openGui(ActuallyAdditions.INSTANCE, GuiHandler.GuiTypes.LASER_RELAY_ITEM_WHITELIST.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return ActionResultType.FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World world, int i) {
|
public TileEntity createNewTileEntity(IBlockReader world) {
|
||||||
switch (this.type) {
|
switch (this.type) {
|
||||||
case ITEM:
|
case ITEM:
|
||||||
return new TileEntityLaserRelayItem();
|
return new TileEntityLaserRelayItem();
|
||||||
|
@ -246,17 +166,22 @@ public class BlockLaserRelay extends BlockContainerBase implements IHudDisplay {
|
||||||
@Override
|
@Override
|
||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
public void displayHud(MatrixStack matrices, Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult rayCast, MainWindow resolution) {
|
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);
|
boolean wearing = ItemEngineerGoggles.isWearing(player);
|
||||||
if (wearing || StackUtil.isValid(stack)) {
|
if (wearing || StackUtil.isValid(stack)) {
|
||||||
boolean compass = stack.getItem() == ConfigValues.itemCompassConfigurator;
|
boolean compass = stack.getItem() == ConfigValues.itemCompassConfigurator;
|
||||||
if (wearing || compass || stack.getItem() instanceof ItemLaserWrench) {
|
if (wearing || compass || stack.getItem() instanceof ItemLaserWrench) {
|
||||||
TileEntity tile = minecraft.world.getTileEntity(rayCast.getBlockPos());
|
TileEntity tile = minecraft.world.getTileEntity(pos);
|
||||||
if (tile instanceof TileEntityLaserRelay) {
|
if (tile instanceof TileEntityLaserRelay) {
|
||||||
TileEntityLaserRelay relay = (TileEntityLaserRelay) tile;
|
TileEntityLaserRelay relay = (TileEntityLaserRelay) tile;
|
||||||
|
|
||||||
String strg = relay.getExtraDisplayString();
|
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;
|
String expl;
|
||||||
if (compass) {
|
if (compass) {
|
||||||
|
@ -273,16 +198,20 @@ public class BlockLaserRelay extends BlockContainerBase implements IHudDisplay {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void breakBlock(World world, BlockPos pos, BlockState state) {
|
public void onReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean isMoving) {
|
||||||
super.breakBlock(world, pos, state);
|
super.onReplaced(state, world, pos, newState, isMoving);
|
||||||
|
|
||||||
|
if (state != newState) {
|
||||||
ActuallyAdditionsAPI.connectionHandler.removeRelayFromNetwork(pos, world);
|
ActuallyAdditionsAPI.connectionHandler.removeRelayFromNetwork(pos, world);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public BlockFaceShape getBlockFaceShape(IBlockAccess worldIn, BlockState state, BlockPos pos, Direction face) {
|
|
||||||
return BlockFaceShape.UNDEFINED;
|
|
||||||
}
|
}
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void breakBlock(World world, BlockPos pos, BlockState state) {
|
||||||
|
// super.breakBlock(world, pos, state);
|
||||||
|
//
|
||||||
|
// ActuallyAdditionsAPI.connectionHandler.removeRelayFromNetwork(pos, world);
|
||||||
|
// }
|
||||||
|
|
||||||
public enum Type {
|
public enum Type {
|
||||||
ENERGY_BASIC,
|
ENERGY_BASIC,
|
||||||
|
@ -292,4 +221,9 @@ public class BlockLaserRelay extends BlockContainerBase implements IHudDisplay {
|
||||||
ITEM,
|
ITEM,
|
||||||
ITEM_WHITELIST
|
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 com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
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.tile.TileEntityLavaFactoryController;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.material.Material;
|
|
||||||
import net.minecraft.client.MainWindow;
|
import net.minecraft.client.MainWindow;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.item.EnumRarity;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
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.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.Dist;
|
||||||
|
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||||
|
|
||||||
|
|
||||||
public class BlockLavaFactoryController extends BlockContainerBase implements IHudDisplay {
|
public class BlockLavaFactoryController extends DirectionalBlock.Container implements IHudDisplay {
|
||||||
|
|
||||||
public BlockLavaFactoryController() {
|
public BlockLavaFactoryController() {
|
||||||
super(Material.ROCK, this.name);
|
super(ActuallyBlocks.defaultPickProps(0, 4.5F, 20.0F));
|
||||||
this.setHarvestLevel("pickaxe", 0);
|
|
||||||
this.setHardness(4.5F);
|
|
||||||
this.setResistance(20.0F);
|
|
||||||
this.setSoundType(SoundType.STONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -42,15 +42,14 @@ public class BlockLavaFactoryController extends BlockContainerBase implements IH
|
||||||
return new TileEntityLavaFactoryController();
|
return new TileEntityLavaFactoryController();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public EnumRarity getRarity(ItemStack stack) {
|
|
||||||
return EnumRarity.RARE;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
public void displayHud(MatrixStack matrices, Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult rayCast, MainWindow resolution) {
|
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) {
|
if (factory != null) {
|
||||||
int state = factory.isMultiblock();
|
int state = factory.isMultiblock();
|
||||||
if (state == TileEntityLavaFactoryController.NOT_MULTI) {
|
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;
|
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 de.ellpeck.actuallyadditions.mod.tile.TileEntityLeafGenerator;
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.item.EnumRarity;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
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() {
|
public BlockLeafGenerator() {
|
||||||
super(Material.IRON, this.name);
|
super(Properties.create(Material.IRON).hardnessAndResistance(5.0F, 10.0F).harvestTool(ToolType.PICKAXE).harvestLevel(0).hardnessAndResistance(5.0F, 10.0F).sound(SoundType.METAL));
|
||||||
this.setHarvestLevel("pickaxe", 0);
|
|
||||||
this.setHardness(5.0F);
|
|
||||||
this.setResistance(10.0F);
|
|
||||||
this.setSoundType(SoundType.METAL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -34,7 +34,16 @@ public class BlockLeafGenerator extends BlockContainerBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public EnumRarity getRarity(ItemStack stack) {
|
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
|
||||||
return EnumRarity.EPIC;
|
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;
|
package de.ellpeck.actuallyadditions.mod.blocks;
|
||||||
|
|
||||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
import de.ellpeck.actuallyadditions.mod.blocks.base.DirectionalBlock;
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
|
||||||
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityMiner;
|
import de.ellpeck.actuallyadditions.mod.tile.TileEntityMiner;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.material.Material;
|
|
||||||
import net.minecraft.client.MainWindow;
|
import net.minecraft.client.MainWindow;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.item.EnumRarity;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.ActionResultType;
|
||||||
import net.minecraft.util.Hand;
|
import net.minecraft.util.Hand;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.math.BlockRayTraceResult;
|
||||||
import net.minecraft.util.math.RayTraceResult;
|
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.minecraft.world.World;
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
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() {
|
public BlockMiner() {
|
||||||
super(Material.ROCK, this.name);
|
super(ActuallyBlocks.defaultPickProps(0, 8F, 30F));
|
||||||
this.setHarvestLevel("pickaxe", 0);
|
|
||||||
this.setHardness(8F);
|
|
||||||
this.setResistance(30F);
|
|
||||||
this.setSoundType(SoundType.STONE);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isOpaqueCube(BlockState state) {
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ActionResultType onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
|
public ActionResultType onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
|
||||||
if (!world.isRemote) {
|
return this.openGui(worldIn, player, pos, TileEntityMiner.class);
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public EnumRarity getRarity(ItemStack stack) {
|
public TileEntity createNewTileEntity(IBlockReader world) {
|
||||||
return EnumRarity.RARE;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public TileEntity createNewTileEntity(World world, int i) {
|
|
||||||
return new TileEntityMiner();
|
return new TileEntityMiner();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
public void displayHud(MatrixStack matrices, Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult rayCast, MainWindow resolution) {
|
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) {
|
if (tile instanceof TileEntityMiner) {
|
||||||
TileEntityMiner miner = (TileEntityMiner) tile;
|
TileEntityMiner miner = (TileEntityMiner) tile;
|
||||||
String info = miner.checkY == 0
|
String info = miner.checkY == 0
|
||||||
|
@ -78,7 +63,23 @@ public class BlockMiner extends BlockContainerBase implements IHudDisplay {
|
||||||
: miner.checkY == -1
|
: miner.checkY == -1
|
||||||
? "Calculating positions..."
|
? "Calculating positions..."
|
||||||
: "Mining at " + (miner.getPos().getX() + miner.checkX) + ", " + miner.checkY + ", " + (miner.getPos().getZ() + miner.checkZ) + ".";
|
: "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.
|
// * This file ("BlockMisc.java") is part of the Actually Additions mod for Minecraft.
|
||||||
* It is created and owned by Ellpeck and distributed
|
// * It is created and owned by Ellpeck and distributed
|
||||||
* under the Actually Additions License to be found at
|
// * under the Actually Additions License to be found at
|
||||||
* http://ellpeck.de/actaddlicense
|
// * http://ellpeck.de/actaddlicense
|
||||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
// * View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||||
*
|
// *
|
||||||
* © 2015-2017 Ellpeck
|
// * © 2015-2017 Ellpeck
|
||||||
*/
|
// */
|
||||||
|
//
|
||||||
package de.ellpeck.actuallyadditions.mod.blocks;
|
//package de.ellpeck.actuallyadditions.mod.blocks;
|
||||||
|
//
|
||||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
//import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase;
|
//import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase;
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase;
|
//import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase;
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheMiscBlocks;
|
//import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheMiscBlocks;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
//import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||||
import net.minecraft.block.Block;
|
//import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.material.Material;
|
//import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.properties.PropertyEnum;
|
//import net.minecraft.block.properties.PropertyEnum;
|
||||||
import net.minecraft.block.state.BlockStateContainer;
|
//import net.minecraft.block.state.BlockStateContainer;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
//import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.item.EnumRarity;
|
//import net.minecraft.item.EnumRarity;
|
||||||
import net.minecraft.item.ItemStack;
|
//import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.NonNullList;
|
//import net.minecraft.util.NonNullList;
|
||||||
|
//
|
||||||
public class BlockMisc extends BlockBase {
|
//public class BlockMisc extends BlockBase {
|
||||||
|
//
|
||||||
public static final TheMiscBlocks[] ALL_MISC_BLOCKS = TheMiscBlocks.values();
|
// public static final TheMiscBlocks[] ALL_MISC_BLOCKS = TheMiscBlocks.values();
|
||||||
public static final PropertyEnum<TheMiscBlocks> TYPE = PropertyEnum.create("type", TheMiscBlocks.class);
|
// public static final PropertyEnum<TheMiscBlocks> TYPE = PropertyEnum.create("type", TheMiscBlocks.class);
|
||||||
|
//
|
||||||
public BlockMisc() {
|
// public BlockMisc() {
|
||||||
super(Material.ROCK);
|
// super(Material.ROCK);
|
||||||
this.setHardness(1.5F);
|
// this.setHardness(1.5F);
|
||||||
this.setResistance(10.0F);
|
// this.setResistance(10.0F);
|
||||||
this.setHarvestLevel("pickaxe", 1);
|
// this.setHarvestLevel("pickaxe", 1);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public int damageDropped(BlockState state) {
|
// public int damageDropped(BlockState state) {
|
||||||
return this.getMetaFromState(state);
|
// return this.getMetaFromState(state);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void getSubBlocks(CreativeTabs tab, NonNullList<ItemStack> list) {
|
// public void getSubBlocks(CreativeTabs tab, NonNullList<ItemStack> list) {
|
||||||
for (int j = 0; j < ALL_MISC_BLOCKS.length; j++) {
|
// for (int j = 0; j < ALL_MISC_BLOCKS.length; j++) {
|
||||||
list.add(new ItemStack(this, 1, j));
|
// list.add(new ItemStack(this, 1, j));
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
protected ItemBlockBase getItemBlock() {
|
// protected ItemBlockBase getItemBlock() {
|
||||||
return new TheItemBlock(this);
|
// return new TheItemBlock(this);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void registerRendering() {
|
// public void registerRendering() {
|
||||||
for (int i = 0; i < ALL_MISC_BLOCKS.length; i++) {
|
// 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);
|
// ActuallyAdditions.PROXY.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), TYPE.getName() + "=" + ALL_MISC_BLOCKS[i].name);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public EnumRarity getRarity(ItemStack stack) {
|
// public EnumRarity getRarity(ItemStack stack) {
|
||||||
return stack.getItemDamage() >= ALL_MISC_BLOCKS.length
|
// return stack.getItemDamage() >= ALL_MISC_BLOCKS.length
|
||||||
? EnumRarity.COMMON
|
// ? EnumRarity.COMMON
|
||||||
: ALL_MISC_BLOCKS[stack.getItemDamage()].rarity;
|
// : ALL_MISC_BLOCKS[stack.getItemDamage()].rarity;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public BlockState getStateFromMeta(int meta) {
|
// public BlockState getStateFromMeta(int meta) {
|
||||||
return this.getDefaultState().withProperty(TYPE, TheMiscBlocks.values()[meta]);
|
// return this.getDefaultState().withProperty(TYPE, TheMiscBlocks.values()[meta]);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public int getMetaFromState(BlockState state) {
|
// public int getMetaFromState(BlockState state) {
|
||||||
return state.getValue(TYPE).ordinal();
|
// return state.getValue(TYPE).ordinal();
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
protected BlockStateContainer createBlockState() {
|
// protected BlockStateContainer createBlockState() {
|
||||||
return new BlockStateContainer(this, TYPE);
|
// return new BlockStateContainer(this, TYPE);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
public static class TheItemBlock extends ItemBlockBase {
|
// public static class TheItemBlock extends ItemBlockBase {
|
||||||
|
//
|
||||||
public TheItemBlock(Block block) {
|
// public TheItemBlock(Block block) {
|
||||||
super(block);
|
// super(block);
|
||||||
this.setHasSubtypes(true);
|
// this.setHasSubtypes(true);
|
||||||
this.setMaxDamage(0);
|
// this.setMaxDamage(0);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public String getTranslationKey(ItemStack stack) {
|
// public String getTranslationKey(ItemStack stack) {
|
||||||
return stack.getItemDamage() >= ALL_MISC_BLOCKS.length
|
// return stack.getItemDamage() >= ALL_MISC_BLOCKS.length
|
||||||
? StringUtil.BUGGED_ITEM_NAME
|
// ? StringUtil.BUGGED_ITEM_NAME
|
||||||
: this.getTranslationKey() + "_" + ALL_MISC_BLOCKS[stack.getItemDamage()].name;
|
// : this.getTranslationKey() + "_" + ALL_MISC_BLOCKS[stack.getItemDamage()].name;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public int getItemBurnTime(ItemStack stack) {
|
// public int getItemBurnTime(ItemStack stack) {
|
||||||
if (stack.getMetadata() == TheMiscBlocks.CHARCOAL_BLOCK.ordinal()) {
|
// if (stack.getMetadata() == TheMiscBlocks.CHARCOAL_BLOCK.ordinal()) {
|
||||||
return 16000;
|
// return 16000;
|
||||||
}
|
// }
|
||||||
return super.getItemBurnTime(stack);
|
// return super.getItemBurnTime(stack);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
|
@ -10,48 +10,30 @@
|
||||||
|
|
||||||
package de.ellpeck.actuallyadditions.mod.blocks;
|
package de.ellpeck.actuallyadditions.mod.blocks;
|
||||||
|
|
||||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
import de.ellpeck.actuallyadditions.mod.blocks.base.DirectionalBlock;
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
|
||||||
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityOilGenerator;
|
import de.ellpeck.actuallyadditions.mod.tile.TileEntityOilGenerator;
|
||||||
import net.minecraft.block.BlockHorizontal;
|
import net.minecraft.block.BlockState;
|
||||||
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.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.item.EnumRarity;
|
import net.minecraft.entity.player.ServerPlayerEntity;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.particles.ParticleTypes;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.Direction;
|
import net.minecraft.util.ActionResultType;
|
||||||
import net.minecraft.util.Hand;
|
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.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.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;
|
import java.util.Random;
|
||||||
|
|
||||||
public class BlockOilGenerator extends BlockContainerBase {
|
public class BlockOilGenerator extends DirectionalBlock.Container {
|
||||||
|
|
||||||
public BlockOilGenerator() {
|
public BlockOilGenerator() {
|
||||||
super(Material.ROCK, this.name);
|
super(ActuallyBlocks.defaultPickProps(0).tickRandomly());
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -59,67 +41,44 @@ public class BlockOilGenerator extends BlockContainerBase {
|
||||||
return new TileEntityOilGenerator();
|
return new TileEntityOilGenerator();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Move all of these over to the client version
|
||||||
@Override
|
@Override
|
||||||
@OnlyIn(Dist.CLIENT)
|
public void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random random) {
|
||||||
public void randomDisplayTick(BlockState state, World world, BlockPos pos, Random rand) {
|
|
||||||
TileEntity tile = world.getTileEntity(pos);
|
TileEntity tile = world.getTileEntity(pos);
|
||||||
if (tile instanceof TileEntityOilGenerator) {
|
if (tile instanceof TileEntityOilGenerator) {
|
||||||
if (((TileEntityOilGenerator) tile).currentBurnTime > 0) {
|
if (((TileEntityOilGenerator) tile).currentBurnTime > 0) {
|
||||||
for (int i = 0; i < 5; i++) {
|
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
|
@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) {
|
if (!world.isRemote) {
|
||||||
TileEntityOilGenerator generator = (TileEntityOilGenerator) world.getTileEntity(pos);
|
TileEntityOilGenerator generator = (TileEntityOilGenerator) world.getTileEntity(pos);
|
||||||
if (generator != null) {
|
if (generator != null) {
|
||||||
if (!this.tryUseItemOnTank(player, hand, generator.tank)) {
|
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
|
@Override
|
||||||
public void onBlockPlacedBy(World world, BlockPos pos, BlockState state, EntityLivingBase player, ItemStack stack) {
|
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
|
||||||
world.setBlockState(pos, state.withProperty(BlockHorizontal.FACING, player.getHorizontalFacing().getOpposite()), 2);
|
switch (state.get(FACING)) {
|
||||||
|
case EAST:
|
||||||
super.onBlockPlacedBy(world, pos, state, player, stack);
|
return Shapes.OilGeneratorShapes.SHAPE_E;
|
||||||
}
|
case SOUTH:
|
||||||
|
return Shapes.OilGeneratorShapes.SHAPE_S;
|
||||||
@Override
|
case WEST:
|
||||||
public EnumRarity getRarity(ItemStack stack) {
|
return Shapes.OilGeneratorShapes.SHAPE_W;
|
||||||
return EnumRarity.RARE;
|
default:
|
||||||
}
|
return Shapes.OilGeneratorShapes.SHAPE_N;
|
||||||
|
}
|
||||||
@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)));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,25 +17,29 @@ import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.*;
|
import de.ellpeck.actuallyadditions.mod.tile.*;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.material.Material;
|
|
||||||
import net.minecraft.client.MainWindow;
|
import net.minecraft.client.MainWindow;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
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.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.ActionResultType;
|
||||||
import net.minecraft.util.Direction;
|
import net.minecraft.util.Direction;
|
||||||
import net.minecraft.util.Hand;
|
import net.minecraft.util.Hand;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.math.BlockRayTraceResult;
|
||||||
import net.minecraft.util.math.MathHelper;
|
import net.minecraft.util.math.MathHelper;
|
||||||
import net.minecraft.util.math.RayTraceResult;
|
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.util.text.TextFormatting;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockReader;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
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 {
|
public class BlockPhantom extends BlockContainerBase implements IHudDisplay {
|
||||||
|
@ -43,12 +47,8 @@ public class BlockPhantom extends BlockContainerBase implements IHudDisplay {
|
||||||
public final Type type;
|
public final Type type;
|
||||||
|
|
||||||
public BlockPhantom(Type type) {
|
public BlockPhantom(Type type) {
|
||||||
super(Material.ROCK, this.name);
|
super(ActuallyBlocks.defaultPickProps(0, 4.5F, 10.0F));
|
||||||
this.type = type;
|
this.type = type;
|
||||||
this.setHarvestLevel("pickaxe", 0);
|
|
||||||
this.setHardness(4.5F);
|
|
||||||
this.setResistance(10.0F);
|
|
||||||
this.setSoundType(SoundType.STONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -57,7 +57,7 @@ public class BlockPhantom extends BlockContainerBase implements IHudDisplay {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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) {
|
if (this.type == Type.REDSTONEFACE) {
|
||||||
TileEntity tile = world.getTileEntity(pos);
|
TileEntity tile = world.getTileEntity(pos);
|
||||||
if (tile instanceof TileEntityPhantomRedstoneface) {
|
if (tile instanceof TileEntityPhantomRedstoneface) {
|
||||||
|
@ -68,7 +68,7 @@ public class BlockPhantom extends BlockContainerBase implements IHudDisplay {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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) {
|
if (this.type == Type.REDSTONEFACE) {
|
||||||
TileEntity tile = world.getTileEntity(pos);
|
TileEntity tile = world.getTileEntity(pos);
|
||||||
if (tile instanceof TileEntityPhantomRedstoneface) {
|
if (tile instanceof TileEntityPhantomRedstoneface) {
|
||||||
|
@ -101,41 +101,42 @@ public class BlockPhantom extends BlockContainerBase implements IHudDisplay {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: [port] validate this works
|
||||||
@Override
|
@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)) {
|
if (this.tryToggleRedstone(world, pos, player)) {
|
||||||
return true;
|
return ActionResultType.PASS;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!world.isRemote) {
|
if (!world.isRemote) {
|
||||||
TileEntity tile = world.getTileEntity(pos);
|
TileEntity tile = world.getTileEntity(pos);
|
||||||
if (tile instanceof IPhantomTile && ((IPhantomTile) tile).getGuiID() != -1) {
|
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
|
return ActionResultType.PASS;
|
||||||
public EnumRarity getRarity(ItemStack stack) {
|
|
||||||
return EnumRarity.EPIC;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: [port] fix all of this, it's a mess
|
||||||
@Override
|
@Override
|
||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
public void displayHud(MatrixStack matrices, Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult rayCast, MainWindow resolution) {
|
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 != null) {
|
||||||
if (tile instanceof IPhantomTile) {
|
if (tile instanceof IPhantomTile) {
|
||||||
IPhantomTile phantom = (IPhantomTile) tile;
|
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()) {
|
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());
|
BlockState state = minecraft.world.getBlockState(phantom.getBoundPosition());
|
||||||
Block block = state.getBlock();
|
Block block = state.getBlock();
|
||||||
Item item = Item.getItemFromBlock(block);
|
Item item = Item.getItemFromBlock(block);
|
||||||
String name = item == null
|
String name = item.getDisplayName(new ItemStack(block)).getString();
|
||||||
? "Something Unrecognizable"
|
|
||||||
: item.getItemStackDisplayName(new ItemStack(block, 1, block.getMetaFromState(state)));
|
|
||||||
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);
|
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()) {
|
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);
|
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 {
|
} 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.blocks.base.BlockContainerBase;
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomBooster;
|
import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomBooster;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.material.Material;
|
|
||||||
import net.minecraft.item.EnumRarity;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.math.AxisAlignedBB;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.util.math.shapes.ISelectionContext;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.util.math.shapes.VoxelShape;
|
||||||
|
import net.minecraft.world.IBlockReader;
|
||||||
|
|
||||||
public class BlockPhantomBooster extends BlockContainerBase {
|
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() {
|
public BlockPhantomBooster() {
|
||||||
super(Material.ROCK, this.name);
|
super(ActuallyBlocks.defaultPickProps(0));
|
||||||
this.setHarvestLevel("pickaxe", 0);
|
|
||||||
this.setHardness(1.5F);
|
|
||||||
this.setResistance(10.0F);
|
|
||||||
this.setSoundType(SoundType.STONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AxisAlignedBB getBoundingBox(BlockState state, IBlockAccess source, BlockPos pos) {
|
public TileEntity createNewTileEntity(IBlockReader world) {
|
||||||
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) {
|
|
||||||
return new TileEntityPhantomBooster();
|
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.blocks.base.BlockContainerBase;
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityPlayerInterface;
|
import de.ellpeck.actuallyadditions.mod.tile.TileEntityPlayerInterface;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.material.Material;
|
|
||||||
import net.minecraft.client.MainWindow;
|
import net.minecraft.client.MainWindow;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.LivingEntity;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.item.EnumRarity;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.math.BlockRayTraceResult;
|
||||||
import net.minecraft.util.math.RayTraceResult;
|
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.util.text.TextFormatting;
|
||||||
|
import net.minecraft.world.IBlockReader;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
|
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||||
|
|
||||||
|
|
||||||
public class BlockPlayerInterface extends BlockContainerBase implements IHudDisplay {
|
public class BlockPlayerInterface extends BlockContainerBase implements IHudDisplay {
|
||||||
|
|
||||||
public BlockPlayerInterface() {
|
public BlockPlayerInterface() {
|
||||||
super(Material.ROCK, this.name);
|
super(ActuallyBlocks.defaultPickProps(0, 4.5F, 10.0F));
|
||||||
this.setHarvestLevel("pickaxe", 0);
|
|
||||||
this.setHardness(4.5F);
|
|
||||||
this.setResistance(10.0F);
|
|
||||||
this.setSoundType(SoundType.STONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -46,18 +44,13 @@ public class BlockPlayerInterface extends BlockContainerBase implements IHudDisp
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public EnumRarity getRarity(ItemStack stack) {
|
public void onBlockPlacedBy(World world, BlockPos pos, BlockState state, LivingEntity player, ItemStack stack) {
|
||||||
return EnumRarity.EPIC;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onBlockPlacedBy(World world, BlockPos pos, BlockState state, EntityLivingBase player, ItemStack stack) {
|
|
||||||
TileEntity tile = world.getTileEntity(pos);
|
TileEntity tile = world.getTileEntity(pos);
|
||||||
if (tile instanceof TileEntityPlayerInterface) {
|
if (tile instanceof TileEntityPlayerInterface) {
|
||||||
TileEntityPlayerInterface face = (TileEntityPlayerInterface) tile;
|
TileEntityPlayerInterface face = (TileEntityPlayerInterface) tile;
|
||||||
if (face.connectedPlayer == null) {
|
if (face.connectedPlayer == null) {
|
||||||
face.connectedPlayer = player.getUniqueID();
|
face.connectedPlayer = player.getUniqueID();
|
||||||
face.playerName = player.getName();
|
face.playerName = player.getName().getString();
|
||||||
face.markDirty();
|
face.markDirty();
|
||||||
face.sendUpdate();
|
face.sendUpdate();
|
||||||
}
|
}
|
||||||
|
@ -69,16 +62,25 @@ public class BlockPlayerInterface extends BlockContainerBase implements IHudDisp
|
||||||
@Override
|
@Override
|
||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
public void displayHud(MatrixStack matrices, Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult rayCast, MainWindow resolution) {
|
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 != null) {
|
||||||
if (tile instanceof TileEntityPlayerInterface) {
|
if (tile instanceof TileEntityPlayerInterface) {
|
||||||
TileEntityPlayerInterface face = (TileEntityPlayerInterface) tile;
|
TileEntityPlayerInterface face = (TileEntityPlayerInterface) tile;
|
||||||
String name = face.playerName == null
|
String name = face.playerName == null
|
||||||
? "Unknown"
|
? "Unknown"
|
||||||
: face.playerName;
|
: 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(matrices, "Bound to: " + TextFormatting.RED + name, resolution.getScaledWidth() / 2f + 5, resolution.getScaledHeight() / 2f + 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, "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;
|
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.BlockContainerBase;
|
||||||
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityRangedCollector;
|
import de.ellpeck.actuallyadditions.mod.tile.TileEntityRangedCollector;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.material.Material;
|
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.item.EnumRarity;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.ActionResultType;
|
||||||
import net.minecraft.util.Hand;
|
import net.minecraft.util.Hand;
|
||||||
import net.minecraft.util.math.BlockPos;
|
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.minecraft.world.World;
|
||||||
|
|
||||||
public class BlockRangedCollector extends BlockContainerBase {
|
public class BlockRangedCollector extends BlockContainerBase {
|
||||||
|
|
||||||
public BlockRangedCollector() {
|
public BlockRangedCollector() {
|
||||||
super(Material.ROCK, this.name);
|
super(ActuallyBlocks.defaultPickProps(0));
|
||||||
this.setHarvestLevel("pickaxe", 0);
|
|
||||||
this.setHardness(1.5F);
|
|
||||||
this.setResistance(10.0F);
|
|
||||||
this.setSoundType(SoundType.STONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -40,22 +36,16 @@ public class BlockRangedCollector extends BlockContainerBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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)) {
|
if (this.tryToggleRedstone(world, pos, player)) {
|
||||||
return true;
|
return ActionResultType.PASS;
|
||||||
}
|
}
|
||||||
if (!world.isRemote) {
|
|
||||||
TileEntityRangedCollector breaker = (TileEntityRangedCollector) world.getTileEntity(pos);
|
return this.openGui(world, player, pos, TileEntityRangedCollector.class);
|
||||||
if (breaker != null) {
|
|
||||||
player.openGui(ActuallyAdditions.INSTANCE, GuiHandler.GuiTypes.RANGED_COLLECTOR.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public EnumRarity getRarity(ItemStack stack) {
|
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
|
||||||
return EnumRarity.EPIC;
|
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.blocks.base.BlockContainerBase;
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityShockSuppressor;
|
import de.ellpeck.actuallyadditions.mod.tile.TileEntityShockSuppressor;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.material.Material;
|
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.item.EnumRarity;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.math.BlockPos;
|
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.minecraft.world.World;
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
import net.minecraftforge.event.world.ExplosionEvent;
|
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.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
@ -31,12 +31,7 @@ import java.util.List;
|
||||||
public class BlockShockSuppressor extends BlockContainerBase {
|
public class BlockShockSuppressor extends BlockContainerBase {
|
||||||
|
|
||||||
public BlockShockSuppressor() {
|
public BlockShockSuppressor() {
|
||||||
super(Material.ROCK, this.name);
|
super(ActuallyBlocks.defaultPickProps(0, 20F, 2000.0F));
|
||||||
this.setHarvestLevel("pickaxe", 0);
|
|
||||||
this.setHardness(20.0F);
|
|
||||||
this.setResistance(2000.0F);
|
|
||||||
this.setSoundType(SoundType.STONE);
|
|
||||||
|
|
||||||
MinecraftForge.EVENT_BUS.register(this);
|
MinecraftForge.EVENT_BUS.register(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,7 +58,7 @@ public class BlockShockSuppressor extends BlockContainerBase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (Entity entity : affectedEntities) {
|
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);
|
entitiesToRemove.add(entity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -93,12 +88,12 @@ public class BlockShockSuppressor extends BlockContainerBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public EnumRarity getRarity(ItemStack stack) {
|
public TileEntity createNewTileEntity(IBlockReader worldIn) {
|
||||||
return EnumRarity.EPIC;
|
return new TileEntityShockSuppressor();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World worldIn, int meta) {
|
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
|
||||||
return new TileEntityShockSuppressor();
|
return Shapes.SUPPRESSOR_SHAPE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,187 +1,187 @@
|
||||||
/*
|
///*
|
||||||
* This file ("BlockSlabs.java") is part of the Actually Additions mod for Minecraft.
|
// * This file ("BlockSlabs.java") is part of the Actually Additions mod for Minecraft.
|
||||||
* It is created and owned by Ellpeck and distributed
|
// * It is created and owned by Ellpeck and distributed
|
||||||
* under the Actually Additions License to be found at
|
// * under the Actually Additions License to be found at
|
||||||
* http://ellpeck.de/actaddlicense
|
// * http://ellpeck.de/actaddlicense
|
||||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
// * View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||||
*
|
// *
|
||||||
* © 2015-2017 Ellpeck
|
// * © 2015-2017 Ellpeck
|
||||||
*/
|
// */
|
||||||
|
//
|
||||||
package de.ellpeck.actuallyadditions.mod.blocks;
|
//package de.ellpeck.actuallyadditions.mod.blocks;
|
||||||
|
//
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase;
|
//import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase;
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase;
|
//import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
//import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||||
import net.minecraft.block.Block;
|
//import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockSlab;
|
//import net.minecraft.block.BlockSlab;
|
||||||
import net.minecraft.block.SoundType;
|
//import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.state.BlockStateContainer;
|
//import net.minecraft.block.state.BlockStateContainer;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
//import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
//import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.item.EnumRarity;
|
//import net.minecraft.item.EnumRarity;
|
||||||
import net.minecraft.item.ItemStack;
|
//import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.Direction;
|
//import net.minecraft.util.Direction;
|
||||||
import net.minecraft.util.EnumActionResult;
|
//import net.minecraft.util.EnumActionResult;
|
||||||
import net.minecraft.util.Hand;
|
//import net.minecraft.util.Hand;
|
||||||
import net.minecraft.util.SoundCategory;
|
//import net.minecraft.util.SoundCategory;
|
||||||
import net.minecraft.util.math.AxisAlignedBB;
|
//import net.minecraft.util.math.AxisAlignedBB;
|
||||||
import net.minecraft.util.math.BlockPos;
|
//import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.IBlockAccess;
|
//import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
//import net.minecraft.world.World;
|
||||||
|
//
|
||||||
|
//
|
||||||
public class BlockSlabs extends BlockBase {
|
//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);
|
// 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 static final AxisAlignedBB AABB_TOP_HALF = new AxisAlignedBB(0.0D, 0.5D, 0.0D, 1.0D, 1.0D, 1.0D);
|
||||||
|
//
|
||||||
private final BlockState fullBlockState;
|
// private final BlockState fullBlockState;
|
||||||
|
//
|
||||||
public BlockSlabs(String name, Block fullBlock) {
|
// public BlockSlabs(String name, Block fullBlock) {
|
||||||
this(name, fullBlock.getDefaultState());
|
// this(name, fullBlock.getDefaultState());
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
public BlockSlabs(String name, BlockState fullBlockState) {
|
// public BlockSlabs(String name, BlockState fullBlockState) {
|
||||||
super(fullBlockState.getMaterial(), name);
|
// super(fullBlockState.getMaterial(), name);
|
||||||
this.setHardness(1.5F);
|
// this.setHardness(1.5F);
|
||||||
this.setResistance(10.0F);
|
// this.setResistance(10.0F);
|
||||||
this.fullBlockState = fullBlockState;
|
// this.fullBlockState = fullBlockState;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public boolean isOpaqueCube(BlockState state) {
|
// public boolean isOpaqueCube(BlockState state) {
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public boolean isFullCube(BlockState state) {
|
// public boolean isFullCube(BlockState state) {
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public BlockState getStateForPlacement(World world, BlockPos pos, Direction facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) {
|
// public BlockState getStateForPlacement(World world, BlockPos pos, Direction facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) {
|
||||||
if (facing.ordinal() == 1) {
|
// if (facing.ordinal() == 1) {
|
||||||
return this.getStateFromMeta(meta);
|
// return this.getStateFromMeta(meta);
|
||||||
}
|
// }
|
||||||
if (facing.ordinal() == 0 || hitY >= 0.5F) {
|
// if (facing.ordinal() == 0 || hitY >= 0.5F) {
|
||||||
return this.getStateFromMeta(meta + 1);
|
// return this.getStateFromMeta(meta + 1);
|
||||||
}
|
// }
|
||||||
return this.getStateFromMeta(meta);
|
// return this.getStateFromMeta(meta);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public AxisAlignedBB getBoundingBox(BlockState state, IBlockAccess source, BlockPos pos) {
|
// public AxisAlignedBB getBoundingBox(BlockState state, IBlockAccess source, BlockPos pos) {
|
||||||
return state.getValue(BlockSlab.HALF) == BlockSlab.EnumBlockHalf.TOP
|
// return state.getValue(BlockSlab.HALF) == BlockSlab.EnumBlockHalf.TOP
|
||||||
? AABB_TOP_HALF
|
// ? AABB_TOP_HALF
|
||||||
: AABB_BOTTOM_HALF;
|
// : AABB_BOTTOM_HALF;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
protected ItemBlockBase getItemBlock() {
|
// protected ItemBlockBase getItemBlock() {
|
||||||
return new TheItemBlock(this);
|
// return new TheItemBlock(this);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public EnumRarity getRarity(ItemStack stack) {
|
// public EnumRarity getRarity(ItemStack stack) {
|
||||||
return EnumRarity.COMMON;
|
// return EnumRarity.COMMON;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public BlockState getStateFromMeta(int meta) {
|
// public BlockState getStateFromMeta(int meta) {
|
||||||
return this.getDefaultState().withProperty(BlockSlab.HALF, meta == 0
|
// return this.getDefaultState().withProperty(BlockSlab.HALF, meta == 0
|
||||||
? BlockSlab.EnumBlockHalf.BOTTOM
|
// ? BlockSlab.EnumBlockHalf.BOTTOM
|
||||||
: BlockSlab.EnumBlockHalf.TOP);
|
// : BlockSlab.EnumBlockHalf.TOP);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public int getMetaFromState(BlockState state) {
|
// public int getMetaFromState(BlockState state) {
|
||||||
return state.getValue(BlockSlab.HALF) == BlockSlab.EnumBlockHalf.BOTTOM
|
// return state.getValue(BlockSlab.HALF) == BlockSlab.EnumBlockHalf.BOTTOM
|
||||||
? 0
|
// ? 0
|
||||||
: 1;
|
// : 1;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
protected BlockStateContainer createBlockState() {
|
// protected BlockStateContainer createBlockState() {
|
||||||
return new BlockStateContainer(this, BlockSlab.HALF);
|
// return new BlockStateContainer(this, BlockSlab.HALF);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
public static class TheItemBlock extends ItemBlockBase {
|
// public static class TheItemBlock extends ItemBlockBase {
|
||||||
|
//
|
||||||
public TheItemBlock(Block block) {
|
// public TheItemBlock(Block block) {
|
||||||
super(block);
|
// super(block);
|
||||||
this.setHasSubtypes(false);
|
// this.setHasSubtypes(false);
|
||||||
this.setMaxDamage(0);
|
// this.setMaxDamage(0);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public EnumActionResult onItemUse(PlayerEntity player, World world, BlockPos pos, Hand hand, Direction facing, float hitX, float hitY, float hitZ) {
|
// public EnumActionResult onItemUse(PlayerEntity player, World world, BlockPos pos, Hand hand, Direction facing, float hitX, float hitY, float hitZ) {
|
||||||
ItemStack stack = player.getHeldItem(hand);
|
// ItemStack stack = player.getHeldItem(hand);
|
||||||
if (StackUtil.isValid(stack) && player.canPlayerEdit(pos.offset(facing), facing, stack)) {
|
// if (StackUtil.isValid(stack) && player.canPlayerEdit(pos.offset(facing), facing, stack)) {
|
||||||
BlockState state = world.getBlockState(pos);
|
// BlockState state = world.getBlockState(pos);
|
||||||
|
//
|
||||||
if (state.getBlock() == this.block) {
|
// if (state.getBlock() == this.block) {
|
||||||
BlockSlabs theBlock = (BlockSlabs) 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) {
|
// 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;
|
// BlockState newState = theBlock.fullBlockState;
|
||||||
AxisAlignedBB bound = newState.getCollisionBoundingBox(world, pos);
|
// AxisAlignedBB bound = newState.getCollisionBoundingBox(world, pos);
|
||||||
|
//
|
||||||
if (bound != Block.NULL_AABB && world.checkNoEntityCollision(bound.offset(pos)) && world.setBlockState(pos, newState, 11)) {
|
// 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);
|
// 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);
|
// 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));
|
// player.setHeldItem(hand, StackUtil.shrink(stack, 1));
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
return EnumActionResult.SUCCESS;
|
// return EnumActionResult.SUCCESS;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
return this.tryPlace(player, stack, hand, world, pos.offset(facing))
|
// return this.tryPlace(player, stack, hand, world, pos.offset(facing))
|
||||||
? EnumActionResult.SUCCESS
|
// ? EnumActionResult.SUCCESS
|
||||||
: super.onItemUse(player, world, pos, hand, facing, hitX, hitY, hitZ);
|
// : super.onItemUse(player, world, pos, hand, facing, hitX, hitY, hitZ);
|
||||||
} else {
|
// } else {
|
||||||
return EnumActionResult.FAIL;
|
// return EnumActionResult.FAIL;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
@OnlyIn(Dist.CLIENT)
|
// @OnlyIn(Dist.CLIENT)
|
||||||
public boolean canPlaceBlockOnSide(World worldIn, BlockPos pos, Direction side, PlayerEntity player, ItemStack stack) {
|
// public boolean canPlaceBlockOnSide(World worldIn, BlockPos pos, Direction side, PlayerEntity player, ItemStack stack) {
|
||||||
BlockState state = worldIn.getBlockState(pos);
|
// BlockState state = worldIn.getBlockState(pos);
|
||||||
|
//
|
||||||
if (state.getBlock() == this.block) {
|
// 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) {
|
// if (side == Direction.UP && state.getValue(BlockSlab.HALF) == BlockSlab.EnumBlockHalf.BOTTOM || side == Direction.DOWN && state.getValue(BlockSlab.HALF) == BlockSlab.EnumBlockHalf.TOP) {
|
||||||
return true;
|
// return true;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
return worldIn.getBlockState(pos.offset(side)).getBlock() == this.block || super.canPlaceBlockOnSide(worldIn, pos, side, player, stack);
|
// 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) {
|
// private boolean tryPlace(PlayerEntity player, ItemStack stack, Hand hand, World world, BlockPos pos) {
|
||||||
BlockState iblockstate = world.getBlockState(pos);
|
// BlockState iblockstate = world.getBlockState(pos);
|
||||||
|
//
|
||||||
if (iblockstate.getBlock() == this.block) {
|
// if (iblockstate.getBlock() == this.block) {
|
||||||
BlockSlabs theBlock = (BlockSlabs) this.block;
|
// BlockSlabs theBlock = (BlockSlabs) this.block;
|
||||||
BlockState newState = theBlock.fullBlockState;
|
// BlockState newState = theBlock.fullBlockState;
|
||||||
AxisAlignedBB bound = newState.getCollisionBoundingBox(world, pos);
|
// AxisAlignedBB bound = newState.getCollisionBoundingBox(world, pos);
|
||||||
|
//
|
||||||
if (bound != Block.NULL_AABB && world.checkNoEntityCollision(bound.offset(pos)) && world.setBlockState(pos, newState, 11)) {
|
// 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);
|
// 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);
|
// 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));
|
// player.setHeldItem(hand, StackUtil.shrink(stack, 1));
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
return true;
|
// return true;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public String getTranslationKey(ItemStack stack) {
|
// public String getTranslationKey(ItemStack stack) {
|
||||||
return this.getTranslationKey();
|
// return this.getTranslationKey();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
|
@ -11,24 +11,9 @@
|
||||||
package de.ellpeck.actuallyadditions.mod.blocks;
|
package de.ellpeck.actuallyadditions.mod.blocks;
|
||||||
|
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase;
|
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.SoundType;
|
||||||
import net.minecraft.block.material.Material;
|
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.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.
|
//Copied from BlockTorch.
|
||||||
//I have no idea what all of this means.
|
//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);
|
private static final AxisAlignedBB TORCH_EAST_AABB = new AxisAlignedBB(0.0D, 0.25D, 0.4375D, 0.1875D, 0.5625D, 0.5625D);
|
||||||
|
|
||||||
public BlockTinyTorch() {
|
public BlockTinyTorch() {
|
||||||
super(Material.CIRCUITS, name);
|
super(Properties.create(Material.MISCELLANEOUS).sound(SoundType.WOOD).hardnessAndResistance(0.0F, 0.8F));
|
||||||
this.setDefaultState(this.blockState.getBaseState().withProperty(BlockTorch.FACING, Direction.UP));
|
// TorchBlock
|
||||||
this.setTickRandomly(true);
|
// 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
|
// TODO: [port] add back
|
||||||
public AxisAlignedBB getBoundingBox(BlockState state, IBlockAccess source, BlockPos pos) {
|
//
|
||||||
switch (state.getValue(BlockTorch.FACING)) {
|
// @Override
|
||||||
case EAST:
|
// public AxisAlignedBB getBoundingBox(BlockState state, IBlockAccess source, BlockPos pos) {
|
||||||
return TORCH_EAST_AABB;
|
// switch (state.getValue(BlockTorch.FACING)) {
|
||||||
case WEST:
|
// case EAST:
|
||||||
return TORCH_WEST_AABB;
|
// return TORCH_EAST_AABB;
|
||||||
case SOUTH:
|
// case WEST:
|
||||||
return TORCH_SOUTH_AABB;
|
// return TORCH_WEST_AABB;
|
||||||
case NORTH:
|
// case SOUTH:
|
||||||
return TORCH_NORTH_AABB;
|
// return TORCH_SOUTH_AABB;
|
||||||
default:
|
// case NORTH:
|
||||||
return STANDING_AABB;
|
// return TORCH_NORTH_AABB;
|
||||||
}
|
// default:
|
||||||
}
|
// return STANDING_AABB;
|
||||||
|
// }
|
||||||
@Nullable
|
// }
|
||||||
@Override
|
//
|
||||||
public AxisAlignedBB getCollisionBoundingBox(BlockState blockState, IBlockAccess worldIn, BlockPos pos) {
|
// @Nullable
|
||||||
return NULL_AABB;
|
// @Override
|
||||||
}
|
// public AxisAlignedBB getCollisionBoundingBox(BlockState blockState, IBlockAccess worldIn, BlockPos pos) {
|
||||||
|
// return NULL_AABB;
|
||||||
@Override
|
// }
|
||||||
public boolean isOpaqueCube(BlockState state) {
|
//
|
||||||
return false;
|
// @Override
|
||||||
}
|
// public boolean isOpaqueCube(BlockState state) {
|
||||||
|
// return false;
|
||||||
@Override
|
// }
|
||||||
public boolean isFullCube(BlockState state) {
|
//
|
||||||
return false;
|
// @Override
|
||||||
}
|
// public boolean isFullCube(BlockState state) {
|
||||||
|
// return false;
|
||||||
@Override
|
// }
|
||||||
public boolean isNormalCube(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;
|
// @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);
|
// 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()) {
|
// @Override
|
||||||
if (this.canPlaceAt(worldIn, pos, enumfacing)) {
|
// public boolean canPlaceBlockAt(World worldIn, BlockPos pos) {
|
||||||
return true;
|
// for (Direction enumfacing : BlockTorch.FACING.getAllowedValues()) {
|
||||||
}
|
// if (this.canPlaceAt(worldIn, pos, enumfacing)) {
|
||||||
}
|
// return true;
|
||||||
|
// }
|
||||||
return false;
|
// }
|
||||||
}
|
//
|
||||||
|
// return false;
|
||||||
private boolean canPlaceAt(World worldIn, BlockPos pos, Direction facing) {
|
// }
|
||||||
BlockPos blockpos = pos.offset(facing.getOpposite());
|
//
|
||||||
boolean flag = facing.getAxis().isHorizontal();
|
// private boolean canPlaceAt(World worldIn, BlockPos pos, Direction facing) {
|
||||||
return flag && worldIn.isSideSolid(blockpos, facing, true) || facing.equals(Direction.UP) && this.canPlaceOn(worldIn, blockpos);
|
// 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)) {
|
// @Override
|
||||||
return this.getDefaultState().withProperty(BlockTorch.FACING, facing);
|
// public BlockState getStateForPlacement(World worldIn, BlockPos pos, Direction facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) {
|
||||||
} else {
|
// if (this.canPlaceAt(worldIn, pos, facing)) {
|
||||||
for (Direction enumfacing : Direction.Plane.HORIZONTAL) {
|
// return this.getDefaultState().withProperty(BlockTorch.FACING, facing);
|
||||||
if (worldIn.isSideSolid(pos.offset(enumfacing.getOpposite()), enumfacing, true)) {
|
// } else {
|
||||||
return this.getDefaultState().withProperty(BlockTorch.FACING, enumfacing);
|
// 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();
|
// }
|
||||||
}
|
//
|
||||||
}
|
// return this.getDefaultState();
|
||||||
|
// }
|
||||||
@Override
|
// }
|
||||||
public void onBlockAdded(World worldIn, BlockPos pos, BlockState state) {
|
//
|
||||||
this.checkForDrop(worldIn, pos, state);
|
// @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);
|
// @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;
|
// protected boolean onNeighborChangeInternal(World worldIn, BlockPos pos, BlockState state) {
|
||||||
} else {
|
// if (!this.checkForDrop(worldIn, pos, state)) {
|
||||||
Direction enumfacing = state.getValue(BlockTorch.FACING);
|
// return true;
|
||||||
Direction.Axis axis = enumfacing.getAxis();
|
// } else {
|
||||||
Direction enumfacing1 = enumfacing.getOpposite();
|
// Direction enumfacing = state.getValue(BlockTorch.FACING);
|
||||||
boolean flag = false;
|
// Direction.Axis axis = enumfacing.getAxis();
|
||||||
|
// Direction enumfacing1 = enumfacing.getOpposite();
|
||||||
if (axis.isHorizontal() && !worldIn.isSideSolid(pos.offset(enumfacing1), enumfacing, true)) {
|
// boolean flag = false;
|
||||||
flag = true;
|
//
|
||||||
} else if (axis.isVertical() && !this.canPlaceOn(worldIn, pos.offset(enumfacing1))) {
|
// if (axis.isHorizontal() && !worldIn.isSideSolid(pos.offset(enumfacing1), enumfacing, true)) {
|
||||||
flag = 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());
|
// if (flag) {
|
||||||
return true;
|
// this.dropBlockAsItem(worldIn, pos, state, 0);
|
||||||
} else {
|
// worldIn.setBlockState(pos, Blocks.AIR.getDefaultState());
|
||||||
return false;
|
// 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;
|
// protected boolean checkForDrop(World worldIn, BlockPos pos, BlockState state) {
|
||||||
} else {
|
// if (state.getBlock() == this && this.canPlaceAt(worldIn, pos, state.getValue(BlockTorch.FACING))) {
|
||||||
if (worldIn.getBlockState(pos).getBlock() == this) {
|
// return true;
|
||||||
this.dropBlockAsItem(worldIn, pos, state, 0);
|
// } else {
|
||||||
worldIn.setBlockState(pos, Blocks.AIR.getDefaultState());
|
// if (worldIn.getBlockState(pos).getBlock() == this) {
|
||||||
}
|
// this.dropBlockAsItem(worldIn, pos, state, 0);
|
||||||
|
// worldIn.setBlockState(pos, Blocks.AIR.getDefaultState());
|
||||||
return false;
|
// }
|
||||||
}
|
//
|
||||||
}
|
// return false;
|
||||||
|
// }
|
||||||
@Override
|
// }
|
||||||
@OnlyIn(Dist.CLIENT)
|
//
|
||||||
public void randomDisplayTick(BlockState stateIn, World worldIn, BlockPos pos, Random rand) {
|
// @Override
|
||||||
if (rand.nextBoolean()) {
|
// @OnlyIn(Dist.CLIENT)
|
||||||
Direction enumfacing = stateIn.getValue(BlockTorch.FACING);
|
// public void randomDisplayTick(BlockState stateIn, World worldIn, BlockPos pos, Random rand) {
|
||||||
double d0 = pos.getX() + 0.5D;
|
// if (rand.nextBoolean()) {
|
||||||
double d1 = pos.getY() + 0.4D;
|
// Direction enumfacing = stateIn.getValue(BlockTorch.FACING);
|
||||||
double d2 = pos.getZ() + 0.5D;
|
// double d0 = pos.getX() + 0.5D;
|
||||||
|
// double d1 = pos.getY() + 0.4D;
|
||||||
if (enumfacing.getAxis().isHorizontal()) {
|
// double d2 = pos.getZ() + 0.5D;
|
||||||
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);
|
// if (enumfacing.getAxis().isHorizontal()) {
|
||||||
worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 + 0.35D * enumfacing1.getXOffset(), d1 + 0.22D, d2 + 0.35D * enumfacing1.getZOffset(), 0.0D, 0.0D, 0.0D);
|
// Direction enumfacing1 = enumfacing.getOpposite();
|
||||||
} else {
|
// 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.SMOKE_NORMAL, d0, d1, d2, 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);
|
||||||
worldIn.spawnParticle(EnumParticleTypes.FLAME, d0, d1, d2, 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();
|
// @Override
|
||||||
|
// public BlockState getStateFromMeta(int meta) {
|
||||||
switch (meta) {
|
// BlockState iblockstate = this.getDefaultState();
|
||||||
case 1:
|
//
|
||||||
iblockstate = iblockstate.withProperty(BlockTorch.FACING, Direction.EAST);
|
// switch (meta) {
|
||||||
break;
|
// case 1:
|
||||||
case 2:
|
// iblockstate = iblockstate.withProperty(BlockTorch.FACING, Direction.EAST);
|
||||||
iblockstate = iblockstate.withProperty(BlockTorch.FACING, Direction.WEST);
|
// break;
|
||||||
break;
|
// case 2:
|
||||||
case 3:
|
// iblockstate = iblockstate.withProperty(BlockTorch.FACING, Direction.WEST);
|
||||||
iblockstate = iblockstate.withProperty(BlockTorch.FACING, Direction.SOUTH);
|
// break;
|
||||||
break;
|
// case 3:
|
||||||
case 4:
|
// iblockstate = iblockstate.withProperty(BlockTorch.FACING, Direction.SOUTH);
|
||||||
iblockstate = iblockstate.withProperty(BlockTorch.FACING, Direction.NORTH);
|
// break;
|
||||||
break;
|
// case 4:
|
||||||
case 5:
|
// iblockstate = iblockstate.withProperty(BlockTorch.FACING, Direction.NORTH);
|
||||||
default:
|
// break;
|
||||||
iblockstate = iblockstate.withProperty(BlockTorch.FACING, Direction.UP);
|
// case 5:
|
||||||
}
|
// default:
|
||||||
|
// iblockstate = iblockstate.withProperty(BlockTorch.FACING, Direction.UP);
|
||||||
return iblockstate;
|
// }
|
||||||
}
|
//
|
||||||
|
// return iblockstate;
|
||||||
@Override
|
// }
|
||||||
public BlockRenderLayer getRenderLayer() {
|
//
|
||||||
return BlockRenderLayer.CUTOUT;
|
// @Override
|
||||||
}
|
// public BlockRenderLayer getRenderLayer() {
|
||||||
|
// return BlockRenderLayer.CUTOUT;
|
||||||
@Override
|
// }
|
||||||
public int getMetaFromState(BlockState state) {
|
//
|
||||||
int i = 0;
|
// @Override
|
||||||
|
// public int getMetaFromState(BlockState state) {
|
||||||
switch (state.getValue(BlockTorch.FACING)) {
|
// int i = 0;
|
||||||
case EAST:
|
//
|
||||||
i = i | 1;
|
// switch (state.getValue(BlockTorch.FACING)) {
|
||||||
break;
|
// case EAST:
|
||||||
case WEST:
|
// i = i | 1;
|
||||||
i = i | 2;
|
// break;
|
||||||
break;
|
// case WEST:
|
||||||
case SOUTH:
|
// i = i | 2;
|
||||||
i = i | 3;
|
// break;
|
||||||
break;
|
// case SOUTH:
|
||||||
case NORTH:
|
// i = i | 3;
|
||||||
i = i | 4;
|
// break;
|
||||||
break;
|
// case NORTH:
|
||||||
case DOWN:
|
// i = i | 4;
|
||||||
case UP:
|
// break;
|
||||||
default:
|
// case DOWN:
|
||||||
i = i | 5;
|
// case UP:
|
||||||
}
|
// default:
|
||||||
|
// i = i | 5;
|
||||||
return i;
|
// }
|
||||||
}
|
//
|
||||||
|
// return i;
|
||||||
@Override
|
// }
|
||||||
public BlockState withRotation(BlockState state, Rotation rot) {
|
//
|
||||||
return state.withProperty(BlockTorch.FACING, rot.rotate(state.getValue(BlockTorch.FACING)));
|
// @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
|
||||||
}
|
// 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);
|
// @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.
|
// * This file ("BlockWallAA.java") is part of the Actually Additions mod for Minecraft.
|
||||||
* It is created and owned by Ellpeck and distributed
|
// * It is created and owned by Ellpeck and distributed
|
||||||
* under the Actually Additions License to be found at
|
// * under the Actually Additions License to be found at
|
||||||
* http://ellpeck.de/actaddlicense
|
// * http://ellpeck.de/actaddlicense
|
||||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
// * View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||||
*
|
// *
|
||||||
* © 2015-2017 Ellpeck
|
// * © 2015-2017 Ellpeck
|
||||||
*/
|
// */
|
||||||
|
//
|
||||||
package de.ellpeck.actuallyadditions.mod.blocks;
|
//package de.ellpeck.actuallyadditions.mod.blocks;
|
||||||
|
//
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase;
|
//import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase;
|
||||||
import net.minecraft.block.Block;
|
//import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockFenceGate;
|
//import net.minecraft.block.BlockFenceGate;
|
||||||
import net.minecraft.block.BlockWall;
|
//import net.minecraft.block.BlockWall;
|
||||||
import net.minecraft.block.material.Material;
|
//import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.state.BlockStateContainer;
|
//import net.minecraft.block.state.BlockStateContainer;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
//import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.init.Blocks;
|
//import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.item.ItemStack;
|
//import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.Direction;
|
//import net.minecraft.util.Direction;
|
||||||
import net.minecraft.util.NonNullList;
|
//import net.minecraft.util.NonNullList;
|
||||||
import net.minecraft.util.math.AxisAlignedBB;
|
//import net.minecraft.util.math.AxisAlignedBB;
|
||||||
import net.minecraft.util.math.BlockPos;
|
//import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.IBlockAccess;
|
//import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
//import net.minecraftforge.api.distmarker.Dist;
|
||||||
|
//
|
||||||
|
//
|
||||||
public class BlockWallAA extends BlockBase {
|
//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[] 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)};
|
// 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")
|
// @SuppressWarnings("deprecation")
|
||||||
public BlockWallAA(Block blocc) {
|
// public BlockWallAA(Block blocc) {
|
||||||
super(blocc.getDefaultState().getMaterial(), name);
|
// super(blocc.getDefaultState().getMaterial(), name);
|
||||||
this.setHardness(1.5F);
|
// this.setHardness(1.5F);
|
||||||
this.setResistance(10F);
|
// this.setResistance(10F);
|
||||||
this.setSoundType(blocc.getSoundType());
|
// 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));
|
// 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) {
|
// private static int yesThisIsCopyPastedFromBlockWallAndIHaveNoIdeaWhatThisMethodDoes(BlockState state) {
|
||||||
int i = 0;
|
// int i = 0;
|
||||||
|
//
|
||||||
if (state.getValue(BlockWall.NORTH)) {
|
// if (state.getValue(BlockWall.NORTH)) {
|
||||||
i |= 1 << Direction.NORTH.getHorizontalIndex();
|
// i |= 1 << Direction.NORTH.getHorizontalIndex();
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
if (state.getValue(BlockWall.EAST)) {
|
// if (state.getValue(BlockWall.EAST)) {
|
||||||
i |= 1 << Direction.EAST.getHorizontalIndex();
|
// i |= 1 << Direction.EAST.getHorizontalIndex();
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
if (state.getValue(BlockWall.SOUTH)) {
|
// if (state.getValue(BlockWall.SOUTH)) {
|
||||||
i |= 1 << Direction.SOUTH.getHorizontalIndex();
|
// i |= 1 << Direction.SOUTH.getHorizontalIndex();
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
if (state.getValue(BlockWall.WEST)) {
|
// if (state.getValue(BlockWall.WEST)) {
|
||||||
i |= 1 << Direction.WEST.getHorizontalIndex();
|
// i |= 1 << Direction.WEST.getHorizontalIndex();
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
return i;
|
// return i;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public BlockState getActualState(BlockState state, IBlockAccess worldIn, BlockPos pos) {
|
// public BlockState getActualState(BlockState state, IBlockAccess worldIn, BlockPos pos) {
|
||||||
boolean flag = this.canConnectTo(worldIn, pos.north());
|
// boolean flag = this.canConnectTo(worldIn, pos.north());
|
||||||
boolean flag1 = this.canConnectTo(worldIn, pos.east());
|
// boolean flag1 = this.canConnectTo(worldIn, pos.east());
|
||||||
boolean flag2 = this.canConnectTo(worldIn, pos.south());
|
// boolean flag2 = this.canConnectTo(worldIn, pos.south());
|
||||||
boolean flag3 = this.canConnectTo(worldIn, pos.west());
|
// boolean flag3 = this.canConnectTo(worldIn, pos.west());
|
||||||
boolean flag4 = flag && !flag1 && flag2 && !flag3 || !flag && flag1 && !flag2 && flag3;
|
// 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);
|
// 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
|
// @Override
|
||||||
public boolean isFullCube(BlockState state) {
|
// public boolean isFullCube(BlockState state) {
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public boolean isPassable(IBlockAccess worldIn, BlockPos pos) {
|
// public boolean isPassable(IBlockAccess worldIn, BlockPos pos) {
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
@OnlyIn(Dist.CLIENT)
|
// @OnlyIn(Dist.CLIENT)
|
||||||
@Deprecated
|
// @Deprecated
|
||||||
public boolean shouldSideBeRendered(BlockState blockState, IBlockAccess blockAccess, BlockPos pos, Direction side) {
|
// public boolean shouldSideBeRendered(BlockState blockState, IBlockAccess blockAccess, BlockPos pos, Direction side) {
|
||||||
return side != Direction.DOWN || super.shouldSideBeRendered(blockState, blockAccess, pos, side);
|
// return side != Direction.DOWN || super.shouldSideBeRendered(blockState, blockAccess, pos, side);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public AxisAlignedBB getBoundingBox(BlockState state, IBlockAccess source, BlockPos pos) {
|
// public AxisAlignedBB getBoundingBox(BlockState state, IBlockAccess source, BlockPos pos) {
|
||||||
state = this.getActualState(state, source, pos);
|
// state = this.getActualState(state, source, pos);
|
||||||
return AABB_BY_INDEX[yesThisIsCopyPastedFromBlockWallAndIHaveNoIdeaWhatThisMethodDoes(state)];
|
// return AABB_BY_INDEX[yesThisIsCopyPastedFromBlockWallAndIHaveNoIdeaWhatThisMethodDoes(state)];
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public AxisAlignedBB getCollisionBoundingBox(BlockState blockState, IBlockAccess worldIn, BlockPos pos) {
|
// public AxisAlignedBB getCollisionBoundingBox(BlockState blockState, IBlockAccess worldIn, BlockPos pos) {
|
||||||
blockState = this.getActualState(blockState, worldIn, pos);
|
// blockState = this.getActualState(blockState, worldIn, pos);
|
||||||
return CLIP_AABB_BY_INDEX[yesThisIsCopyPastedFromBlockWallAndIHaveNoIdeaWhatThisMethodDoes(blockState)];
|
// return CLIP_AABB_BY_INDEX[yesThisIsCopyPastedFromBlockWallAndIHaveNoIdeaWhatThisMethodDoes(blockState)];
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public boolean isOpaqueCube(BlockState state) {
|
// public boolean isOpaqueCube(BlockState state) {
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
@OnlyIn(Dist.CLIENT)
|
// @OnlyIn(Dist.CLIENT)
|
||||||
public void getSubBlocks(CreativeTabs tab, NonNullList<ItemStack> list) {
|
// public void getSubBlocks(CreativeTabs tab, NonNullList<ItemStack> list) {
|
||||||
list.add(new ItemStack(this, 1, 0));
|
// list.add(new ItemStack(this, 1, 0));
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
public boolean canConnectTo(IBlockAccess worldIn, BlockPos pos) {
|
// public boolean canConnectTo(IBlockAccess worldIn, BlockPos pos) {
|
||||||
BlockState state = worldIn.getBlockState(pos);
|
// BlockState state = worldIn.getBlockState(pos);
|
||||||
Block block = state.getBlock();
|
// Block block = state.getBlock();
|
||||||
return block != Blocks.BARRIER && (!(block != this && !(block instanceof BlockFenceGate)) || state.getMaterial().isOpaque() && state.isFullCube() && state.getMaterial() != Material.GOURD);
|
// return block != Blocks.BARRIER && (!(block != this && !(block instanceof BlockFenceGate)) || state.getMaterial().isOpaque() && state.isFullCube() && state.getMaterial() != Material.GOURD);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public BlockState getStateFromMeta(int meta) {
|
// public BlockState getStateFromMeta(int meta) {
|
||||||
return this.getDefaultState();
|
// return this.getDefaultState();
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public int getMetaFromState(BlockState state) {
|
// public int getMetaFromState(BlockState state) {
|
||||||
return 0;
|
// return 0;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
protected BlockStateContainer createBlockState() {
|
// protected BlockStateContainer createBlockState() {
|
||||||
return new BlockStateContainer(this, BlockWall.UP, BlockWall.NORTH, BlockWall.EAST, BlockWall.WEST, BlockWall.SOUTH);
|
// return new BlockStateContainer(this, BlockWall.UP, BlockWall.NORTH, BlockWall.EAST, BlockWall.WEST, BlockWall.SOUTH);
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
|
@ -10,125 +10,107 @@
|
||||||
|
|
||||||
package de.ellpeck.actuallyadditions.mod.blocks;
|
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.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.SoundType;
|
||||||
import net.minecraft.block.material.Material;
|
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 class BlockWildPlant extends BlockBushBase {
|
||||||
|
|
||||||
public static final TheWildPlants[] ALL_WILD_PLANTS = TheWildPlants.values();
|
// public static final TheWildPlants[] ALL_WILD_PLANTS = TheWildPlants.values();
|
||||||
public static final PropertyEnum<TheWildPlants> TYPE = PropertyEnum.create("type", TheWildPlants.class);
|
// public static final PropertyEnum<TheWildPlants> TYPE = PropertyEnum.create("type", TheWildPlants.class);
|
||||||
|
|
||||||
public BlockWildPlant() {
|
public BlockWildPlant() {
|
||||||
super(this.name);
|
super(Properties.create(Material.PLANTS).sound(SoundType.PLANT).harvestLevel(0).hardnessAndResistance(0, 0));
|
||||||
this.setSoundType(SoundType.PLANT);
|
// this.setSoundType(SoundType.PLANT);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
// TODO: [port] ADD BACK
|
||||||
public boolean canBlockStay(World world, BlockPos pos, BlockState state) {
|
// @Override
|
||||||
BlockPos offset = pos.down();
|
// public boolean canBlockStay(World world, BlockPos pos, BlockState state) {
|
||||||
BlockState offsetState = world.getBlockState(offset);
|
// BlockPos offset = pos.down();
|
||||||
Block offsetBlock = offsetState.getBlock();
|
// BlockState offsetState = world.getBlockState(offset);
|
||||||
return state.getValue(TYPE) == TheWildPlants.RICE
|
// Block offsetBlock = offsetState.getBlock();
|
||||||
? offsetState.getMaterial() == Material.WATER
|
// return state.getValue(TYPE) == TheWildPlants.RICE
|
||||||
: offsetBlock.canSustainPlant(offsetState, world, offset, Direction.UP, this);
|
// ? 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) {
|
// @Override
|
||||||
BlockPlant normal = (BlockPlant) state.getValue(TYPE).getNormalVersion();
|
// public ItemStack getPickBlock(BlockState state, RayTraceResult target, World world, BlockPos pos, PlayerEntity player) {
|
||||||
return new ItemStack(normal.seedItem);
|
// BlockPlant normal = (BlockPlant) state.getValue(TYPE).getNormalVersion();
|
||||||
}
|
// return new ItemStack(normal.seedItem);
|
||||||
|
// }
|
||||||
@Override
|
//
|
||||||
public void getSubBlocks(CreativeTabs tab, NonNullList<ItemStack> list) {
|
// @Override
|
||||||
for (int j = 0; j < ALL_WILD_PLANTS.length; j++) {
|
// public void getSubBlocks(CreativeTabs tab, NonNullList<ItemStack> list) {
|
||||||
list.add(new ItemStack(this, 1, j));
|
// 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) {
|
// @Override
|
||||||
Block normal = state.getValue(TYPE).getNormalVersion();
|
// public void getDrops(NonNullList<ItemStack> drops, IBlockAccess world, BlockPos pos, BlockState state, int fortune) {
|
||||||
normal.getDrops(drops, world, pos, normal.getDefaultState().withProperty(BlockCrops.AGE, 7), 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) {
|
// @Override
|
||||||
return false;
|
// public boolean canSilkHarvest(World world, BlockPos pos, BlockState state, PlayerEntity player) {
|
||||||
}
|
// return false;
|
||||||
|
// }
|
||||||
@Override
|
//
|
||||||
protected ItemBlockBase getItemBlock() {
|
// @Override
|
||||||
return new TheItemBlock(this);
|
// protected ItemBlockBase getItemBlock() {
|
||||||
}
|
// return new TheItemBlock(this);
|
||||||
|
// }
|
||||||
@Override
|
//
|
||||||
public boolean shouldAddCreative() {
|
// @Override
|
||||||
return false;
|
// public boolean shouldAddCreative() {
|
||||||
}
|
// return false;
|
||||||
|
// }
|
||||||
@Override
|
//
|
||||||
public void registerRendering() {
|
// @Override
|
||||||
for (int i = 0; i < ALL_WILD_PLANTS.length; i++) {
|
// public void registerRendering() {
|
||||||
ActuallyAdditions.PROXY.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), TYPE.getName() + "=" + ALL_WILD_PLANTS[i].getName());
|
// 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) {
|
// @Override
|
||||||
return this.getDefaultState().withProperty(TYPE, TheWildPlants.values()[meta]);
|
// public BlockState getStateFromMeta(int meta) {
|
||||||
}
|
// return this.getDefaultState().withProperty(TYPE, TheWildPlants.values()[meta]);
|
||||||
|
// }
|
||||||
@Override
|
//
|
||||||
public int getMetaFromState(BlockState state) {
|
// @Override
|
||||||
return state.getValue(TYPE).ordinal();
|
// public int getMetaFromState(BlockState state) {
|
||||||
}
|
// return state.getValue(TYPE).ordinal();
|
||||||
|
// }
|
||||||
@Override
|
//
|
||||||
protected BlockStateContainer createBlockState() {
|
// @Override
|
||||||
return new BlockStateContainer(this, TYPE);
|
// protected BlockStateContainer createBlockState() {
|
||||||
}
|
// return new BlockStateContainer(this, TYPE);
|
||||||
|
// }
|
||||||
@Override
|
//
|
||||||
public EnumRarity getRarity(ItemStack stack) {
|
// @Override
|
||||||
return stack.getItemDamage() >= ALL_WILD_PLANTS.length
|
// public EnumRarity getRarity(ItemStack stack) {
|
||||||
? EnumRarity.COMMON
|
// return stack.getItemDamage() >= ALL_WILD_PLANTS.length
|
||||||
: ALL_WILD_PLANTS[stack.getItemDamage()].getRarity();
|
// ? EnumRarity.COMMON
|
||||||
}
|
// : ALL_WILD_PLANTS[stack.getItemDamage()].getRarity();
|
||||||
|
// }
|
||||||
public static class TheItemBlock extends ItemBlockBase {
|
//
|
||||||
|
// public static class TheItemBlock extends ItemBlockBase {
|
||||||
public TheItemBlock(Block block) {
|
//
|
||||||
super(block);
|
// public TheItemBlock(Block block) {
|
||||||
this.setHasSubtypes(true);
|
// super(block);
|
||||||
this.setMaxDamage(0);
|
// this.setHasSubtypes(true);
|
||||||
}
|
// this.setMaxDamage(0);
|
||||||
|
// }
|
||||||
@Override
|
//
|
||||||
public String getTranslationKey(ItemStack stack) {
|
// @Override
|
||||||
return stack.getItemDamage() >= ALL_WILD_PLANTS.length
|
// public String getTranslationKey(ItemStack stack) {
|
||||||
? StringUtil.BUGGED_ITEM_NAME
|
// return stack.getItemDamage() >= ALL_WILD_PLANTS.length
|
||||||
: this.getTranslationKey() + "_" + ALL_WILD_PLANTS[stack.getItemDamage()].getName();
|
// ? StringUtil.BUGGED_ITEM_NAME
|
||||||
}
|
// : this.getTranslationKey() + "_" + ALL_WILD_PLANTS[stack.getItemDamage()].getName();
|
||||||
}
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,34 +10,23 @@
|
||||||
|
|
||||||
package de.ellpeck.actuallyadditions.mod.blocks;
|
package de.ellpeck.actuallyadditions.mod.blocks;
|
||||||
|
|
||||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
import de.ellpeck.actuallyadditions.mod.blocks.base.DirectionalBlock;
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
|
||||||
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityXPSolidifier;
|
import de.ellpeck.actuallyadditions.mod.tile.TileEntityXPSolidifier;
|
||||||
import net.minecraft.block.BlockHorizontal;
|
import net.minecraft.block.BlockState;
|
||||||
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.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.item.EnumRarity;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.Direction;
|
import net.minecraft.util.ActionResultType;
|
||||||
import net.minecraft.util.Hand;
|
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.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.minecraft.world.World;
|
||||||
|
|
||||||
public class BlockXPSolidifier extends BlockContainerBase {
|
public class BlockXPSolidifier extends DirectionalBlock.Container {
|
||||||
|
|
||||||
public BlockXPSolidifier() {
|
public BlockXPSolidifier() {
|
||||||
super(Material.ROCK, this.name);
|
super(ActuallyBlocks.defaultPickProps(0, 2.5F, 10.0F));
|
||||||
this.setHarvestLevel("pickaxe", 0);
|
|
||||||
this.setHardness(2.5F);
|
|
||||||
this.setResistance(10.0F);
|
|
||||||
this.setSoundType(SoundType.STONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -47,50 +36,11 @@ public class BlockXPSolidifier extends BlockContainerBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ActionResultType onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
|
public ActionResultType onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
|
||||||
if (!world.isRemote) {
|
return this.openGui(worldIn, player, pos, TileEntityXPSolidifier.class);
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public EnumRarity getRarity(ItemStack stack) {
|
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
|
||||||
return EnumRarity.EPIC;
|
return Shapes.SOLIDIFIER_SHAPE;
|
||||||
}
|
|
||||||
|
|
||||||
@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)));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,623 +9,109 @@ import java.util.Optional;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
public class Shapes {
|
public class Shapes {
|
||||||
static final VoxelShape CANOLA_PRESS_SHAPE = Stream.of(
|
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();
|
||||||
Block.makeCuboidShape(13, 0, 1, 15, 15.5, 3), Block.makeCuboidShape(2, 0, 2, 14, 6, 14),
|
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();
|
||||||
Block.makeCuboidShape(2, 10, 2, 14, 15, 14), Block.makeCuboidShape(3, 6, 3, 13, 10, 13),
|
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();
|
||||||
Block.makeCuboidShape(1, 0, 1, 3, 15.5, 3), Block.makeCuboidShape(1, 0, 13, 3, 15.5, 15),
|
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();
|
||||||
Block.makeCuboidShape(13, 0, 13, 15, 15.5, 15), Block.makeCuboidShape(0.9, 0, 0.9, 3.1, 0.5, 3.1),
|
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();
|
||||||
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),
|
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();
|
||||||
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),
|
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();
|
||||||
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),
|
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();
|
||||||
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),
|
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();
|
||||||
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),
|
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();
|
||||||
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),
|
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();
|
||||||
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),
|
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();
|
||||||
Block.makeCuboidShape(0.9, 15.5, 12.9, 3.1, 16, 15.1)
|
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();
|
||||||
).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();
|
||||||
public static final VoxelShape CRYSTAL_CLUSTER_SHAPE = Stream.of(
|
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();
|
||||||
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 class CoalGeneratorShapes {
|
static final class CoalGeneratorShapes {
|
||||||
static final VoxelShape NORTH = Stream.of(
|
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();
|
||||||
Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16),
|
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();
|
||||||
Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 15, 15, 15, 16, 16),
|
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();
|
||||||
Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16),
|
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();
|
||||||
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 class CoffeeMachineShapes {
|
||||||
static final VoxelShape NORTH = Stream.of(
|
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();
|
||||||
Block.makeCuboidShape(8, 11, 7, 13, 14, 8), Block.makeCuboidShape(1, 0, 1, 15, 1, 15),
|
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();
|
||||||
Block.makeCuboidShape(7, 1, 8, 14, 9, 14), Block.makeCuboidShape(6, 9, 3, 15, 11, 15),
|
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();
|
||||||
Block.makeCuboidShape(8, 11, 8, 13, 13, 13), Block.makeCuboidShape(10, 8, 3.5, 11, 9, 4.5),
|
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();
|
||||||
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 class DirectionalBlockBreakerShapes {
|
||||||
static final VoxelShape SHAPE_U = Stream.of(
|
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();
|
||||||
Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(0, 15, 15, 16, 16, 16),
|
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();
|
||||||
Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 0, 15, 16, 1, 16),
|
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();
|
||||||
Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16),
|
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();
|
||||||
Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(15, 1, 15, 16, 15, 16),
|
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();
|
||||||
Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 15, 1, 1, 16, 15),
|
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();
|
||||||
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 class FarmerShapes {
|
||||||
static final VoxelShape SHAPE_N = Stream.of(
|
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();
|
||||||
Block.makeCuboidShape(11, 14, 4, 12, 15, 5), Block.makeCuboidShape(0, 0, 0, 1, 1, 16),
|
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();
|
||||||
Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(15, 0, 0, 16, 1, 16),
|
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();
|
||||||
Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(0, 15, 0, 1, 16, 16),
|
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();
|
||||||
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 class FluidCollectorShapes {
|
static class FluidCollectorShapes {
|
||||||
static final VoxelShape SHAPE_U = Stream.of(
|
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();
|
||||||
Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(0, 15, 15, 16, 16, 16),
|
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();
|
||||||
Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 0, 15, 16, 1, 16),
|
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();
|
||||||
Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16),
|
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();
|
||||||
Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(15, 1, 15, 16, 15, 16),
|
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();
|
||||||
Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 15, 1, 1, 16, 15),
|
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();
|
||||||
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 class FurnaceDoubleShapes {
|
static class FurnaceDoubleShapes {
|
||||||
static final VoxelShape SHAPE_N = Stream.of(
|
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();
|
||||||
Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 1, 16, 16),
|
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();
|
||||||
Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 15, 15, 15, 16, 16),
|
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();
|
||||||
Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16),
|
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();
|
||||||
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_E = Stream.of(
|
static final class GrinderShapes {
|
||||||
Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1),
|
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();
|
||||||
Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(0, 15, 1, 1, 16, 15),
|
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();
|
||||||
Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16),
|
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();
|
||||||
Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1),
|
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();
|
||||||
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 VoxelShape SHAPE_S = Stream.of(
|
static final class LampPowererShapes {
|
||||||
Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16),
|
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();
|
||||||
Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1),
|
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();
|
||||||
Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1),
|
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();
|
||||||
Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16),
|
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();
|
||||||
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 VoxelShape SHAPE_W = Stream.of(
|
static final class OilGeneratorShapes {
|
||||||
Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 15, 16, 16, 16),
|
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();
|
||||||
Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15),
|
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();
|
||||||
Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1),
|
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();
|
||||||
Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16),
|
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();
|
||||||
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),
|
static final class MinerShapes {
|
||||||
Block.makeCuboidShape(2, 14, 11, 14, 15, 14), Block.makeCuboidShape(2, 1, 14, 14, 15, 15),
|
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();
|
||||||
Block.makeCuboidShape(2, 1, 1, 14, 15, 2), Block.makeCuboidShape(14, 1, 1, 15, 15, 15),
|
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();
|
||||||
Block.makeCuboidShape(1, 3, 7, 2, 7, 9), Block.makeCuboidShape(1, 7, 3, 2, 15, 13),
|
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();
|
||||||
Block.makeCuboidShape(1, 1, 3, 2, 3, 13), Block.makeCuboidShape(1, 1, 13, 2, 15, 15),
|
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();
|
||||||
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) -> {
|
static final class LeafGeneratorShapes {
|
||||||
return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR);
|
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();
|
||||||
}).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()
|
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)
|
.add(1, 2, 1, 2, 14, 15).add(2, 2, 14, 14, 14, 15).add(2, 2, 1, 14, 14, 2)
|
||||||
.standardReduceBuild().get();
|
.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 {
|
public static class ShapeBuilder {
|
||||||
Stream.Builder<VoxelShape> shapes = Stream.builder();
|
Stream.Builder<VoxelShape> shapes = Stream.builder();
|
||||||
|
|
||||||
|
@ -660,5 +154,4 @@ public class Shapes {
|
||||||
return new ShapeBuilder();
|
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));
|
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
|
//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("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("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();
|
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
|
@Override
|
||||||
public void initGui() {
|
public void init() {
|
||||||
super.initGui();
|
super.init();
|
||||||
|
|
||||||
if (this.hasSearchBar() && this.searchText != null) {
|
if (this.hasSearchBar() && this.searchText != null) {
|
||||||
this.searchField.setText(this.searchText);
|
this.searchField.setText(this.searchText);
|
||||||
|
|
|
@ -111,9 +111,9 @@ public class GuiPage extends GuiBooklet {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initGui() {
|
public void init() {
|
||||||
this.itemDisplays.clear();
|
this.itemDisplays.clear();
|
||||||
super.initGui();
|
super.init();
|
||||||
|
|
||||||
List<String> links = this.getWebLinks();
|
List<String> links = this.getWebLinks();
|
||||||
if (links != null && !links.isEmpty()) {
|
if (links != null && !links.isEmpty()) {
|
||||||
|
@ -124,7 +124,7 @@ public class GuiPage extends GuiBooklet {
|
||||||
for (int i = 0; i < this.pages.length; i++) {
|
for (int i = 0; i < this.pages.length; i++) {
|
||||||
IBookletPage page = this.pages[i];
|
IBookletPage page = this.pages[i];
|
||||||
if (page != null) {
|
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
|
@Override
|
||||||
public void initGui(){
|
public void init(){
|
||||||
super.initGui();
|
super.init();
|
||||||
|
|
||||||
try{
|
try{
|
||||||
this.buttonList.remove(1);
|
this.buttonList.remove(1);
|
||||||
|
|
|
@ -117,7 +117,7 @@ public class BookletPage implements IBookletPage {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@OnlyIn(Dist.CLIENT)
|
@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
|
@Override
|
||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
public void initGui(GuiBookletBase gui, int startX, int startY) {
|
public void init(GuiBookletBase gui, int startX, int startY) {
|
||||||
super.initGui(gui, startX, startY);
|
super.init(gui, startX, startY);
|
||||||
|
|
||||||
gui.addOrModifyItemRenderer(this.stacks[0], startX + 5 + 82, startY + 10 + 1, 1F, true);
|
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);
|
gui.addOrModifyItemRenderer(this.outcome, startX + 5 + 36, startY + 10 + 42, 1F, false);
|
||||||
|
|
|
@ -97,8 +97,8 @@ public class PageCrafting extends BookletPage {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initGui(GuiBookletBase gui, int startX, int startY) {
|
public void init(GuiBookletBase gui, int startX, int startY) {
|
||||||
super.initGui(gui, startX, startY);
|
super.init(gui, startX, startY);
|
||||||
this.findRecipe(gui, startX, startY);
|
this.findRecipe(gui, startX, startY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,8 +55,8 @@ public class PageCrusherRecipe extends BookletPage {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
public void initGui(GuiBookletBase gui, int startX, int startY) {
|
public void init(GuiBookletBase gui, int startX, int startY) {
|
||||||
super.initGui(gui, startX, startY);
|
super.init(gui, startX, startY);
|
||||||
|
|
||||||
if (this.recipe != null) {
|
if (this.recipe != null) {
|
||||||
gui.addOrModifyItemRenderer(this.stacks[this.rotate++ % this.stacks.length], startX + 38 + 18, startY + 6 + 1, 1F, true);
|
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
|
@Override
|
||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
public void initGui(GuiBookletBase gui, int startX, int startY) {
|
public void init(GuiBookletBase gui, int startX, int startY) {
|
||||||
super.initGui(gui, startX, startY);
|
super.init(gui, startX, startY);
|
||||||
|
|
||||||
if (this.recipe != null) {
|
if (this.recipe != null) {
|
||||||
gui.addOrModifyItemRenderer(this.stand1[0], startX + 5 + 26, startY + 10 + 1, 1F, true);
|
gui.addOrModifyItemRenderer(this.stand1[0], startX + 5 + 26, startY + 10 + 1, 1F, true);
|
||||||
|
|
|
@ -66,8 +66,8 @@ public class PageFurnace extends BookletPage {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
public void initGui(GuiBookletBase gui, int startX, int startY) {
|
public void init(GuiBookletBase gui, int startX, int startY) {
|
||||||
super.initGui(gui, startX, startY);
|
super.init(gui, startX, startY);
|
||||||
|
|
||||||
gui.addOrModifyItemRenderer(this.input, startX + 23 + 1, startY + 10 + 5, 1F, true);
|
gui.addOrModifyItemRenderer(this.input, startX + 23 + 1, startY + 10 + 5, 1F, true);
|
||||||
gui.addOrModifyItemRenderer(this.output, startX + 23 + 59, startY + 10 + 5, 1F, false);
|
gui.addOrModifyItemRenderer(this.output, startX + 23 + 59, startY + 10 + 5, 1F, false);
|
||||||
|
|
|
@ -37,8 +37,8 @@ public class PageLinkButton extends BookletPage {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
public void initGui(GuiBookletBase gui, int startX, int startY) {
|
public void init(GuiBookletBase gui, int startX, int startY) {
|
||||||
super.initGui(gui, startX, 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)));
|
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
|
@Override
|
||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
public void initGui(GuiBookletBase gui, int startX, int startY) {
|
public void init(GuiBookletBase gui, int startX, int startY) {
|
||||||
super.initGui(gui, startX, startY);
|
super.init(gui, startX, startY);
|
||||||
|
|
||||||
if (this.recipe != null) {
|
if (this.recipe != null) {
|
||||||
gui.addOrModifyItemRenderer(this.stacks[0], startX + 30 + 1, startY + 10 + 13, 1F, true);
|
gui.addOrModifyItemRenderer(this.stacks[0], startX + 30 + 1, startY + 10 + 13, 1F, true);
|
||||||
|
|
|
@ -46,8 +46,8 @@ public class PageTrials extends BookletPage {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
public void initGui(GuiBookletBase gui, int startX, int startY) {
|
public void init(GuiBookletBase gui, int startX, int startY) {
|
||||||
super.initGui(gui, startX, startY);
|
super.init(gui, startX, startY);
|
||||||
|
|
||||||
if (this.buttonId >= 0) {
|
if (this.buttonId >= 0) {
|
||||||
this.button = new Button(this.buttonId, startX + 125 / 2 - 50, startY + 120, 100, 20, "");
|
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.tile.FilterSettings;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||||
import net.minecraft.client.Minecraft;
|
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.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.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
@ -34,7 +36,7 @@ public class FilterSettingsGui extends Gui {
|
||||||
public SmallerButton modButton;
|
public SmallerButton modButton;
|
||||||
public SmallerButton oredictButton;
|
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.theSettings = settings;
|
||||||
|
|
||||||
this.whitelistButton = new SmallerButton(this.theSettings.whitelistButtonId, x, y, "", true);
|
this.whitelistButton = new SmallerButton(this.theSettings.whitelistButtonId, x, y, "", true);
|
||||||
|
|
|
@ -48,19 +48,19 @@ public class GuiBag extends GuiWtfMojang<ContainerBag> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initGui() {
|
public void init() {
|
||||||
super.initGui();
|
super.init();
|
||||||
|
|
||||||
this.filter = new FilterSettingsGui(this.container.filter, this.guiLeft + 138, this.guiTop + 10, this.buttonList);
|
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.DARK_GREEN
|
||||||
: TextFormatting.RED) + "I");
|
: TextFormatting.RED) + "I");
|
||||||
this.addButton(this.buttonAutoInsert);
|
this.addButton(this.buttonAutoInsert);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void actionPerformed(GuiButton button) throws IOException {
|
protected void actionPerformed(Button button) throws IOException {
|
||||||
CompoundNBT data = new CompoundNBT();
|
CompoundNBT data = new CompoundNBT();
|
||||||
data.setInteger("ButtonID", button.id);
|
data.setInteger("ButtonID", button.id);
|
||||||
data.setInteger("PlayerID", Minecraft.getInstance().player.getEntityId());
|
data.setInteger("PlayerID", Minecraft.getInstance().player.getEntityId());
|
||||||
|
|
|
@ -45,7 +45,7 @@ public class GuiBioReactor extends GuiWtfMojang<ContainerBioReactor> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
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
|
@Override
|
||||||
|
@ -64,7 +64,7 @@ public class GuiBioReactor extends GuiWtfMojang<ContainerBioReactor> {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.tile.producePerTick > 0) {
|
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();
|
this.energy.draw();
|
||||||
|
|
|
@ -36,8 +36,8 @@ public class GuiCanolaPress extends GuiWtfMojang<ContainerCanolaPress> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initGui() {
|
public void init() {
|
||||||
super.initGui();
|
super.init();
|
||||||
this.energy = new EnergyDisplay(this.guiLeft + 42, this.guiTop + 5, this.press.storage);
|
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);
|
this.fluid = new FluidDisplay(this.guiLeft + 116, this.guiTop + 5, this.press.tank);
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ public class GuiCanolaPress extends GuiWtfMojang<ContainerCanolaPress> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
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
|
@Override
|
||||||
|
|
|
@ -34,8 +34,8 @@ public class GuiCoalGenerator extends GuiWtfMojang<ContainerCoalGenerator> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initGui() {
|
public void init() {
|
||||||
super.initGui();
|
super.init();
|
||||||
this.energy = new EnergyDisplay(this.guiLeft + 42, this.guiTop + 5, this.generator.storage);
|
this.energy = new EnergyDisplay(this.guiLeft + 42, this.guiTop + 5, this.generator.storage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ public class GuiCoalGenerator extends GuiWtfMojang<ContainerCoalGenerator> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
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
|
@Override
|
||||||
|
|
|
@ -40,10 +40,10 @@ public class GuiCoffeeMachine extends GuiWtfMojang<ContainerCoffeeMachine> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initGui() {
|
public void init() {
|
||||||
super.initGui();
|
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.addButton(buttonOkay);
|
||||||
|
|
||||||
this.energy = new EnergyDisplay(this.guiLeft + 16, this.guiTop + 5, this.machine.storage);
|
this.energy = new EnergyDisplay(this.guiLeft + 16, this.guiTop + 5, this.machine.storage);
|
||||||
|
@ -65,7 +65,7 @@ public class GuiCoffeeMachine extends GuiWtfMojang<ContainerCoffeeMachine> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
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
|
@Override
|
||||||
|
@ -96,7 +96,7 @@ public class GuiCoffeeMachine extends GuiWtfMojang<ContainerCoffeeMachine> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(GuiButton button) {
|
public void actionPerformed(Button button) {
|
||||||
PacketHandlerHelper.sendButtonPacket(this.machine, button.id);
|
PacketHandlerHelper.sendButtonPacket(this.machine, button.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,8 +36,8 @@ public class GuiDirectionalBreaker extends GuiWtfMojang<ContainerDirectionalBrea
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initGui() {
|
public void init() {
|
||||||
super.initGui();
|
super.init();
|
||||||
this.energy = new EnergyDisplay(this.guiLeft + 42, this.guiTop + 5, this.breaker.storage);
|
this.energy = new EnergyDisplay(this.guiLeft + 42, this.guiTop + 5, this.breaker.storage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ public class GuiDirectionalBreaker extends GuiWtfMojang<ContainerDirectionalBrea
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
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
|
@Override
|
||||||
|
|
|
@ -35,7 +35,7 @@ public class GuiDrill extends GuiWtfMojang<ContainerDrill> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
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
|
@Override
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class GuiDropper extends GuiWtfMojang<ContainerDropper> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
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
|
@Override
|
||||||
|
|
|
@ -35,8 +35,8 @@ public class GuiEnergizer extends GuiWtfMojang<ContainerEnergizer> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initGui() {
|
public void init() {
|
||||||
super.initGui();
|
super.init();
|
||||||
this.energy = new EnergyDisplay(this.guiLeft + 56, this.guiTop + 5, this.energizer.storage);
|
this.energy = new EnergyDisplay(this.guiLeft + 56, this.guiTop + 5, this.energizer.storage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ public class GuiEnergizer extends GuiWtfMojang<ContainerEnergizer> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
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
|
@Override
|
||||||
|
|
|
@ -36,8 +36,8 @@ public class GuiEnervator extends GuiWtfMojang<ContainerEnervator> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initGui() {
|
public void init() {
|
||||||
super.initGui();
|
super.init();
|
||||||
this.energy = new EnergyDisplay(this.guiLeft + 56, this.guiTop + 5, this.enervator.storage);
|
this.energy = new EnergyDisplay(this.guiLeft + 56, this.guiTop + 5, this.enervator.storage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ public class GuiEnervator extends GuiWtfMojang<ContainerEnervator> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
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
|
@Override
|
||||||
|
|
|
@ -37,15 +37,15 @@ public class GuiFarmer extends GuiWtfMojang<ContainerFarmer> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initGui() {
|
public void init() {
|
||||||
super.initGui();
|
super.init();
|
||||||
|
|
||||||
this.energy = new EnergyDisplay(this.guiLeft + 33, this.guiTop + 6, this.farmer.storage);
|
this.energy = new EnergyDisplay(this.guiLeft + 33, this.guiTop + 6, this.farmer.storage);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
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
|
@Override
|
||||||
|
|
|
@ -52,7 +52,7 @@ public class GuiFeeder extends GuiWtfMojang<ContainerFeeder> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
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
|
@Override
|
||||||
|
|
|
@ -44,15 +44,15 @@ public class GuiFermentingBarrel extends GuiWtfMojang<ContainerFermentingBarrel>
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initGui() {
|
public void init() {
|
||||||
super.initGui();
|
super.init();
|
||||||
this.input = new FluidDisplay(this.guiLeft + 60, this.guiTop + 5, this.press.canolaTank);
|
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);
|
this.output = new FluidDisplay(this.guiLeft + 98, this.guiTop + 5, this.press.oilTank);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
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
|
@Override
|
||||||
|
|
|
@ -35,7 +35,7 @@ public class GuiFilter extends GuiWtfMojang<ContainerFilter> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
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
|
@Override
|
||||||
|
|
|
@ -35,8 +35,8 @@ public class GuiFireworkBox extends GuiContainer implements GuiResponder {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initGui() {
|
public void init() {
|
||||||
super.initGui();
|
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, 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));
|
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
|
@Override
|
||||||
public void setEntryValue(int id, float value) {
|
public void setEntryValue(int id, float value) {
|
||||||
GuiButton button = this.buttonList.get(id);
|
Button button = this.buttonList.get(id);
|
||||||
if (button instanceof GuiSlider) {
|
if (button instanceof GuiSlider) {
|
||||||
if (!((GuiSlider) button).isMouseDown) {
|
if (!((GuiSlider) button).isMouseDown) {
|
||||||
System.out.println("SETTING VALUE FOR " + id + "!!");
|
System.out.println("SETTING VALUE FOR " + id + "!!");
|
||||||
|
@ -72,7 +72,7 @@ public class GuiFireworkBox extends GuiContainer implements GuiResponder {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
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
|
@Override
|
||||||
|
|
|
@ -43,14 +43,14 @@ public class GuiFluidCollector extends GuiWtfMojang<ContainerFluidCollector> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initGui() {
|
public void init() {
|
||||||
super.initGui();
|
super.init();
|
||||||
this.fluid = new FluidDisplay(this.guiLeft + 67, this.guiTop + 5, this.collector.tank);
|
this.fluid = new FluidDisplay(this.guiLeft + 67, this.guiTop + 5, this.collector.tank);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
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
|
@Override
|
||||||
|
|
|
@ -34,7 +34,7 @@ public class GuiFurnaceDouble extends GuiWtfMojang<ContainerFurnaceDouble> {
|
||||||
private final TileEntityFurnaceDouble tileFurnace;
|
private final TileEntityFurnaceDouble tileFurnace;
|
||||||
private EnergyDisplay energy;
|
private EnergyDisplay energy;
|
||||||
|
|
||||||
private GuiButton buttonAutoSplit;
|
private Button buttonAutoSplit;
|
||||||
|
|
||||||
public GuiFurnaceDouble(ContainerFurnaceDouble container, PlayerInventory inventory, ITextComponent title) {
|
public GuiFurnaceDouble(ContainerFurnaceDouble container, PlayerInventory inventory, ITextComponent title) {
|
||||||
super(container, inventory);
|
super(container, inventory);
|
||||||
|
@ -56,8 +56,8 @@ public class GuiFurnaceDouble extends GuiWtfMojang<ContainerFurnaceDouble> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initGui() {
|
public void init() {
|
||||||
super.initGui();
|
super.init();
|
||||||
this.energy = new EnergyDisplay(this.guiLeft + 27, this.guiTop + 5, this.tileFurnace.storage);
|
this.energy = new EnergyDisplay(this.guiLeft + 27, this.guiTop + 5, this.tileFurnace.storage);
|
||||||
|
|
||||||
this.buttonAutoSplit = new GuiInputter.SmallerButton(0, this.guiLeft, this.guiTop, "S");
|
this.buttonAutoSplit = new GuiInputter.SmallerButton(0, this.guiLeft, this.guiTop, "S");
|
||||||
|
@ -74,7 +74,7 @@ public class GuiFurnaceDouble extends GuiWtfMojang<ContainerFurnaceDouble> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void actionPerformed(GuiButton button) throws IOException {
|
protected void actionPerformed(Button button) throws IOException {
|
||||||
if (button.id == 0) {
|
if (button.id == 0) {
|
||||||
PacketHandlerHelper.sendButtonPacket(this.tileFurnace, button.id);
|
PacketHandlerHelper.sendButtonPacket(this.tileFurnace, button.id);
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,7 @@ public class GuiFurnaceDouble extends GuiWtfMojang<ContainerFurnaceDouble> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
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
|
@Override
|
||||||
|
|
|
@ -44,20 +44,20 @@
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// @Override
|
// @Override
|
||||||
// public void initGui() {
|
// public void init() {
|
||||||
// super.initGui();
|
// super.init();
|
||||||
//
|
//
|
||||||
// if (this.page > 0) {
|
// 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) {
|
// 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
|
// @Override
|
||||||
// protected void actionPerformed(GuiButton button) throws IOException {
|
// protected void actionPerformed(Button button) throws IOException {
|
||||||
// if (button.id >= 0 && button.id < 3) {
|
// if (button.id >= 0 && button.id < 3) {
|
||||||
// PacketHandlerHelper.sendButtonPacket(this.chest, button.id);
|
// PacketHandlerHelper.sendButtonPacket(this.chest, button.id);
|
||||||
// }
|
// }
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
//
|
//
|
||||||
// @Override
|
// @Override
|
||||||
// public void drawGuiContainerForegroundLayer(int x, int y) {
|
// 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
|
// @Override
|
||||||
|
|
|
@ -53,8 +53,8 @@ public class GuiGrinder extends GuiWtfMojang<ContainerGrinder> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initGui() {
|
public void init() {
|
||||||
super.initGui();
|
super.init();
|
||||||
this.energy = new EnergyDisplay(this.guiLeft + (this.isDouble
|
this.energy = new EnergyDisplay(this.guiLeft + (this.isDouble
|
||||||
? 13
|
? 13
|
||||||
: 42), this.guiTop + 5, this.tileGrinder.storage);
|
: 42), this.guiTop + 5, this.tileGrinder.storage);
|
||||||
|
@ -66,7 +66,7 @@ public class GuiGrinder extends GuiWtfMojang<ContainerGrinder> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void actionPerformed(GuiButton button) throws IOException {
|
protected void actionPerformed(Button button) throws IOException {
|
||||||
if (this.isDouble && button.id == 0) {
|
if (this.isDouble && button.id == 0) {
|
||||||
PacketHandlerHelper.sendButtonPacket(this.tileGrinder, button.id);
|
PacketHandlerHelper.sendButtonPacket(this.tileGrinder, button.id);
|
||||||
}
|
}
|
||||||
|
@ -98,7 +98,7 @@ public class GuiGrinder extends GuiWtfMojang<ContainerGrinder> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
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
|
@Override
|
||||||
|
|
|
@ -17,15 +17,15 @@ import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper;
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityInputter;
|
import de.ellpeck.actuallyadditions.mod.tile.TileEntityInputter;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
|
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||||
|
import net.java.games.input.Keyboard;
|
||||||
import net.minecraft.client.Minecraft;
|
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.client.gui.widget.button.Button;
|
||||||
import net.minecraft.entity.player.PlayerInventory;
|
import net.minecraft.entity.player.PlayerInventory;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.text.ITextComponent;
|
import net.minecraft.util.text.ITextComponent;
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||||
import org.lwjgl.input.Keyboard;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
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");
|
private static final ResourceLocation RES_LOC_ADVANCED = AssetUtil.getGuiLocation("gui_inputter_advanced");
|
||||||
public final TileEntityInputter tileInputter;
|
public final TileEntityInputter tileInputter;
|
||||||
private final boolean isAdvanced;
|
private final boolean isAdvanced;
|
||||||
private GuiTextField fieldPutStart;
|
private TextFieldWidget fieldPutStart;
|
||||||
private GuiTextField fieldPutEnd;
|
private TextFieldWidget fieldPutEnd;
|
||||||
private GuiTextField fieldPullStart;
|
private TextFieldWidget fieldPullStart;
|
||||||
private GuiTextField fieldPullEnd;
|
private TextFieldWidget fieldPullEnd;
|
||||||
|
|
||||||
private FilterSettingsGui leftFilter;
|
private FilterSettingsGui leftFilter;
|
||||||
private FilterSettingsGui rightFilter;
|
private FilterSettingsGui rightFilter;
|
||||||
|
@ -57,31 +57,31 @@ public class GuiInputter extends GuiWtfMojang<ContainerInputter> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initGui() {
|
public void init() {
|
||||||
super.initGui();
|
super.init();
|
||||||
|
|
||||||
if (this.isAdvanced) {
|
if (this.isAdvanced) {
|
||||||
this.leftFilter = new FilterSettingsGui(this.tileInputter.leftFilter, this.guiLeft + 3, this.guiTop + 6, this.buttonList);
|
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.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
|
? OFFSET_ADVANCED
|
||||||
: 0), 34, 8);
|
: 0), 34, 8);
|
||||||
this.fieldPullStart.setMaxStringLength(5);
|
this.fieldPullStart.setMaxStringLength(5);
|
||||||
this.fieldPullStart.setEnableBackgroundDrawing(false);
|
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
|
? OFFSET_ADVANCED
|
||||||
: 0), 34, 8);
|
: 0), 34, 8);
|
||||||
this.fieldPullEnd.setMaxStringLength(5);
|
this.fieldPullEnd.setMaxStringLength(5);
|
||||||
this.fieldPullEnd.setEnableBackgroundDrawing(false);
|
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
|
? OFFSET_ADVANCED
|
||||||
: 0), 34, 8);
|
: 0), 34, 8);
|
||||||
this.fieldPutStart.setMaxStringLength(5);
|
this.fieldPutStart.setMaxStringLength(5);
|
||||||
this.fieldPutStart.setEnableBackgroundDrawing(false);
|
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
|
? OFFSET_ADVANCED
|
||||||
: 0), 34, 8);
|
: 0), 34, 8);
|
||||||
this.fieldPutEnd.setMaxStringLength(5);
|
this.fieldPutEnd.setMaxStringLength(5);
|
||||||
|
@ -120,16 +120,16 @@ public class GuiInputter extends GuiWtfMojang<ContainerInputter> {
|
||||||
: 0);
|
: 0);
|
||||||
//Info Mode on!
|
//Info Mode on!
|
||||||
if (x >= this.guiLeft + 4 && y >= newTopOffset + 65 && x <= this.guiLeft + 4 + 38 && y <= newTopOffset + 65 + 12) {
|
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) {
|
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) {
|
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) {
|
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) {
|
if (this.isAdvanced) {
|
||||||
|
@ -140,7 +140,7 @@ public class GuiInputter extends GuiWtfMojang<ContainerInputter> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
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
|
@Override
|
||||||
|
@ -159,30 +159,30 @@ public class GuiInputter extends GuiWtfMojang<ContainerInputter> {
|
||||||
? OFFSET_ADVANCED
|
? OFFSET_ADVANCED
|
||||||
: 0));
|
: 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
|
? OFFSET_ADVANCED
|
||||||
: 0), StringUtil.DECIMAL_COLOR_GRAY_TEXT);
|
: 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
|
? OFFSET_ADVANCED
|
||||||
: 0), StringUtil.DECIMAL_COLOR_GRAY_TEXT);
|
: 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
|
? OFFSET_ADVANCED
|
||||||
: 0), StringUtil.DECIMAL_COLOR_GRAY_TEXT);
|
: 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
|
? OFFSET_ADVANCED
|
||||||
: 0), StringUtil.DECIMAL_COLOR_GRAY_TEXT);
|
: 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
|
? OFFSET_ADVANCED
|
||||||
: 0), StringUtil.DECIMAL_COLOR_WHITE);
|
: 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
|
? OFFSET_ADVANCED
|
||||||
: 0), StringUtil.DECIMAL_COLOR_WHITE);
|
: 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
|
? OFFSET_ADVANCED
|
||||||
: 0), StringUtil.DECIMAL_COLOR_WHITE);
|
: 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
|
? OFFSET_ADVANCED
|
||||||
: 0), StringUtil.DECIMAL_COLOR_WHITE);
|
: 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()) {
|
if (!field.getText().isEmpty()) {
|
||||||
this.sendPacket(this.parse(field.getText()), sendInt);
|
this.sendPacket(this.parse(field.getText()), sendInt);
|
||||||
field.setText("");
|
field.setText("");
|
||||||
|
@ -262,7 +262,7 @@ public class GuiInputter extends GuiWtfMojang<ContainerInputter> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(GuiButton button) {
|
public void actionPerformed(Button button) {
|
||||||
if (button.id == TileEntityInputter.OKAY_BUTTON_ID) {
|
if (button.id == TileEntityInputter.OKAY_BUTTON_ID) {
|
||||||
this.setVariable(this.fieldPutStart, 0);
|
this.setVariable(this.fieldPutStart, 0);
|
||||||
this.setVariable(this.fieldPutEnd, 1);
|
this.setVariable(this.fieldPutEnd, 1);
|
||||||
|
@ -320,7 +320,7 @@ public class GuiInputter extends GuiWtfMojang<ContainerInputter> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
public static class TinyButton extends GuiButton {
|
public static class TinyButton extends Button {
|
||||||
|
|
||||||
public final ResourceLocation resLoc = AssetUtil.getGuiLocation("gui_inputter");
|
public final ResourceLocation resLoc = AssetUtil.getGuiLocation("gui_inputter");
|
||||||
|
|
||||||
|
|
|
@ -57,8 +57,8 @@ public class GuiLaserRelayItemWhitelist extends GuiWtfMojang<ContainerLaserRelay
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initGui() {
|
public void init() {
|
||||||
super.initGui();
|
super.init();
|
||||||
|
|
||||||
this.leftFilter = new FilterSettingsGui(this.tile.leftFilter, this.guiLeft + 3, this.guiTop + 6, this.buttonList);
|
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);
|
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()) {
|
if (this.buttonSmartWhitelistLeft.isMouseOver() || this.buttonSmartWhitelistRight.isMouseOver()) {
|
||||||
List<String> list = new ArrayList<>();
|
List<String> list = new ArrayList<>();
|
||||||
list.add(TextFormatting.BOLD + StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.smart"));
|
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);
|
this.drawHoveringText(list, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,12 +91,12 @@ public class GuiLaserRelayItemWhitelist extends GuiWtfMojang<ContainerLaserRelay
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
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 s1 = StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.inbound");
|
||||||
String s2 = StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.outbound");
|
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.font.drawString(s1, 46 - this.font.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(s2, 131 - this.font.getStringWidth(s2) / 2, 80, StringUtil.DECIMAL_COLOR_GRAY_TEXT);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -37,19 +37,19 @@ public class GuiMiner extends GuiWtfMojang<ContainerMiner> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initGui() {
|
public void init() {
|
||||||
super.initGui();
|
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);
|
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);
|
this.addButton(buttonReset);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
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
|
@Override
|
||||||
|
@ -65,11 +65,11 @@ public class GuiMiner extends GuiWtfMojang<ContainerMiner> {
|
||||||
String mining = this.miner.onlyMineOres
|
String mining = this.miner.onlyMineOres
|
||||||
? "Only Mining Ores"
|
? "Only Mining Ores"
|
||||||
: "Mining Everything";
|
: "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
|
@Override
|
||||||
public void actionPerformed(GuiButton button) {
|
public void actionPerformed(Button button) {
|
||||||
PacketHandlerHelper.sendButtonPacket(this.miner, button.id);
|
PacketHandlerHelper.sendButtonPacket(this.miner, button.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,8 +40,8 @@ public class GuiOilGenerator extends GuiWtfMojang<ContainerOilGenerator> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initGui() {
|
public void init() {
|
||||||
super.initGui();
|
super.init();
|
||||||
this.energy = new EnergyDisplay(this.guiLeft + 42, this.guiTop + 5, this.generator.storage);
|
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);
|
this.fluid = new FluidDisplay(this.guiLeft + 116, this.guiTop + 5, this.generator.tank);
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ public class GuiOilGenerator extends GuiWtfMojang<ContainerOilGenerator> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
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
|
@Override
|
||||||
|
@ -74,12 +74,12 @@ public class GuiOilGenerator extends GuiWtfMojang<ContainerOilGenerator> {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.generator.maxBurnTime > 0 && this.generator.currentEnergyProduce > 0) {
|
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.font, 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, "for " + this.generator.maxBurnTime + " t", this.guiLeft + 87, this.guiTop + 75, 0xFFFFFF);
|
||||||
GlStateManager.pushMatrix();
|
GlStateManager.pushMatrix();
|
||||||
GlStateManager.scale(0.75, 0.75, 1);
|
GlStateManager.scale(0.75, 0.75, 1);
|
||||||
float xS = (this.guiLeft + 87) * 1.365F - this.fontRenderer.getStringWidth("(per 50 mB)") / 2F;
|
float xS = (this.guiLeft + 87) * 1.365F - this.font.getStringWidth("(per 50 mB)") / 2F;
|
||||||
StringUtil.renderScaledAsciiString(this.fontRenderer, "(per 50 mB)", xS, (this.guiTop + 85) * 1.345F, 0xFFFFFF, true, 0.75F);
|
StringUtil.renderScaledAsciiString(this.font, "(per 50 mB)", xS, (this.guiTop + 85) * 1.345F, 0xFFFFFF, true, 0.75F);
|
||||||
GlStateManager.popMatrix();
|
GlStateManager.popMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,11 +42,11 @@ public class GuiPhantomPlacer extends GuiWtfMojang<ContainerPhantomPlacer> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initGui() {
|
public void init() {
|
||||||
super.initGui();
|
super.init();
|
||||||
|
|
||||||
if (!this.placer.isBreaker) {
|
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<>();
|
List<String> textList = new ArrayList<>();
|
||||||
textList.add(TextFormatting.GOLD + StringUtil.localize(loc + ".1"));
|
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);
|
this.drawHoveringText(textList, mouseX, mouseY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void actionPerformed(GuiButton button) throws IOException {
|
protected void actionPerformed(Button button) throws IOException {
|
||||||
if (!this.placer.isBreaker) {
|
if (!this.placer.isBreaker) {
|
||||||
PacketHandlerHelper.sendButtonPacket(this.placer, button.id);
|
PacketHandlerHelper.sendButtonPacket(this.placer, button.id);
|
||||||
}
|
}
|
||||||
|
@ -86,7 +86,7 @@ public class GuiPhantomPlacer extends GuiWtfMojang<ContainerPhantomPlacer> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
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
|
@Override
|
||||||
|
|
|
@ -38,8 +38,8 @@ public class GuiRangedCollector extends GuiWtfMojang<ContainerRangedCollector> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initGui() {
|
public void init() {
|
||||||
super.initGui();
|
super.init();
|
||||||
|
|
||||||
this.filter = new FilterSettingsGui(this.collector.filter, this.guiLeft + 3, this.guiTop + 6, this.buttonList);
|
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
|
@Override
|
||||||
public void drawGuiContainerForegroundLayer(int x, int y) {
|
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
|
@Override
|
||||||
|
@ -75,7 +75,7 @@ public class GuiRangedCollector extends GuiWtfMojang<ContainerRangedCollector> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(GuiButton button) {
|
public void actionPerformed(Button button) {
|
||||||
PacketHandlerHelper.sendButtonPacket(this.collector, button.id);
|
PacketHandlerHelper.sendButtonPacket(this.collector, button.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,8 +36,8 @@
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// @Override
|
// @Override
|
||||||
// public void initGui() {
|
// public void init() {
|
||||||
// super.initGui();
|
// super.init();
|
||||||
// this.energy = new EnergyDisplay(this.guiLeft + 27, this.guiTop + 5, this.tileRepairer.storage);
|
// this.energy = new EnergyDisplay(this.guiLeft + 27, this.guiTop + 5, this.tileRepairer.storage);
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
//
|
//
|
||||||
// @Override
|
// @Override
|
||||||
// public void drawGuiContainerForegroundLayer(int x, int y) {
|
// 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
|
// @Override
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
//import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
|
//import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
|
||||||
//import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
//import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||||
//import net.minecraft.client.Minecraft;
|
//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.nbt.CompoundNBT;
|
||||||
//import net.minecraft.util.ResourceLocation;
|
//import net.minecraft.util.ResourceLocation;
|
||||||
//import net.minecraft.util.text.TextFormatting;
|
//import net.minecraft.util.text.TextFormatting;
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
// private final int z;
|
// private final int z;
|
||||||
// private final World world;
|
// private final World world;
|
||||||
// private final TileEntitySmileyCloud cloud;
|
// private final TileEntitySmileyCloud cloud;
|
||||||
// private GuiTextField nameField;
|
// private TextFieldWidget nameField;
|
||||||
//
|
//
|
||||||
// public GuiSmileyCloud(TileEntityBase tile, int x, int y, int z, World world) {
|
// public GuiSmileyCloud(TileEntityBase tile, int x, int y, int z, World world) {
|
||||||
// super(new ContainerSmileyCloud());
|
// super(new ContainerSmileyCloud());
|
||||||
|
@ -55,10 +55,10 @@
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// @Override
|
// @Override
|
||||||
// public void initGui() {
|
// public void init() {
|
||||||
// super.initGui();
|
// 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.setMaxStringLength(20);
|
||||||
// this.nameField.setEnableBackgroundDrawing(false);
|
// this.nameField.setEnableBackgroundDrawing(false);
|
||||||
// this.nameField.setFocused(true);
|
// this.nameField.setFocused(true);
|
||||||
|
@ -70,7 +70,7 @@
|
||||||
// ? ""
|
// ? ""
|
||||||
// : TextFormatting.GOLD + this.cloud.name + TextFormatting.RESET + " " + StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.the") + " ";
|
// : TextFormatting.GOLD + this.cloud.name + TextFormatting.RESET + " " + StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.the") + " ";
|
||||||
// String localizedName = name + StringUtil.localize("container." + ActuallyAdditions.MODID + ".cloud.name");
|
// 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
|
// @Override
|
||||||
|
@ -108,7 +108,7 @@
|
||||||
// this.nameField.updateCursorCounter();
|
// this.nameField.updateCursorCounter();
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// public void setVariable(GuiTextField field) {
|
// public void setVariable(TextFieldWidget field) {
|
||||||
// this.sendPacket(field.getText(), 0);
|
// this.sendPacket(field.getText(), 0);
|
||||||
// field.setText("");
|
// 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<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<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<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<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<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));
|
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;
|
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.inventory.ContainerFurnaceDouble;
|
||||||
import de.ellpeck.actuallyadditions.mod.network.gui.IButtonReactor;
|
import de.ellpeck.actuallyadditions.mod.network.gui.IButtonReactor;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA;
|
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.ItemStack;
|
||||||
import net.minecraft.item.crafting.FurnaceRecipe;
|
import net.minecraft.item.crafting.FurnaceRecipe;
|
||||||
import net.minecraft.nbt.CompoundNBT;
|
import net.minecraft.nbt.CompoundNBT;
|
||||||
|
import net.minecraft.state.properties.BlockStateProperties;
|
||||||
import net.minecraft.util.Direction;
|
import net.minecraft.util.Direction;
|
||||||
import net.minecraft.util.datafix.fixes.FurnaceRecipes;
|
import net.minecraft.util.datafix.fixes.FurnaceRecipes;
|
||||||
import net.minecraft.util.text.ITextComponent;
|
import net.minecraft.util.text.ITextComponent;
|
||||||
|
@ -150,7 +150,7 @@ public class TileEntityFurnaceDouble extends TileEntityInventoryBase implements
|
||||||
}
|
}
|
||||||
|
|
||||||
BlockState currState = this.world.getBlockState(this.pos);
|
BlockState currState = this.world.getBlockState(this.pos);
|
||||||
boolean current = currState.get(BlockFurnaceDouble.IS_ON);
|
boolean current = currState.get(BlockStateProperties.LIT);
|
||||||
boolean changeTo = current;
|
boolean changeTo = current;
|
||||||
if (this.lastSmelted != smelted) {
|
if (this.lastSmelted != smelted) {
|
||||||
changeTo = smelted;
|
changeTo = smelted;
|
||||||
|
@ -163,7 +163,7 @@ public class TileEntityFurnaceDouble extends TileEntityInventoryBase implements
|
||||||
}
|
}
|
||||||
|
|
||||||
if (changeTo != current) {
|
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;
|
this.lastSmelted = smelted;
|
||||||
|
|
Loading…
Reference in a new issue