Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Content Count

  • Joined

  • Days Won


poopoodice last won the day on May 12

poopoodice had the most liked content!

Community Reputation

128 Excellent


About poopoodice

  • Rank
    Dragon Slayer

Recent Profile Visitors

4263 profile views
  1. List<EntityType<?>> MONSTERS = new ArrayList<>(); void summonRandomMonster() { if (MONSTERS.isEmpty()) MONSTERS.addAll(ForgeRegistries.ENTITIES.getValues().filter((type) -> is type classification monster)) Entity entity = (random EntityType from MONSTERS).create(world); if (entity != null) { entity.setPosition(x, y, z); world.addEntity(entity); } }
  2. Is the event being triggered? What's in your reload listener?
  3. There's an AddReloadListenerEvent
  4. I'm pretty sure the particle can be defined in the blockmodel.json.
  5. Well.. I have no idea why it doesn't work, and I don't see any problems except you should set a max damage (durability) in your item properties, and your entity2 is in fact the attacker. Entity1 is the target.
  6. Why do you have your "on-hit effect" code located in the lambda? It will only be triggered upon item break. Also the easiest way to do it is just set the target on fire and then return super, two lines of code.
  7. Override hitEntity() in your item class and set target on fire there.
  8. You need to call LivingEntity#setActiveHand() in use() for the player to start "using".
  9. In the Item class, (Item#hitEntity seems to be better than IForgeItem#onLeftClickEntity) @Override is just an annotation that is not necessary, but highly recommended to make sure you are actually overriding the method. DamageSource is a class that contains the information of the attack, such as the type of the attack (fire? explosion? where blast protection checks for this), the attacker, and even the direct attacker like arrows (IndirectDamageSource). Therefore the DamageSource will never match to a single item, where you can only obtain the information of the weapon from the attac
  10. Create an instance of the entity (iirc there's a method in EntityType called create() or something), and then add it through world.addEntity.
  11. If I understand this correctly, that indicates the "key" of the sound, and then the game will search in sounds.json for further information such as volume, file location...etc. So as long as the directory https://github.com/BananaSquares/Forge-Mod/blob/master/src/main/resources/assets/mcore/sounds.json#L5 is correct and sound file is under assets/modid/sounds it should work.
  12. Unfortunately no, you can't ever compare a DamageSource to an Item. In fact instead of using an event, if it's your own item you can just override onLeftClickEntity (or named something similar, where is called on the item after AttackEntityEvent) and set the target on fire there.
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.