Consumable Optimizer
ModHandles eating client-side, ensuring servers don't slow down the eating process
Description
Consumable Optimizer!
This mod enforces more client-sided processing when handling consumable items (any food item).
Information
By default, Minecraft requires the user to wait for a server response before consuming an item. While this delay is hardly noticeable on low ping, it becomes much more noticable on high ping and causes players to be stuck in an eating animation until the server eventually responds. This optimizer ensures all of that processing is done client-side rather than server-side, allowing items to be comsumed with no delay and on the exact tick it should be finished. The server still applies the item's effects (such as absorption or regeneration from a golden apple) while the client handles the actual eating process.
High ping can also occationaly causes desyncs when consuming an item, forcing the server to restart the eating process for the player. This further slows the overall process of consuming an item down even more and makes it feel inconsistent. This optimizer fixes this, by cancelling these recalls from the server when unneeded.
Demonstration Video
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/1eVq6nrUfqs" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>Server Opt Out
On servers using popular anti-cheats, such as Grim or Vulkan, it's unlikely for Consumable Optimizer to flag. However, if your server has reports of Consumable Optimizer causing flags or you don't want your player base using the mod, you can opt out using a very simple plugin. Some example code can be found below:
public class ConsumableOptimizerDisable extends JavaPlugin implements PluginMessageListener {
private static final String S2C_CHANNEL = "consumable_optimizer:disable_payload";
private static final String C2S_CHANNEL = "consumable_optimizer:handshake_payload";
@Override
public void onEnable() {
this.getServer().getMessenger().registerOutgoingPluginChannel(this, S2C_CHANNEL);
this.getServer().getMessenger().registerIncomingPluginChannel(this, C2S_CHANNEL, this);
}
@Override
public void onPluginMessageReceived(String channel, Player player, byte[] message) {
if (channel.equals(C2S_CHANNEL)) {
Bukkit.getScheduler().runTaskLater(this, () -> {
if (player.isOnline()) {
player.sendPluginMessage(this, S2C_CHANNEL, new byte[0]);
getLogger().info("Disabled consumable optimizer for " + player.getName());
}
}, 20L);
}
}
}
Credits
- Mod: Walksy
- Icon: SakuraFX
Compatibility
Mod Loaders
Game Versions
Recommended Gear
AffiliateHardware and extras that pair well with this mod.
As an Amazon Associate I earn from qualifying purchases.
Similar Mods
Fancy Toasts | Better Advancements
Overhauls the old advancement toast system, focusing on the presentation of advancements
Charmonium
Ambient sounds and additional music - vanilla-style!
MineTweaker3
Customize your minecraft experience!
Fadeless
Remove fade out animations in Minecraft (1.20+)
Bayou Blues
A swampy new Bayou biome!
Fish On The Line
🐟 Rings a bell held in the offhand when something's on the line while fishing.
Included in Modpacks (65)
Show fewer
PvP Optimized
PvP mods with optimization
Void's essentially optimized pack
TheoBalds PvP Map
PvP Beyond
Uton Optimizator
Fastest Client
Crystal Verse
Plutonium
Azure Visuals
Oxygen
Kuri's FreshVanilla
The Ultimate Experience
Qearioz's Optimized PvP & SMP
Mexus' Modpack
The Stuff of Legend
Better Vanilla Combat
PvP Perfect
VisionSteps
The Ultimate PVP Modpack
Refined Vanilla
AstralPVP
Maxed Optimized
Bare PVP
Dragon PVP UA
The Ultimate PVP pack
Vanilla Horizons
[FMCS-M] fps X media X crystal x survival Optimized MEDIUM
LFY Experience
Murkrid PvP Optimized
project Moa.
Corroxin's optimizations
uhpvp
[FMCS-L] fps X media X crystal x survival Optimized LITE
Fast and Better Vanilla
Eclipse Client
Slemprix's Essentials
Angels PvP Pack
Zynirium
Survival singleplayer/multiplayer
FlamePack Re-Vulkanized
[FMCS-H] fps X media X crystal x survival Optimized HIGH
VulkanizedPVP
SkullClient
NasheyPvP
Medieval Fantasy For A Reason
vxsp
Ali's PvP
aFrog's CPVP Modpack
Just a Random Vanilla Adventure
CatModOpti
FPS Flood; Pixelforge Collective
Peace Optimizer
Sharkingo!
BIG CLIENT
Console Refined
Shifting Voxels
Smolder's Ultimatum
Skull Boost
Hyn Client
Liye
Fairly Optimized
Aizen Private Modpack
More Than Optimized
CatModMobile