TheGreyGhost
Members-
Posts
3280 -
Joined
-
Last visited
-
Days Won
8
Everything posted by TheGreyGhost
-
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
-
[1.7.2]Block Rendering In World Issues[Solved]
TheGreyGhost replied to grim3212's topic in Modder Support
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 -
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
-
[1.7.2] Render Custom Block Model as Item
TheGreyGhost replied to MasterVentris's topic in Modder Support
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 -
Hi It helps to answer your question if you post your code for us to look at :-) -TGG
-
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
-
[1.7.2]Block Rendering In World Issues[Solved]
TheGreyGhost replied to grim3212's topic in Modder Support
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 -
Making A Mod To Decrease Time Between Music
TheGreyGhost replied to starwarsmace's topic in Modder Support
Hi It looks like you can probably overwrite MUSIC_INTERVAL in SoundManager to shorten the interval between songs. Minecraft.getMinecraft().sndManager.MUSIC_INTERVAL -TGG -
Hi It appears that your rendering code is running on the server thread. You need to check for the correct side in PlayerTickEvent. -TGG
-
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
-
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
-
no worries, glad it was an easy fix :-) -TGG
-
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
-
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
-
[1.7.2] Render Custom Block Model as Item
TheGreyGhost replied to MasterVentris's topic in Modder Support
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 -
[1.7.2] add information(tool tip) to vanilla items?
TheGreyGhost replied to PeterRDevries's topic in Modder Support
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 -
Hi Yes if you use KeyBindingRegistry you can add KeyBindings that will show up on the controls customisation screen. -TGG
-
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
-
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
-
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
-
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
-
Hi You might find this link useful. http://greyminecraftcoder.blogspot.com.au/p/list-of-topics.html See the sections on "Item Rendering" -TGG
-
[1.7.2] NullPointerException: Rendering item
TheGreyGhost replied to virhonestum's topic in Modder Support
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