diff --git a/paper-server/nms-patches/net/minecraft/world/inventory/ContainerBeacon.patch b/paper-server/nms-patches/net/minecraft/world/inventory/ContainerBeacon.patch index 33ba78a90f..363244fc4f 100644 --- a/paper-server/nms-patches/net/minecraft/world/inventory/ContainerBeacon.patch +++ b/paper-server/nms-patches/net/minecraft/world/inventory/ContainerBeacon.patch @@ -64,7 +64,7 @@ + return bukkitEntity; + } + -+ org.bukkit.craftbukkit.inventory.CraftInventory inventory = new org.bukkit.craftbukkit.inventory.CraftInventoryBeacon(this.beacon); ++ org.bukkit.craftbukkit.inventory.CraftInventoryBeacon inventory = new org.bukkit.craftbukkit.inventory.CraftInventoryBeacon(this.beacon); + bukkitEntity = new CraftBeaconView(this.player.player.getBukkitEntity(), inventory, this); + return bukkitEntity; + } diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java index 3d54a9ad52..b3bab07922 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java @@ -15,24 +15,24 @@ import org.bukkit.inventory.Inventory; import org.bukkit.inventory.InventoryView; import org.bukkit.inventory.ItemStack; -public class CraftInventoryView extends CraftAbstractInventoryView { +public class CraftInventoryView extends CraftAbstractInventoryView { protected final T container; private final CraftHumanEntity player; - private final CraftInventory viewing; + private final I viewing; private final String originalTitle; private String title; - public CraftInventoryView(HumanEntity player, Inventory viewing, T container) { + public CraftInventoryView(HumanEntity player, I viewing, T container) { // TODO: Should we make sure it really IS a CraftHumanEntity first? And a CraftInventory? this.player = (CraftHumanEntity) player; - this.viewing = (CraftInventory) viewing; + this.viewing = viewing; this.container = container; this.originalTitle = CraftChatMessage.fromComponent(container.getTitle()); this.title = originalTitle; } @Override - public Inventory getTopInventory() { + public I getTopInventory() { return viewing; } diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftAnvilView.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftAnvilView.java index 283897b5a3..447437f240 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftAnvilView.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftAnvilView.java @@ -4,13 +4,13 @@ import net.minecraft.world.inventory.ContainerAnvil; import org.bukkit.craftbukkit.inventory.CraftInventoryAnvil; import org.bukkit.craftbukkit.inventory.CraftInventoryView; import org.bukkit.entity.HumanEntity; -import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.AnvilInventory; import org.bukkit.inventory.view.AnvilView; import org.jetbrains.annotations.Nullable; -public class CraftAnvilView extends CraftInventoryView implements AnvilView { +public class CraftAnvilView extends CraftInventoryView implements AnvilView { - public CraftAnvilView(final HumanEntity player, final Inventory viewing, final ContainerAnvil container) { + public CraftAnvilView(final HumanEntity player, final AnvilInventory viewing, final ContainerAnvil container) { super(player, viewing, container); } diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftBeaconView.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftBeaconView.java index d79300262e..bd6e24a2d8 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftBeaconView.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftBeaconView.java @@ -5,14 +5,14 @@ import net.minecraft.world.level.block.entity.TileEntityBeacon; import org.bukkit.craftbukkit.inventory.CraftInventoryView; import org.bukkit.craftbukkit.potion.CraftPotionEffectType; import org.bukkit.entity.HumanEntity; -import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.BeaconInventory; import org.bukkit.inventory.view.BeaconView; import org.bukkit.potion.PotionEffectType; import org.jetbrains.annotations.Nullable; -public class CraftBeaconView extends CraftInventoryView implements BeaconView { +public class CraftBeaconView extends CraftInventoryView implements BeaconView { - public CraftBeaconView(final HumanEntity player, final Inventory viewing, final ContainerBeacon container) { + public CraftBeaconView(final HumanEntity player, final BeaconInventory viewing, final ContainerBeacon container) { super(player, viewing, container); } diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftBrewingStandView.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftBrewingStandView.java index dec88fccaa..db00f94595 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftBrewingStandView.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftBrewingStandView.java @@ -5,12 +5,12 @@ import net.minecraft.world.inventory.ContainerBrewingStand; import net.minecraft.world.level.block.entity.TileEntityBrewingStand; import org.bukkit.craftbukkit.inventory.CraftInventoryView; import org.bukkit.entity.HumanEntity; -import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.BrewerInventory; import org.bukkit.inventory.view.BrewingStandView; -public class CraftBrewingStandView extends CraftInventoryView implements BrewingStandView { +public class CraftBrewingStandView extends CraftInventoryView implements BrewingStandView { - public CraftBrewingStandView(final HumanEntity player, final Inventory viewing, final ContainerBrewingStand container) { + public CraftBrewingStandView(final HumanEntity player, final BrewerInventory viewing, final ContainerBrewingStand container) { super(player, viewing, container); } diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftCrafterView.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftCrafterView.java index 720a57e5ce..d80860cc6f 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftCrafterView.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftCrafterView.java @@ -4,12 +4,12 @@ import com.google.common.base.Preconditions; import net.minecraft.world.inventory.CrafterMenu; import org.bukkit.craftbukkit.inventory.CraftInventoryView; import org.bukkit.entity.HumanEntity; -import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.CrafterInventory; import org.bukkit.inventory.view.CrafterView; -public class CraftCrafterView extends CraftInventoryView implements CrafterView { +public class CraftCrafterView extends CraftInventoryView implements CrafterView { - public CraftCrafterView(final HumanEntity player, final Inventory viewing, final CrafterMenu container) { + public CraftCrafterView(final HumanEntity player, final CrafterInventory viewing, final CrafterMenu container) { super(player, viewing, container); } diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftEnchantmentView.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftEnchantmentView.java index 9b04570381..de3c2e8376 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftEnchantmentView.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftEnchantmentView.java @@ -11,13 +11,13 @@ import org.bukkit.craftbukkit.enchantments.CraftEnchantment; import org.bukkit.craftbukkit.inventory.CraftInventoryView; import org.bukkit.enchantments.EnchantmentOffer; import org.bukkit.entity.HumanEntity; -import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.EnchantingInventory; import org.bukkit.inventory.view.EnchantmentView; import org.jetbrains.annotations.NotNull; -public class CraftEnchantmentView extends CraftInventoryView implements EnchantmentView { +public class CraftEnchantmentView extends CraftInventoryView implements EnchantmentView { - public CraftEnchantmentView(final HumanEntity player, final Inventory viewing, final ContainerEnchantTable container) { + public CraftEnchantmentView(final HumanEntity player, final EnchantingInventory viewing, final ContainerEnchantTable container) { super(player, viewing, container); } diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftFurnaceView.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftFurnaceView.java index ef76e921c2..cd13453394 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftFurnaceView.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftFurnaceView.java @@ -4,12 +4,12 @@ import net.minecraft.world.inventory.ContainerFurnace; import net.minecraft.world.level.block.entity.TileEntityFurnace; import org.bukkit.craftbukkit.inventory.CraftInventoryView; import org.bukkit.entity.HumanEntity; -import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.FurnaceInventory; import org.bukkit.inventory.view.FurnaceView; -public class CraftFurnaceView extends CraftInventoryView implements FurnaceView { +public class CraftFurnaceView extends CraftInventoryView implements FurnaceView { - public CraftFurnaceView(final HumanEntity player, final Inventory viewing, final ContainerFurnace container) { + public CraftFurnaceView(final HumanEntity player, final FurnaceInventory viewing, final ContainerFurnace container) { super(player, viewing, container); } diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftLecternView.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftLecternView.java index c10ca59e05..14e2a625eb 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftLecternView.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftLecternView.java @@ -5,12 +5,12 @@ import net.minecraft.world.inventory.ContainerLectern; import net.minecraft.world.level.block.entity.TileEntityLectern; import org.bukkit.craftbukkit.inventory.CraftInventoryView; import org.bukkit.entity.HumanEntity; -import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.LecternInventory; import org.bukkit.inventory.view.LecternView; -public class CraftLecternView extends CraftInventoryView implements LecternView { +public class CraftLecternView extends CraftInventoryView implements LecternView { - public CraftLecternView(final HumanEntity player, final Inventory viewing, final ContainerLectern container) { + public CraftLecternView(final HumanEntity player, final LecternInventory viewing, final ContainerLectern container) { super(player, viewing, container); } diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftLoomView.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftLoomView.java index 49b5a4bf2b..8f0740cb06 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftLoomView.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftLoomView.java @@ -9,12 +9,12 @@ import org.bukkit.block.banner.PatternType; import org.bukkit.craftbukkit.block.banner.CraftPatternType; import org.bukkit.craftbukkit.inventory.CraftInventoryView; import org.bukkit.entity.HumanEntity; -import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.LoomInventory; import org.bukkit.inventory.view.LoomView; -public class CraftLoomView extends CraftInventoryView implements LoomView { +public class CraftLoomView extends CraftInventoryView implements LoomView { - public CraftLoomView(final HumanEntity player, final Inventory viewing, final ContainerLoom container) { + public CraftLoomView(final HumanEntity player, final LoomInventory viewing, final ContainerLoom container) { super(player, viewing, container); } diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftMerchantView.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftMerchantView.java index 2a0354051a..39b7079592 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftMerchantView.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftMerchantView.java @@ -4,16 +4,16 @@ import net.minecraft.world.inventory.ContainerMerchant; import net.minecraft.world.item.trading.IMerchant; import org.bukkit.craftbukkit.inventory.CraftInventoryView; import org.bukkit.entity.HumanEntity; -import org.bukkit.inventory.Inventory; import org.bukkit.inventory.Merchant; +import org.bukkit.inventory.MerchantInventory; import org.bukkit.inventory.view.MerchantView; import org.jetbrains.annotations.NotNull; -public class CraftMerchantView extends CraftInventoryView implements MerchantView { +public class CraftMerchantView extends CraftInventoryView implements MerchantView { private final IMerchant trader; - public CraftMerchantView(final HumanEntity player, final Inventory viewing, final ContainerMerchant container, final IMerchant trader) { + public CraftMerchantView(final HumanEntity player, final MerchantInventory viewing, final ContainerMerchant container, final IMerchant trader) { super(player, viewing, container); this.trader = trader; } diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftStonecutterView.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftStonecutterView.java index b97be68bd2..579d83438c 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftStonecutterView.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftStonecutterView.java @@ -7,14 +7,14 @@ import net.minecraft.world.item.crafting.RecipeHolder; import net.minecraft.world.item.crafting.RecipeStonecutting; import org.bukkit.craftbukkit.inventory.CraftInventoryView; import org.bukkit.entity.HumanEntity; -import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.StonecutterInventory; import org.bukkit.inventory.StonecuttingRecipe; import org.bukkit.inventory.view.StonecutterView; import org.jetbrains.annotations.NotNull; -public class CraftStonecutterView extends CraftInventoryView implements StonecutterView { +public class CraftStonecutterView extends CraftInventoryView implements StonecutterView { - public CraftStonecutterView(final HumanEntity player, final Inventory viewing, final ContainerStonecutter container) { + public CraftStonecutterView(final HumanEntity player, final StonecutterInventory viewing, final ContainerStonecutter container) { super(player, viewing, container); }