Skip to content

Commit

Permalink
Merge pull request #481 from WaitingIdly/random-patches
Browse files Browse the repository at this point in the history
Some RandomPatches Tweaks
  • Loading branch information
ACGaming authored Jun 6, 2024
2 parents 6d987f6 + 3be0fb1 commit 888cb95
Show file tree
Hide file tree
Showing 32 changed files with 576 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ All changes are toggleable via config files.
* **Exhaustion:** Fixes saturation depleting in peaceful mode
* **Falling Block Entity Damage:** Only damage living entities hit by falling blocks, prevents killing items and XP
* **Faster Background Startup:** Fixes slow background startup edge case caused by checking tooltips during the loading process
* **Fixes Invisible Player when Flying with Elytra:** Fixes the player model occasionally disappearing when flying with elytra in a straight line in third-person mode
* **Frustum Culling:** Fixes invisible chunks in edge cases (small enclosed rooms at chunk borders)
* **Help:** Replaces the help command, sorts and reports broken commands
* **Hopper Bounding Box:** Slims down the hopper bounding box for easier access of nearby blocks
Expand Down Expand Up @@ -85,6 +86,7 @@ All changes are toggleable via config files.
* **Adaptive XP Drops:** Scales dropped experience from entities based on their health
* **AI Improvements:** Replaces/removes entity AI for improved server performance
* **Always Eat:** Allows the consumption of food at any time, regardless of the hunger bar
* **Always Return to Main Menu:** Always returns the player to the main menu when quitting the game
* **Armed Armor Stands:** Enables arms for armor stands by default
* **Armor Curve:** Adjusts the armor scaling and degradation formulae for mobs and players
* **Attributes:** Sets custom ranges for entity attributes
Expand Down Expand Up @@ -136,6 +138,8 @@ All changes are toggleable via config files.
* **Disable Fancy Missing Model:** Improves rendering performance by removing the resource location text on missing models
* **Disable Mob Spawner Entity Render:** Disables rendering an entity inside of Mob Spawners
* **Disable Narrator:** Disables the narrator functionality entirely
* **Disable Glint Overlay on Enchantment Books:** Disables the glint overlay on enchantment books
* **Disable Glint Overlay on Potions:** Disables the glint overlay on potions
* **Disable Sleeping:** Disables skipping night by using a bed while making it still able to set spawn
* **Disable Text Shadowing:** Disables all text shadowing, where text has a darker version of itself rendered behind the normal text, changing the appearance and can improve fps on some screens
* **Disable Villager Trade Leveling:** Disables leveling of villager careers, only allowing base level trades
Expand All @@ -162,6 +166,7 @@ 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 Language Switching Speed:** Improves the speed of switching languages in the Language GUI
* **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 Down Expand Up @@ -200,6 +205,8 @@ All changes are toggleable via config files.
* **Overlay Message Height:** Sets the Y value of the overlay message (action bar), displayed for playing records etc.
* **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
* **Prevent Placing Buckets in Portals:** Prevents placing of liquid source blocks overriding portal blocks
* **Pumpkin Placing:** Allows placing Pumpkins and Jack'O'Lanterns without a supporting block
* **Rabbit Killer Spawning:** Configurable chance for rabbits to spawn as the killer bunny variant
* **Rabbit Toast Spawning:** Configurable chance for rabbits to spawn as the Toast variant
Expand All @@ -208,6 +215,7 @@ All changes are toggleable via config files.
* **Remove Realms Button:** Removes the redundant Minecraft Realms button from the main menu
* **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
* **Riding Exhaustion:** Enables depleting saturation when riding mounts
* **Sapling Behavior:** Allows customization of sapling behavior while utilizing an optimized method
* **Sea Level:** Sets the default height of the overworld's sea level
Expand All @@ -230,6 +238,8 @@ All changes are toggleable via config files.
* **Undead Horses**
* **Burning:** Lets untamed undead horses burn in daylight
* **Taming:** Allows taming of undead horses
* **Use Separate Dismount Key:** Makes the dismount keybind separate from LSHIFT, allowing it to be rebound independently
* **Use Separate Narrator Key:** Allows using a custom Narrator key, instead of being stuck with CTRL+B
* **Village Distance:** Sets the village generation distance in chunks
* **Void Fog:** Re-implements pre-1.8 void fog and void particles
* **Water Fall Damage:** Re-implements an improved version of pre-1.4 fall damage in water
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package mod.acgaming.universaltweaks.bugfixes.entities.elytra.render.mixin;

import net.minecraft.client.renderer.entity.RenderPlayer;

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

import mod.acgaming.universaltweaks.config.UTConfigBugfixes;

// Courtesy of WaitingIdly, TheRandomLabs (RandomPatches)
@Mixin(value = RenderPlayer.class)
public abstract class UTRenderPlayerMixin
{
@WrapOperation(method = "applyRotations", at = @At(value = "INVOKE", target = "Ljava/lang/Math;acos(D)D"))
private double utClampToPreventInvisiblePlayerOnElytra(double instance, Operation<Double> original)
{
if (!UTConfigBugfixes.ENTITIES.utFixInvisiblePlayerModelWithElytra) return original.call(instance);
return original.call(Math.min(1, instance));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,11 @@ public static class EntitiesCategory
@Config.Comment("Relocate elytra deployment and landing to client side to prevent issues with high latencies")
public boolean utElytraDeploymentLandingToggle = true;

@Config.RequiresMcRestart
@Config.Name("Fixes Invisible Player when Flying with Elytra")
@Config.Comment("Fixes the player model occasionally disappearing when flying with elytra in a straight line in third-person mode")
public boolean utFixInvisiblePlayerModelWithElytra = true;

@Config.RequiresMcRestart
@Config.Name("Entity Bounding Box")
@Config.Comment("Saves entity bounding boxes to tags to prevent breakouts and suffocation")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,16 @@ 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("Prevent Observer Activating on Placement")
@Config.Comment("Controls if the observer activates itself on the first tick when it is placed")
public boolean utPreventObserverActivatesOnPlacement = false;

@Config.RequiresMcRestart
@Config.Name("Render End Portal Bottom")
@Config.Comment("Controls if the End Portal renders its texture on the bottom face")
public boolean utRenderEndPortalBottom = true;

@Config.RequiresMcRestart
@Config.Name("Fast Leaf Decay")
@Config.Comment("Makes leaves decay faster when trees are chopped")
Expand Down Expand Up @@ -1032,6 +1042,11 @@ public static class ItemsCategory
@Config.Comment("Prevents placing of liquid source blocks in the world")
public boolean utHardcoreBucketsToggle = false;

@Config.RequiresMcRestart
@Config.Name("Prevent Placing Buckets in Portals")
@Config.Comment("Prevents placing of liquid source blocks overriding portal blocks")
public boolean utPreventBucketPlacingInPortal = false;

@Config.RequiresMcRestart
@Config.Name("No Leftover Breath Bottles")
@Config.Comment("Disables dragon's breath from being a container item and leaving off empty bottles when a stack is brewed with")
Expand Down Expand Up @@ -1364,6 +1379,11 @@ public static class MiscCategory
@Config.Comment("Always displays the actual potion duration instead of `**:**`")
public boolean utPotionDurationToggle = true;

@Config.RequiresMcRestart
@Config.Name("Always Return to Main Menu")
@Config.Comment("Always returns the player to the main menu when quitting the game")
public boolean utReturnToMainMenu = false;

@Config.RequiresMcRestart
@Config.Name("Copy World Seed")
@Config.Comment("Enables clicking of `/seed` world seed in chat to copy to clipboard")
Expand Down Expand Up @@ -1412,6 +1432,16 @@ public static class MiscCategory
@Config.Comment("Displays the ping in milliseconds of players when viewing the server list")
public boolean utBetterPing = true;

@Config.RequiresMcRestart
@Config.Name("Disable Glint Overlay on Potions")
@Config.Comment("Disables the glint overlay on potions")
public boolean utDisablePotionGlint = false;

@Config.RequiresMcRestart
@Config.Name("Disable Glint Overlay on Enchantment Books")
@Config.Comment("Disables the glint overlay on enchantment books")
public boolean utDisableEnchantmentBookGlint = false;

@Config.RequiresMcRestart
@Config.Name("Prevent Keybinds from Overflowing Screen")
@Config.Comment("Always indent keybind entries from the screen edge, preventing them from overflowing off the left side when particularly long keybind names are present")
Expand Down Expand Up @@ -1519,6 +1549,16 @@ public static class MiscCategory
})
public boolean utSkipRegistryScreenToggle = false;

@Config.RequiresMcRestart
@Config.Name("Use Separate Dismount Key")
@Config.Comment("Makes the dismount keybind separate from LSHIFT, allowing it to be rebound independently")
public boolean utUseSeparateDismountKey = false;

@Config.RequiresMcRestart
@Config.Name("Use Separate Narrator Key")
@Config.Comment("Allows using a custom Narrator key, instead of being stuck with CTRL+B")
public boolean utUseCustomNarratorKeybind = false;

@Config.Name("Toggle Cheats Button")
@Config.Comment("Adds a button to the pause menu to toggle cheats")
public boolean utToggleCheatsToggle = true;
Expand Down Expand Up @@ -1933,6 +1973,11 @@ public static class PerformanceCategory
})
public boolean utWorldLoadingToggle = false;

@Config.RequiresMcRestart
@Config.Name("Improve Language Switching Speed")
@Config.Comment("Improves the speed of switching languages in the Language GUI")
public boolean utImproveLanguageSwitchingSpeed = 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 @@ -75,13 +75,15 @@ public class UTLoadingPlugin implements IFMLLoadingPlugin, IEarlyMixinLoader
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);
put("mixins.tweaks.blocks.endportal.json", () -> UTConfigTweaks.BLOCKS.utRenderEndPortalBottom);
put("mixins.tweaks.blocks.explosion.json", () -> UTConfigTweaks.BLOCKS.utExplosionDropChance != 1.0D);
put("mixins.tweaks.blocks.falling.json", () -> UTConfigTweaks.BLOCKS.utFallingBlockLifespan != 600);
put("mixins.tweaks.blocks.golemstructure.json", () -> UTConfigTweaks.ENTITIES.utGolemPlacement);
put("mixins.tweaks.blocks.growthsize.json", () -> UTConfigTweaks.BLOCKS.utCactusSize != 3 && UTConfigTweaks.BLOCKS.utSugarCaneSize != 3 && UTConfigTweaks.BLOCKS.utVineSize != 0);
put("mixins.tweaks.blocks.hitdelay.json", () -> UTConfigTweaks.BLOCKS.utBlockHitDelay != 5);
put("mixins.tweaks.blocks.leafdecay.json", () -> UTConfigTweaks.BLOCKS.utLeafDecayToggle);
put("mixins.tweaks.blocks.lenientpaths.json", () -> UTConfigTweaks.BLOCKS.utLenientPathsToggle);
put("mixins.tweaks.blocks.observer.json", () -> UTConfigTweaks.BLOCKS.utPreventObserverActivatesOnPlacement);
put("mixins.tweaks.blocks.overhaulbeacon.json", () -> UTConfigTweaks.BLOCKS.OVERHAUL_BEACON.utOverhaulBeaconToggle);
put("mixins.tweaks.blocks.pumpkinplacing.json", () -> UTConfigTweaks.BLOCKS.utUnsupportedPumpkinPlacing);
put("mixins.tweaks.blocks.sapling.json", () -> UTConfigTweaks.BLOCKS.SAPLING_BEHAVIOR.utSaplingBehaviorToggle);
Expand All @@ -98,6 +100,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.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);
put("mixins.tweaks.entities.spawning.creeper.confetti.json", () -> UTConfigTweaks.ENTITIES.CREEPER_CONFETTI.utCreeperConfettiChance != 0.0D);
Expand All @@ -112,6 +115,7 @@ public class UTLoadingPlugin implements IFMLLoadingPlugin, IEarlyMixinLoader
put("mixins.tweaks.entities.trading.json", () -> UTConfigTweaks.ENTITIES.utVillagerTradeLevelingToggle || UTConfigTweaks.ENTITIES.utVillagerTradeRestockToggle);
put("mixins.tweaks.entities.voidteleport.json", () -> UTConfigTweaks.ENTITIES.VOID_TELEPORT.utVoidTeleportToggle);
put("mixins.tweaks.items.attackcooldown.server.json", () -> UTConfigTweaks.ITEMS.ATTACK_COOLDOWN.utAttackCooldownToggle);
put("mixins.tweaks.items.bucket.json", () -> UTConfigTweaks.ITEMS.utPreventBucketPlacingInPortal);
put("mixins.tweaks.items.eating.json", () -> UTConfigTweaks.ITEMS.utAlwaysEatToggle);
put("mixins.tweaks.items.hardcorebuckets.json", () -> UTConfigTweaks.ITEMS.utHardcoreBucketsToggle);
put("mixins.tweaks.items.infinityallarrows.json", () -> UTConfigTweaks.ITEMS.INFINITY.utAllArrowsAreInfinite);
Expand Down Expand Up @@ -156,6 +160,7 @@ public class UTLoadingPlugin implements IFMLLoadingPlugin, IEarlyMixinLoader
put("mixins.bugfixes.blocks.blockoverlay.json", () -> UTConfigBugfixes.BLOCKS.BLOCK_OVERLAY.utBlockOverlayToggle);
put("mixins.bugfixes.blocks.miningglitch.client.json", () -> UTConfigBugfixes.BLOCKS.MINING_GLITCH.utMiningGlitchToggle);
put("mixins.bugfixes.entities.elytra.json", () -> UTConfigBugfixes.ENTITIES.utElytraDeploymentLandingToggle);
put("mixins.bugfixes.entities.elytrarender.json", () -> UTConfigBugfixes.ENTITIES.utFixInvisiblePlayerModelWithElytra);
put("mixins.bugfixes.entities.entitylists.client.json", () -> UTConfigBugfixes.ENTITIES.ENTITY_LISTS.utWorldAdditionsToggle);
put("mixins.bugfixes.entities.villagermantle.json", () -> UTConfigBugfixes.ENTITIES.utVillagerMantleToggle);
put("mixins.bugfixes.misc.depthmask.json", () -> UTConfigBugfixes.MISC.utDepthMaskToggle);
Expand All @@ -178,6 +183,8 @@ public class UTLoadingPlugin implements IFMLLoadingPlugin, IEarlyMixinLoader
put("mixins.tweaks.misc.chat.maximumlines.json", () -> UTConfigTweaks.MISC.CHAT.utChatLines != 100);
put("mixins.tweaks.misc.commands.seed.json", () -> UTConfigTweaks.MISC.utCopyWorldSeedToggle);
put("mixins.tweaks.misc.credits.json", () -> UTConfigTweaks.MISC.utSkipCreditsToggle);
put("mixins.tweaks.misc.glint.enchantedbook.json", () -> UTConfigTweaks.MISC.utDisableEnchantmentBookGlint);
put("mixins.tweaks.misc.glint.potion.json", () -> UTConfigTweaks.MISC.utDisablePotionGlint);
put("mixins.tweaks.misc.gui.keybindlistentry.json", () -> UTConfigTweaks.MISC.utPreventKeybindingEntryOverflow);
put("mixins.tweaks.misc.gui.lanserverproperties.json", () -> UTConfigTweaks.MISC.utLANServerProperties);
put("mixins.tweaks.misc.gui.overlaymessage.json", () -> UTConfigTweaks.MISC.utOverlayMessageHeight != -4);
Expand All @@ -186,15 +193,18 @@ public class UTLoadingPlugin implements IFMLLoadingPlugin, IEarlyMixinLoader
put("mixins.tweaks.misc.gui.selecteditemtooltip.json", () -> UTConfigTweaks.MISC.utSelectedItemTooltipHeight != 59);
put("mixins.tweaks.misc.gui.textshadow.json", () -> UTConfigTweaks.MISC.utDisableTextShadow);
put("mixins.tweaks.misc.lightning.flash.json", () -> UTConfigTweaks.MISC.LIGHTNING.utLightningFlashToggle);
put("mixins.tweaks.misc.mainmenu.json", () -> UTConfigTweaks.MISC.utReturnToMainMenu);
put("mixins.tweaks.misc.music.json", () -> UTConfigTweaks.MISC.utInfiniteMusicToggle);
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.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.fps.json", () -> UTConfigTweaks.PERFORMANCE.utUncapFPSToggle);
put("mixins.tweaks.performance.languageswitching.json", () -> UTConfigTweaks.PERFORMANCE.utImproveLanguageSwitchingSpeed);
put("mixins.tweaks.performance.missingmodel.json", () -> UTConfigTweaks.PERFORMANCE.utDisableFancyMissingModelToggle);
put("mixins.tweaks.performance.mobspawnerrender.json", () -> UTConfigTweaks.PERFORMANCE.utDisableMobSpawnerRendering);
put("mixins.tweaks.performance.resourcemanager.json", () -> UTConfigTweaks.PERFORMANCE.utCheckAnimatedModelsToggle);
Expand Down
Loading

0 comments on commit 888cb95

Please sign in to comment.