Everything posted by TheGreyGhost
-
[1.7.2] Adding data to a world save?
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]
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
-
Player Rendering Oddity
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
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
-
[1.6.2]Clear cube-shaped area in world
Hi It helps to answer your question if you post your code for us to look at :-) -TGG
-
[1.6.4]NOT EQUIPPED 3D item render.
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]
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
Hi It looks like you can probably overwrite MUSIC_INTERVAL in SoundManager to shorten the interval between songs. Minecraft.getMinecraft().sndManager.MUSIC_INTERVAL -TGG
-
[1.7.2]GL11 Rendering Crash
Hi It appears that your rendering code is running on the server thread. You need to check for the correct side in PlayerTickEvent. -TGG
-
[1.6.4]NOT EQUIPPED 3D item render.
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
-
How should i go about this?
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
-
Configuring custom key in controls tab?
no worries, glad it was an easy fix :-) -TGG
-
[1.7.2] Texture in exported mod
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
-
[1.7.2] - [Solved] Lightning always spawning underneath the player
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
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?
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
-
Configuring custom key in controls tab?
Hi Yes if you use KeyBindingRegistry you can add KeyBindings that will show up on the controls customisation screen. -TGG
-
Rendering a 3D item as a throwable item
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
-
[1.7.2] Texture in exported mod
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
-
[1.6.4]Disable vanilla 1-9 keyboard clicking when custom container is opened
Hi sorry, unfortunately I've never done any code around containers so I can't really help with that one... -TGG
-
[1.6.4]Disable vanilla 1-9 keyboard clicking when custom container is opened
Hi This link might give you some help on where to start looking. http://greyminecraftcoder.blogspot.com.au/2013/10/user-input.html -TGG
-
[1.6.4] Void fog
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
-
Rendering a 3D item as a throwable item
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
-
Rendering a 3D item as a throwable item
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
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
IPS spam blocked by CleanTalk.