mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-24 05:47:59 +01:00
Fixed cloud door's not returning the correct item when middle clicked
This commit is contained in:
parent
ea21cfa594
commit
ad692abcd7
1 changed files with 7 additions and 4 deletions
|
@ -14,6 +14,7 @@ import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.init.Items;
|
import net.minecraft.init.Items;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.BlockRenderLayer;
|
import net.minecraft.util.BlockRenderLayer;
|
||||||
import net.minecraft.util.EnumFacing;
|
import net.minecraft.util.EnumFacing;
|
||||||
import net.minecraft.util.EnumHand;
|
import net.minecraft.util.EnumHand;
|
||||||
|
@ -29,7 +30,7 @@ public class BlockCloudDoor extends BlockDoor implements ICloudBlock {
|
||||||
setTranslationKey(name);
|
setTranslationKey(name);
|
||||||
setRegistryName(domain, name);
|
setRegistryName(domain, name);
|
||||||
setSoundType(SoundType.CLOTH);
|
setSoundType(SoundType.CLOTH);
|
||||||
setHardness(1);
|
setHardness(3);
|
||||||
setResistance(200);
|
setResistance(200);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,9 +50,6 @@ public class BlockCloudDoor extends BlockDoor implements ICloudBlock {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
setHardness(3);
|
|
||||||
setResistance(200);
|
|
||||||
|
|
||||||
return super.onBlockActivated(worldIn, pos, state, player, hand, facing, hitX, hitY, hitZ);
|
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;
|
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
|
@Deprecated
|
||||||
@Override
|
@Override
|
||||||
public float getPlayerRelativeBlockHardness(IBlockState state, EntityPlayer player, World worldIn, BlockPos pos) {
|
public float getPlayerRelativeBlockHardness(IBlockState state, EntityPlayer player, World worldIn, BlockPos pos) {
|
||||||
|
|
Loading…
Reference in a new issue