diff --git a/README.md b/README.md index 9940d5d0..f34f62be 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/src/main/java/mod/acgaming/universaltweaks/config/UTConfigMods.java b/src/main/java/mod/acgaming/universaltweaks/config/UTConfigMods.java index 9e0e2b79..f2992eab 100644 --- a/src/main/java/mod/acgaming/universaltweaks/config/UTConfigMods.java +++ b/src/main/java/mod/acgaming/universaltweaks/config/UTConfigMods.java @@ -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 diff --git a/src/main/java/mod/acgaming/universaltweaks/core/UTMixinLoader.java b/src/main/java/mod/acgaming/universaltweaks/core/UTMixinLoader.java index 6ef26761..770a397d 100644 --- a/src/main/java/mod/acgaming/universaltweaks/core/UTMixinLoader.java +++ b/src/main/java/mod/acgaming/universaltweaks/core/UTMixinLoader.java @@ -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")); diff --git a/src/main/java/mod/acgaming/universaltweaks/mods/actuallyadditions/mixin/UTTileEntityBreakerMixin.java b/src/main/java/mod/acgaming/universaltweaks/mods/actuallyadditions/dupes/mixin/UTTileEntityBreakerMixin.java similarity index 97% rename from src/main/java/mod/acgaming/universaltweaks/mods/actuallyadditions/mixin/UTTileEntityBreakerMixin.java rename to src/main/java/mod/acgaming/universaltweaks/mods/actuallyadditions/dupes/mixin/UTTileEntityBreakerMixin.java index ad38cea0..4a67d4ed 100644 --- a/src/main/java/mod/acgaming/universaltweaks/mods/actuallyadditions/mixin/UTTileEntityBreakerMixin.java +++ b/src/main/java/mod/acgaming/universaltweaks/mods/actuallyadditions/dupes/mixin/UTTileEntityBreakerMixin.java @@ -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; diff --git a/src/main/java/mod/acgaming/universaltweaks/mods/actuallyadditions/mixin/UTTileEntityDirectionalBreakerMixin.java b/src/main/java/mod/acgaming/universaltweaks/mods/actuallyadditions/dupes/mixin/UTTileEntityDirectionalBreakerMixin.java similarity index 98% rename from src/main/java/mod/acgaming/universaltweaks/mods/actuallyadditions/mixin/UTTileEntityDirectionalBreakerMixin.java rename to src/main/java/mod/acgaming/universaltweaks/mods/actuallyadditions/dupes/mixin/UTTileEntityDirectionalBreakerMixin.java index e7bf5710..e93df58a 100644 --- a/src/main/java/mod/acgaming/universaltweaks/mods/actuallyadditions/mixin/UTTileEntityDirectionalBreakerMixin.java +++ b/src/main/java/mod/acgaming/universaltweaks/mods/actuallyadditions/dupes/mixin/UTTileEntityDirectionalBreakerMixin.java @@ -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; diff --git a/src/main/java/mod/acgaming/universaltweaks/mods/actuallyadditions/mixin/UTTileEntityPhantomPlacerMixin.java b/src/main/java/mod/acgaming/universaltweaks/mods/actuallyadditions/dupes/mixin/UTTileEntityPhantomPlacerMixin.java similarity index 98% rename from src/main/java/mod/acgaming/universaltweaks/mods/actuallyadditions/mixin/UTTileEntityPhantomPlacerMixin.java rename to src/main/java/mod/acgaming/universaltweaks/mods/actuallyadditions/dupes/mixin/UTTileEntityPhantomPlacerMixin.java index 7d6ece1f..2ef8e5d8 100644 --- a/src/main/java/mod/acgaming/universaltweaks/mods/actuallyadditions/mixin/UTTileEntityPhantomPlacerMixin.java +++ b/src/main/java/mod/acgaming/universaltweaks/mods/actuallyadditions/dupes/mixin/UTTileEntityPhantomPlacerMixin.java @@ -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; diff --git a/src/main/java/mod/acgaming/universaltweaks/mods/actuallyadditions/itemparticle/mixin/UTTileEntityItemViewerMixin.java b/src/main/java/mod/acgaming/universaltweaks/mods/actuallyadditions/itemparticle/mixin/UTTileEntityItemViewerMixin.java new file mode 100644 index 00000000..7447cbc2 --- /dev/null +++ b/src/main/java/mod/acgaming/universaltweaks/mods/actuallyadditions/itemparticle/mixin/UTTileEntityItemViewerMixin.java @@ -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(); + } + } +} \ No newline at end of file diff --git a/src/main/java/mod/acgaming/universaltweaks/mods/actuallyadditions/mixin/UTBlockLaserRelayMixin.java b/src/main/java/mod/acgaming/universaltweaks/mods/actuallyadditions/relayupgrade/mixin/UTBlockLaserRelayMixin.java similarity index 95% rename from src/main/java/mod/acgaming/universaltweaks/mods/actuallyadditions/mixin/UTBlockLaserRelayMixin.java rename to src/main/java/mod/acgaming/universaltweaks/mods/actuallyadditions/relayupgrade/mixin/UTBlockLaserRelayMixin.java index d0d78344..ccbb1aad 100644 --- a/src/main/java/mod/acgaming/universaltweaks/mods/actuallyadditions/mixin/UTBlockLaserRelayMixin.java +++ b/src/main/java/mod/acgaming/universaltweaks/mods/actuallyadditions/relayupgrade/mixin/UTBlockLaserRelayMixin.java @@ -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; diff --git a/src/main/resources/mixins.mods.actuallyadditions.dupes.json b/src/main/resources/mixins.mods.actuallyadditions.dupes.json index be55b137..6c2f5188 100644 --- a/src/main/resources/mixins.mods.actuallyadditions.dupes.json +++ b/src/main/resources/mixins.mods.actuallyadditions.dupes.json @@ -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", diff --git a/src/main/resources/mixins.mods.actuallyadditions.itemparticle.json b/src/main/resources/mixins.mods.actuallyadditions.itemparticle.json new file mode 100644 index 00000000..a645e915 --- /dev/null +++ b/src/main/resources/mixins.mods.actuallyadditions.itemparticle.json @@ -0,0 +1,7 @@ +{ + "package": "mod.acgaming.universaltweaks.mods.actuallyadditions.itemparticle.mixin", + "refmap": "universaltweaks.refmap.json", + "minVersion": "0.8", + "compatibilityLevel": "JAVA_8", + "mixins": ["UTTileEntityItemViewerMixin"] +} \ No newline at end of file diff --git a/src/main/resources/mixins.mods.actuallyadditions.json b/src/main/resources/mixins.mods.actuallyadditions.relayupgrade.json similarity index 89% rename from src/main/resources/mixins.mods.actuallyadditions.json rename to src/main/resources/mixins.mods.actuallyadditions.relayupgrade.json index 705e7cf6..b6240c23 100644 --- a/src/main/resources/mixins.mods.actuallyadditions.json +++ b/src/main/resources/mixins.mods.actuallyadditions.relayupgrade.json @@ -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",