Jump to content

TheGreyGhost

Members
  • Posts

    3280
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by TheGreyGhost

  1. Hi I would have said you need something like this In your postInit: MinecraftForge.EVENT_BUS.register(new ChunkDataEventHandler()); and a separate class: public class ChunkDataEventHandler { @SubscribeEvent public void loading(ChunkDataEvent.Load event) { // read your stuff out of the event.data NBT and put into event.getChunk() return; } @SubscribeEvent public void saving(ChunkDataEvent.Save event) { // read your stuff out of the event.getChunk() and put into event.data NBT return; } } The two things I'd suggest are using .Load and .Save, and creating a handler dedicated to this (i.e. like ChunkDataEventHandler above) which doesn't have any other methods in it. Once that works it's probably safe to add stuff back in. -TGG
  2. Hi strange stuff. Pure guesses here: have you overridden Block.isOpaqueCube to return false? are you doing something strange with Block.shouldSideBeRendered? Have you tried changing the top, middle, and bottom textures to something different for each one? perhaps what you think is the bottom block is actually the top block Apart from that, I'm stuck, sorry! -TGG
  3. Hi My guess is: (1) RenderPlayerEvent is called for all players being rendered on a client, not just the user. (that's just a guess, I haven't checked it) (2) Your rendering routine uses the coordinates of the user for some reason, instead of the (non-user)player being rendered. Adding System.out.println to your addReikaModel should show this pretty quickly if it's really the reason. -TGG
  4. Hi A question - did you inspect customItemRenderers at your breakpoint to see whether your custom Item was in there? -> if the customItemRenderers doesn't have any Germinator at all, there's something wrong with the registration -> if the customItemRenderer has a Germinator but it's not the same object as the Item you're passing in (check the object address / ID) then you've registered something but it's not the right one. I think hashCode and equals are not overridden for Items so the map will only match if the references are to the same object. -TGG
  5. Hi It helps to answer your question if you post your code for us to look at :-) -TGG
  6. Hi Yes it's possible, although it's not easy. Look in RenderPlayer.renderSpecials for some more inspiration. You can hook into it using RenderPlayerEvent.Specials.Post http://greyminecraftcoder.blogspot.com.au/2013/12/forge-techniques-events.html and http://www.minecraftforum.net/topic/1419836-forge-4x-events-howto/ First person view shouldn't be too hard. Making it look right in third person view is going to be tricky, since you'll need to change the way that the left arm is drawn. -TGG
  7. Hi Do the parts render properly individually? eg public static boolean renderBottom(Block var0, int var1, int var2, int var3, RenderBlocks var4) { // var4.overrideBlockTexture = texture; // var0.setBlockBounds(0.2F, 0.0F, 0.2F, 0.8F, 0.1F, 0.8F); // var4.renderStandardBlock(var0, var1, var2, var3); var4.overrideBlockTexture = texture; var0.setBlockBounds(0.375F, 0.0F, 0.375F, 0.625F, 1.0F, 0.625F); var4.renderStandardBlock(var0, var1, var2, var3); var4.overrideBlockTexture = null; return true; } vs public static boolean renderBottom(Block var0, int var1, int var2, int var3, RenderBlocks var4) { var4.overrideBlockTexture = texture; var0.setBlockBounds(0.2F, 0.0F, 0.2F, 0.8F, 0.1F, 0.8F); var4.renderStandardBlock(var0, var1, var2, var3); // var4.overrideBlockTexture = texture; // var0.setBlockBounds(0.375F, 0.0F, 0.375F, 0.625F, 1.0F, 0.625F); // var4.renderStandardBlock(var0, var1, var2, var3); var4.overrideBlockTexture = null; return true; } -TGG
  8. Hi It looks like you can probably overwrite MUSIC_INTERVAL in SoundManager to shorten the interval between songs. Minecraft.getMinecraft().sndManager.MUSIC_INTERVAL -TGG
  9. Hi It appears that your rendering code is running on the server thread. You need to check for the correct side in PlayerTickEvent. -TGG
  10. Hi What do mean "when I'm not holding it" You mean - like a sword in your right hand and a shield in your left hand? -TGG
  11. Hi Try these links http://greyminecraftcoder.blogspot.com.au/2013/12/forge-techniques-events.html and http://www.minecraftforum.net/topic/1419836-forge-4x-events-howto/ -TGG
  12. no worries, glad it was an easy fix :-) -TGG
  13. Hi That's quite strange. Personally I don't see anything wrong. I gather the texture that does work is nividium_block.png, say for a class called NividiumBlock? If so, you could perhaps try setting your NividiumBlock texture to use nividium.png, and set your NividiumOre texture to use nividium_block.png. If the problem moves with the filename, that is a useful clue. If it stays with the class, that is also a useful clue. -TGG
  14. Hi I have a vague memory that the player position on the server is not the same as on the client - the client player position is the player's eyes, but the server player position is the player's feet. This should be easy to check in your code - just print the Vec3 vec3 = player.getPosition(par3); eg public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) { Vec3 vec3 = player.getPosition(1); System.out.println((world.isRemote ? "client y=" : "server y =") + vec3.yCoord); if (world.isRemote) { return itemStack; } -TGG
  15. Hi If that is the problem, I'd suggest you add a breakpoint to the vanilla code for when it tries to find the renderer MinecraftForgeClient:: public static IItemRenderer getItemRenderer(ItemStack item, ItemRenderType type) { IItemRenderer renderer = customItemRenderers.get(item.getItem()); if (renderer != null && renderer.handleRenderType(item, type)) { return renderer; } return null; } If you compare item with the customItemRenderers it should hopefully be clear what's going on. -TGG
  16. Hi see here http://greyminecraftcoder.blogspot.com.au/2013/12/forge-techniques-events.html and here http://www.minecraftforum.net/topic/1419836-131-forge-4x-events-howto/ -TGG
  17. Hi Yes if you use KeyBindingRegistry you can add KeyBindings that will show up on the controls customisation screen. -TGG
  18. Hi Is there a reason you're using Minecraft 1.5? If you upgrade to 1.6.4 or 1.7.2 and post your code as a zip or on GitHub, we could try it debugging it ourselves if you like. -TGG
  19. Hi Could you pls post- the console "texture missing" error message your code for registering the block texture a screenshot of the zip file folder structure containing your textures -TGG
  20. Hi sorry, unfortunately I've never done any code around containers so I can't really help with that one... -TGG
  21. Hi This link might give you some help on where to start looking. http://greyminecraftcoder.blogspot.com.au/2013/10/user-input.html -TGG
  22. Hi What do you mean void fog rendering exactly? Do you mean the small grey floaty things that appear when you're near (or in) the void? Could you post a screenshot? -TGG
  23. Hi What are the symptoms exactly? Is it invisible, or is it not there at all? eg if you throw it, can you walk over to where it should be and then pick it up? If it invisible, have you tried putting a breakpoint or System.out.println in your render method to see if it is called? -TGG
  24. Hi You might find this link useful. http://greyminecraftcoder.blogspot.com.au/p/list-of-topics.html See the sections on "Item Rendering" -TGG
  25. ItemStack.java:266 return getItem().getDamage(this); I'm guessing your ItemStack has somehow been initialised with a null Item. I suspect the ItemStack you have specified as the output of the crafting recipe is not properly initialised. -TGG
×
×
  • Create New...

Important Information

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