Jump to content

Animefan8888

Forge Modder
  • Posts

    6157
  • Joined

  • Last visited

  • Days Won

    59

Everything posted by Animefan8888

  1. You loop through the list using a for loop.
  2. With one if statement &&'s to use more than one boolean value. Also world.getEntitiesWithinAABB(...) should return a List<Entity> not a single Entity also instead of player.getClass() use EntityLivingBase.class. *Edit Also to damage an entity living.attackEntityFromDamageSource(...)
  3. To detect if they are wearing the armor use onArmorTick and check if the players armor slots are of the armor Item. And I don't think there is a collision event so i would issue a pull request on forges github. Other thatn that you could use PlayerTickEvent and manually check if the player collides with another player.
  4. You cant pass EntityPlayer into the method only the event, also 1.7.10 is not supported on this forum, please update.
  5. Yse three nested for loops. All going from -radius to +radius. And check if x, y, z is = to -radius or +radius.
  6. You would need to replace BiomeGenBase.hell/nether what ever the biome is called because it is part of the main biome.
  7. If the blockstate is of the block you don't want to be placed event.setCanceled(true); *Edit also you could use blockstate.getBlock() == block setCanceled(true);
  8. Could you post your code, and use the code/spoiler buttons when creating a post/reply please.
  9. Drag type is quite obvious it is the state of the drag the player is trying to use From container getDragEvent which is called in Container#onSlotClick /** * Args : clickedButton, Returns (0 : start drag, 1 : add slot, 2 : end drag) */ ClickType is whether the player is shift clicking, or drag clicking etc. Look at ClickType. And the other to are the same so...
  10. You use new SlotItemHandler to add slots to a container that's TileEntity uses ItemStackHandler.
  11. You definitely misunderstood, what they meant was you create three classes one Called CommonProxy where things that need to happen on both sides go, then you have ServerProxy and ClientProxy which call the super method of CommonProxy. Though I don't see why it needs to be done that way. You could also put everything in ServerProxy and have ClientProxy extend ServerProxy, and call super methods. Though I just stick to using my Main Class.
  12. I have never seen anything that requires a tool to be used to break an IGrowable object, but you could create a fake player. From BlockEvent.BreakEvent /** Reference to the Player who broke the block. If no player is available, use a EntityFakePlayer */ Or even store the players UUID and Name when they place it, then check if they are on use the player if so, if not create one(recommend the first more).
  13. You never do anything in your common proxy, which is the servers side.
  14. Also packets haven't really been changed since 1.7.10 either, just thought I would throw that in.
  15. You weren't supposed to use player.displayGui(...) well I mean you soulc, but why not create your own handler for it. Not sure if you can anymore I have never used it.
  16. If you are using a custom gui and a custom container you should also be using a GuiHandler, which it is commonly called, but it is just a class that implements IGuiHandler.
  17. Almost nothing has changed since 1.7.10 when dealing with Containers and Guis.
  18. You subtract from the stacksize then you damage the item?
  19. First server handles all data. Second it isnup to you when and where to send, because it is based on what you want changing the damage to do. Sending it back would be adding a return to the Handler.
  20. Oh, ok I had the wrong import in my project. Good thing I am not actually using it.
×
×
  • Create New...

Important Information

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