mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 02:20:01 +03:00
23 lines
1.2 KiB
Diff
23 lines
1.2 KiB
Diff
--- ../src-base/minecraft/net/minecraft/item/ItemSnow.java
|
|
+++ ../src-work/minecraft/net/minecraft/item/ItemSnow.java
|
|
@@ -51,7 +51,7 @@
|
|
|
|
if (axisalignedbb != Block.NULL_AABB && worldIn.checkNoEntityCollision(axisalignedbb.offset(blockpos)) && worldIn.setBlockState(blockpos, iblockstate1, 10))
|
|
{
|
|
- SoundType soundtype = this.block.getSoundType();
|
|
+ SoundType soundtype = this.block.getSoundType(iblockstate1, worldIn, pos, player);
|
|
worldIn.playSound(player, blockpos, soundtype.getPlaceSound(), SoundCategory.BLOCKS, (soundtype.getVolume() + 1.0F) / 2.0F, soundtype.getPitch() * 0.8F);
|
|
|
|
if (player instanceof EntityPlayerMP)
|
|
@@ -77,4 +77,10 @@
|
|
{
|
|
return damage;
|
|
}
|
|
+
|
|
+ public boolean canPlaceBlockOnSide(World world, BlockPos pos, EnumFacing side, EntityPlayer player, ItemStack stack)
|
|
+ {
|
|
+ IBlockState state = world.getBlockState(pos);
|
|
+ return (state.getBlock() != net.minecraft.init.Blocks.SNOW_LAYER || ((Integer)state.getValue(BlockSnow.LAYERS)) > 7) ? super.canPlaceBlockOnSide(world, pos, side, player, stack) : true;
|
|
+ }
|
|
}
|