Closed LogGits closed 1 year ago
You are correct in observing that react spawns in an already dead entity. This is for compatability as plugins may need to know what is dropping or when something dies etc. However as for local difficulty, no i am not handling anything related to this.
The stacked entity is literally a single entity which has STACK X Max HP. When the entity is damaged far enough (1 max health worth of hp missing) the stacked entity's max health is reduced to the new stack size and a dead copy of that entity is spawned.
The reason i do it this way is to keep mob ai continuous. For example, light a stacked cow on fire, it will continue to sprint and run while dead copies of itself are spawning in to drop steak, but it doesnt stop running when it dies, because its the same entity.
I think it would be a good idea not to stack mobs with armor or equipment, and i also think it is a good idea that they never pick it up while stacked too. This could allow dupes, and questionably strong mobs.
What options / features would you want added?
Okie considering you're spawning entities. The best way to do this is not to spawn an "Exact" copy, but the entity itself. The reason is this:
Consider you have a bunch of entities stack. Say it's a zombie with armour on and other zombies stack into it. Given this, if you're spawning an exact copy of the zombie, it will spawn the same items/loot because its an exact replica.
Would you consider spawning in a mob of the same entity type but not an exact replica (just a regular mob spawn). I think this will naturally arm them based on the region/local difficulty. This would also prevent item duplications as you are not spawning a replica (you could make it optional that stacked mobs don't pickup items in the config).
It isnt an exact copy, it's just copying the fire ticks and a few other things such as potion effects and the age of the mob.
I will add an option to prevent mobs from picking up stuff if they are stacked though.
Ah ok, I am not as scared now. Cheers for clarifying 👍
Is there a way to prevent stacked mobs from picking up items (as I am worried about potential duplication methods)?
Also I am just wondering about mob armour and local difficulty with react. Local difficulty determines how much armour/the level of armour the hostile specific mob has. I am wondering if react handles this? How exactly does it handle when a player kills the mob? Does it summon and kill a zombie really quickly or does it just spawn items?