Finished adding the "Creeping Doubt" plant block.
Still need to do some more work, such as adding the seeds and the material you get from the plant.
This commit is contained in:
parent
032e163795
commit
295488f144
36 changed files with 451 additions and 15 deletions
src/main/java/wayoftime/bloodmagic/common/data
|
@ -1,11 +1,13 @@
|
|||
package wayoftime.bloodmagic.common.data;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.CropsBlock;
|
||||
import net.minecraft.block.FenceGateBlock;
|
||||
import net.minecraft.block.RotatedPillarBlock;
|
||||
import net.minecraft.block.StairsBlock;
|
||||
import net.minecraft.block.WallBlock;
|
||||
import net.minecraft.data.DataGenerator;
|
||||
import net.minecraft.state.IntegerProperty;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.model.generators.BlockModelBuilder;
|
||||
|
@ -86,12 +88,21 @@ public class GeneratorBlockStates extends BlockStateProvider
|
|||
buildCubeAllWithTextureName("solidclearmimic");
|
||||
buildCubeAllWithTextureName("solidlightmimic");
|
||||
buildCubeAllWithTextureName("solidopaquemimic");
|
||||
|
||||
buildCrop(BloodMagicBlocks.GROWING_DOUBT.get(), CropsBlock.AGE, 7, BloodMagic.rl("block/creeping_doubt_1"), BloodMagic.rl("block/creeping_doubt_2"), BloodMagic.rl("block/creeping_doubt_3"), BloodMagic.rl("block/creeping_doubt_4"), BloodMagic.rl("block/creeping_doubt_5"), BloodMagic.rl("block/creeping_doubt_6"), BloodMagic.rl("block/creeping_doubt_7"), BloodMagic.rl("block/creeping_doubt_8"));
|
||||
}
|
||||
|
||||
// private void buildCustomLoader(Block block)
|
||||
// {
|
||||
// ModelFile modelFile = models().crop("", null);
|
||||
// }
|
||||
private void buildCrop(Block block, IntegerProperty prop, int maxAge, ResourceLocation... textures)
|
||||
{
|
||||
String basePath = block.getRegistryName().getPath();
|
||||
VariantBlockStateBuilder builder = getVariantBuilder(block);
|
||||
|
||||
for (int i = 0; i <= maxAge; i++)
|
||||
{
|
||||
ModelFile modelFile = models().crop(basePath + "_" + (i + 1), textures[i]);
|
||||
builder.partialState().with(prop, i).modelForState().modelFile(modelFile).addModel();
|
||||
}
|
||||
}
|
||||
|
||||
private void buildFarmland(Block block, ResourceLocation top, ResourceLocation side)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue