Jump to content

Recommended Posts

Posted

I was doing some blood magic stuff, when I jumped off my altar and I landed on the ground, hit a zombie, and got hit by the zombie simultaneously next thing I know I get the error 

"The game crashed whilst ticking player 

    java.lang.ArithmeticException: / by zero"

After some googling I determined something happened to me and the game tried to divide by zero on one of my stats or something. However, I can't quite figure out what or how to fix it, help is very much appreciated.

 

---- Minecraft Crash Report ----

WARNING: coremods are present:
  Inventory Tweaks Coremod (InventoryTweaks-1.63.jar)
  XaeroMinimapPlugin (Xaeros_Minimap_22.13.2_Forge_1.12.jar)
  Do not report to Forge! (If you haven't disabled the FoamFix coremod, try disabling it in the config! Note that this bit of text will still appear.) (foamfix-0.10.14-1.12.2.jar)
  OpenModsCorePlugin (OpenModsLib-1.12.2-0.12.2.jar)
  Quark Plugin (Quark-r1.6-179.jar)
  AppleCore (AppleCore-mc1.12.2-3.4.0.jar)
  CTMCorePlugin (CTM-MC1.12.2-1.0.2.31.jar)
  XaeroWorldMapPlugin (XaerosWorldMap_1.26.5_Forge_1.12.jar)
Contact their authors BEFORE contacting forge

// Hi. I'm Minecraft, and I'm a crashaholic.

Time: 8/29/22 8:53 PM
Description: Ticking player

java.lang.ArithmeticException: / by zero
    at arcaratus.bloodarsenal.compat.tconstruct.TraitLiving.onUpdate(TraitLiving.java:44)
    at slimeknights.tconstruct.library.tools.ToolCore.lambda$onUpdateTraits$1(ToolCore.java:526)
    at slimeknights.tconstruct.library.tools.ToolCore$$Lambda$2604/219308921.accept(Unknown Source)
    at java.util.ArrayList.forEach(ArrayList.java:1249)
    at slimeknights.tconstruct.library.tools.ToolCore.onUpdateTraits(ToolCore.java:526)
    at slimeknights.tconstruct.library.tools.ToolCore.func_77663_a(ToolCore.java:519)
    at net.minecraft.item.ItemStack.func_77945_a(ItemStack.java:526)
    at net.minecraft.entity.player.InventoryPlayer.func_70429_k(InventoryPlayer.java:363)
    at net.minecraft.entity.player.EntityPlayer.func_70636_d(EntityPlayer.java:511)
    at net.minecraft.entity.EntityLivingBase.func_70071_h_(EntityLivingBase.java:2179)
    at net.minecraft.entity.player.EntityPlayer.func_70071_h_(EntityPlayer.java:234)
    at net.minecraft.entity.player.EntityPlayerMP.func_71127_g(EntityPlayerMP.java:382)
    at net.minecraft.network.NetHandlerPlayServer.func_73660_a(NetHandlerPlayServer.java:173)
    at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher$1.func_73660_a(NetworkDispatcher.java:209)
    at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:285)
    at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:180)
    at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:790)
    at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:668)
    at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:185)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526)
    at java.lang.Thread.run(Thread.java:745)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Server thread
Stacktrace:
    at arcaratus.bloodarsenal.compat.tconstruct.TraitLiving.onUpdate(TraitLiving.java:44)
    at slimeknights.tconstruct.library.tools.ToolCore.lambda$onUpdateTraits$1(ToolCore.java:526)
    at slimeknights.tconstruct.library.tools.ToolCore$$Lambda$2604/219308921.accept(Unknown Source)
    at java.util.ArrayList.forEach(ArrayList.java:1249)
    at slimeknights.tconstruct.library.tools.ToolCore.onUpdateTraits(ToolCore.java:526)
    at slimeknights.tconstruct.library.tools.ToolCore.func_77663_a(ToolCore.java:519)
    at net.minecraft.item.ItemStack.func_77945_a(ItemStack.java:526)
    at net.minecraft.entity.player.InventoryPlayer.func_70429_k(InventoryPlayer.java:363)
    at net.minecraft.entity.player.EntityPlayer.func_70636_d(EntityPlayer.java:511)
    at net.minecraft.entity.EntityLivingBase.func_70071_h_(EntityLivingBase.java:2179)
    at net.minecraft.entity.player.EntityPlayer.func_70071_h_(EntityPlayer.java:234)

-- Player being ticked --
Details:
    Entity Type: null (net.minecraft.entity.player.EntityPlayerMP)
    Entity ID: 442
    Entity Name: Lightrecon_6
    Entity's Exact location: 60.52, 64.41, 189.14
    Entity's Block location: World: (60,64,189), Chunk: (at 12,4,13 in 3,11; contains blocks 48,0,176 to 63,255,191), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
    Entity's Momentum: 0.00, -0.91, 0.00
    Entity's Passengers: []
    Entity's Vehicle: ~~ERROR~~ NullPointerException: null
Stacktrace:
    at net.minecraft.entity.player.EntityPlayerMP.func_71127_g(EntityPlayerMP.java:382)
    at net.minecraft.network.NetHandlerPlayServer.func_73660_a(NetHandlerPlayServer.java:173)
    at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher$1.func_73660_a(NetworkDispatcher.java:209)
    at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:285)

-- Ticking connection --
Details:
    Connection: net.minecraft.network.NetworkManager@16543ec9
Stacktrace:
    at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:180)
    at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:790)
    at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:668)
    at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:185)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526)
    at java.lang.Thread.run(Thread.java:745)

-- System Details --
Details:
    Minecraft Version: 1.12.2
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 1.8.0_51, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 1638428320 bytes (1562 MB) / 4086824960 bytes (3897 MB) up to 7456948224 bytes (7111 MB)
    JVM Flags: 3 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx8000m -Xms256m
    IntCache: cache: 0, tcache: 0, allocated: 3, tallocated: 104
    FML: MCP 9.42 Powered by Forge 14.23.5.2859 71 mods loaded, 71 mods active
    States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored

    | State  | ID                         | Version                  | Source                                          | Signature                                |
    |:------ |:-------------------------- |:------------------------ |:----------------------------------------------- |:---------------------------------------- |
    | LCHIJA | minecraft                  | 1.12.2                   | minecraft.jar                                   | None                                     |
    | LCHIJA | mcp                        | 9.42                     | minecraft.jar                                   | None                                     |
    | LCHIJA | FML                        | 8.0.99.99                | forge-1.12.2-14.23.5.2859.jar                   | e3c3d50c7c986df74c645c0ac54639741c90a557 |
    | LCHIJA | forge                      | 14.23.5.2859             | forge-1.12.2-14.23.5.2859.jar                   | e3c3d50c7c986df74c645c0ac54639741c90a557 |
    | LCHIJA | xaerominimap_core          | 1.12.2-1.0               | minecraft.jar                                   | None                                     |
    | LCHIJA | xaeroworldmap_core         | 1.12.2-1.0               | minecraft.jar                                   | None                                     |
    | LCHIJA | openmodscore               | 0.12.2                   | minecraft.jar                                   | None                                     |
    | LCHIJA | foamfixcore                | 7.7.4                    | minecraft.jar                                   | None                                     |
    | LCHIJA | applecore                  | 3.4.0                    | AppleCore-mc1.12.2-3.4.0.jar                    | None                                     |
    | LCHIJA | jei                        | 4.16.1.301               | jei_1.12.2-4.16.1.301.jar                       | None                                     |
    | LCHIJA | appleskin                  | 1.0.14                   | AppleSkin-mc1.12-1.0.14.jar                     | None                                     |
    | LCHIJA | ctm                        | MC1.12.2-1.0.2.31        | CTM-MC1.12.2-1.0.2.31.jar                       | None                                     |
    | LCHIJA | appliedenergistics2        | rv6-stable-7             | appliedenergistics2-rv6-stable-7.jar            | dfa4d3ac143316c6f32aa1a1beda1e34d42132e5 |
    | LCHIJA | baubles                    | 1.5.2                    | Baubles-1.12-1.5.2.jar                          | None                                     |
    | LCHIJA | artifacts                  | 1.12.2-1.2.3             | Artifacts-1.12.2-1.2.3.jar                      | None                                     |
    | LCHIJA | atlaslib                   | 1.1.5a                   | Atlas-Lib-1.12.2-1.1.5a.jar                     | None                                     |
    | LCHIJA | quark                      | r1.6-179                 | Quark-r1.6-179.jar                              | None                                     |
    | LCHIJA | autoreglib                 | 1.3-32                   | AutoRegLib-1.3-32.jar                           | None                                     |
    | LCHIJA | mantle                     | 1.12-1.3.3.55            | Mantle-1.12-1.3.3.55.jar                        | None                                     |
    | LCHIJA | chisel                     | MC1.12.2-1.0.2.45        | Chisel-MC1.12.2-1.0.2.45.jar                    | None                                     |
    | LCHIJA | twilightforest             | 3.11.1021                | twilightforest-1.12.2-3.11.1021-universal.jar   | None                                     |
    | LCHIJA | tconstruct                 | 1.12.2-2.13.0.183        | TConstruct-1.12.2-2.13.0.183.jar                | None                                     |
    | LCHIJA | bhc                        | 2.0.3                    | baubley-heart-canisters-1.12.2-2.0.3.jar        | None                                     |
    | LCHIJA | bettercaves                | 1.12.2                   | bettercaves-1.12.2-2.0.4.jar                    | None                                     |
    | LCHIJA | bettermineshafts           | 1.12.2-2.2.1             | BetterMineshaftsForge-1.12.2-2.2.1.jar          | None                                     |
    | LCHIJA | biomesoplenty              | 7.0.1.2445               | BiomesOPlenty-1.12.2-7.0.1.2445-universal.jar   | None                                     |
    | LCHIJA | guideapi                   | 1.12-2.1.8-63            | Guide-API-1.12-2.1.8-63.jar                     | None                                     |
    | LCHIJA | bloodmagic                 | 1.12.2-2.4.3-105         | BloodMagic-1.12.2-2.4.3-105.jar                 | None                                     |
    | LCHIJA | bloodsmeltery              | 1.1.2                    | Blood-Smeltery-1.12.2-1.1.2.jar                 | None                                     |
    | LCHIJA | bloodarsenal               | 1.12.2-2.2.2-31          | BloodArsenal-1.12.2-2.2.2-31.jar                | None                                     |
    | LCHIJA | bloodtinker                | 1.0.5                    | bloodtinker-1.0.5.jar                           | None                                     |
    | LCHIJA | bonsaitrees                | 1.1.4                    | bonsaitrees-1.1.4-b170.jar                      | None                                     |
    | LCHIJA | carryon                    | 1.12.3                   | carryon-1.12.2-1.12.6.20.jar                    | fd21553434f4905f2f73ea7838147ac4ea07bd88 |
    | LCHIJA | chameleon                  | 1.12-4.1.3               | Chameleon-1.12-4.1.3.jar                        | None                                     |
    | LCHIJA | chisel_plus                | 1.0.0                    | Chisel Plus 1.0.6 (1.12.2).jar                  | None                                     |
    | LCHIJA | chiselsandbits             | 14.33                    | chiselsandbits-14.33.jar                        | None                                     |
    | LCHIJA | controlling                | 3.0.10                   | Controlling-3.0.10.jar                          | None                                     |
    | LCHIJA | cosmeticarmorreworked      | 1.12.2-v5a               | CosmeticArmorReworked-1.12.2-v5a.jar            | aaaf83332a11df02406e9f266b1b65c1306f0f76 |
    | LCHIJA | foamfix                    | 0.10.14-1.12.2           | foamfix-0.10.14-1.12.2.jar                      | None                                     |
    | LCHIJA | cfm                        | 6.3.0                    | furniture-6.3.2-1.12.2.jar                      | None                                     |
    | LCHIJA | gravestone                 | 1.10.3                   | gravestone-1.10.3.jar                           | None                                     |
    | LCHIJA | ichunutil                  | 7.2.2                    | iChunUtil-1.12.2-7.2.2.jar                      | 4db5c2bd1b556f252a5b8b54b256d381b2a0a6b8 |
    | LCHIJA | improvedbackpacks          | 1.12.2-1.5.0.0           | ImprovedBackpacks-1.12.2-1.5.0.0.jar            | None                                     |
    | LCHIJA | inventorytweaks            | 1.63+release.109.220f184 | InventoryTweaks-1.63.jar                        | 55d2cd4f5f0961410bf7b91ef6c6bf00a766dcbe |
    | LCHIJA | ironchest                  | 1.12.2-7.0.67.844        | ironchest-1.12.2-7.0.72.847.jar                 | None                                     |
    | LCHIJA | jee                        | 1.0.8                    | JustEnoughEnergistics-1.12.2-1.0.8.jar          | None                                     |
    | LCHIJA | jeresources                | 0.9.2.60                 | JustEnoughResources-1.12.2-0.9.2.60.jar         | None                                     |
    | LCHIJA | llor                       | 1.1.6-mc1.12.2           | LLOverlayReloaded-1.1.6-mc1.12.2.jar            | None                                     |
    | LCHIJA | morph                      | 7.2.0                    | Morph-1.12.2-7.2.1.jar                          | 4db5c2bd1b556f252a5b8b54b256d381b2a0a6b8 |
    | LCHIJA | mousetweaks                | 2.10                     | MouseTweaks-2.10-mc1.12.2.jar                   | None                                     |
    | LCHIJA | naturescompass             | 1.8.5                    | NaturesCompass-1.12.2-1.8.5.jar                 | None                                     |
    | LCHIJA | openmods                   | 0.12.2                   | OpenModsLib-1.12.2-0.12.2.jar                   | d2a9a8e8440196e26a268d1f3ddc01b2e9c572a5 |
    | LCHIJA | openblocks                 | 1.8.1                    | OpenBlocks-1.12.2-1.8.1.jar                     | d2a9a8e8440196e26a268d1f3ddc01b2e9c572a5 |
    | LCHIJA | oreexcavation              | 1.4.150                  | OreExcavation-1.4.150.jar                       | None                                     |
    | LCHIJA | bonecraft                  | 1.12.2b                  | Pam's BoneCraft 1.12.2b.jar                     | None                                     |
    | LCHIJA | harvestcraft               | 1.12.2zb                 | Pam's HarvestCraft 1.12.2zg.jar                 | None                                     |
    | LCHIJA | spookytree                 | 1.12.2a                  | Pam's Spooky Tree 1.12.2a.jar                   | None                                     |
    | LCHIJA | patchouli                  | 1.0-23.6                 | Patchouli-1.0-23.6.jar                          | None                                     |
    | LCHIJA | reborncore                 | 3.19.5                   | RebornCore-1.12.2-3.19.5-universal.jar          | None                                     |
    | LCHIJA | stg                        | 1.12.2-1.2.3             | stg-1.12.2-1.2.3.jar                            | None                                     |
    | LCHIJA | storagedrawers             | 5.2.2                    | StorageDrawers-1.12.2-5.4.2.jar                 | None                                     |
    | LCHIJA | techreborn                 | 2.27.3.1084              | TechReborn-1.12.2-2.27.3.1084-universal.jar     | 8727a3141c8ec7f173b87aa78b9b9807867c4e6b |
    | LCHIJA | theoneprobe                | 1.4.28                   | theoneprobe-1.12-1.4.28.jar                     | None                                     |
    | LCHIJA | tinkertoolleveling         | 1.12.2-1.1.0.DEV.b23e769 | TinkerToolLeveling-1.12.2-1.1.0.jar             | None                                     |
    | LCHIJA | waystones                  | 4.1.0                    | Waystones_1.12.2-4.1.0.jar                      | None                                     |
    | LCHIJA | weeeflowers                | 1.12.2b                  | Weee! Flowers 1.12.2b.jar                       | None                                     |
    | LCHIJA | xaerominimap               | 22.13.2                  | Xaeros_Minimap_22.13.2_Forge_1.12.jar           | None                                     |
    | LCHIJA | xaeroworldmap              | 1.26.5                   | XaerosWorldMap_1.26.5_Forge_1.12.jar            | None                                     |
    | LCHIJA | zenny3d.saturationoverflow | 1.1.1                    | zenny3d.saturationoverflow-1.1.1.jar            | None                                     |
    | LCHIJA | solcarrot                  | 1.8.4                    | solcarrot-1.12.2-1.8.4.jar                      | None                                     |
    | LCHIJA | techreborn_compat          | 1.0.0                    | TechReborn-ModCompatibility-1.12.2-1.4.0.76.jar | 8727a3141c8ec7f173b87aa78b9b9807867c4e6b |

    Loaded coremods (and transformers): 
Inventory Tweaks Coremod (InventoryTweaks-1.63.jar)
  invtweaks.forge.asm.ContainerTransformer
XaeroMinimapPlugin (Xaeros_Minimap_22.13.2_Forge_1.12.jar)
  xaero.common.core.transformer.ChunkTransformer
  xaero.common.core.transformer.NetHandlerPlayClientTransformer
  xaero.common.core.transformer.EntityPlayerTransformer
  xaero.common.core.transformer.AbstractClientPlayerTransformer
  xaero.common.core.transformer.WorldClientTransformer
  xaero.common.core.transformer.EntityPlayerSPTransformer
  xaero.common.core.transformer.PlayerListTransformer
  xaero.common.core.transformer.SaveFormatTransformer
  xaero.common.core.transformer.GuiIngameForgeTransformer
  xaero.common.core.transformer.GuiBossOverlayTransformer
  xaero.common.core.transformer.ModelRendererTransformer
Do not report to Forge! (If you haven't disabled the FoamFix coremod, try disabling it in the config! Note that this bit of text will still appear.) (foamfix-0.10.14-1.12.2.jar)
  pl.asie.foamfix.coremod.FoamFixTransformer
OpenModsCorePlugin (OpenModsLib-1.12.2-0.12.2.jar)
  openmods.core.OpenModsClassTransformer
Quark Plugin (Quark-r1.6-179.jar)
  vazkii.quark.base.asm.ClassTransformer
AppleCore (AppleCore-mc1.12.2-3.4.0.jar)
  squeek.applecore.asm.TransformerModuleHandler
CTMCorePlugin (CTM-MC1.12.2-1.0.2.31.jar)
  team.chisel.ctm.client.asm.CTMTransformer
XaeroWorldMapPlugin (XaerosWorldMap_1.26.5_Forge_1.12.jar)
  xaero.map.core.transformer.ChunkTransformer
  xaero.map.core.transformer.NetHandlerPlayClientTransformer
  xaero.map.core.transformer.EntityPlayerTransformer
  xaero.map.core.transformer.AbstractClientPlayerTransformer
  xaero.map.core.transformer.WorldClientTransformer
  xaero.map.core.transformer.PlayerListTransformer
  xaero.map.core.transformer.SaveFormatTransformer
  xaero.map.core.transformer.BiomeColorHelperTransformer
    GL info: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread.
    OpenModsLib class transformers: [llama_null_fix:FINISHED],[horse_base_null_fix:FINISHED],[pre_world_render_hook:FINISHED],[player_render_hook:FINISHED],[horse_null_fix:FINISHED]
    AE2 Version: stable rv6-stable-7 for Forge 14.23.5.2768
    Pulsar/tconstruct loaded Pulses: 
        - TinkerCommons (Enabled/Forced)
        - TinkerWorld (Enabled/Not Forced)
        - TinkerTools (Enabled/Not Forced)
        - TinkerHarvestTools (Enabled/Forced)
        - TinkerMeleeWeapons (Enabled/Forced)
        - TinkerRangedWeapons (Enabled/Forced)
        - TinkerModifiers (Enabled/Forced)
        - TinkerSmeltery (Enabled/Not Forced)
        - TinkerGadgets (Enabled/Not Forced)
        - TinkerOredict (Enabled/Forced)
        - TinkerIntegration (Enabled/Forced)
        - TinkerFluids (Enabled/Forced)
        - TinkerMaterials (Enabled/Forced)
        - TinkerModelRegister (Enabled/Forced)
        - chiselIntegration (Enabled/Not Forced)
        - chiselsandbitsIntegration (Enabled/Not Forced)
        - theoneprobeIntegration (Enabled/Not Forced)
        - quarkIntegration (Enabled/Not Forced)

    Patchouli open book context: n/a
    RebornCore: 
        Plugin Engine: 0
        RebornCore Version: 3.19.5
        Runtime Debofucsation 1
        Invalid fingerprint detected for RebornCore!
        RenderEngine: 0
    AE2 Integration: IC2:OFF, RC:OFF, MFR:OFF, Waila:OFF, InvTweaks:ON, JEI:ON, Mekanism:OFF, OpenComputers:OFF, THE_ONE_PROBE:ON, TESLA:OFF, CRAFTTWEAKER:OFF
    Profiler Position: N/A (disabled)
    Player Count: 2 / 8; [EntityPlayerMP['Lightrecon_6'/442, l='Better World', x=60.52, y=64.41, z=189.14], EntityPlayerMP['phenyx_pan'/778, l='Better World', x=13.28, y=68.00, z=165.71]]
    Type: Integrated Server (map_client.txt)
    Is Modded: Definitely; Client brand changed to 'fml,forge'

Posted

The version you are using is no longer supported on this forum.

Please update to a modern version of Minecraft to receive support.

Currently supported versions are 1.19.2 (Latest) and 1.18.2 (LTS).

Guest
This topic is now closed to further replies.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Hi! I'm trying to add my custom models/textures renderer like this: public class PonyPlayerWrapperRenderer extends EntityRenderer<Player> { // wrapper class under my LivingEntityRenderer class implementation private final PonyPlayerRenderer innerRenderer; private final PonyPlayerRenderer innerSlimRenderer; public PonyPlayerWrapperRenderer(final EntityRendererProvider.Context context) { super(context); System.out.println("creating new PonyPlayerWrapperRenderer"); this.innerRenderer = new PonyPlayerRenderer(context, false); this.innerSlimRenderer = new PonyPlayerRenderer(context, true); } @Override public void render(final Player entity, final float yaw, final float partialTicks, final PoseStack poseStack, final MultiBufferSource bufferSource, final int packedLight) { System.out.println("PonyPlayerWrapperRenderer render: " + entity.toString()); if (entity instanceof AbstractClientPlayer clientPlayer) { if (clientPlayer.getModelName().contains("slim")) { innerSlimRenderer.render(clientPlayer, yaw, partialTicks, poseStack, bufferSource, packedLight); } else { innerRenderer.render(clientPlayer, yaw, partialTicks, poseStack, bufferSource, packedLight); } } } @Override public ResourceLocation getTextureLocation(final Player player) { System.out.println("PonyPlayerWrapperRenderer getTextureLocation"); if (player instanceof AbstractClientPlayer clientPlayer) { return clientPlayer.getSkinTextureLocation(); } System.out.println("player instanceof AbstractClientPlayer is false"); return getDefaultSkin(player.getUUID()); } } public class PonyPlayerRenderer extends LivingEntityRenderer<AbstractClientPlayer, PlayerModel<AbstractClientPlayer>> { private final PlayerModel<AbstractClientPlayer> earthModel; private final PlayerModel<AbstractClientPlayer> pegasusModel; private final PlayerModel<AbstractClientPlayer> unicornModel; public PonyPlayerRenderer(final EntityRendererProvider.Context context, final boolean slim) { super( context, slim ? new PonyModelSlim(context.bakeLayer(PonyModelSlim.LAYER_LOCATION)) : new PonyModel(context.bakeLayer(PonyModel.LAYER_LOCATION)), 0.5f ); System.out.println("creating new PonyPlayerRenderer"); this.earthModel = slim ? new PonyModelSlim(context.bakeLayer(PonyModelSlim.LAYER_LOCATION)) : new PonyModel(context.bakeLayer(PonyModel.LAYER_LOCATION)); this.pegasusModel = new PegasusModel(context.bakeLayer(PegasusModel.LAYER_LOCATION)); this.unicornModel = new UnicornModel(context.bakeLayer(UnicornModel.LAYER_LOCATION)); } @Override public void render(final AbstractClientPlayer player, final float entityYaw, final float partialTicks, final PoseStack poseStack, final MultiBufferSource buffer, final int packedLight) { final PonyRace race = player.getCapability(PONY_DATA) .map(data -> ofNullable(data.getRace()).orElse(PonyRace.EARTH)) .orElse(PonyRace.EARTH); this.model = switch (race) { case PEGASUS -> pegasusModel; case UNICORN -> unicornModel; case EARTH -> earthModel; }; super.render(player, entityYaw, partialTicks, poseStack, buffer, packedLight); } @Override public ResourceLocation getTextureLocation(final AbstractClientPlayer player) { final PonyRace race = player.getCapability(PONY_DATA) .map(data -> ofNullable(data.getRace()).orElse(PonyRace.EARTH)) .orElse(PonyRace.EARTH); return switch (race) { case EARTH -> fromNamespaceAndPath(MODID, "textures/entity/earth_pony.png"); case PEGASUS -> fromNamespaceAndPath(MODID, "textures/entity/pegasus.png"); case UNICORN -> fromNamespaceAndPath(MODID, "textures/entity/unicorn.png"); }; } } @Mod.EventBusSubscriber(modid = MODID, bus = MOD, value = CLIENT) public class ClientRenderers { // mod bus render registration config @SubscribeEvent public static void onRegisterLayerDefinitions(final EntityRenderersEvent.RegisterLayerDefinitions event) { event.registerLayerDefinition(PonyModel.LAYER_LOCATION, PonyModel::createBodyLayer); event.registerLayerDefinition(PonyModelSlim.LAYER_LOCATION, PonyModelSlim::createBodyLayer); event.registerLayerDefinition(PegasusModel.LAYER_LOCATION, PegasusModel::createBodyLayer); event.registerLayerDefinition(UnicornModel.LAYER_LOCATION, UnicornModel::createBodyLayer); event.registerLayerDefinition(InnerPonyArmorModel.LAYER_LOCATION, InnerPonyArmorModel::createBodyLayer); event.registerLayerDefinition(OuterPonyArmorModel.LAYER_LOCATION, OuterPonyArmorModel::createBodyLayer); } @SubscribeEvent public static void onRegisterRenderers(final EntityRenderersEvent.RegisterRenderers event) { event.registerEntityRenderer(EntityType.PLAYER, PonyPlayerWrapperRenderer::new); System.out.println("onRegisterRenderers end"); } } Method onRegisterRenderers() is called and I can see it being logged. But when I enter the world, my PonyWrapperRenderer render() method doesn't ever seem to be called. I also tried to put my renderer to EntityRenderDispatcher's playerRenderers via reflection: @Mod.EventBusSubscriber(modid = MODID, bus = MOD, value = CLIENT) public class ClientRenderers { @SubscribeEvent public static void onRegisterLayerDefinitions(final EntityRenderersEvent.RegisterLayerDefinitions event) { event.registerLayerDefinition(PonyModel.LAYER_LOCATION, PonyModel::createBodyLayer); event.registerLayerDefinition(PonyModelSlim.LAYER_LOCATION, PonyModelSlim::createBodyLayer); event.registerLayerDefinition(PegasusModel.LAYER_LOCATION, PegasusModel::createBodyLayer); event.registerLayerDefinition(UnicornModel.LAYER_LOCATION, UnicornModel::createBodyLayer); event.registerLayerDefinition(InnerPonyArmorModel.LAYER_LOCATION, InnerPonyArmorModel::createBodyLayer); event.registerLayerDefinition(OuterPonyArmorModel.LAYER_LOCATION, OuterPonyArmorModel::createBodyLayer); } @SubscribeEvent public static void onClientSetup(final FMLClientSetupEvent event) { event.enqueueWork(() -> { try { final EntityRenderDispatcher dispatcher = Minecraft.getInstance().getEntityRenderDispatcher(); final Field renderersField = getEntityRenderDispatcherField("playerRenderers"); final Field itemInHandRenderer = getEntityRenderDispatcherField("itemInHandRenderer"); @SuppressWarnings("unchecked") final Map<String, EntityRenderer<? extends Player>> playerRenderers = (Map<String, EntityRenderer<? extends Player>>)renderersField.get(dispatcher); final PonyPlayerWrapperRenderer renderer = new PonyPlayerWrapperRenderer( new EntityRendererProvider.Context( dispatcher, Minecraft.getInstance().getItemRenderer(), Minecraft.getInstance().getBlockRenderer(), (ItemInHandRenderer)itemInHandRenderer.get(dispatcher), Minecraft.getInstance().getResourceManager(), Minecraft.getInstance().getEntityModels(), Minecraft.getInstance().font ) ); playerRenderers.put("default", renderer); playerRenderers.put("slim", renderer); System.out.println("Player renderers replaced"); } catch (final Exception e) { throw new RuntimeException("Failed to replace player renderers", e); } }); } private static Field getEntityRenderDispatcherField(final String fieldName) throws NoSuchFieldException { final Field field = EntityRenderDispatcher.class.getDeclaredField(fieldName); field.setAccessible(true); return field; } } But I receive the error before Minecraft Client appears (RuntimeException: Failed to replace player renderers - from ClientRenderers onClientSetup() method - and its cause below): java.lang.IllegalArgumentException: No model for layer anotherlittlepony:earth_pony#main at net.minecraft.client.model.geom.EntityModelSet.bakeLayer(EntityModelSet.java:18) ~[forge-1.20.1-47.4.0_mapped_official_1.20.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.renderer.entity.EntityRendererProvider$Context.bakeLayer(EntityRendererProvider.java:69) ~[forge-1.20.1-47.4.0_mapped_official_1.20.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at com.thuggeelya.anotherlittlepony.client.renderer.pony.PonyPlayerRenderer.<init>(PonyPlayerRenderer.java:32) ~[main/:?] {re:classloading} at com.thuggeelya.anotherlittlepony.client.renderer.pony.PonyPlayerWrapperRenderer.<init>(PonyPlayerWrapperRenderer.java:24) ~[main/:?] {re:classloading} at com.thuggeelya.anotherlittlepony.client.renderer.ClientRenderers.lambda$onClientSetup$0(ClientRenderers.java:79) ~[main/:?] {re:classloading} ... 33 more Problem appears when EntityRendererProvider context tries to bakeLayer with my model layer location: new PonyModel(context.bakeLayer(PonyModel.LAYER_LOCATION)); // PonyPlayerRenderer.java:32 public class PonyModel extends PlayerModel<AbstractClientPlayer> { // the model class itself public static final ModelLayerLocation LAYER_LOCATION = new ModelLayerLocation( ResourceLocation.fromNamespaceAndPath(MODID, "earth_pony"), "main" ); public PonyModel(final ModelPart root) { super(root, false); } public static LayerDefinition createBodyLayer() { // some CubeListBuilder stuff for model appearance } } Textures PNGs are placed at: resources/assets/[my mod id]/textures/entity. My forge version is 1.20.1. Would appreciate any help.
    • Well, a bit more information about what you're trying to do would be helpful. e.g. why you're trying to use "INVOKE_ASSIGN" instead of "INVOKE". "INVOKE_ASSIGN" calls your code after the "target" is called and its value is stored, if applicable. "INVOKE" calls your code before the target is called. "target" expects a fully qualified name, as per the SpongePowered docs, if that name is going to be remapped (which it will be if your injecting into Minecraft itself and not another mod). For more information on fully qualified names versus canonical names, see the Java specifications. Here's an example of a working "@At" from my own code that targets the "getClosestsVulnerablePlayerToEntity" call inside a mob's logic: @At(value = "INVOKE_ASSIGN", target = "net.minecraft.world.World.getClosestVulnerablePlayerToEntity(Lnet/minecraft/entity/Entity;D)Lnet/minecraft/entity/player/EntityPlayer;") Hope this helps!
    • Ran it one more time just to check, and there's no errors this time on the log??? Log : https://mclo.gs/LnuaAiu I tried allocating more memory to the modpack, around 8000MB and it's still the same; stopping at "LOAD_REGISTRIES". Are some of the mods clashing, maybe? I have no clue what to do LOL
    • Tried removing some biome generation mods and test ran it again, but it's still the same; still not responding as soon as it gets to "LOAD_REGISTRIES". This time with more errors though. Log : https://mclo.gs/uygZzD8 Is there too little memory allocated to the modpack maybe? Can someone help please.    (T.T)💔
    • This is sad. Over 3300 people have checked the thread and no one is able to help or give any ideas :(.
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.