Fixed cloud door's not returning the correct item when middle clicked

This commit is contained in:
Sollace 2019-02-23 00:00:50 +02:00
parent ea21cfa594
commit ad692abcd7

View file

@ -14,6 +14,7 @@ import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
@ -29,7 +30,7 @@ public class BlockCloudDoor extends BlockDoor implements ICloudBlock {
setTranslationKey(name);
setRegistryName(domain, name);
setSoundType(SoundType.CLOTH);
setHardness(1);
setHardness(3);
setResistance(200);
}
@ -49,9 +50,6 @@ public class BlockCloudDoor extends BlockDoor implements ICloudBlock {
return false;
}
setHardness(3);
setResistance(200);
return super.onBlockActivated(worldIn, pos, state, player, hand, facing, hitX, hitY, hitZ);
}
@ -95,6 +93,11 @@ public class BlockCloudDoor extends BlockDoor implements ICloudBlock {
return state.getValue(HALF) == BlockDoor.EnumDoorHalf.UPPER ? Items.AIR : UItems.mist_door;
}
@Override
public ItemStack getItem(World world, BlockPos pos, IBlockState state) {
return new ItemStack(UItems.mist_door);
}
@Deprecated
@Override
public float getPlayerRelativeBlockHardness(IBlockState state, EntityPlayer player, World worldIn, BlockPos pos) {