use of net.minecraftforge.client.model.generators.ModelFile in project Tropicraft by Tropicraft.
the class TropicraftBlockstateProvider method registerStatesAndModels.
@Override
protected void registerStatesAndModels() {
simpleBlock(TropicraftBlocks.CHUNK, applyRotations());
// Ores and storage blocks
simpleBlock(TropicraftBlocks.AZURITE_ORE);
simpleBlock(TropicraftBlocks.EUDIALYTE_ORE);
simpleBlock(TropicraftBlocks.MANGANESE_ORE);
simpleBlock(TropicraftBlocks.SHAKA_ORE);
simpleBlock(TropicraftBlocks.ZIRCON_ORE);
simpleBlock(TropicraftBlocks.AZURITE_BLOCK);
simpleBlock(TropicraftBlocks.EUDIALYTE_BLOCK);
simpleBlock(TropicraftBlocks.MANGANESE_BLOCK);
simpleBlock(TropicraftBlocks.SHAKA_BLOCK);
simpleBlock(TropicraftBlocks.ZIRCON_BLOCK);
simpleBlock(TropicraftBlocks.ZIRCONIUM_BLOCK);
// All flowers
final BlockModelProvider models = models();
TropicraftBlocks.FLOWERS.entrySet().forEach(e -> simpleBlock(e.getValue(), models.withExistingParent(e.getKey().getId(), "block/cross").texture("cross", "tropicraft:block/flower/" + e.getKey().getId())));
// Purified sand
ModelFile normal = cubeAll(TropicraftBlocks.PURIFIED_SAND);
ModelFile calcified = cubeTop(TropicraftBlocks.PURIFIED_SAND, "calcified");
ModelFile dune1 = cubeTop(TropicraftBlocks.PURIFIED_SAND, "dune1");
ModelFile dune2 = cubeTop(TropicraftBlocks.PURIFIED_SAND, "dune2");
ModelFile starfish = cubeTop(TropicraftBlocks.PURIFIED_SAND, "starfish");
getVariantBuilder(TropicraftBlocks.PURIFIED_SAND.get()).partialState().with(BlockTropicraftSand.UNDERWATER, false).addModels(allRotations(normal, false, 50)).addModels(allYRotations(calcified, 0, false, 5)).partialState().with(BlockTropicraftSand.UNDERWATER, true).addModels(allRotations(normal, false, 50)).addModels(allYRotations(dune1, 0, false, 10)).addModels(allYRotations(dune2, 0, false, 10)).addModels(allYRotations(starfish, 0, false));
// Other sands
simpleBlock(TropicraftBlocks.PACKED_PURIFIED_SAND, applyRotations());
simpleBlock(TropicraftBlocks.CORAL_SAND, applyRotations());
simpleBlock(TropicraftBlocks.FOAMY_SAND, applyRotations());
simpleBlock(TropicraftBlocks.VOLCANIC_SAND, applyRotations());
simpleBlock(TropicraftBlocks.MINERAL_SAND, applyRotations());
// Mud
ConfiguredModel[] mudModels = ArrayUtils.addAll(allYRotations(models.cubeAll("mud", modBlockLoc("mud")), 0, false, 5), allYRotations(models.cubeAll("mud_with_stones", modBlockLoc("mud_with_stones")), 0, false, 1));
simpleBlock(TropicraftBlocks.MUD.get(), mudModels);
simpleBlock(TropicraftBlocks.MUD_WITH_PIANGUAS, applyYRotations(0));
// Bundles
axisBlock(TropicraftBlocks.BAMBOO_BUNDLE, "bamboo");
axisBlock(TropicraftBlocks.THATCH_BUNDLE, "thatch");
// Planks & Logs
simpleBlock(TropicraftBlocks.MAHOGANY_PLANKS);
simpleBlock(TropicraftBlocks.PALM_PLANKS);
simpleBlock(TropicraftBlocks.MANGROVE_PLANKS);
logBlock(TropicraftBlocks.MAHOGANY_LOG.get());
logBlock(TropicraftBlocks.PALM_LOG.get());
woodBlock(TropicraftBlocks.MAHOGANY_WOOD, TropicraftBlocks.MAHOGANY_LOG);
woodBlock(TropicraftBlocks.PALM_WOOD, TropicraftBlocks.PALM_LOG);
logBlock(TropicraftBlocks.RED_MANGROVE_LOG.get());
woodBlock(TropicraftBlocks.RED_MANGROVE_WOOD, TropicraftBlocks.RED_MANGROVE_LOG);
logBlock(TropicraftBlocks.LIGHT_MANGROVE_LOG.get());
woodBlock(TropicraftBlocks.LIGHT_MANGROVE_WOOD, TropicraftBlocks.LIGHT_MANGROVE_LOG);
logBlock(TropicraftBlocks.BLACK_MANGROVE_LOG.get());
woodBlock(TropicraftBlocks.BLACK_MANGROVE_WOOD, TropicraftBlocks.BLACK_MANGROVE_LOG);
mangroveRoots(TropicraftBlocks.RED_MANGROVE_ROOTS);
mangroveRoots(TropicraftBlocks.LIGHT_MANGROVE_ROOTS);
mangroveRoots(TropicraftBlocks.BLACK_MANGROVE_ROOTS);
logBlock(TropicraftBlocks.STRIPPED_MANGROVE_LOG.get());
woodBlock(TropicraftBlocks.STRIPPED_MANGROVE_WOOD, TropicraftBlocks.STRIPPED_MANGROVE_LOG);
logBlock(TropicraftBlocks.PAPAYA_LOG.get());
woodBlock(TropicraftBlocks.PAPAYA_WOOD, TropicraftBlocks.PAPAYA_LOG);
// Stairs & Slabs
stairsBlock(TropicraftBlocks.BAMBOO_STAIRS, "bamboo_side", "bamboo_end");
stairsBlock(TropicraftBlocks.THATCH_STAIRS, "thatch_side", "thatch_end");
stairsBlock(TropicraftBlocks.CHUNK_STAIRS, "chunk");
stairsBlock(TropicraftBlocks.PALM_STAIRS, "palm_planks");
stairsBlock(TropicraftBlocks.MAHOGANY_STAIRS, "mahogany_planks");
stairsBlock(TropicraftBlocks.MANGROVE_STAIRS, "mangrove_planks");
ModelFile fuzzyThatch = fuzzyStairs("thatch_stairs_fuzzy", "thatch_side", "thatch_end", "thatch_grass");
ModelFile fuzzyThatchOuter = fuzzyStairsOuter("thatch_stairs_fuzzy_outer", "thatch_side", "thatch_end", "thatch_grass");
stairsBlock(TropicraftBlocks.THATCH_STAIRS_FUZZY.get(), fuzzyThatch, models.getExistingFile(modLoc("thatch_stairs_inner")), fuzzyThatchOuter);
slabBlock(TropicraftBlocks.BAMBOO_SLAB, TropicraftBlocks.BAMBOO_BUNDLE, "bamboo_side", "bamboo_end");
slabBlock(TropicraftBlocks.THATCH_SLAB, TropicraftBlocks.THATCH_BUNDLE, "thatch_side", "thatch_end");
slabBlock(TropicraftBlocks.CHUNK_SLAB, TropicraftBlocks.CHUNK);
slabBlock(TropicraftBlocks.PALM_SLAB, TropicraftBlocks.PALM_PLANKS);
slabBlock(TropicraftBlocks.MAHOGANY_SLAB, TropicraftBlocks.MAHOGANY_PLANKS);
slabBlock(TropicraftBlocks.MANGROVE_SLAB, TropicraftBlocks.MANGROVE_PLANKS);
// Leaves
simpleBlock(TropicraftBlocks.MAHOGANY_LEAVES);
simpleBlock(TropicraftBlocks.PALM_LEAVES);
simpleBlock(TropicraftBlocks.KAPOK_LEAVES);
simpleBlock(TropicraftBlocks.FRUIT_LEAVES);
simpleBlock(TropicraftBlocks.GRAPEFRUIT_LEAVES);
simpleBlock(TropicraftBlocks.LEMON_LEAVES);
simpleBlock(TropicraftBlocks.LIME_LEAVES);
simpleBlock(TropicraftBlocks.ORANGE_LEAVES);
simpleBlock(TropicraftBlocks.PAPAYA_LEAVES);
simpleBlock(TropicraftBlocks.RED_MANGROVE_LEAVES);
simpleBlock(TropicraftBlocks.TALL_MANGROVE_LEAVES);
simpleBlock(TropicraftBlocks.TEA_MANGROVE_LEAVES);
simpleBlock(TropicraftBlocks.BLACK_MANGROVE_LEAVES);
// Saplings
plant(TropicraftBlocks.MAHOGANY_SAPLING);
plant(TropicraftBlocks.PALM_SAPLING);
plant(TropicraftBlocks.GRAPEFRUIT_SAPLING);
plant(TropicraftBlocks.LEMON_SAPLING);
plant(TropicraftBlocks.LIME_SAPLING);
plant(TropicraftBlocks.ORANGE_SAPLING);
plant(TropicraftBlocks.PAPAYA_SAPLING);
propagule(TropicraftBlocks.RED_MANGROVE_PROPAGULE);
propagule(TropicraftBlocks.TALL_MANGROVE_PROPAGULE);
propagule(TropicraftBlocks.TEA_MANGROVE_PROPAGULE);
propagule(TropicraftBlocks.BLACK_MANGROVE_PROPAGULE);
// Fences, Gates, and Walls
fenceBlock(TropicraftBlocks.BAMBOO_FENCE, "bamboo_side");
fenceBlock(TropicraftBlocks.THATCH_FENCE, "thatch_side");
fenceBlock(TropicraftBlocks.CHUNK_FENCE, "chunk");
fenceBlock(TropicraftBlocks.PALM_FENCE, "palm_planks");
fenceBlock(TropicraftBlocks.MAHOGANY_FENCE, "mahogany_planks");
fenceBlock(TropicraftBlocks.MANGROVE_FENCE, "mangrove_planks");
fenceGateBlock(TropicraftBlocks.BAMBOO_FENCE_GATE, "bamboo_side");
fenceGateBlock(TropicraftBlocks.THATCH_FENCE_GATE, "thatch_side");
fenceGateBlock(TropicraftBlocks.CHUNK_FENCE_GATE, "chunk");
fenceGateBlock(TropicraftBlocks.PALM_FENCE_GATE, "palm_planks");
fenceGateBlock(TropicraftBlocks.MAHOGANY_FENCE_GATE, "mahogany_planks");
fenceGateBlock(TropicraftBlocks.MANGROVE_FENCE_GATE, "mangrove_planks");
wallBlock(TropicraftBlocks.CHUNK_WALL, "chunk");
// Doors and Trapdoors
doorBlock(TropicraftBlocks.BAMBOO_DOOR);
doorBlock(TropicraftBlocks.THATCH_DOOR);
doorBlock(TropicraftBlocks.PALM_DOOR);
doorBlock(TropicraftBlocks.MAHOGANY_DOOR);
doorBlock(TropicraftBlocks.MANGROVE_DOOR);
trapdoorBlock(TropicraftBlocks.BAMBOO_TRAPDOOR);
trapdoorBlock(TropicraftBlocks.THATCH_TRAPDOOR);
trapdoorBlock(TropicraftBlocks.PALM_TRAPDOOR);
trapdoorBlock(TropicraftBlocks.MAHOGANY_TRAPDOOR);
trapdoorBlock(TropicraftBlocks.MANGROVE_TRAPDOOR);
// Misc remaining blocks
doublePlant(TropicraftBlocks.IRIS);
doublePlant(TropicraftBlocks.PINEAPPLE);
reedsBlock(TropicraftBlocks.REEDS);
bongo(TropicraftBlocks.SMALL_BONGO_DRUM);
bongo(TropicraftBlocks.MEDIUM_BONGO_DRUM);
bongo(TropicraftBlocks.LARGE_BONGO_DRUM);
ModelFile bambooLadder = models.withExistingParent(name(TropicraftBlocks.BAMBOO_LADDER), "ladder").texture("particle", blockTexture(TropicraftBlocks.BAMBOO_LADDER)).texture("texture", blockTexture(TropicraftBlocks.BAMBOO_LADDER));
// TODO make horizontalBlock etc support this case
getVariantBuilder(TropicraftBlocks.BAMBOO_LADDER.get()).forAllStatesExcept(state -> ConfiguredModel.builder().modelFile(bambooLadder).rotationY(((int) state.getValue(BlockStateProperties.HORIZONTAL_FACING).toYRot() + 180) % 360).build(), LadderBlock.WATERLOGGED);
boardwalk(TropicraftBlocks.BAMBOO_BOARDWALK, modBlockLoc("bamboo_side"));
boardwalk(TropicraftBlocks.PALM_BOARDWALK, blockTexture(TropicraftBlocks.PALM_PLANKS));
boardwalk(TropicraftBlocks.MAHOGANY_BOARDWALK, blockTexture(TropicraftBlocks.MAHOGANY_PLANKS));
boardwalk(TropicraftBlocks.MANGROVE_BOARDWALK, blockTexture(TropicraftBlocks.MANGROVE_PLANKS));
noModelBlock(TropicraftBlocks.BAMBOO_CHEST, modBlockLoc("bamboo_side"));
simpleBlock(TropicraftBlocks.SIFTER);
noModelBlock(TropicraftBlocks.DRINK_MIXER, blockTexture(TropicraftBlocks.CHUNK));
noModelBlock(TropicraftBlocks.AIR_COMPRESSOR, blockTexture(TropicraftBlocks.CHUNK));
getVariantBuilder(TropicraftBlocks.COFFEE_BUSH.get()).forAllStates(state -> ConfiguredModel.builder().modelFile(coffeeBush(state.getValue(CoffeeBushBlock.AGE))).build());
plant(TropicraftBlocks.GOLDEN_LEATHER_FERN, modBlockLoc("small_golden_leather_fern"));
doublePlant(TropicraftBlocks.TALL_GOLDEN_LEATHER_FERN);
hugePlant(TropicraftBlocks.LARGE_GOLDEN_LEATHER_FERN, modBlockLoc("large_golden_leather_fern"), blockTexture(TropicraftBlocks.GOLDEN_LEATHER_FERN));
simpleBlock(TropicraftBlocks.VOLCANO, models.getExistingFile(mcLoc("block/bedrock")));
ModelFile tikiLower = models.torch("tiki_torch_lower", modBlockLoc("tiki_torch_lower"));
ModelFile tikiUpper = models.torch("tiki_torch_upper", modBlockLoc("tiki_torch_upper"));
getVariantBuilder(TropicraftBlocks.TIKI_TORCH.get()).forAllStates(state -> ConfiguredModel.builder().modelFile(state.getValue(TikiTorchBlock.SECTION) == TorchSection.UPPER ? tikiUpper : tikiLower).build());
simpleBlock(TropicraftBlocks.COCONUT, models.cross("coconut", modBlockLoc("coconut")));
flowerPot(TropicraftBlocks.BAMBOO_FLOWER_POT, TropicraftBlocks.BAMBOO_FLOWER_POT, modBlockLoc("bamboo_side"));
for (RegistryObject<FlowerPotBlock> block : TropicraftBlocks.BAMBOO_POTTED_TROPICS_PLANTS) {
flowerPot(block, TropicraftBlocks.BAMBOO_FLOWER_POT, modBlockLoc("bamboo_side"));
}
for (RegistryObject<FlowerPotBlock> block : TropicraftBlocks.VANILLA_POTTED_TROPICS_PLANTS) {
flowerPot(block, Blocks.FLOWER_POT.delegate);
}
for (RegistryObject<FlowerPotBlock> block : TropicraftBlocks.BAMBOO_POTTED_VANILLA_PLANTS) {
flowerPot(block, TropicraftBlocks.BAMBOO_FLOWER_POT, modBlockLoc("bamboo_side"));
}
models.withExistingParent("bamboo_item_frame", "item_frame").texture("particle", modBlockLoc("bamboo_side")).texture("wood", modBlockLoc("bamboo_side"));
models.withExistingParent("bamboo_item_frame_map", "item_frame_map").texture("particle", modBlockLoc("bamboo_side")).texture("wood", modBlockLoc("bamboo_side"));
TropicraftBlocks.JIGARBOV_WALL_TORCHES.forEach((type, block) -> jigarbovTorch(block, type));
models.withExistingParent("papaya_stage0", "cocoa_stage2").texture("particle", modBlockLoc("papaya_stage0")).texture("cocoa", modBlockLoc("papaya_stage0"));
}
use of net.minecraftforge.client.model.generators.ModelFile in project Totemic by TeamTotemic.
the class TotemicBlockStateProvider method registerStatesAndModels.
@Override
protected void registerStatesAndModels() {
for (TotemBaseBlock block : ModBlocks.getTotemBases().values()) {
ResourceLocation blockName = block.getRegistryName();
ModelFile blockModel = models().getExistingFile(new ResourceLocation(blockName.getNamespace(), ModelProvider.BLOCK_FOLDER + "/" + blockName.getPath()));
// Block state
horizontalBlock(block, blockModel);
// Item model
itemModels().withExistingParent(block.getRegistryName().toString(), blockModel.getLocation());
}
}
use of net.minecraftforge.client.model.generators.ModelFile in project Tropicraft by Tropicraft.
the class TropicraftItemModelProvider method registerModels.
@Override
protected void registerModels() {
// BLOCKS
blockItem(TropicraftBlocks.CHUNK);
// Ores and storage blocks
blockItem(TropicraftBlocks.AZURITE_ORE);
blockItem(TropicraftBlocks.EUDIALYTE_ORE);
blockItem(TropicraftBlocks.MANGANESE_ORE);
blockItem(TropicraftBlocks.SHAKA_ORE);
blockItem(TropicraftBlocks.ZIRCON_ORE);
blockItem(TropicraftBlocks.AZURITE_BLOCK);
blockItem(TropicraftBlocks.EUDIALYTE_BLOCK);
blockItem(TropicraftBlocks.MANGANESE_BLOCK);
blockItem(TropicraftBlocks.SHAKA_BLOCK);
blockItem(TropicraftBlocks.ZIRCON_BLOCK);
blockItem(TropicraftBlocks.ZIRCONIUM_BLOCK);
// All flowers
TropicraftBlocks.FLOWERS.entrySet().forEach(e -> blockSprite(e.getValue(), modLoc("block/flower/" + e.getKey().getId())));
// Sands
blockItem(TropicraftBlocks.PURIFIED_SAND);
blockItem(TropicraftBlocks.PACKED_PURIFIED_SAND);
blockItem(TropicraftBlocks.CORAL_SAND);
blockItem(TropicraftBlocks.FOAMY_SAND);
blockItem(TropicraftBlocks.VOLCANIC_SAND);
blockItem(TropicraftBlocks.MINERAL_SAND);
// Mud
blockItem(TropicraftBlocks.MUD);
blockItem(TropicraftBlocks.MUD_WITH_PIANGUAS);
// Bundles
blockItem(TropicraftBlocks.BAMBOO_BUNDLE);
blockItem(TropicraftBlocks.THATCH_BUNDLE);
// Planks & Logs
blockItem(TropicraftBlocks.MAHOGANY_PLANKS);
blockItem(TropicraftBlocks.PALM_PLANKS);
blockItem(TropicraftBlocks.MAHOGANY_LOG);
blockItem(TropicraftBlocks.PALM_LOG);
blockItem(TropicraftBlocks.MAHOGANY_WOOD);
blockItem(TropicraftBlocks.PALM_WOOD);
blockItem(TropicraftBlocks.PAPAYA_LOG);
blockItem(TropicraftBlocks.PAPAYA_WOOD);
blockItem(TropicraftBlocks.RED_MANGROVE_LOG);
blockItem(TropicraftBlocks.RED_MANGROVE_WOOD);
blockItem(TropicraftBlocks.LIGHT_MANGROVE_LOG);
blockItem(TropicraftBlocks.LIGHT_MANGROVE_WOOD);
blockItem(TropicraftBlocks.BLACK_MANGROVE_LOG);
blockItem(TropicraftBlocks.BLACK_MANGROVE_WOOD);
blockItem(TropicraftBlocks.STRIPPED_MANGROVE_LOG);
blockItem(TropicraftBlocks.STRIPPED_MANGROVE_WOOD);
blockItem(TropicraftBlocks.MANGROVE_PLANKS);
withExistingParent(name(TropicraftBlocks.RED_MANGROVE_ROOTS), modLoc("block/red_mangrove_roots_stem"));
withExistingParent(name(TropicraftBlocks.LIGHT_MANGROVE_ROOTS), modLoc("block/light_mangrove_roots_stem"));
withExistingParent(name(TropicraftBlocks.BLACK_MANGROVE_ROOTS), modLoc("block/black_mangrove_roots_stem"));
// Stairs & Slabs
blockItem(TropicraftBlocks.BAMBOO_STAIRS);
blockItem(TropicraftBlocks.THATCH_STAIRS);
blockItem(TropicraftBlocks.CHUNK_STAIRS);
blockItem(TropicraftBlocks.PALM_STAIRS);
blockItem(TropicraftBlocks.MAHOGANY_STAIRS);
blockItem(TropicraftBlocks.THATCH_STAIRS_FUZZY);
blockItem(TropicraftBlocks.MANGROVE_STAIRS);
blockItem(TropicraftBlocks.BAMBOO_SLAB);
blockItem(TropicraftBlocks.THATCH_SLAB);
blockItem(TropicraftBlocks.CHUNK_SLAB);
blockItem(TropicraftBlocks.PALM_SLAB);
blockItem(TropicraftBlocks.MAHOGANY_SLAB);
blockItem(TropicraftBlocks.MANGROVE_SLAB);
// Leaves
blockItem(TropicraftBlocks.MAHOGANY_LEAVES);
blockItem(TropicraftBlocks.PALM_LEAVES);
blockItem(TropicraftBlocks.KAPOK_LEAVES);
blockItem(TropicraftBlocks.FRUIT_LEAVES);
blockItem(TropicraftBlocks.GRAPEFRUIT_LEAVES);
blockItem(TropicraftBlocks.LEMON_LEAVES);
blockItem(TropicraftBlocks.LIME_LEAVES);
blockItem(TropicraftBlocks.ORANGE_LEAVES);
blockItem(TropicraftBlocks.PAPAYA_LEAVES);
blockItem(TropicraftBlocks.RED_MANGROVE_LEAVES);
blockItem(TropicraftBlocks.TALL_MANGROVE_LEAVES);
blockItem(TropicraftBlocks.TEA_MANGROVE_LEAVES);
blockItem(TropicraftBlocks.BLACK_MANGROVE_LEAVES);
// Saplings
blockSprite(TropicraftBlocks.MAHOGANY_SAPLING);
blockSprite(TropicraftBlocks.PALM_SAPLING);
blockSprite(TropicraftBlocks.GRAPEFRUIT_SAPLING);
blockSprite(TropicraftBlocks.LEMON_SAPLING);
blockSprite(TropicraftBlocks.LIME_SAPLING);
blockSprite(TropicraftBlocks.ORANGE_SAPLING);
blockSprite(TropicraftBlocks.PAPAYA_SAPLING);
blockSprite(TropicraftBlocks.RED_MANGROVE_PROPAGULE);
blockSprite(TropicraftBlocks.TALL_MANGROVE_PROPAGULE);
blockSprite(TropicraftBlocks.TEA_MANGROVE_PROPAGULE);
blockSprite(TropicraftBlocks.BLACK_MANGROVE_PROPAGULE);
// Fences, Gates, and Walls
blockWithInventoryModel(TropicraftBlocks.BAMBOO_FENCE);
blockWithInventoryModel(TropicraftBlocks.THATCH_FENCE);
blockWithInventoryModel(TropicraftBlocks.CHUNK_FENCE);
blockWithInventoryModel(TropicraftBlocks.PALM_FENCE);
blockWithInventoryModel(TropicraftBlocks.MAHOGANY_FENCE);
blockWithInventoryModel(TropicraftBlocks.MANGROVE_FENCE);
blockItem(TropicraftBlocks.BAMBOO_FENCE_GATE);
blockItem(TropicraftBlocks.THATCH_FENCE_GATE);
blockItem(TropicraftBlocks.CHUNK_FENCE_GATE);
blockItem(TropicraftBlocks.PALM_FENCE_GATE);
blockItem(TropicraftBlocks.MAHOGANY_FENCE_GATE);
blockItem(TropicraftBlocks.MANGROVE_FENCE_GATE);
blockWithInventoryModel(TropicraftBlocks.CHUNK_WALL);
// Doors and Trapdoors
generated(TropicraftBlocks.BAMBOO_DOOR);
generated(TropicraftBlocks.THATCH_DOOR);
generated(TropicraftBlocks.PALM_DOOR);
generated(TropicraftBlocks.MAHOGANY_DOOR);
generated(TropicraftBlocks.MANGROVE_DOOR);
blockItem(TropicraftBlocks.BAMBOO_TRAPDOOR, "_bottom");
blockItem(TropicraftBlocks.THATCH_TRAPDOOR, "_bottom");
blockItem(TropicraftBlocks.PALM_TRAPDOOR, "_bottom");
blockItem(TropicraftBlocks.MAHOGANY_TRAPDOOR, "_bottom");
blockItem(TropicraftBlocks.MANGROVE_TRAPDOOR, "_bottom");
// Misc remaining blocks
blockSprite(TropicraftBlocks.IRIS, modLoc("block/iris_top"));
blockSprite(TropicraftBlocks.PINEAPPLE, modLoc("block/pineapple_top"));
blockSprite(TropicraftBlocks.PAPAYA, modLoc("item/papaya"));
blockItem(TropicraftBlocks.SMALL_BONGO_DRUM);
blockItem(TropicraftBlocks.MEDIUM_BONGO_DRUM);
blockItem(TropicraftBlocks.LARGE_BONGO_DRUM);
blockSprite(TropicraftBlocks.BAMBOO_LADDER);
blockItem(TropicraftBlocks.BAMBOO_BOARDWALK, "_short");
blockItem(TropicraftBlocks.PALM_BOARDWALK, "_short");
blockItem(TropicraftBlocks.MAHOGANY_BOARDWALK, "_short");
blockItem(TropicraftBlocks.MANGROVE_BOARDWALK, "_short");
withExistingParent(name(TropicraftBlocks.BAMBOO_CHEST), mcLoc("item/chest")).texture("particle", modLoc("block/bamboo_side"));
blockItem(TropicraftBlocks.SIFTER);
withExistingParent(name(TropicraftBlocks.DRINK_MIXER), modLoc("item/tall_machine")).texture("particle", modLoc("block/chunk"));
withExistingParent(name(TropicraftBlocks.AIR_COMPRESSOR), modLoc("item/tall_machine")).texture("particle", modLoc("block/chunk"));
generated(TropicraftBlocks.GOLDEN_LEATHER_FERN, modLoc("item/golden_leather_fern"));
generated(TropicraftBlocks.TIKI_TORCH);
blockSprite(TropicraftBlocks.COCONUT);
generated(TropicraftBlocks.BAMBOO_FLOWER_POT);
generated(TropicraftItems.BAMBOO_ITEM_FRAME);
generated(TropicraftItems.FISHING_NET);
blockSprite(TropicraftBlocks.REEDS, modLoc("block/reeds_top_tall"));
generated(TropicraftItems.PIANGUAS);
// ITEMS
// Gems/Ingots
generated(TropicraftItems.AZURITE);
generated(TropicraftItems.EUDIALYTE);
generated(TropicraftItems.ZIRCON);
generated(TropicraftItems.ZIRCONIUM);
generated(TropicraftItems.SHAKA);
generated(TropicraftItems.MANGANESE);
// TODO dedupe
// All Umbrellas
ModelFile umbrella = getBuilder("umbrella").parent(new UncheckedModelFile("item/generated")).texture("layer0", modLoc(folder + "/umbrella")).texture("layer1", modLoc(folder + "/umbrella_inverted"));
for (RegistryObject<FurnitureItem<UmbrellaEntity>> umbrellaItem : TropicraftItems.UMBRELLAS.values()) {
getBuilder(name(umbrellaItem)).parent(umbrella);
}
// All chairs
ModelFile chair = getBuilder("chair").parent(new UncheckedModelFile("item/generated")).texture("layer0", modLoc(folder + "/chair")).texture("layer1", modLoc(folder + "/chair_inverted"));
for (RegistryObject<FurnitureItem<ChairEntity>> chairItem : TropicraftItems.CHAIRS.values()) {
getBuilder(name(chairItem)).parent(chair);
}
// All beach floats
ModelFile beachFloat = getBuilder("beach_float").parent(new UncheckedModelFile("item/generated")).texture("layer0", modLoc(folder + "/beach_float")).texture("layer1", modLoc(folder + "/beach_float_inverted"));
for (RegistryObject<FurnitureItem<BeachFloatEntity>> beachFloatItem : TropicraftItems.BEACH_FLOATS.values()) {
getBuilder(name(beachFloatItem)).parent(beachFloat);
}
// Bamboo Items
generated(TropicraftItems.BAMBOO_STICK);
ModelFile bambooSpearThrowing = withExistingParent("bamboo_spear_throwing", modLoc("spear_throwing")).texture("layer0", itemTexture(TropicraftItems.BAMBOO_SPEAR));
withExistingParent(name(TropicraftItems.BAMBOO_SPEAR), modLoc("spear")).texture("layer0", itemTexture(TropicraftItems.BAMBOO_SPEAR)).override().predicate(mcLoc("throwing"), 1).model(bambooSpearThrowing);
// Shells
generated(TropicraftItems.SOLONOX_SHELL);
generated(TropicraftItems.FROX_CONCH);
generated(TropicraftItems.PAB_SHELL);
generated(TropicraftItems.RUBE_NAUTILUS);
generated(TropicraftItems.STARFISH);
generated(TropicraftItems.TURTLE_SHELL);
generated(TropicraftItems.LOVE_TROPICS_SHELL, modLoc(folder + "/ltshell")).texture("layer1", modLoc(folder + "/ltshell_inverted"));
// Fruits
generated(TropicraftItems.LEMON);
generated(TropicraftItems.LIME);
generated(TropicraftItems.GRAPEFRUIT);
generated(TropicraftItems.ORANGE);
generated(TropicraftItems.PINEAPPLE_CUBES);
generated(TropicraftItems.COCONUT_CHUNK);
generated(TropicraftItems.RAW_COFFEE_BEAN);
generated(TropicraftItems.ROASTED_COFFEE_BEAN);
generated(TropicraftItems.COFFEE_BERRY);
// Cocktails
generated(TropicraftItems.BAMBOO_MUG);
ModelFile cocktail = getBuilder("template_cocktail").parent(new UncheckedModelFile("item/generated")).texture("layer0", modLoc(folder + "/cocktail")).texture("layer1", modLoc(folder + "/cocktail_contents"));
for (RegistryObject<CocktailItem> cocktailItem : TropicraftItems.COCKTAILS.values()) {
getBuilder(name(cocktailItem)).parent(cocktail);
}
// Trade items
generated(TropicraftItems.WHITE_PEARL);
generated(TropicraftItems.BLACK_PEARL);
generated(TropicraftItems.SCALE);
// Food
generated(TropicraftItems.FRESH_MARLIN);
generated(TropicraftItems.SEARED_MARLIN);
generated(TropicraftItems.RAW_RAY);
generated(TropicraftItems.COOKED_RAY);
generated(TropicraftItems.FROG_LEG);
generated(TropicraftItems.COOKED_FROG_LEG);
generated(TropicraftItems.SEA_URCHIN_ROE);
generated(TropicraftItems.TOASTED_NORI);
generated(TropicraftItems.RAW_FISH, modLoc(folder + "/smolfish"));
generated(TropicraftItems.COOKED_FISH, modLoc(folder + "/cooked_smolfish"));
generated(TropicraftItems.POISON_FROG_SKIN);
// Mob drops
generated(TropicraftItems.IGUANA_LEATHER);
// Tools
generated(TropicraftItems.ZIRCON_AXE);
generated(TropicraftItems.ZIRCON_HOE);
generated(TropicraftItems.ZIRCON_PICKAXE);
generated(TropicraftItems.ZIRCON_SWORD);
generated(TropicraftItems.ZIRCON_SHOVEL);
generated(TropicraftItems.ZIRCONIUM_AXE);
generated(TropicraftItems.ZIRCONIUM_HOE);
generated(TropicraftItems.ZIRCONIUM_PICKAXE);
generated(TropicraftItems.ZIRCONIUM_SWORD);
generated(TropicraftItems.ZIRCONIUM_SHOVEL);
generated(TropicraftItems.EUDIALYTE_AXE);
generated(TropicraftItems.EUDIALYTE_HOE);
generated(TropicraftItems.EUDIALYTE_PICKAXE);
generated(TropicraftItems.EUDIALYTE_SWORD);
generated(TropicraftItems.EUDIALYTE_SHOVEL);
// Misc
generated(TropicraftItems.TROPICAL_FERTILIZER);
generated(TropicraftItems.PIRANHA_BUCKET);
generated(TropicraftItems.SARDINE_BUCKET);
generated(TropicraftItems.TROPICAL_FISH_BUCKET);
generated(TropicraftItems.DAGGER);
TropicraftItems.ASHEN_MASKS.values().forEach(this::generated);
generated(TropicraftItems.BLOW_GUN);
generated(TropicraftItems.NIGEL_STACHE);
generated(TropicraftItems.WATER_WAND);
generated(TropicraftItems.EXPLODING_COCONUT);
// Discs
TropicraftItems.MUSIC_DISCS.values().forEach(this::generated);
// Spawn Eggs
generated(TropicraftItems.KOA_SPAWN_EGG);
generated(TropicraftItems.TROPICREEPER_SPAWN_EGG);
generated(TropicraftItems.IGUANA_SPAWN_EGG);
generated(TropicraftItems.TROPISKELLY_SPAWN_EGG);
generated(TropicraftItems.EIH_SPAWN_EGG);
generated(TropicraftItems.SEA_TURTLE_SPAWN_EGG);
generated(TropicraftItems.MARLIN_SPAWN_EGG);
generated(TropicraftItems.FAILGULL_SPAWN_EGG);
generated(TropicraftItems.DOLPHIN_SPAWN_EGG);
generated(TropicraftItems.SEAHORSE_SPAWN_EGG);
generated(TropicraftItems.TREE_FROG_SPAWN_EGG);
generated(TropicraftItems.SEA_URCHIN_SPAWN_EGG);
generated(TropicraftItems.V_MONKEY_SPAWN_EGG);
generated(TropicraftItems.PIRANHA_SPAWN_EGG);
generated(TropicraftItems.SARDINE_SPAWN_EGG);
generated(TropicraftItems.TROPICAL_FISH_SPAWN_EGG);
generated(TropicraftItems.EAGLE_RAY_SPAWN_EGG);
generated(TropicraftItems.TROPI_SPIDER_SPAWN_EGG);
generated(TropicraftItems.ASHEN_SPAWN_EGG);
generated(TropicraftItems.HAMMERHEAD_SPAWN_EGG);
generated(TropicraftItems.COWKTAIL_SPAWN_EGG);
generated(TropicraftItems.MAN_O_WAR_SPAWN_EGG);
generated(TropicraftItems.TROPIBEE_SPAWN_EGG);
generated(TropicraftItems.TAPIR_SPAWN_EGG);
generated(TropicraftItems.JAGUAR_SPAWN_EGG);
generated(TropicraftItems.BROWN_BASILISK_LIZARD_SPAWN_EGG);
generated(TropicraftItems.GREEN_BASILISK_LIZARD_SPAWN_EGG);
generated(TropicraftItems.HUMMINGBIRD_SPAWN_EGG);
generated(TropicraftItems.FIDDLER_CRAB_SPAWN_EGG);
generated(TropicraftItems.SPIDER_MONKEY_SPAWN_EGG);
generated(TropicraftItems.WHITE_LIPPED_PECCARY_SPAWN_EGG);
generated(TropicraftItems.CUBERA_SPAWN_EGG);
// Armor
generated(TropicraftItems.FIRE_BOOTS);
generated(TropicraftItems.FIRE_CHESTPLATE);
generated(TropicraftItems.FIRE_HELMET);
generated(TropicraftItems.FIRE_LEGGINGS);
generated(TropicraftItems.SCALE_BOOTS);
generated(TropicraftItems.SCALE_CHESTPLATE);
generated(TropicraftItems.SCALE_HELMET);
generated(TropicraftItems.SCALE_LEGGINGS);
// Scuba
generated(TropicraftItems.YELLOW_SCUBA_GOGGLES);
generated(TropicraftItems.YELLOW_SCUBA_HARNESS);
generated(TropicraftItems.YELLOW_SCUBA_FLIPPERS);
generated(TropicraftItems.PINK_SCUBA_GOGGLES);
generated(TropicraftItems.PINK_SCUBA_HARNESS);
generated(TropicraftItems.PINK_SCUBA_FLIPPERS);
generated(TropicraftItems.YELLOW_PONY_BOTTLE);
generated(TropicraftItems.PINK_PONY_BOTTLE);
}
use of net.minecraftforge.client.model.generators.ModelFile in project Tropicraft by Tropicraft.
the class TropicraftBlockstateProvider method mangroveRoots.
private void mangroveRoots(Supplier<? extends Block> block) {
String name = name(block);
ResourceLocation roots = modBlockLoc(name);
ModelFile stem = models().withExistingParent(name(block) + "_stem", modBlockLoc("mangrove_roots/stem")).texture("roots", roots);
ModelFile stemShort = models().withExistingParent(name(block) + "_stem_short", modBlockLoc("mangrove_roots/stem_short")).texture("roots", roots);
ModelFile connectionLow = models().withExistingParent(name(block) + "_connection_low", modBlockLoc("mangrove_roots/connection_low")).texture("roots", roots);
ModelFile connectionHigh = models().withExistingParent(name(block) + "_connection_high", modBlockLoc("mangrove_roots/connection_high")).texture("roots", roots);
ModelFile appendagesHigh = models().withExistingParent(name(block) + "_appendages_high", modBlockLoc("mangrove_roots/appendages")).texture("appendages", modBlockLoc(name + "_appendages_high"));
ModelFile appendagesHighShort = models().withExistingParent(name(block) + "_appendages_high_short", modBlockLoc("mangrove_roots/appendages")).texture("appendages", modBlockLoc(name + "_appendages_high_short"));
ModelFile appendagesGrounded = models().withExistingParent(name(block) + "_appendages_ground", modBlockLoc("mangrove_roots/appendages")).texture("appendages", modBlockLoc(name + "_appendages_ground"));
ModelFile appendagesGroundedShort = models().withExistingParent(name(block) + "_appendages_ground_short", modBlockLoc("mangrove_roots/appendages")).texture("appendages", modBlockLoc(name + "_appendages_ground_short"));
MultiPartBlockStateBuilder builder = getMultipartBuilder(block.get());
builder.part().modelFile(stem).addModel().condition(MangroveRootsBlock.TALL, true);
builder.part().modelFile(stemShort).addModel().condition(MangroveRootsBlock.TALL, false);
builder.part().modelFile(appendagesGrounded).addModel().condition(MangroveRootsBlock.TALL, true).condition(MangroveRootsBlock.GROUNDED, true);
builder.part().modelFile(appendagesGroundedShort).addModel().condition(MangroveRootsBlock.TALL, false).condition(MangroveRootsBlock.GROUNDED, true);
builder.part().modelFile(appendagesHigh).addModel().condition(MangroveRootsBlock.TALL, true).condition(MangroveRootsBlock.GROUNDED, false);
builder.part().modelFile(appendagesHighShort).addModel().condition(MangroveRootsBlock.TALL, false).condition(MangroveRootsBlock.GROUNDED, false);
for (int i = 0; i < 4; i++) {
EnumProperty<MangroveRootsBlock.Connection> connection = MangroveRootsBlock.CONNECTIONS[i];
int rotation = (i * 90 + 270) % 360;
builder.part().modelFile(connectionHigh).rotationY(rotation).uvLock(true).addModel().condition(connection, MangroveRootsBlock.Connection.HIGH);
builder.part().modelFile(connectionLow).rotationY(rotation).uvLock(true).addModel().condition(connection, MangroveRootsBlock.Connection.LOW);
}
}
use of net.minecraftforge.client.model.generators.ModelFile in project Tropicraft by Tropicraft.
the class TropicraftBlockstateProvider method boardwalk.
private void boardwalk(Supplier<? extends Block> block, ResourceLocation texture) {
ModelFile shortModel = models().withExistingParent(name(block) + "_short", modBlockLoc("boardwalk/short")).texture("planks", texture);
ModelFile shortPostModel = models().withExistingParent(name(block) + "_short_post", modBlockLoc("boardwalk/short_post")).texture("planks", texture);
ModelFile tallModel = models().withExistingParent(name(block) + "_tall", modBlockLoc("boardwalk/tall")).texture("planks", texture);
ModelFile tallPostModel = models().withExistingParent(name(block) + "_tall_post", modBlockLoc("boardwalk/tall_post")).texture("planks", texture);
ModelFile tallConnectionModel = models().withExistingParent(name(block) + "_tall_connection", modBlockLoc("boardwalk/tall_connection")).texture("planks", texture);
MultiPartBlockStateBuilder builder = getMultipartBuilder(block.get());
Direction.Axis[] horizontals = new Direction.Axis[] { Direction.Axis.X, Direction.Axis.Z };
for (Direction.Axis axis : horizontals) {
int rotation = axis == Direction.Axis.X ? 270 : 0;
builder.part().modelFile(shortModel).rotationY(rotation).uvLock(true).addModel().condition(BoardwalkBlock.TYPE, BoardwalkBlock.Type.SHORTS).condition(BoardwalkBlock.AXIS, axis);
builder.part().modelFile(tallModel).rotationY(rotation).uvLock(true).addModel().condition(BoardwalkBlock.TYPE, BoardwalkBlock.Type.TALLS).condition(BoardwalkBlock.AXIS, axis);
builder.part().modelFile(tallConnectionModel).rotationY(rotation).uvLock(true).addModel().condition(BoardwalkBlock.TYPE, BoardwalkBlock.Type.BACKS).condition(BoardwalkBlock.AXIS, axis);
builder.part().modelFile(tallConnectionModel).rotationY((rotation + 180) % 360).uvLock(true).addModel().condition(BoardwalkBlock.TYPE, BoardwalkBlock.Type.FRONTS).condition(BoardwalkBlock.AXIS, axis);
}
builder.part().modelFile(shortPostModel).addModel().condition(BoardwalkBlock.TYPE, BoardwalkBlock.Type.SHORT_POSTS);
builder.part().modelFile(tallPostModel).addModel().condition(BoardwalkBlock.TYPE, BoardwalkBlock.Type.TALL_POSTS);
}
Aggregations