Interface IDhApiWrapperFactory
public interface IDhApiWrapperFactory
This handles creating abstract wrapper objects.
- Since:
- API 2.0.0
-
Method Summary
Modifier and TypeMethodDescriptionReturns theIDhApiBlockStateWrapper
representing air.getBiomeWrapper
(Object[] objectArray, IDhApiLevelWrapper levelWrapper) Constructs aIDhApiBiomeWrapper
for use by other DhApi methods.getBiomeWrapper
(String resourceLocationString, IDhApiLevelWrapper levelWrapper) Constructs aIDhApiBiomeWrapper
for use by other DhApi methods.getBlockStateWrapper
(Object[] objectArray, IDhApiLevelWrapper levelWrapper) Constructs aIDhApiBlockStateWrapper
for use by other DhApi methods.getDefaultBlockStateWrapper
(String resourceLocationString, IDhApiLevelWrapper levelWrapper) Constructs aIDhApiBlockStateWrapper
for use by other DhApi methods.
-
Method Details
-
getBiomeWrapper
IDhApiBiomeWrapper getBiomeWrapper(Object[] objectArray, IDhApiLevelWrapper levelWrapper) throws ClassCastException Constructs aIDhApiBiomeWrapper
for use by other DhApi methods.- Parameters:
objectArray
- Expects the following Minecraft objects (in order) for each MC version:
1.16 and 1.17
- [net.minecraft.world.level.biome.Biome]
1.18 and newer
- [net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome>]levelWrapper
- Expects aIDhApiLevelWrapper
returned by one of DH'sDhApi.Delayed.worldProxy
methods.
A custom implementation ofIDhApiLevelWrapper
will not be accepted.- Throws:
ClassCastException
- if any of the given parameters is of the wrong type. If thrown the error message will contain the list of expected object types in order.- Since:
- API 2.0.0
-
getBlockStateWrapper
IDhApiBlockStateWrapper getBlockStateWrapper(Object[] objectArray, IDhApiLevelWrapper levelWrapper) throws ClassCastException Constructs aIDhApiBlockStateWrapper
for use by other DhApi methods.- Parameters:
objectArray
- Expects the following Minecraft objects (in order) for each MC version:
1.16 and newer
- [net.minecraft.world.level.block.state.BlockState]levelWrapper
- Expects aIDhApiBlockStateWrapper
returned by one of DH'sDhApi.Delayed.worldProxy
methods.
A custom implementation ofIDhApiBlockStateWrapper
will not be accepted.- Throws:
ClassCastException
- if any of the given parameters is of the wrong type. If thrown the error message will contain the list of expected object types in order.- Since:
- API 2.0.0
-
getAirBlockStateWrapper
IDhApiBlockStateWrapper getAirBlockStateWrapper()Returns theIDhApiBlockStateWrapper
representing air.- Since:
- API 2.0.0
-
getBiomeWrapper
IDhApiBiomeWrapper getBiomeWrapper(String resourceLocationString, IDhApiLevelWrapper levelWrapper) throws IOException, ClassCastException Constructs aIDhApiBiomeWrapper
for use by other DhApi methods.- Parameters:
resourceLocationString
- example: "minecraft:plains"levelWrapper
- Expects aIDhApiLevelWrapper
returned by one of DH'sDhApi.Delayed.worldProxy
methods.
A custom implementation ofIDhApiLevelWrapper
will not be accepted.- Throws:
IOException
- if the resourceLocationString wasn't able to be parsed or converted into a validIDhApiBiomeWrapper
ClassCastException
- if the wrong levelWrapper type was given- Since:
- API 3.0.0
-
getDefaultBlockStateWrapper
IDhApiBlockStateWrapper getDefaultBlockStateWrapper(String resourceLocationString, IDhApiLevelWrapper levelWrapper) throws IOException, ClassCastException Constructs aIDhApiBlockStateWrapper
for use by other DhApi methods. This returns the default blockstate for the given resource location.- Parameters:
resourceLocationString
- examples: "minecraft:bedrock", "minecraft:stone", "minecraft:grass_block"levelWrapper
- Expects aIDhApiBlockStateWrapper
returned by one of DH'sDhApi.Delayed.worldProxy
methods.
A custom implementation ofIDhApiBlockStateWrapper
will not be accepted.- Throws:
IOException
- if the resourceLocationString wasn't able to be parsed or converted into a validIDhApiBlockStateWrapper
ClassCastException
- if the wrong levelWrapper type was given- Since:
- API 3.0.0
-