OC Sensors

OC Sensors

3M Downloads

Adding support for Villagers

brisingraerowing opened this issue ยท 3 comments

commented

How would one go about adding support for villagers (e.g. getting the Profession and Career registry names)? I would like to use this for sorting villagers from a breeder (e.g. keep Librarians but not Cartographers). Since the numeric ID's change in different mod lists, using them would be very difficult and bug prone.

commented

Hey! I derped. It should be fixed now.
You don't have to build this yourself, but can download directly from my dropbox, where builds are automatically being uploaded to by travis. I.e. the latest (or rather all) builds of my mods can be found here.

commented

Villagers are indeed a bit more complicated and require further processing to get the actual registry names, so this requires a bit of java.
Will be in the next release.

commented

I actually got this working myself (surprisingly, as I am not a modder), although I can't figure out how to scan a single entity 2 blocks away from the sensor, e.g. (with the entity to the north [negative Z]):
S | E where S is the sensor, | is a fence, and E is the entity. For the prior example, I've used scanEntity(0, 0, -2, 0, 0, -2) to go 2 blocks north, but nothing. Using positive numbers doesn't work either.