Jump to content

[SOLVED] [1.17.1] Issues with Skull Rendering (again...)


uSkizzik

Recommended Posts

Basically, I'm trying to make custom skulls and I need to add them to the skull renderer.
Until now I just used reflect to add them to the SKIN_BY_TYPE and MODEL_BY_TYPE maps but now the MODEL_BY_TYPE is using a method instead of being defined directly (like SKIN_BY_TYPE).
Any ideas?

Here's my current code for the rendering:
 

    @SubscribeEvent
    public static void registerCustomSkullRenderers(FMLClientSetupEvent event) {
        Field ModelField;
        Field SkinField;
        try {
            ModelField = SkullBlockRenderer.class.getDeclaredField("modelByType");
            ModelField.setAccessible(true);
            Map<SkullBlock.Type, SkullModelBase> Model = (Map<SkullBlock.Type, SkullModelBase>) ModelField.get(SkullBlockRenderer.class);
            Model.put(CustomSkullTypes.SKIZZIK, new SkullModel(Minecraft.getInstance().getEntityModels().bakeLayer(ModelLayers.SKELETON_SKULL)));
            Model.put(CustomSkullTypes.SKIZZIK_WITH_GEMS, new SkullModel(Minecraft.getInstance().getEntityModels().bakeLayer(ModelLayers.WITHER_SKELETON_SKULL)));

            SkinField = SkullBlockRenderer.class.getDeclaredField("SKIN_BY_TYPE");
            SkinField.setAccessible(true);
            Map<SkullBlock.Type, ResourceLocation> Skin = (Map<SkullBlock.Type, ResourceLocation>) SkinField.get(SkullBlockRenderer.class);
            Skin.put(CustomSkullTypes.SKIZZIK, new ResourceLocation("skizzik:textures/block/skizzik_head.png"));
            Skin.put(CustomSkullTypes.SKIZZIK_WITH_GEMS, new ResourceLocation("skizzik:textures/entity/skizzik/skizzik.png"));
        }
        catch (NoSuchFieldException | IllegalAccessException e) {
            e.printStackTrace();
        }
    }

 

Edited by uSkizzik
Link to comment
Share on other sites

1 hour ago, diesieben07 said:
  • You will need to use SRG names, otherwise your code will fail outside the development environment.
  • That is not how you deal with exceptions, ever.
  • Passing a Class to Field#get means you are trying to get an instance field from the Class class, this makes zero sense. Pass null for static fields and the instance of the target class for non-static fields.
  • Since modelByType is no longer a static field, you can simply set it to a map that contains your skull block types and models after you've created your SkullBlockRenderer.

What do you mean by "after you've created your SkullBlockRenderer"?
Do I need a custom renderer class? If so, doesn't that mean that equipping the custom skull will crash the game since that will call the vanilla renderer?

Link to comment
Share on other sites

5 minutes ago, diesieben07 said:

I realize now that you are talking about the item form.

For this you just need to register your own BlockEntityWithoutLevelRenderer to your BlockItem by overriding initializeClient and providing your custom IItemRenderProperties.

I'm actually talking about both the block and the item

Edited by uSkizzik
Link to comment
Share on other sites

37 minutes ago, diesieben07 said:

Well for the item do what I described.

For the block, you need a custom block (and therefore BlockEntityType and therefore BlockEntityRenderer) anyways. So then you can modify the field on that new BlockEntityRenderer after creating it.

So, I'm having the following issue and I have no idea what is causing it. It seems like the texture is null but I don't know. 
At this point I barely know what I'm doing...
 

Spoiler

java.lang.NullPointerException: Rendering Block Entity
    at java.util.Objects.requireNonNull(Objects.java:208) ~[?:?] {}
    at java.util.Optional.of(Optional.java:113) ~[?:?] {}
    at net.minecraft.client.renderer.RenderStateShard$TextureStateShard.<init>(RenderStateShard.java:503) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.RenderType.lambda$static$4(RenderType.java:51) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.Util$9.lambda$apply$0(Util.java:614) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading}
    at java.util.HashMap.computeIfAbsent(HashMap.java:1224) ~[?:?] {}
    at net.minecraft.Util$9.apply(Util.java:613) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading}
    at net.minecraft.client.renderer.RenderType.entityCutoutNoCullZOffset(RenderType.java:191) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.RenderType.entityCutoutNoCullZOffset(RenderType.java:195) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.blockentity.SkullBlockRenderer.getRenderType(SkullBlockRenderer.java:97) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.blockentity.SkullBlockRenderer.render(SkullBlockRenderer.java:70) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.blockentity.SkullBlockRenderer.render(SkullBlockRenderer.java:35) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.blockentity.BlockEntityRenderDispatcher.setupAndRender(BlockEntityRenderDispatcher.java:79) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.blockentity.BlockEntityRenderDispatcher.lambda$render$0(BlockEntityRenderDispatcher.java:63) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.blockentity.BlockEntityRenderDispatcher.tryRender(BlockEntityRenderDispatcher.java:96) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.blockentity.BlockEntityRenderDispatcher.render(BlockEntityRenderDispatcher.java:62) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.LevelRenderer.renderLevel(LevelRenderer.java:1110) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.GameRenderer.renderLevel(GameRenderer.java:1050) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.GameRenderer.render(GameRenderer.java:830) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.runTick(Minecraft.java:1039) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.run(Minecraft.java:659) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.main.Main.main(Main.java:186) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:runtimedistcleaner:A}
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) ~[?:?] {}
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}
    at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?] {}
    at net.minecraftforge.fml.loading.targets.ForgeClientUserdevLaunchHandler.lambda$launchService$0(ForgeClientUserdevLaunchHandler.java:38) ~[fmlloader-1.17.1-37.0.15.jar%233!:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-9.0.7.jar%238!:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-9.0.7.jar%238!:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-9.0.7.jar%238!:?] {}
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-9.0.7.jar%238!:?] {}
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.0.7.jar%238!:?] {}
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.0.7.jar%238!:?] {}
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.0.7.jar%238!:?] {}
    at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:89) [bootstraplauncher-0.1.16.jar:?] {}

 

Link to comment
Share on other sites

1 minute ago, diesieben07 said:

Show your code.

Registering the renderer:

    @SubscribeEvent
    @OnlyIn(Dist.CLIENT)
    public static void registerTileEntityRenders(FMLClientSetupEvent event) {
        BlockEntityRenderers.register(PA_SIGN.get(), SignRenderer::new);
        BlockEntityRenderers.register(PA_SKULL.get(), SkizzikHeadRenderer::new);
    }

Renderer:
 

public class SkizzikHeadRenderer extends SkullBlockRenderer implements BlockEntityRenderer<SkullBlockEntity> {
    public static Map<SkullBlock.Type, SkullModelBase> createSkullRenderers(EntityModelSet set) {
        ImmutableMap.Builder<SkullBlock.Type, SkullModelBase> builder = ImmutableMap.builder();
        builder.put(PA_TileEntities.CustomSkullTypes.SKIZZIK, new SkullModel(set.bakeLayer(ModelLayers.SKELETON_SKULL)));
        builder.put(PA_TileEntities.CustomSkullTypes.SKIZZIK_WITH_GEMS, new SkullModel(set.bakeLayer(ModelLayers.WITHER_SKELETON_SKULL)));
        return builder.build();
    }

    public SkizzikHeadRenderer(BlockEntityRendererProvider.Context context) {
        super(context);

        Field ModelField;
        Field SkinField;

        try {
            ModelField = super.getClass().getDeclaredField("modelByType");
            ModelField.setAccessible(true);
            Map<SkullBlock.Type, SkullModelBase> Model = createSkullRenderers(context.getModelSet());
            ModelField.set(super.getClass(), Model);

            SkinField = super.getClass().getDeclaredField("SKIN_BY_TYPE");
            SkinField.setAccessible(true);
            Map<SkullBlock.Type, ResourceLocation> Skin = (Map<SkullBlock.Type, ResourceLocation>) SkinField.get(SkullBlockRenderer.class);
            Skin.put(PA_TileEntities.CustomSkullTypes.SKIZZIK, new ResourceLocation("skizzik:textures/block/skizzik_head.png"));
        } catch (NoSuchFieldException | IllegalAccessException e) {
            e.printStackTrace();
        }
    }
}

As I said, I have no idea what I'm doing at this point. I also kept the try and catch since I had no other idea of how to handle the errors.

Link to comment
Share on other sites

25 minutes ago, diesieben07 said:
  • Do not use @OnlyIn.
  • Use a Foo.class literal when using getDeclaredField, do not use getClass. Also super.getClass() isn't even valid syntax.
  • You are still passing a Class to Fied#get.
  • Do not modify SKIN_BY_TYPE from your constructor. This is a static field, so doing this from the constructor will potentially run it multiple times, which is not what you want.
  • I am not quite sure why a null is showing up there. make sure that you are actually modifying SKIN_BY_TYPE properly.

Ok, so, new error:
 

Spoiler

Caused by: java.lang.IllegalArgumentException: Can not set final java.util.Map field net.minecraft.client.renderer.blockentity.SkullBlockRenderer.modelByType to com.google.common.collect.RegularImmutableMap
    at jdk.internal.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:167) ~[?:?] {}
    at jdk.internal.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:171) ~[?:?] {}
    at jdk.internal.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:58) ~[?:?] {}
    at jdk.internal.reflect.UnsafeQualifiedObjectFieldAccessorImpl.set(UnsafeQualifiedObjectFieldAccessorImpl.java:77) ~[?:?] {}
    at java.lang.reflect.Field.set(Field.java:793) ~[?:?] {}
    at com.skizzium.projectapple.tileentity.renderer.SkizzikHeadRenderer.<init>(SkizzikHeadRenderer.java:42) ~[%2378!:?] {re:classloading}
    at net.minecraft.client.renderer.blockentity.BlockEntityRenderers.lambda$createEntityRenderers$0(BlockEntityRenderers.java:25) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    ... 97 more

 

Here's what I modified after reading your reply:

 

        try {
            ModelField = SkullBlockRenderer.class.getDeclaredField("modelByType");
            ModelField.setAccessible(true);
            Map<SkullBlock.Type, SkullModelBase> Model = createSkullRenderers(context.getModelSet());
            ModelField.set(Model, SkullBlockRenderer.class);

            SkinField = SkullBlockRenderer.class.getDeclaredField("SKIN_BY_TYPE");
            SkinField.setAccessible(true);
            Map<SkullBlock.Type, ResourceLocation> Skin = (Map<SkullBlock.Type, ResourceLocation>) SkinField.get(null);
            Skin.put(PA_TileEntities.CustomSkullTypes.SKIZZIK, new ResourceLocation("skizzik:textures/block/skizzik_head.png"));
        } catch (NoSuchFieldException | IllegalAccessException e) {
            e.printStackTrace();
        }

 

Link to comment
Share on other sites

31 minutes ago, diesieben07 said:

This does not make any sense. Read the documentation on set for which parameters need to be passed in.

Dear god... New errors!
Also the null variable is a SkullModelBase.

Spoiler

java.lang.NullPointerException: Cannot invoke "net.minecraft.client.model.SkullModelBase.setupAnim(float, float, float)" because "p_173670_" is null
    at net.minecraft.client.renderer.blockentity.SkullBlockRenderer.renderSkull(SkullBlockRenderer.java:85) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.blockentity.SkullBlockRenderer.render(SkullBlockRenderer.java:71) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.blockentity.SkullBlockRenderer.render(SkullBlockRenderer.java:35) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.blockentity.BlockEntityRenderDispatcher.setupAndRender(BlockEntityRenderDispatcher.java:79) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.blockentity.BlockEntityRenderDispatcher.lambda$render$0(BlockEntityRenderDispatcher.java:63) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.blockentity.BlockEntityRenderDispatcher.tryRender(BlockEntityRenderDispatcher.java:96) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.blockentity.BlockEntityRenderDispatcher.render(BlockEntityRenderDispatcher.java:62) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.LevelRenderer.renderLevel(LevelRenderer.java:1110) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.GameRenderer.renderLevel(GameRenderer.java:1050) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.GameRenderer.render(GameRenderer.java:830) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.runTick(Minecraft.java:1039) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.run(Minecraft.java:659) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.main.Main.main(Main.java:186) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:runtimedistcleaner:A}
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) ~[?:?] {}
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}
    at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?] {}
    at net.minecraftforge.fml.loading.targets.ForgeClientUserdevLaunchHandler.lambda$launchService$0(ForgeClientUserdevLaunchHandler.java:38) ~[fmlloader-1.17.1-37.0.15.jar%233!:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-9.0.7.jar%238!:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-9.0.7.jar%238!:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-9.0.7.jar%238!:?] {}
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-9.0.7.jar%238!:?] {}
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.0.7.jar%238!:?] {}
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.0.7.jar%238!:?] {}
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.0.7.jar%238!:?] {}
    at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:89) [bootstraplauncher-0.1.16.jar:?] {}

Either something's wrong or I shouldn't be calling SkullBlockRenderer renderer = new SkullBlockRenderer(context);
I couldn't find another way that didn't give me the error I had before.
Full code:

            SkullBlockRenderer renderer = new SkullBlockRenderer(context);

            ModelField = SkullBlockRenderer.class.getDeclaredField("modelByType");
            ModelField.setAccessible(true);
            Map<SkullBlock.Type, SkullModelBase> Model = createSkullRenderers(context.getModelSet());
            ModelField.set(renderer, Model);

            SkinField = SkullBlockRenderer.class.getDeclaredField("SKIN_BY_TYPE");
            SkinField.setAccessible(true);
            Map<SkullBlock.Type, ResourceLocation> Skin = (Map<SkullBlock.Type, ResourceLocation>) SkinField.get(null);
            Skin.put(PA_TileEntities.CustomSkullTypes.SKIZZIK, new ResourceLocation("skizzik:textures/block/skizzik_head.png"));

 

Link to comment
Share on other sites

So, this?
 

    @SubscribeEvent
    public static void registerTileEntityRenders(FMLClientSetupEvent event) {
        BlockEntityRenderers.register(PA_SIGN.get(), SignRenderer::new);
        BlockEntityRenderers.register(PA_SKULL.get(), SkizzikHeadRenderer::new);
    }

 

Link to comment
Share on other sites

3 hours ago, diesieben07 said:

I realize now that you are talking about the item form.

For this you just need to register your own BlockEntityWithoutLevelRenderer to your BlockItem by overriding initializeClient and providing your custom IItemRenderProperties.

So can you tell me exactly what I have to do?
This is the error I'm getting when opening the creative tab containing the head:
 

Spoiler

java.lang.NullPointerException: Cannot invoke "net.minecraft.client.model.SkullModelBase.setupAnim(float, float, float)" because "p_173670_" is null
    at net.minecraft.client.renderer.blockentity.SkullBlockRenderer.renderSkull(SkullBlockRenderer.java:85) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.BlockEntityWithoutLevelRenderer.renderByItem(BlockEntityWithoutLevelRenderer.java:111) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.entity.ItemRenderer.render(ItemRenderer.java:159) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.entity.ItemRenderer.renderGuiItem(ItemRenderer.java:258) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.entity.ItemRenderer.tryRenderGuiItem(ItemRenderer.java:299) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.entity.ItemRenderer.tryRenderGuiItem(ItemRenderer.java:290) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.entity.ItemRenderer.renderAndDecorateItem(ItemRenderer.java:286) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.gui.screens.inventory.AbstractContainerScreen.renderSlot(AbstractContainerScreen.java:249) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.gui.screens.inventory.AbstractContainerScreen.render(AbstractContainerScreen.java:109) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.gui.screens.inventory.EffectRenderingInventoryScreen.render(EffectRenderingInventoryScreen.java:47) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.gui.screens.inventory.CreativeModeInventoryScreen.render(CreativeModeInventoryScreen.java:616) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraftforge.client.ForgeHooksClient.drawScreen(ForgeHooksClient.java:307) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2373%2379!:?] {re:classloading}
    at net.minecraft.client.renderer.GameRenderer.render(GameRenderer.java:885) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.runTick(Minecraft.java:1039) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.run(Minecraft.java:659) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.main.Main.main(Main.java:186) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:runtimedistcleaner:A}
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) ~[?:?] {}
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}
    at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?] {}
    at net.minecraftforge.fml.loading.targets.ForgeClientUserdevLaunchHandler.lambda$launchService$0(ForgeClientUserdevLaunchHandler.java:38) ~[fmlloader-1.17.1-37.0.15.jar%233!:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-9.0.7.jar%238!:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-9.0.7.jar%238!:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-9.0.7.jar%238!:?] {}
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-9.0.7.jar%238!:?] {}
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.0.7.jar%238!:?] {}
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.0.7.jar%238!:?] {}
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.0.7.jar%238!:?] {}
    at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:89) [bootstraplauncher-0.1.16.jar:?] {}

It's the same as the one that I got when making the block. What I did there was to change the renderer that I'm using to set the model field to the custom one, so I guess that I have to make a custom renderer for the item too?

Link to comment
Share on other sites

3 hours ago, diesieben07 said:

Yes, you need a custom BlockEntityWithoutLevelRenderer implementation. To do this override initializeClient in your Item class.

Alright, so the item works now but the equipping feature crashes the game.
It seems that when equipping a skull, the game calls "CustomHeadLayer" which calls SkullBlockRenderer (and I need it to call my custom renderer).
How do I fix that?
 

Edited by uSkizzik
Link to comment
Share on other sites

3 minutes ago, diesieben07 said:

You'll have to loop through all entity renderers at startup. Check if it is a LivingEntityRenderer. If so, get its render layers (LivingEntityRenderer#layers using reflection) and loop through them as well. Check if any of them is a CustomHeadLayer. If so, get its CustomHeadLayer#skullModels field and put your model in there as well.

How do I get all entity renderers though?
Also, is FMLClientSetupEvent the correct event or do I need another one?

Link to comment
Share on other sites

So, I'm still getting the same crash which means that for some reason this thing is still not using my models.
Here's my code:

    @SubscribeEvent(priority = EventPriority.LOWEST)
    public void registerSkullPlayerHeadLayers(EntityRenderersEvent.AddLayers event) {
        Map<EntityType<?>, EntityRenderer<?>> renderers = Minecraft.getInstance().getEntityRenderDispatcher().renderers;
        for(Map.Entry<EntityType<?>, EntityRenderer<?>> renderer : renderers.entrySet()) {
            if (renderer.getValue() instanceof LivingEntityRenderer) {
                List<? extends RenderLayer<?, ?>> layers = ((LivingEntityRenderer<?, ?>) renderer.getValue()).layers;
                for (RenderLayer<?, ?> layer : layers) {
                    if (layer instanceof CustomHeadLayer) {
                        ((CustomHeadLayer) layer).skullModels.put(PA_TileEntities.CustomSkullTypes.SKIZZIK, new PA_SkullModel(Minecraft.getInstance().getEntityModels().bakeLayer(PA_ModelLayers.SKIZZIK_HEAD_LAYER)));
                        ((CustomHeadLayer) layer).skullModels.put(PA_TileEntities.CustomSkullTypes.SKIZZIK_WITH_GEMS, new PA_SkullModel(Minecraft.getInstance().getEntityModels().bakeLayer(PA_ModelLayers.SKIZZIK_HEAD_WITH_GEMS_LAYER)));
                    }
                }
            }
        }
    }

 

Link to comment
Share on other sites

5 minutes ago, diesieben07 said:

Is the event called? Did you register it properly to the correct event bus?

You also forgot EntityRenderDispatcher#getSkinMap, which is where the player renderers are stored.

1. I forgot to add the bus subscriber (@Mod.EventBusSubscriber(modid = ProjectApple.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD))
2. What am I supposed to do with the skin map exactly?

Link to comment
Share on other sites

3 minutes ago, diesieben07 said:

It gives you the player renderers, which you need to treat the same way you do with the other renderers.

This is the crash that happens when the game tries to render a zombie with my custom skull on it:

Spoiler

java.lang.NullPointerException: Cannot invoke "net.minecraft.client.model.SkullModelBase.setupAnim(float, float, float)" because "p_173670_" is null
    at net.minecraft.client.renderer.blockentity.SkullBlockRenderer.renderSkull(SkullBlockRenderer.java:85) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.entity.layers.CustomHeadLayer.render(CustomHeadLayer.java:87) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.entity.layers.CustomHeadLayer.render(CustomHeadLayer.java:33) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.entity.LivingEntityRenderer.render(LivingEntityRenderer.java:126) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.entity.MobRenderer.render(MobRenderer.java:42) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.entity.MobRenderer.render(MobRenderer.java:20) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.entity.EntityRenderDispatcher.render(EntityRenderDispatcher.java:129) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.LevelRenderer.renderEntity(LevelRenderer.java:1280) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.LevelRenderer.renderLevel(LevelRenderer.java:1076) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.GameRenderer.renderLevel(GameRenderer.java:1050) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.GameRenderer.render(GameRenderer.java:830) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.runTick(Minecraft.java:1039) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.run(Minecraft.java:659) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.main.Main.main(Main.java:186) ~[forge-1.17.1-37.0.15_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:runtimedistcleaner:A}
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) ~[?:?] {}
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}
    at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?] {}
    at net.minecraftforge.fml.loading.targets.ForgeClientUserdevLaunchHandler.lambda$launchService$0(ForgeClientUserdevLaunchHandler.java:38) ~[fmlloader-1.17.1-37.0.15.jar%233!:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-9.0.7.jar%238!:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-9.0.7.jar%238!:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-9.0.7.jar%238!:?] {}
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-9.0.7.jar%238!:?] {}
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.0.7.jar%238!:?] {}
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.0.7.jar%238!:?] {}
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.0.7.jar%238!:?] {}
    at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:89) [bootstraplauncher-0.1.16.jar:?] {}

Why doesn't it register my custom models?
This is the thing I placed before the start of the class:

@Mod.EventBusSubscriber(modid = ProjectApple.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD)

And this is the method I use to register the models:

@SubscribeEvent(priority = EventPriority.LOWEST)
    public void registerSkullPlayerHeadLayers(EntityRenderersEvent.AddLayers event) {
        Map<EntityType<?>, EntityRenderer<?>> renderers = Minecraft.getInstance().getEntityRenderDispatcher().renderers;
        for(Map.Entry<EntityType<?>, EntityRenderer<?>> renderer : renderers.entrySet()) {
            if (renderer.getValue() instanceof LivingEntityRenderer) {
                List<? extends RenderLayer<?, ?>> layers = ((LivingEntityRenderer<?, ?>) renderer.getValue()).layers;
                for (RenderLayer<?, ?> layer : layers) {
                    if (layer instanceof CustomHeadLayer) {
                        ((CustomHeadLayer) layer).skullModels.put(PA_TileEntities.CustomSkullTypes.SKIZZIK, new PA_SkullModel(Minecraft.getInstance().getEntityModels().bakeLayer(PA_ModelLayers.SKIZZIK_HEAD_LAYER)));
                        ((CustomHeadLayer) layer).skullModels.put(PA_TileEntities.CustomSkullTypes.SKIZZIK_WITH_GEMS, new PA_SkullModel(Minecraft.getInstance().getEntityModels().bakeLayer(PA_ModelLayers.SKIZZIK_HEAD_WITH_GEMS_LAYER)));
                    }
                }
            }
        }

        Map<String, EntityRenderer<? extends Player>> skins = Minecraft.getInstance().getEntityRenderDispatcher().getSkinMap();
        for(Map.Entry<String, EntityRenderer<? extends Player>> renderer : skins.entrySet()) {
            if (renderer.getValue() instanceof LivingEntityRenderer) {
                List<? extends RenderLayer<?, ?>> layers = ((LivingEntityRenderer<?, ?>) renderer.getValue()).layers;
                for (RenderLayer<?, ?> layer : layers) {
                    if (layer instanceof CustomHeadLayer) {
                        ((CustomHeadLayer) layer).skullModels.put(PA_TileEntities.CustomSkullTypes.SKIZZIK, new PA_SkullModel(Minecraft.getInstance().getEntityModels().bakeLayer(PA_ModelLayers.SKIZZIK_HEAD_LAYER)));
                        ((CustomHeadLayer) layer).skullModels.put(PA_TileEntities.CustomSkullTypes.SKIZZIK_WITH_GEMS, new PA_SkullModel(Minecraft.getInstance().getEntityModels().bakeLayer(PA_ModelLayers.SKIZZIK_HEAD_WITH_GEMS_LAYER)));
                    }
                }
            }
        }
    }

I used ATs instead of reflection which worked for the block renderer.

Link to comment
Share on other sites

58 minutes ago, uSkizzik said:

EDIT: I solved it by calling the method via the project class. Now I have a new error: https://gist.github.com/uSkizzik/e5079c0a6196a6a213f6255343efa7e8

'java.lang.UnsupportedOperationException' because 'com.google.common.collect.ImmutableMap.put'
you can't put things in a ImmutableMap, you will need to get all objects from the Map and then create a new Map

Edit: you can't use a for-each loop on a ImmutableMap (Minecraft.getInstance().getEntityRenderDispatcher().getSkinMap() will return a ImmutableMap)
you need to create to create a new HashMap and do then the for-each loop (you can use Maps.newHashMap and put Minecraft.getInstance().getEntityRenderDispatcher().getSkinMap() as parameter)

Edited by Luis_ST
Link to comment
Share on other sites

3 hours ago, Luis_ST said:

'java.lang.UnsupportedOperationException' because 'com.google.common.collect.ImmutableMap.put'
you can't put things in a ImmutableMap, you will need to get all objects from the Map and then create a new Map

Edit: you can't use a for-each loop on a ImmutableMap (Minecraft.getInstance().getEntityRenderDispatcher().getSkinMap() will return a ImmutableMap)
you need to create to create a new HashMap and do then the for-each loop (you can use Maps.newHashMap and put Minecraft.getInstance().getEntityRenderDispatcher().getSkinMap() as parameter)

I actually just made a new method to make the new immutable map with my custom models (via ImmutableMap.builder(), like in vanilla) and it worked.

Link to comment
Share on other sites

  • uSkizzik changed the title to [SOLVED] [1.17.1] Issues with Skull Rendering (again...)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • unable to load curseforge due to "game crashed whilst rendering overlays", heres the crash report: https://pastebin.com/s1DN9hG8
    • ---- Minecraft Crash Report ---- // Why did you do that? Time: 2024-05-29 14:48:23 Description: Mod loading error has occurred java.lang.Exception: Mod Loading has failed     at net.minecraftforge.logging.CrashReportExtender.dumpModLoadingCrashReport(CrashReportExtender.java:60) ~[forge-1.20.1-47.2.32-universal.jar%23271!/:?] {re:classloading}     at net.minecraftforge.client.loading.ClientModLoader.completeModLoading(ClientModLoader.java:138) ~[forge-1.20.1-47.2.32-universal.jar%23271!/:?] {re:classloading,pl:runtimedistcleaner:A}     at net.minecraft.client.Minecraft.lambda$new$4(Minecraft.java:571) ~[client-1.20.1-20230612.114412-srg.jar%23266!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.Util.m_137521_(Util.java:421) ~[client-1.20.1-20230612.114412-srg.jar%23266!/:?] {re:classloading,pl:accesstransformer:B,re:mixin,pl:accesstransformer:B}     at net.minecraft.client.Minecraft.lambda$new$5(Minecraft.java:564) ~[client-1.20.1-20230612.114412-srg.jar%23266!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraftforge.client.loading.ForgeLoadingOverlay.m_88315_(ForgeLoadingOverlay.java:146) ~[forge-1.20.1-47.2.32-universal.jar%23271!/:?] {re:classloading}     at net.minecraft.client.renderer.GameRenderer.m_109093_(GameRenderer.java:954) ~[client-1.20.1-20230612.114412-srg.jar%23266!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1146) ~[client-1.20.1-20230612.114412-srg.jar%23266!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:718) ~[client-1.20.1-20230612.114412-srg.jar%23266!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.main.Main.main(Main.java:218) ~[1.20.1-forge-47.2.32.jar:?] {re:mixin,pl:runtimedistcleaner:A,re:classloading,pl:mixin:APP:flywheel.mixins.json:ClientMainMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?] {}     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}     at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] {}     at net.minecraftforge.fml.loading.targets.CommonLaunchHandler.runTarget(CommonLaunchHandler.java:111) ~[fmlloader-1.20.1-47.2.32.jar:?] {}     at net.minecraftforge.fml.loading.targets.CommonLaunchHandler.clientService(CommonLaunchHandler.java:99) ~[fmlloader-1.20.1-47.2.32.jar:?] {}     at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$makeService$0(CommonClientLaunchHandler.java:25) ~[fmlloader-1.20.1-47.2.32.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.modlauncher.Launcher.run(Launcher.java:108) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.modlauncher.Launcher.main(Launcher.java:78) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) ~[bootstraplauncher-1.1.2.jar:?] {} A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Render thread Suspected Mods: NONE Stacktrace:     at com.electronwill.nightconfig.core.io.ParsingException.notEnoughData(ParsingException.java:22) ~[core-3.6.4.jar%2393!/:?] {} -- MOD terrablender -- Details:     Caused by 0: java.lang.ExceptionInInitializerError         at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?] {}         at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[?:?] {}         at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?] {}         at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?] {}         at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?] {}         at net.minecraftforge.fml.javafmlmod.FMLModContainer.constructMod(FMLModContainer.java:70) ~[javafmllanguage-1.20.1-47.2.32.jar%23268!/:?] {}         at net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$4(ModContainer.java:124) ~[fmlcore-1.20.1-47.2.32.jar%23267!/:?] {}         at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804) ~[?:?] {}         at java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1796) ~[?:?] {}         at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?] {}         at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?] {}         at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?] {}         at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?] {}         at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?] {}     Mod File: /C:/Users/FLOWUP/AppData/Roaming/.minecraft/mods/TerraBlender-forge-1.20.1-3.0.1.7.jar     Failure message: TerraBlender (terrablender) has failed to load correctly         java.lang.ExceptionInInitializerError: null     Mod Version: 3.0.1.7     Mod Issue URL: https://github.com/Glitchfiend/TerraBlender/issues     Exception message: com.electronwill.nightconfig.core.io.ParsingException: Not enough data available Stacktrace:     at com.electronwill.nightconfig.core.io.ParsingException.notEnoughData(ParsingException.java:22) ~[core-3.6.4.jar%2393!/:?] {}     at com.electronwill.nightconfig.core.io.ReaderInput.directReadChar(ReaderInput.java:36) ~[core-3.6.4.jar%2393!/:?] {}     at com.electronwill.nightconfig.core.io.AbstractInput.readChar(AbstractInput.java:49) ~[core-3.6.4.jar%2393!/:?] {}     at com.electronwill.nightconfig.core.io.AbstractInput.readCharsUntil(AbstractInput.java:123) ~[core-3.6.4.jar%2393!/:?] {}     at com.electronwill.nightconfig.toml.TableParser.parseKey(TableParser.java:166) ~[toml-3.6.4.jar%2394!/:?] {}     at com.electronwill.nightconfig.toml.TableParser.parseDottedKey(TableParser.java:145) ~[toml-3.6.4.jar%2394!/:?] {}     at com.electronwill.nightconfig.toml.TableParser.parseNormal(TableParser.java:55) ~[toml-3.6.4.jar%2394!/:?] {}     at com.electronwill.nightconfig.toml.TomlParser.parse(TomlParser.java:44) ~[toml-3.6.4.jar%2394!/:?] {}     at com.electronwill.nightconfig.toml.TomlParser.parse(TomlParser.java:37) ~[toml-3.6.4.jar%2394!/:?] {}     at com.electronwill.nightconfig.core.io.ConfigParser.parse(ConfigParser.java:113) ~[core-3.6.4.jar%2393!/:?] {}     at com.electronwill.nightconfig.core.io.ConfigParser.parse(ConfigParser.java:219) ~[core-3.6.4.jar%2393!/:?] {}     at com.electronwill.nightconfig.core.io.ConfigParser.parse(ConfigParser.java:202) ~[core-3.6.4.jar%2393!/:?] {}     at com.electronwill.nightconfig.core.file.WriteSyncFileConfig.load(WriteSyncFileConfig.java:73) ~[core-3.6.4.jar%2393!/:?] {}     at com.electronwill.nightconfig.core.file.AutosaveCommentedFileConfig.load(AutosaveCommentedFileConfig.java:85) ~[core-3.6.4.jar%2393!/:?] {}     at terrablender.config.ConfigFile.<init>(ConfigFile.java:34) ~[TerraBlender-forge-1.20.1-3.0.1.7.jar%23257!/:3.0.1.7] {re:classloading}     at terrablender.config.TerraBlenderConfig.<init>(TerraBlenderConfig.java:31) ~[TerraBlender-forge-1.20.1-3.0.1.7.jar%23257!/:3.0.1.7] {re:classloading}     at terrablender.core.TerraBlenderForge.<clinit>(TerraBlenderForge.java:30) ~[TerraBlender-forge-1.20.1-3.0.1.7.jar%23257!/:3.0.1.7] {re:classloading}     at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?] {}     at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[?:?] {}     at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?] {}     at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?] {}     at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?] {}     at net.minecraftforge.fml.javafmlmod.FMLModContainer.constructMod(FMLModContainer.java:70) ~[javafmllanguage-1.20.1-47.2.32.jar%23268!/:?] {}     at net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$4(ModContainer.java:124) ~[fmlcore-1.20.1-47.2.32.jar%23267!/:?] {}     at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804) ~[?:?] {}     at java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1796) ~[?:?] {}     at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?] {}     at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?] {}     at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?] {}     at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?] {}     at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?] {} -- System Details -- Details:     Minecraft Version: 1.20.1     Minecraft Version ID: 1.20.1     Operating System: Windows 11 (amd64) version 10.0     Java Version: 17.0.8, Microsoft     Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Microsoft     Memory: 458314904 bytes (437 MiB) / 973078528 bytes (928 MiB) up to 2147483648 bytes (2048 MiB)     CPUs: 16     Processor Vendor: AuthenticAMD     Processor Name: AMD Ryzen 7 5700X 8-Core Processor                  Identifier: AuthenticAMD Family 25 Model 33 Stepping 2     Microarchitecture: Zen 3     Frequency (GHz): 3.40     Number of physical packages: 1     Number of physical CPUs: 8     Number of logical CPUs: 16     Graphics card #0 name: AMD  Radeon RX 7800 XT     Graphics card #0 vendor: Advanced Micro Devices, Inc. (0x1002)     Graphics card #0 VRAM (MB): 4095.00     Graphics card #0 deviceId: 0x747e     Graphics card #0 versionInfo: DriverVersion=31.0.24033.1003     Memory slot #0 capacity (MB): 8192.00     Memory slot #0 clockSpeed (GHz): 2.13     Memory slot #0 type: DDR4     Memory slot #1 capacity (MB): 8192.00     Memory slot #1 clockSpeed (GHz): 2.13     Memory slot #1 type: DDR4     Virtual memory max (MB): 30134.09     Virtual memory used (MB): 16937.70     Swap memory total (MB): 13824.00     Swap memory used (MB): 104.09     JVM Flags: 9 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -Xmx2G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M     Loaded Shaderpack: (off)     ModLauncher: 10.0.9+10.0.9+main.dcd20f30     ModLauncher launch target: forgeclient     ModLauncher naming: srg     ModLauncher services:          mixin-0.8.5.jar mixin PLUGINSERVICE          eventbus-6.0.5.jar eventbus PLUGINSERVICE          fmlloader-1.20.1-47.2.32.jar slf4jfixer PLUGINSERVICE          fmlloader-1.20.1-47.2.32.jar object_holder_definalize PLUGINSERVICE          fmlloader-1.20.1-47.2.32.jar runtime_enum_extender PLUGINSERVICE          fmlloader-1.20.1-47.2.32.jar capability_token_subclass PLUGINSERVICE          accesstransformers-8.0.4.jar accesstransformer PLUGINSERVICE          fmlloader-1.20.1-47.2.32.jar runtimedistcleaner PLUGINSERVICE          modlauncher-10.0.9.jar mixin TRANSFORMATIONSERVICE          modlauncher-10.0.9.jar fml TRANSFORMATIONSERVICE      FML Language Providers:          [email protected]         javafml@null         [email protected]         lowcodefml@null     Mod List:          Stellarity-v2-0e.jar                              |Stellarity                    |mr_stellarity                 |2.0d                |COMMON_SET|Manifest: NOSIGNATURE         AsgardShieldReloaded-1.20.1-0.2.jar               |Asgard Shield: Reloaded       |asr                           |0.2                 |COMMON_SET|Manifest: NOSIGNATURE         mowziesmobs-1.6.4.jar                             |Mowzie's Mobs                 |mowziesmobs                   |1.6.4               |COMMON_SET|Manifest: NOSIGNATURE         Big Swords R-1.20.1-0.8.jar                       |Big Swords R                  |big_swords                    |0.8                 |COMMON_SET|Manifest: NOSIGNATURE         blue_skies-1.20.1-1.3.31.jar                      |Blue Skies                    |blue_skies                    |1.3.31              |COMMON_SET|Manifest: NOSIGNATURE         geckolib-forge-1.20.1-4.4.4.jar                   |GeckoLib 4                    |geckolib                      |4.4.4               |COMMON_SET|Manifest: NOSIGNATURE         player-animation-lib-forge-1.0.2-rc1+1.20.jar     |Player Animator               |playeranimator                |1.0.2-rc1+1.20      |COMMON_SET|Manifest: NOSIGNATURE         jei-1.20.1-forge-15.3.0.4.jar                     |Just Enough Items             |jei                           |15.3.0.4            |COMMON_SET|Manifest: NOSIGNATURE         libraryferret-forge-1.20.1-4.0.0.jar              |Library ferret                |libraryferret                 |4.0.0               |COMMON_SET|Manifest: NOSIGNATURE         epicsamurai-0.0.44-1.20.1-neo.jar                 |Epic Samurai                  |epicsamurai                   |0.0.44-1.20.1-neo   |COMMON_SET|Manifest: NOSIGNATURE         caelus-forge-3.2.0+1.20.1.jar                     |Caelus API                    |caelus                        |3.2.0+1.20.1        |COMMON_SET|Manifest: NOSIGNATURE         obscure_api-15.jar                                |Obscure API                   |obscure_api                   |15                  |COMMON_SET|Manifest: NOSIGNATURE         waystones-forge-1.20-14.1.3.jar                   |Waystones                     |waystones                     |14.1.3              |COMMON_SET|Manifest: NOSIGNATURE         villagernames-1.20.1-7.3.jar                      |Villager Names                |villagernames                 |7.3                 |COMMON_SET|Manifest: NOSIGNATURE         citadel-2.5.4-1.20.1.jar                          |Citadel                       |citadel                       |2.5.4               |COMMON_SET|Manifest: NOSIGNATURE         alexsmobs-1.22.8.jar                              |Alex's Mobs                   |alexsmobs                     |1.22.8              |COMMON_SET|Manifest: NOSIGNATURE         travelersbackpack-forge-1.20.1-9.1.14.jar         |Traveler's Backpack           |travelersbackpack             |9.1.14              |COMMON_SET|Manifest: NOSIGNATURE         mixinextras-forge-0.3.5.jar                       |MixinExtras                   |mixinextras                   |0.3.5               |COMMON_SET|Manifest: NOSIGNATURE         Kambrik-6.1.1+1.20.1-forge.jar                    |Kambrik                       |kambrik                       |6.1.1+1.20.1        |COMMON_SET|Manifest: NOSIGNATURE         simpleplanes-1.20.1-5.2.7.jar                     |Simple Planes                 |simpleplanes                  |1.20.1-5.2.7        |COMMON_SET|Manifest: NOSIGNATURE         takesapillage-1.0.3-1.20.1.jar                    |It Takes A Pillage            |takesapillage                 |1.0.3               |COMMON_SET|Manifest: NOSIGNATURE         balm-forge-1.20.1-7.2.2.jar                       |Balm                          |balm                          |7.2.2               |COMMON_SET|Manifest: NOSIGNATURE         azurelib-neo-1.20.1-2.0.22.jar                    |AzureLib                      |azurelib                      |2.0.22              |COMMON_SET|Manifest: NOSIGNATURE         puzzlesaccessapi-forge-8.0.7.jar                  |Puzzles Access Api            |puzzlesaccessapi              |8.0.7               |COMMON_SET|Manifest: 9a:09:85:98:65:c4:8c:11:c5:49:f6:d6:33:23:39:df:8d:b4:ff:92:84:b8:bd:a5:83:9f:ac:7f:2a:d1:4b:6a         forge-1.20.1-47.2.32-universal.jar                |Forge                         |forge                         |47.2.32             |COMMON_SET|Manifest: 84:ce:76:e8:45:35:e4:0e:63:86:df:47:59:80:0f:67:6c:c1:5f:6e:5f:4d:b3:54:47:1a:9f:7f:ed:5e:f2:90         ctov-forge-3.4.3 (1).jar                          |ChoiceTheorem's Overhauled Vil|ctov                          |3.4.3               |COMMON_SET|Manifest: NOSIGNATURE         twilightforest-1.20.1-4.3.2145-universal.jar      |The Twilight Forest           |twilightforest                |4.3.2145            |COMMON_SET|Manifest: NOSIGNATURE         embeddium-0.3.19+mc1.20.1-all.jar                 |Embeddium                     |embeddium                     |0.3.19+mc1.20.1     |COMMON_SET|Manifest: NOSIGNATURE         ultris-v5.6.9c.jar                                |Ultris: Boss Expansion        |ultris_mr                     |5.6.9c              |COMMON_SET|Manifest: NOSIGNATURE         structure_gel-1.20.1-2.16.2.jar                   |Structure Gel API             |structure_gel                 |2.16.2              |COMMON_SET|Manifest: NOSIGNATURE         DungeonsArise-1.20.x-2.1.58-release.jar           |When Dungeons Arise           |dungeons_arise                |2.1.58-1.20.x       |COMMON_SET|Manifest: NOSIGNATURE         illagersweararmor-1.20.1-1.3.4.jar                |Illagers Wear Armor           |zillagersweararmor            |1.20.1-1.3.4        |COMMON_SET|Manifest: NOSIGNATURE         client-1.20.1-20230612.114412-srg.jar             |Minecraft                     |minecraft                     |1.20.1              |COMMON_SET|Manifest: a1:d4:5e:04:4f:d3:d6:e0:7b:37:97:cf:77:b0:de:ad:4a:47:ce:8c:96:49:5f:0a:cf:8c:ae:b2:6d:4b:8a:3f         cofh_core-1.20.1-11.0.2.56.jar                    |CoFH Core                     |cofh_core                     |11.0.2              |COMMON_SET|Manifest: NOSIGNATURE         thermal_core-1.20.1-11.0.4.22.jar                 |Thermal Series                |thermal                       |11.0.4              |COMMON_SET|Manifest: NOSIGNATURE         TerraBlender-forge-1.20.1-3.0.1.7.jar             |TerraBlender                  |terrablender                  |3.0.1.7             |ERROR     |Manifest: NOSIGNATURE         BiomesOPlenty-1.20.1-18.0.0.598.jar               |Biomes O' Plenty              |biomesoplenty                 |18.0.0.598          |COMMON_SET|Manifest: NOSIGNATURE         Botania-1.20.1-444-FORGE.jar                      |Botania                       |botania                       |1.20.1-444-FORGE    |COMMON_SET|Manifest: NOSIGNATURE         Bountiful-6.0.3+1.20.1-forge.jar                  |Bountiful                     |bountiful                     |6.0.3+1.20.1        |COMMON_SET|Manifest: NOSIGNATURE         kffmod-4.10.0.jar                                 |Kotlin For Forge              |kotlinforforge                |4.10.0              |COMMON_SET|Manifest: NOSIGNATURE         notenoughanimations-forge-1.7.3-mc1.20.1.jar      |NotEnoughAnimations           |notenoughanimations           |1.7.3               |COMMON_SET|Manifest: NOSIGNATURE         curios-forge-5.9.1+1.20.1.jar                     |Curios API                    |curios                        |5.9.1+1.20.1        |COMMON_SET|Manifest: NOSIGNATURE         flywheel-forge-1.20.1-0.6.10-7.jar                |Flywheel                      |flywheel                      |0.6.10-7            |COMMON_SET|Manifest: NOSIGNATURE         oculus-flywheel-compat-1.20.1-0.2.5.jar           |Oculus Flywheel Compat        |irisflw                       |1.20.1-0.2.5        |COMMON_SET|Manifest: NOSIGNATURE         create-1.20.1-0.5.1.f.jar                         |Create                        |create                        |0.5.1.f             |COMMON_SET|Manifest: NOSIGNATURE         Patchouli-1.20.1-84-FORGE.jar                     |Patchouli                     |patchouli                     |1.20.1-84-FORGE     |COMMON_SET|Manifest: NOSIGNATURE         oculus-mc1.20.1-1.7.0.jar                         |Oculus                        |oculus                        |1.7.0               |COMMON_SET|Manifest: NOSIGNATURE         gravestone-forge-1.20.1-1.0.15.jar                |Gravestone Mod                |gravestone                    |1.20.1-1.0.15       |COMMON_SET|Manifest: NOSIGNATURE         collective-1.20.1-7.61.jar                        |Collective                    |collective                    |7.61                |COMMON_SET|Manifest: NOSIGNATURE         workers-1.20.1-1.7.8.jar                          |Workers Mod                   |workers                       |1.7.8               |COMMON_SET|Manifest: NOSIGNATURE         storagedrawers-1.20.1-12.0.3.jar                  |Storage Drawers               |storagedrawers                |12.0.3              |COMMON_SET|Manifest: NOSIGNATURE         irons_spellbooks-1.20.1-3.1.6.jar                 |Iron's Spells 'n Spellbooks   |irons_spellbooks              |1.20.1-3.1.6        |COMMON_SET|Manifest: NOSIGNATURE         thermal_foundation-1.20.1-11.0.4.68.jar           |Thermal Foundation            |thermal_foundation            |11.0.4              |COMMON_SET|Manifest: NOSIGNATURE         thermal_expansion-1.20.1-11.0.1.29.jar            |Thermal Expansion             |thermal_expansion             |11.0.1              |COMMON_SET|Manifest: NOSIGNATURE         deeperdarker-forge-1.20.1-1.2.1.jar               |Deeper and Darker             |deeperdarker                  |1.2.1               |COMMON_SET|Manifest: NOSIGNATURE         cfm-forge-1.20.1-7.0.0-pre36.jar                  |MrCrayfish's Furniture Mod    |cfm                           |7.0.0-pre36         |COMMON_SET|Manifest: 0d:78:5f:44:c0:47:0c:8c:e2:63:a3:04:43:d4:12:7d:b0:7c:35:37:dc:40:b1:c1:98:ec:51:eb:3b:3c:45:99         PuzzlesLib-v8.1.20-1.20.1-Forge.jar               |Puzzles Lib                   |puzzleslib                    |8.1.20              |COMMON_SET|Manifest: 9a:09:85:98:65:c4:8c:11:c5:49:f6:d6:33:23:39:df:8d:b4:ff:92:84:b8:bd:a5:83:9f:ac:7f:2a:d1:4b:6a         EnchantingInfuser-v8.0.2-1.20.1-Forge.jar         |Enchanting Infuser            |enchantinginfuser             |8.0.2               |COMMON_SET|Manifest: 9a:09:85:98:65:c4:8c:11:c5:49:f6:d6:33:23:39:df:8d:b4:ff:92:84:b8:bd:a5:83:9f:ac:7f:2a:d1:4b:6a         better_minecraft-1.14-forge-1.20.1.jar            |BetterMinecraft (Wearpon Mod) |better_minecraft              |1.14                |COMMON_SET|Manifest: NOSIGNATURE         aquamirae-6.API15.jar                             |Aquamirae                     |aquamirae                     |6.API15             |COMMON_SET|Manifest: NOSIGNATURE     Crash Report UUID: 4b90cf59-7993-4021-b47c-faba5a153a02     FML: 47.2     Forge: net.minecraftforge:47.2.32     Flywheel Backend: GL33 Instanced Arrays       Don't know how to fix it (i'm not good witht that) if someone can help me ?  
    • I have problem when i starts minecraft with my mod installed it freezes on loading and on loading world. I don't have anything like datagen that can slow down loading. Only thing i am afraid it's slowing down are models (for blocks). Is itr possible that complex models can slow it down? I have about 15 custom block models and about 40 models that has them like parrent. In case it is caused by models doe's someone know about something that can speed it up? Thank you
    • If you are using AMD/ATI, get the latest drivers from their website  
    • toomanyorigins requires Origin If you already have this mod, try other builds
  • Topics

×
×
  • Create New...

Important Information

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