Jump to content

poopoodice

Members
  • Posts

    1160
  • Joined

  • Days Won

    7

Everything posted by poopoodice

  1. 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.
  2. https://github.com/BananaSquares/Forge-Mod/blob/master/src/main/java/mod/trianglesinpoo/mcores/ModSounds.java#L12 new SoundEvent(new ResourceLocation(Main.MODID, "music_disk/equilibrium.ogg") Just change it to something like: new SoundEvent(new ResourceLocation(Main.MODID, "equilibrium_disk") or just simply "equilibrium" as long as it is same as https://github.com/BananaSquares/Forge-Mod/blob/master/src/main/resources/assets/mcore/sounds.json#L2 You should really make the names more consistent.
  3. Please provide a repo.
  4. I don't think ItemInit.EMBERCLEAVE is a type of DamageSource. You should be checking if the item of the attacker is holding is the sword (DamageSource#getTrueSource gives you the entity). However this can be abused in multiple ways, such as swap to the sword as soon as the shot arrow hits the target, or even a thrown splash poison potion will be able to burn the target to death. Try AttackEntityEvent instead.
  5. I think you should be able to get all entitytypes from ForgeRegistries.ENTITIES, and then cache them by filtering out the ones with EntityClassification.MONSTER.
  6. Or just call ItemStack#setDamage since ItemStack#damageItem is more likely to be used on other purposes.
  7. This does not really make sense as you are damaging the carrot jam stack, and then replace it with a bucket in the crafting table.
  8. return a map that contains the attribute modifiers that you are going to add to the weapon (check SwordItem), but instead of create a constant one you want to add the modifiers dynamically (based on the stack's nbt tag) in the method getAttributeModifiers. Override addInformation to add tooltips.
  9. Just remove the static modifier : p to make the method non-staticc
  10. After tonnes of testings it seems like you CAN'T edit the config file through notepad++, try windows notepad or some other text editor as this works on my side. Hopefully this works for people who has the same problem!
  11. You need to register your entity attributes through EntityAttributeCreationEvent.
  12. Get the player's bounding box, make it bigger (grow, expand), and there are a couple methods in World called getEntitiesWithinAABB or something similar where returns a collection of entities that meets the conditions. If you want it to be more accurate (bounding box is a cube), you can also check the distance between two entities by Vector3d#distanceTo.
  13. It happens randomly, sometimes when the changes are applied to any int, bool, double, string value the whole config gets reset, and unfortunately it does not provide any error message that tells where the error occurs. I can say the numeric values are always in range, and there are no typos for bool values because if for example I insert 20 into a field that accepts range 0 ~ 10, only the field will gets reset, not all the config file. If I types flse instead of false, it will throw an exception, and won't reset the whole config file neither.
  14. Hey, I'm experiencing some issues with configs recently, here is my problem: Whenever you try to edit the config, there's a chance that it resets the whole config to default values, even if the values you've modified are valid. Error Message: [Thread-1/WARN] [ne.mi.fm.co.ConfigFileTypeHandler/CONFIG]: Configuration file run\.\saves\New World (4)\serverconfig\ava-server.toml is not correct. Correcting then it creates a backup file (.toml.bak) I've no idea where went wrong as ForgeConfigSpec is final which I can not debug through custom corrections (ForgeConfigSpec#correct, ConfigFileTypeHandler.ConfigWatcher#run) by creating my own config spec. Code: ServerConfig Config Registering What is happening?
  15. It's a static method ๐Ÿ˜›
  16. It should represent which button is clicked, left/middle/ or right. GLFW.MOUSE_BUTTON_LEFT/RIGHT/MIDDLE (1/2/3) = 0/1/2 Just guessing, you can add some print lines to check.
  17. The yTex is calculated upon the creation of the button, and then it will always be the same afterwards. So you will need to listen to the change, and then replace that button (you can store the instance in a field, remove it from Screen.buttons, and update the field with a new created button).
  18. A tileentity is not required to make a gui, what type of "gui" you are trying to do?
  19. You can have a look at this: https://bitbucket.org/pelluciddice/ava/src/25660921a9340d7f3d99f2dc790d4852898c8156/src/main/java/pellucid/ava/entities/BouncingEntity.java#lines-40:65 where in this case a grenade.
  20. Check FontRenderer.
  21. Even if I set the applyDiffuseLighting in BakedQuad to false, the shade and the lighting is still enabled. I think the lighting is pre-calculated? If not why is the lighting applied to all quads before IBakedModel#getQuads?
  22. You need to have your entity attibutes registered in CommonSetupEvent, with GlobalEntityTypeAttributes
  23. Ha! I'm blind ๐Ÿ˜›
  24. You can access the MainWindow in Minecraft, then get the height and width from of it.
  25. Hi, I'm wondering how would I go about reset the block breaking animations? When I set it to 0 there is still a little block break animation, and values smaller that 0 or greater than 10 will not work (WorldRenderer L2546). What is confusing me the most is Minecraft is using -1 to reset the progress, but how is it gonna work?
×
×
  • Create New...

Important Information

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