Finished implementation of Incense Altar and associated blocks.

Also added the recipe for the Ritual Tinkerer, as well as the finalized book entry for the Incense Altar.
This commit is contained in:
WayofTime 2020-11-13 19:44:57 -05:00
parent 7634404dac
commit cb2db9bc50
108 changed files with 2197 additions and 81 deletions

View file

@ -0,0 +1,77 @@
package wayoftime.bloodmagic.common.block;
import net.minecraft.block.Block;
import net.minecraft.block.BlockRenderType;
import net.minecraft.block.BlockState;
import net.minecraft.block.material.Material;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.IWorld;
import net.minecraft.world.World;
import net.minecraftforge.common.ToolType;
import wayoftime.bloodmagic.tile.TileIncenseAltar;
import wayoftime.bloodmagic.tile.TileSoulForge;
public class BlockIncenseAltar extends Block
{
protected static final VoxelShape BODY = Block.makeCuboidShape(5, 0, 5, 12, 16, 12);
public BlockIncenseAltar()
{
super(Properties.create(Material.IRON).hardnessAndResistance(2.0F, 5.0F).harvestTool(ToolType.PICKAXE).harvestLevel(0));
}
@Override
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context)
{
return BODY;
}
@Override
public void onPlayerDestroy(IWorld world, BlockPos blockPos, BlockState blockState)
{
TileSoulForge forge = (TileSoulForge) world.getTileEntity(blockPos);
if (forge != null)
forge.dropItems();
super.onPlayerDestroy(world, blockPos, blockState);
}
@Override
public void onReplaced(BlockState state, World worldIn, BlockPos pos, BlockState newState, boolean isMoving)
{
if (!state.isIn(newState.getBlock()))
{
TileEntity tileentity = worldIn.getTileEntity(pos);
if (tileentity instanceof TileSoulForge)
{
((TileSoulForge) tileentity).dropItems();
worldIn.updateComparatorOutputLevel(pos, this);
}
super.onReplaced(state, worldIn, pos, newState, isMoving);
}
}
@Override
public boolean hasTileEntity(BlockState state)
{
return true;
}
@Override
public TileEntity createTileEntity(BlockState state, IBlockReader world)
{
return new TileIncenseAltar();
}
@Override
public BlockRenderType getRenderType(BlockState state)
{
return BlockRenderType.MODEL;
}
}

View file

@ -0,0 +1,24 @@
package wayoftime.bloodmagic.common.block;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import wayoftime.bloodmagic.incense.IIncensePath;
public class BlockPath extends Block implements IIncensePath
{
protected final int pathLevel;
public BlockPath(int pathLevel, Properties properties)
{
super(properties);
this.pathLevel = pathLevel;
}
@Override
public int getLevelOfPath(World world, BlockPos pos, BlockState state)
{
return pathLevel;
}
}

View file

@ -1,5 +1,6 @@
package wayoftime.bloodmagic.common.block;
import net.minecraft.block.AbstractBlock;
import net.minecraft.block.AbstractBlock.Properties;
import net.minecraft.block.Block;
import net.minecraft.block.FlowingFluidBlock;
@ -41,6 +42,7 @@ public class BloodMagicBlocks
// public static final RegistryObject<Block> BLOODSTONE = BASICBLOCKS.register("ruby_block", BloodstoneBlock::new);
public static final RegistryObject<Block> SOUL_FORGE = BLOCKS.register("soulforge", BlockSoulForge::new);
public static final RegistryObject<Block> INCENSE_ALTAR = BLOCKS.register("incensealtar", BlockIncenseAltar::new);
public static final RegistryObject<Block> ALCHEMY_ARRAY = BLOCKS.register("alchemyarray", BlockAlchemyArray::new);
public static final RegistryObject<Block> BLANK_RUNE = BASICBLOCKS.register("blankrune", () -> new BlockBloodRune(BloodRuneType.BLANK));
public static final RegistryObject<Block> SPEED_RUNE = BASICBLOCKS.register("speedrune", () -> new BlockBloodRune(BloodRuneType.SPEED));
@ -81,6 +83,15 @@ public class BloodMagicBlocks
public static final RegistryObject<Block> VENGEFUL_CRYSTAL_BLOCK = BLOCKS.register("vengefuldemoncrystal", () -> new BlockDemonCrystal(EnumDemonWillType.VENGEFUL));
public static final RegistryObject<Block> STEADFAST_CRYSTAL_BLOCK = BLOCKS.register("steadfastdemoncrystal", () -> new BlockDemonCrystal(EnumDemonWillType.STEADFAST));
public static final RegistryObject<Block> WOOD_PATH = BASICBLOCKS.register("woodbrickpath", () -> new BlockPath(2, AbstractBlock.Properties.create(Material.WOOD).hardnessAndResistance(2.0F, 5.0F).harvestTool(ToolType.AXE).harvestLevel(0)));
public static final RegistryObject<Block> WOOD_TILE_PATH = BASICBLOCKS.register("woodtilepath", () -> new BlockPath(2, AbstractBlock.Properties.create(Material.WOOD).hardnessAndResistance(2.0F, 5.0F).harvestTool(ToolType.AXE).harvestLevel(0)));
public static final RegistryObject<Block> STONE_PATH = BASICBLOCKS.register("stonebrickpath", () -> new BlockPath(4, AbstractBlock.Properties.create(Material.ROCK).hardnessAndResistance(2.0F, 5.0F).harvestTool(ToolType.PICKAXE).harvestLevel(0)));
public static final RegistryObject<Block> STONE_TILE_PATH = BASICBLOCKS.register("stonetilepath", () -> new BlockPath(4, AbstractBlock.Properties.create(Material.ROCK).hardnessAndResistance(2.0F, 5.0F).harvestTool(ToolType.PICKAXE).harvestLevel(0)));
public static final RegistryObject<Block> WORN_STONE_PATH = BASICBLOCKS.register("wornstonebrickpath", () -> new BlockPath(6, AbstractBlock.Properties.create(Material.ROCK).hardnessAndResistance(2.0F, 5.0F).harvestTool(ToolType.PICKAXE).harvestLevel(0)));
public static final RegistryObject<Block> WORN_STONE_TILE_PATH = BASICBLOCKS.register("wornstonetilepath", () -> new BlockPath(6, AbstractBlock.Properties.create(Material.ROCK).hardnessAndResistance(2.0F, 5.0F).harvestTool(ToolType.PICKAXE).harvestLevel(0)));
public static final RegistryObject<Block> OBSIDIAN_PATH = BASICBLOCKS.register("obsidianbrickpath", () -> new BlockPath(8, AbstractBlock.Properties.create(Material.ROCK).hardnessAndResistance(2.0F, 5.0F).harvestTool(ToolType.PICKAXE).harvestLevel(3)));
public static final RegistryObject<Block> OBSIDIAN_TILE_PATH = BASICBLOCKS.register("obsidiantilepath", () -> new BlockPath(8, AbstractBlock.Properties.create(Material.ROCK).hardnessAndResistance(2.0F, 5.0F).harvestTool(ToolType.PICKAXE).harvestLevel(3)));
private static ForgeFlowingFluid.Properties makeProperties()
{
return new ForgeFlowingFluid.Properties(LIFE_ESSENCE_FLUID, LIFE_ESSENCE_FLUID_FLOWING, FluidAttributes.builder(FLUID_STILL, FLUID_FLOWING)).bucket(LIFE_ESSENCE_BUCKET).block(LIFE_ESSENCE_BLOCK);
@ -95,6 +106,7 @@ public class BloodMagicBlocks
public static final RegistryObject<ContainerType<ContainerSoulForge>> SOUL_FORGE_CONTAINER = CONTAINERS.register("soul_forge_container", () -> IForgeContainerType.create(ContainerSoulForge::new));
public static final RegistryObject<ContainerType<ContainerAlchemicalReactionChamber>> ARC_CONTAINER = CONTAINERS.register("arc_container", () -> IForgeContainerType.create(ContainerAlchemicalReactionChamber::new));
public static final RegistryObject<ContainerType<ContainerAlchemyTable>> ALCHEMY_TABLE_CONTAINER = CONTAINERS.register("alchemy_table_container", () -> IForgeContainerType.create(ContainerAlchemyTable::new));
// public static final RegistryObject<BloodstoneBlock> BLOOD_STONE = registerNoItem("blood_stone", () -> new BloodstoneBlock());
//
//// private static <T extends Block> RegistryObject<T> register(String name, Supplier<? extends T> sup, Function<RegistryObject<T>, Supplier<? extends Item>> itemCreator)

View file

@ -46,6 +46,10 @@ public class GeneratorBaseRecipes extends BaseRecipeProvider
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"));
ShapedRecipeBuilder.shapedRecipe(BloodMagicBlocks.BLOODSTONE_BRICK.get(), 4).key('s', BloodMagicBlocks.BLOODSTONE.get()).patternLine("ss").patternLine("ss").addCriterion("has_weak_shard", hasItem(BloodMagicItems.WEAK_BLOOD_SHARD.get())).build(consumer, BloodMagic.rl("bloodstonebrick"));
ShapelessRecipeBuilder.shapelessRecipe(BloodMagicBlocks.BLOODSTONE.get(), 8).addIngredient(Tags.Items.STONE).addIngredient(BloodMagicItems.WEAK_BLOOD_SHARD.get()).addCriterion("has_weak_shard", hasItem(BloodMagicItems.WEAK_BLOOD_SHARD.get())).build(consumer, BloodMagic.rl("largebloodstonebrick"));
ShapelessRecipeBuilder.shapelessRecipe(BloodMagicBlocks.WOOD_TILE_PATH.get(), 4).addIngredient(BloodMagicBlocks.WOOD_PATH.get()).addIngredient(BloodMagicBlocks.WOOD_PATH.get()).addIngredient(BloodMagicBlocks.WOOD_PATH.get()).addIngredient(BloodMagicBlocks.WOOD_PATH.get()).addCriterion("has_apprentice_orb", hasItem(BloodMagicItems.APPRENTICE_BLOOD_ORB.get())).build(consumer, BloodMagic.rl("path/path_woodtile"));
ShapelessRecipeBuilder.shapelessRecipe(BloodMagicBlocks.STONE_TILE_PATH.get(), 4).addIngredient(BloodMagicBlocks.STONE_PATH.get()).addIngredient(BloodMagicBlocks.STONE_PATH.get()).addIngredient(BloodMagicBlocks.STONE_PATH.get()).addIngredient(BloodMagicBlocks.STONE_PATH.get()).addCriterion("has_magician_orb", hasItem(BloodMagicItems.MAGICIAN_BLOOD_ORB.get())).build(consumer, BloodMagic.rl("path/path_stonetile"));
ShapelessRecipeBuilder.shapelessRecipe(BloodMagicBlocks.WORN_STONE_TILE_PATH.get(), 4).addIngredient(BloodMagicBlocks.WORN_STONE_PATH.get()).addIngredient(BloodMagicBlocks.WORN_STONE_PATH.get()).addIngredient(BloodMagicBlocks.WORN_STONE_PATH.get()).addIngredient(BloodMagicBlocks.WORN_STONE_PATH.get()).addCriterion("has_master_orb", hasItem(BloodMagicItems.MASTER_BLOOD_ORB.get())).build(consumer, BloodMagic.rl("path/path_wornstonetile"));
}
private void addVanillaSmithingRecipes(Consumer<IFinishedRecipe> consumer)
@ -57,6 +61,8 @@ public class GeneratorBaseRecipes extends BaseRecipeProvider
private void addBloodOrbRecipes(Consumer<IFinishedRecipe> consumer)
{
ShapedRecipeBuilder.shapedRecipe(BloodMagicBlocks.INCENSE_ALTAR.get()).key('s', Tags.Items.STONE).key('c', Tags.Items.COBBLESTONE).key('h', Items.CHARCOAL).key('o', IngredientBloodOrb.fromOrb(BloodMagicItems.ORB_WEAK.get())).patternLine("s s").patternLine("shs").patternLine("coc").addCriterion("has_weak_orb", hasItem(BloodMagicItems.WEAK_BLOOD_ORB.get())).build(consumer, BloodMagic.rl("incense_altar"));
ShapedRecipeBuilder.shapedRecipe(BloodMagicBlocks.BLANK_RUNE.get()).key('a', Tags.Items.STONE).key('s', Ingredient.fromItems(BloodMagicItems.SLATE.get())).key('o', IngredientBloodOrb.fromOrb(BloodMagicItems.ORB_WEAK.get())).patternLine("asa").patternLine("aoa").patternLine("aaa").addCriterion("has_weak_orb", hasItem(BloodMagicItems.WEAK_BLOOD_ORB.get())).build(consumer, BloodMagic.rl("blood_rune_blank"));
ShapedRecipeBuilder.shapedRecipe(BloodMagicBlocks.SPEED_RUNE.get()).key('a', Tags.Items.STONE).key('b', Ingredient.fromItems(BloodMagicItems.SLATE.get())).key('c', Ingredient.fromItems(Items.SUGAR)).key('d', BloodMagicBlocks.BLANK_RUNE.get()).patternLine("aba").patternLine("cdc").patternLine("aba").addCriterion("has_blank_rune", hasItem(BloodMagicItems.BLANK_RUNE_ITEM.get())).build(consumer, BloodMagic.rl("blood_rune_speed"));
ShapedRecipeBuilder.shapedRecipe(BloodMagicBlocks.SACRIFICE_RUNE.get()).key('a', Tags.Items.STONE).key('b', BloodMagicItems.REINFORCED_SLATE.get()).key('c', Tags.Items.INGOTS_GOLD).key('d', BloodMagicBlocks.BLANK_RUNE.get()).key('e', IngredientBloodOrb.fromOrb(BloodMagicItems.ORB_APPRENTICE.get())).patternLine("aba").patternLine("cdc").patternLine("aea").addCriterion("has_apprentice_orb", hasItem(BloodMagicItems.APPRENTICE_BLOOD_ORB.get())).build(consumer, BloodMagic.rl("blood_rune_sacrifice"));
@ -78,6 +84,12 @@ public class GeneratorBaseRecipes extends BaseRecipeProvider
ShapedRecipeBuilder.shapedRecipe(BloodMagicItems.LAVA_CRYSTAL.get()).key('a', Tags.Items.GLASS).key('b', Items.LAVA_BUCKET).key('c', IngredientBloodOrb.fromOrb(BloodMagicItems.ORB_WEAK.get())).key('d', Tags.Items.OBSIDIAN).key('e', Tags.Items.GEMS_DIAMOND).patternLine("aba").patternLine("bcb").patternLine("ded").addCriterion("has_weak_orb", hasItem(BloodMagicItems.WEAK_BLOOD_ORB.get())).build(consumer, BloodMagic.rl("lava_crystal"));
ShapedRecipeBuilder.shapedRecipe(BloodMagicItems.PRIMITIVE_HYDRATION_CELL.get()).key('B', Items.WATER_BUCKET).key('c', Tags.Items.COBBLESTONE).key('o', IngredientBloodOrb.fromOrb(BloodMagicItems.ORB_MAGICIAN.get())).key('s', BloodMagicItems.SLATE.get()).patternLine("csc").patternLine("cBc").patternLine("coc").addCriterion("has_magician_orb", hasItem(BloodMagicItems.MAGICIAN_BLOOD_ORB.get())).build(consumer, BloodMagic.rl("primitive_hydration_cell"));
ShapelessRecipeBuilder.shapelessRecipe(BloodMagicBlocks.WOOD_PATH.get(), 4).addIngredient(ItemTags.PLANKS).addIngredient(ItemTags.PLANKS).addIngredient(ItemTags.PLANKS).addIngredient(ItemTags.PLANKS).addIngredient(IngredientBloodOrb.fromOrb(BloodMagicItems.ORB_APPRENTICE.get())).addCriterion("has_apprentice_orb", hasItem(BloodMagicItems.APPRENTICE_BLOOD_ORB.get())).build(consumer, BloodMagic.rl("path/path_wood"));
ShapelessRecipeBuilder.shapelessRecipe(BloodMagicBlocks.STONE_PATH.get(), 4).addIngredient(Tags.Items.STONE).addIngredient(Tags.Items.STONE).addIngredient(Tags.Items.STONE).addIngredient(Tags.Items.STONE).addIngredient(IngredientBloodOrb.fromOrb(BloodMagicItems.ORB_MAGICIAN.get())).addCriterion("has_magician_orb", hasItem(BloodMagicItems.MAGICIAN_BLOOD_ORB.get())).build(consumer, BloodMagic.rl("path/path_stone"));
ShapelessRecipeBuilder.shapelessRecipe(BloodMagicBlocks.WORN_STONE_PATH.get(), 4).addIngredient(BloodMagicBlocks.STONE_PATH.get()).addIngredient(BloodMagicBlocks.STONE_PATH.get()).addIngredient(BloodMagicBlocks.STONE_PATH.get()).addIngredient(BloodMagicBlocks.STONE_PATH.get()).addIngredient(IngredientBloodOrb.fromOrb(BloodMagicItems.ORB_MASTER.get())).addCriterion("has_master_orb", hasItem(BloodMagicItems.MASTER_BLOOD_ORB.get())).build(consumer, BloodMagic.rl("path/path_wornstone"));
ShapedRecipeBuilder.shapedRecipe(BloodMagicItems.RITUAL_READER.get()).key('s', BloodMagicItems.DEMONIC_SLATE.get()).key('g', Tags.Items.GLASS).key('i', Tags.Items.INGOTS_GOLD).key('o', IngredientBloodOrb.fromOrb(BloodMagicItems.ORB_MASTER.get())).patternLine("gog").patternLine("isi").patternLine(" s ").addCriterion("has_master_orb", hasItem(BloodMagicItems.MASTER_BLOOD_ORB.get())).build(consumer, BloodMagic.rl("ritual_reader"));
// ShapedRecipeBuilder.shapedRecipe(BloodMagicBlocks.SPEED_RUNE.get()).key('s', Items.GLASS).key('o', Ingredient.fromItems(Items.DIAMOND)).patternLine("sss").patternLine("sos").patternLine("sss").addCriterion("has_diamond", hasItem(Items.DIAMOND)).build(consumer, new ResourceLocation(BloodMagic.MODID, "speed_rune_from_standard"));
// ShapedRecipeBuilder.shapedRecipe(BloodMagicBlocks.SPEED_RUNE.get()).key('s', Items.GLASS).key('o', IngredientBloodOrb.fromOrb(BloodMagicItems.ORB_WEAK.get())).patternLine("sss").patternLine("sos").patternLine("sss").addCriterion("has_diamond", hasItem(Items.DIAMOND)).build(consumer, new ResourceLocation(BloodMagic.MODID, "speed_rune_from_orb"));
}

View file

@ -63,6 +63,7 @@ public class GeneratorItemModels extends ItemModelProvider
registerDemonTool(BloodMagicItems.SENTIENT_AXE.get());
registerDemonTool(BloodMagicItems.SENTIENT_PICKAXE.get());
registerDemonTool(BloodMagicItems.SENTIENT_SHOVEL.get());
registerSacrificialKnife(BloodMagicItems.SACRIFICIAL_DAGGER.get());
}
private void registerCustomBlockPath(Block block, String newPath)
@ -145,4 +146,14 @@ public class GeneratorItemModels extends ItemModelProvider
}
}
private void registerSacrificialKnife(Item item)
{
String path = item.getRegistryName().getPath();
ItemModelBuilder builder = getBuilder(path);
ModelFile baseKnifeFile = singleTexture("item/variants/" + path, mcLoc("item/handheld"), "layer0", modLoc("item/" + path));
ModelFile ceremonialKnifeFile = singleTexture("item/variants/" + path + "_ceremonial", mcLoc("item/handheld"), "layer0", modLoc("item/" + path + "_ceremonial"));
builder = builder.override().predicate(BloodMagic.rl("incense"), 0).model(baseKnifeFile).end().override().predicate(BloodMagic.rl("incense"), 1).model(ceremonialKnifeFile).end();
}
}

View file

@ -16,6 +16,9 @@ public class GeneratorLanguage extends LanguageProvider
@Override
protected void addTranslations()
{
// HUD
add("hud.bloodmagic.inactive", "Inactive");
// Creative Tab
add("itemGroup.bloodmagic.creativeTab", "Blood Magic");
@ -45,6 +48,17 @@ public class GeneratorLanguage extends LanguageProvider
// add("tooltip.bloodmagic.sigil.divination.currentInversion", "Current Inversion: %d");
add("tooltip.bloodmagic.sigil.divination.currentBonus", "Current Bonus: +%d%%");
add("tooltip.bloodmagic.sigil.seer.desc", "When seeing all is not enough");
add("tooltip.bloodmagic.sigil.seer.currentAltarProgress", "Current Progress: %d LP/ %s LP");
add("tooltip.bloodmagic.sigil.seer.currentAltarProgress.percent", "Current Progress: %s");
add("tooltip.bloodmagic.sigil.seer.currentAltarConsumptionRate", "Consumption Rate: %d LP");
add("tooltip.bloodmagic.sigil.seer.currentAltarTier", "Current Tier: %d");
add("tooltip.bloodmagic.sigil.seer.currentEssence", "Current Essence: %d LP");
add("tooltip.bloodmagic.sigil.seer.currentAltarCapacity", "Current Capacity: %d LP");
add("tooltip.bloodmagic.sigil.seer.currentCharge", "Current Charge: %d");
add("tooltip.bloodmagic.sigil.seer.currentTranquility", "Current Tranquility: %d");
add("tooltip.bloodmagic.sigil.seer.currentBonus", "Current Bonus: +%d%%");
add("tooltip.bloodmagic.decoration.safe", "Safe for decoration");
add("tooltip.bloodmagic.decoration.notSafe", "Dangerous for decoration");
@ -304,6 +318,7 @@ public class GeneratorLanguage extends LanguageProvider
addBlock(BloodMagicBlocks.ALCHEMICAL_REACTION_CHAMBER, "Alchemical Reaction Chamber");
addBlock(BloodMagicBlocks.ALCHEMY_TABLE, "Alchemy Table");
addBlock(BloodMagicBlocks.INCENSE_ALTAR, "Incense Altar");
addBlock(BloodMagicBlocks.BLOODSTONE, "Large Bloodstone Brick");
addBlock(BloodMagicBlocks.BLOODSTONE_BRICK, "Bloodstone Brick");
@ -317,6 +332,15 @@ public class GeneratorLanguage extends LanguageProvider
addBlock(BloodMagicBlocks.DEMON_CRUCIBLE, "Demon Crucible");
addBlock(BloodMagicBlocks.DEMON_CRYSTALLIZER, "Demon Crystallizer");
addBlock(BloodMagicBlocks.WOOD_PATH, "Wooden Path");
addBlock(BloodMagicBlocks.WOOD_TILE_PATH, "Tiled Wooden Path");
addBlock(BloodMagicBlocks.STONE_PATH, "Stone Path");
addBlock(BloodMagicBlocks.STONE_TILE_PATH, "Tiled Stone Path");
addBlock(BloodMagicBlocks.WORN_STONE_PATH, "Worn Stone Path");
addBlock(BloodMagicBlocks.WORN_STONE_TILE_PATH, "Tiled Worn Stone Path");
addBlock(BloodMagicBlocks.OBSIDIAN_PATH, "Obsidian Path");
addBlock(BloodMagicBlocks.OBSIDIAN_TILE_PATH, "Tiled Obsidian Path");
// Item names
addItem(BloodMagicItems.WEAK_BLOOD_ORB, "Weak Blood Orb");
addItem(BloodMagicItems.APPRENTICE_BLOOD_ORB, "Apprentice Blood Orb");
@ -332,6 +356,7 @@ public class GeneratorLanguage extends LanguageProvider
addItem(BloodMagicItems.ICE_SIGIL, "Sigil of the Frozen Lake");
addItem(BloodMagicItems.AIR_SIGIL, "Air Sigil");
addItem(BloodMagicItems.BLOOD_LIGHT_SIGIL, "Sigil of the Blood Lamp");
addItem(BloodMagicItems.SEER_SIGIL, "Seer's Sigil");
addItem(BloodMagicBlocks.LIFE_ESSENCE_BUCKET, "Bucket of Life");
addItem(BloodMagicItems.ARCANE_ASHES, "Arcane Ashes");
@ -353,6 +378,7 @@ public class GeneratorLanguage extends LanguageProvider
addItem(BloodMagicItems.REAGENT_MAGNETISM, "Magnetism Reagent");
addItem(BloodMagicItems.REAGENT_AIR, "Air Reagent");
addItem(BloodMagicItems.REAGENT_BLOOD_LIGHT, "Blood Lamp Reagent");
addItem(BloodMagicItems.REAGENT_SIGHT, "Sight Reagent");
addItem(BloodMagicItems.PETTY_GEM, "Petty Tartaric Gem");
addItem(BloodMagicItems.LESSER_GEM, "Lesser Tartaric Gem");

View file

@ -75,6 +75,7 @@ public class GeneratorLootTable extends LootTableProvider
registerDropSelfLootTable(BloodMagicBlocks.ALCHEMICAL_REACTION_CHAMBER.get());
registerDropSelfLootTable(BloodMagicBlocks.DEMON_CRUCIBLE.get());
registerDropSelfLootTable(BloodMagicBlocks.DEMON_CRYSTALLIZER.get());
registerDropSelfLootTable(BloodMagicBlocks.INCENSE_ALTAR.get());
// registerNoDropLootTable(BloodMagicBlocks.RAW_CRYSTAL_BLOCK.get());
registerDropCrystalsLootTable(BloodMagicBlocks.RAW_CRYSTAL_BLOCK.get(), BloodMagicItems.RAW_CRYSTAL.get());

View file

@ -78,6 +78,16 @@ public class BloodMagicItems
public static final RegistryObject<Item> BLOOD_ALTAR_ITEM = ITEMS.register("altar", () -> new BlockItem(BloodMagicBlocks.BLOOD_ALTAR.get(), new Item.Properties().group(BloodMagic.TAB)));
public static final RegistryObject<Item> ALCHEMY_TABLE_ITEM = ITEMS.register("alchemytable", () -> new ItemBlockAlchemyTable(BloodMagicBlocks.ALCHEMY_TABLE.get(), new Item.Properties().group(BloodMagic.TAB)));
public static final RegistryObject<Item> INCENSE_ALTAR_ITEM = ITEMS.register("incensealtar", () -> new BlockItem(BloodMagicBlocks.INCENSE_ALTAR.get(), new Item.Properties().group(BloodMagic.TAB)));
public static final RegistryObject<Item> WOOD_PATH_ITEM = ITEMS.register("woodbrickpath", () -> new BlockItem(BloodMagicBlocks.WOOD_PATH.get(), new Item.Properties().group(BloodMagic.TAB)));
public static final RegistryObject<Item> WOOD_TILE_PATH_ITEM = ITEMS.register("woodtilepath", () -> new BlockItem(BloodMagicBlocks.WOOD_TILE_PATH.get(), new Item.Properties().group(BloodMagic.TAB)));
public static final RegistryObject<Item> STONE_PATH_ITEM = ITEMS.register("stonebrickpath", () -> new BlockItem(BloodMagicBlocks.STONE_PATH.get(), new Item.Properties().group(BloodMagic.TAB)));
public static final RegistryObject<Item> STONE_TILE_PATH_ITEM = ITEMS.register("stonetilepath", () -> new BlockItem(BloodMagicBlocks.STONE_TILE_PATH.get(), new Item.Properties().group(BloodMagic.TAB)));
public static final RegistryObject<Item> WORN_STONE_PATH_ITEM = ITEMS.register("wornstonebrickpath", () -> new BlockItem(BloodMagicBlocks.WORN_STONE_PATH.get(), new Item.Properties().group(BloodMagic.TAB)));
public static final RegistryObject<Item> WORN_STONE_TILE_PATH_ITEM = ITEMS.register("wornstonetilepath", () -> new BlockItem(BloodMagicBlocks.WORN_STONE_TILE_PATH.get(), new Item.Properties().group(BloodMagic.TAB)));
public static final RegistryObject<Item> OBSIDIAN_PATH_ITEM = ITEMS.register("obsidianbrickpath", () -> new BlockItem(BloodMagicBlocks.OBSIDIAN_PATH.get(), new Item.Properties().group(BloodMagic.TAB)));
public static final RegistryObject<Item> OBSIDIAN_TILE_PATH_ITEM = ITEMS.register("obsidiantilepath", () -> new BlockItem(BloodMagicBlocks.OBSIDIAN_TILE_PATH.get(), new Item.Properties().group(BloodMagic.TAB)));
// TODO: Need to rework the above instantiations for the ItemBlocks so that it's
// done with the Blocks.
@ -90,6 +100,7 @@ public class BloodMagicItems
public static final RegistryObject<Item> MASTER_BLOOD_ORB = BASICITEMS.register("masterbloodorb", () -> new ItemBloodOrb(ORB_MASTER));
public static final RegistryObject<Item> DIVINATION_SIGIL = BASICITEMS.register("divinationsigil", () -> new ItemSigilDivination(true));
public static final RegistryObject<Item> SEER_SIGIL = BASICITEMS.register("seersigil", () -> new ItemSigilDivination(false));
public static final RegistryObject<Item> SACRIFICIAL_DAGGER = BASICITEMS.register("sacrificialdagger", () -> new ItemSacrificialDagger());
public static final RegistryObject<Item> SLATE = BASICITEMS.register("blankslate", () -> new ItemBase());
public static final RegistryObject<Item> REINFORCED_SLATE = BASICITEMS.register("reinforcedslate", () -> new ItemBase());
@ -136,6 +147,7 @@ public class BloodMagicItems
public static final RegistryObject<Item> REAGENT_MAGNETISM = BASICITEMS.register("reagentmagnetism", () -> new ItemBase());
public static final RegistryObject<Item> REAGENT_AIR = BASICITEMS.register("reagentair", () -> new ItemBase());
public static final RegistryObject<Item> REAGENT_BLOOD_LIGHT = BASICITEMS.register("reagentbloodlight", () -> new ItemBase());
public static final RegistryObject<Item> REAGENT_SIGHT = BASICITEMS.register("reagentsight", () -> new ItemBase());
// Tartaric Gems
public static final RegistryObject<Item> PETTY_GEM = ITEMS.register("soulgempetty", () -> new ItemSoulGem("petty", 64));

View file

@ -25,6 +25,7 @@ import wayoftime.bloodmagic.ConfigHandler;
import wayoftime.bloodmagic.event.SacrificeKnifeUsedEvent;
import wayoftime.bloodmagic.util.Constants;
import wayoftime.bloodmagic.util.DamageSourceBloodMagic;
import wayoftime.bloodmagic.util.helper.IncenseHelper;
import wayoftime.bloodmagic.util.helper.NBTHelper;
import wayoftime.bloodmagic.util.helper.PlayerHelper;
import wayoftime.bloodmagic.util.helper.PlayerSacrificeHelper;
@ -52,7 +53,14 @@ public class ItemSacrificialDagger extends Item
public void onPlayerStoppedUsing(ItemStack stack, World worldIn, LivingEntity entityLiving, int timeLeft)
{
if (entityLiving instanceof PlayerEntity && !entityLiving.getEntityWorld().isRemote)
PlayerSacrificeHelper.sacrificePlayerHealth((PlayerEntity) entityLiving);
if (PlayerSacrificeHelper.sacrificePlayerHealth((PlayerEntity) entityLiving))
IncenseHelper.setHasMaxIncense(stack, (PlayerEntity) entityLiving, false);
}
@Override
public boolean hasEffect(ItemStack stack)
{
return IncenseHelper.getHasMaxIncense(stack) || super.hasEffect(stack);
}
@Override
@ -114,13 +122,15 @@ public class ItemSacrificialDagger extends Item
return super.onItemRightClick(world, player, hand);
lpAdded = evt.lpAdded;
} else if (player.isSneaking())
{
lpAdded = Integer.MAX_VALUE;
}
double posX = player.getPosX();
double posY = player.getPosY();
double posZ = player.getPosZ();
world.playSound(player, posX, posY, posZ, SoundEvents.BLOCK_FIRE_EXTINGUISH, SoundCategory.BLOCKS, 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat())
* 0.8F);
world.playSound(player, posX, posY, posZ, SoundEvents.BLOCK_FIRE_EXTINGUISH, SoundCategory.BLOCKS, 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
for (int l = 0; l < 8; ++l)
world.addParticle(RedstoneParticleData.REDSTONE_DUST, posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), 0, 0, 0);

View file

@ -6,6 +6,7 @@ import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
@ -36,7 +37,7 @@ public class ItemSigilBase extends ItemSigil
@OnlyIn(Dist.CLIENT)
public void addInformation(ItemStack stack, World world, List<ITextComponent> tooltip, ITooltipFlag flag)
{
tooltip.add(new TranslationTextComponent(tooltipBase + "desc"));
tooltip.add(new TranslationTextComponent(tooltipBase + "desc").mergeStyle(TextFormatting.ITALIC));
// if (TextHelper.canTranslate(tooltipBase + "desc"))
// tooltip.addAll(Arrays.asList(WordUtils.wrap(TextHelper.localizeEffect(tooltipBase
// + "desc"), 30, "/cut", false).split("/cut")));

View file

@ -20,6 +20,7 @@ import wayoftime.bloodmagic.altar.IBloodAltar;
import wayoftime.bloodmagic.core.data.Binding;
import wayoftime.bloodmagic.iface.IAltarReader;
import wayoftime.bloodmagic.iface.ISigil;
import wayoftime.bloodmagic.tile.TileIncenseAltar;
import wayoftime.bloodmagic.util.ChatUtil;
import wayoftime.bloodmagic.util.helper.NetworkHelper;
import wayoftime.bloodmagic.util.helper.NumeralHelper;
@ -27,10 +28,12 @@ import wayoftime.bloodmagic.util.helper.PlayerHelper;
public class ItemSigilDivination extends ItemSigilBase implements IAltarReader
{
private final boolean isSimple;
public ItemSigilDivination(boolean simple)
{
super(simple ? "divination" : "seer");
isSimple = simple;
}
@Override
@ -51,7 +54,7 @@ public class ItemSigilDivination extends ItemSigilBase implements IAltarReader
super.onItemRightClick(world, player, hand);
Binding binding = getBinding(stack);
if (binding != null)
if (isSimple && binding != null)
{
int currentEssence = NetworkHelper.getSoulNetwork(binding).getCurrentEssence();
List<ITextComponent> toSend = Lists.newArrayList();
@ -73,18 +76,21 @@ public class ItemSigilDivination extends ItemSigilBase implements IAltarReader
int currentEssence = altar.getCurrentBlood();
int capacity = altar.getCapacity();
altar.checkTier();
ChatUtil.sendNoSpam(player, new TranslationTextComponent(tooltipBase
+ "currentAltarTier", NumeralHelper.toRoman(tier)), new TranslationTextComponent(tooltipBase
+ "currentEssence", currentEssence), new TranslationTextComponent(tooltipBase
+ "currentAltarCapacity", capacity));
if (isSimple)
{
ChatUtil.sendNoSpam(player, new TranslationTextComponent(tooltipBase + "currentAltarTier", NumeralHelper.toRoman(tier)), new TranslationTextComponent(tooltipBase + "currentEssence", currentEssence), new TranslationTextComponent(tooltipBase + "currentAltarCapacity", capacity));
} else
{
ChatUtil.sendNoSpam(player, new TranslationTextComponent(tooltipBase + "currentAltarTier", NumeralHelper.toRoman(tier)), new TranslationTextComponent(tooltipBase + "currentEssence", currentEssence), new TranslationTextComponent(tooltipBase + "currentAltarCapacity", capacity));
}
} else if (tile != null && tile instanceof TileIncenseAltar)
{
TileIncenseAltar altar = (TileIncenseAltar) tile;
altar.recheckConstruction();
double tranquility = altar.tranquility;
ChatUtil.sendNoSpam(player, new TranslationTextComponent(tooltipBase + "currentTranquility", (int) ((100D * (int) (100 * tranquility)) / 100d)), new TranslationTextComponent(tooltipBase + "currentBonus", (int) (100 * altar.incenseAddition)));
}
// else if (tile != null && tile instanceof TileIncenseAltar)
// {
// TileIncenseAltar altar = (TileIncenseAltar) tile;
// altar.recheckConstruction();
// double tranquility = altar.tranquility;
// ChatUtil.sendNoSpam(player, new TextComponentTranslation(tooltipBase + "currentTranquility", (int) ((100D * (int) (100 * tranquility)) / 100d)), new TextComponentTranslation(tooltipBase + "currentBonus", (int) (100 * altar.incenseAddition)));
// } else if (tile != null && tile instanceof TileInversionPillar)
// else if (tile != null && tile instanceof TileInversionPillar)
// {
// TileInversionPillar pillar = (TileInversionPillar) tile;
// double inversion = pillar.getCurrentInversion();
@ -98,8 +104,7 @@ public class ItemSigilDivination extends ItemSigilBase implements IAltarReader
int currentEssence = NetworkHelper.getSoulNetwork(binding).getCurrentEssence();
List<ITextComponent> toSend = Lists.newArrayList();
if (!binding.getOwnerId().equals(player.getGameProfile().getId()))
toSend.add(new TranslationTextComponent(tooltipBase
+ "otherNetwork", binding.getOwnerName()));
toSend.add(new TranslationTextComponent(tooltipBase + "otherNetwork", binding.getOwnerName()));
toSend.add(new TranslationTextComponent(tooltipBase + "currentEssence", currentEssence));
ChatUtil.sendNoSpam(player, toSend.toArray(new ITextComponent[toSend.size()]));
}

View file

@ -8,7 +8,6 @@ import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.util.ActionResult;
import net.minecraft.util.ActionResultType;
@ -77,8 +76,6 @@ public class ItemSoulGem extends Item implements IDemonWillGem, IMultiWillTool
if (!stack.hasTag())
return;
Items d;
EnumDemonWillType type = this.getCurrentType(stack);
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.soulGem." + name));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.will", ChatUtil.DECIMAL_FORMAT.format(getWill(type, stack))));
@ -133,8 +130,7 @@ public class ItemSoulGem extends Item implements IDemonWillGem, IMultiWillTool
if (soulsLeft < getMaxWill(thisType, soulGemStack))
{
double newSoulsLeft = Math.min(soulsLeft
+ soul.getWill(thisType, soulStack), getMaxWill(thisType, soulGemStack));
double newSoulsLeft = Math.min(soulsLeft + soul.getWill(thisType, soulStack), getMaxWill(thisType, soulGemStack));
soul.drainWill(thisType, soulStack, newSoulsLeft - soulsLeft);
setWill(thisType, soulGemStack, newSoulsLeft);

View file

@ -28,6 +28,7 @@ public class AlchemyArrayRecipeProvider implements ISubRecipeProvider
AlchemyArrayRecipeBuilder.array(BloodMagic.rl("textures/models/alchemyarrays/magnetismsigil.png"), Ingredient.fromItems(BloodMagicItems.REAGENT_MAGNETISM.get()), Ingredient.fromItems(BloodMagicItems.IMBUED_SLATE.get()), new ItemStack(BloodMagicItems.MAGNETISM_SIGIL.get())).build(consumer, BloodMagic.rl(basePath + "magnetismsigil"));
AlchemyArrayRecipeBuilder.array(BloodMagic.rl("textures/models/alchemyarrays/lightsigil.png"), Ingredient.fromItems(BloodMagicItems.REAGENT_BLOOD_LIGHT.get()), Ingredient.fromItems(BloodMagicItems.IMBUED_SLATE.get()), new ItemStack(BloodMagicItems.BLOOD_LIGHT_SIGIL.get())).build(consumer, BloodMagic.rl(basePath + "bloodlightsigil"));
AlchemyArrayRecipeBuilder.array(BloodMagic.rl("textures/models/alchemyarrays/airsigil.png"), Ingredient.fromItems(BloodMagicItems.REAGENT_AIR.get()), Ingredient.fromItems(BloodMagicItems.REINFORCED_SLATE.get()), new ItemStack(BloodMagicItems.AIR_SIGIL.get())).build(consumer, BloodMagic.rl(basePath + "airsigil"));
AlchemyArrayRecipeBuilder.array(BloodMagic.rl("textures/models/alchemyarrays/sightsigil.png"), Ingredient.fromItems(BloodMagicItems.REAGENT_SIGHT.get()), Ingredient.fromItems(BloodMagicItems.REINFORCED_SLATE.get()), new ItemStack(BloodMagicItems.SEER_SIGIL.get())).build(consumer, BloodMagic.rl(basePath + "seersigil"));
// AlchemyArrayRecipeBuilder.array(BloodMagic.rl("textures/models/alchemyarrays/fastminersigil.png"), Ingredient.fromItems(BloodMagicItems.REAGENT_FAST_MINER.get()), Ingredient.fromItems(BloodMagicItems.REINFORCED_SLATE.get()), new ItemStack(BloodMagicItems.FAST_MINER_SIGIL.get())).build(consumer, BloodMagic.rl(basePath + "frostsigil"));
// BloodAltarRecipeBuilder.altar(Ingredient.fromTag(Tags.Items.GEMS_DIAMOND), new ItemStack(BloodMagicItems.WEAK_BLOOD_ORB.get()), AltarTier.ONE.ordinal(), 2000, 2, 1).build(consumer, new ResourceLocation(BloodMagic.MODID, basePath
// + "weakbloodorb"));

View file

@ -23,7 +23,7 @@ public class BloodAltarRecipeProvider implements ISubRecipeProvider
String basePath = "altar/";
// ONE
BloodAltarRecipeBuilder.altar(Ingredient.fromTag(Tags.Items.GEMS_DIAMOND), new ItemStack(BloodMagicItems.WEAK_BLOOD_ORB.get()), AltarTier.ONE.ordinal(), 2000, 2, 1).build(consumer, new ResourceLocation(BloodMagic.MODID, basePath + "weakbloodorb"));
BloodAltarRecipeBuilder.altar(Ingredient.fromTag(Tags.Items.GEMS_DIAMOND), new ItemStack(BloodMagicItems.WEAK_BLOOD_ORB.get()), AltarTier.ONE.ordinal(), 2000, 5, 1).build(consumer, new ResourceLocation(BloodMagic.MODID, basePath + "weakbloodorb"));
BloodAltarRecipeBuilder.altar(Ingredient.fromTag(Tags.Items.STONE), new ItemStack(BloodMagicItems.SLATE.get()), AltarTier.ONE.ordinal(), 1000, 5, 5).build(consumer, new ResourceLocation(BloodMagic.MODID, basePath + "slate"));
BloodAltarRecipeBuilder.altar(Ingredient.fromItems(Items.BUCKET), new ItemStack(BloodMagicBlocks.LIFE_ESSENCE_BUCKET.get()), AltarTier.ONE.ordinal(), 1000, 5, 0).build(consumer, BloodMagic.rl(basePath + "bucket_life"));

View file

@ -40,6 +40,7 @@ public class TartaricForgeRecipeProvider implements ISubRecipeProvider
TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicItems.REAGENT_MAGNETISM.get()), 600, 10, Ingredient.fromTag(Tags.Items.STRING), Ingredient.fromTag(Tags.Items.INGOTS_GOLD), Ingredient.fromTag(Tags.Items.INGOTS_GOLD), Ingredient.fromTag(Tags.Items.STORAGE_BLOCKS_IRON)).build(consumer, BloodMagic.rl(basePath + "reagent_magnetism"));
TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicItems.REAGENT_FAST_MINER.get()), 128, 20, Ingredient.fromItems(Items.IRON_PICKAXE), Ingredient.fromItems(Items.IRON_AXE), Ingredient.fromItems(Items.IRON_SHOVEL), Ingredient.fromTag(Tags.Items.GUNPOWDER)).build(consumer, BloodMagic.rl(basePath + "reagent_fastminer"));
TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicItems.REAGENT_BLOOD_LIGHT.get()), 300, 10, Ingredient.fromTag(Tags.Items.DUSTS_GLOWSTONE), Ingredient.fromItems(Items.TORCH), Ingredient.fromTag(Tags.Items.DUSTS_REDSTONE), Ingredient.fromTag(Tags.Items.DUSTS_REDSTONE)).build(consumer, BloodMagic.rl(basePath + "reagent_blood_light"));
TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicItems.REAGENT_SIGHT.get()), 64, 0, Ingredient.fromTag(Tags.Items.DUSTS_GLOWSTONE), Ingredient.fromTag(Tags.Items.GLASS), Ingredient.fromTag(Tags.Items.GLASS), Ingredient.fromItems(BloodMagicItems.DIVINATION_SIGIL.get())).build(consumer, BloodMagic.rl(basePath + "reagent_sight"));
TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicBlocks.DEMON_CRUCIBLE.get()), 400, 100, Ingredient.fromItems(Items.CAULDRON), Ingredient.fromTag(Tags.Items.STONE), Ingredient.fromTag(Tags.Items.GEMS_LAPIS), Ingredient.fromTag(Tags.Items.GEMS_DIAMOND)).build(consumer, BloodMagic.rl(basePath + "demon_crucible"));
TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicBlocks.DEMON_CRYSTALLIZER.get()), 500, 100, Ingredient.fromItems(BloodMagicBlocks.SOUL_FORGE.get()), Ingredient.fromTag(Tags.Items.STONE), Ingredient.fromTag(Tags.Items.GEMS_LAPIS), Ingredient.fromTag(Tags.Items.GLASS)).build(consumer, BloodMagic.rl(basePath + "demon_crystallizer"));