Jump to content

Animefan8888

Forge Modder
  • Posts

    6157
  • Joined

  • Last visited

  • Days Won

    59

Everything posted by Animefan8888

  1. Create a capability that simply stores a boolean of hasConnected or whatever and in the EntityJoinWorldEvent check that capability and if it is false then open a gui via EntityPlayer#openGui
  2. Depends on what you are saving, it might be more efficient to sync the data as primitives. IE ByteBuf#writeInt or ByteBuf#writeShort. You will need to have a packet either way.
  3. It could, but why you can do a simple addition yourself. I meant why do you need the health prior to the last damage. I'm not sure I understand why you are going about doing this. What is causing a problem about the vanilla implementation.
  4. Instead use an interface called IProxy, the idea of a CommonProxy is illogical. Your "CommonProxy" is your @Mod class.
  5. You just need to create and register a PotionEffect instance via the Registry Event Register<PotionEffect>
  6. 1.7.10 isn't supported on this forum anymore, update if you wish to receive assistance.
  7. This will not happen, this is to ensure that potion effects are not changeable client side, for obvious reasons(it can and will be exploited). It is protected because Mojang had no use for it to be public, aka it wasn't intended to be used outside of an Entity. What is it that you are getting this for? This will not happen as this requires too much editing for a feature that will not really be used for much.
  8. Read it try to understand it, ask specific questions to try to understand it.
  9. I believe so, also the first string you pass in to the EnumHelper.addArmor will point to the name of the armor at "textures/entity/horse/armor/horse_armor_" + name
  10. Well then you could simulate that if you wanted to, most likely, but you could also as an alternative.
  11. Define animated if you mean like fire, return a different texture based on world time, if you dont you will have to manually render this in RenderLivingEvent.
  12. Try running it with only forge, also post your debug.log file. For the server and if you can get it the debug.log of one of your friends that time out.
  13. This isn't that hard actually. Just subscribe to DrawBlockHighlightEvent and render the lines of the bounding box you can look at how vanilla does it for an example.
  14. public String getHorseArmorTexture(net.minecraft.entity.EntityLiving wearer, ItemStack stack) Which exists inside the Item class.
  15. You can use a capability to store the loot box and a timer and you will have to sync this to all players within a certain distance. And use the RenderPlayerEvent to render the box/plane.
  16. This is not true, openContainer is always the container the player has open, it seems to default to inventoryContainer instead of null. Try stepping through your code in the debugging when you are replacing the slots and when you are trying to put the item in the slot.
  17. Define render, do you want it to be a gui, an overlay on to the HUD, or an entity that only renders for the person who killed it?
  18. Is it ever calling the super method, is that returning false?
  19. Try removing the stack.isEmpty || part. If this is the case also use GuiOpenEvent and interact with EntityPlayer#openContainer, but only if it is not inventory container.
  20. Doing what I said if you do it correctly will not cause incompatibility with other mods. Edit: Also. Either way you would have to determine if the container had the hotbar. In case of my way all you would have to do is subscribe to the ContainerEvent.Open (might have the name wrong) and apply the search and change the slots.
  21. Make your own class and override the methods that allow you to drink it and apply the potion effect.
  22. You could modify Container#inventorySlots to change the mainInventorySlots to your own slots. Do this in EntityJoinWorldEvent by using the EntityPlayer#inventoryContainer field.
  23. Sadly not true. It doesn't fire for the players own inventory gui, at least in survival mode. You will need to modify EntityPlayer#inventoryContainer directly. Do this obviously, reflection is pricey. Not true, at least for the ContainerPlayer. It just doesn't allow you to shift click into the slot, but you can do so out of it. However this is true do to other mods messing with this Container. There should be some form of forge implementation around this as a proper method of doing this. @SuperKael If you do wish to do this Use OnEntityJoinWorldEvent to modify EntityPlayer#inventoryContainer and GuiScreenEvent.BackgroundDrawnEvent to render more onto the Gui if it can happen before the original gui is rendered, and if it needs to be after use GuiScreenEvent.DrawScreenEvent.Pre/Post
×
×
  • Create New...

Important Information

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