Framework for ARC

Initial framework for the ARC block, including GUI, Container, Tile Entity, and Block.
This commit is contained in:
WayofTime 2020-10-26 15:53:09 -04:00
parent 2a8143844a
commit ec1b0644cb
32 changed files with 847 additions and 70 deletions

View file

@ -34,7 +34,7 @@ public class GeneratorBaseRecipes extends BaseRecipeProvider
ShapedRecipeBuilder.shapedRecipe(BloodMagicBlocks.BLOOD_ALTAR.get()).key('a', Tags.Items.STONE).key('b', Items.FURNACE).key('c', Tags.Items.INGOTS_GOLD).key('d', BloodMagicItems.MONSTER_SOUL_RAW.get()).patternLine("a a").patternLine("aba").patternLine("cdc").addCriterion("has_will", hasItem(BloodMagicItems.MONSTER_SOUL_RAW.get())).build(consumer, BloodMagic.rl("blood_altar"));
ShapedRecipeBuilder.shapedRecipe(BloodMagicBlocks.SOUL_FORGE.get()).key('s', Tags.Items.STONE).key('g', Tags.Items.INGOTS_GOLD).key('i', Tags.Items.INGOTS_IRON).key('o', Tags.Items.STORAGE_BLOCKS_IRON).patternLine("i i").patternLine("sgs").patternLine("sos").addCriterion("has_gold", hasItem(Items.GOLD_INGOT)).build(consumer, BloodMagic.rl("soul_forge"));
ShapedRecipeBuilder.shapedRecipe(BloodMagicItems.SOUL_SNARE.get(), 4).key('r', Tags.Items.DUSTS_REDSTONE).key('s', Tags.Items.STRING).key('i', Tags.Items.INGOTS_IRON).patternLine("sis").patternLine("iri").patternLine("sis").addCriterion("has_redstone", hasItem(Items.REDSTONE)).build(consumer, BloodMagic.rl("soul_snare"));
ShapedRecipeBuilder.shapedRecipe(BloodMagicItems.BASE_RITUAL_DIVINER.get()).key('a', BloodMagicItems.AIR_INSCRIPTION_TOOL.get()).key('s', Tags.Items.RODS_WOODEN).key('d', Tags.Items.GEMS_DIAMOND).key('e', BloodMagicItems.EARTH_INSCRIPTION_TOOL.get()).key('f', BloodMagicItems.FIRE_INSCRIPTION_TOOL.get()).key('w', BloodMagicItems.WATER_INSCRIPTION_TOOL.get()).addCriterion("has_scribe", hasItem(BloodMagicItems.AIR_INSCRIPTION_TOOL.get())).build(consumer, BloodMagic.rl("ritual_diviner_0"));
ShapedRecipeBuilder.shapedRecipe(BloodMagicItems.BASE_RITUAL_DIVINER.get()).key('a', BloodMagicItems.AIR_INSCRIPTION_TOOL.get()).key('s', Tags.Items.RODS_WOODEN).key('d', Tags.Items.GEMS_DIAMOND).key('e', BloodMagicItems.EARTH_INSCRIPTION_TOOL.get()).key('f', BloodMagicItems.FIRE_INSCRIPTION_TOOL.get()).key('w', BloodMagicItems.WATER_INSCRIPTION_TOOL.get()).patternLine("dfd").patternLine("ase").patternLine("dwd").addCriterion("has_scribe", hasItem(BloodMagicItems.AIR_INSCRIPTION_TOOL.get())).build(consumer, BloodMagic.rl("ritual_diviner_0"));
ShapedRecipeBuilder.shapedRecipe(BloodMagicItems.DUSK_RITUAL_DIVINER.get()).key('S', BloodMagicItems.DEMONIC_SLATE.get()).key('t', BloodMagicItems.DUSK_INSCRIPTION_TOOL.get()).key('d', BloodMagicItems.BASE_RITUAL_DIVINER.get()).patternLine(" S ").patternLine("tdt").patternLine(" S ").addCriterion("has_demon_slate", hasItem(BloodMagicItems.DEMONIC_SLATE.get())).build(consumer, BloodMagic.rl("ritual_diviner_1"));
}

View file

@ -2,11 +2,15 @@ package wayoftime.bloodmagic.common.data;
import net.minecraft.block.Block;
import net.minecraft.data.DataGenerator;
import net.minecraft.util.Direction;
import net.minecraftforge.client.model.generators.BlockStateProvider;
import net.minecraftforge.client.model.generators.ConfiguredModel;
import net.minecraftforge.client.model.generators.ModelFile;
import net.minecraftforge.client.model.generators.VariantBlockStateBuilder;
import net.minecraftforge.common.data.ExistingFileHelper;
import net.minecraftforge.fml.RegistryObject;
import wayoftime.bloodmagic.BloodMagic;
import wayoftime.bloodmagic.common.block.BlockAlchemicalReactionChamber;
import wayoftime.bloodmagic.common.block.BloodMagicBlocks;
public class GeneratorBlockStates extends BlockStateProvider
@ -35,6 +39,8 @@ public class GeneratorBlockStates extends BlockStateProvider
buildCubeAll(BloodMagicBlocks.EARTH_RITUAL_STONE.get());
buildCubeAll(BloodMagicBlocks.DUSK_RITUAL_STONE.get());
buildCubeAll(BloodMagicBlocks.DAWN_RITUAL_STONE.get());
buildFurnace(BloodMagicBlocks.ALCHEMICAL_REACTION_CHAMBER.get());
}
private void buildCubeAll(Block block)
@ -42,4 +48,23 @@ public class GeneratorBlockStates extends BlockStateProvider
getVariantBuilder(block).forAllStates(state -> ConfiguredModel.builder().modelFile(cubeAll(block)).build());
}
private void buildFurnace(Block block)
{
// ConfiguredModel[] furnaceModel = ConfiguredModel.builder().modelFile().build();
ModelFile furnace_off = models().orientableWithBottom("alchemicalreactionchamber", BloodMagic.rl("block/arc_side"), BloodMagic.rl("block/arc_front"), BloodMagic.rl("block/arc_bottom"), BloodMagic.rl("block/arc_top"));
// getVariantBuilder(block).addModels(block.getDefaultState().with(BlockAlchemicalReactionChamber.FACING, Direction.NORTH).with(BlockAlchemicalReactionChamber.LIT, false), furnaceModel);
VariantBlockStateBuilder builder = getVariantBuilder(block);
builder.partialState().with(BlockAlchemicalReactionChamber.FACING, Direction.NORTH).with(BlockAlchemicalReactionChamber.LIT, false).modelForState().modelFile(furnace_off).addModel();
builder.partialState().with(BlockAlchemicalReactionChamber.FACING, Direction.EAST).with(BlockAlchemicalReactionChamber.LIT, false).modelForState().modelFile(furnace_off).rotationY(90).addModel();
builder.partialState().with(BlockAlchemicalReactionChamber.FACING, Direction.SOUTH).with(BlockAlchemicalReactionChamber.LIT, false).modelForState().modelFile(furnace_off).rotationY(180).addModel();
builder.partialState().with(BlockAlchemicalReactionChamber.FACING, Direction.WEST).with(BlockAlchemicalReactionChamber.LIT, false).modelForState().modelFile(furnace_off).rotationY(270).addModel();
builder.partialState().with(BlockAlchemicalReactionChamber.FACING, Direction.NORTH).with(BlockAlchemicalReactionChamber.LIT, true).modelForState().modelFile(furnace_off).addModel();
builder.partialState().with(BlockAlchemicalReactionChamber.FACING, Direction.EAST).with(BlockAlchemicalReactionChamber.LIT, true).modelForState().modelFile(furnace_off).rotationY(90).addModel();
builder.partialState().with(BlockAlchemicalReactionChamber.FACING, Direction.SOUTH).with(BlockAlchemicalReactionChamber.LIT, true).modelForState().modelFile(furnace_off).rotationY(180).addModel();
builder.partialState().with(BlockAlchemicalReactionChamber.FACING, Direction.WEST).with(BlockAlchemicalReactionChamber.LIT, true).modelForState().modelFile(furnace_off).rotationY(270).addModel();
// getVariantBuilder(block).
}
}

View file

@ -43,6 +43,7 @@ public class GeneratorItemModels extends ItemModelProvider
registerBlockModel(BloodMagicBlocks.EARTH_RITUAL_STONE.get());
registerBlockModel(BloodMagicBlocks.DUSK_RITUAL_STONE.get());
registerBlockModel(BloodMagicBlocks.DAWN_RITUAL_STONE.get());
registerBlockModel(BloodMagicBlocks.ALCHEMICAL_REACTION_CHAMBER.get());
registerToggleableItem(BloodMagicItems.GREEN_GROVE_SIGIL.get());
registerToggleableItem(BloodMagicItems.FAST_MINER_SIGIL.get());

View file

@ -60,6 +60,7 @@ public class GeneratorLootTable extends LootTableProvider
registerDropping(BloodMagicBlocks.EARTH_RITUAL_STONE.get(), BloodMagicBlocks.BLANK_RITUAL_STONE.get());
registerDropping(BloodMagicBlocks.DUSK_RITUAL_STONE.get(), BloodMagicBlocks.BLANK_RITUAL_STONE.get());
registerDropping(BloodMagicBlocks.DAWN_RITUAL_STONE.get(), BloodMagicBlocks.BLANK_RITUAL_STONE.get());
registerDropSelfLootTable(BloodMagicBlocks.ALCHEMICAL_REACTION_CHAMBER.get());
}
private void registerNoDropLootTable(Block block)