Jump to content

endershadow

Forge Modder
  • Posts

    535
  • Joined

  • Last visited

Everything posted by endershadow

  1. I took a look at all of the code and stuff on the github. I think it's an amazing idea. It also makes it easier to understand for those who don't understand what ? and : fully mean in java.
  2. When I close out of minecraft and re-open it, the gui thinks the tileentity reset the number, but I found through testing that the value didn't actually reset and it was just the gui. please help. https://github.com/code-lyoko-modding/CodeLyokoMod/blob/master/lyoko/CodeLyoko.java https://github.com/code-lyoko-modding/CodeLyokoMod/blob/master/lyoko/client/GuiSuperCalc.java https://github.com/code-lyoko-modding/CodeLyokoMod/blob/master/lyoko/entities/TileEntitySuperCalc.java
  3. http://paste.minecraftforge.net/view/8e973fd8
  4. I'm still confused about what I do in the methods themselves. private void sendUpdate() { worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } @Override public Packet getDescriptionPacket() { Packet132TileEntityData packet = (Packet132TileEntityData) super.getDescriptionPacket(); NBTTagCompound tag = packet != null ? packet.customParam1 : new NBTTagCompound(); return new Packet132TileEntityData(xCoord, yCoord, zCoord, 1, tag); } @Override public void onDataPacket(INetworkManager net, Packet132TileEntityData pkt) { super.onDataPacket(net, pkt); } what do I do once I add that into my code?
  5. this is kind of confusing for me so could you write show me exactly what I need to write and where? because I tend to learn what to do better from seeing it than being told what to do. Seeing an example of this being already implemented would work as well.
  6. so let me make sure I understand you correctly. I need to implement IPacketHandler in the tile entity and in onDataPacket I call world.markBlockForUpdate(x, y, z). and where is getDescriptionPacket?
  7. it get's updated according to the console, but the gui doesn't display it.
  8. I used the player variable in onPacketData to get the sender of the packet. it isn't changing the variable of the tile entity. here's the code I have now. https://github.com/code-lyoko-modding/CodeLyokoMod/blob/master/lyoko/entities/TileEntitySuperCalc.java https://github.com/code-lyoko-modding/CodeLyokoMod/blob/master/lyoko/PacketHandler.java https://github.com/code-lyoko-modding/CodeLyokoMod/blob/master/lyoko/client/GuiSuperCalc.java
  9. but there's no world variable in the file. how would I do that?
  10. but how would I initialize the reference? would I do this? TileEntitySuperCalc tsc = new TileEntitySuperCalc(); tsc.xCoord = x; tsc.yCoord = y; tsc.zCoord = z; tsc.selectedSector = sector;
  11. is there a way i could send a reference of the tile entity from the gui to the packet handler?
  12. yes, but you told it to be a certain light level based on it's meta data
  13. sorry I meant do I send it from the GUI instead of the tile entity. now that I told the GUI to send the packet, how do I make it change the data in the tile entity?
  14. I'm already sending a packet from the GUI. do i also need to send the coordinates from the GUI?
  15. what I'd put in the tile entity to send the packet of the coordinates. I understand it fine, until it gets to EntityPlayer part
  16. how do I send the coordinates of the tile entity?
  17. I already read and did that. EDIT: I just don't know how to send it to the tile entity
  18. In my mod my GUI has buttons, and I want to change a string in my tile entity but it doesn't change the value in the tile entity when I press the button. It also doesn't change the item in slot 1 and slot 2 because of this. https://github.com/code-lyoko-modding/CodeLyokoMod/blob/master/lyoko/entities/TileEntitySuperCalc.java https://github.com/code-lyoko-modding/CodeLyokoMod/blob/master/lyoko/client/GuiSuperCalc.java EDIT: I ended up doing something different in the end
  19. my mob is being animated correctly. both parts of the leg should move but only the lower part moves. https://dl.dropbox.com/u/87762025/2013-03-02_10.22.12.png[/img] here's my code public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); this.Body.rotateAngleY = f4 / (180F / (float)Math.PI); this.leg_1.rotateAngleX = MathHelper.cos(f * 0.6662F) * 2.0F * f1 * 0.5F; this.sub_leg_1.rotateAngleX = MathHelper.cos(f * 0.6662F) * 2.0F * f1 * 0.5F; this.leg_2.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 2.0F * f1 * 0.5F; this.sub_leg_2.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 2.0F * f1 * 0.5F; this.leg_3.rotateAngleX = MathHelper.cos(f * 0.6662F) * 2.0F * f1 * 0.5F; this.sub_leg_3.rotateAngleX = MathHelper.cos(f * 0.6662F) * 2.0F * f1 * 0.5F; this.leg_4.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 2.0F * f1 * 0.5F; this.sub_leg_4.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 2.0F * f1 * 0.5F; this.leg_5.rotateAngleX = MathHelper.cos(f * 0.6662F) * 2.0F * f1 * 0.5F; this.sub_leg_5.rotateAngleX = MathHelper.cos(f * 0.6662F) * 2.0F * f1 * 0.5F; this.leg_6.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 2.0F * f1 * 0.5F; this.sub_leg_6.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 2.0F * f1 * 0.5F; }
  20. I mean that you create the explosion in the tile entity. Not get the coordinates from the tile entity and then create the explosion in the block
  21. what if you give the block a tile entity and create the explosion from the tile entity.
  22. how would I get the model to be animated?
×
×
  • Create New...

Important Information

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