Bug: Dimension Tags do not properly function on servers.
bconlon1 opened this issue ยท 3 comments
UPDATE AS OF 4/2/2022:
- This issue is, as far as we are concerned, a vanilla issue.
Level#dimensionTypeRegistration
is one way of accessing aHolder<DimensionType>
for comparing to a tag, however when called from the side of a client on a multiplayer server, this holder is a Direct holder, which means it stores no tags orResourceKey
s, only theDimensionType
object. In any other situation it is a Reference holder which is capable of being compared to a tag just fine.- Another way of trying to get a
Holder<DimensionType>
would involve trying to useLevel#registryAccess
, however once again the client-side on a multiplayer server has some issues with this, as theDimensionType
object that can be pulled fromLevel#dimensionType
does not seem to exist in the registry access according to any method that takesDimensionType
as a parameter; they all return null or some other value meant to represent null even when in any other situation like in singleplayer they return values like theResourceKey
of the dimension type just fine.
A temporary solution to this may be to integrate this into the mod's config instead of using tags yet, i.e. having string arrays in the config to store dimension names in and then they can be converted to level keys and checked against by other level keys through LevelUtil.
EDIT: Because of the latter point, its probably a bad idea to try to make temporary use of configs; just wait for dimension tag functionality.
- One thing to consider with this however would be whether this syncs properly between sides, since if it doesn't then that may be an issue.
- Another thing to consider is the fact that this doesn't allow recipes to make use of the dimension config list; if any recipe were to be dimension based there'd have to be a recipe for each dimension at the moment probably.