Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into hotbar-scrolling
Browse files Browse the repository at this point in the history
  • Loading branch information
WaitingIdly committed Jun 17, 2024
2 parents bc2498c + 61a68fa commit 250e228
Show file tree
Hide file tree
Showing 26 changed files with 423 additions and 7 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@ All changes are toggleable via config files.
* **Hide Personal Effect Particles:** Disables potion effect particles emitting from yourself
* **Horizontal Collision Damage:** Applies horizontal collision damage to the player akin to elytra collision
* **Husk & Stray Spawning:** Lets husks and strays spawn underground like regular zombies and skeletons
* **Improve Barrier Particle Display:** Causes Barrier Particles to always be displayed to players in Creative mode
* **Improve Language Switching Speed:** Improves the speed of switching languages in the Language GUI
* **Improve Server Connection Speed:** Improves the speed of connecting to servers by setting the InetAddress host name to the IP in situations where it can be represented as the IP address, preventing getHostFromNameService from being to be run
* **Improved Entity Tracker Warning:** Provides more information to addPacket removed entity warnings
* **Incurable Potions:** Excludes potion effects from being curable with curative items like buckets of milk
* **Infinite Music:** Lets background music play continuously without delays
Expand All @@ -184,6 +186,7 @@ All changes are toggleable via config files.
* **Load Sounds:** Plays sounds when the game or the world are loaded
* **Mending Overpowered:** If mending fix is enabled, repairs entire damaged inventory with XP
* **Mending:** Only repairs damaged equipment with XP
* **Minecart Drops Itself:** Replaces vanilla Minecarts dropping a Minecart and the contained item, and instead drop the combined item
* **Mob Despawn Improvement:** Mobs carrying picked up items will drop their equipment and despawn properly
* **Modern Knockback:** Backports 1.16+ knockback to 1.12: Knockback resistance is now a scale instead of a probability
* **More Banner Layers:** Sets the amount of applicable pattern layers for banners
Expand All @@ -204,6 +207,7 @@ All changes are toggleable via config files.
* **Offhand Improvement:** Prevents placing offhand blocks when blocks or food are held in the mainhand
* **Overhaul Beacon:** Change how beacon construct and range apply per level
* **Overlay Message Height:** Sets the Y value of the overlay message (action bar), displayed for playing records etc.
* **Particle Limit:** Limits particles to a set amount. Should not be set too low, as it will cause particles to appear for a single tick before vanishing
* **Pickup Notification:** Displays highly configurable notifications when the player obtains or loses items
* **Player Speed:** Enables the modification of base and maximum player speeds along with fixing 'Player moved too quickly' messages
* **Prevent Observer Activating on Placement:** Controls if the observer activates itself on the first tick when it is placed
Expand All @@ -213,7 +217,7 @@ All changes are toggleable via config files.
* **Rabbit Toast Spawning:** Configurable chance for rabbits to spawn as the Toast variant
* **Rally Health:** Adds Bloodborne's Rally system to Minecraft, regain lost health when attacking back within the risk time
* **Remove 3D Anaglyph Button:** Removes the 3D Anaglyph button from the video settings menu
* **Remove Realms Button:** Removes the redundant Minecraft Realms button from the main menu
* **Remove Realms Button:** Removes the redundant Minecraft Realms button from the main menu and silences notifications
* **Remove Recipe Book:** Removes the recipe book button from GUIs
* **Remove Snooper:** Forcefully turns off the snooper and hides the snooper settings button from the options menu
* **Render End Portal Bottom:** Controls if the End Portal renders its texture on the bottom face
Expand Down Expand Up @@ -303,6 +307,7 @@ All changes are toggleable via config files.
* **Epic Siege Mod**
* **Disable Digger AI Debug:** Disables leftover debug logging inside the digger AI of the beta builds
* **Extra Utilities 2**
* **Catch Radar Exception:** Fixes the Radar feature (find in nearby inventories) entirely breaking when near some inventories
* **Duplication Fixes:** Fixes various duplication exploits
* **Fix Deep Dark Stats:** Fixes Mob Attack and Health Statistics being repeatedly doubled
* **Mutable Machine Block Drops:** Fixes Machine Block drops being immutable, causing a crash on attempting to remove entries from the list.
Expand Down
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ dependencies {
compileOnly rfg.deobf('curse.maven:openblocks-228816:2699056')
compileOnly rfg.deobf('curse.maven:reborn-core-237903:3330308')
compileOnly rfg.deobf('curse.maven:reskillable-286382:2815686')
compileOnly rfg.deobf('curse.maven:requious-frakto-336748:3218640')
compileOnly rfg.deobf('curse.maven:roost-277711:2702080')
compileOnly rfg.deobf('curse.maven:simpledifficulty-360779:3613814')
compileOnly rfg.deobf('curse.maven:storage-drawers-223852:2952606')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ public class UTConfigMods
@Config.Name("Railcraft")
public static final RailcraftCategory RAILCRAFT = new RailcraftCategory();

@Config.LangKey("cfg.universaltweaks.modintegration.requiousfrakto")
@Config.Name("Requious Frakto")
public static final RequiousFraktoCategory REQUIOUS_FRAKTO = new RequiousFraktoCategory();

@Config.LangKey("cfg.universaltweaks.modintegration.rftoolsdimensions")
@Config.Name("RFTools Dimensions")
public static final RFToolsDimensionsCategory RFTOOLS_DIMENSIONS = new RFToolsDimensionsCategory();
Expand Down Expand Up @@ -435,6 +439,15 @@ public static class ErebusCategory

public static class ExtraUtilitiesCategory
{
@Config.RequiresMcRestart
@Config.Name("Catch Radar Exception")
@Config.Comment
({
"When near some inventories, the Radar feature (find in nearby inventories) will entirely break",
"this catches the AbstractMethodException thrown, allowing other nearby inventories to be searched"
})
public boolean utCatchRadarException = true;

@Config.RequiresMcRestart
@Config.Name("Fix Deep Dark Stats")
@Config.Comment("Fixes Mob Attack and Health Statistics being repeatedly doubled")
Expand Down Expand Up @@ -658,6 +671,14 @@ public static class RailcraftCategory
public boolean utNoBetaWarningToggle = true;
}

public static class RequiousFraktoCategory
{
@Config.RequiresMcRestart
@Config.Name("Particle Fixes")
@Config.Comment("Fixes server world being leaked to various particles")
public boolean utParticleFixesToggle = true;
}

public static class RoostCategory
{
@Config.RequiresMcRestart
Expand Down Expand Up @@ -964,6 +985,11 @@ public static class TinkersConstructCategory
@Config.Comment("Fixes various duplication exploits")
public boolean utDuplicationFixesToggle = true;

@Config.RequiresMcRestart
@Config.Name("Particle Fixes")
@Config.Comment("Fixes server world being leaked to various particles")
public boolean utParticleFixesToggle = true;

@Config.RequiresMcRestart
@Config.Name("Tool Customization")
@Config.Comment("Enables usage of tweaks in below category to customize Tinkers' tools stats")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,11 @@ public static class BlocksCategory
@Config.Comment("Determines how long falling blocks remain in ticks until they are dropped under normal circumstances")
public int utFallingBlockLifespan = 600;

@Config.RequiresMcRestart
@Config.Name("Improve Barrier Particle Display")
@Config.Comment("Causes Barrier Particles to always be displayed to players in Creative mode")
public boolean utBarrierParticleDisplay = false;

@Config.RequiresMcRestart
@Config.Name("Prevent Observer Activating on Placement")
@Config.Comment("Controls if the observer activates itself on the first tick when it is placed")
Expand Down Expand Up @@ -536,6 +541,11 @@ public static class EntitiesCategory
@Config.Comment("Backports 1.16+ knockback to 1.12: Knockback resistance is now a scale instead of a probability")
public boolean utModernKnockbackToggle = true;

@Config.RequiresMcRestart
@Config.Name("Minecart Drops Itself")
@Config.Comment("Replaces vanilla Minecarts dropping a Minecart and the contained item, and instead drop the combined item")
public boolean utMinecartDropsType = false;

@Config.RequiresMcRestart
@Config.Name("No Portal Spawning")
@Config.Comment("Prevents zombie pigmen spawning from nether portals")
Expand Down Expand Up @@ -1484,6 +1494,16 @@ public static class MiscCategory
@Config.Comment("Disables potion effect particles emitting from yourself")
public boolean utPoVEffectParticles = false;

@Config.RequiresMcRestart
@Config.Name("Particle Limit")
@Config.Comment
({
"Limits particles to a set amount. Should not be set too low, as it will cause particles to appear for a single tick before vanishing",
"Vanilla default is 16384",
"Less than or equal to 0 is set to the default"
})
public int utParticleLimit = -1;

@Config.RequiresMcRestart
@Config.Name("No Smelting XP")
@Config.Comment("Disables the experience reward when smelting items in furnaces")
Expand Down Expand Up @@ -1516,7 +1536,7 @@ public static class MiscCategory
@Config.Name("Remove Realms Button")
@Config.Comment
({
"Removes the redundant Minecraft Realms button from the main menu",
"Removes the redundant Minecraft Realms button from the main menu and silences notifications",
"Incompatible with RandomPatches"
})
public boolean utRealmsButtonToggle = true;
Expand Down Expand Up @@ -1983,6 +2003,15 @@ public static class PerformanceCategory
@Config.Comment("Improves the speed of switching languages in the Language GUI")
public boolean utImproveLanguageSwitchingSpeed = true;

@Config.RequiresMcRestart
@Config.Name("Improve Server Connection Speed")
@Config.Comment
({
"Improves the speed of connecting to servers by setting the InetAddress host name to the IP in situations",
"where it can be represented as the IP address, preventing getHostFromNameService from being to be run"
})
public boolean utImproveServerConnectionSpeed = true;

@Config.RequiresMcRestart
@Config.Name("Mute Advancement Errors")
@Config.Comment("Silences advancement errors")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public class UTLoadingPlugin implements IFMLLoadingPlugin, IEarlyMixinLoader
put("mixins.bugfixes.world.chunksaving.json", () -> UTConfigBugfixes.WORLD.utChunkSavingToggle && !spongeForgeLoaded);
put("mixins.bugfixes.world.tileentities.json", () -> UTConfigBugfixes.WORLD.utTileEntityMap != UTConfigBugfixes.WorldCategory.EnumMaps.HASHMAP);
put("mixins.bugfixes.world.witchhuts.json", () -> UTConfigBugfixes.WORLD.utWitchStructuresToggle);
put("mixins.tweaks.blocks.barrier.json", () -> UTConfigTweaks.BLOCKS.utBarrierParticleDisplay);
put("mixins.tweaks.blocks.bedobstruction.json", () -> UTConfigTweaks.BLOCKS.utBedObstructionToggle);
put("mixins.tweaks.blocks.breakablebedrock.json", () -> UTConfigTweaks.BLOCKS.BREAKABLE_BEDROCK.utBreakableBedrockToggle);
put("mixins.tweaks.blocks.endcrystal.json", () -> UTConfigTweaks.BLOCKS.utEndCrystalAnywherePlacing);
Expand Down Expand Up @@ -100,6 +101,7 @@ public class UTLoadingPlugin implements IFMLLoadingPlugin, IEarlyMixinLoader
put("mixins.tweaks.entities.damage.velocity.json", () -> UTConfigTweaks.ENTITIES.DAMAGE_VELOCITY.utDamageVelocityToggle);
put("mixins.tweaks.entities.despawning.json", () -> UTConfigTweaks.ENTITIES.utMobDespawnToggle);
put("mixins.tweaks.entities.loot.json", () -> UTConfigTweaks.ENTITIES.utCreeperMusicDiscsToggle);
put("mixins.tweaks.entities.minecart.json", () -> UTConfigTweaks.ENTITIES.utMinecartDropsType);
put("mixins.tweaks.entities.playerdismount.json", () -> UTConfigTweaks.MISC.utUseSeparateDismountKey);
put("mixins.tweaks.entities.saturation.json", () -> UTConfigTweaks.ENTITIES.utRidingExhaustion != 0.0D);
put("mixins.tweaks.entities.spawning.caps.json", () -> UTConfigTweaks.ENTITIES.SPAWN_CAPS.utSpawnCapsToggle);
Expand Down Expand Up @@ -199,11 +201,13 @@ public class UTLoadingPlugin implements IFMLLoadingPlugin, IEarlyMixinLoader
put("mixins.tweaks.misc.narrator.json", () -> UTConfigTweaks.MISC.utDisableNarratorToggle);
put("mixins.tweaks.misc.narratorkeybind.json", () -> UTConfigTweaks.MISC.utUseCustomNarratorKeybind);
put("mixins.tweaks.misc.nightvisionflash.json", () -> UTConfigTweaks.MISC.utNightVisionFlashToggle);
put("mixins.tweaks.misc.particlelimit.json", () -> UTConfigTweaks.MISC.utParticleLimit > 0);
put("mixins.tweaks.misc.personalpotionparticles.json", () -> UTConfigTweaks.MISC.utPoVEffectParticles);
put("mixins.tweaks.misc.recipebook.client.json", () -> UTConfigTweaks.MISC.utRecipeBookToggle);
put("mixins.tweaks.misc.smoothscrolling.json", () -> UTConfigTweaks.MISC.SMOOTH_SCROLLING.utSmoothScrollingToggle);
put("mixins.tweaks.misc.toastcontrol.json", () -> UTConfigTweaks.MISC.TOAST_CONTROL.utToastControlToggle);
put("mixins.tweaks.performance.audioreload.json", () -> UTConfigTweaks.PERFORMANCE.utDisableAudioDebugToggle && !surgeLoaded);
put("mixins.tweaks.performance.connectionspeed.json", () -> UTConfigTweaks.PERFORMANCE.utImproveLanguageSwitchingSpeed);
put("mixins.tweaks.performance.fps.json", () -> UTConfigTweaks.PERFORMANCE.utUncapFPSToggle);
put("mixins.tweaks.performance.languageswitching.json", () -> UTConfigTweaks.PERFORMANCE.utImproveLanguageSwitchingSpeed);
put("mixins.tweaks.performance.missingmodel.json", () -> UTConfigTweaks.PERFORMANCE.utDisableFancyMissingModelToggle);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public class UTMixinLoader implements ILateMixinLoader
put("mixins.mods.modularrouters.json", () -> loaded("modularrouters") && UTConfigMods.MODULAR_ROUTERS.utParticleThreadToggle);
put("mixins.mods.roost.json", () -> loaded("roost") && loaded("contenttweaker"));
put("mixins.mods.storagedrawers.client.json", () -> loaded("storagedrawers"));
put("mixins.mods.tconstruct.client.json", () -> loaded("tconstruct") && UTConfigMods.TINKERS_CONSTRUCT.utParticleFixesToggle);
put("mixins.mods.thaumcraft.entities.client.json", () -> loaded("thaumcraft"));
}
});
Expand Down Expand Up @@ -59,6 +60,7 @@ public class UTMixinLoader implements ILateMixinLoader
put("mixins.mods.extrautilities.deepdarkstats.json", () -> loaded("extrautils2") && UTConfigMods.EXTRA_UTILITIES.utDeepDarkStats);
put("mixins.mods.extrautilities.dupes.json", () -> loaded("extrautils2") && UTConfigMods.EXTRA_UTILITIES.utDuplicationFixesToggle);
put("mixins.mods.extrautilities.mutabledrops.json", () -> loaded("extrautils2") && UTConfigMods.EXTRA_UTILITIES.utMutableBlockDrops);
put("mixins.mods.extrautilities.radar.json", () -> loaded("extrautils2") && UTConfigMods.EXTRA_UTILITIES.utCatchRadarException);
put("mixins.mods.forestry.cocoa.json", () -> loaded("forestry") && UTConfigMods.FORESTRY.utFOCocoaBeansToggle);
put("mixins.mods.forestry.dupes.json", () -> loaded("forestry") && UTConfigMods.FORESTRY.utDuplicationFixesToggle);
put("mixins.mods.forestry.extratrees.json", () -> loaded("extratrees"));
Expand All @@ -77,6 +79,7 @@ public class UTMixinLoader implements ILateMixinLoader
put("mixins.mods.nuclearcraft.json", () -> loaded("nuclearcraft"));
put("mixins.mods.openblocks.json", () -> loaded("openblocks") && UTConfigMods.OPEN_BLOCKS.utLastStandFixToggle);
put("mixins.mods.quark.dupes.json", () -> loaded("quark") && UTConfigMods.QUARK.utDuplicationFixesToggle);
put("mixins.mods.requiousfrakto.json", () -> loaded("requious") && UTConfigMods.REQUIOUS_FRAKTO.utParticleFixesToggle);
put("mixins.mods.reskillable.json", () -> loaded("reskillable"));
put("mixins.mods.rftoolsdimensions.json", () -> loaded("rftoolsdim"));
put("mixins.mods.roost.contenttweaker.json", () -> loaded("contenttweaker"));
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package mod.acgaming.universaltweaks.mods.extrautilities.radar.mixin;

import net.minecraft.item.ItemStack;
import net.minecraftforge.items.IItemHandler;

import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
import com.rwtema.extrautils2.crafting.Radar;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;

import mod.acgaming.universaltweaks.config.UTConfigMods;

// Courtesy of WaitingIdly
@Mixin(value = Radar.PacketPing.class, remap = false)
public abstract class UTRadarPingMixin
{
@WrapOperation(method = "lambda$doStuffServer$1", at = @At(value = "INVOKE", target = "Lnet/minecraftforge/items/IItemHandler;getStackInSlot(I)Lnet/minecraft/item/ItemStack;"))
private ItemStack utCatchItemHandlerException(IItemHandler instance, int slot, Operation<ItemStack> original)
{
if (!UTConfigMods.EXTRA_UTILITIES.utCatchRadarException) return original.call(instance, slot);
try
{
return original.call(instance, slot);
}
catch (AbstractMethodError e)
{
e.printStackTrace();
return ItemStack.EMPTY;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package mod.acgaming.universaltweaks.mods.requiousfrakto.mixin;

import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
import net.minecraft.tileentity.TileEntity;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import requious.tile.TileEntityAssembly;

// Courtesy of jchung01
@Mixin(value = TileEntityAssembly.class)
public abstract class UTTileEntityAssemblyMixin extends TileEntity
{
/**
* @reason Updating MachineVisuals should only be needed client-side.
* This is the earliest we can check the side before calls to IProxy
* methods for spawning particles.
*/
@ModifyExpressionValue(method = "update", at = @At(value = "INVOKE", target = "Ljava/util/Iterator;hasNext()Z", remap = false))
private boolean utCheckSide(boolean original)
{
if (!this.world.isRemote) return false;
return original;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package mod.acgaming.universaltweaks.mods.tconstruct.mixin;

import com.llamalad7.mixinextras.sugar.Local;
import com.llamalad7.mixinextras.sugar.ref.LocalRef;
import net.minecraft.client.Minecraft;
import net.minecraft.world.World;
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 slimeknights.tconstruct.common.ClientProxy;

// Courtesy of jchung01
@Mixin(value = ClientProxy.class, remap = false)
public class UTClientProxyMixin
{
/**
* @reason It is never correct to use passed worlds for particles, only use the client's.
* Ideally we would check sides in the relevant methods before even calling this,
* but this is simpler.
*/
@Inject(method = "spawnParticle", at = @At(value = "HEAD"))
private void utSetWorld(CallbackInfo ci, @Local(argsOnly = true) LocalRef<World> worldRef)
{
worldRef.set(Minecraft.getMinecraft().world);
}
}
Loading

0 comments on commit 250e228

Please sign in to comment.