Skip to content
This repository has been archived by the owner on Aug 22, 2019. It is now read-only.

Commit

Permalink
Bug Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahJelen committed Jun 13, 2018
1 parent 0ba3aac commit da6b0a7
Show file tree
Hide file tree
Showing 55 changed files with 972 additions and 1,017 deletions.
7 changes: 7 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
1 change: 1 addition & 0 deletions modpack usage.txt
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
Expand Up @@ -53,30 +53,20 @@ public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, World world
public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> 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
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand All @@ -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:
Expand All @@ -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);
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}
}
Expand All @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
}
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -82,9 +74,7 @@ protected int computeRedstoneStrength(World worldIn, BlockPos pos)
for (Entity entity : list)
{
if (!entity.doesEntityNotTriggerPressurePlate())
{
return 1;
}
}
}
return 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand All @@ -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:
Expand All @@ -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);
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading

0 comments on commit da6b0a7

Please sign in to comment.