diff --git a/changelog.txt b/changelog.txt index 1cd7fab..0ffd82e 100644 --- a/changelog.txt +++ b/changelog.txt @@ -196,6 +196,7 @@ Added Player Head Temples and Giant Grass Blocks (must be enabled from the config) Crystals can no longer generate on top of liquids Improved world generation in the Deep Underground + 1.1.1: Fixed a bug with diamond crystal generating in the deep void and deep underground @@ -205,3 +206,9 @@ Liquid Redstone now generate underground in lakes Added Glowing Ice Optimized the DU and DV chunk generators + +1.2.1: + Fixed a bug with custom fences not connecting to vanilla fences + Fixed a model bug with the vanilla and moss stone furnaces + Fixed the void furnace item showing up as a blank space + Added crafting recipe for black dye diff --git a/modpack usage.txt b/modpack usage.txt new file mode 100644 index 0000000..b6d1f73 --- /dev/null +++ b/modpack usage.txt @@ -0,0 +1 @@ +This mod/plugin is free software. Do whatever the hell you want with just as long as you publish any modified code. This mod may be redistributed in any mod pack you desire. diff --git a/src/main/java/com/NetherNoah/ParadiseMod/CustomBlockCode/CustomWall.java b/src/main/java/com/NetherNoah/ParadiseMod/CustomBlockCode/CustomWall.java index b6a2168..0404161 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/CustomBlockCode/CustomWall.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/CustomBlockCode/CustomWall.java @@ -53,30 +53,20 @@ public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, World world public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List collidingBoxes, @Nullable Entity entityIn, boolean p_185477_7_) { if (!p_185477_7_) - { state = this.getActualState(state, worldIn, pos); - } addCollisionBoxToList(pos, entityBox, collidingBoxes, CLIP_AABB_BY_INDEX[getAABBIndex(state)]); } private static int getAABBIndex(IBlockState state) { int i = 0; if (state.getValue(NORTH).booleanValue()) - { i |= 1 << EnumFacing.NORTH.getHorizontalIndex(); - } if (state.getValue(EAST).booleanValue()) - { i |= 1 << EnumFacing.EAST.getHorizontalIndex(); - } if (state.getValue(SOUTH).booleanValue()) - { i |= 1 << EnumFacing.SOUTH.getHorizontalIndex(); - } if (state.getValue(WEST).booleanValue()) - { i |= 1 << EnumFacing.WEST.getHorizontalIndex(); - } return i; } @Override @@ -98,7 +88,7 @@ private boolean canConnectTo(IBlockAccess worldIn, BlockPos pos) { IBlockState iblockstate = worldIn.getBlockState(pos); Block block = iblockstate.getBlock(); - return block == Blocks.BARRIER || block == this || block instanceof BlockWall || block instanceof CustomWall || block instanceof BlockFenceGate || block instanceof BlockFence || (block.isOpaqueCube(iblockstate) && iblockstate.isFullCube()); + return block == Blocks.BARRIER || block == this || block instanceof BlockWall || block instanceof CustomWall || block instanceof BlockFenceGate || block instanceof BlockFence || block instanceof RSFenceGate||(block.isOpaqueCube(iblockstate) && iblockstate.isFullCube()); } @Override @SideOnly(Side.CLIENT) diff --git a/src/main/java/com/NetherNoah/ParadiseMod/CustomBlockCode/CustomWorkBench.java b/src/main/java/com/NetherNoah/ParadiseMod/CustomBlockCode/CustomWorkBench.java index 3a16857..7c08aca 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/CustomBlockCode/CustomWorkBench.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/CustomBlockCode/CustomWorkBench.java @@ -30,9 +30,7 @@ public CustomWorkBench() public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) { if (worldIn.isRemote) - { return true; - } else { playerIn.openGui(ParadiseMod.instance, Reference.GUI_CUSTOM_WORKBENCH, worldIn, 0, 0, 0); diff --git a/src/main/java/com/NetherNoah/ParadiseMod/CustomBlockCode/MossyFurnaceCode.java b/src/main/java/com/NetherNoah/ParadiseMod/CustomBlockCode/MossyFurnaceCode.java index 827855f..e732a1b 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/CustomBlockCode/MossyFurnaceCode.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/CustomBlockCode/MossyFurnaceCode.java @@ -65,21 +65,13 @@ private void setDefaultFacing(World worldIn, BlockPos pos, IBlockState state) IBlockState iblockstate3 = worldIn.getBlockState(pos.east()); EnumFacing enumfacing = state.getValue(FACING); if (enumfacing == EnumFacing.NORTH && iblockstate.isFullBlock() && !iblockstate1.isFullBlock()) - { enumfacing = EnumFacing.SOUTH; - } else if (enumfacing == EnumFacing.SOUTH && iblockstate1.isFullBlock() && !iblockstate.isFullBlock()) - { enumfacing = EnumFacing.NORTH; - } else if (enumfacing == EnumFacing.WEST && iblockstate2.isFullBlock() && !iblockstate3.isFullBlock()) - { enumfacing = EnumFacing.EAST; - } else if (enumfacing == EnumFacing.EAST && iblockstate3.isFullBlock() && !iblockstate2.isFullBlock()) - { enumfacing = EnumFacing.WEST; - } worldIn.setBlockState(pos, state.withProperty(FACING, enumfacing), 2); } } @@ -97,9 +89,7 @@ public void randomDisplayTick(IBlockState stateIn, World worldIn, BlockPos pos, double d3 = 0.52D; double d4 = rand.nextDouble() * 0.6D - 0.3D; if (rand.nextDouble() < 0.1D) - { worldIn.playSound(pos.getX() + 0.5D, pos.getY(), pos.getZ() + 0.5D, SoundEvents.BLOCK_FURNACE_FIRE_CRACKLE, SoundCategory.BLOCKS, 1.0F, 1.0F, false); - } switch (enumfacing) { case WEST: @@ -124,9 +114,7 @@ public void randomDisplayTick(IBlockState stateIn, World worldIn, BlockPos pos, public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) { if (worldIn.isRemote) - { return true; - } else { TileEntity tileentity = worldIn.getTileEntity(pos); @@ -178,9 +166,7 @@ public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, Enti { TileEntity tileentity = worldIn.getTileEntity(pos); if (tileentity instanceof TEMossyFurnace) - { ((TEMossyFurnace)tileentity).setCustomInventoryName(stack.getDisplayName()); - } } } @Override @@ -224,9 +210,7 @@ public IBlockState getStateFromMeta(int meta) EnumFacing enumfacing = EnumFacing.getFront(meta); if (enumfacing.getAxis() == EnumFacing.Axis.Y) - { enumfacing = EnumFacing.NORTH; - } return getDefaultState().withProperty(FACING, enumfacing); } @Override diff --git a/src/main/java/com/NetherNoah/ParadiseMod/CustomBlockCode/RSDoor.java b/src/main/java/com/NetherNoah/ParadiseMod/CustomBlockCode/RSDoor.java index 4fd9998..2952187 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/CustomBlockCode/RSDoor.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/CustomBlockCode/RSDoor.java @@ -95,26 +95,18 @@ private int getOpenSound() { return blockMaterial == Material.IRON ? 1005 : 1006; } - //public MapColor getMapColor(IBlockState state) - //{ - // return state.getBlock() == Blocks.IRON_DOOR ? MapColor.IRON : (state.getBlock() == Blocks.OAK_DOOR ? BlockPlanks.EnumType.OAK.getMapColor() : (state.getBlock() == Blocks.SPRUCE_DOOR ? BlockPlanks.EnumType.SPRUCE.getMapColor() : (state.getBlock() == Blocks.BIRCH_DOOR ? BlockPlanks.EnumType.BIRCH.getMapColor() : (state.getBlock() == Blocks.JUNGLE_DOOR ? BlockPlanks.EnumType.JUNGLE.getMapColor() : (state.getBlock() == Blocks.ACACIA_DOOR ? BlockPlanks.EnumType.ACACIA.getMapColor() : (state.getBlock() == Blocks.DARK_OAK_DOOR ? BlockPlanks.EnumType.DARK_OAK.getMapColor() : super.getMapColor(state))))))); - //} @Override public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) { if (blockMaterial == Material.IRON) - { return false; - } else { BlockPos blockpos = state.getValue(HALF) == BlockDoor.EnumDoorHalf.LOWER ? pos : pos.down(); IBlockState iblockstate = pos.equals(blockpos) ? state : worldIn.getBlockState(blockpos); if (iblockstate.getBlock() != this) - { return false; - } else { state = iblockstate.cycleProperty(OPEN); @@ -193,9 +185,7 @@ public void onBlockHarvested(World worldIn, BlockPos pos, IBlockState state, Ent if (state.getValue(HALF) == BlockDoor.EnumDoorHalf.LOWER && worldIn.getBlockState(blockpos1).getBlock() == this) { if (player.capabilities.isCreativeMode) - { worldIn.setBlockToAir(pos); - } worldIn.setBlockToAir(blockpos1); } } @@ -213,18 +203,14 @@ public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, Block IBlockState iblockstate = worldIn.getBlockState(pos.up()); if (iblockstate.getBlock() == this) - { state = state.withProperty(HINGE, iblockstate.getValue(HINGE)).withProperty(POWERED, iblockstate.getValue(POWERED)); - } } else { IBlockState iblockstate1 = worldIn.getBlockState(pos.down()); if (iblockstate1.getBlock() == this) - { state = state.withProperty(FACING, iblockstate1.getValue(FACING)).withProperty(OPEN, iblockstate1.getValue(OPEN)); - } } return state; @@ -252,21 +238,15 @@ public int getMetaFromState(IBlockState state) { i = i | 8; if (state.getValue(HINGE) == BlockDoor.EnumHingePosition.RIGHT) - { i |= 1; - } if (state.getValue(POWERED).booleanValue()) - { i |= 2; - } } else { i = i | state.getValue(FACING).rotateY().getHorizontalIndex(); if (state.getValue(OPEN).booleanValue()) - { i |= 4; - } } return i; } diff --git a/src/main/java/com/NetherNoah/ParadiseMod/CustomBlockCode/RSFenceGate.java b/src/main/java/com/NetherNoah/ParadiseMod/CustomBlockCode/RSFenceGate.java index e2e73aa..9d1c03c 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/CustomBlockCode/RSFenceGate.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/CustomBlockCode/RSFenceGate.java @@ -53,9 +53,7 @@ public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, Block { EnumFacing.Axis enumfacing$axis = state.getValue(FACING).getAxis(); if (enumfacing$axis == EnumFacing.Axis.Z && (canFenceGateConnectTo(worldIn, pos, EnumFacing.WEST) || canFenceGateConnectTo(worldIn, pos, EnumFacing.EAST)) || enumfacing$axis == EnumFacing.Axis.X && (canFenceGateConnectTo(worldIn, pos, EnumFacing.NORTH) || canFenceGateConnectTo(worldIn, pos, EnumFacing.SOUTH))) - { state = state.withProperty(IN_WALL, Boolean.valueOf(true)); - } return state; } @Override @@ -112,9 +110,7 @@ public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, { EnumFacing enumfacing = EnumFacing.fromAngle(playerIn.rotationYaw); if (state.getValue(FACING) == enumfacing.getOpposite()) - { state = state.withProperty(FACING, enumfacing); - } state = state.withProperty(OPEN, Boolean.valueOf(true)); worldIn.setBlockState(pos, state, 10); } @@ -132,13 +128,9 @@ public int getMetaFromState(IBlockState state) int i = 0; i = i | state.getValue(FACING).getHorizontalIndex(); if (state.getValue(POWERED).booleanValue()) - { i |= 8; - } if (state.getValue(OPEN).booleanValue()) - { i |= 4; - } return i; } @Override diff --git a/src/main/java/com/NetherNoah/ParadiseMod/CustomBlockCode/RSTrapdoor.java b/src/main/java/com/NetherNoah/ParadiseMod/CustomBlockCode/RSTrapdoor.java index c8c9558..c4329d6 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/CustomBlockCode/RSTrapdoor.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/CustomBlockCode/RSTrapdoor.java @@ -68,13 +68,9 @@ public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, Bloc } } else if (state.getValue(HALF) == BlockTrapDoor.DoorHalf.TOP) - { axisalignedbb = TOP_AABB; - } else - { axisalignedbb = BOTTOM_AABB; - } return axisalignedbb; } @Override @@ -96,9 +92,7 @@ public boolean isPassable(IBlockAccess worldIn, BlockPos pos) public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) { if (blockMaterial == Material.IRON) - { return false; - } else { state = state.cycleProperty(OPEN); @@ -135,9 +129,7 @@ public IBlockState getStateForPlacement(World worldIn, BlockPos pos, EnumFacing iblockstate = iblockstate.withProperty(HALF, facing == EnumFacing.UP ? BlockTrapDoor.DoorHalf.BOTTOM : BlockTrapDoor.DoorHalf.TOP); } if (worldIn.isBlockPowered(pos)) - { iblockstate = iblockstate.withProperty(OPEN, Boolean.valueOf(true)); - } return iblockstate; } @Override @@ -192,13 +184,9 @@ public int getMetaFromState(IBlockState state) int i = 0; i = i | getMetaForFacing(state.getValue(FACING)); if (state.getValue(OPEN).booleanValue()) - { i |= 4; - } if (state.getValue(HALF) == BlockTrapDoor.DoorHalf.TOP) - { i |= 8; - } return i; } @Override diff --git a/src/main/java/com/NetherNoah/ParadiseMod/CustomBlockCode/RubyPlateCode.java b/src/main/java/com/NetherNoah/ParadiseMod/CustomBlockCode/RubyPlateCode.java index 874bf22..5efbc4d 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/CustomBlockCode/RubyPlateCode.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/CustomBlockCode/RubyPlateCode.java @@ -41,25 +41,17 @@ protected IBlockState setRedstoneStrength(IBlockState state, int strength) protected void playClickOnSound(World worldIn, BlockPos color) { if (blockMaterial == Material.WOOD) - { worldIn.playSound((EntityPlayer)null, color, SoundEvents.BLOCK_WOOD_PRESSPLATE_CLICK_ON, SoundCategory.BLOCKS, 0.3F, 0.8F); - } else - { worldIn.playSound((EntityPlayer)null, color, SoundEvents.BLOCK_STONE_PRESSPLATE_CLICK_ON, SoundCategory.BLOCKS, 0.3F, 0.6F); - } } @Override protected void playClickOffSound(World worldIn, BlockPos pos) { if (blockMaterial == Material.WOOD) - { worldIn.playSound((EntityPlayer)null, pos, SoundEvents.BLOCK_WOOD_PRESSPLATE_CLICK_OFF, SoundCategory.BLOCKS, 0.3F, 0.7F); - } else - { worldIn.playSound((EntityPlayer)null, pos, SoundEvents.BLOCK_STONE_PRESSPLATE_CLICK_OFF, SoundCategory.BLOCKS, 0.3F, 0.5F); - } } @Override protected int computeRedstoneStrength(World worldIn, BlockPos pos) @@ -82,9 +74,7 @@ protected int computeRedstoneStrength(World worldIn, BlockPos pos) for (Entity entity : list) { if (!entity.doesEntityNotTriggerPressurePlate()) - { return 1; - } } } return 0; diff --git a/src/main/java/com/NetherNoah/ParadiseMod/CustomBlockCode/VoidFurnaceCode.java b/src/main/java/com/NetherNoah/ParadiseMod/CustomBlockCode/VoidFurnaceCode.java index 70d1359..6c50f25 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/CustomBlockCode/VoidFurnaceCode.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/CustomBlockCode/VoidFurnaceCode.java @@ -65,21 +65,13 @@ private void setDefaultFacing(World worldIn, BlockPos pos, IBlockState state) IBlockState iblockstate3 = worldIn.getBlockState(pos.east()); EnumFacing enumfacing = state.getValue(FACING); if (enumfacing == EnumFacing.NORTH && iblockstate.isFullBlock() && !iblockstate1.isFullBlock()) - { enumfacing = EnumFacing.SOUTH; - } else if (enumfacing == EnumFacing.SOUTH && iblockstate1.isFullBlock() && !iblockstate.isFullBlock()) - { enumfacing = EnumFacing.NORTH; - } else if (enumfacing == EnumFacing.WEST && iblockstate2.isFullBlock() && !iblockstate3.isFullBlock()) - { enumfacing = EnumFacing.EAST; - } else if (enumfacing == EnumFacing.EAST && iblockstate3.isFullBlock() && !iblockstate2.isFullBlock()) - { enumfacing = EnumFacing.WEST; - } worldIn.setBlockState(pos, state.withProperty(FACING, enumfacing), 2); } } @@ -97,9 +89,7 @@ public void randomDisplayTick(IBlockState stateIn, World worldIn, BlockPos pos, double d3 = 0.52D; double d4 = rand.nextDouble() * 0.6D - 0.3D; if (rand.nextDouble() < 0.1D) - { worldIn.playSound(pos.getX() + 0.5D, pos.getY(), pos.getZ() + 0.5D, SoundEvents.BLOCK_FURNACE_FIRE_CRACKLE, SoundCategory.BLOCKS, 1.0F, 1.0F, false); - } switch (enumfacing) { case WEST: @@ -124,9 +114,7 @@ public void randomDisplayTick(IBlockState stateIn, World worldIn, BlockPos pos, public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) { if (worldIn.isRemote) - { return true; - } else { TileEntity tileentity = worldIn.getTileEntity(pos); @@ -178,9 +166,7 @@ public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, Enti { TileEntity tileentity = worldIn.getTileEntity(pos); if (tileentity instanceof TEVoidFurnace) - { ((TEVoidFurnace)tileentity).setCustomInventoryName(stack.getDisplayName()); - } } } @Override @@ -224,9 +210,7 @@ public IBlockState getStateFromMeta(int meta) EnumFacing enumfacing = EnumFacing.getFront(meta); if (enumfacing.getAxis() == EnumFacing.Axis.Y) - { enumfacing = EnumFacing.NORTH; - } return getDefaultState().withProperty(FACING, enumfacing); } @Override diff --git a/src/main/java/com/NetherNoah/ParadiseMod/CustomBlockCode/xmasTree.java b/src/main/java/com/NetherNoah/ParadiseMod/CustomBlockCode/xmasTree.java index c660059..28bf9e9 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/CustomBlockCode/xmasTree.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/CustomBlockCode/xmasTree.java @@ -54,21 +54,15 @@ public void updateTick(World worldIn, BlockPos pos, IBlockState state, Random ra { super.updateTick(worldIn, pos, state, rand); if (worldIn.getLightFromNeighbors(pos.up()) >= 9 && rand.nextInt(7) == 0) - { grow(worldIn, pos, state, rand); - } } } public void grow(World worldIn, BlockPos pos, IBlockState state, Random rand) { if (state.getValue(STAGE).intValue() == 0) - { worldIn.setBlockState(pos, state.cycleProperty(STAGE), 4); - } else - { generateTree(worldIn, pos, state, rand); - } } public void generateTree(World worldIn, BlockPos pos, IBlockState state, Random rand) { @@ -123,9 +117,7 @@ public void generateTree(World worldIn, BlockPos pos, IBlockState state, Random worldIn.setBlockState(pos.add(i + 1, 0, j + 1), state, 4); } else - { worldIn.setBlockState(pos, state, 4); - } } } private boolean isTwoByTwoOfType(World worldIn, BlockPos pos, int p_181624_3_, int p_181624_4_, planks.EnumType type) diff --git a/src/main/java/com/NetherNoah/ParadiseMod/GUI/ContainerCustomCraftBench.java b/src/main/java/com/NetherNoah/ParadiseMod/GUI/ContainerCustomCraftBench.java index 39a5bfb..4becc18 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/GUI/ContainerCustomCraftBench.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/GUI/ContainerCustomCraftBench.java @@ -19,29 +19,26 @@ public ItemStack transferStackInSlot(EntityPlayer player, int slotIndex) { ItemStack slotStack = slot.getStack(); stack = slotStack.copy(); if (slotIndex == 0) { - if (!mergeItemStack(slotStack, 10, 46, true)) { + if (!mergeItemStack(slotStack, 10, 46, true)) return ItemStack.EMPTY; - } slot.onSlotChange(slotStack, stack); - } else if (slotIndex >= 10 && slotIndex < 37) { - if (!mergeItemStack(slotStack, 1, 10, false)) { + } + else if (slotIndex >= 10 && slotIndex < 37) { + if (!mergeItemStack(slotStack, 1, 10, false)) return ItemStack.EMPTY; - } - } else if (slotIndex >= 37 && slotIndex < 46) { - if (!mergeItemStack(slotStack, 1, 10, false)) { + } + else if (slotIndex >= 37 && slotIndex < 46) { + if (!mergeItemStack(slotStack, 1, 10, false)) return ItemStack.EMPTY; - } - } else if (!mergeItemStack(slotStack, 10, 46, false)) { - return ItemStack.EMPTY; } - if (slotStack.isEmpty()) { + else if (!mergeItemStack(slotStack, 10, 46, false)) + return ItemStack.EMPTY; + if (slotStack.isEmpty()) slot.putStack(ItemStack.EMPTY); - } else { + else slot.onSlotChanged(); - } - if (slotStack.getCount() == stack.getCount()) { + if (slotStack.getCount() == stack.getCount()) return ItemStack.EMPTY; - } slot.onTake(player, slotStack); } return stack; diff --git a/src/main/java/com/NetherNoah/ParadiseMod/GUI/CustomCraftBenchGui.java b/src/main/java/com/NetherNoah/ParadiseMod/GUI/CustomCraftBenchGui.java index a6bf4a5..c4dbb52 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/GUI/CustomCraftBenchGui.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/GUI/CustomCraftBenchGui.java @@ -8,5 +8,4 @@ public class CustomCraftBenchGui extends GuiCrafting { public CustomCraftBenchGui(InventoryPlayer playerInv, World worldIn) { super(playerInv, worldIn); } - } \ No newline at end of file diff --git a/src/main/java/com/NetherNoah/ParadiseMod/blocks/buttons/IronButton.java b/src/main/java/com/NetherNoah/ParadiseMod/blocks/buttons/IronButton.java index 5995946..18e326a 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/blocks/buttons/IronButton.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/blocks/buttons/IronButton.java @@ -25,7 +25,6 @@ protected void playClickSound(@Nullable EntityPlayer player, World worldIn, Bloc } @Override protected void playReleaseSound(World worldIn, BlockPos pos) { - worldIn.playSound((EntityPlayer) null, pos, SoundEvents.BLOCK_WOOD_BUTTON_CLICK_OFF, SoundCategory.BLOCKS, 0.3F, - 0.5F); + worldIn.playSound((EntityPlayer) null, pos, SoundEvents.BLOCK_WOOD_BUTTON_CLICK_OFF, SoundCategory.BLOCKS, 0.3F,0.5F); } } \ No newline at end of file diff --git a/src/main/java/com/NetherNoah/ParadiseMod/blocks/fenceGates/BrickFenceGate.java b/src/main/java/com/NetherNoah/ParadiseMod/blocks/fenceGates/BrickFenceGate.java index d86d22d..2a01e39 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/blocks/fenceGates/BrickFenceGate.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/blocks/fenceGates/BrickFenceGate.java @@ -1,8 +1,18 @@ package com.NetherNoah.ParadiseMod.blocks.fenceGates; +import com.NetherNoah.ParadiseMod.CustomBlockCode.CustomWall; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockFence; import net.minecraft.block.BlockFenceGate; import net.minecraft.block.BlockPlanks; +import net.minecraft.block.BlockWall; +import net.minecraft.block.state.BlockFaceShape; +import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockAccess; public class BrickFenceGate extends BlockFenceGate { public BrickFenceGate() { @@ -14,4 +24,28 @@ public BrickFenceGate() { setCreativeTab(CreativeTabs.REDSTONE); setHarvestLevel("pickaxe", 0); } + @Override + public boolean canBeConnectedTo(IBlockAccess world, BlockPos pos, EnumFacing facing) + { + IBlockState state = world.getBlockState(pos); + if (state.getBlock() instanceof BlockFenceGate && + state.getBlockFaceShape(world, pos, facing) == BlockFaceShape.MIDDLE_POLE) + { + Block connector = world.getBlockState(pos.offset(facing)).getBlock(); + return connector instanceof BlockFence || connector instanceof BlockWall || connector instanceof CustomWall; + } + return false; + } + + @Override + public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, BlockPos pos) + { + EnumFacing.Axis enumfacing$axis = ((EnumFacing)state.getValue(FACING)).getAxis(); + + if (enumfacing$axis == EnumFacing.Axis.Z && (worldIn.getBlockState(pos.west()).getBlock() instanceof BlockWall || worldIn.getBlockState(pos.east()).getBlock() instanceof BlockWall) || enumfacing$axis == EnumFacing.Axis.X && (worldIn.getBlockState(pos.north()).getBlock() instanceof BlockWall || worldIn.getBlockState(pos.south()).getBlock() instanceof BlockWall)) + state = state.withProperty(IN_WALL, Boolean.valueOf(true)); + else if (enumfacing$axis == EnumFacing.Axis.Z && (worldIn.getBlockState(pos.west()).getBlock() instanceof CustomWall || worldIn.getBlockState(pos.east()).getBlock() instanceof CustomWall) || enumfacing$axis == EnumFacing.Axis.X && (worldIn.getBlockState(pos.north()).getBlock() instanceof CustomWall || worldIn.getBlockState(pos.south()).getBlock() instanceof CustomWall)) + state = state.withProperty(IN_WALL, Boolean.valueOf(true)); + return state; + } } \ No newline at end of file diff --git a/src/main/java/com/NetherNoah/ParadiseMod/blocks/fenceGates/CactusFenceGate.java b/src/main/java/com/NetherNoah/ParadiseMod/blocks/fenceGates/CactusFenceGate.java index 8cb9268..9f610cb 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/blocks/fenceGates/CactusFenceGate.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/blocks/fenceGates/CactusFenceGate.java @@ -1,9 +1,19 @@ package com.NetherNoah.ParadiseMod.blocks.fenceGates; +import com.NetherNoah.ParadiseMod.CustomBlockCode.CustomWall; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockFence; import net.minecraft.block.BlockFenceGate; import net.minecraft.block.BlockPlanks; +import net.minecraft.block.BlockWall; import net.minecraft.block.SoundType; +import net.minecraft.block.state.BlockFaceShape; +import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockAccess; public class CactusFenceGate extends BlockFenceGate { public CactusFenceGate() { @@ -15,4 +25,28 @@ public CactusFenceGate() { setCreativeTab(CreativeTabs.REDSTONE); setSoundType(SoundType.WOOD); } + @Override + public boolean canBeConnectedTo(IBlockAccess world, BlockPos pos, EnumFacing facing) + { + IBlockState state = world.getBlockState(pos); + if (state.getBlock() instanceof BlockFenceGate && + state.getBlockFaceShape(world, pos, facing) == BlockFaceShape.MIDDLE_POLE) + { + Block connector = world.getBlockState(pos.offset(facing)).getBlock(); + return connector instanceof BlockFence || connector instanceof BlockWall || connector instanceof CustomWall; + } + return false; + } + + @Override + public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, BlockPos pos) + { + EnumFacing.Axis enumfacing$axis = ((EnumFacing)state.getValue(FACING)).getAxis(); + + if (enumfacing$axis == EnumFacing.Axis.Z && (worldIn.getBlockState(pos.west()).getBlock() instanceof BlockWall || worldIn.getBlockState(pos.east()).getBlock() instanceof BlockWall) || enumfacing$axis == EnumFacing.Axis.X && (worldIn.getBlockState(pos.north()).getBlock() instanceof BlockWall || worldIn.getBlockState(pos.south()).getBlock() instanceof BlockWall)) + state = state.withProperty(IN_WALL, Boolean.valueOf(true)); + else if (enumfacing$axis == EnumFacing.Axis.Z && (worldIn.getBlockState(pos.west()).getBlock() instanceof CustomWall || worldIn.getBlockState(pos.east()).getBlock() instanceof CustomWall) || enumfacing$axis == EnumFacing.Axis.X && (worldIn.getBlockState(pos.north()).getBlock() instanceof CustomWall || worldIn.getBlockState(pos.south()).getBlock() instanceof CustomWall)) + state = state.withProperty(IN_WALL, Boolean.valueOf(true)); + return state; + } } \ No newline at end of file diff --git a/src/main/java/com/NetherNoah/ParadiseMod/blocks/fenceGates/DiamondFenceGate.java b/src/main/java/com/NetherNoah/ParadiseMod/blocks/fenceGates/DiamondFenceGate.java index 1093bce..e0bf306 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/blocks/fenceGates/DiamondFenceGate.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/blocks/fenceGates/DiamondFenceGate.java @@ -1,9 +1,19 @@ package com.NetherNoah.ParadiseMod.blocks.fenceGates; +import com.NetherNoah.ParadiseMod.CustomBlockCode.CustomWall; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockFence; import net.minecraft.block.BlockFenceGate; import net.minecraft.block.BlockPlanks; +import net.minecraft.block.BlockWall; import net.minecraft.block.SoundType; +import net.minecraft.block.state.BlockFaceShape; +import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockAccess; public class DiamondFenceGate extends BlockFenceGate { public DiamondFenceGate() { @@ -16,4 +26,28 @@ public DiamondFenceGate() { setSoundType(SoundType.METAL); setHarvestLevel("pickaxe", 2); } + @Override + public boolean canBeConnectedTo(IBlockAccess world, BlockPos pos, EnumFacing facing) + { + IBlockState state = world.getBlockState(pos); + if (state.getBlock() instanceof BlockFenceGate && + state.getBlockFaceShape(world, pos, facing) == BlockFaceShape.MIDDLE_POLE) + { + Block connector = world.getBlockState(pos.offset(facing)).getBlock(); + return connector instanceof BlockFence || connector instanceof BlockWall || connector instanceof CustomWall; + } + return false; + } + + @Override + public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, BlockPos pos) + { + EnumFacing.Axis enumfacing$axis = ((EnumFacing)state.getValue(FACING)).getAxis(); + + if (enumfacing$axis == EnumFacing.Axis.Z && (worldIn.getBlockState(pos.west()).getBlock() instanceof BlockWall || worldIn.getBlockState(pos.east()).getBlock() instanceof BlockWall) || enumfacing$axis == EnumFacing.Axis.X && (worldIn.getBlockState(pos.north()).getBlock() instanceof BlockWall || worldIn.getBlockState(pos.south()).getBlock() instanceof BlockWall)) + state = state.withProperty(IN_WALL, Boolean.valueOf(true)); + else if (enumfacing$axis == EnumFacing.Axis.Z && (worldIn.getBlockState(pos.west()).getBlock() instanceof CustomWall || worldIn.getBlockState(pos.east()).getBlock() instanceof CustomWall) || enumfacing$axis == EnumFacing.Axis.X && (worldIn.getBlockState(pos.north()).getBlock() instanceof CustomWall || worldIn.getBlockState(pos.south()).getBlock() instanceof CustomWall)) + state = state.withProperty(IN_WALL, Boolean.valueOf(true)); + return state; + } } \ No newline at end of file diff --git a/src/main/java/com/NetherNoah/ParadiseMod/blocks/fenceGates/EmeraldFenceGate.java b/src/main/java/com/NetherNoah/ParadiseMod/blocks/fenceGates/EmeraldFenceGate.java index bb99421..4cdda1a 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/blocks/fenceGates/EmeraldFenceGate.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/blocks/fenceGates/EmeraldFenceGate.java @@ -1,9 +1,19 @@ package com.NetherNoah.ParadiseMod.blocks.fenceGates; +import com.NetherNoah.ParadiseMod.CustomBlockCode.CustomWall; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockFence; import net.minecraft.block.BlockFenceGate; import net.minecraft.block.BlockPlanks; +import net.minecraft.block.BlockWall; import net.minecraft.block.SoundType; +import net.minecraft.block.state.BlockFaceShape; +import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockAccess; public class EmeraldFenceGate extends BlockFenceGate { public EmeraldFenceGate() { @@ -16,4 +26,28 @@ public EmeraldFenceGate() { setSoundType(SoundType.METAL); setHarvestLevel("pickaxe", 2); } + @Override + public boolean canBeConnectedTo(IBlockAccess world, BlockPos pos, EnumFacing facing) + { + IBlockState state = world.getBlockState(pos); + if (state.getBlock() instanceof BlockFenceGate && + state.getBlockFaceShape(world, pos, facing) == BlockFaceShape.MIDDLE_POLE) + { + Block connector = world.getBlockState(pos.offset(facing)).getBlock(); + return connector instanceof BlockFence || connector instanceof BlockWall || connector instanceof CustomWall; + } + return false; + } + + @Override + public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, BlockPos pos) + { + EnumFacing.Axis enumfacing$axis = ((EnumFacing)state.getValue(FACING)).getAxis(); + + if (enumfacing$axis == EnumFacing.Axis.Z && (worldIn.getBlockState(pos.west()).getBlock() instanceof BlockWall || worldIn.getBlockState(pos.east()).getBlock() instanceof BlockWall) || enumfacing$axis == EnumFacing.Axis.X && (worldIn.getBlockState(pos.north()).getBlock() instanceof BlockWall || worldIn.getBlockState(pos.south()).getBlock() instanceof BlockWall)) + state = state.withProperty(IN_WALL, Boolean.valueOf(true)); + else if (enumfacing$axis == EnumFacing.Axis.Z && (worldIn.getBlockState(pos.west()).getBlock() instanceof CustomWall || worldIn.getBlockState(pos.east()).getBlock() instanceof CustomWall) || enumfacing$axis == EnumFacing.Axis.X && (worldIn.getBlockState(pos.north()).getBlock() instanceof CustomWall || worldIn.getBlockState(pos.south()).getBlock() instanceof CustomWall)) + state = state.withProperty(IN_WALL, Boolean.valueOf(true)); + return state; + } } \ No newline at end of file diff --git a/src/main/java/com/NetherNoah/ParadiseMod/blocks/fenceGates/GoldFenceGate.java b/src/main/java/com/NetherNoah/ParadiseMod/blocks/fenceGates/GoldFenceGate.java index 712d8b1..8def8a9 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/blocks/fenceGates/GoldFenceGate.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/blocks/fenceGates/GoldFenceGate.java @@ -1,9 +1,19 @@ package com.NetherNoah.ParadiseMod.blocks.fenceGates; +import com.NetherNoah.ParadiseMod.CustomBlockCode.CustomWall; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockFence; import net.minecraft.block.BlockFenceGate; import net.minecraft.block.BlockPlanks; +import net.minecraft.block.BlockWall; import net.minecraft.block.SoundType; +import net.minecraft.block.state.BlockFaceShape; +import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockAccess; public class GoldFenceGate extends BlockFenceGate { public GoldFenceGate() { @@ -16,4 +26,27 @@ public GoldFenceGate() { setSoundType(SoundType.METAL); setHarvestLevel("pickaxe", 2); } + @Override + public boolean canBeConnectedTo(IBlockAccess world, BlockPos pos, EnumFacing facing) + { + IBlockState state = world.getBlockState(pos); + if (state.getBlock() instanceof BlockFenceGate && + state.getBlockFaceShape(world, pos, facing) == BlockFaceShape.MIDDLE_POLE) + { + Block connector = world.getBlockState(pos.offset(facing)).getBlock(); + return connector instanceof BlockFence || connector instanceof BlockWall || connector instanceof CustomWall; + } + return false; + } + @Override + public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, BlockPos pos) + { + EnumFacing.Axis enumfacing$axis = ((EnumFacing)state.getValue(FACING)).getAxis(); + + if (enumfacing$axis == EnumFacing.Axis.Z && (worldIn.getBlockState(pos.west()).getBlock() instanceof BlockWall || worldIn.getBlockState(pos.east()).getBlock() instanceof BlockWall) || enumfacing$axis == EnumFacing.Axis.X && (worldIn.getBlockState(pos.north()).getBlock() instanceof BlockWall || worldIn.getBlockState(pos.south()).getBlock() instanceof BlockWall)) + state = state.withProperty(IN_WALL, Boolean.valueOf(true)); + else if (enumfacing$axis == EnumFacing.Axis.Z && (worldIn.getBlockState(pos.west()).getBlock() instanceof CustomWall || worldIn.getBlockState(pos.east()).getBlock() instanceof CustomWall) || enumfacing$axis == EnumFacing.Axis.X && (worldIn.getBlockState(pos.north()).getBlock() instanceof CustomWall || worldIn.getBlockState(pos.south()).getBlock() instanceof CustomWall)) + state = state.withProperty(IN_WALL, Boolean.valueOf(true)); + return state; + } } \ No newline at end of file diff --git a/src/main/java/com/NetherNoah/ParadiseMod/blocks/fenceGates/IronFenceGate.java b/src/main/java/com/NetherNoah/ParadiseMod/blocks/fenceGates/IronFenceGate.java index 09c5023..4b0bc7e 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/blocks/fenceGates/IronFenceGate.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/blocks/fenceGates/IronFenceGate.java @@ -1,9 +1,19 @@ package com.NetherNoah.ParadiseMod.blocks.fenceGates; +import com.NetherNoah.ParadiseMod.CustomBlockCode.CustomWall; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockFence; import net.minecraft.block.BlockFenceGate; import net.minecraft.block.BlockPlanks; +import net.minecraft.block.BlockWall; import net.minecraft.block.SoundType; +import net.minecraft.block.state.BlockFaceShape; +import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockAccess; public class IronFenceGate extends BlockFenceGate { public IronFenceGate() { @@ -16,4 +26,27 @@ public IronFenceGate() { setSoundType(SoundType.METAL); setHarvestLevel("pickaxe", 1); } + @Override + public boolean canBeConnectedTo(IBlockAccess world, BlockPos pos, EnumFacing facing) + { + IBlockState state = world.getBlockState(pos); + if (state.getBlock() instanceof BlockFenceGate && + state.getBlockFaceShape(world, pos, facing) == BlockFaceShape.MIDDLE_POLE) + { + Block connector = world.getBlockState(pos.offset(facing)).getBlock(); + return connector instanceof BlockFence || connector instanceof BlockWall || connector instanceof CustomWall; + } + return false; + } + @Override + public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, BlockPos pos) + { + EnumFacing.Axis enumfacing$axis = ((EnumFacing)state.getValue(FACING)).getAxis(); + + if (enumfacing$axis == EnumFacing.Axis.Z && (worldIn.getBlockState(pos.west()).getBlock() instanceof BlockWall || worldIn.getBlockState(pos.east()).getBlock() instanceof BlockWall) || enumfacing$axis == EnumFacing.Axis.X && (worldIn.getBlockState(pos.north()).getBlock() instanceof BlockWall || worldIn.getBlockState(pos.south()).getBlock() instanceof BlockWall)) + state = state.withProperty(IN_WALL, Boolean.valueOf(true)); + else if (enumfacing$axis == EnumFacing.Axis.Z && (worldIn.getBlockState(pos.west()).getBlock() instanceof CustomWall || worldIn.getBlockState(pos.east()).getBlock() instanceof CustomWall) || enumfacing$axis == EnumFacing.Axis.X && (worldIn.getBlockState(pos.north()).getBlock() instanceof CustomWall || worldIn.getBlockState(pos.south()).getBlock() instanceof CustomWall)) + state = state.withProperty(IN_WALL, Boolean.valueOf(true)); + return state; + } } \ No newline at end of file diff --git a/src/main/java/com/NetherNoah/ParadiseMod/blocks/fenceGates/RedstoneFenceGate.java b/src/main/java/com/NetherNoah/ParadiseMod/blocks/fenceGates/RedstoneFenceGate.java index 6f6b4e1..2e840e8 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/blocks/fenceGates/RedstoneFenceGate.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/blocks/fenceGates/RedstoneFenceGate.java @@ -1,9 +1,15 @@ package com.NetherNoah.ParadiseMod.blocks.fenceGates; +import com.NetherNoah.ParadiseMod.CustomBlockCode.CustomWall; import com.NetherNoah.ParadiseMod.CustomBlockCode.RSFenceGate; +import net.minecraft.block.Block; +import net.minecraft.block.BlockFence; +import net.minecraft.block.BlockFenceGate; import net.minecraft.block.BlockPlanks; +import net.minecraft.block.BlockWall; import net.minecraft.block.SoundType; +import net.minecraft.block.state.BlockFaceShape; import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.util.EnumFacing; @@ -30,4 +36,27 @@ public int getWeakPower(IBlockState state, IBlockAccess worldIn, BlockPos pos, E public boolean canConnectRedstone(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side) { return true; } + @Override + public boolean canBeConnectedTo(IBlockAccess world, BlockPos pos, EnumFacing facing) + { + IBlockState state = world.getBlockState(pos); + if (state.getBlock() instanceof BlockFenceGate && + state.getBlockFaceShape(world, pos, facing) == BlockFaceShape.MIDDLE_POLE) + { + Block connector = world.getBlockState(pos.offset(facing)).getBlock(); + return connector instanceof BlockFence || connector instanceof BlockWall || connector instanceof CustomWall; + } + return false; + } + @Override + public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, BlockPos pos) + { + EnumFacing.Axis enumfacing$axis = ((EnumFacing)state.getValue(FACING)).getAxis(); + + if (enumfacing$axis == EnumFacing.Axis.Z && (worldIn.getBlockState(pos.west()).getBlock() instanceof BlockWall || worldIn.getBlockState(pos.east()).getBlock() instanceof BlockWall) || enumfacing$axis == EnumFacing.Axis.X && (worldIn.getBlockState(pos.north()).getBlock() instanceof BlockWall || worldIn.getBlockState(pos.south()).getBlock() instanceof BlockWall)) + state = state.withProperty(IN_WALL, Boolean.valueOf(true)); + else if (enumfacing$axis == EnumFacing.Axis.Z && (worldIn.getBlockState(pos.west()).getBlock() instanceof CustomWall || worldIn.getBlockState(pos.east()).getBlock() instanceof CustomWall) || enumfacing$axis == EnumFacing.Axis.X && (worldIn.getBlockState(pos.north()).getBlock() instanceof CustomWall || worldIn.getBlockState(pos.south()).getBlock() instanceof CustomWall)) + state = state.withProperty(IN_WALL, Boolean.valueOf(true)); + return state; + } } \ No newline at end of file diff --git a/src/main/java/com/NetherNoah/ParadiseMod/blocks/fenceGates/RubyFenceGate.java b/src/main/java/com/NetherNoah/ParadiseMod/blocks/fenceGates/RubyFenceGate.java index 52874fa..97400e5 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/blocks/fenceGates/RubyFenceGate.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/blocks/fenceGates/RubyFenceGate.java @@ -1,9 +1,19 @@ package com.NetherNoah.ParadiseMod.blocks.fenceGates; +import com.NetherNoah.ParadiseMod.CustomBlockCode.CustomWall; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockFence; import net.minecraft.block.BlockFenceGate; import net.minecraft.block.BlockPlanks; +import net.minecraft.block.BlockWall; import net.minecraft.block.SoundType; +import net.minecraft.block.state.BlockFaceShape; +import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockAccess; public class RubyFenceGate extends BlockFenceGate { public RubyFenceGate() { @@ -16,4 +26,27 @@ public RubyFenceGate() { setSoundType(SoundType.METAL); setHarvestLevel("pickaxe", 2); } + @Override + public boolean canBeConnectedTo(IBlockAccess world, BlockPos pos, EnumFacing facing) + { + IBlockState state = world.getBlockState(pos); + if (state.getBlock() instanceof BlockFenceGate && + state.getBlockFaceShape(world, pos, facing) == BlockFaceShape.MIDDLE_POLE) + { + Block connector = world.getBlockState(pos.offset(facing)).getBlock(); + return connector instanceof BlockFence || connector instanceof BlockWall || connector instanceof CustomWall; + } + return false; + } + @Override + public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, BlockPos pos) + { + EnumFacing.Axis enumfacing$axis = ((EnumFacing)state.getValue(FACING)).getAxis(); + + if (enumfacing$axis == EnumFacing.Axis.Z && (worldIn.getBlockState(pos.west()).getBlock() instanceof BlockWall || worldIn.getBlockState(pos.east()).getBlock() instanceof BlockWall) || enumfacing$axis == EnumFacing.Axis.X && (worldIn.getBlockState(pos.north()).getBlock() instanceof BlockWall || worldIn.getBlockState(pos.south()).getBlock() instanceof BlockWall)) + state = state.withProperty(IN_WALL, Boolean.valueOf(true)); + else if (enumfacing$axis == EnumFacing.Axis.Z && (worldIn.getBlockState(pos.west()).getBlock() instanceof CustomWall || worldIn.getBlockState(pos.east()).getBlock() instanceof CustomWall) || enumfacing$axis == EnumFacing.Axis.X && (worldIn.getBlockState(pos.north()).getBlock() instanceof CustomWall || worldIn.getBlockState(pos.south()).getBlock() instanceof CustomWall)) + state = state.withProperty(IN_WALL, Boolean.valueOf(true)); + return state; + } } \ No newline at end of file diff --git a/src/main/java/com/NetherNoah/ParadiseMod/blocks/fenceGates/RustyFenceGate.java b/src/main/java/com/NetherNoah/ParadiseMod/blocks/fenceGates/RustyFenceGate.java index f1ae06e..59e59c2 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/blocks/fenceGates/RustyFenceGate.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/blocks/fenceGates/RustyFenceGate.java @@ -1,9 +1,19 @@ package com.NetherNoah.ParadiseMod.blocks.fenceGates; +import com.NetherNoah.ParadiseMod.CustomBlockCode.CustomWall; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockFence; import net.minecraft.block.BlockFenceGate; import net.minecraft.block.BlockPlanks; +import net.minecraft.block.BlockWall; import net.minecraft.block.SoundType; +import net.minecraft.block.state.BlockFaceShape; +import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockAccess; public class RustyFenceGate extends BlockFenceGate { public RustyFenceGate() { @@ -16,4 +26,27 @@ public RustyFenceGate() { setSoundType(SoundType.METAL); setHarvestLevel("pickaxe", 1); } + @Override + public boolean canBeConnectedTo(IBlockAccess world, BlockPos pos, EnumFacing facing) + { + IBlockState state = world.getBlockState(pos); + if (state.getBlock() instanceof BlockFenceGate && + state.getBlockFaceShape(world, pos, facing) == BlockFaceShape.MIDDLE_POLE) + { + Block connector = world.getBlockState(pos.offset(facing)).getBlock(); + return connector instanceof BlockFence || connector instanceof BlockWall || connector instanceof CustomWall; + } + return false; + } + @Override + public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, BlockPos pos) + { + EnumFacing.Axis enumfacing$axis = ((EnumFacing)state.getValue(FACING)).getAxis(); + + if (enumfacing$axis == EnumFacing.Axis.Z && (worldIn.getBlockState(pos.west()).getBlock() instanceof BlockWall || worldIn.getBlockState(pos.east()).getBlock() instanceof BlockWall) || enumfacing$axis == EnumFacing.Axis.X && (worldIn.getBlockState(pos.north()).getBlock() instanceof BlockWall || worldIn.getBlockState(pos.south()).getBlock() instanceof BlockWall)) + state = state.withProperty(IN_WALL, Boolean.valueOf(true)); + else if (enumfacing$axis == EnumFacing.Axis.Z && (worldIn.getBlockState(pos.west()).getBlock() instanceof CustomWall || worldIn.getBlockState(pos.east()).getBlock() instanceof CustomWall) || enumfacing$axis == EnumFacing.Axis.X && (worldIn.getBlockState(pos.north()).getBlock() instanceof CustomWall || worldIn.getBlockState(pos.south()).getBlock() instanceof CustomWall)) + state = state.withProperty(IN_WALL, Boolean.valueOf(true)); + return state; + } } \ No newline at end of file diff --git a/src/main/java/com/NetherNoah/ParadiseMod/blocks/fenceGates/SilverFenceGate.java b/src/main/java/com/NetherNoah/ParadiseMod/blocks/fenceGates/SilverFenceGate.java index db31a27..bc1bd52 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/blocks/fenceGates/SilverFenceGate.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/blocks/fenceGates/SilverFenceGate.java @@ -1,9 +1,19 @@ package com.NetherNoah.ParadiseMod.blocks.fenceGates; +import com.NetherNoah.ParadiseMod.CustomBlockCode.CustomWall; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockFence; import net.minecraft.block.BlockFenceGate; import net.minecraft.block.BlockPlanks; +import net.minecraft.block.BlockWall; import net.minecraft.block.SoundType; +import net.minecraft.block.state.BlockFaceShape; +import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockAccess; public class SilverFenceGate extends BlockFenceGate { public SilverFenceGate() { @@ -16,4 +26,27 @@ public SilverFenceGate() { setSoundType(SoundType.METAL); setHarvestLevel("pickaxe", 2); } + @Override + public boolean canBeConnectedTo(IBlockAccess world, BlockPos pos, EnumFacing facing) + { + IBlockState state = world.getBlockState(pos); + if (state.getBlock() instanceof BlockFenceGate && + state.getBlockFaceShape(world, pos, facing) == BlockFaceShape.MIDDLE_POLE) + { + Block connector = world.getBlockState(pos.offset(facing)).getBlock(); + return connector instanceof BlockFence || connector instanceof BlockWall || connector instanceof CustomWall; + } + return false; + } + @Override + public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, BlockPos pos) + { + EnumFacing.Axis enumfacing$axis = ((EnumFacing)state.getValue(FACING)).getAxis(); + + if (enumfacing$axis == EnumFacing.Axis.Z && (worldIn.getBlockState(pos.west()).getBlock() instanceof BlockWall || worldIn.getBlockState(pos.east()).getBlock() instanceof BlockWall) || enumfacing$axis == EnumFacing.Axis.X && (worldIn.getBlockState(pos.north()).getBlock() instanceof BlockWall || worldIn.getBlockState(pos.south()).getBlock() instanceof BlockWall)) + state = state.withProperty(IN_WALL, Boolean.valueOf(true)); + else if (enumfacing$axis == EnumFacing.Axis.Z && (worldIn.getBlockState(pos.west()).getBlock() instanceof CustomWall || worldIn.getBlockState(pos.east()).getBlock() instanceof CustomWall) || enumfacing$axis == EnumFacing.Axis.X && (worldIn.getBlockState(pos.north()).getBlock() instanceof CustomWall || worldIn.getBlockState(pos.south()).getBlock() instanceof CustomWall)) + state = state.withProperty(IN_WALL, Boolean.valueOf(true)); + return state; + } } \ No newline at end of file diff --git a/src/main/java/com/NetherNoah/ParadiseMod/blocks/fences/BrickFence.java b/src/main/java/com/NetherNoah/ParadiseMod/blocks/fences/BrickFence.java index c21f82a..263d8a9 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/blocks/fences/BrickFence.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/blocks/fences/BrickFence.java @@ -1,9 +1,16 @@ package com.NetherNoah.ParadiseMod.blocks.fences; +import net.minecraft.block.Block; import net.minecraft.block.BlockFence; +import net.minecraft.block.BlockFenceGate; import net.minecraft.block.material.MapColor; import net.minecraft.block.material.Material; +import net.minecraft.block.state.BlockFaceShape; +import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockAccess; public class BrickFence extends BlockFence { public BrickFence() { @@ -15,4 +22,14 @@ public BrickFence() { setCreativeTab(CreativeTabs.DECORATIONS); setHarvestLevel("pickaxe", 0); } + + @Override + public boolean canConnectTo(IBlockAccess worldIn, BlockPos pos, EnumFacing facing) + { + IBlockState iblockstate = worldIn.getBlockState(pos); + BlockFaceShape blockfaceshape = iblockstate.getBlockFaceShape(worldIn, pos, facing); + Block block = iblockstate.getBlock(); + boolean flag = blockfaceshape == BlockFaceShape.MIDDLE_POLE && (block instanceof BlockFence || block instanceof BlockFenceGate); + return !isExcepBlockForAttachWithPiston(block) && blockfaceshape == BlockFaceShape.SOLID || flag; + } } \ No newline at end of file diff --git a/src/main/java/com/NetherNoah/ParadiseMod/blocks/fences/CactusFence.java b/src/main/java/com/NetherNoah/ParadiseMod/blocks/fences/CactusFence.java index b0ac793..ee693b3 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/blocks/fences/CactusFence.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/blocks/fences/CactusFence.java @@ -1,10 +1,17 @@ package com.NetherNoah.ParadiseMod.blocks.fences; +import net.minecraft.block.Block; import net.minecraft.block.BlockFence; +import net.minecraft.block.BlockFenceGate; import net.minecraft.block.SoundType; import net.minecraft.block.material.MapColor; import net.minecraft.block.material.Material; +import net.minecraft.block.state.BlockFaceShape; +import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockAccess; public class CactusFence extends BlockFence { public CactusFence() { @@ -16,4 +23,14 @@ public CactusFence() { setCreativeTab(CreativeTabs.DECORATIONS); setSoundType(SoundType.WOOD); } + + @Override + public boolean canConnectTo(IBlockAccess worldIn, BlockPos pos, EnumFacing facing) + { + IBlockState iblockstate = worldIn.getBlockState(pos); + BlockFaceShape blockfaceshape = iblockstate.getBlockFaceShape(worldIn, pos, facing); + Block block = iblockstate.getBlock(); + boolean flag = blockfaceshape == BlockFaceShape.MIDDLE_POLE && (block instanceof BlockFence || block instanceof BlockFenceGate); + return !isExcepBlockForAttachWithPiston(block) && blockfaceshape == BlockFaceShape.SOLID || flag; + } } \ No newline at end of file diff --git a/src/main/java/com/NetherNoah/ParadiseMod/blocks/fences/DiamondFence.java b/src/main/java/com/NetherNoah/ParadiseMod/blocks/fences/DiamondFence.java index b7c737f..20f06ea 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/blocks/fences/DiamondFence.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/blocks/fences/DiamondFence.java @@ -1,10 +1,17 @@ package com.NetherNoah.ParadiseMod.blocks.fences; +import net.minecraft.block.Block; import net.minecraft.block.BlockFence; +import net.minecraft.block.BlockFenceGate; import net.minecraft.block.SoundType; import net.minecraft.block.material.MapColor; import net.minecraft.block.material.Material; +import net.minecraft.block.state.BlockFaceShape; +import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockAccess; public class DiamondFence extends BlockFence { public DiamondFence() { @@ -17,4 +24,14 @@ public DiamondFence() { setSoundType(SoundType.METAL); setHarvestLevel("pickaxe", 2); } + + @Override + public boolean canConnectTo(IBlockAccess worldIn, BlockPos pos, EnumFacing facing) + { + IBlockState iblockstate = worldIn.getBlockState(pos); + BlockFaceShape blockfaceshape = iblockstate.getBlockFaceShape(worldIn, pos, facing); + Block block = iblockstate.getBlock(); + boolean flag = blockfaceshape == BlockFaceShape.MIDDLE_POLE && (block instanceof BlockFence || block instanceof BlockFenceGate); + return !isExcepBlockForAttachWithPiston(block) && blockfaceshape == BlockFaceShape.SOLID || flag; + } } \ No newline at end of file diff --git a/src/main/java/com/NetherNoah/ParadiseMod/blocks/fences/EmeraldFence.java b/src/main/java/com/NetherNoah/ParadiseMod/blocks/fences/EmeraldFence.java index 0a25a7a..b68c026 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/blocks/fences/EmeraldFence.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/blocks/fences/EmeraldFence.java @@ -1,10 +1,17 @@ package com.NetherNoah.ParadiseMod.blocks.fences; +import net.minecraft.block.Block; import net.minecraft.block.BlockFence; +import net.minecraft.block.BlockFenceGate; import net.minecraft.block.SoundType; import net.minecraft.block.material.MapColor; import net.minecraft.block.material.Material; +import net.minecraft.block.state.BlockFaceShape; +import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockAccess; public class EmeraldFence extends BlockFence { public EmeraldFence() { @@ -17,4 +24,14 @@ public EmeraldFence() { setSoundType(SoundType.METAL); setHarvestLevel("pickaxe", 2); } + + @Override + public boolean canConnectTo(IBlockAccess worldIn, BlockPos pos, EnumFacing facing) + { + IBlockState iblockstate = worldIn.getBlockState(pos); + BlockFaceShape blockfaceshape = iblockstate.getBlockFaceShape(worldIn, pos, facing); + Block block = iblockstate.getBlock(); + boolean flag = blockfaceshape == BlockFaceShape.MIDDLE_POLE && (block instanceof BlockFence || block instanceof BlockFenceGate); + return !isExcepBlockForAttachWithPiston(block) && blockfaceshape == BlockFaceShape.SOLID || flag; + } } \ No newline at end of file diff --git a/src/main/java/com/NetherNoah/ParadiseMod/blocks/fences/GoldFence.java b/src/main/java/com/NetherNoah/ParadiseMod/blocks/fences/GoldFence.java index 2158bcc..210d7d7 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/blocks/fences/GoldFence.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/blocks/fences/GoldFence.java @@ -1,10 +1,17 @@ package com.NetherNoah.ParadiseMod.blocks.fences; +import net.minecraft.block.Block; import net.minecraft.block.BlockFence; +import net.minecraft.block.BlockFenceGate; import net.minecraft.block.SoundType; import net.minecraft.block.material.MapColor; import net.minecraft.block.material.Material; +import net.minecraft.block.state.BlockFaceShape; +import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockAccess; public class GoldFence extends BlockFence { public GoldFence() { @@ -17,4 +24,14 @@ public GoldFence() { setSoundType(SoundType.METAL); setHarvestLevel("pickaxe", 2); } + + @Override + public boolean canConnectTo(IBlockAccess worldIn, BlockPos pos, EnumFacing facing) + { + IBlockState iblockstate = worldIn.getBlockState(pos); + BlockFaceShape blockfaceshape = iblockstate.getBlockFaceShape(worldIn, pos, facing); + Block block = iblockstate.getBlock(); + boolean flag = blockfaceshape == BlockFaceShape.MIDDLE_POLE && (block instanceof BlockFence || block instanceof BlockFenceGate); + return !isExcepBlockForAttachWithPiston(block) && blockfaceshape == BlockFaceShape.SOLID || flag; + } } \ No newline at end of file diff --git a/src/main/java/com/NetherNoah/ParadiseMod/blocks/fences/IronFence.java b/src/main/java/com/NetherNoah/ParadiseMod/blocks/fences/IronFence.java index 4664ce7..22cb458 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/blocks/fences/IronFence.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/blocks/fences/IronFence.java @@ -1,10 +1,17 @@ package com.NetherNoah.ParadiseMod.blocks.fences; +import net.minecraft.block.Block; import net.minecraft.block.BlockFence; +import net.minecraft.block.BlockFenceGate; import net.minecraft.block.SoundType; import net.minecraft.block.material.MapColor; import net.minecraft.block.material.Material; +import net.minecraft.block.state.BlockFaceShape; +import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockAccess; public class IronFence extends BlockFence { public IronFence() { @@ -17,4 +24,14 @@ public IronFence() { setSoundType(SoundType.METAL); setHarvestLevel("pickaxe", 1); } + + @Override + public boolean canConnectTo(IBlockAccess worldIn, BlockPos pos, EnumFacing facing) + { + IBlockState iblockstate = worldIn.getBlockState(pos); + BlockFaceShape blockfaceshape = iblockstate.getBlockFaceShape(worldIn, pos, facing); + Block block = iblockstate.getBlock(); + boolean flag = blockfaceshape == BlockFaceShape.MIDDLE_POLE && (block instanceof BlockFence || block instanceof BlockFenceGate); + return !isExcepBlockForAttachWithPiston(block) && blockfaceshape == BlockFaceShape.SOLID || flag; + } } \ No newline at end of file diff --git a/src/main/java/com/NetherNoah/ParadiseMod/blocks/fences/RedstoneFence.java b/src/main/java/com/NetherNoah/ParadiseMod/blocks/fences/RedstoneFence.java index b7afc07..16bd9c6 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/blocks/fences/RedstoneFence.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/blocks/fences/RedstoneFence.java @@ -1,9 +1,12 @@ package com.NetherNoah.ParadiseMod.blocks.fences; +import net.minecraft.block.Block; import net.minecraft.block.BlockFence; +import net.minecraft.block.BlockFenceGate; import net.minecraft.block.SoundType; import net.minecraft.block.material.MapColor; import net.minecraft.block.material.Material; +import net.minecraft.block.state.BlockFaceShape; import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.util.EnumFacing; @@ -31,4 +34,14 @@ public boolean canConnectRedstone(IBlockState state, IBlockAccess world, BlockPo return true; } + + @Override + public boolean canConnectTo(IBlockAccess worldIn, BlockPos pos, EnumFacing facing) + { + IBlockState iblockstate = worldIn.getBlockState(pos); + BlockFaceShape blockfaceshape = iblockstate.getBlockFaceShape(worldIn, pos, facing); + Block block = iblockstate.getBlock(); + boolean flag = blockfaceshape == BlockFaceShape.MIDDLE_POLE && (block instanceof BlockFence || block instanceof BlockFenceGate); + return !isExcepBlockForAttachWithPiston(block) && blockfaceshape == BlockFaceShape.SOLID || flag; + } } \ No newline at end of file diff --git a/src/main/java/com/NetherNoah/ParadiseMod/blocks/fences/RubyFence.java b/src/main/java/com/NetherNoah/ParadiseMod/blocks/fences/RubyFence.java index dd5762d..ab64f2d 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/blocks/fences/RubyFence.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/blocks/fences/RubyFence.java @@ -1,10 +1,17 @@ package com.NetherNoah.ParadiseMod.blocks.fences; +import net.minecraft.block.Block; import net.minecraft.block.BlockFence; +import net.minecraft.block.BlockFenceGate; import net.minecraft.block.SoundType; import net.minecraft.block.material.MapColor; import net.minecraft.block.material.Material; +import net.minecraft.block.state.BlockFaceShape; +import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockAccess; public class RubyFence extends BlockFence { public RubyFence() { @@ -17,4 +24,14 @@ public RubyFence() { setSoundType(SoundType.METAL); setHarvestLevel("pickaxe", 2); } + + @Override + public boolean canConnectTo(IBlockAccess worldIn, BlockPos pos, EnumFacing facing) + { + IBlockState iblockstate = worldIn.getBlockState(pos); + BlockFaceShape blockfaceshape = iblockstate.getBlockFaceShape(worldIn, pos, facing); + Block block = iblockstate.getBlock(); + boolean flag = blockfaceshape == BlockFaceShape.MIDDLE_POLE && (block instanceof BlockFence || block instanceof BlockFenceGate); + return !isExcepBlockForAttachWithPiston(block) && blockfaceshape == BlockFaceShape.SOLID || flag; + } } \ No newline at end of file diff --git a/src/main/java/com/NetherNoah/ParadiseMod/blocks/fences/RustyFence.java b/src/main/java/com/NetherNoah/ParadiseMod/blocks/fences/RustyFence.java index 20c3b89..c43e81b 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/blocks/fences/RustyFence.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/blocks/fences/RustyFence.java @@ -1,10 +1,17 @@ package com.NetherNoah.ParadiseMod.blocks.fences; +import net.minecraft.block.Block; import net.minecraft.block.BlockFence; +import net.minecraft.block.BlockFenceGate; import net.minecraft.block.SoundType; import net.minecraft.block.material.MapColor; import net.minecraft.block.material.Material; +import net.minecraft.block.state.BlockFaceShape; +import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockAccess; public class RustyFence extends BlockFence { public RustyFence() { @@ -17,4 +24,14 @@ public RustyFence() { setSoundType(SoundType.METAL); setHarvestLevel("pickaxe", 1); } + + @Override + public boolean canConnectTo(IBlockAccess worldIn, BlockPos pos, EnumFacing facing) + { + IBlockState iblockstate = worldIn.getBlockState(pos); + BlockFaceShape blockfaceshape = iblockstate.getBlockFaceShape(worldIn, pos, facing); + Block block = iblockstate.getBlock(); + boolean flag = blockfaceshape == BlockFaceShape.MIDDLE_POLE && (block instanceof BlockFence || block instanceof BlockFenceGate); + return !isExcepBlockForAttachWithPiston(block) && blockfaceshape == BlockFaceShape.SOLID || flag; + } } \ No newline at end of file diff --git a/src/main/java/com/NetherNoah/ParadiseMod/blocks/fences/SilverFence.java b/src/main/java/com/NetherNoah/ParadiseMod/blocks/fences/SilverFence.java index a28b6ee..d9a566b 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/blocks/fences/SilverFence.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/blocks/fences/SilverFence.java @@ -1,10 +1,17 @@ package com.NetherNoah.ParadiseMod.blocks.fences; +import net.minecraft.block.Block; import net.minecraft.block.BlockFence; +import net.minecraft.block.BlockFenceGate; import net.minecraft.block.SoundType; import net.minecraft.block.material.MapColor; import net.minecraft.block.material.Material; +import net.minecraft.block.state.BlockFaceShape; +import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockAccess; public class SilverFence extends BlockFence { public SilverFence() { @@ -17,4 +24,14 @@ public SilverFence() { setSoundType(SoundType.METAL); setHarvestLevel("pickaxe", 2); } + + @Override + public boolean canConnectTo(IBlockAccess worldIn, BlockPos pos, EnumFacing facing) + { + IBlockState iblockstate = worldIn.getBlockState(pos); + BlockFaceShape blockfaceshape = iblockstate.getBlockFaceShape(worldIn, pos, facing); + Block block = iblockstate.getBlock(); + boolean flag = blockfaceshape == BlockFaceShape.MIDDLE_POLE && (block instanceof BlockFence || block instanceof BlockFenceGate); + return !isExcepBlockForAttachWithPiston(block) && blockfaceshape == BlockFaceShape.SOLID || flag; + } } \ No newline at end of file diff --git a/src/main/java/com/NetherNoah/ParadiseMod/handlers/AntiMobLampHandler.java b/src/main/java/com/NetherNoah/ParadiseMod/handlers/AntiMobLampHandler.java index 349a3ad..310f3e1 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/handlers/AntiMobLampHandler.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/handlers/AntiMobLampHandler.java @@ -13,14 +13,10 @@ public class AntiMobLampHandler { @SubscribeEvent public void onEntityCheckSpawn(LivingSpawnEvent.CheckSpawn event) { - //if(event.getResult() == Event.Result.ALLOW) return; - if(SaltLampFilter.containsEntity(event.getEntity())) { if(SaltLampRegistry.getLampRegistry().isInRangeOfLamp(event.getWorld(), event.getEntity().getPosition())) - { event.setResult(Event.Result.DENY); - } } } } \ No newline at end of file diff --git a/src/main/java/com/NetherNoah/ParadiseMod/handlers/CustomCraftBenchGuiHandler.java b/src/main/java/com/NetherNoah/ParadiseMod/handlers/CustomCraftBenchGuiHandler.java index 8d24e24..72386be 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/handlers/CustomCraftBenchGuiHandler.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/handlers/CustomCraftBenchGuiHandler.java @@ -14,7 +14,6 @@ public class CustomCraftBenchGuiHandler implements IGuiHandler { public Object getClientGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) { id=0; return new CustomCraftBenchGui(player.inventory, world); - //, new BlockPos(x, y, z)); } @Override public Object getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) { diff --git a/src/main/java/com/NetherNoah/ParadiseMod/handlers/Events.java b/src/main/java/com/NetherNoah/ParadiseMod/handlers/Events.java index 901c826..c5b04f8 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/handlers/Events.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/handlers/Events.java @@ -25,10 +25,9 @@ public static void deleteRecipes(RegistryEvent.Register event) { modRegistry.remove(woodenPressurePlate); modRegistry.remove(woodenButton); modRegistry.remove(oakTable); - modRegistry.remove(furnace); } - // unlocks all recipes if Quark is not present + //unlocks all recipes if Quark is not present @SubscribeEvent public void onPlayerLoggedIn(PlayerLoggedInEvent event) { if (event.player instanceof EntityPlayerMP) { diff --git a/src/main/java/com/NetherNoah/ParadiseMod/init/LiquidRedstone.java b/src/main/java/com/NetherNoah/ParadiseMod/init/LiquidRedstone.java index 9ecb172..849fb19 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/init/LiquidRedstone.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/init/LiquidRedstone.java @@ -75,9 +75,7 @@ public void randomDisplayTick(IBlockState stateIn, World worldIn, BlockPos pos, worldIn.playSound(d8, d4, d6, SoundEvents.BLOCK_LAVA_POP, SoundCategory.BLOCKS, 0.2F + rand.nextFloat() * 0.2F, 0.9F + rand.nextFloat() * 0.15F, false); } if (rand.nextInt(200) == 0) - { worldIn.playSound(d0, d1, d2, SoundEvents.BLOCK_LAVA_AMBIENT, SoundCategory.BLOCKS, 0.2F + rand.nextFloat() * 0.2F, 0.9F + rand.nextFloat() * 0.15F, false); - } } // this is a rs power block! @@ -102,8 +100,7 @@ public boolean checkForMixing(World worldIn, BlockPos pos, IBlockState state) { if (this.blockMaterial == Material.LAVA) { boolean flag = false; for (EnumFacing enumfacing : EnumFacing.values()) { - if (enumfacing != EnumFacing.DOWN - && worldIn.getBlockState(pos.offset(enumfacing)).getMaterial() == Material.WATER) { + if (enumfacing != EnumFacing.DOWN && worldIn.getBlockState(pos.offset(enumfacing)).getMaterial() == Material.WATER) { flag = true; break; } diff --git a/src/main/java/com/NetherNoah/ParadiseMod/items/armor/ArmorEmerald.java b/src/main/java/com/NetherNoah/ParadiseMod/items/armor/ArmorEmerald.java index fbc5ba8..1acf298 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/items/armor/ArmorEmerald.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/items/armor/ArmorEmerald.java @@ -46,9 +46,8 @@ public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { // 5% chance each tick Random rand = new Random(); int giveXp = rand.nextInt(100) + 1; - if (giveXp == 2) { + if (giveXp == 2) player.addExperience(25); - } } } } diff --git a/src/main/java/com/NetherNoah/ParadiseMod/items/armor/ArmorObsidian.java b/src/main/java/com/NetherNoah/ParadiseMod/items/armor/ArmorObsidian.java index 82654cf..4234f72 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/items/armor/ArmorObsidian.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/items/armor/ArmorObsidian.java @@ -42,8 +42,7 @@ public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { } } } - if (ArmorObsidianPieces == 4) { + if (ArmorObsidianPieces == 4) player.addPotionEffect(new PotionEffect(Potion.getPotionById(12))); - } } } \ No newline at end of file diff --git a/src/main/java/com/NetherNoah/ParadiseMod/tileentity/SaltLamp/SaltLampRegistry.java b/src/main/java/com/NetherNoah/ParadiseMod/tileentity/SaltLamp/SaltLampRegistry.java index 3b3a13a..9ce0e98 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/tileentity/SaltLamp/SaltLampRegistry.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/tileentity/SaltLamp/SaltLampRegistry.java @@ -41,12 +41,6 @@ public boolean isInRangeOfLamp(World world, BlockPos pos) double dx = Lamp.Position.getX() + 0.5 - pos.getX(); double dy = Math.abs(Lamp.Position.getY() + 0.5 - pos.getY()); double dz = Lamp.Position.getZ() + 0.5 - pos.getZ(); - /*/ - System.out.println(dx); - System.out.println(dy); - System.out.println(dz); - System.out.println(" "); - /*/ if((dx * dx + dz * dz) <= (this.LampRangeSq) && dy <= this.LampRange) return true; } diff --git a/src/main/java/com/NetherNoah/ParadiseMod/tileentity/furnace/TEMossyFurnace.java b/src/main/java/com/NetherNoah/ParadiseMod/tileentity/furnace/TEMossyFurnace.java index 93316c5..0cff97e 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/tileentity/furnace/TEMossyFurnace.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/tileentity/furnace/TEMossyFurnace.java @@ -65,9 +65,7 @@ public boolean isEmpty() for (ItemStack itemstack : furnaceItemStacks) { if (!itemstack.isEmpty()) - { return false; - } } return true; } @@ -105,9 +103,7 @@ public void setInventorySlotContents(int index, ItemStack stack) boolean flag = !stack.isEmpty() && stack.isItemEqual(itemstack) && ItemStack.areItemStackTagsEqual(stack, itemstack); furnaceItemStacks.set(index, stack); if (stack.getCount() > getInventoryStackLimit()) - { stack.setCount(getInventoryStackLimit()); - } if (index == 0 && !flag) { totalCookTime = getCookTime(stack); @@ -151,9 +147,7 @@ public void readFromNBT(NBTTagCompound compound) currentItemBurnTime = getItemBurnTime(furnaceItemStacks.get(1)); if (compound.hasKey("CustomName", 8)) - { furnaceCustomName = compound.getString("CustomName"); - } } @Override public NBTTagCompound writeToNBT(NBTTagCompound compound) @@ -164,9 +158,7 @@ public NBTTagCompound writeToNBT(NBTTagCompound compound) compound.setInteger("CookTimeTotal", (short)totalCookTime); ItemStackHelper.saveAllItems(compound, furnaceItemStacks); if (hasCustomName()) - { compound.setString("CustomName", furnaceCustomName); - } return compound; } /** @@ -198,9 +190,7 @@ public void update() boolean flag = isBurning(); boolean flag1 = false; if (isBurning()) - { --furnaceBurnTime; - } if (!world.isRemote) { ItemStack itemstack = furnaceItemStacks.get(1); @@ -237,14 +227,10 @@ public void update() } } else - { cookTime = 0; - } } else if (!isBurning() && cookTime > 0) - { cookTime = MathHelper.clamp(cookTime - 2, 0, totalCookTime); - } if (flag != isBurning()) { flag1 = true; @@ -252,9 +238,7 @@ else if (!isBurning() && cookTime > 0) } } if (flag1) - { markDirty(); - } } public int getCookTime(ItemStack stack) { @@ -266,16 +250,12 @@ public int getCookTime(ItemStack stack) private boolean canSmelt() { if (furnaceItemStacks.get(0).isEmpty()) - { return false; - } else { ItemStack itemstack = FurnaceRecipes.instance().getSmeltingResult(furnaceItemStacks.get(0)); if (itemstack.isEmpty()) - { return false; - } else { ItemStack itemstack1 = furnaceItemStacks.get(2); @@ -297,17 +277,11 @@ public void smeltItem() ItemStack itemstack1 = FurnaceRecipes.instance().getSmeltingResult(itemstack); ItemStack itemstack2 = furnaceItemStacks.get(2); if (itemstack2.isEmpty()) - { furnaceItemStacks.set(2, itemstack1.copy()); - } else if (itemstack2.getItem() == itemstack1.getItem()) - { itemstack2.grow(itemstack1.getCount()); - } if (itemstack.getItem() == Item.getItemFromBlock(Blocks.SPONGE) && itemstack.getMetadata() == 1 && !furnaceItemStacks.get(1).isEmpty() && furnaceItemStacks.get(1).getItem() == Items.BUCKET) - { furnaceItemStacks.set(1, new ItemStack(Items.WATER_BUCKET)); - } itemstack.shrink(1); } } @@ -318,9 +292,7 @@ else if (itemstack2.getItem() == itemstack1.getItem()) public static int getItemBurnTime(ItemStack stack) { if (stack.isEmpty()) - { return 0; - } else { Item item = stack.getItem(); @@ -360,13 +332,9 @@ public void closeInventory(EntityPlayer player) public boolean isItemValidForSlot(int index, ItemStack stack) { if (index == 2) - { return false; - } else if (index != 1) - { return true; - } else { ItemStack itemstack = furnaceItemStacks.get(1); @@ -396,9 +364,7 @@ public boolean canExtractItem(int index, ItemStack stack, EnumFacing direction) { Item item = stack.getItem(); if (item != Items.WATER_BUCKET && item != Items.BUCKET) - { return false; - } } return true; } diff --git a/src/main/java/com/NetherNoah/ParadiseMod/tileentity/furnace/TEVoidFurnace.java b/src/main/java/com/NetherNoah/ParadiseMod/tileentity/furnace/TEVoidFurnace.java index 499e52b..acb1b02 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/tileentity/furnace/TEVoidFurnace.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/tileentity/furnace/TEVoidFurnace.java @@ -65,9 +65,7 @@ public boolean isEmpty() for (ItemStack itemstack : furnaceItemStacks) { if (!itemstack.isEmpty()) - { return false; - } } return true; } @@ -105,9 +103,7 @@ public void setInventorySlotContents(int index, ItemStack stack) boolean flag = !stack.isEmpty() && stack.isItemEqual(itemstack) && ItemStack.areItemStackTagsEqual(stack, itemstack); furnaceItemStacks.set(index, stack); if (stack.getCount() > getInventoryStackLimit()) - { stack.setCount(getInventoryStackLimit()); - } if (index == 0 && !flag) { totalCookTime = getCookTime(stack); @@ -151,9 +147,7 @@ public void readFromNBT(NBTTagCompound compound) currentItemBurnTime = getItemBurnTime(furnaceItemStacks.get(1)); if (compound.hasKey("CustomName", 8)) - { furnaceCustomName = compound.getString("CustomName"); - } } @Override public NBTTagCompound writeToNBT(NBTTagCompound compound) @@ -164,9 +158,7 @@ public NBTTagCompound writeToNBT(NBTTagCompound compound) compound.setInteger("CookTimeTotal", (short)totalCookTime); ItemStackHelper.saveAllItems(compound, furnaceItemStacks); if (hasCustomName()) - { compound.setString("CustomName", furnaceCustomName); - } return compound; } /** @@ -198,9 +190,7 @@ public void update() boolean flag = isBurning(); boolean flag1 = false; if (isBurning()) - { --furnaceBurnTime; - } if (!world.isRemote) { ItemStack itemstack = furnaceItemStacks.get(1); @@ -217,8 +207,7 @@ public void update() { Item item = itemstack.getItem(); itemstack.shrink(1); - if (itemstack.isEmpty()) - { + if (itemstack.isEmpty()) { ItemStack item1 = item.getContainerItem(itemstack); furnaceItemStacks.set(1, item1); } @@ -237,9 +226,7 @@ public void update() } } else - { cookTime = 0; - } } else if (!isBurning() && cookTime > 0) { @@ -252,9 +239,7 @@ else if (!isBurning() && cookTime > 0) } } if (flag1) - { markDirty(); - } } public int getCookTime(ItemStack stack) { @@ -266,16 +251,12 @@ public int getCookTime(ItemStack stack) private boolean canSmelt() { if (furnaceItemStacks.get(0).isEmpty()) - { return false; - } else { ItemStack itemstack = FurnaceRecipes.instance().getSmeltingResult(furnaceItemStacks.get(0)); if (itemstack.isEmpty()) - { return false; - } else { ItemStack itemstack1 = furnaceItemStacks.get(2); @@ -297,17 +278,11 @@ public void smeltItem() ItemStack itemstack1 = FurnaceRecipes.instance().getSmeltingResult(itemstack); ItemStack itemstack2 = furnaceItemStacks.get(2); if (itemstack2.isEmpty()) - { furnaceItemStacks.set(2, itemstack1.copy()); - } else if (itemstack2.getItem() == itemstack1.getItem()) - { itemstack2.grow(itemstack1.getCount()); - } if (itemstack.getItem() == Item.getItemFromBlock(Blocks.SPONGE) && itemstack.getMetadata() == 1 && !furnaceItemStacks.get(1).isEmpty() && furnaceItemStacks.get(1).getItem() == Items.BUCKET) - { furnaceItemStacks.set(1, new ItemStack(Items.WATER_BUCKET)); - } itemstack.shrink(1); } } @@ -318,9 +293,7 @@ else if (itemstack2.getItem() == itemstack1.getItem()) public static int getItemBurnTime(ItemStack stack) { if (stack.isEmpty()) - { return 0; - } else { Item item = stack.getItem(); @@ -360,13 +333,9 @@ public void closeInventory(EntityPlayer player) public boolean isItemValidForSlot(int index, ItemStack stack) { if (index == 2) - { return false; - } else if (index != 1) - { return true; - } else { ItemStack itemstack = furnaceItemStacks.get(1); @@ -396,9 +365,7 @@ public boolean canExtractItem(int index, ItemStack stack, EnumFacing direction) { Item item = stack.getItem(); if (item != Items.WATER_BUCKET && item != Items.BUCKET) - { return false; - } } return true; } diff --git a/src/main/java/com/NetherNoah/ParadiseMod/tileentity/render/TileEntityCactusChestRender.java b/src/main/java/com/NetherNoah/ParadiseMod/tileentity/render/TileEntityCactusChestRender.java index 1a5761c..fb2eb28 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/tileentity/render/TileEntityCactusChestRender.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/tileentity/render/TileEntityCactusChestRender.java @@ -30,9 +30,7 @@ public TileEntityCactusChestRender() Calendar calendar = Calendar.getInstance(); if (calendar.get(2) + 1 == 12 && calendar.get(5) >= 24 && calendar.get(5) <= 26) - { this.isChristmas = true; - } } @Override @@ -57,9 +55,7 @@ public void render(TileEntityChest te, double x, double y, double z, float parti te.checkForAdjacentChests(); } else - { i = 0; - } if (te.adjacentChestZNeg == null && te.adjacentChestXNeg == null) { @@ -79,17 +75,11 @@ public void render(TileEntityChest te, double x, double y, double z, float parti GlStateManager.matrixMode(5888); } else if (this.isChristmas) - { this.bindTexture(TEXTURE_CHRISTMAS); - } else if (te.getChestType() == BlockChest.Type.TRAP) - { this.bindTexture(TEXTURE_TRAPPED); - } else - { this.bindTexture(TEXTURE_NORMAL); - } } else { @@ -105,26 +95,18 @@ else if (te.getChestType() == BlockChest.Type.TRAP) GlStateManager.matrixMode(5888); } else if (this.isChristmas) - { this.bindTexture(TEXTURE_CHRISTMAS_DOUBLE); - } else if (te.getChestType() == BlockChest.Type.TRAP) - { this.bindTexture(TEXTURE_TRAPPED_DOUBLE); - } else - { this.bindTexture(TEXTURE_NORMAL_DOUBLE); - } } GlStateManager.pushMatrix(); GlStateManager.enableRescaleNormal(); if (destroyStage < 0) - { GlStateManager.color(1.0F, 1.0F, 1.0F, alpha); - } GlStateManager.translate((float)x, (float)y + 1.0F, (float)z + 1.0F); GlStateManager.scale(1.0F, -1.0F, -1.0F); @@ -132,34 +114,22 @@ else if (te.getChestType() == BlockChest.Type.TRAP) int j = 0; if (i == 2) - { j = 180; - } if (i == 3) - { j = 0; - } if (i == 4) - { j = 90; - } if (i == 5) - { j = -90; - } if (i == 2 && te.adjacentChestXPos != null) - { GlStateManager.translate(1.0F, 0.0F, 0.0F); - } if (i == 5 && te.adjacentChestZPos != null) - { GlStateManager.translate(0.0F, 0.0F, -1.0F); - } GlStateManager.rotate(j, 0.0F, 1.0F, 0.0F); GlStateManager.translate(-0.5F, -0.5F, -0.5F); @@ -170,9 +140,7 @@ else if (te.getChestType() == BlockChest.Type.TRAP) float f1 = te.adjacentChestZNeg.prevLidAngle + (te.adjacentChestZNeg.lidAngle - te.adjacentChestZNeg.prevLidAngle) * partialTicks; if (f1 > f) - { f = f1; - } } if (te.adjacentChestXNeg != null) @@ -180,9 +148,7 @@ else if (te.getChestType() == BlockChest.Type.TRAP) float f2 = te.adjacentChestXNeg.prevLidAngle + (te.adjacentChestXNeg.lidAngle - te.adjacentChestXNeg.prevLidAngle) * partialTicks; if (f2 > f) - { f = f2; - } } f = 1.0F - f; diff --git a/src/main/java/com/NetherNoah/ParadiseMod/tileentity/render/TileEntityCompressedCactusChestRender.java b/src/main/java/com/NetherNoah/ParadiseMod/tileentity/render/TileEntityCompressedCactusChestRender.java index 6df546a..bcd5928 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/tileentity/render/TileEntityCompressedCactusChestRender.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/tileentity/render/TileEntityCompressedCactusChestRender.java @@ -31,9 +31,7 @@ public TileEntityCompressedCactusChestRender() Calendar calendar = Calendar.getInstance(); if (calendar.get(2) + 1 == 12 && calendar.get(5) >= 24 && calendar.get(5) <= 26) - { this.isChristmas = true; - } } @Override @@ -58,9 +56,7 @@ public void render(TileEntityChest te, double x, double y, double z, float parti te.checkForAdjacentChests(); } else - { i = 0; - } if (te.adjacentChestZNeg == null && te.adjacentChestXNeg == null) { @@ -80,17 +76,11 @@ public void render(TileEntityChest te, double x, double y, double z, float parti GlStateManager.matrixMode(5888); } else if (this.isChristmas) - { this.bindTexture(TEXTURE_CHRISTMAS); - } else if (te.getChestType() == BlockChest.Type.TRAP) - { this.bindTexture(TEXTURE_TRAPPED); - } else - { this.bindTexture(TEXTURE_NORMAL); - } } else { @@ -106,26 +96,18 @@ else if (te.getChestType() == BlockChest.Type.TRAP) GlStateManager.matrixMode(5888); } else if (this.isChristmas) - { this.bindTexture(TEXTURE_CHRISTMAS_DOUBLE); - } else if (te.getChestType() == BlockChest.Type.TRAP) - { this.bindTexture(TEXTURE_TRAPPED_DOUBLE); - } else - { this.bindTexture(TEXTURE_NORMAL_DOUBLE); - } } GlStateManager.pushMatrix(); GlStateManager.enableRescaleNormal(); if (destroyStage < 0) - { GlStateManager.color(1.0F, 1.0F, 1.0F, alpha); - } GlStateManager.translate((float)x, (float)y + 1.0F, (float)z + 1.0F); GlStateManager.scale(1.0F, -1.0F, -1.0F); @@ -133,34 +115,22 @@ else if (te.getChestType() == BlockChest.Type.TRAP) int j = 0; if (i == 2) - { j = 180; - } if (i == 3) - { j = 0; - } if (i == 4) - { j = 90; - } if (i == 5) - { j = -90; - } if (i == 2 && te.adjacentChestXPos != null) - { GlStateManager.translate(1.0F, 0.0F, 0.0F); - } if (i == 5 && te.adjacentChestZPos != null) - { GlStateManager.translate(0.0F, 0.0F, -1.0F); - } GlStateManager.rotate(j, 0.0F, 1.0F, 0.0F); GlStateManager.translate(-0.5F, -0.5F, -0.5F); @@ -171,9 +141,7 @@ else if (te.getChestType() == BlockChest.Type.TRAP) float f1 = te.adjacentChestZNeg.prevLidAngle + (te.adjacentChestZNeg.lidAngle - te.adjacentChestZNeg.prevLidAngle) * partialTicks; if (f1 > f) - { f = f1; - } } if (te.adjacentChestXNeg != null) @@ -181,9 +149,7 @@ else if (te.getChestType() == BlockChest.Type.TRAP) float f2 = te.adjacentChestXNeg.prevLidAngle + (te.adjacentChestXNeg.lidAngle - te.adjacentChestXNeg.prevLidAngle) * partialTicks; if (f2 > f) - { f = f2; - } } f = 1.0F - f; diff --git a/src/main/java/com/NetherNoah/ParadiseMod/world/dimension/DUBiomeProvider.java b/src/main/java/com/NetherNoah/ParadiseMod/world/dimension/DUBiomeProvider.java deleted file mode 100644 index e3d46b2..0000000 --- a/src/main/java/com/NetherNoah/ParadiseMod/world/dimension/DUBiomeProvider.java +++ /dev/null @@ -1,5 +0,0 @@ -package com.NetherNoah.ParadiseMod.world.dimension; - -public class DUBiomeProvider { - -} diff --git a/src/main/java/com/NetherNoah/ParadiseMod/world/dimension/DUChunkGenerator.java b/src/main/java/com/NetherNoah/ParadiseMod/world/dimension/DUChunkGenerator.java index c150819..909b371 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/world/dimension/DUChunkGenerator.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/world/dimension/DUChunkGenerator.java @@ -327,7 +327,6 @@ public Chunk generateChunk(int x, int z) { if (oceanic) chunk.setBlockState(new BlockPos(cx,cy,cz), PRISMARINE); - } } } @@ -358,7 +357,6 @@ private double[] getHeights(double[] p_185938_1_, int p_185938_2_, int p_185938_ double d2 = j; if (j > p_185938_6_ / 2) d2 = p_185938_6_ - 1 - j; - if (d2 < 4.0D) { d2 = 4.0D - d2; adouble[j] -= d2 * d2 * d2 * 10.0D; diff --git a/src/main/java/com/NetherNoah/ParadiseMod/world/dimension/DimTeleporter.java b/src/main/java/com/NetherNoah/ParadiseMod/world/dimension/DimTeleporter.java index 60b2a19..5b19de9 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/world/dimension/DimTeleporter.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/world/dimension/DimTeleporter.java @@ -99,9 +99,8 @@ public boolean placeInExistingPortal(Entity entityIn, float p_180620_2_) { if (DU) { if (worldServerInstance.getBlockState(blockpos).getBlock() == Misc.DUPortal) { - while (worldServerInstance.getBlockState(blockpos1 = blockpos.down()).getBlock() == Misc.DUPortal) { + while (worldServerInstance.getBlockState(blockpos1 = blockpos.down()).getBlock() == Misc.DUPortal) blockpos = blockpos1; - } double d1 = blockpos.distanceSq(blockpos4); if (d0 < 0.0D || d1 < d0) { d0 = d1; @@ -112,9 +111,8 @@ public boolean placeInExistingPortal(Entity entityIn, float p_180620_2_) { } else { if (worldServerInstance.getBlockState(blockpos).getBlock() == Misc.DVPortal) { - while (worldServerInstance.getBlockState(blockpos1 = blockpos.down()).getBlock() == Misc.DVPortal) { + while (worldServerInstance.getBlockState(blockpos1 = blockpos.down()).getBlock() == Misc.DVPortal) blockpos = blockpos1; - } double d1 = blockpos.distanceSq(blockpos4); if (d0 < 0.0D || d1 < d0) { d0 = d1; @@ -128,42 +126,32 @@ public boolean placeInExistingPortal(Entity entityIn, float p_180620_2_) { } } if (d0 >= 0.0D) { - if (flag1) { + if (flag1) destinationCoordinateCache.put(k, new DimTeleporter.PortalPosition(object, worldServerInstance.getTotalWorldTime())); - } double d4 = object.getX() + 0.5D; double d5 = object.getY() + 0.5D; double d6 = object.getZ() + 0.5D; EnumFacing enumfacing = null; if (DU) { - if (worldServerInstance.getBlockState(object.west()).getBlock() == Misc.DUPortal) { + if (worldServerInstance.getBlockState(object.west()).getBlock() == Misc.DUPortal) enumfacing = EnumFacing.NORTH; - } - if (worldServerInstance.getBlockState(object.east()).getBlock() == Misc.DUPortal) { + if (worldServerInstance.getBlockState(object.east()).getBlock() == Misc.DUPortal) enumfacing = EnumFacing.SOUTH; - } - if (worldServerInstance.getBlockState(object.north()).getBlock() == Misc.DUPortal) { + if (worldServerInstance.getBlockState(object.north()).getBlock() == Misc.DUPortal) enumfacing = EnumFacing.EAST; - } - if (worldServerInstance.getBlockState(object.south()).getBlock() == Misc.DUPortal) { + if (worldServerInstance.getBlockState(object.south()).getBlock() == Misc.DUPortal) enumfacing = EnumFacing.WEST; - } - } else { - if (worldServerInstance.getBlockState(object.west()).getBlock() == Misc.DVPortal) { + if (worldServerInstance.getBlockState(object.west()).getBlock() == Misc.DVPortal) enumfacing = EnumFacing.NORTH; - } - if (worldServerInstance.getBlockState(object.east()).getBlock() == Misc.DVPortal) { + if (worldServerInstance.getBlockState(object.east()).getBlock() == Misc.DVPortal) enumfacing = EnumFacing.SOUTH; - } - if (worldServerInstance.getBlockState(object.north()).getBlock() == Misc.DVPortal) { + if (worldServerInstance.getBlockState(object.north()).getBlock() == Misc.DVPortal) enumfacing = EnumFacing.EAST; - } - if (worldServerInstance.getBlockState(object.south()).getBlock() == Misc.DVPortal) { + if (worldServerInstance.getBlockState(object.south()).getBlock() == Misc.DVPortal) enumfacing = EnumFacing.WEST; - } } EnumFacing enumfacing1 = entityIn.getTeleportDirection(); @@ -182,15 +170,12 @@ public boolean placeInExistingPortal(Entity entityIn, float p_180620_2_) { } float f6 = 0.5F; float f1 = 0.5F; - if (!flag3 && flag2) { + if (!flag3 && flag2) f6 = 1.0F; - } - else if (flag3 && !flag2) { + else if (flag3 && !flag2) f6 = 0.0F; - } - else if (flag3) { + else if (flag3) f1 = 0.0F; - } d4 = object.getX() + 0.5D; d5 = object.getY() + 0.5D; d6 = object.getZ() + 0.5D; @@ -224,15 +209,13 @@ else if (enumfacing1 != null && enumfacing == enumfacing1.rotateY()) { entityIn.rotationYaw = p_180620_2_ - enumfacing1.getHorizontalIndex() * 90 + enumfacing.getHorizontalIndex() * 90; } - else { + else entityIn.motionX = entityIn.motionY = entityIn.motionZ = 0.0D; - } entityIn.setLocationAndAngles(d4, d5, d6, entityIn.rotationYaw, entityIn.rotationPitch); return true; } - else { + else return false; - } } @Override public boolean makePortal(Entity entityIn) @@ -260,9 +243,7 @@ public boolean makePortal(Entity entityIn) if (worldServerInstance.isAirBlock(blockpos$mutableblockpos.setPos(j2, j3, l2))) { while (j3 > 0 && worldServerInstance.isAirBlock(blockpos$mutableblockpos.setPos(j2, j3 - 1, l2))) - { --j3; - } for (int k3 = i2; k3 < i2 + 4; ++k3) { int l3 = k3 % 2; @@ -318,9 +299,7 @@ public boolean makePortal(Entity entityIn) if (worldServerInstance.isAirBlock(blockpos$mutableblockpos.setPos(l5, i7, j6))) { while (i7 > 0 && worldServerInstance.isAirBlock(blockpos$mutableblockpos.setPos(l5, i7 - 1, j6))) - { --i7; - } for (int k7 = i2; k7 < i2 + 2; ++k7) { int j8 = k7 % 2; @@ -334,9 +313,7 @@ public boolean makePortal(Entity entityIn) int j13 = j6 + (j10 - 1) * j9; blockpos$mutableblockpos.setPos(j12, i13, j13); if (j11 < 0 && !worldServerInstance.getBlockState(blockpos$mutableblockpos).getMaterial().isSolid() || j11 >= 0 && !worldServerInstance.isAirBlock(blockpos$mutableblockpos)) - { continue label567; - } } } double d6 = i7 + 0.5D - entityIn.posY; @@ -433,9 +410,7 @@ public void removeStalePortalLocations(long worldTime) { DimTeleporter.PortalPosition teleporter$portalposition = objectiterator.next(); if (teleporter$portalposition == null || teleporter$portalposition.lastUpdateTime < i) - { objectiterator.remove(); - } } } } diff --git a/src/main/java/com/NetherNoah/ParadiseMod/world/worldgen/misc/ChristmasTree.java b/src/main/java/com/NetherNoah/ParadiseMod/world/worldgen/misc/ChristmasTree.java index 0c1517a..6c90f05 100644 --- a/src/main/java/com/NetherNoah/ParadiseMod/world/worldgen/misc/ChristmasTree.java +++ b/src/main/java/com/NetherNoah/ParadiseMod/world/worldgen/misc/ChristmasTree.java @@ -93,14 +93,10 @@ public boolean generate(World worldIn, Random rand, BlockPos position) k3 = 1; ++j3; if (j3 > l) - { j3 = l; - } } else - { ++i3; - } } int i4 = rand.nextInt(3); for (int k4 = 0; k4 < i - i4; ++k4) diff --git a/src/main/resources/assets/minecraft/models/block/furnace.json b/src/main/resources/assets/minecraft/models/block/furnace.json index 5dbf1a4..c887c72 100644 --- a/src/main/resources/assets/minecraft/models/block/furnace.json +++ b/src/main/resources/assets/minecraft/models/block/furnace.json @@ -8,318 +8,217 @@ "particle": "blocks/furnace_front_off" }, "elements": [ - { - "name": "cube", - "from": [13, 0, 0], - "to": [16, 7, 6], - "faces": { - "north": { - "uv": [0, 9, 3, 16], - "texture": "#0", - "cullface": "north" - }, - "east": { - "uv": [10, 9, 16, 16], - "texture": "#1", - "cullface": "east" - }, - "west": {"uv": [9, 9, 3, 16], "texture": "#0"}, - "down": { - "uv": [13, 10, 16, 16], - "texture": "#2", - "cullface": "down" - } - } - }, { "name": "cube", "from": [0, 0, 0], - "to": [3, 7, 6], + "to": [3, 16, 8], "faces": { - "north": { - "uv": [13, 9, 16, 16], - "texture": "#0", - "cullface": "north" - }, - "east": {"uv": [13, 9, 7, 16], "texture": "#0"}, - "west": { - "uv": [0, 9, 6, 16], - "texture": "#1", - "cullface": "west" - }, - "down": { - "uv": [0, 10, 3, 16], - "texture": "#2", - "cullface": "down" - } + "north": {"uv": [13, 0, 16, 16], "texture": "#0"}, + "east": {"uv": [13, 0, 5, 16], "texture": "#0"}, + "west": {"uv": [0, 0, 8, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 3, 8], "texture": "#2"} } }, { "name": "cube", - "from": [12, 3, 0], - "to": [13, 7, 6], + "from": [13, 0, 0], + "to": [16, 16, 8], "faces": { - "north": { - "uv": [3, 9, 4, 13], - "texture": "#0", - "cullface": "north" - }, - "west": {"uv": [5, 9, 11, 13], "texture": "#0"}, - "down": {"uv": [3, 13, 4, 14], "texture": "#0"} + "north": {"uv": [0, 0, 3, 16], "texture": "#0"}, + "east": {"uv": [8, 0, 16, 16], "texture": "#1"}, + "west": {"uv": [11, 0, 3, 16], "texture": "#0"}, + "up": {"uv": [13, 0, 16, 8], "texture": "#2"} } }, { "name": "cube", - "from": [3, 3, 0], - "to": [4, 7, 6], + "from": [5, 12, 0], + "to": [11, 16, 8], "faces": { - "north": { - "uv": [12, 9, 13, 13], - "texture": "#0", - "cullface": "north" - }, - "east": {"uv": [5, 12, 11, 13], "texture": "#0"}, - "down": {"uv": [12, 13, 13, 14], "texture": "#0"} + "north": {"uv": [5, 0, 11, 4], "texture": "#0"}, + "up": {"uv": [5, 0, 11, 8], "texture": "#2"}, + "down": {"uv": [5, 4, 11, 6], "texture": "#0"} } }, { "name": "cube", - "from": [4, 4, 0], - "to": [6, 7, 6], + "from": [11, 11, 0], + "to": [12, 16, 8], "faces": { - "north": { - "uv": [10, 9, 12, 12], - "texture": "#0", - "cullface": "north" - }, - "east": {"uv": [5, 10, 11, 13], "texture": "#0"}, - "down": {"uv": [10, 12, 12, 13], "texture": "#0"} + "north": {"uv": [4, 0, 5, 5], "texture": "#0"}, + "west": {"uv": [4, 2, 12, 7], "texture": "#0"}, + "up": {"uv": [11, 0, 12, 8], "texture": "#2"}, + "down": {"uv": [4, 5, 12, 6], "texture": "#0"} } }, { "name": "cube", - "from": [10, 4, 0], - "to": [12, 7, 6], + "from": [4, 11, 0], + "to": [5, 16, 8], "faces": { - "north": { - "uv": [4, 9, 6, 12], - "texture": "#0", - "cullface": "north" - }, - "west": {"uv": [5, 10, 11, 13], "texture": "#0"}, - "down": {"uv": [4, 12, 6, 13], "texture": "#0"} + "north": {"uv": [11, 0, 12, 5], "texture": "#0"}, + "east": {"uv": [4, 2, 12, 7], "texture": "#0"}, + "up": {"uv": [4, 0, 5, 8], "texture": "#2"}, + "down": {"uv": [4, 5, 12, 6], "texture": "#0"} } }, { "name": "cube", - "from": [6, 5, 0], - "to": [10, 7, 6], + "from": [3, 3, 0], + "to": [4, 16, 8], "faces": { - "north": { - "uv": [6, 9, 10, 11], + "north": {"uv": [12, 0, 13, 13], "texture": "#0"}, + "east": {"uv": [4, 0, 12, 13], "texture": "#0"}, + "up": {"uv": [5, 0, 6, 8], "texture": "#2"}, + "down": { + "uv": [3, 13, 11, 14], "texture": "#0", - "cullface": "north" - }, - "down": {"uv": [6, 11, 10, 13], "texture": "#0"} + "rotation": 90 + } } }, { "name": "cube", - "from": [0, 0, 6], - "to": [16, 7, 16], + "from": [12, 3, 0], + "to": [13, 16, 8], "faces": { - "north": {"uv": [0, 9, 16, 16], "texture": "#0"}, - "east": { - "uv": [0, 9, 10, 16], - "texture": "#1", - "cullface": "east" - }, - "south": { - "uv": [0, 9, 16, 16], - "texture": "#1", - "cullface": "south" - }, - "west": { - "uv": [6, 9, 16, 16], - "texture": "#1", - "cullface": "west" - }, + "north": {"uv": [3, 0, 4, 13], "texture": "#0"}, + "west": {"uv": [4, 0, 12, 13], "texture": "#0"}, + "up": {"uv": [12, 0, 13, 8], "texture": "#2"}, "down": { - "uv": [0, 0, 16, 10], - "texture": "#2", - "cullface": "down" + "uv": [3, 13, 11, 14], + "texture": "#0", + "rotation": 90 } } }, { "name": "cube", - "from": [3, 0, 0], - "to": [13, 0, 6], + "from": [4, 5, 0], + "to": [12, 6, 8], "faces": { - "north": { - "uv": [0, 0, 10, 0], - "texture": "#missing", - "cullface": "down" - }, - "east": { - "uv": [0, 0, 6, 0], - "texture": "#missing", - "cullface": "down" - }, - "south": { - "uv": [0, 0, 10, 0], - "texture": "#missing", - "cullface": "down" - }, - "west": { - "uv": [0, 0, 6, 0], - "texture": "#missing", - "cullface": "down" - }, - "up": { - "uv": [3, 16, 13, 15], - "texture": "#0", - "cullface": "down" - }, - "down": { - "uv": [3, 10, 13, 16], - "texture": "#2", - "cullface": "down" - } + "north": {"uv": [4, 10, 12, 11], "texture": "#0"}, + "down": {"uv": [4, 11, 12, 16], "texture": "#0"} } }, { "name": "cube", - "from": [12, 7, 0], - "to": [16, 16, 6], + "from": [4, 6, 0], + "to": [12, 9, 8], "faces": { - "north": { - "uv": [0, 0, 4, 9], - "texture": "#0", - "cullface": "north" - }, - "east": { - "uv": [10, 0, 16, 9], - "texture": "#1", - "cullface": "east" - }, - "west": {"uv": [4, 0, 10, 9], "texture": "#0"}, - "up": { - "uv": [12, 0, 16, 6], - "texture": "#2", - "cullface": "up" - } + "north": {"uv": [4, 7, 12, 10], "texture": "#0"}, + "up": {"uv": [4, 5, 12, 6], "texture": "#0"} } }, { "name": "cube", - "from": [0, 7, 0], - "to": [4, 16, 6], + "from": [0, 0, 8], + "to": [16, 16, 16], "faces": { - "north": { - "uv": [12, 0, 16, 9], - "texture": "#0", - "cullface": "north" - }, - "east": {"uv": [5, 0, 11, 9], "texture": "#0"}, - "west": { - "uv": [0, 0, 6, 9], - "texture": "#1", - "cullface": "west" - }, - "up": { - "uv": [0, 0, 4, 6], - "texture": "#2", - "cullface": "up" - } + "north": {"uv": [0, 0, 16, 16], "texture": "#0"}, + "east": {"uv": [0, 0, 8, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "west": {"uv": [8, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 8, 16, 16], "texture": "#2"} } }, { "name": "cube", - "from": [4, 12, 0], - "to": [12, 16, 6], + "from": [10, 4, 0], + "to": [12, 5, 8], "faces": { - "north": { - "uv": [4, 0, 12, 4], + "north": {"uv": [4, 11, 6, 12], "texture": "#0"}, + "west": {"uv": [4, 12, 12, 13], "texture": "#0"}, + "down": { + "uv": [4, 12, 12, 14], "texture": "#0", - "cullface": "north" - }, - "up": { - "uv": [4, 0, 12, 6], - "texture": "#2", - "cullface": "up" - }, - "down": {"uv": [5, 4, 11, 6], "texture": "#0"} + "rotation": 90 + } } }, { "name": "cube", - "from": [4, 11, 0], - "to": [5, 12, 6], + "from": [4, 4, 0], + "to": [6, 5, 8], "faces": { - "north": { - "uv": [11, 4, 12, 5], + "north": {"uv": [10, 11, 12, 12], "texture": "#0"}, + "east": {"uv": [4, 12, 12, 13], "texture": "#0"}, + "down": { + "uv": [4, 12, 12, 14], "texture": "#0", - "cullface": "north" - }, - "east": {"uv": [5, 4, 8, 5], "texture": "#0"}, - "down": {"uv": [5, 4, 11, 5], "texture": "#0"} + "rotation": 90 + } } }, { "name": "cube", - "from": [11, 11, 0], - "to": [12, 12, 6], + "from": [0, 0, 0], + "to": [16, 0, 16], "faces": { "north": { - "uv": [4, 4, 5, 5], - "texture": "#0", - "cullface": "north" + "uv": [0, 0, 16, 0], + "texture": "#missing" }, - "west": {"uv": [5, 4, 11, 5], "texture": "#0"}, - "down": {"uv": [7, 4, 8, 6], "texture": "#0"} - } - }, - { - "name": "cube", - "from": [0, 7, 6], - "to": [16, 16, 16], - "faces": { - "north": {"uv": [0, 0, 16, 9], "texture": "#0"}, "east": { - "uv": [0, 0, 10, 9], - "texture": "#1", - "cullface": "east" + "uv": [0, 0, 16, 0], + "texture": "#missing" }, "south": { - "uv": [0, 0, 16, 9], - "texture": "#1", - "cullface": "south" + "uv": [0, 0, 16, 0], + "texture": "#missing" }, "west": { - "uv": [6, 0, 16, 9], - "texture": "#1", - "cullface": "west" + "uv": [0, 0, 16, 0], + "texture": "#missing" }, "up": { - "uv": [0, 6, 16, 16], - "texture": "#2", - "cullface": "up" - } - } - }, - { - "name": "cube", - "from": [4, 7, 0], - "to": [12, 9, 6], - "faces": { - "north": { - "uv": [4, 7, 12, 9], + "uv": [4, 12, 12, 16], "texture": "#0", - "cullface": "north" + "rotation": 180 }, - "up": {"uv": [5, 4, 11, 7], "texture": "#0"} + "down": {"uv": [0, 0, 16, 16], "texture": "#2"} } } - ] + ], + "display": { + "thirdperson_righthand": { + "scale": [0.001, 0.001, 0.001], + "rotation": [75, 45, 0], + "translation": [0, 2.5, 0] + }, + "thirdperson_lefthand": { + "scale": [0.001, 0.001, 0.001], + "rotation": [75, 45, 0], + "translation": [0, 2.5, 0] + }, + "firstperson_righthand": { + "scale": [0.001, 0.001, 0.001], + "rotation": [0, 45, 0], + "translation": [0, 0, 0] + }, + "firstperson_lefthand": { + "scale": [0.001, 0.001, 0.001], + "rotation": [0, 225, 0], + "translation": [0, 0, 0] + }, + "head": { + "translation": [0, 17, 0], + "scale": [0.001, 0.001, 0.001] + }, + "ground": { + "scale": [0.001, 0.001, 0.001], + "rotation": [0, 0, 0], + "translation": [0, 3, 0] + }, + "fixed": { + "scale": [0.001, 0.001, 0.001], + "rotation": [0, 0, 0], + "translation": [0, 0, 0] + }, + "gui": { + "scale": [0.001, 0.001, 0.001], + "rotation": [30, 225, 0], + "translation": [0, 0, 0] + } + } } \ No newline at end of file diff --git a/src/main/resources/assets/nnparadisemod/models/block/lit_mossy_furnace.json b/src/main/resources/assets/nnparadisemod/models/block/lit_mossy_furnace.json index 3085049..9b7c288 100644 --- a/src/main/resources/assets/nnparadisemod/models/block/lit_mossy_furnace.json +++ b/src/main/resources/assets/nnparadisemod/models/block/lit_mossy_furnace.json @@ -13,22 +13,10 @@ "from": [0, 0, 0], "to": [3, 16, 8], "faces": { - "north": { - "uv": [13, 0, 16, 16], - "texture": "#0", - "cullface": "north" - }, + "north": {"uv": [13, 0, 16, 16], "texture": "#0"}, "east": {"uv": [13, 0, 5, 16], "texture": "#0"}, - "west": { - "uv": [0, 0, 8, 16], - "texture": "#1", - "cullface": "west" - }, - "up": { - "uv": [0, 0, 3, 8], - "texture": "#2", - "cullface": "up" - } + "west": {"uv": [0, 0, 8, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 3, 8], "texture": "#2"} } }, { @@ -36,22 +24,10 @@ "from": [13, 0, 0], "to": [16, 16, 8], "faces": { - "north": { - "uv": [0, 0, 3, 16], - "texture": "#0", - "cullface": "north" - }, - "east": { - "uv": [8, 0, 16, 16], - "texture": "#1", - "cullface": "east" - }, + "north": {"uv": [0, 0, 3, 16], "texture": "#0"}, + "east": {"uv": [8, 0, 16, 16], "texture": "#1"}, "west": {"uv": [11, 0, 3, 16], "texture": "#0"}, - "up": { - "uv": [13, 0, 16, 8], - "texture": "#2", - "cullface": "up" - } + "up": {"uv": [13, 0, 16, 8], "texture": "#2"} } }, { @@ -59,16 +35,8 @@ "from": [5, 12, 0], "to": [11, 16, 8], "faces": { - "north": { - "uv": [5, 0, 11, 4], - "texture": "#0", - "cullface": "north" - }, - "up": { - "uv": [5, 0, 11, 8], - "texture": "#2", - "cullface": "up" - }, + "north": {"uv": [5, 0, 11, 4], "texture": "#0"}, + "up": {"uv": [5, 0, 11, 8], "texture": "#2"}, "down": {"uv": [5, 4, 11, 6], "texture": "#0"} } }, @@ -77,17 +45,9 @@ "from": [11, 11, 0], "to": [12, 16, 8], "faces": { - "north": { - "uv": [4, 0, 5, 5], - "texture": "#0", - "cullface": "north" - }, + "north": {"uv": [4, 0, 5, 5], "texture": "#0"}, "west": {"uv": [4, 2, 12, 7], "texture": "#0"}, - "up": { - "uv": [11, 0, 12, 8], - "texture": "#2", - "cullface": "up" - }, + "up": {"uv": [11, 0, 12, 8], "texture": "#2"}, "down": {"uv": [4, 5, 12, 6], "texture": "#0"} } }, @@ -96,17 +56,9 @@ "from": [4, 11, 0], "to": [5, 16, 8], "faces": { - "north": { - "uv": [11, 0, 12, 5], - "texture": "#0", - "cullface": "north" - }, + "north": {"uv": [11, 0, 12, 5], "texture": "#0"}, "east": {"uv": [4, 2, 12, 7], "texture": "#0"}, - "up": { - "uv": [4, 0, 5, 8], - "texture": "#2", - "cullface": "up" - }, + "up": {"uv": [4, 0, 5, 8], "texture": "#2"}, "down": {"uv": [4, 5, 12, 6], "texture": "#0"} } }, @@ -115,17 +67,9 @@ "from": [3, 3, 0], "to": [4, 16, 8], "faces": { - "north": { - "uv": [12, 0, 13, 13], - "texture": "#0", - "cullface": "north" - }, + "north": {"uv": [12, 0, 13, 13], "texture": "#0"}, "east": {"uv": [4, 0, 12, 13], "texture": "#0"}, - "up": { - "uv": [5, 0, 6, 8], - "texture": "#2", - "cullface": "up" - }, + "up": {"uv": [5, 0, 6, 8], "texture": "#2"}, "down": { "uv": [3, 13, 11, 14], "texture": "#0", @@ -138,17 +82,9 @@ "from": [12, 3, 0], "to": [13, 16, 8], "faces": { - "north": { - "uv": [3, 0, 4, 13], - "texture": "#0", - "cullface": "north" - }, + "north": {"uv": [3, 0, 4, 13], "texture": "#0"}, "west": {"uv": [4, 0, 12, 13], "texture": "#0"}, - "up": { - "uv": [12, 0, 13, 8], - "texture": "#2", - "cullface": "up" - }, + "up": {"uv": [12, 0, 13, 8], "texture": "#2"}, "down": { "uv": [3, 13, 11, 14], "texture": "#0", @@ -161,11 +97,7 @@ "from": [4, 5, 0], "to": [12, 6, 8], "faces": { - "north": { - "uv": [4, 10, 12, 11], - "texture": "#0", - "cullface": "north" - }, + "north": {"uv": [4, 10, 12, 11], "texture": "#0"}, "down": {"uv": [4, 11, 12, 16], "texture": "#0"} } }, @@ -174,11 +106,7 @@ "from": [4, 6, 0], "to": [12, 9, 8], "faces": { - "north": { - "uv": [4, 7, 12, 10], - "texture": "#0", - "cullface": "north" - }, + "north": {"uv": [4, 7, 12, 10], "texture": "#0"}, "up": {"uv": [4, 5, 12, 6], "texture": "#0"} } }, @@ -188,26 +116,10 @@ "to": [16, 16, 16], "faces": { "north": {"uv": [0, 0, 16, 16], "texture": "#0"}, - "east": { - "uv": [0, 0, 8, 16], - "texture": "#1", - "cullface": "east" - }, - "south": { - "uv": [0, 0, 16, 16], - "texture": "#1", - "cullface": "south" - }, - "west": { - "uv": [8, 0, 16, 16], - "texture": "#1", - "cullface": "west" - }, - "up": { - "uv": [0, 8, 16, 16], - "texture": "#2", - "cullface": "up" - } + "east": {"uv": [0, 0, 8, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "west": {"uv": [8, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 8, 16, 16], "texture": "#2"} } }, { @@ -215,11 +127,7 @@ "from": [10, 4, 0], "to": [12, 5, 8], "faces": { - "north": { - "uv": [4, 11, 6, 12], - "texture": "#0", - "cullface": "north" - }, + "north": {"uv": [4, 11, 6, 12], "texture": "#0"}, "west": {"uv": [4, 12, 12, 13], "texture": "#0"}, "down": { "uv": [4, 12, 12, 14], @@ -233,11 +141,7 @@ "from": [4, 4, 0], "to": [6, 5, 8], "faces": { - "north": { - "uv": [10, 11, 12, 12], - "texture": "#0", - "cullface": "north" - }, + "north": {"uv": [10, 11, 12, 12], "texture": "#0"}, "east": {"uv": [4, 12, 12, 13], "texture": "#0"}, "down": { "uv": [4, 12, 12, 14], @@ -253,36 +157,68 @@ "faces": { "north": { "uv": [0, 0, 16, 0], - "texture": "#missing", - "cullface": "down" + "texture": "#missing" }, "east": { "uv": [0, 0, 16, 0], - "texture": "#missing", - "cullface": "down" + "texture": "#missing" }, "south": { "uv": [0, 0, 16, 0], - "texture": "#missing", - "cullface": "down" + "texture": "#missing" }, "west": { "uv": [0, 0, 16, 0], - "texture": "#missing", - "cullface": "west" + "texture": "#missing" }, "up": { "uv": [4, 12, 12, 16], "texture": "#0", - "rotation": 180, - "cullface": "down" + "rotation": 180 }, - "down": { - "uv": [0, 0, 16, 16], - "texture": "#2", - "cullface": "down" - } + "down": {"uv": [0, 0, 16, 16], "texture": "#2"} } } - ] + ], + "display": { + "thirdperson_righthand": { + "scale": [0.001, 0.001, 0.001], + "rotation": [75, 45, 0], + "translation": [0, 2.5, 0] + }, + "thirdperson_lefthand": { + "scale": [0.001, 0.001, 0.001], + "rotation": [75, 45, 0], + "translation": [0, 2.5, 0] + }, + "firstperson_righthand": { + "scale": [0.001, 0.001, 0.001], + "rotation": [0, 45, 0], + "translation": [0, 0, 0] + }, + "firstperson_lefthand": { + "scale": [0.001, 0.001, 0.001], + "rotation": [0, 225, 0], + "translation": [0, 0, 0] + }, + "head": { + "translation": [0, 17, 0], + "scale": [0.001, 0.001, 0.001] + }, + "ground": { + "scale": [0.001, 0.001, 0.001], + "rotation": [0, 0, 0], + "translation": [0, 3, 0] + }, + "fixed": { + "scale": [0.001, 0.001, 0.001], + "rotation": [0, 0, 0], + "translation": [0, 0, 0] + }, + "gui": { + "scale": [0.001, 0.001, 0.001], + "rotation": [30, 225, 0], + "translation": [0, 0, 0] + } + } } diff --git a/src/main/resources/assets/nnparadisemod/models/block/lit_void_furnace.json b/src/main/resources/assets/nnparadisemod/models/block/lit_void_furnace.json index ce4bc84..f72e435 100644 --- a/src/main/resources/assets/nnparadisemod/models/block/lit_void_furnace.json +++ b/src/main/resources/assets/nnparadisemod/models/block/lit_void_furnace.json @@ -13,22 +13,10 @@ "from": [0, 0, 0], "to": [3, 16, 8], "faces": { - "north": { - "uv": [13, 0, 16, 16], - "texture": "#0", - "cullface": "north" - }, + "north": {"uv": [13, 0, 16, 16], "texture": "#0"}, "east": {"uv": [13, 0, 5, 16], "texture": "#0"}, - "west": { - "uv": [0, 0, 8, 16], - "texture": "#1", - "cullface": "west" - }, - "up": { - "uv": [0, 0, 3, 8], - "texture": "#2", - "cullface": "up" - } + "west": {"uv": [0, 0, 8, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 3, 8], "texture": "#2"} } }, { @@ -36,22 +24,10 @@ "from": [13, 0, 0], "to": [16, 16, 8], "faces": { - "north": { - "uv": [0, 0, 3, 16], - "texture": "#0", - "cullface": "north" - }, - "east": { - "uv": [8, 0, 16, 16], - "texture": "#1", - "cullface": "east" - }, + "north": {"uv": [0, 0, 3, 16], "texture": "#0"}, + "east": {"uv": [8, 0, 16, 16], "texture": "#1"}, "west": {"uv": [11, 0, 3, 16], "texture": "#0"}, - "up": { - "uv": [13, 0, 16, 8], - "texture": "#2", - "cullface": "up" - } + "up": {"uv": [13, 0, 16, 8], "texture": "#2"} } }, { @@ -59,16 +35,8 @@ "from": [5, 12, 0], "to": [11, 16, 8], "faces": { - "north": { - "uv": [5, 0, 11, 4], - "texture": "#0", - "cullface": "north" - }, - "up": { - "uv": [5, 0, 11, 8], - "texture": "#2", - "cullface": "up" - }, + "north": {"uv": [5, 0, 11, 4], "texture": "#0"}, + "up": {"uv": [5, 0, 11, 8], "texture": "#2"}, "down": {"uv": [5, 4, 11, 6], "texture": "#0"} } }, @@ -77,17 +45,9 @@ "from": [11, 11, 0], "to": [12, 16, 8], "faces": { - "north": { - "uv": [4, 0, 5, 5], - "texture": "#0", - "cullface": "north" - }, + "north": {"uv": [4, 0, 5, 5], "texture": "#0"}, "west": {"uv": [4, 2, 12, 7], "texture": "#0"}, - "up": { - "uv": [11, 0, 12, 8], - "texture": "#2", - "cullface": "up" - }, + "up": {"uv": [11, 0, 12, 8], "texture": "#2"}, "down": {"uv": [4, 5, 12, 6], "texture": "#0"} } }, @@ -96,17 +56,9 @@ "from": [4, 11, 0], "to": [5, 16, 8], "faces": { - "north": { - "uv": [11, 0, 12, 5], - "texture": "#0", - "cullface": "north" - }, + "north": {"uv": [11, 0, 12, 5], "texture": "#0"}, "east": {"uv": [4, 2, 12, 7], "texture": "#0"}, - "up": { - "uv": [4, 0, 5, 8], - "texture": "#2", - "cullface": "up" - }, + "up": {"uv": [4, 0, 5, 8], "texture": "#2"}, "down": {"uv": [4, 5, 12, 6], "texture": "#0"} } }, @@ -115,17 +67,9 @@ "from": [3, 3, 0], "to": [4, 16, 8], "faces": { - "north": { - "uv": [12, 0, 13, 13], - "texture": "#0", - "cullface": "north" - }, + "north": {"uv": [12, 0, 13, 13], "texture": "#0"}, "east": {"uv": [4, 0, 12, 13], "texture": "#0"}, - "up": { - "uv": [5, 0, 6, 8], - "texture": "#2", - "cullface": "up" - }, + "up": {"uv": [5, 0, 6, 8], "texture": "#2"}, "down": { "uv": [3, 13, 11, 14], "texture": "#0", @@ -138,17 +82,9 @@ "from": [12, 3, 0], "to": [13, 16, 8], "faces": { - "north": { - "uv": [3, 0, 4, 13], - "texture": "#0", - "cullface": "north" - }, + "north": {"uv": [3, 0, 4, 13], "texture": "#0"}, "west": {"uv": [4, 0, 12, 13], "texture": "#0"}, - "up": { - "uv": [12, 0, 13, 8], - "texture": "#2", - "cullface": "up" - }, + "up": {"uv": [12, 0, 13, 8], "texture": "#2"}, "down": { "uv": [3, 13, 11, 14], "texture": "#0", @@ -161,11 +97,7 @@ "from": [4, 5, 0], "to": [12, 6, 8], "faces": { - "north": { - "uv": [4, 10, 12, 11], - "texture": "#0", - "cullface": "north" - }, + "north": {"uv": [4, 10, 12, 11], "texture": "#0"}, "down": {"uv": [4, 11, 12, 16], "texture": "#0"} } }, @@ -174,11 +106,7 @@ "from": [4, 6, 0], "to": [12, 9, 8], "faces": { - "north": { - "uv": [4, 7, 12, 10], - "texture": "#0", - "cullface": "north" - }, + "north": {"uv": [4, 7, 12, 10], "texture": "#0"}, "up": {"uv": [4, 5, 12, 6], "texture": "#0"} } }, @@ -188,26 +116,10 @@ "to": [16, 16, 16], "faces": { "north": {"uv": [0, 0, 16, 16], "texture": "#0"}, - "east": { - "uv": [0, 0, 8, 16], - "texture": "#1", - "cullface": "east" - }, - "south": { - "uv": [0, 0, 16, 16], - "texture": "#1", - "cullface": "south" - }, - "west": { - "uv": [8, 0, 16, 16], - "texture": "#1", - "cullface": "west" - }, - "up": { - "uv": [0, 8, 16, 16], - "texture": "#2", - "cullface": "up" - } + "east": {"uv": [0, 0, 8, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "west": {"uv": [8, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 8, 16, 16], "texture": "#2"} } }, { @@ -215,11 +127,7 @@ "from": [10, 4, 0], "to": [12, 5, 8], "faces": { - "north": { - "uv": [4, 11, 6, 12], - "texture": "#0", - "cullface": "north" - }, + "north": {"uv": [4, 11, 6, 12], "texture": "#0"}, "west": {"uv": [4, 12, 12, 13], "texture": "#0"}, "down": { "uv": [4, 12, 12, 14], @@ -233,11 +141,7 @@ "from": [4, 4, 0], "to": [6, 5, 8], "faces": { - "north": { - "uv": [10, 11, 12, 12], - "texture": "#0", - "cullface": "north" - }, + "north": {"uv": [10, 11, 12, 12], "texture": "#0"}, "east": {"uv": [4, 12, 12, 13], "texture": "#0"}, "down": { "uv": [4, 12, 12, 14], @@ -253,35 +157,26 @@ "faces": { "north": { "uv": [0, 0, 16, 0], - "texture": "#missing", - "cullface": "down" + "texture": "#missing" }, "east": { "uv": [0, 0, 16, 0], - "texture": "#missing", - "cullface": "down" + "texture": "#missing" }, "south": { "uv": [0, 0, 16, 0], - "texture": "#missing", - "cullface": "down" + "texture": "#missing" }, "west": { "uv": [0, 0, 16, 0], - "texture": "#missing", - "cullface": "west" + "texture": "#missing" }, "up": { "uv": [4, 12, 12, 16], "texture": "#0", - "rotation": 180, - "cullface": "down" + "rotation": 180 }, - "down": { - "uv": [0, 0, 16, 16], - "texture": "#2", - "cullface": "down" - } + "down": {"uv": [0, 0, 16, 16], "texture": "#2"} } } ], diff --git a/src/main/resources/assets/nnparadisemod/models/block/mossy_furnace.json b/src/main/resources/assets/nnparadisemod/models/block/mossy_furnace.json index 8dedcdb..0b41060 100644 --- a/src/main/resources/assets/nnparadisemod/models/block/mossy_furnace.json +++ b/src/main/resources/assets/nnparadisemod/models/block/mossy_furnace.json @@ -13,22 +13,10 @@ "from": [0, 0, 0], "to": [3, 16, 8], "faces": { - "north": { - "uv": [13, 0, 16, 16], - "texture": "#0", - "cullface": "north" - }, + "north": {"uv": [13, 0, 16, 16], "texture": "#0"}, "east": {"uv": [13, 0, 5, 16], "texture": "#0"}, - "west": { - "uv": [0, 0, 8, 16], - "texture": "#1", - "cullface": "west" - }, - "up": { - "uv": [0, 0, 3, 8], - "texture": "#2", - "cullface": "up" - } + "west": {"uv": [0, 0, 8, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 3, 8], "texture": "#2"} } }, { @@ -36,22 +24,10 @@ "from": [13, 0, 0], "to": [16, 16, 8], "faces": { - "north": { - "uv": [0, 0, 3, 16], - "texture": "#0", - "cullface": "north" - }, - "east": { - "uv": [8, 0, 16, 16], - "texture": "#1", - "cullface": "east" - }, + "north": {"uv": [0, 0, 3, 16], "texture": "#0"}, + "east": {"uv": [8, 0, 16, 16], "texture": "#1"}, "west": {"uv": [11, 0, 3, 16], "texture": "#0"}, - "up": { - "uv": [13, 0, 16, 8], - "texture": "#2", - "cullface": "up" - } + "up": {"uv": [13, 0, 16, 8], "texture": "#2"} } }, { @@ -59,16 +35,8 @@ "from": [5, 12, 0], "to": [11, 16, 8], "faces": { - "north": { - "uv": [5, 0, 11, 4], - "texture": "#0", - "cullface": "north" - }, - "up": { - "uv": [5, 0, 11, 8], - "texture": "#2", - "cullface": "up" - }, + "north": {"uv": [5, 0, 11, 4], "texture": "#0"}, + "up": {"uv": [5, 0, 11, 8], "texture": "#2"}, "down": {"uv": [5, 4, 11, 6], "texture": "#0"} } }, @@ -77,17 +45,9 @@ "from": [11, 11, 0], "to": [12, 16, 8], "faces": { - "north": { - "uv": [4, 0, 5, 5], - "texture": "#0", - "cullface": "north" - }, + "north": {"uv": [4, 0, 5, 5], "texture": "#0"}, "west": {"uv": [4, 2, 12, 7], "texture": "#0"}, - "up": { - "uv": [11, 0, 12, 8], - "texture": "#2", - "cullface": "up" - }, + "up": {"uv": [11, 0, 12, 8], "texture": "#2"}, "down": {"uv": [4, 5, 12, 6], "texture": "#0"} } }, @@ -96,17 +56,9 @@ "from": [4, 11, 0], "to": [5, 16, 8], "faces": { - "north": { - "uv": [11, 0, 12, 5], - "texture": "#0", - "cullface": "north" - }, + "north": {"uv": [11, 0, 12, 5], "texture": "#0"}, "east": {"uv": [4, 2, 12, 7], "texture": "#0"}, - "up": { - "uv": [4, 0, 5, 8], - "texture": "#2", - "cullface": "up" - }, + "up": {"uv": [4, 0, 5, 8], "texture": "#2"}, "down": {"uv": [4, 5, 12, 6], "texture": "#0"} } }, @@ -115,17 +67,9 @@ "from": [3, 3, 0], "to": [4, 16, 8], "faces": { - "north": { - "uv": [12, 0, 13, 13], - "texture": "#0", - "cullface": "north" - }, + "north": {"uv": [12, 0, 13, 13], "texture": "#0"}, "east": {"uv": [4, 0, 12, 13], "texture": "#0"}, - "up": { - "uv": [5, 0, 6, 8], - "texture": "#2", - "cullface": "up" - }, + "up": {"uv": [5, 0, 6, 8], "texture": "#2"}, "down": { "uv": [3, 13, 11, 14], "texture": "#0", @@ -138,17 +82,9 @@ "from": [12, 3, 0], "to": [13, 16, 8], "faces": { - "north": { - "uv": [3, 0, 4, 13], - "texture": "#0", - "cullface": "north" - }, + "north": {"uv": [3, 0, 4, 13], "texture": "#0"}, "west": {"uv": [4, 0, 12, 13], "texture": "#0"}, - "up": { - "uv": [12, 0, 13, 8], - "texture": "#2", - "cullface": "up" - }, + "up": {"uv": [12, 0, 13, 8], "texture": "#2"}, "down": { "uv": [3, 13, 11, 14], "texture": "#0", @@ -161,11 +97,7 @@ "from": [4, 5, 0], "to": [12, 6, 8], "faces": { - "north": { - "uv": [4, 10, 12, 11], - "texture": "#0", - "cullface": "north" - }, + "north": {"uv": [4, 10, 12, 11], "texture": "#0"}, "down": {"uv": [4, 11, 12, 16], "texture": "#0"} } }, @@ -174,11 +106,7 @@ "from": [4, 6, 0], "to": [12, 9, 8], "faces": { - "north": { - "uv": [4, 7, 12, 10], - "texture": "#0", - "cullface": "north" - }, + "north": {"uv": [4, 7, 12, 10], "texture": "#0"}, "up": {"uv": [4, 5, 12, 6], "texture": "#0"} } }, @@ -188,26 +116,10 @@ "to": [16, 16, 16], "faces": { "north": {"uv": [0, 0, 16, 16], "texture": "#0"}, - "east": { - "uv": [0, 0, 8, 16], - "texture": "#1", - "cullface": "east" - }, - "south": { - "uv": [0, 0, 16, 16], - "texture": "#1", - "cullface": "south" - }, - "west": { - "uv": [8, 0, 16, 16], - "texture": "#1", - "cullface": "west" - }, - "up": { - "uv": [0, 8, 16, 16], - "texture": "#2", - "cullface": "up" - } + "east": {"uv": [0, 0, 8, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "west": {"uv": [8, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 8, 16, 16], "texture": "#2"} } }, { @@ -215,11 +127,7 @@ "from": [10, 4, 0], "to": [12, 5, 8], "faces": { - "north": { - "uv": [4, 11, 6, 12], - "texture": "#0", - "cullface": "north" - }, + "north": {"uv": [4, 11, 6, 12], "texture": "#0"}, "west": {"uv": [4, 12, 12, 13], "texture": "#0"}, "down": { "uv": [4, 12, 12, 14], @@ -233,11 +141,7 @@ "from": [4, 4, 0], "to": [6, 5, 8], "faces": { - "north": { - "uv": [10, 11, 12, 12], - "texture": "#0", - "cullface": "north" - }, + "north": {"uv": [10, 11, 12, 12], "texture": "#0"}, "east": {"uv": [4, 12, 12, 13], "texture": "#0"}, "down": { "uv": [4, 12, 12, 14], @@ -253,72 +157,66 @@ "faces": { "north": { "uv": [0, 0, 16, 0], - "texture": "#missing", - "cullface": "down" + "texture": "#missing" }, "east": { "uv": [0, 0, 16, 0], - "texture": "#missing", - "cullface": "down" + "texture": "#missing" }, "south": { "uv": [0, 0, 16, 0], - "texture": "#missing", - "cullface": "down" + "texture": "#missing" }, "west": { "uv": [0, 0, 16, 0], - "texture": "#missing", - "cullface": "west" + "texture": "#missing" }, "up": { "uv": [4, 12, 12, 16], "texture": "#0", - "rotation": 180, - "cullface": "down" + "rotation": 180 }, - "down": { - "uv": [0, 0, 16, 16], - "texture": "#2", - "cullface": "down" - } + "down": {"uv": [0, 0, 16, 16], "texture": "#2"} } } ], "display": { "thirdperson_righthand": { - "scale": [0.375, 0.375, 0.375], + "scale": [0.001, 0.001, 0.001], "rotation": [75, 45, 0], "translation": [0, 2.5, 0] }, "thirdperson_lefthand": { - "scale": [0.375, 0.375, 0.375], + "scale": [0.001, 0.001, 0.001], "rotation": [75, 45, 0], "translation": [0, 2.5, 0] }, "firstperson_righthand": { - "scale": [0.4, 0.4, 0.4], + "scale": [0.001, 0.001, 0.001], "rotation": [0, 45, 0], "translation": [0, 0, 0] }, "firstperson_lefthand": { - "scale": [0.4, 0.4, 0.4], + "scale": [0.001, 0.001, 0.001], "rotation": [0, 225, 0], "translation": [0, 0, 0] }, - "head": {"translation": [0, -1.5, 0]}, + "head": { + "translation": [0, 17, 0], + "scale": [0.001, 0.001, 0.001] + }, "ground": { - "scale": [0.25, 0.25, 0.25], + "scale": [0.001, 0.001, 0.001], "rotation": [0, 0, 0], "translation": [0, 3, 0] }, "fixed": { - "scale": [0.5, 0.5, 0.5], + "scale": [0.001, 0.001, 0.001], "rotation": [0, 0, 0], "translation": [0, 0, 0] }, "gui": { - "scale": [0.625, 0.625, 0.625], + "scale": [0.001, 0.001, 0.001], "rotation": [30, 225, 0], "translation": [0, 0, 0] } diff --git a/src/main/resources/assets/nnparadisemod/models/item/void_furnace.json b/src/main/resources/assets/nnparadisemod/models/item/void_furnace.json index adce2e0..002d23d 100644 --- a/src/main/resources/assets/nnparadisemod/models/item/void_furnace.json +++ b/src/main/resources/assets/nnparadisemod/models/item/void_furnace.json @@ -13,10 +13,22 @@ "from": [0, 0, 0], "to": [3, 16, 8], "faces": { - "north": {"uv": [13, 0, 16, 16], "texture": "#0"}, + "north": { + "uv": [13, 0, 16, 16], + "texture": "#0", + "cullface": "north" + }, "east": {"uv": [13, 0, 5, 16], "texture": "#0"}, - "west": {"uv": [0, 0, 8, 16], "texture": "#1"}, - "up": {"uv": [0, 0, 3, 8], "texture": "#2"} + "west": { + "uv": [0, 0, 8, 16], + "texture": "#1", + "cullface": "west" + }, + "up": { + "uv": [0, 0, 3, 8], + "texture": "#2", + "cullface": "up" + } } }, { @@ -24,10 +36,22 @@ "from": [13, 0, 0], "to": [16, 16, 8], "faces": { - "north": {"uv": [0, 0, 3, 16], "texture": "#0"}, - "east": {"uv": [8, 0, 16, 16], "texture": "#1"}, + "north": { + "uv": [0, 0, 3, 16], + "texture": "#0", + "cullface": "north" + }, + "east": { + "uv": [8, 0, 16, 16], + "texture": "#1", + "cullface": "east" + }, "west": {"uv": [11, 0, 3, 16], "texture": "#0"}, - "up": {"uv": [13, 0, 16, 8], "texture": "#2"} + "up": { + "uv": [13, 0, 16, 8], + "texture": "#2", + "cullface": "up" + } } }, { @@ -35,8 +59,16 @@ "from": [5, 12, 0], "to": [11, 16, 8], "faces": { - "north": {"uv": [5, 0, 11, 4], "texture": "#0"}, - "up": {"uv": [5, 0, 11, 8], "texture": "#2"}, + "north": { + "uv": [5, 0, 11, 4], + "texture": "#0", + "cullface": "north" + }, + "up": { + "uv": [5, 0, 11, 8], + "texture": "#2", + "cullface": "up" + }, "down": {"uv": [5, 4, 11, 6], "texture": "#0"} } }, @@ -45,9 +77,17 @@ "from": [11, 11, 0], "to": [12, 16, 8], "faces": { - "north": {"uv": [4, 0, 5, 5], "texture": "#0"}, + "north": { + "uv": [4, 0, 5, 5], + "texture": "#0", + "cullface": "north" + }, "west": {"uv": [4, 2, 12, 7], "texture": "#0"}, - "up": {"uv": [11, 0, 12, 8], "texture": "#2"}, + "up": { + "uv": [11, 0, 12, 8], + "texture": "#2", + "cullface": "up" + }, "down": {"uv": [4, 5, 12, 6], "texture": "#0"} } }, @@ -56,9 +96,17 @@ "from": [4, 11, 0], "to": [5, 16, 8], "faces": { - "north": {"uv": [11, 0, 12, 5], "texture": "#0"}, + "north": { + "uv": [11, 0, 12, 5], + "texture": "#0", + "cullface": "north" + }, "east": {"uv": [4, 2, 12, 7], "texture": "#0"}, - "up": {"uv": [4, 0, 5, 8], "texture": "#2"}, + "up": { + "uv": [4, 0, 5, 8], + "texture": "#2", + "cullface": "up" + }, "down": {"uv": [4, 5, 12, 6], "texture": "#0"} } }, @@ -67,9 +115,17 @@ "from": [3, 3, 0], "to": [4, 16, 8], "faces": { - "north": {"uv": [12, 0, 13, 13], "texture": "#0"}, + "north": { + "uv": [12, 0, 13, 13], + "texture": "#0", + "cullface": "north" + }, "east": {"uv": [4, 0, 12, 13], "texture": "#0"}, - "up": {"uv": [5, 0, 6, 8], "texture": "#2"}, + "up": { + "uv": [5, 0, 6, 8], + "texture": "#2", + "cullface": "up" + }, "down": { "uv": [3, 13, 11, 14], "texture": "#0", @@ -82,9 +138,17 @@ "from": [12, 3, 0], "to": [13, 16, 8], "faces": { - "north": {"uv": [3, 0, 4, 13], "texture": "#0"}, + "north": { + "uv": [3, 0, 4, 13], + "texture": "#0", + "cullface": "north" + }, "west": {"uv": [4, 0, 12, 13], "texture": "#0"}, - "up": {"uv": [12, 0, 13, 8], "texture": "#2"}, + "up": { + "uv": [12, 0, 13, 8], + "texture": "#2", + "cullface": "up" + }, "down": { "uv": [3, 13, 11, 14], "texture": "#0", @@ -97,7 +161,11 @@ "from": [4, 5, 0], "to": [12, 6, 8], "faces": { - "north": {"uv": [4, 10, 12, 11], "texture": "#0"}, + "north": { + "uv": [4, 10, 12, 11], + "texture": "#0", + "cullface": "north" + }, "down": {"uv": [4, 11, 12, 16], "texture": "#0"} } }, @@ -106,7 +174,11 @@ "from": [4, 6, 0], "to": [12, 9, 8], "faces": { - "north": {"uv": [4, 7, 12, 10], "texture": "#0"}, + "north": { + "uv": [4, 7, 12, 10], + "texture": "#0", + "cullface": "north" + }, "up": {"uv": [4, 5, 12, 6], "texture": "#0"} } }, @@ -116,10 +188,26 @@ "to": [16, 16, 16], "faces": { "north": {"uv": [0, 0, 16, 16], "texture": "#0"}, - "east": {"uv": [0, 0, 8, 16], "texture": "#1"}, - "south": {"uv": [0, 0, 16, 16], "texture": "#1"}, - "west": {"uv": [8, 0, 16, 16], "texture": "#1"}, - "up": {"uv": [0, 8, 16, 16], "texture": "#2"} + "east": { + "uv": [0, 0, 8, 16], + "texture": "#1", + "cullface": "east" + }, + "south": { + "uv": [0, 0, 16, 16], + "texture": "#1", + "cullface": "south" + }, + "west": { + "uv": [8, 0, 16, 16], + "texture": "#1", + "cullface": "west" + }, + "up": { + "uv": [0, 8, 16, 16], + "texture": "#2", + "cullface": "up" + } } }, { @@ -127,7 +215,11 @@ "from": [10, 4, 0], "to": [12, 5, 8], "faces": { - "north": {"uv": [4, 11, 6, 12], "texture": "#0"}, + "north": { + "uv": [4, 11, 6, 12], + "texture": "#0", + "cullface": "north" + }, "west": {"uv": [4, 12, 12, 13], "texture": "#0"}, "down": { "uv": [4, 12, 12, 14], @@ -141,7 +233,11 @@ "from": [4, 4, 0], "to": [6, 5, 8], "faces": { - "north": {"uv": [10, 11, 12, 12], "texture": "#0"}, + "north": { + "uv": [10, 11, 12, 12], + "texture": "#0", + "cullface": "north" + }, "east": {"uv": [4, 12, 12, 13], "texture": "#0"}, "down": { "uv": [4, 12, 12, 14], @@ -157,66 +253,72 @@ "faces": { "north": { "uv": [0, 0, 16, 0], - "texture": "#missing" + "texture": "#missing", + "cullface": "down" }, "east": { "uv": [0, 0, 16, 0], - "texture": "#missing" + "texture": "#missing", + "cullface": "down" }, "south": { "uv": [0, 0, 16, 0], - "texture": "#missing" + "texture": "#missing", + "cullface": "down" }, "west": { "uv": [0, 0, 16, 0], - "texture": "#missing" + "texture": "#missing", + "cullface": "west" }, "up": { "uv": [4, 12, 12, 16], "texture": "#0", - "rotation": 180 + "rotation": 180, + "cullface": "down" }, - "down": {"uv": [0, 0, 16, 16], "texture": "#2"} + "down": { + "uv": [0, 0, 16, 16], + "texture": "#2", + "cullface": "down" + } } } ], "display": { "thirdperson_righthand": { - "scale": [0.001, 0.001, 0.001], + "scale": [0.375, 0.375, 0.375], "rotation": [75, 45, 0], "translation": [0, 2.5, 0] }, "thirdperson_lefthand": { - "scale": [0.001, 0.001, 0.001], + "scale": [0.375, 0.375, 0.375], "rotation": [75, 45, 0], "translation": [0, 2.5, 0] }, "firstperson_righthand": { - "scale": [0.001, 0.001, 0.001], + "scale": [0.4, 0.4, 0.4], "rotation": [0, 45, 0], "translation": [0, 0, 0] }, "firstperson_lefthand": { - "scale": [0.001, 0.001, 0.001], + "scale": [0.4, 0.4, 0.4], "rotation": [0, 225, 0], "translation": [0, 0, 0] }, - "head": { - "translation": [0, 17, 0], - "scale": [0.001, 0.001, 0.001] - }, + "head": {"translation": [0, -1.5, 0]}, "ground": { - "scale": [0.001, 0.001, 0.001], + "scale": [0.25, 0.25, 0.25], "rotation": [0, 0, 0], "translation": [0, 3, 0] }, "fixed": { - "scale": [0.001, 0.001, 0.001], + "scale": [0.5, 0.5, 0.5], "rotation": [0, 0, 0], "translation": [0, 0, 0] }, "gui": { - "scale": [0.001, 0.001, 0.001], + "scale": [0.625, 0.625, 0.625], "rotation": [30, 225, 0], "translation": [0, 0, 0] } diff --git a/src/main/resources/assets/nnparadisemod/recipes/black_dye.json b/src/main/resources/assets/nnparadisemod/recipes/black_dye.json new file mode 100644 index 0000000..5a28d47 --- /dev/null +++ b/src/main/resources/assets/nnparadisemod/recipes/black_dye.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "#" + ], + "key": { + "#": { + "item": "minecraft:coal", + "data":0 + } + }, + "result": { + "item": "nnparadisemod:black_dye", + "count": 2 + } +}