Started by
Silverlion
on
Topic category: Help with Minecraft modding (Java Edition)
Hello, all I want to do is to set up a global rule, that Mobs / entitites only drop loot according to their respective loot tables, when they are killed by a player (global anti-auto-farm control).
I managed to make a procedure, that a mob only drops an item, if it is "killed by player". But I don't know how to link to the corresponding loot.table at the "DO"-part, I just managed to give fixed items for test purposes with "Spawn item/gem".
So how to activate the respective loot.table of the mob ? Or do I have to edit ALL loot tables and need to add a "condition: killed_by_player" ? That's something I'd like to avoid...
Thanks for hints !
You can use this if you're using last versinon (2023.3)
Hey,
thanks so far ! Tried to copy it to 1.19.2, but I can't find the "is <> of type" and "provided damage source".
Have only found "is <> sub type of <>" . Is this the same ? Or are these blocks new to 2023.3 ?
Cheers
also didn't find the "provided damage source" ? Do I need to install the plugin "Additions" for define that variable ?
I'm using "Damage Procedures" and "Attributes" plugins. I'm sorry I forgetted to add. and yes 2023.3 version added damage source.
only when killed a by player? Alright here:
Although the loot table might need to be renamed for that one since if its identical it will drop either way..
@XenraO :
ok, just installed 2023.3 and managed to re-do your solution - check
Now I try to translate your procedure to 2023.2 (1.19.2), but get lost completely - sorry.
I added the plugin "Addition" and see its new proc.blocks, but I don't have any clue how to fill the variables:
https://photos.app.goo.gl/QNtyA3UpzM5EK8WH8
(I even don't get that f..&%$§%$ picture link working although I do it like in that tutorial)
Is there any wiki where this whole graphical editor and its contents is explained ?? I don't get acquainted to the system, sometimes there is a variable already, sometimes it is not... don't get the system behind.
@ McModded1.14 :
wow, thanks for that solution ! The only thing is, that I'd liked to have a generic procedure that's working for all mobs at once:
"IF killed_by_player -> use the respective (mostly vanilla) loot table ; ELSE do nothing / quit"
With your solution I'd have to add every single mob of the game to the procedure, so that it's applied to every creature.
sorry, just really frustrated after 3 hours of trying and searching for tuts / wikis and achieving nothing. :(
But thanks both of you for your help so far !
Alr I'll try to have one ready in a couple mins
1: make an entity tag that contains mobs from your mod.
2: make an entity loot table: (entity id without the mod id)_loot
3: Procedure would be something like this:
thanks a lot both of you !!
I'll make up my mind what direction my mod shall go and might come back to your solutions then.
Thx !!!