Skip to content

Commit

Permalink
Item Laser Particles Graphics
Browse files Browse the repository at this point in the history
  • Loading branch information
WaitingIdly committed Oct 1, 2024
1 parent 6e08462 commit d4b3b14
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ All changes are toggleable via config files.
* **Actually Additions**
* **Duplication Fixes:** Fixes various duplication exploits
* **Laser Upgrade Voiding:** Fixes Laser Upgrades voiding instead of applying if there is only one item in the stack
* **Item Laser Particles Graphics:** Sets what level of Graphic Setting is required to disable the Item Particles generated by Item Lasers transferring items
* **Astral Sorcery**
* **Missing Player Log Level:** Downgrades the message when completing a recipe without an initializing player from a warning to a debug
* **Sooty Marble Rendering:** Fixes Sooty Marble Pillar blocking the proper rendering of adjacent fluids due to inverted logic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,19 @@ public static class ActuallyAdditionsCategory
@Config.Name("Laser Upgrade Voiding")
@Config.Comment("Fixes Laser Upgrades voiding instead of applying if there is only one item in the stack")
public boolean utLaserUpgradeVoid = true;

@Config.Name("Item Laser Particles Graphics")
@Config.Comment
({
"Sets what level of Particles Setting is required to disable the Item Particles generated by Item Lasers transferring items",
"The config setting here is complex due to how Vanilla Minecraft handles the Particles setting",
"-1 or lower will not register the mixin",
"0 disables the creation of these particles entirely",
"1 disables the creation of these particles when the Particle setting is on Minimal only",
"2 disables the creation of these particles when the Particle setting is on Decreased or Minimal",
"3 or higher will never disable these particles"
})
public int utItemLaserParticlesGraphics = -1;
}

public static class ArcaneArchivesCategory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public class UTMixinLoader implements ILateMixinLoader
{
put("mixins.mods.abyssalcraft.json", () -> loaded("abyssalcraft"));
put("mixins.mods.actuallyadditions.dupes.json", () -> loaded("actuallyadditions") && UTConfigMods.ACTUALLY_ADDITIONS.utDuplicationFixesToggle);
put("mixins.mods.actuallyadditions.itemparticle.json", () -> loaded("actuallyadditions") && UTConfigMods.ACTUALLY_ADDITIONS.utItemLaserParticlesGraphics > -1);
put("mixins.mods.actuallyadditions.relayupgrade.json", () -> loaded("actuallyadditions") && UTConfigMods.ACTUALLY_ADDITIONS.utLaserUpgradeVoid);
put("mixins.mods.aoa3.json", () -> loaded("aoa3") && UTConfigMods.AOA.utImprovedPlayerTickToggle);
put("mixins.mods.arcanearchives.dupes.json", () -> loaded("arcanearchives") && UTConfigMods.ARCANE_ARCHIVES.utDuplicationFixesToggle);
Expand Down
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();
}
}
}
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"]
}

0 comments on commit d4b3b14

Please sign in to comment.