mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-26 15:03:03 +00:00
Updates to internal handler and icons
This commit is contained in:
1 parent
a4a77fb20f
commit
972943a9ac
7 files changed
+70
-66
No files matched your search
@@ -1,11 +1,13 @@
|
||||
package vazkii.botania.api;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.Maps;
|
||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import vazkii.botania.api.subtile.SubTileEntity;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@@ -14,15 +16,14 @@ import java.util.Map;
|
||||
@SideOnly(Side.CLIENT)
|
||||
public final class BotaniaAPIClient {
|
||||
|
||||
public static final Map<String, ModelResourceLocation> queuedBlockModels = Maps.newHashMap();
|
||||
public static final Map<String, ModelResourceLocation> queuedItemModels = Maps.newHashMap();
|
||||
private static final Map<String, ModelResourceLocation> queuedBlockModels = Maps.newHashMap();
|
||||
private static final Map<String, ModelResourceLocation> queuedItemModels = Maps.newHashMap();
|
||||
|
||||
/**
|
||||
* Register your model for the given subtile class here.
|
||||
* Call this DURING PREINIT. Calling it anytime after blockModels have already baked does not guarantee that your model will work.
|
||||
* Your model json must specify key "tintindex" in all the faces it wants tint applied.
|
||||
* Tint is applied whenever a player recolors the flower using floral dye
|
||||
* todo 1.8.8 move this elsewhere or otherwise make it fit better with the rest of the subtile registration process
|
||||
*
|
||||
* @param subTileName The String ID of the subtile
|
||||
* @param model A path to a blockstate json and variant to be used for this subtile
|
||||
@@ -38,7 +39,6 @@ public final class BotaniaAPIClient {
|
||||
* Call this DURING PREINIT. Calling it anytime after blockModels have already baked does not guarantee that your model will work.
|
||||
* Your model json must specify key "tintindex" in all the faces it wants tint applied.
|
||||
* Tint is applied whenever a player recolors the flower using floral dye
|
||||
* todo 1.8.8 move this elsewhere or otherwise make it fit better with the rest of the subtile registration process
|
||||
*
|
||||
* @param subTileName The String ID of the subtile
|
||||
* @param model A path to a blockstate json and variant to be used the block. The item model will be drawn from the same blockstate json, from variant "inventory"
|
||||
@@ -56,6 +56,20 @@ public final class BotaniaAPIClient {
|
||||
registerSubtileModel(BotaniaAPI.getSubTileStringMapping(clazz), model, itemModel);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return An immutable view of the registered subtile block model map
|
||||
*/
|
||||
public static Map<String, ModelResourceLocation> getRegisteredSubtileBlockModels() {
|
||||
return Collections.unmodifiableMap(queuedBlockModels);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return An immutable view of the registered subtile item model map
|
||||
*/
|
||||
public static Map<String, ModelResourceLocation> getRegisteredSubtileItemModels() {
|
||||
return Collections.unmodifiableMap(queuedItemModels);
|
||||
}
|
||||
|
||||
private BotaniaAPIClient() {}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user