
deadrecon98
Forge Modder-
Posts
316 -
Joined
Everything posted by deadrecon98
-
I see what you were talking about, I updated the post above. Apparently you had text highlighted but github's highlighter is very light and hard to see on my monitor.
-
I see what you mean for the Keyboard but that is something else completely. Just ignore that. And what do you mean when you say needsEssence will never be true? It is set to true if the object has a tag. And yes, the tag compound can be null.
-
Whoops, sorry about that. I am working on two completely different mods right now and it is confusing me a bit. As for what I am trying to do, whenever you craft the (MagicItem) it will look at the item that you are holding. If it is an instance of ItemGlove then damage it otherwise kill the player. For some reason however, whenever the item is "destroyed" the client doesn't get the information and just resets the damage to 0.
-
Bump.
-
[UNSOLVED 1.7.10] Trees not spawning much
deadrecon98 replied to BottleFact's topic in Modder Support
Why don't you just change the spawn-per-biome number? -
[1.7.10] Drawing Player in Front View on GUI
deadrecon98 replied to DemRat's topic in Modder Support
I tried to avoid that because I don't udnerstand what exactly is happening and therefore can only modify it with trial and error. I'm now using the version of that code used in the inventory until something other comes up, but the arms move and the Item the Player is holding is drawn too. Any Idea how I can prevent that? That IS the code that was used in the inventory. And you can't make the arms not move because you are directly calling upon the player's render. In order for that to work the way you want, you would have to create a new model and not bind it to an entity in order for that to work. -
I thought that @Override specified that you were overriding a parent method. Otherwise it would just be a regular method called only if you did it manually.
-
Oh this is for an entity. The only way around that is to actually change the volume of the sound. Open it up in Audacity or something and modify it from there.
-
[1.7.10] Drawing Player in Front View on GUI
deadrecon98 replied to DemRat's topic in Modder Support
If you are actually drying the draw the player itself onto the screen then try this. This is some OLD code (1.5.2) so it very well may not work. public static int rotate = 0; public static void drawPlayerOnGui(Minecraft mc, int par1, int par2, int par3, float par4, float par5) { rotate ++; if(rotate >= 360){ rotate = 0; } GL11.glEnable(GL11.GL_COLOR_MATERIAL); GL11.glPushMatrix(); GL11.glTranslatef((float)35, (float)120, 50.0F); GL11.glScalef((float)(-30), (float)30, (float)30); GL11.glRotatef(135.0F, 0.0F, 1.0F, 0.0F); RenderHelper.enableStandardItemLighting(); GL11.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F); GL11.glRotatef(-((float)Math.atan((double)(par5 / 40.0F))) * 20.0F, 1.0F, 0.0F, 0.0F); GL11.glTranslatef(0.0F, mc.thePlayer.yOffset, 0.0F); RenderManager.instance.playerViewY = 180.0F; GL11.glPushMatrix(); GL11.glRotatef(180, 0, 0, 1); GL11.glRotatef(rotate, 0, 1, 0); RenderManager.instance.renderEntityWithPosYaw(mc.thePlayer, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F); GL11.glPopMatrix(); GL11.glPopMatrix(); RenderHelper.disableStandardItemLighting(); GL11.glDisable(GL12.GL_RESCALE_NORMAL); OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit); GL11.glDisable(GL11.GL_TEXTURE_2D); OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit); } -
1.Every function you are overriding (right click, etc) must have @Override above it in order for it to be called. 2.Have you looked the code for ItemBow?
-
Fences dont register when testing with world.isRemote
deadrecon98 replied to Tschallacka's topic in Modder Support
You are absolutely right, the bracket was farther right than I am used to looking. Shouldn't that method only be run server-side though? I would think that telling both the client and server to remove it would cause issues. Ok, what exactly are you trying to do? This world.setBlockToAir(x, y, z); can NEVER be run on the client! He never ran it on the client. He ran it on both sides. -
world.playSoundAtEntity(entity, sound, volume, pitch); Seriously, read the JavaDocs.
-
Yeah I don't have much of a clue on how to do what he said... Any idea of something smaller that would help me get to that skill level? Why don't you try to work on re-creating vanilla items and then adding more to them. Such as a fishing rod with longer reach or something of the sort.
-
It seems that whenever the item would be destroyed by damage it is only destroyed on the server and not the client. I should also mention that using player.inventoryContainer.refresh() or whatever it's called does nothing. Here is the src file, note: look into the itemRightClick method.
-
Dude listen to the pro above. If you have no idea where to even start then you are not skilled enough to do this. Try something smaller and learn more. Don't get your drivers license and then immediately fly a cargo plane.
-
Fences dont register when testing with world.isRemote
deadrecon98 replied to Tschallacka's topic in Modder Support
Ok, what exactly are you trying to do? This world.setBlockToAir(x, y, z); can NEVER be run on the client! -
World#isRemote, it is true if it is the client's world.
-
Use a tick handler or look into this.
-
Fences dont register when testing with world.isRemote
deadrecon98 replied to Tschallacka's topic in Modder Support
world.isRemote is telling you whether it is the client's world or not. Use !world.isRemote (this means the world is the server). NEVER try to make something client-side that isn't textures or something of the like. -
This is more than likely a problem with the way minecraft handles the players movement and lag probably has something to do as well. I would just try to make it a full-sized block.
-
[SOLVED][1.7.10]Packet not being sent to client.
deadrecon98 replied to deadrecon98's topic in Modder Support
I was using it to debug it but I just got so tossed around with everything else I forgot. I will add in some more checks to make sure the data is sent properly and received properly -
[SOLVED][1.7.10]Packet not being sent to client.
deadrecon98 replied to deadrecon98's topic in Modder Support
As for me registering my instance that was completely unneccesary, I copied the code for the main files from another mod of mine. As for the PlayerLoggedInEvent, I removed that completely as it was not needed. So it's still the same thing as always. It just seems like whenever I send data to the client, the client just ignores it. EDIT: I am smacking myself very very hard right now. public static class Handler implements IMessageHandler<PacketUpdateClientIEEPData, IMessage> { @Override public IMessage onMessage(PacketUpdateClientIEEPData message, MessageContext ctx){ EntityPlayerExtended player = EntityPlayerExtended.get(Minecraft.getMinecraft().thePlayer); log.debug(String.format("Received packet.")); return null; } } Notice anything missing? Yeah, I completely forgot to tell it to update the players data. -
[SOLVED][1.7.10]Packet not being sent to client.
deadrecon98 replied to deadrecon98's topic in Modder Support
As for me registering my instance that was completely unneccesary, I copied the code for the main files from another mod of mine. As for the PlayerLoggedInEvent, I removed that completely as it was not needed. So it's still the same thing as always. It just seems like whenever I send data to the client, the client just ignores it.