mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-25 06:34:35 +00:00
Add canOpenGui to IChiselItem
This commit is contained in:
1 parent
7cf946e377
commit
38f78df16d
3 files changed
+20
-1
No files matched your search
@@ -77,7 +77,7 @@ public final class ChiselController {
|
||||
break;
|
||||
case RIGHT_CLICK_AIR:
|
||||
case RIGHT_CLICK_BLOCK:
|
||||
if (!event.world.isRemote) {
|
||||
if (!event.world.isRemote && chisel.canOpenGui(event.world, event.entityPlayer, held)) {
|
||||
event.entityPlayer.openGui(Chisel.instance, 0, event.world, 0, 0, 0);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -82,6 +82,11 @@ public class ItemChisel extends Item implements IChiselItem {
|
||||
public ChiselMode getChiselMode(ItemStack itemStack) {
|
||||
return ChiselMode.SINGLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canOpenGui(World world, EntityPlayer player, ItemStack chisel) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChisel(World world, IInventory inv, int slot, ItemStack chisel, ItemStack target) {
|
||||
|
||||
Reference in new issue
Block a user