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

@@ -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"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/mushroom3"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower3"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flowerglimmering3"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower8tall0"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower8tall1"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/mushroom8"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower8"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flowerglimmering8"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower5tall0"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower5tall1"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/mushroom5"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower5"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flowerglimmering5"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower2tall0"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower2tall1"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/mushroom2"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower2"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flowerglimmering2"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower1tall0"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower1tall1"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/mushroom1"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower1"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flowerglimmering1"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower6tall0"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower6tall1"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/mushroom6"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower6"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flowerglimmering6"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower10tall0"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower10tall1"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/mushroom10"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower10"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flowerglimmering10"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower14tall0"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower14tall1"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/mushroom14"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower14"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flowerglimmering14"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower0tall0"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower0tall1"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/mushroom0"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower0"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flowerglimmering0"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower4tall0"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower4tall1"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/mushroom4"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flower4"
}
@@ -1,5 +1,5 @@
{
"parent": "minecraft:block/cross",
"parent": "botania:block/shapes/cross_tinted",
"textures": {
"cross": "botania:blocks/flowerglimmering4"
}
@@ -1,4 +0,0 @@
{
"parent": "builtin/entity",
"__comment": "Replaced on startup during ModelBakeEvent"
}
@@ -1,4 +0,0 @@
{
"parent": "builtin/entity",
"__comment": "Replaced on startup during ModelBakeEvent"
}
@@ -1,4 +0,0 @@
{
"parent": "builtin/entity",
"__comment": "Replaced on startup during ModelBakeEvent"
}
@@ -1,4 +0,0 @@
{
"parent": "builtin/entity",
"__comment": "Replaced on startup during ModelBakeEvent"
}
@@ -1,4 +0,0 @@
{
"parent": "builtin/entity",
"__comment": "Replaced on startup during ModelBakeEvent"
}
@@ -1,4 +0,0 @@
{
"parent": "builtin/entity",
"__comment": "Replaced on startup during ModelBakeEvent"
}
@@ -1,4 +0,0 @@
{
"parent": "builtin/entity",
"__comment": "Replaced on startup during ModelBakeEvent"
}
@@ -1,4 +0,0 @@
{
"parent": "builtin/entity",
"__comment": "Replaced on startup during ModelBakeEvent"
}
@@ -1,4 +0,0 @@
{
"parent": "builtin/entity",
"__comment": "Replaced on startup during ModelBakeEvent"
}
@@ -1,4 +0,0 @@
{
"parent": "builtin/entity",
"__comment": "Replaced on startup during ModelBakeEvent"
}
@@ -1,4 +0,0 @@
{
"parent": "builtin/entity",
"__comment": "Replaced on startup during ModelBakeEvent"
}
@@ -1,4 +0,0 @@
{
"parent": "builtin/entity",
"__comment": "Replaced on startup during ModelBakeEvent"
}
@@ -1,4 +0,0 @@
{
"parent": "builtin/entity",
"__comment": "Replaced on startup during ModelBakeEvent"
}
@@ -1,4 +0,0 @@
{
"parent": "builtin/entity",
"__comment": "Replaced on startup during ModelBakeEvent"
}
@@ -1,4 +0,0 @@
{
"parent": "builtin/entity",
"__comment": "Replaced on startup during ModelBakeEvent"
}
@@ -1,4 +0,0 @@
{
"parent": "builtin/entity",
"__comment": "Replaced on startup during ModelBakeEvent"
}
@@ -1,4 +0,0 @@
{
"parent": "builtin/entity",
"__comment": "Replaced on startup during ModelBakeEvent"
}
Loaded 100 of 213 files, more files were not shown because too many files have changed in this diff. Show more