-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DD biomes with rain particles act as being under permanent rain
- Loading branch information
1 parent
b29878c
commit ca8bd95
Showing
6 changed files
with
54 additions
and
3 deletions.
There are no files selected for viewing
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
29 changes: 29 additions & 0 deletions
29
src/main/java/de/dafuqs/spectrum/mixin/FireBlockMixin.java
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 @@ | ||
package de.dafuqs.spectrum.mixin; | ||
|
||
import com.llamalad7.mixinextras.injector.*; | ||
import com.llamalad7.mixinextras.sugar.*; | ||
import de.dafuqs.spectrum.registries.*; | ||
import net.minecraft.block.*; | ||
import net.minecraft.server.world.*; | ||
import org.spongepowered.asm.mixin.*; | ||
import org.spongepowered.asm.mixin.injection.*; | ||
|
||
@Mixin(FireBlock.class) | ||
public class FireBlockMixin { | ||
|
||
@ModifyExpressionValue(method = "scheduledTick", at = @At(value = "INVOKE", target = "Lnet/minecraft/server/world/ServerWorld;isRaining()Z", ordinal = 0)) | ||
public boolean spectrum$extinguishInPermanentRain(boolean original, @Local ServerWorld world) { | ||
if (world.getRegistryKey().equals(SpectrumDimensions.DIMENSION_KEY)) { | ||
return true; | ||
} | ||
return original; | ||
} | ||
|
||
@ModifyExpressionValue(method = "scheduledTick", at = @At(value = "INVOKE", target = "Lnet/minecraft/server/world/ServerWorld;isRaining()Z", ordinal = 1)) | ||
public boolean spectrum$assuageInPermanentRain(boolean original, @Local ServerWorld world) { | ||
if (world.getRegistryKey().equals(SpectrumDimensions.DIMENSION_KEY)) { | ||
return true; | ||
} | ||
return original; | ||
} | ||
} |
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
7 changes: 7 additions & 0 deletions
7
src/main/resources/data/spectrum/tags/worldgen/biome/has_permanent_rain.json
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,7 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
"spectrum:deep_dripstone_caves", | ||
"spectrum:dragonrot_swamp" | ||
] | ||
} |
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