Jump to content

How can i be sure, that semi-transparenca looks right ingame?


Drachenbauer

Recommended Posts

Ai i now used a texture with semi-transparencys on an entity-model in BlockBench, i can see cubes, located inside the same bodypart(bones) through this transparent part, but not parts of an other bodypart.

In this sample the purple fin on the head of the model has such transharencies, wich show the part of the head, that´s behind the fin.

But at the bottom end of the fin (red arrow), a part of the big tail-cube is also hidden behind the fin and appears invisible.

264338228_CoralModelinBlockBench.png.5bd41c7a6794e5f1ba9e5ab2abf4634b.png

Does this happen in minecraft, too?

If yes, what can i do, that it does not happen?

Edited by Drachenbauer
Link to comment
Share on other sites

3 hours ago, Drachenbauer said:

Does this happen in minecraft, too?

Run it and find out.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

General word of warning: BlockBench has a bunch of rendering inconsistencies that don't mirror the actual game, especially when it comes to transparency. When it comes to entities, it's really only good quick prototyping in my opinion. Chances are BlockBench is just being weird.

I'm eager to learn and am prone to mistakes. Don't hesitate to tell me how I can improve.

Link to comment
Share on other sites

  • 4 weeks later...

In te slime´s layer i found this:

IVertexBuilder ivertexbuilder = bufferIn.getBuffer(RenderType.getEntityTranslucent(this.getEntityTexture(entitylivingbaseIn)));

But i´m not sure, how to use it in my own entity-renderer

 

If i try this:

    @Override
    public void render(CoralEntity coral, float p_225623_2_, float p_225623_3_, MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn, int packedLightIn)
    {
        IVertexBuilder ivertexbuilder = bufferIn.getBuffer(RenderType.getEntityTranslucent(this.getEntityTexture(coral)));
        CORAL_MODEL.render(matrixStackIn, ivertexbuilder, packedLightIn, LivingRenderer.getPackedOverlay(coral, 0.0F), 1.0F, 1.0F, 1.0F, 1.0F);
        //super.render(coral, p_225623_2_, p_225623_3_, p_225623_4_, bufferIn, p_225623_6_);
    }

The fin appears transparent, but The entity appears weird deformed and does not rotete:

1983075106_Coralentitybug.png.637d5cbca4d003ac54b9ad4aa5dde0e8.png

 

This is the right shape, how it looks without the code-snippet:

780592878_Coralingame.png.15659a8d97404660833dabbb2cdbf757.png

But with opaque fin.

 

For the code-snippet:

i don´t know, what the weird named flosts in the head-line are.

And is the int at the end really the packetLight-value?

What must i put into the flosts of the "CORAL_MODEL.render"-command?

Edited by Drachenbauer
Link to comment
Share on other sites

1 hour ago, Drachenbauer said:

In te slime´s layer i found this:


IVertexBuilder ivertexbuilder = bufferIn.getBuffer(RenderType.getEntityTranslucent(this.getEntityTexture(entitylivingbaseIn)));

But i´m not sure, how to use it in my own entity-renderer

Writing from mobile. If i am reading the names of the functions, then it was getting the translucency from the Entity Texture. Try to see the Texture of the slime.

Edited by DragonITA

New in Modding? == Still learning!

Link to comment
Share on other sites

@DrachenbauerDon‘t use Blockbench, but try to use Tabula. Even you are making a mod for Minecraft 1.14.4, and Blockbench make the whole entity code in the 1.14.4 format, Tabula was a better option and you don‘t need to change too many codes snippets. Tabula is a mod for Minecraft 1.12.2, but it was the best i know. Then it should be compatible with Transparency and such things. Just try out.

New in Modding? == Still learning!

Link to comment
Share on other sites

I only find an option to make the whoole cube translucent, but nothing about using texture alpha...

 

My texture has semi-transparent areas, and i want to display them correct:

Transparent fin with opaque detail-lines in it

 

I just need to know, how to use this:

IVertexBuilder ivertexbuilder = bufferIn.getBuffer(RenderType.getEntityTranslucent(this.getEntityTexture(coral)));

in my Renderer-class to load the alpha-channel of my entity-texture.

Edited by Drachenbauer
Link to comment
Share on other sites

Dragon are you telling people to backdate to supported versions?

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

Spoiler

Logs (Most issues require logs to diagnose):

Spoiler

Please post logs using one of the following sites (Thank you Lumber Wizard for the list):

https://gist.github.com/100MB Requires member (Free)

https://pastebin.com/: 512KB as guest, 10MB as Pro ($$$)

https://hastebin.com/: 400KB

Do NOT use sites like Mediafire, Dropbox, OneDrive, Google Drive, or a site that has a countdown before offering downloads.

 

What to provide:

...for Crashes and Runtime issues:

Minecraft 1.14.4 and newer:

Post debug.log

Older versions:

Please update...

 

...for Installer Issues:

Post your installer log, found in the same place you ran the installer

This log will be called either installer.log or named the same as the installer but with .log on the end

Note for Windows users:

Windows hides file extensions by default so the installer may appear without the .jar extension then when the .log is added the log will appear with the .jar extension

 

Where to get it:

Mojang Launcher: When using the Mojang launcher debug.log is found in .minecraft\logs.

 

Curse/Overwolf: If you are using the Curse Launcher, their configurations break Forge's log settings, fortunately there is an easier workaround than I originally thought, this works even with Curse's installation of the Minecraft launcher as long as it is not launched THROUGH Twitch:

Spoiler
  1. Make sure you have the correct version of Forge installed (some packs are heavily dependent on one specific build of Forge)
  2. Make a launcher profile targeting this version of Forge.
  3. Set the launcher profile's GameDir property to the pack's instance folder (not the instances folder, the folder that has the pack's name on it).
  4. Now launch the pack through that profile and follow the "Mojang Launcher" instructions above.

Video:

Spoiler

 

 

 

or alternately, 

 

Fallback ("No logs are generated"):

If you don't see logs generated in the usual place, provide the launcher_log.txt from .minecraft

 

Server Not Starting:

Spoiler

If your server does not start or a command window appears and immediately goes away, run the jar manually and provide the output.

 

Reporting Illegal/Inappropriate Adfocus Ads:

Spoiler

Get a screenshot of the URL bar or copy/paste the whole URL into a thread on the General Discussion board with a description of the Ad.

Lex will need the Ad ID contained in that URL to report it to Adfocus' support team.

 

Posting your mod as a GitHub Repo:

Spoiler

When you have an issue with your mod the most helpful thing you can do when asking for help is to provide your code to those helping you. The most convenient way to do this is via GitHub or another source control hub.

When setting up a GitHub Repo it might seem easy to just upload everything, however this method has the potential for mistakes that could lead to trouble later on, it is recommended to use a Git client or to get comfortable with the Git command line. The following instructions will use the Git Command Line and as such they assume you already have it installed and that you have created a repository.

 

  1. Open a command prompt (CMD, Powershell, Terminal, etc).
  2. Navigate to the folder you extracted Forge’s MDK to (the one that had all the licenses in).
  3. Run the following commands:
    1. git init
    2. git remote add origin [Your Repository's URL]
      • In the case of GitHub it should look like: https://GitHub.com/[Your Username]/[Repo Name].git
    3. git fetch
    4. git checkout --track origin/master
    5. git stage *
    6. git commit -m "[Your commit message]"
    7. git push
  4. Navigate to GitHub and you should now see most of the files.
    • note that it is intentional that some are not synced with GitHub and this is done with the (hidden) .gitignore file that Forge’s MDK has provided (hence the strictness on which folder git init is run from)
  5. Now you can share your GitHub link with those who you are asking for help.

[Workaround line, please ignore]

 

Link to comment
Share on other sites

Hello

 

I still want to know, how i can use this line:

IVertexBuilder ivertexbuilder = bufferIn.getBuffer(RenderType.getEntityTranslucent(this.getEntityTexture(entitylivingbaseIn)));

or a part of it to use the alpha-channel of my entity-txture?

 

Is there any way to apply it directly to the result of the render-method in the Renderer-class?

Or can i use it in the Model-class?

Link to comment
Share on other sites

@DaemonUmbra I myself use Tabula to close my entities, because Tabula was recommended to me and I must admit that it is better than Blockbench. I used Blockbench before, but then I had to change much more than in Tabula. I'm not saying it to do marketing or anything like that, but because I hope that if it works for me, it will work for other people. I made a lot of mistakes, I have to admit that, but I try to learn from them and then help people. If one of the possibilities is to go back one version to get the solution (and then back to the normal version of course), then you don't (usually) lose anything if you just try. Then I say this because Tabula surely works completely different than Blockbench, so it could also be that it calculates the thing with transparency and then does it automatically. I haven't tested it yet (but I wanted to do that as soon as I solved a previous problem). So if it helps, then yes. So, there's nothing illegal or forbidden in it if you use an older version and download a newer one afterwards, or am I wrong?

New in Modding? == Still learning!

Link to comment
Share on other sites

1 minute ago, Drachenbauer said:

Hello

 

I still want to know, how i can use this line:


IVertexBuilder ivertexbuilder = bufferIn.getBuffer(RenderType.getEntityTranslucent(this.getEntityTexture(entitylivingbaseIn)));

or a part of it to use the alpha-channel of my entity-txture?

 

Is there any way to apply it directly to the result of the render-method in the Renderer-class?

Or can i use it in the Model-class?

See the Vanilla Slime code and then try to comprehend how it was used. I never used Transparent Textures before, so i don‘t know how to help you further.

New in Modding? == Still learning!

Link to comment
Share on other sites

2 minutes ago, Drachenbauer said:

I already sayd, thet Tabula does not provide the type of transparency, that i want for my thing.

I want to urs the one from the slime´s layer.

Sorry if the other modeling Program don‘t have helped you, but try you self or wait, that a other and more experienced modder will help you. I repeat it: 

 

5 minutes ago, DragonITA said:

I never used Transparent Textures before, so i don‘t know how to help you further.

 

New in Modding? == Still learning!

Link to comment
Share on other sites

now i try a layer as for the slime.

 

i made it almost the same, , just replaced all about the slime-model with my model.

 

But i cannot add it to the renderer, jike i saw  at the slime.

I get the error

Quote

Cannot infer type arguments for CoralFinLayer<>

in the Renderer-class at this line:

this.addLayer(new CoralFinLayer<>(this));

 

The Renderer-class:

package drachenbauer32.angrybirdsmod.entities.renderers;

import drachenbauer32.angrybirdsmod.entities.CoralEntity;
import drachenbauer32.angrybirdsmod.entities.layers.CoralFinLayer;
import drachenbauer32.angrybirdsmod.entities.models.CoralModel;
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;

public class CoralRenderer<T> extends MobRenderer<CoralEntity, EntityModel<CoralEntity>>
{
    private static final ResourceLocation CORAL_TEXTURE = new ResourceLocation(Reference.MOD_ID + ":textures/entity/coral.png");
    private static final CoralModel<CoralEntity> CORAL_MODEL = new CoralModel<>(false);
    
    public CoralRenderer(EntityRendererManager manager)
    {
        super(manager, CORAL_MODEL, 0.5f);
        this.addLayer(new CoralFinLayer<>(this));
    }
    
    @Override
    public ResourceLocation getEntityTexture(CoralEntity coral)
    {
        return CORAL_TEXTURE;
    }
    
    @Override
    protected float handleRotationFloat(CoralEntity coral, float partialTicks)
    {
        return coral.getTailRotation();
    }
}

 

the Layer-class:

package drachenbauer32.angrybirdsmod.entities.layers;

import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.vertex.IVertexBuilder;

import drachenbauer32.angrybirdsmod.entities.models.CoralModel;
import net.minecraft.client.renderer.IRenderTypeBuffer;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.entity.IEntityRenderer;
import net.minecraft.client.renderer.entity.LivingRenderer;
import net.minecraft.client.renderer.entity.layers.LayerRenderer;
import net.minecraft.client.renderer.entity.model.EntityModel;
import net.minecraft.entity.LivingEntity;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;

@OnlyIn(Dist.CLIENT)
public class CoralFinLayer<T extends LivingEntity> extends LayerRenderer<T, CoralModel<T>>
{
    private final EntityModel<T> coralModel = new CoralModel<>(true);
    
    public CoralFinLayer(IEntityRenderer<T, CoralModel<T>> coral)
    {
        super(coral);
    }
    
    public void render(MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn, int packedLightIn, T entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch)
    {
        if (!entitylivingbaseIn.isInvisible())
        {
            this.getEntityModel().copyModelAttributesTo(this.coralModel);
            this.coralModel.setLivingAnimations(entitylivingbaseIn, limbSwing, limbSwingAmount, partialTicks);
            this.coralModel.setRotationAngles(entitylivingbaseIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch);
            IVertexBuilder ivertexbuilder = bufferIn.getBuffer(RenderType.getEntityTranslucent(this.getEntityTexture(entitylivingbaseIn)));
            this.coralModel.render(matrixStackIn, ivertexbuilder, packedLightIn, LivingRenderer.getPackedOverlay(entitylivingbaseIn, 0.0F), 1.0F, 1.0F, 1.0F, 1.0F);
        }
    }
}

The constructor of my Layer-class is the same, as at the slime-Layer-class, i only replaced the slime-model with my own Model-class, where i use a boolean-argument to chose, if it should render the fin or the other parts...

So i wonder, why i cannot add the layer, like in the slime-renderer...

Edited by Drachenbauer
Link to comment
Share on other sites

the only differences i see, is that the SlimeModel extends SegmentedModel and mine extends AgeableModel.

And, that they use an integer in the constructor of the Model-class and i use a boolean.

 

I want to keep it extend AgeableModel, because my one has got a head and a body and i still want to use one list for head-parts and one for body-parts.

 

The model-class:

package drachenbauer32.angrybirdsmod.entities.models;

import com.google.common.collect.ImmutableList;
import net.minecraft.client.renderer.entity.model.AgeableModel;
import net.minecraft.client.renderer.model.ModelRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.util.math.MathHelper;

public class CoralModel<T extends Entity> extends AgeableModel<T>
{
    private final ModelRenderer bone;
    private final ModelRenderer bone2;
    private final ModelRenderer bone3;
    private final ModelRenderer bone4;
    private final ModelRenderer bone5;
    private final ModelRenderer bone6;
    private final ModelRenderer bone7;
    
    public CoralModel(boolean layer)
    {
        textureWidth = 56;
        textureHeight = 32;
        
        bone = new ModelRenderer(this);
        bone.setRotationPoint(0.0F, 18.1F, 0.0F);
        
        bone2 = new ModelRenderer(this);
        bone3 = new ModelRenderer(this);
        bone4 = new ModelRenderer(this);
        bone5 = new ModelRenderer(this);
        bone6 = new ModelRenderer(this);
        bone7 = new ModelRenderer(this);
        
        if (layer)
        {
            bone.addBox("back_fin", 0.0F, -12.0F, 0.0F, 0, 12, 6, 0.0F, 38, 6);
        }
        else
        {
            bone.addBox("head", -4.0F, -8.0F, -4.0F, 8, 8, 8, 0.0F, 0, 0);
            bone.addBox("antenna_part_1", -0.5F, -12.0F, -4.0F, 1, 4, 1, 0.0F, 28, 0);
            bone.addBox("antenna_part_2", -0.5F, -12.0F, -6.0F, 1, 1, 2, 0.0F, 24, 5);
            bone.addBox("antenna_light", -1.0F, -12.0F, -8.0F, 2, 3, 2, 0.0F, 0, 0);
            
            bone2.setRotationPoint(0.0F, 20.1F, 0.0F);
            bone2.addBox("body", -3.0F, -4.0F, -3.0F, 6, 6, 6, 0.0F, 32, 0);
            
            bone3.setRotationPoint(-2.0F, 22.1F, -2.0F);
            bone3.addBox("right_front_leg", -1.0F, 0.0F, -1.0F, 2, 2, 2, 0.0F, 0, 16);
            bone3.addBox("right_front_flipper",  -1.0F, 2.0F, -2.0F, 2, 0, 1, 0.0F, 1, 20);
            
            bone4.setRotationPoint(2.0F, 22.1F, -2.0F);
            bone4.addBox("left_front_leg", -1.0F, 0.0F, -1.0F, 2, 2, 2, 0.0F, 8, 16);
            bone4.addBox("left_front_flipper",  -1.0F, 2.0F, -2.0F, 2, 0, 1, 0.0F, 9, 20);
            
            bone5.setRotationPoint(-2.0F, 22.1F, 2.0F);
            bone5.addBox("right_hind_leg", -1.0F, 0.0F, -1.0F, 2, 2, 2, 0.0F, 16, 16);
            bone5.addBox("right_hind_flipper",  -1.0F, 2.0F, -2.0F, 2, 0, 1, 0.0F, 17, 20);
            
            bone6.setRotationPoint(2.0F, 22.1F, 2.0F);
            bone6.addBox("left_hind_leg", -1.0F, 0.0F, -1.0F, 2, 2, 2, 0.0F, 24, 16);
            bone6.addBox("left_hind_flipper",  -1.0F, 2.0F, -2.0F, 2, 0, 1, 0.0F, 25, 20);
            
            bone7.setRotationPoint(0.0F, 20.1F, 3.0F);
            bone7.addBox("tail_part_1", -2.0F, -2.0F, 0.0F, 4, 4, 4, 0.0F, 0, 24);
            bone7.addBox("tail_part_2", -1.0F, 0.0F, 4.0F, 2, 2, 2, 0.0F, 4, 20);
            bone7.addBox("tail_fin",  0.0F, -1.0F, 6.0f, 0, 4, 2, 0.0F, 16, 26);
        }
    }
    
    @Override
    protected Iterable<ModelRenderer> getHeadParts()
    {
        return ImmutableList.of(bone);
    }
    
    @Override
    protected Iterable<ModelRenderer> getBodyParts()
    {
        return ImmutableList.of(bone2, bone3, bone4, bone5, bone6, bone7);
    }
    
    @Override
    public void setRotationAngles(Entity coral, float limbSwing, float limbSwingAmount, float ageInTicks,
                                  float netHeadYaw, float headPitch)
    {
        //float limbSwingValue = 
        
        bone.rotateAngleX = headPitch * 0.017453292f;
        bone.rotateAngleY = netHeadYaw * 0.017453292f;
        
        bone3.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F + (float)Math.PI) * 3 * limbSwingAmount;
        bone4.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F) * 3 * limbSwingAmount;
        bone5.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F) * 3 * limbSwingAmount;
        bone6.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F + (float)Math.PI) * 3 * limbSwingAmount;
        
        bone7.rotateAngleY = MathHelper.cos(limbSwing * 0.6662F) * 3 * limbSwingAmount;
        bone7.rotateAngleX = ageInTicks;
        
        System.out.println(limbSwing);
        //System.out.println(limbSwingAmount);
    }
}
Edited by Drachenbauer
Link to comment
Share on other sites

I still don´t know, why i cannot add my layer like at the slime

 

I´m pretty sure, everything about ththr Renderrer, Layer and Model-classes is exactly like done at the slime, just different names and different ModelBoxes

And i use a boolean instead of an integer value to choose between the main-part and the layer-part of the model.

 

The model now extends SegmentedModel:

package drachenbauer32.angrybirdsmod.entities.models;

import com.google.common.collect.ImmutableList;
import net.minecraft.client.renderer.entity.model.SegmentedModel;
import net.minecraft.client.renderer.model.ModelRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.util.math.MathHelper;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;

@OnlyIn(Dist.CLIENT)
public class CoralModel<T extends Entity> extends SegmentedModel<T>
{
    private final ModelRenderer bone;
    private final ModelRenderer bone2;
    private final ModelRenderer bone3;
    private final ModelRenderer bone4;
    private final ModelRenderer bone5;
    private final ModelRenderer bone6;
    private final ModelRenderer bone7;
    
    public CoralModel(boolean layer)
    {
        textureWidth = 56;
        textureHeight = 32;
        
        bone = new ModelRenderer(this);
        bone.setRotationPoint(0.0F, 18.1F, 0.0F);
        
        bone2 = new ModelRenderer(this);
        bone3 = new ModelRenderer(this);
        bone4 = new ModelRenderer(this);
        bone5 = new ModelRenderer(this);
        bone6 = new ModelRenderer(this);
        bone7 = new ModelRenderer(this);
        
        if (layer)
        {
            bone.addBox("back_fin", 0.0F, -12.0F, 0.0F, 0, 12, 6, 0.0F, 38, 6);
        }
        else
        {
            bone.addBox("head", -4.0F, -8.0F, -4.0F, 8, 8, 8, 0.0F, 0, 0);
            bone.addBox("antenna_part_1", -0.5F, -12.0F, -4.0F, 1, 4, 1, 0.0F, 28, 0);
            bone.addBox("antenna_part_2", -0.5F, -12.0F, -6.0F, 1, 1, 2, 0.0F, 24, 5);
            bone.addBox("antenna_light", -1.0F, -12.0F, -8.0F, 2, 3, 2, 0.0F, 0, 0);
            
            bone2.setRotationPoint(0.0F, 20.1F, 0.0F);
            bone2.addBox("body", -3.0F, -4.0F, -3.0F, 6, 6, 6, 0.0F, 32, 0);
            
            bone3.setRotationPoint(-2.0F, 22.1F, -2.0F);
            bone3.addBox("right_front_leg", -1.0F, 0.0F, -1.0F, 2, 2, 2, 0.0F, 0, 16);
            bone3.addBox("right_front_flipper",  -1.0F, 2.0F, -2.0F, 2, 0, 1, 0.0F, 1, 20);
            
            bone4.setRotationPoint(2.0F, 22.1F, -2.0F);
            bone4.addBox("left_front_leg", -1.0F, 0.0F, -1.0F, 2, 2, 2, 0.0F, 8, 16);
            bone4.addBox("left_front_flipper",  -1.0F, 2.0F, -2.0F, 2, 0, 1, 0.0F, 9, 20);
            
            bone5.setRotationPoint(-2.0F, 22.1F, 2.0F);
            bone5.addBox("right_hind_leg", -1.0F, 0.0F, -1.0F, 2, 2, 2, 0.0F, 16, 16);
            bone5.addBox("right_hind_flipper",  -1.0F, 2.0F, -2.0F, 2, 0, 1, 0.0F, 17, 20);
            
            bone6.setRotationPoint(2.0F, 22.1F, 2.0F);
            bone6.addBox("left_hind_leg", -1.0F, 0.0F, -1.0F, 2, 2, 2, 0.0F, 24, 16);
            bone6.addBox("left_hind_flipper",  -1.0F, 2.0F, -2.0F, 2, 0, 1, 0.0F, 25, 20);
            
            bone7.setRotationPoint(0.0F, 20.1F, 3.0F);
            bone7.addBox("tail_part_1", -2.0F, -2.0F, 0.0F, 4, 4, 4, 0.0F, 0, 24);
            bone7.addBox("tail_part_2", -1.0F, 0.0F, 4.0F, 2, 2, 2, 0.0F, 4, 20);
            bone7.addBox("tail_fin",  0.0F, -1.0F, 6.0f, 0, 4, 2, 0.0F, 16, 26);
        }
    }
    
    @Override
    public Iterable<ModelRenderer> getParts()
    {
        return ImmutableList.of(bone, bone2, bone3, bone4, bone5, bone6, bone7);
    }
    
    @Override
    public void setRotationAngles(Entity coral, float limbSwing, float limbSwingAmount, float ageInTicks,
                                  float netHeadYaw, float headPitch)
    {
        bone.rotateAngleX = headPitch * 0.017453292f;
        bone.rotateAngleY = netHeadYaw * 0.017453292f;
        
        bone3.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F + (float)Math.PI) * 3 * limbSwingAmount;
        bone4.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F) * 3 * limbSwingAmount;
        bone5.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F) * 3 * limbSwingAmount;
        bone6.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F + (float)Math.PI) * 3 * limbSwingAmount;
        
        bone7.rotateAngleY = MathHelper.cos(limbSwing * 0.6662F) * 3 * limbSwingAmount;
        bone7.rotateAngleX = ageInTicks;
    }
}

But i still cannot add the Layer in the Renderer.

 

The constructor of the Layer-class wants the interface IEntityRenderer as input.

So i wonder, why the SlimeRenderer can put itself in there at adding the Layer...

Edited by Drachenbauer
Link to comment
Share on other sites

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

    • Did you check the getRenderShape method of your block to ensure it's returning the correct enum value?
    • new to messing with modpacks. the server starts and the pack is playable on personal worlds, but every time i try to enter the server, i get "internal exception: io.netty.handler.codec.DecoderException: java.lang.IllegalArgumentException: Payload may not be larger than 1048576 bytes" and it boots me. not sure what this means. the debug log is essentially gibberish to me and i'm not sure... about anything. is it saying that it's sending me too much data? if it helps at all, my mc username is "leucanella", and the disconnect reasons are near the very bottom (at least once was due to mismatched modlists, but i got that fixed i'm pretty sure). i just can't make sense of it myself. https://gist.github.com/idlebird/c5269e80434a501104f6b99ebc16be46
    • We somehow figured out the issue: Whenever we try to eat a food item from the mod "[Let's Do] Candlelight" that can be eaten multiple times using a feeding upgrade from "Sophisticated Backpacks", that's when we crash. Food items include: - Beef Wellington - Bolognese - Chicken Alfredo - Chicken with Vegetables - Cooked Beef - Fricasse with Hash Browns - Lasagna - Lettuce with Steak - Lettuce with Tomatoes, Potatoes and Carrots - Mushroom Soup - Pasta with Bolognese - Pasta with Tomato Sauce - Pork Ribs - Roastbeef with Carrots - Salmon with White Wine Sauce - Tomato Mozzarella Salad - Tomato Soup - Tropical Fish Supreme
    • Me and my sister are playing on a modded minecraft server, but recently she has been crashing at random intervals and no one I've talked with knows why. There's no crash report on my sister's side, but in the log of the server there appears a bunch of lines every time she crashes. They appear to be mostly similar with different mods changing each crash. Minecraft Version: 1.20.1 Forge version: forge-47.2.20 Server log: [07May2024 18:13:29.067] [Server thread/ERROR] [net.minecraftforge.eventbus.EventBus/EVENTBUS]: Exception caught during firing event: null     Index: 12     Listeners:         0: NORMAL         1: ASM: com.github.alexthe666.citadel.server.CitadelEvents@28c884eb onEntityUpdateDebug(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingTickEvent;)V         2: net.minecraftforge.eventbus.EventBus$$Lambda$4374/0x00007f0098c72da0@10f79ae2         3: ASM: com.github.alexthe666.alexsmobs.event.ServerEvents@6f4126f3 onLivingUpdateEvent(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingTickEvent;)V         4: ASM: class tallestegg.illagersweararmor.IWASpawnEvents tickEntity(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingTickEvent;)V         5: ASM: class io.github.lightman314.lightmanscurrency.common.EventHandler entityTick(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingTickEvent;)V         6: ASM: com.github.L_Ender.cataclysm.event.ServerEventHandler@1bbd60d8 onLivingUpdateEvent(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingTickEvent;)V         7: ASM: class io.github.edwinmindcraft.apoli.common.ApoliPowerEventHandler playerTick(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingTickEvent;)V         8: ASM: class io.github.edwinmindcraft.apoli.common.ApoliEventHandler livingTick(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingTickEvent;)V         9: net.minecraftforge.eventbus.EventBus$$Lambda$4374/0x00007f0098c72da0@1e30768c         10: ASM: class net.mcreator.borninchaosv.init.EntityAnimationFactory onEntityTick(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingTickEvent;)V         11: ASM: squeek.appleskin.network.SyncHandler@29e380f7 onLivingTickEvent(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingTickEvent;)V         12: ASM: top.theillusivec4.curios.common.event.CuriosEventHandler@55b4416c tick(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingTickEvent;)V java.lang.ArrayIndexOutOfBoundsException [07May2024 18:13:29.146] [Server thread/WARN] [net.minecraft.server.network.ServerConnectionListener/]: Failed to handle packet for /OMITTED IP net.minecraft.ReportedException: Ticking player     at net.minecraft.server.level.ServerPlayer.m_9240_(ServerPlayer.java:530) ~[server-1.20.1-20230612.114412-srg.jar%23461!/:?]     at net.minecraft.server.network.ServerGamePacketListenerImpl.m_9933_(ServerGamePacketListenerImpl.java:262) ~[server-1.20.1-20230612.114412-srg.jar%23461!/:?]     at net.minecraft.network.Connection.m_129483_(Connection.java:263) ~[server-1.20.1-20230612.114412-srg.jar%23461!/:?]     at net.minecraft.server.network.ServerConnectionListener.m_9721_(ServerConnectionListener.java:142) ~[server-1.20.1-20230612.114412-srg.jar%23461!/:?]     at net.minecraft.server.MinecraftServer.m_5703_(MinecraftServer.java:907) ~[server-1.20.1-20230612.114412-srg.jar%23461!/:?]     at net.minecraft.server.dedicated.DedicatedServer.m_5703_(DedicatedServer.java:283) ~[server-1.20.1-20230612.114412-srg.jar%23461!/:?]     at net.minecraft.server.MinecraftServer.m_5705_(MinecraftServer.java:814) ~[server-1.20.1-20230612.114412-srg.jar%23461!/:?]     at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:661) ~[server-1.20.1-20230612.114412-srg.jar%23461!/:?]     at net.minecraft.server.MinecraftServer.m_206580_(MinecraftServer.java:251) ~[server-1.20.1-20230612.114412-srg.jar%23461!/:?]     at java.lang.Thread.run(Thread.java:833) ~[?:?] Caused by: java.lang.ArrayIndexOutOfBoundsException Mod List: SecurityCraft v1.9.9.jar additional_lights-1.20.1-2.1.7.jar advancements_tracker_1.20.1-6.1.0.jar AI-Improvements-1.20-0.5.2.jar alexsdelight-1.5.jar alexsmobs-1.22.8.jar AmbientSounds_FORGE_v5.3.9_mc1.20.1.jar amendments-1.20-1.1.26.jar appleskin-forge-mc1.20.1-2.5.1.jar Aquaculture-1.20.1-2.5.1.jar aquaculture_delight_1.0.0_forge_1.20.1.jar architectury-9.2.14-forge.jar Arda's Sculks 1.3.2 [FORGE] [1.20.1].jar artifacts-forge-9.5.3.jar async-locator-forge-1.20-1.3.0.jar athena-forge-1.20.1-3.1.2.jar AttributeFix-Forge-1.20.1-21.0.4.jar BadOptimizations-2.1.1.jar badpackets-forge-0.4.3.jar balm-forge-1.20.1-7.2.2.jar beautify-2.0.2.jar BetterAdvancements-1.20.1-0.3.2.162.jar bettercombat-forge-1.8.5+1.20.1.jar BetterF3-7.0.2-Forge-1.20.1.jar betterfarmerscombat-1.2-1.20.1.jar BetterThirdPerson-Forge-1.20-1.9.0.jar BiomesOPlenty-1.20.1-18.0.0.598.jar Bookshelf-Forge-1.20.1-20.1.10.jar born_in_chaos_[Forge]1.20.1_1.2.jar Bountiful-6.0.3+1.20.1-forge.jar caelus-forge-3.2.0+1.20.1.jar camera-forge-1.20.1-1.0.8.jar canary-mc1.20.1-0.3.3.jar chat_heads-0.10.32-forge-1.20.jar Chimes-v2.0.1-1.20.1.jar Chipped-forge-1.20.1-3.0.6.jar chunksending-1.20.1-2.8.jar Chunky-1.3.136.jar citadel-2.5.4-1.20.1.jar cloth-config-11.1.118-forge.jar Clumps-forge-1.20.1-12.0.0.3.jar cluttered-2.1-1.20.1.jar connectedglass-1.1.11-forge-mc1.20.1.jar Controlling-forge-1.20.1-12.0.2.jar corpse-forge-1.20.1-1.0.12.jar cosmeticarmorreworked-1.20.1-v1a.jar CreativeCore_FORGE_v2.11.27_mc1.20.1.jar creeperoverhaul-3.0.2-forge.jar Croptopia-1.20.1-FORGE-3.0.4.jar ctia-1.20.1-forge-2.0.9.jar cupboard-1.20.1-2.6.jar curios-forge-5.9.0+1.20.1.jar CustomPlayerModels-1.20-0.6.16c.jar darktimer-forge-1.20.1-1.0.9.jar dotbe-1.20.1-1.5.5.jar dummmmmmy-1.20-1.8.14.jar DungeonsArise-1.20.x-2.1.58-release.jar DungeonsAriseSevenSeas-1.20.x-1.0.2-forge.jar dye_depot-1.0.0-forge.jar dynamiclights-v1.7.1-mc1.17x-1.20x-mod.jar easy_mob_farm_1.20.1-7.1.0.jar elevatorid-1.20.1-lex-1.9.jar embeddium-0.3.17+mc1.20.1-all.jar embeddiumplus-1.20.1-v1.2.8.jar emotecraft-for-MC1.20.1-2.2.7-b.build.50-forge.jar EnchantmentDescriptions-Forge-1.20.1-17.0.14.jar EnderMail-1.20.1-1.2.9.jar endermanoverhaul-forge-1.20.1-1.0.4.jar endersdelight-1.20.1-1.0.3.jar entityculling-forge-1.6.2-mc1.20.1.jar EpheroLib-1.20.1-FORGE-1.2.0.jar fantasyfurniture-1.20.1-9.0.0.jar FarmersDelight-1.20.1-1.2.4.jar farmersutils-1.0.5-1.20.1.jar Fastload-Reforged-mc1.20.1-3.4.0.jar fastpaintings-1.20-1.2.5.jar ferritecore-6.0.1-forge.jar friendsandfoes-forge-mc1.20.1-2.0.10.jar ftb-essentials-forge-2001.2.2.jar ftb-library-forge-2001.2.1.jar fusion-1.1.1-forge-mc1.20.1.jar geckolib-forge-1.20.1-4.4.4.jar getittogetherdrops-forge-1.20-1.3.jar handcrafted-forge-1.20.1-3.0.6.jar IllagerInvasion-v8.0.5-1.20.1-Forge.jar illagersweararmor-1.20.1-1.3.4.jar ImmediatelyFast-Forge-1.2.13+1.20.4.jar immersive_melodies-0.1.0+1.20.1-forge.jar Incendium_1.20.4_v5.3.4.jar Item_Obliterator-FORGE-MC1.20.1-1.7.0.jar Jade-1.20.1-forge-11.8.0.jar jei-1.20.1-forge-15.3.0.4.jar journeymap-1.20.1-5.9.20-forge.jar Kambrik-6.1.1+1.20.1-forge.jar kotlinforforge-4.10.0-all.jar L_Enders_Cataclysm-1.99.2 -1.20.1.jar LeavesBeGone-v8.0.0-1.20.1-Forge.jar letmedespawn-forge-1.20.x-1.2.0.jar letsdo-addon-compat-forge-v1.4.1.jar letsdo-API-forge-1.2.9-forge.jar letsdo-bakery-forge-1.1.8.jar letsdo-beachparty-forge-1.1.4-1.jar letsdo-brewery-forge-1.1.6.jar letsdo-candlelight-forge-1.2.11.jar letsdo-herbalbrews-forge-1.0.6.jar letsdo-meadow-forge-1.3.8.jar letsdo-nethervinery-forge-1.2.10.jar letsdo-vinery-forge-1.4.15.jar lightmanscurrency-1.20.1-2.2.1.3b.jar lionfishapi-1.8.jar magicvibedecorations-HALLOWEEN 1.5.0 1.20.1 forge.jar make_bubbles_pop-0.2.0-forge-mc1.19.4+.jar memoryleakfix-forge-1.17+-1.1.5.jar MobLassos-v8.0.1-1.20.1-Forge.jar modelfix-1.15.jar moonlight-1.20-2.11.14-forge.jar morediscs-1.20.1-33-forge.jar MouseTweaks-forge-mc1.20-2.25.jar Necronomicon-Forge-1.4.2.jar nether-s-exoticism-1.20.1-1.2.7.jar nethersdelight-1.20.1-4.0.jar nomowanderer-1.20.1_1.6.4.jar oculus-mc1.20.1-1.7.0.jar origins-forge-1.20.1-1.10.0.7-all.jar origins-plus-plus-2.2-forge.jar Paraglider-forge-20.1.3.jar Patchouli-1.20.1-84-FORGE.jar Paxi-1.20-Forge-4.0.jar Pehkui-3.8.0+1.20.1-forge.jar player-animation-lib-forge-1.0.2-rc1+1.20.jar PlayerRevive_FORGE_v2.0.24_mc1.20.1.jar plushies-1.4.0-forge.jar polymorph-forge-0.49.3+1.20.1.jar projectvibrantjourneys-1.20.1-6.0.0.jar PuzzlesLib-v8.1.18-1.20.1-Forge.jar resourcefulconfig-forge-1.20.1-2.1.2.jar resourcefullib-forge-1.20.1-2.1.24.jar right-click-harvest-3.2.3+1.20.1-forge.jar rubidium-extra-0.5.4.3+mc1.20.1-build.121.jar Runelic-Forge-1.20.1-18.0.2.jar saturn-mc1.20.1-0.1.3.jar sawmill-1.20-1.3.13.jar scholar-1.20.1-1.0.0-forge.jar screenshot_viewer-1.2.1-forge-mc1.20.1.jar Searchables-forge-1.20.1-1.0.2.jar selfexpression-2.8 1.20.1.jar servercore-forge-1.5.1+1.20.1.jar ShulkerArmory_1.20.1_1.2.1_hotfix.jar simplehats-forge-1.20.1-0.2.4.jar simplevoicechat_broadcast-mc1.20.1-1.0.1.jar simplyswords-forge-1.55.0-1.20.1.jar smoothboot(reloaded)-mc1.20.1-0.0.4.jar Sniffer+-forge-1.20.1-0.3.0.jar sophisticatedbackpacks-1.20.1-3.20.5.1044.jar sophisticatedcore-1.20.1-0.6.21.609.jar sophisticatedstorage-1.20.1-0.10.21.793.jar spark-1.10.53-forge.jar stalwart-dungeons-1.20.1-1.2.8.jar starlight-1.1.2+forge.1cda73c.jar step-1.20.1-1.2.2.jar supermartijn642corelib-1.1.17-forge-mc1.20.1.jar supplementaries-1.20-2.8.10.jar temporalapi-1.5.0.jar TerraBlender-forge-1.20.1-3.0.1.4.jar Terralith_1.20.4_v2.4.11.jar toms_storage-1.20-1.6.6.jar torchmaster-20.1.6.jar trashslot-forge-1.20-15.1.0.jar treasuredistance-1.20-1.2.jar tru.e-ending-v1.1.0c.jar v_slab_compat-1.20-2.3.jar vintagedelight-0.0.12.jar vmp-fabric-mc1.20.1-0.2.0+beta.7.101-all.jar voicechat-forge-1.20.1-2.5.11.jar waystones-forge-1.20-14.1.3.jar WI-Zoom-1.5-MC1.20.1-Forge.jar worldedit-mod-7.2.15.jar wsopulence1.2.0_Forge_MC1.20.1-1.20.4.jar xlpackets-1.18.2-2.1.jar YungsApi-1.20-Forge-4.0.4.jar YungsBetterEndIsland-1.20-Forge-2.0.6.jar YungsBetterNetherFortresses-1.20-Forge-2.0.6.jar YungsBetterOceanMonuments-1.20-Forge-3.0.4.jar YungsBetterStrongholds-1.20-Forge-4.0.3.jar
    • Like the title i wanted to render a obj model into minecraft but i cant find any tutorials for this.
  • Topics

×
×
  • Create New...

Important Information

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