Started by
Prox94
on
Topic category: Help with Minecraft modding (Java Edition)
Q1: how do i get an gaining health procedure when attacking target (gaining hp equal to damage done to entity) for a enchantment
Q2: How can I make a specific mob change from lighting (like the zombie pigman from pig) I want to make a lightning to create electrified (zombie variant) from a zombie (only transforms a zombie)
Q3: How do make a procedure that opposites potion effect while keeping the level and time intact for example if you get hit with poison it becomes regeneration
Sorry if its a short post
Edited by Prox94 on Fri, 11/24/2023 - 14:56
Q1:
a. give health boost or absorpsion effect and set the level to be equal to "get max health" - "get current health" (minus block found in logic section)
b. If you need help with when damaged while having enchantment then here: "Event Trigger" set to "Entity Attacked". put an if block (flow control) and set to "has 'Provided Itemstack' enchantment [your enchantment]" and set the do section to part a.
Q2:
a. in the entity's triggers section, there should be a "when struck by lightning" trigger. add a procedure to that.
b. make it so the event/target entity despawns and spawn a new entity at that location.
Q3:
a. create 2 local variables (right side of procedure interface) name them "potionlevel" and "potiontime" and set them to number
b. place a set variable block under the name "potiontime" to the amount of ticks left in the potion effect
c. place a set variable block under the name "potionlevel" to the level of potion effect
d. make it so when a certain action is achieved through an if block, place if blocks inside it and make it so that if you have a certain potion effect, itll give take away that effect and give you a different one (ex. remove poison and add regeneration)
e. set the level of the potion to "get local: 'potionlevel'"
f. set the "for __ ticks" section to "get local: 'potiontime'"
god that took a while to write
btw cool trick: tinker with all the elements before creating an actual mod so you at least kind of know what you're doing
thanks man :)
Q4: how do i get an healing health back procedure when attacking target (healing equal to damage done to entity) for a enchantment (some thing like lifesteal)
Make a procedure that has the trigger, something like entity takes damage. Check if the person who dealt damage is the player, and if so, give the player health boost effect with the level amount, find this is custom dependencies.
thanks all but i'm retiring from modding now thanks for everything. just gonna find a new hobby now to do bye
mods can you remove my account its not needed now
remove the last two messagesfor me