diff options
author | MiniDigger | Martin <[email protected]> | 2024-01-14 11:04:49 +0100 |
---|---|---|
committer | MiniDigger | Martin <[email protected]> | 2024-01-14 11:04:49 +0100 |
commit | bee74680e607c2e29b038329f62181238911cd83 (patch) | |
tree | 708fd1a4a0227d9071243adf2a42d5e9e96cde4a /patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/vehicle/ChestBoat.java.patch | |
parent | 0a44692ef6ff6e255d48eb3ba1bb114166eafda9 (diff) | |
download | Paper-softspoon.tar.gz Paper-softspoon.zip |
add remapped patches as a testsoftspoon
Diffstat (limited to 'patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/vehicle/ChestBoat.java.patch')
-rw-r--r-- | patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/vehicle/ChestBoat.java.patch | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/vehicle/ChestBoat.java.patch b/patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/vehicle/ChestBoat.java.patch new file mode 100644 index 0000000000..9d7239e776 --- /dev/null +++ b/patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/vehicle/ChestBoat.java.patch @@ -0,0 +1,68 @@ +--- a/net/minecraft/world/entity/vehicle/ChestBoat.java ++++ b/net/minecraft/world/entity/vehicle/ChestBoat.java +@@ -22,6 +23,13 @@ + import net.minecraft.world.item.Items; + import net.minecraft.world.level.Level; + import net.minecraft.world.level.gameevent.GameEvent; ++// CraftBukkit start ++import java.util.List; ++import org.bukkit.Location; ++import org.bukkit.craftbukkit.entity.CraftHumanEntity; ++import org.bukkit.entity.HumanEntity; ++import org.bukkit.inventory.InventoryHolder; ++// CraftBukkit end + + public class ChestBoat extends Boat implements HasCustomInventoryScreen, ContainerEntity { + private static final int CONTAINER_SIZE = 27; +@@ -212,4 +245,51 @@ + public void stopOpen(Player player) { + this.level().gameEvent(GameEvent.CONTAINER_CLOSE, this.position(), GameEvent.Context.of(player)); + } ++ ++ // CraftBukkit start ++ public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>(); ++ private int maxStack = MAX_STACK; ++ ++ @Override ++ public List<ItemStack> getContents() { ++ return this.itemStacks; ++ } ++ ++ @Override ++ public void onOpen(CraftHumanEntity who) { ++ transaction.add(who); ++ } ++ ++ @Override ++ public void onClose(CraftHumanEntity who) { ++ transaction.remove(who); ++ } ++ ++ @Override ++ public List<HumanEntity> getViewers() { ++ return transaction; ++ } ++ ++ @Override ++ public InventoryHolder getOwner() { ++ org.bukkit.entity.Entity entity = getBukkitEntity(); ++ if (entity instanceof InventoryHolder) return (InventoryHolder) entity; ++ return null; ++ } ++ ++ @Override ++ public int getMaxStackSize() { ++ return maxStack; ++ } ++ ++ @Override ++ public void setMaxStackSize(int size) { ++ maxStack = size; ++ } ++ ++ @Override ++ public Location getLocation() { ++ return getBukkitEntity().getLocation(); ++ } ++ // CraftBukkit end + } |