Skip to content

Commit

Permalink
Merge pull request #560 from WaitingIdly/aa-item-laser
Browse files Browse the repository at this point in the history
Disabling Actually Additions Item Laser Particles
  • Loading branch information
ACGaming authored Oct 1, 2024
2 parents 9af0525 + d4b3b14 commit 1a14519
Show file tree
Hide file tree
Showing 11 changed files with 56 additions and 7 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,7 +39,8 @@ 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.json", () -> loaded("actuallyadditions"));
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);
put("mixins.mods.astralsorcery.json", () -> loaded("astralsorcery"));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package mod.acgaming.universaltweaks.mods.actuallyadditions.mixin;
package mod.acgaming.universaltweaks.mods.actuallyadditions.dupes.mixin;

import net.minecraft.block.Block;
import net.minecraft.block.BlockLiquid;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package mod.acgaming.universaltweaks.mods.actuallyadditions.mixin;
package mod.acgaming.universaltweaks.mods.actuallyadditions.dupes.mixin;

import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package mod.acgaming.universaltweaks.mods.actuallyadditions.mixin;
package mod.acgaming.universaltweaks.mods.actuallyadditions.dupes.mixin;

import net.minecraft.block.Block;
import net.minecraft.item.ItemStack;
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
@@ -1,4 +1,4 @@
package mod.acgaming.universaltweaks.mods.actuallyadditions.mixin;
package mod.acgaming.universaltweaks.mods.actuallyadditions.relayupgrade.mixin;

import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.player.EntityPlayer;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"package": "mod.acgaming.universaltweaks.mods.actuallyadditions.mixin",
"package": "mod.acgaming.universaltweaks.mods.actuallyadditions.dupes.mixin",
"refmap": "universaltweaks.refmap.json",
"minVersion": "0.8",
"compatibilityLevel": "JAVA_8",
Expand Down
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"]
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"package": "mod.acgaming.universaltweaks.mods.actuallyadditions.mixin",
"package": "mod.acgaming.universaltweaks.mods.actuallyadditions.relayupgrade.mixin",
"refmap": "universaltweaks.refmap.json",
"minVersion": "0.8",
"compatibilityLevel": "JAVA_8",
Expand Down

0 comments on commit 1a14519

Please sign in to comment.