Interface IDhApiWrapperFactory
public interface IDhApiWrapperFactory
This handles creating abstract wrapper objects.
- Since:
- API 2.0.0
-
Method Summary
Modifier and TypeMethodDescriptionReturns theIDhApiBlockStateWrapperrepresenting air.getBiomeWrapper(Object[] objectArray, IDhApiLevelWrapper levelWrapper) Constructs aIDhApiBiomeWrapperfor use by other DhApi methods.getBiomeWrapper(String resourceLocationString, IDhApiLevelWrapper levelWrapper) Constructs aIDhApiBiomeWrapperfor use by other DhApi methods.getBlockStateWrapper(Object[] objectArray, IDhApiLevelWrapper levelWrapper) Constructs aIDhApiBlockStateWrapperfor use by other DhApi methods.getDefaultBlockStateWrapper(String resourceLocationString, IDhApiLevelWrapper levelWrapper) Constructs aIDhApiBlockStateWrapperfor use by other DhApi methods.
-
Method Details
-
getBiomeWrapper
IDhApiBiomeWrapper getBiomeWrapper(Object[] objectArray, IDhApiLevelWrapper levelWrapper) throws ClassCastException Constructs aIDhApiBiomeWrapperfor 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 aIDhApiLevelWrapperreturned by one of DH'sDhApi.Delayed.worldProxymethods.
A custom implementation ofIDhApiLevelWrapperwill 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 aIDhApiBlockStateWrapperfor 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 aIDhApiBlockStateWrapperreturned by one of DH'sDhApi.Delayed.worldProxymethods.
A custom implementation ofIDhApiBlockStateWrapperwill 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 theIDhApiBlockStateWrapperrepresenting air.- Since:
- API 2.0.0
-
getBiomeWrapper
IDhApiBiomeWrapper getBiomeWrapper(String resourceLocationString, IDhApiLevelWrapper levelWrapper) throws IOException, ClassCastException Constructs aIDhApiBiomeWrapperfor use by other DhApi methods.- Parameters:
resourceLocationString- example: "minecraft:plains"levelWrapper- Expects aIDhApiLevelWrapperreturned by one of DH'sDhApi.Delayed.worldProxymethods.
A custom implementation ofIDhApiLevelWrapperwill not be accepted.- Throws:
IOException- if the resourceLocationString wasn't able to be parsed or converted into a validIDhApiBiomeWrapperClassCastException- if the wrong levelWrapper type was given- Since:
- API 3.0.0
-
getDefaultBlockStateWrapper
IDhApiBlockStateWrapper getDefaultBlockStateWrapper(String resourceLocationString, IDhApiLevelWrapper levelWrapper) throws IOException, ClassCastException Constructs aIDhApiBlockStateWrapperfor 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 aIDhApiBlockStateWrapperreturned by one of DH'sDhApi.Delayed.worldProxymethods.
A custom implementation ofIDhApiBlockStateWrapperwill not be accepted.- Throws:
IOException- if the resourceLocationString wasn't able to be parsed or converted into a validIDhApiBlockStateWrapperClassCastException- if the wrong levelWrapper type was given- Since:
- API 3.0.0
-