-
Posts
1160 -
Joined
-
Days Won
7
Everything posted by poopoodice
-
Event "setSecondsOnFire" won't connect to SwordItem
poopoodice replied to Skullblade's topic in Modder Support
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. -
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.
-
Please provide a repo.
-
Event "setSecondsOnFire" won't connect to SwordItem
poopoodice replied to Skullblade's topic in Modder Support
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. -
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.
-
How can I get a playerEntity in the #getContainerItem method?
poopoodice replied to middangeardim's topic in Modder Support
Or just call ItemStack#setDamage since ItemStack#damageItem is more likely to be used on other purposes. -
How can I get a playerEntity in the #getContainerItem method?
poopoodice replied to middangeardim's topic in Modder Support
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. -
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.
-
Just remove the static modifier : p to make the method non-staticc
-
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!
-
You need to register your entity attributes through EntityAttributeCreationEvent.
-
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.
-
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.
-
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?
-
[1.16.X] Forgot Method Is Static [Solved]
poopoodice replied to urbanxx001's topic in Modder Support
It's a static method ๐ -
[1.16.4] 2 Questions about Gui Screens and Buttons
poopoodice replied to LK1905's topic in Modder Support
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. -
[1.16.4] 2 Questions about Gui Screens and Buttons
poopoodice replied to LK1905's topic in Modder Support
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). -
A tileentity is not required to make a gui, what type of "gui" you are trying to do?
-
[1.16] Need help with ProjectileItemEntity Physics
poopoodice replied to kiou.23's topic in Modder Support
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. -
Check FontRenderer.
-
Item BakedModel Lighting issue when rotating
poopoodice replied to poopoodice's topic in Modder Support
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? -
You need to have your entity attibutes registered in CommonSetupEvent, with GlobalEntityTypeAttributes
-
Ha! I'm blind ๐
-
You can access the MainWindow in Minecraft, then get the height and width from of it.
-
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?