How to query for peripherals at a position? #2234
-
I'm porting some 1.20.1 fabric code to architectury, and I've run across |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
So the short answer is "you shouldn't" :p. Handling invalidation of peripherals is awkward and error-prone (and a high likelihood that this changes again, for fixing #1817 and some chunk-loading issues), so it's not something I recommend other mods try to do — hence this not being exposed in the API. That said, if you really want to do this (or I guess if the mod is doing it already :p), you want to use |
Beta Was this translation helpful? Give feedback.
-
Yep, that got me where I needed to go, thanks! |
Beta Was this translation helpful? Give feedback.
So the short answer is "you shouldn't" :p. Handling invalidation of peripherals is awkward and error-prone (and a high likelihood that this changes again, for fixing #1817 and some chunk-loading issues), so it's not something I recommend other mods try to do — hence this not being exposed in the API.
That said, if you really want to do this (or I guess if the mod is doing it already :p), you want to use
PlatformHelper.get().createPeripheralAccess
.