mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-27 15:33:18 +00:00
[1.18.2] Add new helper without duplicate neighbor update call (#9235)
This commit is contained in:
1 parent
dfef5615a0
commit
1af3922642
4 files changed
+31
-2
No files matched your search
@@ -13,3 +13,12 @@
|
||||
} else if (p_39052_ >= 1 && p_39052_ < 28) {
|
||||
if (!this.m_38903_(itemstack1, 28, 37, false)) {
|
||||
return ItemStack.f_41583_;
|
||||
@@ -141,7 +_,7 @@
|
||||
this.f_39034_.m_8050_(1, p_39054_);
|
||||
this.f_39034_.m_8050_(2, p_39055_);
|
||||
this.f_39032_.m_6201_(1);
|
||||
- this.f_39033_.m_39292_(Level::m_151543_);
|
||||
+ this.f_39033_.m_39292_(Level::blockEntityChangedWithoutNeighborUpdates);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -207,7 +207,7 @@
|
||||
if (p_151539_ instanceof EnderDragon) {
|
||||
EnderDragon enderdragon = (EnderDragon)p_151539_;
|
||||
|
||||
@@ -570,6 +_,12 @@
|
||||
@@ -570,17 +_,29 @@
|
||||
}
|
||||
|
||||
});
|
||||
@@ -220,10 +220,20 @@
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -581,6 +_,7 @@
|
||||
@Nullable
|
||||
public abstract Entity m_6815_(int p_46492_);
|
||||
|
||||
- public void m_151543_(BlockPos p_151544_) {
|
||||
+ public void blockEntityChangedWithoutNeighborUpdates(BlockPos p_151544_) {
|
||||
if (this.m_46805_(p_151544_)) {
|
||||
this.m_46745_(p_151544_).m_8092_(true);
|
||||
}
|
||||
+ }
|
||||
|
||||
+ /** @deprecated Call {@link #blockEntityChangedWithoutNeighborUpdates(BlockPos)} instead. See <a href="https://github.com/MinecraftForge/MinecraftForge/pull/9235">#9235</a> for details. */
|
||||
+ @Deprecated
|
||||
+ public void m_151543_(BlockPos p_151544_) {
|
||||
+ this.blockEntityChangedWithoutNeighborUpdates(p_151544_);
|
||||
+ this.m_46717_(p_151544_, m_8055_(p_151544_).m_60734_()); //Notify neighbors of changes
|
||||
}
|
||||
|
||||
|
||||
@@ -38,6 +38,15 @@
|
||||
}
|
||||
|
||||
public final CompoundTag m_187480_() {
|
||||
@@ -133,7 +_,7 @@
|
||||
}
|
||||
|
||||
protected static void m_155232_(Level p_155233_, BlockPos p_155234_, BlockState p_155235_) {
|
||||
- p_155233_.m_151543_(p_155234_);
|
||||
+ p_155233_.blockEntityChangedWithoutNeighborUpdates(p_155234_);
|
||||
if (!p_155235_.m_60795_()) {
|
||||
p_155233_.m_46717_(p_155234_, p_155235_.m_60734_());
|
||||
}
|
||||
@@ -163,6 +_,13 @@
|
||||
|
||||
public void m_7651_() {
|
||||
|
||||
@@ -57,6 +57,7 @@ net/minecraft/world/item/MapItem.getCustomMapData(Lnet/minecraft/world/item/Item
|
||||
net/minecraft/world/item/alchemy/PotionBrewing$Mix.<init>(Lnet/minecraftforge/registries/ForgeRegistryEntry;Lnet/minecraft/world/item/crafting/Ingredient;Lnet/minecraftforge/registries/ForgeRegistryEntry;)V=|p_43536_,p_43537_,p_43538_
|
||||
net/minecraft/world/item/crafting/RecipeManager.<init>(Lnet/minecraftforge/common/crafting/conditions/ICondition$IContext;)V=|context
|
||||
net/minecraft/world/item/crafting/RecipeManager.fromJson(Lnet/minecraft/resources/ResourceLocation;Lcom/google/gson/JsonObject;Lnet/minecraftforge/common/crafting/conditions/ICondition$IContext;)Lnet/minecraft/world/item/crafting/Recipe;=|p_44046_,p_44047_,context
|
||||
net/minecraft/world/level/Level.blockEntityChangedWithoutNeighborUpdates(Lnet/minecraft/core/BlockPos;)V=|p_151544_
|
||||
net/minecraft/world/level/Level.markAndNotifyBlock(Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/chunk/LevelChunk;Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/block/state/BlockState;II)V=|p_46605_,levelchunk,blockstate,p_46606_,p_46607_,p_46608_
|
||||
net/minecraft/world/level/LevelSettings.<init>(Ljava/lang/String;Lnet/minecraft/world/level/GameType;ZLnet/minecraft/world/Difficulty;ZLnet/minecraft/world/level/GameRules;Lnet/minecraft/world/level/DataPackConfig;Lcom/mojang/serialization/Lifecycle;)V=|p_46910_,p_46911_,p_46912_,p_46913_,p_46914_,p_46915_,p_46916_,lifecycle
|
||||
net/minecraft/world/level/block/FireBlock.tryCatchFire(Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;ILjava/util/Random;ILnet/minecraft/core/Direction;)V=|p_53432_,p_53433_,p_53434_,p_53435_,p_53436_,face
|
||||
|
||||
Reference in new issue
Block a user