Fix concrete powder not being hydrated by singular water sources (#9236)

This commit is contained in:
matyrobbrt authored and GitHub committed 2022-12-19 16:05:22 +00:00
1 parent e84098a011
commit cc393818e4
2 files changed
+9 -3

No files matched your search

@@ -5,16 +5,21 @@
public void m_48792_(Level p_52068_, BlockPos p_52069_, BlockState p_52070_, BlockState p_52071_, FallingBlockEntity p_52072_) {
- if (m_52080_(p_52068_, p_52069_, p_52071_)) {
+ if (m_52080_(p_52068_, p_52069_, p_52070_)) { // Forge: Uses block of falling entity instead of block at current position, checked within shouldSolidify
+ if (shouldSolidify(p_52068_, p_52069_, p_52070_, p_52071_.m_60819_())) { // Forge: Use block of falling entity instead of block at replaced position, and check if shouldSolidify with the FluidState of the replaced block
p_52068_.m_7731_(p_52069_, this.f_52058_, 3);
}
@@ -34,19 +_,19 @@
@@ -33,20 +_,24 @@
return m_52080_(blockgetter, blockpos, blockstate) ? this.f_52058_ : super.m_5573_(p_52063_);
}
+ private static boolean shouldSolidify(BlockGetter p_52081_, BlockPos p_52082_, BlockState p_52083_, net.minecraft.world.level.material.FluidState fluidState) {
+ return p_52083_.canBeHydrated(p_52081_, p_52082_, fluidState, p_52082_) || touchesLiquid(p_52081_, p_52082_, p_52083_);
+ }
+
private static boolean m_52080_(BlockGetter p_52081_, BlockPos p_52082_, BlockState p_52083_) {
- return m_52088_(p_52083_) || m_52064_(p_52081_, p_52082_);
+ return p_52083_.canBeHydrated(p_52081_, p_52082_, p_52081_.m_6425_(p_52082_), p_52082_) || touchesLiquid(p_52081_, p_52082_, p_52083_);
+ return shouldSolidify(p_52081_, p_52082_, p_52083_, p_52081_.m_6425_(p_52082_));
}
- private static boolean m_52064_(BlockGetter p_52065_, BlockPos p_52066_) {
+1
View File
@@ -79,6 +79,7 @@ net/minecraft/world/item/crafting/RecipeManager.fromJson(Lnet/minecraft/resource
net/minecraft/world/item/enchantment/EnchantmentHelper.getTagEnchantmentLevel(Lnet/minecraft/world/item/enchantment/Enchantment;Lnet/minecraft/world/item/ItemStack;)I=|p_44844_,p_44845_
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/WorldDataConfiguration;Lcom/mojang/serialization/Lifecycle;)V=|p_250485_,p_250207_,p_251631_,p_252122_,p_248961_,p_248536_,p_249797_,lifecycle
net/minecraft/world/level/block/ConcretePowderBlock.shouldSolidify(Lnet/minecraft/world/level/BlockGetter;Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/material/FluidState;)Z=|p_52081_,p_52082_,p_52083_,fluidState
net/minecraft/world/level/block/ConcretePowderBlock.touchesLiquid(Lnet/minecraft/world/level/BlockGetter;Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;)Z=|p_52065_,p_52066_,state
net/minecraft/world/level/block/FireBlock.tryCatchFire(Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;ILnet/minecraft/util/RandomSource;ILnet/minecraft/core/Direction;)V=|p_53432_,p_53433_,p_53434_,p_53435_,p_53436_,face
net/minecraft/world/level/block/FlowerBlock.<init>(Ljava/util/function/Supplier;ILnet/minecraft/world/level/block/state/BlockBehaviour$Properties;)V=|effectSupplier,p_53513_,p_53514_