-
Notifications
You must be signed in to change notification settings - Fork 38
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
6e08462
commit d4b3b14
Showing
5 changed files
with
49 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
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
27 changes: 27 additions & 0 deletions
27
...niversaltweaks/mods/actuallyadditions/itemparticle/mixin/UTTileEntityItemViewerMixin.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,27 @@ | ||
package mod.acgaming.universaltweaks.mods.actuallyadditions.itemparticle.mixin; | ||
|
||
import net.minecraft.client.Minecraft; | ||
import net.minecraft.nbt.NBTTagCompound; | ||
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; | ||
|
||
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; | ||
|
||
import mod.acgaming.universaltweaks.config.UTConfigMods; | ||
|
||
// Courtesy of WaitingIdly | ||
@Mixin(targets = "de.ellpeck.actuallyadditions.mod.network.PacketHandler$3", remap = false) | ||
public abstract class UTTileEntityItemViewerMixin | ||
{ | ||
@Inject(method = "handleData", at = @At("HEAD"), cancellable = true) | ||
private void utDoItemParticle(NBTTagCompound compound, MessageContext context, CallbackInfo ci) | ||
{ | ||
int value = UTConfigMods.ACTUALLY_ADDITIONS.utItemLaserParticlesGraphics; | ||
if (value > 3 || Minecraft.getMinecraft().gameSettings.particleSetting >= value) | ||
{ | ||
ci.cancel(); | ||
} | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/main/resources/mixins.mods.actuallyadditions.itemparticle.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 @@ | ||
{ | ||
"package": "mod.acgaming.universaltweaks.mods.actuallyadditions.itemparticle.mixin", | ||
"refmap": "universaltweaks.refmap.json", | ||
"minVersion": "0.8", | ||
"compatibilityLevel": "JAVA_8", | ||
"mixins": ["UTTileEntityItemViewerMixin"] | ||
} |