Generate floating flower item models and fix their in-hand transforms

This commit is contained in:
Vincent Lee committed 2020-02-17 11:05:34 -06:00
1 parent df11e72db3
commit c19c4ecbb3
213 files changed
+312 -349

No files matched your search

@@ -0,0 +1,3 @@
{
"parent": "botania:block/black_floating_flower"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/blue_floating_flower"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/brown_floating_flower"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/cyan_floating_flower"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_agricarnation"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_agricarnation_chibi"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_bellethorn"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_bellethorn_chibi"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_bergamute"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_bubbell"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_bubbell_chibi"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_clayconia"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_clayconia_chibi"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_daffomill"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_dandelifeon"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_dreadthorn"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_endoflame"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_entropinnyum"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_exoflame"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_fallen_kanade"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_gourmaryllis"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_heisei_dream"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_hopperhock"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_hopperhock_chibi"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_hyacidus"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_hydroangeas"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_jaded_amaranthus"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_jiyuulia"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_kekimurus"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_loonium"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_manastar"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_marimorphosis"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_marimorphosis_chibi"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_medumone"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_munchdew"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_narslimmus"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_orechid"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_orechid_ignem"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_pollidisiac"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_pure_daisy"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_rafflowsia"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_rannuncarpus"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_rannuncarpus_chibi"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_rosa_arcana"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_shulk_me_not"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_solegnolia"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_solegnolia_chibi"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_spectranthemum"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_spectrolus"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_tangleberrie"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_thermalily"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_tigerseye"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/floating_vinculotus"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/gray_floating_flower"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/green_floating_flower"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/light_blue_floating_flower"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/light_gray_floating_flower"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/lime_floating_flower"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/magenta_floating_flower"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/orange_floating_flower"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/pink_floating_flower"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/purple_floating_flower"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/red_floating_flower"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/white_floating_flower"
}
@@ -0,0 +1,3 @@
{
"parent": "botania:block/yellow_floating_flower"
}
@@ -115,15 +115,6 @@ public class MiscellaneousIcons {
@SubscribeEvent
public void onModelBake(ModelBakeEvent evt) {
// Floating flower item models
for (Map.Entry<ResourceLocation, IBakedModel> e : evt.getModelRegistry().entrySet()) {
if (e.getValue() instanceof FloatingFlowerModel.Baked) {
ResourceLocation stripVariant = new ResourceLocation(e.getKey().getNamespace(), e.getKey().getPath());
ModelResourceLocation itemPath = new ModelResourceLocation(stripVariant, "inventory");
evt.getModelRegistry().put(itemPath, e.getValue());
}
}
// Platforms
ModelResourceLocation abstruseName = new ModelResourceLocation("botania:abstruse_platform", "");
IBakedModel abstruse = evt.getModelRegistry().get(abstruseName);
@@ -14,6 +14,7 @@ public class DataGenerators {
evt.getGenerator().addProvider(new ItemTagProvider(evt.getGenerator()));
evt.getGenerator().addProvider(new StonecuttingProvider(evt.getGenerator()));
evt.getGenerator().addProvider(new FloatingFlowerModelProvider(evt.getGenerator(), evt.getExistingFileHelper()));
evt.getGenerator().addProvider(new ItemModelProvider(evt.getGenerator(), evt.getExistingFileHelper()));
evt.getGenerator().addProvider(new BlockstateProvider(evt.getGenerator(), evt.getExistingFileHelper()));
}
}
@@ -0,0 +1,36 @@
package vazkii.botania.data;
import net.minecraft.data.DataGenerator;
import net.minecraft.item.BlockItem;
import net.minecraft.util.registry.Registry;
import net.minecraftforge.client.model.generators.ExistingFileHelper;
import vazkii.botania.common.block.decor.BlockFloatingFlower;
import vazkii.botania.common.lib.LibMisc;
import javax.annotation.Nonnull;
import static vazkii.botania.common.lib.ResourceLocationHelper.prefix;
public class ItemModelProvider extends net.minecraftforge.client.model.generators.ItemModelProvider {
public ItemModelProvider(DataGenerator generator, ExistingFileHelper existingFileHelper) {
super(generator, LibMisc.MOD_ID, existingFileHelper);
}
@Override
protected void registerModels() {
Registry.ITEM.stream().filter(i -> LibMisc.MOD_ID.equals(i.getRegistryName().getNamespace()))
.forEach(i -> {
// todo 1.15 expand to all item models that simply reference their parent
if (i instanceof BlockItem && ((BlockItem) i).getBlock() instanceof BlockFloatingFlower) {
String name = i.getRegistryName().getPath();
withExistingParent(name, prefix("block/" + name));
}
});
}
@Nonnull
@Override
public String getName() {
return "Botania item models";
}
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower15tall0"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower15tall1"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/mushroom15"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower15"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flowerglimmering15"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower11tall0"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower11tall1"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/mushroom11"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower11"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flowerglimmering11"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower12tall0"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower12tall1"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/mushroom12"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower12"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flowerglimmering12"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower9tall0"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower9tall1"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/mushroom9"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower9"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flowerglimmering9"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower7tall0"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower7tall1"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/mushroom7"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower7"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flowerglimmering7"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower13tall0"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower13tall1"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/mushroom13"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower13"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flowerglimmering13"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower3tall0"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower3tall1"
}
Loaded 100 of 213 files, more files were not shown because too many files have changed in this diff. Show more