Started by
SakePlayS
on
Topic category: Help with Minecraft modding (Java Edition)
So bassicly i want to make an item that deals damage in specific block radius and it does deals the damage, however not in the name of player which is means mobs will drop no XP and some mobs wont drop loot of they are required to be killed by player or mob and not something else. Any tips?
I'm running into the same issue, did you find any solution?
I don't understand what you need. Please clarify me and I see if I can help
I mean, the issue I'm having is that in order to deal a specific amount of damage with a range weapon I did the following:
I set power to 15 to get a decent range and bullet speed for my gun.
I set damage to 0 in order to eliminate the bullet damage.
I created a procedure called "when bullet hit living entity" and set it to "deal [2.68] damage [event/target entity] type=generic"
This procedure deals that exact amount of damage when hitting a entity, which allows me to avoid the whole balancing power and damage hussle.
I have another procedure that detects when entity dies, which goes as follows:
Under world variable "when entity dies"
If is [source entity] type player or server player = true
Set [source entity] NBT "Money" to get [source entity] NBT "Money" + 100
This adds 100 "Money" to the player every time it kills a entity.
This works fine for normal attacks, but since the gun's damage is not originated from the player, instead it's generated by the damage procedure, the "player kills entity" procedure doesn't work since the source of the damage is not the player.
So a way to making a procedure that basically deals damage in the name of the player would be extremely useful in this case.