Compare commits
1 commit
Author | SHA1 | Date | |
---|---|---|---|
7bf9561534 |
|
@ -180,6 +180,7 @@ public class ItemPanelComponent extends Item implements INetGUIItem {
|
|||
*/
|
||||
@Nonnull
|
||||
public EnumActionResult onItemUse(EntityPlayer player, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {
|
||||
if (player.isCreative()&&player.isSneaking()) {
|
||||
IBlockState iblockstate = worldIn.getBlockState(pos);
|
||||
Block block = iblockstate.getBlock();
|
||||
|
||||
|
@ -199,6 +200,9 @@ public class ItemPanelComponent extends Item implements INetGUIItem {
|
|||
} else {
|
||||
return EnumActionResult.FAIL;
|
||||
}
|
||||
} else {
|
||||
return onItemRightClick(worldIn, player, hand).getType();
|
||||
}
|
||||
}
|
||||
|
||||
private void placeBlockAt(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ) {
|
||||
|
|
Loading…
Reference in a new issue