Jade ๐Ÿ”

Jade ๐Ÿ”

45M Downloads

[1.19.x] ObjectDataCenter inaccessible from api

Exopandora opened this issue ยท 3 comments

commented

Mod loader

Fabric

Minecraft version

1.19.x

Mod version

8.6.4+

Modloader version

Forge 43.0.0 / Fabric 0.58.6+1.19.2 (any version, really)

Modpack info

No response

If bug:

  • Can you reproduce this issue with relevant mods only?

If bug: The latest.log file

No response

Issue description

I run into the following problem when implementing a cutom JadeRayTraceCallback: I want return a block/entitiy at a diffrerent position and therefor have to retrun a new/modified accessor instance. The problem is because i want to return an acessor for a different position, the original acessor passed to the callback might be null (in case of a miss). When that happes, i cannot access the serverData and serverConnected properties. Instead i would have to use the ObjectDataCenter. The problem with that is, that it cannot be accessed from just the api, as its only available in the implentation of jade. Why would i want to rely only on the api? Because i am using a multiloader setup (common project and two subprojects [forge and fabric]) and do want to duplicate code. A workaround for this would be a serviceloader, but i think it should be considered that the serverData and serverConnected properties can be accessed via the api.

commented

Same applies for DatapackBlockManager.getFakeBlock

commented

Hello, for the main issue, it has used ObjectDataCenter as the default values in 1.19.3. I guess the problem will be solved if I backport this to 1.19.2?

For DatapackBlockManager.getFakeBlock, I will defer the timing of setting fake block to after callbacks, and provide an API for it.

Is that okay?

commented

Hello, for the main issue, it has used ObjectDataCenter as the default values in 1.19.3. I guess the problem will be solved if I backport this to 1.19.2?

Yes, that solves the issue!

For DatapackBlockManager.getFakeBlock, I will defer the timing of setting fake block to after callbacks, and provide an API for it.

I guess that will work too.