From fcc819584a658c82cd90550e83e6ff0750849fda Mon Sep 17 00:00:00 2001 From: LexManos Date: Tue, 10 Aug 2021 00:11:20 -0700 Subject: [PATCH] Bump BootStrapLauncher, and make sure Capability providers call parent revive. --- build.gradle | 2 +- .../net/minecraft/world/entity/LivingEntity.java.patch | 3 ++- .../world/entity/vehicle/AbstractMinecartContainer.java.patch | 3 ++- .../level/block/entity/AbstractFurnaceBlockEntity.java.patch | 3 ++- .../level/block/entity/BaseContainerBlockEntity.java.patch | 3 ++- .../level/block/entity/BrewingStandBlockEntity.java.patch | 3 ++- 6 files changed, 11 insertions(+), 6 deletions(-) diff --git a/build.gradle b/build.gradle index dc6dfa3bce..deba6e80de 100644 --- a/build.gradle +++ b/build.gradle @@ -52,7 +52,7 @@ ext { EVENTBUS_VERSION = '5.0.3' MODLAUNCHER_VERSION = '9.0.7' SECUREJARHANDLER_VERSION = '0.9.46' - BOOTSTRAPLAUNCHER_VERSION = '0.1.16' + BOOTSTRAPLAUNCHER_VERSION = '0.1.17' ASM_VERSION = '9.1' INSTALLER_VERSION = '2.1.5' diff --git a/patches/minecraft/net/minecraft/world/entity/LivingEntity.java.patch b/patches/minecraft/net/minecraft/world/entity/LivingEntity.java.patch index 39a1a701d6..f42fc51771 100644 --- a/patches/minecraft/net/minecraft/world/entity/LivingEntity.java.patch +++ b/patches/minecraft/net/minecraft/world/entity/LivingEntity.java.patch @@ -505,7 +505,7 @@ } public boolean m_5830_() { -@@ -3198,6 +_,63 @@ +@@ -3198,6 +_,64 @@ public void m_21190_(InteractionHand p_21191_) { this.m_21166_(p_21191_ == InteractionHand.MAIN_HAND ? EquipmentSlot.MAINHAND : EquipmentSlot.OFFHAND); @@ -565,6 +565,7 @@ + + @Override + public void reviveCaps() { ++ super.reviveCaps(); + handlers = net.minecraftforge.items.wrapper.EntityEquipmentInvWrapper.create(this); } diff --git a/patches/minecraft/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java.patch b/patches/minecraft/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java.patch index c680cf9de8..cbe7a576d0 100644 --- a/patches/minecraft/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java.patch +++ b/patches/minecraft/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java.patch @@ -18,7 +18,7 @@ if (p_38255_ != null) { lootcontext$builder.m_78963_(p_38255_.m_36336_()).m_78972_(LootContextParams.f_81455_, p_38255_); } -@@ -219,4 +_,25 @@ +@@ -219,4 +_,26 @@ } protected abstract AbstractContainerMenu m_7402_(int p_38222_, Inventory p_38223_); @@ -41,6 +41,7 @@ + + @Override + public void reviveCaps() { ++ super.reviveCaps(); + itemHandler = net.minecraftforge.common.util.LazyOptional.of(() -> new net.minecraftforge.items.wrapper.InvWrapper(this)); + } } diff --git a/patches/minecraft/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java.patch b/patches/minecraft/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java.patch index 4b426eecc2..81c47e909a 100644 --- a/patches/minecraft/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java.patch +++ b/patches/minecraft/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java.patch @@ -145,7 +145,7 @@ } } -@@ -483,5 +_,33 @@ +@@ -483,5 +_,34 @@ p_58342_.m_36491_(itemstack); } @@ -176,6 +176,7 @@ + + @Override + public void reviveCaps() { ++ super.reviveCaps(); + this.handlers = net.minecraftforge.items.wrapper.SidedInvWrapper.create(this, Direction.UP, Direction.DOWN, Direction.NORTH); } } diff --git a/patches/minecraft/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java.patch b/patches/minecraft/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java.patch index a407876723..b0a3a14aba 100644 --- a/patches/minecraft/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java.patch +++ b/patches/minecraft/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java +++ b/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java -@@ -82,4 +_,26 @@ +@@ -82,4 +_,27 @@ } protected abstract AbstractContainerMenu m_6555_(int p_58627_, Inventory p_58628_); @@ -24,6 +24,7 @@ + + @Override + public void reviveCaps() { ++ super.reviveCaps(); + itemHandler = net.minecraftforge.common.util.LazyOptional.of(() -> createUnSidedHandler()); + } } diff --git a/patches/minecraft/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java.patch b/patches/minecraft/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java.patch index 6d3f8b0e52..3cd9b5a1cc 100644 --- a/patches/minecraft/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java.patch +++ b/patches/minecraft/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java.patch @@ -51,7 +51,7 @@ } } -@@ -260,5 +_,33 @@ +@@ -260,5 +_,34 @@ protected AbstractContainerMenu m_6555_(int p_58990_, Inventory p_58991_) { return new BrewingStandMenu(p_58990_, p_58991_, this, this.f_58971_); @@ -82,6 +82,7 @@ + + @Override + public void reviveCaps() { ++ super.reviveCaps(); + this.handlers = net.minecraftforge.items.wrapper.SidedInvWrapper.create(this, Direction.UP, Direction.DOWN, Direction.NORTH); } }