Repackage NMS

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2021-03-16 09:00:00 +11:00
parent 18496e998f
commit 9da047989c
968 changed files with 5448 additions and 5050 deletions

View File

@@ -1,10 +1,11 @@
--- a/net/minecraft/server/ItemBlock.java
+++ b/net/minecraft/server/ItemBlock.java
@@ -4,6 +4,12 @@
import java.util.Map;
import javax.annotation.Nullable;
--- a/net/minecraft/world/item/ItemBlock.java
+++ b/net/minecraft/world/item/ItemBlock.java
@@ -25,6 +25,13 @@
import net.minecraft.world.level.block.state.properties.IBlockState;
import net.minecraft.world.phys.shapes.VoxelShapeCollision;
+// CraftBukkit start
+import net.minecraft.server.level.WorldServer;
+import org.bukkit.craftbukkit.block.CraftBlock;
+import org.bukkit.craftbukkit.block.data.CraftBlockData;
+import org.bukkit.event.block.BlockCanBuildEvent;
@@ -13,7 +14,7 @@
public class ItemBlock extends Item {
@Deprecated
@@ -31,6 +37,12 @@
@@ -52,6 +59,12 @@
return EnumInteractionResult.FAIL;
} else {
IBlockData iblockdata = this.c(blockactioncontext1);
@@ -26,7 +27,7 @@
if (iblockdata == null) {
return EnumInteractionResult.FAIL;
@@ -48,6 +60,15 @@
@@ -69,6 +82,15 @@
iblockdata1 = this.a(blockposition, world, itemstack, iblockdata1);
this.a(blockposition, world, entityhuman, itemstack, iblockdata1);
block.postPlace(world, blockposition, iblockdata1, entityhuman, itemstack);
@@ -42,7 +43,7 @@
if (entityhuman instanceof EntityPlayer) {
CriterionTriggers.y.a((EntityPlayer) entityhuman, blockposition, itemstack);
}
@@ -55,8 +76,8 @@
@@ -76,8 +98,8 @@
SoundEffectType soundeffecttype = iblockdata1.getStepSound();
@@ -53,7 +54,7 @@
itemstack.subtract(1);
}
@@ -92,6 +113,21 @@
@@ -113,6 +135,21 @@
if (nbttagcompound != null) {
NBTTagCompound nbttagcompound1 = nbttagcompound.getCompound("BlockStateTag");
@@ -75,7 +76,7 @@
BlockStateList<Block, IBlockData> blockstatelist = iblockdata.getBlock().getStates();
Iterator iterator = nbttagcompound1.getKeys().iterator();
@@ -106,11 +142,6 @@
@@ -127,11 +164,6 @@
}
}
}
@@ -87,7 +88,7 @@
return iblockdata1;
}
@@ -123,8 +154,15 @@
@@ -144,8 +176,15 @@
protected boolean b(BlockActionContext blockactioncontext, IBlockData iblockdata) {
EntityHuman entityhuman = blockactioncontext.getEntity();
VoxelShapeCollision voxelshapecollision = entityhuman == null ? VoxelShapeCollision.a() : VoxelShapeCollision.a((Entity) entityhuman);