davenonymous / ocsensors

Sensor Addon for OpenComputers
https://minecraft.curseforge.com/projects/oc-sensors
4 stars 2 forks source link

Adding support for Villagers #10

Closed brisingraerowing closed 6 years ago

brisingraerowing commented 6 years ago

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.

davenonymous commented 6 years ago

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.

brisingraerowing commented 6 years ago

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.

davenonymous commented 6 years ago

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.