Files
Botania/src/main/java/vazkii/botania/api/BotaniaAPIClient.java
T
Vincent Lee bf6dccfcd2 Beginning of work to flatten all special flowers. not compiling yet
more work. almost done.

Compiling and launching worlds

Fix models and other bugs

Cleanup ,fix flower langs and tooltips

remove old specialflower blockstate json
2019-05-08 23:04:53 -05:00

51 lines
1.6 KiB
Java

/**
* This class was created by <williewillus>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
* <p>
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
*/
package vazkii.botania.api;
import com.google.common.collect.Maps;
import net.minecraft.client.renderer.model.ModelResourceLocation;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import vazkii.botania.api.item.IFloatingFlower;
import java.util.Collections;
import java.util.Map;
/**
* Class for API calls that must be made clientside
*/
@OnlyIn(Dist.CLIENT)
public final class BotaniaAPIClient {
private static final Map<IFloatingFlower.IslandType, ModelResourceLocation> islandTypeModels = Maps.newHashMap();
private BotaniaAPIClient() {
}
/**
* Registers your model for island type islandType here.
* Call this during {@code ModelRegistryEvent}.
*
* @param islandType The islandtype to register
* @param model The variant within a blockstate json to use as the islandtype's model
*/
public static void registerIslandTypeModel(IFloatingFlower.IslandType islandType, ModelResourceLocation model) {
islandTypeModels.put(islandType, model);
}
/**
* @return An immutable and live view of the registered island type model map
*/
public static Map<IFloatingFlower.IslandType, ModelResourceLocation> getRegisteredIslandTypeModels() {
return Collections.unmodifiableMap(islandTypeModels);
}
}