Started by
qym
on
Topic category: Help with Minecraft modding (Java Edition)
Invincibility frame and how can I remove it? whenever you attack something it will turn red for 0.5 seconds and it becomes invincible. How can you remove the invincible frame thing? i am making a shotgun and this will be helpful for it
The only way to remove invincibility time (as far as I know) is to use custom code
Custom codes are made available by Mcreator's Unlock Elements feature. By enabling this feature, you can program with code instead of blocks.
And the main issue, the invulnerable time, is set by entityiterator.invulnerableTime = 0;.
can be implemented with the code
entityiterator.invulnerableTime = 0;
.The entityiterator part can be an entity or a sourceentity.The moment this code is loaded, the enemy's invulnerability time is set to 0 and damage is inflicted.
The recommendation is to add the process of excluding the invincibility time at the end after the necessary programming has been done in blocks.This way, you can skip troublesome processing such as import statements.
I have no experience with forums and my English is not good, so I may not be able to communicate well. If there is any problem, please let me know.
There is a "Custom code snippet" block under Advanced. In this block you can enter raw Java code. I find this very helpful when I am writing composite block/Java programs.
love you guys heehee