Jump to content

1.15.2 Crash at entering world, caused by rendering an entity


Recommended Posts

Posted

Hello

As i tried to run the AgryBirdsMod, i got this error:

 

Quote

[m[1;31m[18:51:56] [Render thread/FATAL] [minecraft/Minecraft]: Reported exception thrown!
net.minecraft.crash.ReportedException: Rendering entity in world
    at net.minecraft.client.renderer.entity.EntityRendererManager.renderEntityStatic(EntityRendererManager.java:273) ~[forge-1.15.2-31.1.12_mapped_snapshot_20200216-1.15.1.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.WorldRenderer.renderEntity(WorldRenderer.java:1094) ~[forge-1.15.2-31.1.12_mapped_snapshot_20200216-1.15.1.jar:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.WorldRenderer.updateCameraAndRender(WorldRenderer.java:948) ~[forge-1.15.2-31.1.12_mapped_snapshot_20200216-1.15.1.jar:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.GameRenderer.renderWorld(GameRenderer.java:600) ~[forge-1.15.2-31.1.12_mapped_snapshot_20200216-1.15.1.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.GameRenderer.updateCameraAndRender(GameRenderer.java:422) ~[forge-1.15.2-31.1.12_mapped_snapshot_20200216-1.15.1.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:925) ~[forge-1.15.2-31.1.12_mapped_snapshot_20200216-1.15.1.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.run(Minecraft.java:554) ~[forge-1.15.2-31.1.12_mapped_snapshot_20200216-1.15.1.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.main.Main.main(SourceFile:204) ~[forge-1.15.2-31.1.12_mapped_snapshot_20200216-1.15.1.jar:?] {re:classloading,pl:runtimedistcleaner:A}
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_241] {}
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_241] {}
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_241] {}
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_241] {}
    at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55) ~[forge-1.15.2-31.1.12_mapped_snapshot_20200216-1.15.1.jar:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-5.0.0-milestone.4.jar:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-5.0.0-milestone.4.jar:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-5.0.0-milestone.4.jar:?] {}
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [modlauncher-5.0.0-milestone.4.jar:?] {}
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-5.0.0-milestone.4.jar:?] {}
    at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:102) [forge-1.15.2-31.1.12_mapped_snapshot_20200216-1.15.1.jar:?] {}
Caused by: java.lang.NullPointerException
    at net.minecraft.client.renderer.entity.model.AgeableModel.render(SourceFile:63) ~[forge-1.15.2-31.1.12_mapped_snapshot_20200216-1.15.1.jar:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.entity.LivingRenderer.render(LivingRenderer.java:118) ~[forge-1.15.2-31.1.12_mapped_snapshot_20200216-1.15.1.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.entity.MobRenderer.render(SourceFile:43) ~[forge-1.15.2-31.1.12_mapped_snapshot_20200216-1.15.1.jar:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.entity.MobRenderer.render(SourceFile:18) ~[forge-1.15.2-31.1.12_mapped_snapshot_20200216-1.15.1.jar:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.entity.EntityRendererManager.renderEntityStatic(EntityRendererManager.java:245) ~[forge-1.15.2-31.1.12_mapped_snapshot_20200216-1.15.1.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    ... 18 more
[m[32m[18:51:56] [Render thread/INFO] [STDOUT/]: [net.minecraft.util.registry.Bootstrap:printToSYSOUT:103]: ---- Minecraft Crash Report ----
// Daisy, daisy...

Time: 20.02.20 18:51
Description: Rendering entity in world

java.lang.NullPointerException: Rendering entity in world
    at net.minecraft.client.renderer.entity.model.AgeableModel.render(SourceFile:63) ~[forge-1.15.2-31.1.12_mapped_snapshot_20200216-1.15.1.jar:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.entity.LivingRenderer.render(LivingRenderer.java:118) ~[forge-1.15.2-31.1.12_mapped_snapshot_20200216-1.15.1.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.entity.MobRenderer.render(SourceFile:43) ~[forge-1.15.2-31.1.12_mapped_snapshot_20200216-1.15.1.jar:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.entity.MobRenderer.render(SourceFile:18) ~[forge-1.15.2-31.1.12_mapped_snapshot_20200216-1.15.1.jar:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.entity.EntityRendererManager.renderEntityStatic(EntityRendererManager.java:245) ~[forge-1.15.2-31.1.12_mapped_snapshot_20200216-1.15.1.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.WorldRenderer.renderEntity(WorldRenderer.java:1094) ~[forge-1.15.2-31.1.12_mapped_snapshot_20200216-1.15.1.jar:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.WorldRenderer.updateCameraAndRender(WorldRenderer.java:948) ~[forge-1.15.2-31.1.12_mapped_snapshot_20200216-1.15.1.jar:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.GameRenderer.renderWorld(GameRenderer.java:600) ~[forge-1.15.2-31.1.12_mapped_snapshot_20200216-1.15.1.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.GameRenderer.updateCameraAndRender(GameRenderer.java:422) ~[forge-1.15.2-31.1.12_mapped_snapshot_20200216-1.15.1.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:925) ~[forge-1.15.2-31.1.12_mapped_snapshot_20200216-1.15.1.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.run(Minecraft.java:554) ~[forge-1.15.2-31.1.12_mapped_snapshot_20200216-1.15.1.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.main.Main.main(SourceFile:204) ~[forge-1.15.2-31.1.12_mapped_snapshot_20200216-1.15.1.jar:?] {re:classloading,pl:runtimedistcleaner:A}
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_241] {}
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_241] {}
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_241] {}
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_241] {}
    at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55) ~[forge-1.15.2-31.1.12_mapped_snapshot_20200216-1.15.1.jar:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-5.0.0-milestone.4.jar:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-5.0.0-milestone.4.jar:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-5.0.0-milestone.4.jar:?] {}
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [modlauncher-5.0.0-milestone.4.jar:?] {}
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-5.0.0-milestone.4.jar:?] {}
    at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:102) [forge-1.15.2-31.1.12_mapped_snapshot_20200216-1.15.1.jar:?] {}


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

-- Head --
Thread: Render thread
Stacktrace:
    at net.minecraft.client.renderer.entity.model.AgeableModel.render(SourceFile:63)
    at net.minecraft.client.renderer.entity.LivingRenderer.render(LivingRenderer.java:118)
    at net.minecraft.client.renderer.entity.MobRenderer.render(SourceFile:43)
    at net.minecraft.client.renderer.entity.MobRenderer.render(SourceFile:18)

-- Entity being rendered --
Details:
    Entity Type: angrybirdsmod:stella (drachenbauer32.angrybirdsmod.entities.StellaEntity)
    Entity ID: 7
    Entity Name: Stella
    Entity's Exact location: 69.53, 4.00, -163.47
    Entity's Block location: World: (69,4,-164), Chunk: (at 5,0,12 in 4,-11; contains blocks 64,0,-176 to 79,255,-161), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1)
    Entity's Momentum: 0.00, -0.07, 0.02
    Entity's Passengers: []
    Entity's Vehicle: ~~ERROR~~ NullPointerException: null

-- Renderer details --
Details:
    Assigned renderer: drachenbauer32.angrybirdsmod.entities.renderers.StellaRenderer@5d852761
    Location: -4.57,-2.20,3.82 - World: (-5,-3,3), Chunk: (at 11,-1,3 in -1,0; contains blocks -16,0,0 to -1,255,15), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
    Rotation: 1.40625
    Delta: 0.16000748
Stacktrace:
    at net.minecraft.client.renderer.entity.EntityRendererManager.renderEntityStatic(EntityRendererManager.java:245)
    at net.minecraft.client.renderer.WorldRenderer.renderEntity(WorldRenderer.java:1094)
    at net.minecraft.client.renderer.WorldRenderer.updateCameraAndRender(WorldRenderer.java:948)
    at net.minecraft.client.renderer.GameRenderer.renderWorld(GameRenderer.java:600)

-- Affected level --
Details:
    All players: 1 total; [ClientPlayerEntity['Dev'/176, l='MpServer', x=74.10, y=4.58, z=-167.29]]
    Chunk stats: Client Chunk Cache: 841, 489
    Level dimension: DimensionType{minecraft:overworld}
    Level name: MpServer
    Level seed: 1298078298677915893
    Level generator: ID 01 - flat, ver 0. Features enabled: false
    Level generator options: {}
    Level spawn location: World: (80,4,-176), Chunk: (at 0,0,0 in 5,-11; contains blocks 80,0,-176 to 95,255,-161), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1)
    Level time: 298213 game time, 298213 day time
    Known server brands:
    Level was modded: false
    Level storage version: 0x00000 - Unknown?
    Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
    Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
    Server brand: forge
    Server type: Integrated singleplayer server
Stacktrace:
    at net.minecraft.client.world.ClientWorld.fillCrashReport(ClientWorld.java:442)
    at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:1764)
    at net.minecraft.client.Minecraft.run(Minecraft.java:568)
    at net.minecraft.client.main.Main.main(SourceFile:204)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55)
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37)
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54)
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72)
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:81)
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:65)
    at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:102)

-- System Details --
Details:
    Minecraft Version: 1.15.2
    Minecraft Version ID: 1.15.2
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 1.8.0_241, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 467696520 bytes (446 MB) / 1123024896 bytes (1071 MB) up to 1884815360 bytes (1797 MB)
    CPUs: 8
    JVM Flags: 1 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump
    ModLauncher: 5.0.0-milestone.4+67+b1a340b
    ModLauncher launch target: fmluserdevclient
    ModLauncher naming: mcp
    ModLauncher services:
        /eventbus-2.0.0-milestone.1-service.jar eventbus PLUGINSERVICE
        /forge-1.15.2-31.1.12_mapped_snapshot_20200216-1.15.1-launcher.jar object_holder_definalize PLUGINSERVICE
        /forge-1.15.2-31.1.12_mapped_snapshot_20200216-1.15.1-launcher.jar runtime_enum_extender PLUGINSERVICE
        /accesstransformers-2.0.0-milestone.1-shadowed.jar accesstransformer PLUGINSERVICE
        /forge-1.15.2-31.1.12_mapped_snapshot_20200216-1.15.1-launcher.jar capability_inject_definalize PLUGINSERVICE
        /forge-1.15.2-31.1.12_mapped_snapshot_20200216-1.15.1-launcher.jar runtimedistcleaner PLUGINSERVICE
        /forge-1.15.2-31.1.12_mapped_snapshot_20200216-1.15.1-launcher.jar fml TRANSFORMATIONSERVICE
    FML: 31.1
    Forge: net.minecraftforge:31.1.12
    FML Language Providers:
        [email protected]
        minecraft@1
    Mod List:
        client-extra.jar Minecraft {[email protected] DONE}
        main Angry Birds Mod {[email protected] DONE}
        forge-1.15.2-31.1.12_mapped_snapshot_20200216-1.15.1.jar Forge {[email protected] DONE}
    Launched Version: MOD_DEV
    Backend library: LWJGL version 3.2.2 build 10
    Backend API: Intel(R) HD Graphics 4000 GL version 4.0.0 - Build 10.18.10.4358, Intel
    GL Caps: Using framebuffer using OpenGL 3.0
    Using VBOs: Yes
    Is Modded: Definitely; Client brand changed to 'forge'
    Type: Client (map_client.txt)
    Resource Packs:
    Current Language: Deutsch (Deutschland)
    CPU: 8x Intel(R) Core(TM) i7-3610QM CPU @ 2.30GHz
[m[32m[18:51:56] [Render thread/INFO] [STDOUT/]: [net.minecraft.util.registry.Bootstrap:printToSYSOUT:103]: #@!@# Game crashed! Crash report saved to: #@!@# D:\Mods\1_15_1\AngryBirdsMod\run\.\crash-reports\crash-2020-02-20_18.51.56-client.txt
[mAL lib: (EE) alc_cleanup: 1 device not closed

 

It seams like there is something wrong with one of my entities: the Angry Birds character Stella.

But i cannot figure out, what exactly.

Can you help me?

Posted

The Entity-class:

package drachenbauer32.angrybirdsmod.entities;

import drachenbauer32.angrybirdsmod.init.AngryBirdsEntities;
import net.minecraft.entity.AgeableEntity;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.Pose;
import net.minecraft.entity.ai.goal.LookAtGoal;
import net.minecraft.entity.ai.goal.LookRandomlyGoal;
import net.minecraft.entity.ai.goal.RandomSwimmingGoal;
import net.minecraft.entity.ai.goal.RandomWalkingGoal;
import net.minecraft.entity.ai.goal.SwimGoal;
import net.minecraft.entity.passive.AnimalEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.world.World;

public class StellaEntity extends AnimalEntity
{
    public StellaEntity(EntityType<? extends AnimalEntity> type, World worldIn)
    {
        super((EntityType<? extends AnimalEntity>) AngryBirdsEntities.STELLA, worldIn);
    }
    
    @Override
    public AgeableEntity createChild(AgeableEntity arg0)
    {
        return null;
    }
    
    @Override
    public float getEyeHeight(Pose pose)
    {
        return this.getSize(pose).height / 2;
    }
    
    @Override
    protected void registerGoals()
    {
        this.goalSelector.addGoal(0, new SwimGoal(this));
        this.goalSelector.addGoal(1, new RandomSwimmingGoal(this, 0.2d, 10));
        this.goalSelector.addGoal(2, new RandomWalkingGoal(this, 0.2d));
        this.goalSelector.addGoal(3, new LookAtGoal(this, PlayerEntity.class, 6.0F));
        this.goalSelector.addGoal(4, new LookRandomlyGoal(this));
    }
    
    @Override
    public boolean canBreatheUnderwater()
    {
        return true;
    }
    
    @Override
    protected void registerAttributes()
    {
        super.registerAttributes();
    }
}

 

The Renderer-class:

package drachenbauer32.angrybirdsmod.entities.renderers;

import drachenbauer32.angrybirdsmod.entities.StellaEntity;
import drachenbauer32.angrybirdsmod.entities.models.StellaModel;
import drachenbauer32.angrybirdsmod.util.Reference;
import net.minecraft.client.renderer.entity.EntityRendererManager;
import net.minecraft.client.renderer.entity.MobRenderer;
import net.minecraft.client.renderer.entity.model.EntityModel;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;

@OnlyIn(Dist.CLIENT)
public class StellaRenderer extends MobRenderer<StellaEntity, EntityModel<StellaEntity>>
{
    private static final ResourceLocation STELLA_TEXTURE = new ResourceLocation(Reference.MOD_ID + ":textures/entity/stella.png");
    
    public StellaRenderer(EntityRendererManager manager)
    {
        super(manager, new StellaModel<>(), 0.5f);
    }
    
    @Override
    public ResourceLocation getEntityTexture(StellaEntity stella)
    {
        return STELLA_TEXTURE;
    }
    
    /*public static class RenderFactory implements IRenderFactory<StellaEntity>
    {
        @Override
        public EntityRenderer<? super StellaEntity> createRenderFor(EntityRendererManager manager)
        {
            return new StellaRenderer(manager);
        }
    }*/
}

i commented out the RenderFactory, because i didn´t see it in the vanilla-renderers any more.

 

The Model-class:

package drachenbauer32.angrybirdsmod.entities.models;

import com.google.common.collect.ImmutableList;
import drachenbauer32.angrybirdsmod.entities.StellaEntity;
import net.minecraft.client.renderer.entity.model.AgeableModel;
import net.minecraft.client.renderer.model.ModelRenderer;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;

@OnlyIn(Dist.CLIENT)
public class StellaModel<T extends StellaEntity> extends AgeableModel<T>
{
    private final ModelRenderer bone;
    private final ModelRenderer bone2;
    private final ModelRenderer bone3;
    private final ModelRenderer bone4;
    private final ModelRenderer bone5;
    
    public StellaModel()
    {
        textureWidth = 32;
        textureHeight = 16;
        
        bone = new ModelRenderer(this);
        bone.setRotationPoint(0.0F, 20.0F, 0.0F);
        bone.addBox("body", -4.0F, -4.0F, -4.0F, 8, 8, 8, 0.0F, 0, 0);
        bone.addBox("beak", -1.0F, 2.0F, -5.0F, 2, 1, 1, 0.0F, 25, 0);
        bone.addBox("head_feather_1", 0.0F, -6.0F, -8.0F, 0, 2, 6, 0.0F, 10, 10);
        bone.addBox("tail_feather_1", 0.0F, 1.0F, 4.0F, 0, 1, 4, 0.0F, 24, 3);
        
        bone2 = new ModelRenderer(this);
        bone2.setRotationPoint(0.0F, -4.0F, -2.0F);
        setRotationAngle(bone2, -0.5236F, 0.0F, 0.0F);
        bone.addChild(bone2);
        bone2.addBox("head_feather_2", 0.0F, -2.0F, -6.0F, 0, 2, 6, 0.0F, 10, 10);

        bone3 = new ModelRenderer(this);
        bone3.setRotationPoint(0.0F, -4.0F, -2.0F);
        setRotationAngle(bone3, -1.0472F, 0.0F, 0.0F);
        bone.addChild(bone3);
        bone3.addBox("head_feather_3", 0.0F, -2.0F, -6.0F, 0, 2, 8, 0.0F, 8, 8);
        
        bone4 = new ModelRenderer(this);
        bone4.setRotationPoint(0.0F, 1.0F, 4.0F);
        setRotationAngle(bone4, 0.5236F, 0.0F, 0.0F);
        bone.addChild(bone4);
        bone4.addBox("tail_feather_2", 0.0F, 0.0F, 0.0F, 0, 1, 4, 0.0F, 24, 3);
        
        bone5 = new ModelRenderer(this);
        bone5.setRotationPoint(0.0F, 1.0F, 4.0F);
        setRotationAngle(bone5, -0.5236F, 0.0F, 0.0F);
        bone.addChild(bone5);
        bone5.addBox("tail_feather_3", 0.0F, 0.0F, 0.0F, 0, 1, 4, 0.0F, 24, 3);
    }
    
    @Override
    protected Iterable<ModelRenderer> getHeadParts()
    {
        return ImmutableList.of(bone);
    }
    
    @Override
    protected Iterable<ModelRenderer> getBodyParts()
    {
        return null;
    }
    
    @Override
    public void setRotationAngles(StellaEntity stella, float limbSwing, float limbSwingAmount, float ageInTicks,
                                  float netHeadYaw, float headPitch)
    {
        bone.rotateAngleX = headPitch * 0.017453292f;
        bone.rotateAngleY = netHeadYaw * 0.017453292f;
    }
    
    private void setRotationAngle(ModelRenderer model, float x, float y, float z)
    {
        model.rotateAngleX = x;
        model.rotateAngleY = y;
        model.rotateAngleZ = z;
    }
}

in the method getBodyParts i return null, because it´s a classic Angry Birds-character. they are not much more than bird-heads with some feathers stick out.

So i only needed stuff as head-part

Posted

For the first thing, should i replace the "?" with "STELLA", because this is my entitytype for this one?

 

for the thing with the list, do you mean, like i made the head-parts thing, but just leave the bracets of the list empty?

Posted (edited)

For the entity-type-thing:

I thaught the parent-class uses it with the super-constructor.

 

Edit:

now i looked into some vanilla-entities and try, what i see there as the constructor.

Edited by Drachenbauer
Posted

Now it works.

But now i have a problem with my newest entity, that has limbs:

 

I tried theese two variants of the limbSwing-calculation:

        this.bone3.rotateAngleX = 0.5235988f + MathHelper.cos(limbSwing * 5.0f) * 1.4f * limbSwingAmount;
        this.bone4.rotateAngleX = -0.5235988f + -(MathHelper.cos(limbSwing * 5.0f) * 1.4f * limbSwingAmount);
        this.bone5.rotateAngleX = -0.5235988f + -(MathHelper.cos(limbSwing * 5.0f) * 1.4f * limbSwingAmount);
        this.bone6.rotateAngleX = 0.5235988f + MathHelper.cos(limbSwing * 5.0f) * 1.4f * limbSwingAmount;
        
        this.bone3.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F + (float)Math.PI) * 1.4F * limbSwingAmount;
        this.bone4.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F) * 1.4F * limbSwingAmount;
        this.bone5.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F) * 1.4F * limbSwingAmount;
        this.bone6.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F + (float)Math.PI) * 1.4F * limbSwingAmount;

With the first set, one front leg stays more bended forward and the other backward, the hind-legs the same.

And with the seccond one, the legs move very slow and not very far(it looks more like gliding, than walking).

 

It´s a small character with short legs.

I want the legs move faster to fit the walking-speed and bend about 45° to the front and rear from the vertical main-pose.

How most i change theese lines?

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



×
×
  • Create New...

Important Information

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