Skip to content

Commit

Permalink
Fixed particles not rendering correctly on the first placed support b…
Browse files Browse the repository at this point in the history
…lock, fixed shrink itemstack consuming one unit more on support horizontal placement
  • Loading branch information
DisasterMoo committed Jul 1, 2019
1 parent e6b6581 commit 4e4206a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -217,7 +217,7 @@ public boolean canPlaceBlockAt(World worldIn, @Nonnull BlockPos pos)
public IBlockState getStateForPlacement(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) public IBlockState getStateForPlacement(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)
{ {
return this.getDefaultState() return this.getDefaultState()
.withProperty(AXIS, BlockLog.EnumAxis.NONE) .withProperty(AXIS, BlockLog.EnumAxis.Y)
.withProperty(NORTH, false) .withProperty(NORTH, false)
.withProperty(SOUTH, false) .withProperty(SOUTH, false)
.withProperty(EAST, false) .withProperty(EAST, false)
Expand Down Expand Up @@ -268,7 +268,7 @@ public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, Enti
} }
else if (distance > 0) else if (distance > 0)
{ {
stack.shrink(distance); stack.shrink(distance-1); //-1 because the first one is already placed by onBlockPlace
for (int i = 1; i < distance; i++) for (int i = 1; i < distance; i++)
{ {
if (worldIn.getBlockState(pos.offset(face, i)).getMaterial().isReplaceable()) if (worldIn.getBlockState(pos.offset(face, i)).getMaterial().isReplaceable())
Expand Down

0 comments on commit 4e4206a

Please sign in to comment.