Rendering Glitch Fix

Fixed jetpack rendering in Trinkets slot
This commit is contained in:
Konhaiii 2025-06-08 19:33:41 +02:00
parent 951e6854ac
commit a8f7faf11f
6 changed files with 8 additions and 8 deletions

View file

@ -10,7 +10,7 @@ loader_version=0.16.14
loom_version=1.10-SNAPSHOT
# Mod Properties
mod_version=1.0.4
mod_version=1.0.5
maven_group=konhaiii.powered_jetpacks
archives_base_name=powered_jetpacks

View file

@ -32,7 +32,7 @@ public class JetpackHUD implements HudRenderCallback {
backStack = (ItemStack) getBackStackMethod.invoke(null, client.player);
} catch (ClassNotFoundException | NoSuchMethodException | InvocationTargetException |
IllegalAccessException e) {
PoweredJetpacks.LOGGER.error("Could not load Trinkets compat class.");
PoweredJetpacks.LOGGER.error("JetpackHUD: Could not load Trinkets compat class.");
}
}

View file

@ -39,7 +39,7 @@ public abstract class ClientPlayerEntityMixin {
backStack = (ItemStack) getBackStackMethod.invoke(null, player);
} catch (ClassNotFoundException | NoSuchMethodException | InvocationTargetException |
IllegalAccessException e) {
PoweredJetpacks.LOGGER.error("Could not load Trinkets compat class.");
PoweredJetpacks.LOGGER.error("ClientPlayerEntityMixin: Could not load Trinkets compat class.");
}
}

View file

@ -38,12 +38,12 @@ public class JetpackRenderer<T extends LivingEntity, M extends EntityModel<T>> e
ItemStack backStack = ItemStack.EMPTY;
if (PoweredJetpacks.isTrinketsLoaded) {
try {
Class<?> optionalClass = Class.forName("konhaiii.powered_jetpacks.compat.TrinketsClient");
Method getBackStackMethod = optionalClass.getMethod("getBackStackLivingEntity", LivingEntity.class);
Class<?> optionalClass = Class.forName("konhaiii.powered_jetpacks.compat.TrinketsServer");
Method getBackStackMethod = optionalClass.getMethod("getBackStack", LivingEntity.class);
backStack = (ItemStack) getBackStackMethod.invoke(null, entity);
} catch (ClassNotFoundException | NoSuchMethodException | InvocationTargetException |
IllegalAccessException e) {
PoweredJetpacks.LOGGER.error("Could not load Trinkets compat class.");
PoweredJetpacks.LOGGER.error("JetpackRenderer: Could not load Trinkets compat class.");
}
}

View file

@ -41,7 +41,7 @@ public record JetpackPacket(boolean shouldPlaySound) {
backStack = (ItemStack) getBackStackMethod.invoke(null, player);
} catch (ClassNotFoundException | NoSuchMethodException | InvocationTargetException |
IllegalAccessException e) {
PoweredJetpacks.LOGGER.error("Could not load Trinkets compat class.");
PoweredJetpacks.LOGGER.error("JetpackPacket: Could not load Trinkets compat class.");
}
}

View file

@ -31,7 +31,7 @@
}
],
"depends": {
"fabricloader": ">=0.16.14",
"fabricloader": ">=0.16.10",
"minecraft": "~1.20.1",
"java": ">=17",
"fabric-api": "*"