Class ResourceManager
java.lang.Object
io.github.thebusybiscuit.slimefun4.api.geo.ResourceManager
The
ResourceManager is responsible for registering and managing a GEOResource.
You have to use the ResourceManager if you want to generate or consume a GEOResource too.- Author:
- TheBusyBiscuit
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetSupplies(GEOResource resource, World world, int x, int z) This method returns the amount of a certainGEOResourcefound in a givenChunk.voidvoidsetSupplies(GEOResource resource, World world, int x, int z, int value) This method will set the supplies in a givenChunkto the specified value.
-
Constructor Details
-
ResourceManager
This will create a newResourceManager.- Parameters:
plugin- OurSlimefuninstance
-
-
Method Details
-
getSupplies
@Nonnull public OptionalInt getSupplies(@Nonnull GEOResource resource, @Nonnull World world, int x, int z) This method returns the amount of a certainGEOResourcefound in a givenChunk. The result is anOptionalIntwhich will be empty if thisGEOResourcehas not been generated at thatLocationyet.- Parameters:
resource- TheGEOResourceto queryworld- TheWorldof thisLocationx- TheChunkx coordinatez- TheChunkz coordinate- Returns:
- An
OptionalInt, either empty or containing the amount of the givenGEOResource
-
setSupplies
public void setSupplies(@Nonnull GEOResource resource, @Nonnull World world, int x, int z, int value) This method will set the supplies in a givenChunkto the specified value.- Parameters:
resource- TheGEOResourceworld- TheWorldx- The x coordinate of thatChunkz- The z coordinate of thatChunkvalue- The new supply value
-
scan
-