mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-05 14:42:22 -07:00
Update to Minecraft 1.12-pre2
This commit is contained in:
@@ -207,7 +207,7 @@
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
if ((block instanceof BlockCommand || block instanceof BlockStructure) && !this.player.dk()) {
|
||||
if ((block instanceof BlockCommand || block instanceof BlockStructure) && !this.player.isCreativeAndOp()) {
|
||||
this.world.notify(blockposition, iblockdata, iblockdata, 3);
|
||||
return false;
|
||||
@@ -238,6 +371,12 @@
|
||||
@@ -247,16 +247,16 @@
|
||||
+ }
|
||||
|
||||
- if (itileinventory instanceof TileEntityChest && block instanceof BlockChest) {
|
||||
- itileinventory = ((BlockChest) block).c(world, blockposition);
|
||||
- itileinventory = ((BlockChest) block).getInventory(world, blockposition);
|
||||
- }
|
||||
+ if (entityhuman.di().a(itemstack.getItem())) {
|
||||
+ if (entityhuman.getCooldownTracker().a(itemstack.getItem())) {
|
||||
+ cancelledBlock = true;
|
||||
+ }
|
||||
|
||||
- if (itileinventory != null) {
|
||||
- entityhuman.openContainer(itileinventory);
|
||||
- return EnumInteractionResult.SUCCESS;
|
||||
+ if (itemstack.getItem() instanceof ItemBlock && !entityhuman.dk()) { // PAIL: creativeAndOp
|
||||
+ if (itemstack.getItem() instanceof ItemBlock && !entityhuman.isCreativeAndOp()) {
|
||||
+ Block block1 = ((ItemBlock) itemstack.getItem()).getBlock();
|
||||
+
|
||||
+ if (block1 instanceof BlockCommand || block1 instanceof BlockStructure) {
|
||||
@@ -294,7 +294,7 @@
|
||||
|
||||
- if (iblockdata.getBlock().interact(world, blockposition, iblockdata, entityhuman, enumhand, enumdirection, f, f1, f2)) {
|
||||
+ if (itileinventory instanceof TileEntityChest && block instanceof BlockChest) {
|
||||
+ itileinventory = ((BlockChest) block).c(world, blockposition); // PAIL: rename
|
||||
+ itileinventory = ((BlockChest) block).getInventory(world, blockposition);
|
||||
+ }
|
||||
+
|
||||
+ if (itileinventory != null) {
|
||||
@@ -309,10 +309,10 @@
|
||||
|
||||
- if (itemstack.isEmpty()) {
|
||||
- return EnumInteractionResult.PASS;
|
||||
- } else if (entityhuman.di().a(itemstack.getItem())) {
|
||||
- } else if (entityhuman.getCooldownTracker().a(itemstack.getItem())) {
|
||||
return EnumInteractionResult.PASS;
|
||||
} else {
|
||||
- if (itemstack.getItem() instanceof ItemBlock && !entityhuman.dk()) {
|
||||
- if (itemstack.getItem() instanceof ItemBlock && !entityhuman.isCreativeAndOp()) {
|
||||
- Block block1 = ((ItemBlock) itemstack.getItem()).getBlock();
|
||||
+ if (!entityhuman.isSneaking() || entityhuman.getItemInMainHand().isEmpty() && entityhuman.getItemInOffHand().isEmpty()) {
|
||||
+ IBlockData iblockdata = world.getType(blockposition);
|
||||
|
Reference in New Issue
Block a user