Jump to content

Random Render Brightness and Entities float away! Help! (Please :) )


Recommended Posts

Posted

Hey guys,

I've been moving my mod from Risugami's modloader to forge. It's all been going great, and I'm beginning to love forge.

 

However I have a few bugs I can't seem to squish, I looked around, but couldn't find anything to fix them, I'm sure there are ways, so I'll ask here.

 

For one of my blocks, I have a custom TileEntity renderer, and in that I render the whole block just using the Tessellator class. It looks fine, however if you look at the block at certain angles, it goes really dark. I've tried everything to do with brightness and colour, but I just can't seem to fix it.

So does anyone know how to make sure the block stays a constant brightness. My code is here:

 

  Reveal hidden contents

 

I know my code is far from perfect. I probably should use a Model, however then I'd need to map out a texture file and stuff, and this works fine (kinda), so I'll just do it this way.

 

 

Anyway, the second one:

In my mod I have an entity called a 'clone' or a 'myperson'. However for some random reason, whenever you open up the world, or spawn the clone, they float away(well, walk, but it's not normal, they walk in a perfect straight line, and slowly slow down), and then once they move far enough away, they suddenly teleport back to their starting position (after about 4 seconds)

I've registered my entity like so:

		RenderingRegistry.registerEntityRenderingHandler(net.minecraft.mypeople.EntityMyPerson.class, new RenderMyPerson());

	EntityRegistry.registerGlobalEntityID(net.minecraft.mypeople.EntityMyPerson.class, "MyPerson", cloneID, 0x00afaf, 0x463aa5);

	EntityRegistry.registerModEntity(net.minecraft.mypeople.EntityMyPerson.class, "MyPerson", cloneID, this, 80, 3, false);

 

 

 

Have I missed anything I have to do? I kinda just guessed on how to get this working...

So yeah, any help is greatly appreciated. If I've left anything out, just ask and I'll tell.

 

Oh, and the floating away, is only happening on the client. I checked the motionX and motionZ for both the client and server, and the values only changed on the client..

 

Thankyou! :)

Posted

First issue is minecrafts.... unique... lighting system at work. Not much you can do, you can seel some of its charcteristics when you rotate an item in a frame .

The second issue needs some entity code posted.

  Quote
I think its my java of the variables.

Posted

What kind of entity code? My EntityMyPerson.class file is 1600 lines long.

It pretty much just extends the 'EntityLiving' class, has a few EntityAI tasks. But I really doubt that the issue is in my code. It worked perfectly fine with Risugami's modloader, and even when the mod was loaded with the forge Modloader instead of Risugami's, it worked fine. But now since I've used Forge's mod system, it's started doing this. And also, if it was my code, shouldn't it be happening on both the client side and the server? For it to only occur on the client, means that there is something funky going on with the spawning packets. Do I have to do anything for them?

 

And the brightness. If I render a block using the RenderBlocks class, the brightness is fine, but doing it straight through the tessellator gives me this bug, so I assume I'm just missing some code which sets the brightness. At the moment I've just disabled brightness when rendering my block...

 

 

Edit:

On second thoughts, maybe it is my code. Just made a test entity, and when I spawned it, it was perfectly fine...

 

Hmmm

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.