forked from neoforged/NeoForge
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make chunk sections only resolve Blocks.AIR for vanilla air blocks, p…
…reserving modded air (neoforged#471)
- Loading branch information
1 parent
da756fd
commit 42077b9
Showing
3 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
patches/net/minecraft/world/level/chunk/LevelChunkSection.java.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- a/net/minecraft/world/level/chunk/LevelChunkSection.java | ||
+++ b/net/minecraft/world/level/chunk/LevelChunkSection.java | ||
@@ -65,7 +_,7 @@ | ||
|
||
FluidState fluidstate = blockstate.getFluidState(); | ||
FluidState fluidstate1 = p_62995_.getFluidState(); | ||
- if (!blockstate.isAir()) { | ||
+ if (!blockstate.isEmpty()) { // Neo: Fix MC-232360 for modded blocks (Makes modded isAir blocks not be replaced with Blocks.AIR in all-air chunk sections) | ||
--this.nonEmptyBlockCount; | ||
if (blockstate.isRandomlyTicking()) { | ||
--this.tickingBlockCount; | ||
@@ -76,7 +_,7 @@ | ||
--this.tickingFluidCount; | ||
} | ||
|
||
- if (!p_62995_.isAir()) { | ||
+ if (!p_62995_.isEmpty()) { // Neo: Fix MC-232360 for modded blocks (Makes modded isAir blocks not be replaced with Blocks.AIR in all-air chunk sections) | ||
++this.nonEmptyBlockCount; | ||
if (p_62995_.isRandomlyTicking()) { | ||
++this.tickingBlockCount; | ||
@@ -114,7 +_,7 @@ | ||
|
||
public void accept(BlockState p_204444_, int p_204445_) { | ||
FluidState fluidstate = p_204444_.getFluidState(); | ||
- if (!p_204444_.isAir()) { | ||
+ if (!p_204444_.isEmpty()) { // Neo: Fix MC-232360 for modded blocks (Makes modded isAir blocks not be replaced with Blocks.AIR in all-air chunk sections) | ||
this.nonEmptyBlockCount += p_204445_; | ||
if (p_204444_.isRandomlyTicking()) { | ||
this.tickingBlockCount += p_204445_; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters