Jump to content

Recommended Posts

Posted

Hi.

 

I am having a rendering issue with a custom painting. I simply extended all the painting classes as vanilla as possible, just changing the texture image to use (and of course to point to my classes). However, the image always renders a half block higher than it should. If I make the wall higher, then it will climb, full blocks higher. Has anyone encountered this before? ( I found one thread for an older version, but it didn't really help me).

 

Thanks,

 

gottsch

 

MyItemHangingEntity:

 

  Reveal hidden contents

 

 

MyEntityPainting:

 

  Reveal hidden contents

 

 

MyRenderPainting: (exact coopy of RenderPainting except changing the texture)

 

  Reveal hidden contents

 

 

In MyMod:

 

  Reveal hidden contents

 

 

In ClientProxy:

 

  Reveal hidden contents

 

 

Image:

width=800 height=428https://dl.dropboxusercontent.com/u/67605173/2014-11-01_20.30.44.png[/img]

Posted

this.func_77010_a(p_76986_1_, 16, 16, 0, 0);

 

This line is not the same, try using the original maybe?

 

this.func_77010_a(p_76986_1_, enumart.sizeX, enumart.sizeY, enumart.offsetX, enumart.offsetY);

Posted

Thanks, but that line is referring to the dimensions and offset of the image to display on the painting.  The enumart is referring to a property of EntityPainting:

 

    public static enum EnumArt
    {
        Kebab("Kebab", 16, 16, 0, 0),
...

So I just used the values to always use the first image.

Posted
  Quote
Firstly, u should rename your params, it will make everything a lot easier.

Yes, I typically do.  I just threw this "basic" set of classes together to get it to work, as the actual version in my mod does the same thing.

 

  Quote
And secondly, when u hover over the painting is the hitbox around the painting or is the hitbox half a block down? (Like the stone)

Good question.  I don't see the hitbox (black wireframe) even highlight when I hover over the painting.  The block's behind the painting will show their hitbox as if the painting wasn't there.

Posted

In your item, try changing:

EntityHanging entityhanging = this.createHangingEntity(p_77648_3_, p_77648_4_, p_77648_5_, p_77648_6_, i1);

to

EntityHanging entityhanging = this.createHangingEntity(p_77648_3_, p_77648_4_, p_77648_5_ + 0.5, p_77648_6_, i1);

You Only Live Once, So Win At Golf.

Sorry for my English, I'm American.

Posted
  On 11/2/2014 at 10:06 PM, gottsch said:

  Quote
Firstly, u should rename your params, it will make everything a lot easier.

Yes, I typically do.  I just threw this "basic" set of classes together to get it to work, as the actual version in my mod does the same thing.

 

  Quote
And secondly, when u hover over the painting is the hitbox around the painting or is the hitbox half a block down? (Like the stone)

Good question.  I don't see the hitbox (black wireframe) even highlight when I hover over the painting.  The block's behind the painting will show their hitbox as if the painting wasn't there.

Sorry that was my mistake, pretty sure entities don't have hit boxes

Posted
  Quote
In your item, try changing:

EntityHanging entityhanging = this.createHangingEntity(p_77648_3_, p_77648_4_, p_77648_5_, p_77648_6_, i1);

to

EntityHanging entityhanging = this.createHangingEntity(p_77648_3_, p_77648_4_, p_77648_5_ + 0.5, p_77648_6_, i1);

Thanks, but these params are ints, so this value will just get truncated back to the whole int value.  But for good measure, I attempted with +/-1.  The outcome was the same (just a full block in a different direction).

 

Just to make clear, the painting initially renders in the correct place, but then almost immediately shifts upwards.  If I add more block to make a higher wall, it will shift even higher depending on the way I look at it.

  • 7 months later...

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.