Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-16 11:30:06 +01:00
3faaaab75d
Some pretty micro optimizations, but this is the hottest method in the server.... This will drastically reduce number of operations to perform getType the 2 previous patches was squashed into 1
56 Zeilen
2.7 KiB
Diff
56 Zeilen
2.7 KiB
Diff
From ba9bd41e146d01da235510663be86a00a5cf579e Mon Sep 17 00:00:00 2001
|
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
|
Date: Sun, 24 Apr 2016 19:49:33 -0500
|
|
Subject: [PATCH] SPIGOT-1401: Fix dispenser, dropper, furnace placement
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/BlockDispenser.java b/src/main/java/net/minecraft/server/BlockDispenser.java
|
|
index a1f198b..024ce36 100644
|
|
--- a/src/main/java/net/minecraft/server/BlockDispenser.java
|
|
+++ b/src/main/java/net/minecraft/server/BlockDispenser.java
|
|
@@ -21,6 +21,9 @@ public class BlockDispenser extends BlockTileEntity {
|
|
return 4;
|
|
}
|
|
|
|
+ // Paper start - Removed override of onPlace that was reversing placement direction when
|
|
+ // adjacent to another block, which was not consistent with single player block placement
|
|
+ /*
|
|
public void onPlace(World world, BlockPosition blockposition, IBlockData iblockdata) {
|
|
super.onPlace(world, blockposition, iblockdata);
|
|
this.e(world, blockposition, iblockdata);
|
|
@@ -50,6 +53,8 @@ public class BlockDispenser extends BlockTileEntity {
|
|
world.setTypeAndData(blockposition, iblockdata.set(BlockDispenser.FACING, enumdirection).set(BlockDispenser.TRIGGERED, Boolean.valueOf(false)), 2);
|
|
}
|
|
}
|
|
+ */
|
|
+ // Paper end
|
|
|
|
public boolean interact(World world, BlockPosition blockposition, IBlockData iblockdata, EntityHuman entityhuman, EnumHand enumhand, @Nullable ItemStack itemstack, EnumDirection enumdirection, float f, float f1, float f2) {
|
|
if (world.isClientSide) {
|
|
diff --git a/src/main/java/net/minecraft/server/BlockFurnace.java b/src/main/java/net/minecraft/server/BlockFurnace.java
|
|
index 61a6b8a..25f7b4b 100644
|
|
--- a/src/main/java/net/minecraft/server/BlockFurnace.java
|
|
+++ b/src/main/java/net/minecraft/server/BlockFurnace.java
|
|
@@ -20,6 +20,9 @@ public class BlockFurnace extends BlockTileEntity {
|
|
return Item.getItemOf(Blocks.FURNACE);
|
|
}
|
|
|
|
+ // Paper start - Removed override of onPlace that was reversing placement direction when
|
|
+ // adjacent to another block, which was not consistent with single player block placement
|
|
+ /*
|
|
public void onPlace(World world, BlockPosition blockposition, IBlockData iblockdata) {
|
|
this.e(world, blockposition, iblockdata);
|
|
}
|
|
@@ -45,6 +48,8 @@ public class BlockFurnace extends BlockTileEntity {
|
|
world.setTypeAndData(blockposition, iblockdata.set(BlockFurnace.FACING, enumdirection), 2);
|
|
}
|
|
}
|
|
+ */
|
|
+ // Paper end
|
|
|
|
public boolean interact(World world, BlockPosition blockposition, IBlockData iblockdata, EntityHuman entityhuman, EnumHand enumhand, @Nullable ItemStack itemstack, EnumDirection enumdirection, float f, float f1, float f2) {
|
|
if (world.isClientSide) {
|
|
--
|
|
2.9.0
|
|
|