TheGreyGhost
Members-
Posts
3280 -
Joined
-
Last visited
-
Days Won
8
Everything posted by TheGreyGhost
-
Hi The crash is happening on the server, but EntityFX are client-side only. Probably something to do with onItemUse accessing the client side minecraft from the server. onItemUse is called on both client and server You need to use if (world.isRemote) { spawn here } -TGG
-
Hi Some info about lighting here http://greyminecraftcoder.blogspot.com.au/2013/08/lighting.html -TGG
-
EDIT/UPDATE1: How to edit vanilla snow slab?
TheGreyGhost replied to sarydactl's topic in Modder Support
Hi I think you have four choices 1) use ASM + Reflection to modify the BlockSnow base class (tricky) 2) add your own snow generation to the world tick, placing your own BlockSnow instead of vanilla. see WorldServer.func_147456_g() this.theProfiler.endStartSection("iceandsnow"); 3) add your own snow destruction code to the world tick (each tick, check a few blocks at the 'precipitation height' to see if they are snow), and melt them if they are. 4) use your own WorldProvider and override eg canSnowAt() with something that changes depending on whether you want snow to form or to melt. I would personally try (4) first. It looks like the most straightforward to me. -TGG -
Is there a way to get the ForgeDirection a Vec3 is pointing?
TheGreyGhost replied to AskHow1248's topic in Modder Support
Hi Keen, that will work too. Both of our methods give the same answer. Yours is better if you want to know the exact yaw & pitch, although it has a small bug in it - what happens if vec.xCoord and vec.zCoord are both zero? -TGG -
[1.7.2] Laggy generation and two forge questions
TheGreyGhost replied to PlatonCraft's topic in Modder Support
Hi http://www.minecraftforge.net/forum/index.php/topic,20076.0.html -TGG -
[Solved][1.7.2]How do I detect when a player joins a world?
TheGreyGhost replied to squirlemaster's topic in Modder Support
Hi You could try the PlayerChangedDimensionEvent and the PlayerRespawnEvent. Do you know how to use events? http://www.minecraftforum.net/topic/1419836-forge-4x-events-howto/ -TGG -
[1.7.2] Textures not loading after compiling
TheGreyGhost replied to samhalo007's topic in Modder Support
Strange. beats me. What does the error log say? -TGG -
[1.7] Help registering textures/item names
TheGreyGhost replied to kenny2810's topic in Modder Support
Hi Show the error log? Item initialisation should be in preInit. The recipes should be in load. PreInitialization - "Run before anything else. Read your config, create blocks, items, etc, and register them with the GameRegistry." Initialization - "Do your mod setup. Build whatever data structures you care about. Register recipes." PostInitialization - "Handle interaction with other mods, complete your setup based on this." The name is because you haven't added language localisation. I don't think you should be forcing the ItemIDs like that either. Is this based on an old tutorial perhaps? Smells a lot like 1.6.4 to me. Time to look for a 1.7.2 tutorial, like this one perhaps http://www.minecraftforum.net/topic/2389683-172-forge-add-new-block-item-entity-ai-creative-tab-language-localization-block-textures-side-textures/ -TGG -
Well, I have followed everything in this tutorial, but I cannot figure out how to implement it in the Entity code. If I make it protected String getLivingSound() { return return SoundHandler.onEntityPlay("mob.penguin.say", event.player.worldObj, event.player, 1, 1); } it just gives me an error return return Dude, seriously?! :-P
-
[1.7] Help registering textures/item names
TheGreyGhost replied to kenny2810's topic in Modder Support
Hi What difficulties are you having exactly? Kind of hard to help unless you describe the symptoms you're seeing -TGG -
[1.7.2] Laggy generation and two forge questions
TheGreyGhost replied to PlatonCraft's topic in Modder Support
Hi I don't know the answer about the generation question. But this link will probably help about proxies and why you might want to use them. http://greyminecraftcoder.blogspot.com/2013/11/how-forge-starts-up-your-code.html -TGG -
That error is caused when Java can find your class at compile time but not at runtime, so your classpath has a problem, I'm guessing that perhaps your mod folder structure is not right, so Forge is only finding some of your mod source, not all of it. Your mod file should look something like this structure http://greyminecraftcoder.blogspot.com.au/2013/12/overview-of-forge-and-what-it-can-do.html > at net.Hoganscraft.mod.proxy.ClientProxy.registerRenderThings(ClientProxy.java:41) > at com.hogans.craft.HogansCraft.preInit(HogansCraft.java:744) And dude that package naming convention is just begging for subtle bugs hogans.craft Hoganscraft HogansCraft class just for good measure:) package names should be lower case to avoid confusing the other folks out there (And - to avoid subtle bugs due to Windows not being case sensitive, but zip files are - perhaps this is your problem here too?) -TGG
-
oops http://greyminecraftcoder.blogspot.com/2013/11/how-forge-starts-up-your-code.html
-
Hi You might find this link useful to get started on Blocks, Items etc. http://greyminecraftcoder.blogspot.com.au/p/list-of-topics.html especially http://greyminecraftcoder.blogspot.com.au/2013/10/the-most-important-minecraft-classes_9.html Looking at the vanilla code for BlockTorch would be a good place to start. Also RenderBlocks.renderBlockTorch() -TGG
-
Hi Have a look at this link for some guidance on how to use preInit etc properly. Putting the code in the Mod's constructor won't work. (The link is for 1.6.4 but is almost identical for 1.7.2 and the concepts are the same). -TGG
-
hi pls post your crash log too? -TGG
-
[1.7.2] Textures not loading after compiling
TheGreyGhost replied to samhalo007's topic in Modder Support
Works fine for me, no error messages and the textures look like dark grey vanilla so I think it's fine. -TGG -
[1.7.2] Textures not loading after compiling
TheGreyGhost replied to samhalo007's topic in Modder Support
Hi Yes that sounds right. If the textures work fine during a normal compile, then probably either the files are in the wrong spot or your upper/lower case don't match. I haven't used gradlew build yet so I can't be sure; when I previously published a mod, it was in a zip with the following structure http://greyminecraftcoder.blogspot.com.au/2013/12/overview-of-forge-and-what-it-can-do.html You can use the troubleshooting information in that link to discover the actual directory / file path where forge is looking, which can give valuable clue. -TGG -
[1.7.2] Textures not loading after compiling
TheGreyGhost replied to samhalo007's topic in Modder Support
Hi. This link might help. http://www.minecraftforge.net/forum/index.php/topic,18371.msg92948.html#msg92948 -TGG -
Is there a way to get the ForgeDirection a Vec3 is pointing?
TheGreyGhost replied to AskHow1248's topic in Modder Support
Hi I don't know of a vanilla function for this but it is easy enough to do yourself. Find which of the three components [x, y, z] have the largest absolute magnitude. The vector is pointing mostly in that direction. eg [0.5, -0.6, 0.9] is pointing mostly in the positive z direction [0, -0.7, 0.3] is pointing mostly in the negative y direction -TGG -
Hi Did you try my suggestion > It builds up the NBT tag depending on the recipe and then attaches it to the Item using .setTagCompound(nbttagcompound); If so, please show your code. The bits in vanilla which do it are here this.fireworkCraftingResult = new ItemStack(Item.firework); nbttagcompound = new NBTTagCompound(); if (l > 0) { nbttagcompound1 = new NBTTagCompound("Fireworks"); NBTTagList nbttaglist = new NBTTagList("Explosions"); for (int l1 = 0; l1 < par1InventoryCrafting.getSizeInventory(); ++l1) { ItemStack itemstack1 = par1InventoryCrafting.getStackInSlot(l1); if (itemstack1 != null && itemstack1.itemID == Item.fireworkCharge.itemID && itemstack1.hasTagCompound() && itemstack1.getTagCompound().hasKey("Explosion")) { nbttaglist.appendTag(itemstack1.getTagCompound().getCompoundTag("Explosion")); } } nbttagcompound1.setTag("Explosions", nbttaglist); nbttagcompound1.setByte("Flight", (byte)j); nbttagcompound.setTag("Fireworks", nbttagcompound1); } this.fireworkCraftingResult.setTagCompound(nbttagcompound); return true; If you don't understand how to use NBT, try tracing through the RecipeFireworks to watch how it builds up the NBT and assigns it to the itemstack. -TGG
-
[1.7] Render custom block as item in inventory
TheGreyGhost replied to Jhary's topic in Modder Support
Hi. If your textures are invalid, look in your error log. This link might help. http://www.minecraftforge.net/forum/index.php/topic,18371.msg92948.html#msg92948 -TGG -
[1.6.4] Rendering Item On Block OpenGL Help
TheGreyGhost replied to Xcox123's topic in Modder Support
Hi This is from vanilla /** * Renders the specified entity with the passed in position, yaw, and partialTickTime. Args: entity, x, y, z, yaw, * partialTickTime */ public void renderEntityWithPosYaw(Entity par1Entity, double par2, double par4, double par6, float par8, float par9) It is asking for the x,y,z position, not the motion which is a speed. You need to provide the appropriate x,y,z position and the yaw angle. Don't bother with the hoverStart, motionX etc, they won't do anything since you're not calling the onUpdate of the entity. You rotate it by changing the value of the yaw angle. You don't need renderInFrame either. Some more information here on dropped item rendering FYI. http://greyminecraftcoder.blogspot.com.au/2013/08/rendering-dropped-items.html Alternatively, you could just render it the same way as you already did orginally, just use GL11.glRotatef(rotationAngle, 0, 1, 0); before your call, that will rotate it around the y axis by the angle you specify. -TGG -
Hi There is an easy way to do this, it is called back face culling. If you turn culling off, the game will render both sides of each face. If you turn back face culling on, you will only see one of them. GL11.glCullFace(GL11.GL_BACK); GL11.glEnable(GL11.GL_CULL_FACE); or GL11.glDisable(GL11.GL_CULL_FACE); This guide to openGL is pretty good and has more details. http://www.glprogramming.com/red/ This link talks a bit about the tessellator and the "sides" of faces if you turn back face culling on. http://greyminecraftcoder.blogspot.com.au/2013/08/the-tessellator.html -TGG
-
[1.6.4] Rendering Item On Block OpenGL Help
TheGreyGhost replied to Xcox123's topic in Modder Support
Hi This link is great for OpenGL http://www.glprogramming.com/red/ The renderTileEntityChestAt() provides you with the dx, dy, and dz parameters, these are the position of the tileentity relative to the player's eye, you need to use them when you render. If you're currently rendering at the [0,0,0], then using GL11.glPushMatrix(); GL11.glTranslatef((float)dx, (float)dy, (float)dz); .. render here GL11.glPopMatrix(); should put your render at the right location. (I'm going from memory here, so if that's not right, try System.out.println() on the method parameters to see what they are / how they change when you move relative to your TileEntity.) -TGG