Started by
CaptainShark
on
Topic category: Help with Minecraft modding (Java Edition)
Currently messing around with a villager related mod but it relies on 4 types.
I have 4 new chests, a farmer, butcher, shepherd and then an "all villager types" chest.
How do I use a procedure to work with just the one type of villager, for example a farmer?
I might be building this wrong so providing a photo of it https://i.imgur.com/yjYTQEp.png
the code snippet :-
replace the FARMER with any profession of choice the spelling is in all caps no special characters like_,-+= anything in between
Hope it helps ;)
also I mean the spelling of the profession of choice in all caps
yeah should help now
Uhh, you sure that there's
method that returns enum VillagerProfession?
I believe I copied it all including the despawn part. When test running the workspace though it comes back with the "your workspace contains mod elements" message and lists the same element as the issue
I only mean this part:
I answered basing on pretty good (unofficial) forge documentation. Also by code snippet i meant the one in Advanced category.
https://nekoyue.github.io/ForgeJavaDocs-NG/
Also i just noticed that there's no
Which stores vanilla Villager professions.
Im sure it will crush.
I'll send picture tomorrow. It'll be easier to explain how to do it.
Okay cool lmao. It will be a lot easier after seeing the working versions of the procedure blocks and the working code if it gets edited. It will get a bit more complicated at the next few steps of the mod but to keep it simple for now it just needs to make sure a specific villager type is required to summon an entity ( purely so it is easier to understand, eventually it will have to involve breaking blocks/custom chests )
oh yeah I realised that too
heres that
yeah I'm pretty sure I even checked it from the villager trades code that's how their doin' it
regarding teh whole import thing:
put that somewhere in the chunck of imports or anywhere at the top really