generated from Fallen-Breath/fabric-mod-template
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eca8d30
commit e09b087
Showing
6 changed files
with
37 additions
and
0 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
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
...nbreath/tweakermore/mixins/tweaks/disableRedstoneWireParticle/RedstoneWireBlockMixin.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 me.fallenbreath.tweakermore.mixins.tweaks.disableRedstoneWireParticle; | ||
|
||
import me.fallenbreath.tweakermore.config.TweakerMoreConfigs; | ||
import net.minecraft.block.RedstoneWireBlock; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | ||
|
||
@Mixin(RedstoneWireBlock.class) | ||
public abstract class RedstoneWireBlockMixin | ||
{ | ||
// inject right before world.addParticle to avoid client RNG side effects | ||
@Inject( | ||
method = "randomDisplayTick", | ||
at = @At( | ||
value = "INVOKE", | ||
target = "Lnet/minecraft/world/World;addParticle(Lnet/minecraft/particle/ParticleEffect;DDDDDD)V" | ||
), | ||
cancellable = true | ||
) | ||
private void disableRedstoneWireParticle(CallbackInfo ci) | ||
{ | ||
if (TweakerMoreConfigs.DISABLE_REDSTONE_WIRE_PARTICLE.getBooleanValue()) | ||
{ | ||
ci.cancel(); | ||
} | ||
} | ||
} |
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
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