Jump to content

Animefan8888

Forge Modder
  • Posts

    6157
  • Joined

  • Last visited

  • Days Won

    59

Everything posted by Animefan8888

  1. No you do not open the Gui on the server it only exists on the client. What happens is you tell the server this players is opening this container and then open this gui so there is a display. Packets are what you use to do this though you may be able to override getUpdateTag and handleUpdateTag but remember to call markDirty whenever the fluid changes. I am not sure if this will be a sync.
  2. Keybinds are lient side only why does the server need to know he this player pressed w. The server just needs to know move forward. This is dalved via packets.
  3. 1.7.10 is not supported here update to 1.10.2.
  4. WorldGenMinable and WorldProviderSettings (Ithink that was the name of the class) which contains the variables for WorldGenMinable.
  5. It syncs the data between the containers then modifies it in the addListeners method i believe it is called.
  6. How do you open your gui handler? Say you are playing on a server and the server experiences a lag spike the tps goes down. This doesnt happen on the client, therefore your gui gets desynced.
  7. The way it works to my understanding is that there are two containers open. You have the one on the client and the one on the server. The server should handle all the data meaning you should only update data on the server in your TE. Using a GuiHandler automstically syncs the ItemStacks, but all other data should be synced through packets or the listeners. The variables inside of the container are used to compare last to current. So to some it up you need to sync what type of fluid it is and the amount of fluid and other dynamic data.
  8. Look at how ContainerFurnace and GuiFurnace sync data as it does not happen automagically.
  9. I have a feeling the easiest way to do this would be to use the PropertyBooleans and getActualBlockState(...) IF you are not going to have many items that do this. If you are going to have many items that does this effect I would suggest IBakedModels.
  10. I'm not sure you understood what Draco was saying. // Instead of this worldRenderer.pos(0, 0, -0.001).endVertex(); worldRenderer.pos(1, 1, -0.001).endVertex(); worldRenderer.pos(1, 0, -0.001).endVertex(); worldRenderer.pos(0, 1, -0.001).endVertex(); // Do this worldRenderer.pos(-0.001, -0.001, -0.001).endVertex(); worldRenderer.pos(1.001, 1.001, -0.001).endVertex(); worldRenderer.pos(1.001, -0.001, -0.001).endVertex(); worldRenderer.pos(-0.001, 1.001, -0.001).endVertex();
  11. You just need to create an Itemastack and apply the corrrect nbt to it. For the correct NBT look onto what nbt the egg has using NBTExplorer or using PlayerInteract (more specifically the right click event) and print out the stacks nbt.
  12. First answer my question Do you know Java?
  13. Awesome, but I think you should understand what that code does on a fundamental level before going on ahead, and if you already do just ignore this message.
  14. I don't think the math would, but did you try my second suggestion. But amended to also only calling begin once.
  15. actionPerformed(...) is only called when a button is pushed. You need to draw every frame. Use drawGuiForegroundLayer(...) or drawGuiBackgroundLayer(...) change the string in actionPerformed.
  16. te.getPos().getX() == x, te.getPos().getY() == y, and te.getPos().getZ() == z. If so you would no do this GL11.glTranslated(x + addx, y + addy, z + addz); Just some math x + (actualpos.getX() - teposX), y + (actualpos.getY() - teposY), and z + (actualpos.getZ() - teposZ) should = actualpos.getX(), actualpos.getY(), and actualpos.getZ()
  17. Hm, as I realize, the swing is hardcoded in EntityPlayer method attackTargetEntityWithCurrentItem, and there is section that checking if (itemstack != null && itemstack.getItem() instanceof ItemSword). How can I change it through overriding Item's hitEntity? Maybe this question looks noobish, but I missing something there and cannot understand... Item#hitEntity(...) is called when the Player hits an Entity. Therefore you can do the same thing within this method.
  18. Does this actually give you the correct position? actualpos.getX() - teposX, actualpos.getY() - teposY, actualpos.getZ() - teposZ Why not just pass the BlockPos#getX() ect? *Edit Also only call tessellator.draw() once at the end.
  19. removeAllModifiers is Client side only. Instead call removeModifier()
  20. Look in EntityPlayer on line 1408-1421 for an example and override hitEntity in the Items Class and apply this effect in that method as it is hardcoded for ItemSword. *Edit and for knockback override public MultiMap getAttributeModifiers(EntityEquipmentSlot slot, ItemStack stack) in your Items class.
  21. I want to say it is property booleans with getActualState(...) might work other than that right now I do not have any ideas.
  22. I don't understand the purpose but your could try System.exit(0); The SecurityManager no longer allows for mods to use System.exit. Ok then I don't see why Forge has blocked that from being accessed from Mods but I guess they had a reason. I don't understand the purpose but your could try System.exit(0); Instead use Minecraft.getMinecraft().shutdown(); This sets a boolean to false stopping the main Game Loop and eventually stops the thread of Minecraft.
  23. The difference between Shaped and Shapeless is one has a required "order" and the other allows you to place the items in any slot as long as all of the items are there. I do not know why exactly but if I were to guess it is so you can say hey take this String and take any and all items registered under this string and put them in this recipe?
×
×
  • Create New...

Important Information

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