Reimplemented the Well of Suffering
And about time, too
This commit is contained in:
parent
5713d6db2a
commit
afcd09753a
|
@ -58,7 +58,7 @@ e6d9cf699667aaa47efff37b2b033895dee29c15 assets/bloodmagic/blockstates/waterritu
|
||||||
42f26f715bddd16c069f9b51e3767b36477c8908 assets/bloodmagic/blockstates/woodtilepath.json
|
42f26f715bddd16c069f9b51e3767b36477c8908 assets/bloodmagic/blockstates/woodtilepath.json
|
||||||
3c6ce233dae6c1307d9016406c324bbe844b4e1e assets/bloodmagic/blockstates/wornstonebrickpath.json
|
3c6ce233dae6c1307d9016406c324bbe844b4e1e assets/bloodmagic/blockstates/wornstonebrickpath.json
|
||||||
d59655f12d1724b73b77c373fb6864fcff69db12 assets/bloodmagic/blockstates/wornstonetilepath.json
|
d59655f12d1724b73b77c373fb6864fcff69db12 assets/bloodmagic/blockstates/wornstonetilepath.json
|
||||||
1ff92610a5c5287b8c0b57fe9c91b62052089821 assets/bloodmagic/lang/en_us.json
|
38c84e82a23764bfcb25b706227e3c6715884009 assets/bloodmagic/lang/en_us.json
|
||||||
34445195b9f2459475cde53454bc8e37d32865d7 assets/bloodmagic/models/block/accelerationrune.json
|
34445195b9f2459475cde53454bc8e37d32865d7 assets/bloodmagic/models/block/accelerationrune.json
|
||||||
bcdbccc49d4509571be6988762ab87126275a4c8 assets/bloodmagic/models/block/airritualstone.json
|
bcdbccc49d4509571be6988762ab87126275a4c8 assets/bloodmagic/models/block/airritualstone.json
|
||||||
adf6c0b1e25451609486dc8c8cfbd9cf0f8c67f4 assets/bloodmagic/models/block/alchemicalreactionchamber.json
|
adf6c0b1e25451609486dc8c8cfbd9cf0f8c67f4 assets/bloodmagic/models/block/alchemicalreactionchamber.json
|
||||||
|
@ -529,6 +529,7 @@ f748a5ba8838b50de0502f132fe2a65f4726dae6 data/bloodmagic/loot_tables/blocks/soul
|
||||||
c95cd70b7ca320e18618c07827add555984b0e45 data/bloodmagic/loot_tables/test.json
|
c95cd70b7ca320e18618c07827add555984b0e45 data/bloodmagic/loot_tables/test.json
|
||||||
2df19ff659705a5408ce0819a947764673404388 data/bloodmagic/recipes/alchemy_table.json
|
2df19ff659705a5408ce0819a947764673404388 data/bloodmagic/recipes/alchemy_table.json
|
||||||
a343604b5a75e1b3810df97d024813fb041cffb6 data/bloodmagic/recipes/alchemytable/basic_cutting_fluid.json
|
a343604b5a75e1b3810df97d024813fb041cffb6 data/bloodmagic/recipes/alchemytable/basic_cutting_fluid.json
|
||||||
|
cc28a48ec4b21be99c4ec13f6e560c322012192c data/bloodmagic/recipes/alchemytable/bow_power_anointment.json
|
||||||
6a93bcd65cf2636fc684276777f56630f82d710c data/bloodmagic/recipes/alchemytable/bread.json
|
6a93bcd65cf2636fc684276777f56630f82d710c data/bloodmagic/recipes/alchemytable/bread.json
|
||||||
e50009fa724173c2dcb4fab49b4f029039f69bf8 data/bloodmagic/recipes/alchemytable/clay_from_sand.json
|
e50009fa724173c2dcb4fab49b4f029039f69bf8 data/bloodmagic/recipes/alchemytable/clay_from_sand.json
|
||||||
72f8d4afe57970d3969a9373b18f8eac86b245bc data/bloodmagic/recipes/alchemytable/cobweb.json
|
72f8d4afe57970d3969a9373b18f8eac86b245bc data/bloodmagic/recipes/alchemytable/cobweb.json
|
||||||
|
@ -541,6 +542,7 @@ aff95e4322f9e8daaffc2337964f95ab6f9d631c data/bloodmagic/recipes/alchemytable/gr
|
||||||
9f1b37b59f8abbe419306b3eb8af59317a54483a data/bloodmagic/recipes/alchemytable/hidden_knowledge_anointment.json
|
9f1b37b59f8abbe419306b3eb8af59317a54483a data/bloodmagic/recipes/alchemytable/hidden_knowledge_anointment.json
|
||||||
566352daaa6e6803df68475d964108b3f89cebd2 data/bloodmagic/recipes/alchemytable/holy_water_anointment.json
|
566352daaa6e6803df68475d964108b3f89cebd2 data/bloodmagic/recipes/alchemytable/holy_water_anointment.json
|
||||||
0657a60976678fdfbdf0b8ee2c178502520d194a data/bloodmagic/recipes/alchemytable/leather_from_flesh.json
|
0657a60976678fdfbdf0b8ee2c178502520d194a data/bloodmagic/recipes/alchemytable/leather_from_flesh.json
|
||||||
|
c42ae24ad8955d8cf0a1f1096b0bca37d55621cf data/bloodmagic/recipes/alchemytable/looting_anointment.json
|
||||||
93620eaad39a46a97f3381ff5c645e59d7dddd16 data/bloodmagic/recipes/alchemytable/melee_damage_anointment.json
|
93620eaad39a46a97f3381ff5c645e59d7dddd16 data/bloodmagic/recipes/alchemytable/melee_damage_anointment.json
|
||||||
b18dde32d8a428f44437c0e53e5fdb990597498d data/bloodmagic/recipes/alchemytable/nether_wart_from_block.json
|
b18dde32d8a428f44437c0e53e5fdb990597498d data/bloodmagic/recipes/alchemytable/nether_wart_from_block.json
|
||||||
0a5ce0f2d09a596fb47b27a60e66eceeb04e0b0d data/bloodmagic/recipes/alchemytable/plantoil_from_beets.json
|
0a5ce0f2d09a596fb47b27a60e66eceeb04e0b0d data/bloodmagic/recipes/alchemytable/plantoil_from_beets.json
|
||||||
|
@ -553,6 +555,7 @@ f41e9bf8376ffcad07752b5657e27e06e500be0a data/bloodmagic/recipes/alchemytable/pl
|
||||||
06f00cce47e0d5e5d25a2587796494340f8a3278 data/bloodmagic/recipes/alchemytable/sand_iron.json
|
06f00cce47e0d5e5d25a2587796494340f8a3278 data/bloodmagic/recipes/alchemytable/sand_iron.json
|
||||||
3e3359b89a8c38c0fdeb2b4ca2920bce053082f8 data/bloodmagic/recipes/alchemytable/silk_touch_anointment.json
|
3e3359b89a8c38c0fdeb2b4ca2920bce053082f8 data/bloodmagic/recipes/alchemytable/silk_touch_anointment.json
|
||||||
f7e91d164ea5c782420ff3507a98da16c5915b73 data/bloodmagic/recipes/alchemytable/slate_vial.json
|
f7e91d164ea5c782420ff3507a98da16c5915b73 data/bloodmagic/recipes/alchemytable/slate_vial.json
|
||||||
|
4158f21d795aeeec52cfdec718ba9f82b0f2d10d data/bloodmagic/recipes/alchemytable/smelting_anointment.json
|
||||||
a91e81c79959b522bcd1bac901bca646184015de data/bloodmagic/recipes/alchemytable/string.json
|
a91e81c79959b522bcd1bac901bca646184015de data/bloodmagic/recipes/alchemytable/string.json
|
||||||
3c9d829f7bff8a4d607c46fc3ff4f86dffa28fd5 data/bloodmagic/recipes/altar/air_tool.json
|
3c9d829f7bff8a4d607c46fc3ff4f86dffa28fd5 data/bloodmagic/recipes/altar/air_tool.json
|
||||||
f41b0e9dfab608c42a85c3c5c5bbc050b03f02a1 data/bloodmagic/recipes/altar/apprenticebloodorb.json
|
f41b0e9dfab608c42a85c3c5c5bbc050b03f02a1 data/bloodmagic/recipes/altar/apprenticebloodorb.json
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
"anointment.bloodmagic.melee_damage": "Whetstone",
|
"anointment.bloodmagic.melee_damage": "Whetstone",
|
||||||
"anointment.bloodmagic.quick_draw": "Deft Hands",
|
"anointment.bloodmagic.quick_draw": "Deft Hands",
|
||||||
"anointment.bloodmagic.silk_touch": "Soft Touch",
|
"anointment.bloodmagic.silk_touch": "Soft Touch",
|
||||||
|
"anointment.bloodmagic.smelting": "Heated Tool",
|
||||||
"block.bloodmagic.accelerationrune": "Acceleration Rune",
|
"block.bloodmagic.accelerationrune": "Acceleration Rune",
|
||||||
"block.bloodmagic.airritualstone": "Air Ritual Stone",
|
"block.bloodmagic.airritualstone": "Air Ritual Stone",
|
||||||
"block.bloodmagic.alchemicalreactionchamber": "Alchemical Reaction Chamber",
|
"block.bloodmagic.alchemicalreactionchamber": "Alchemical Reaction Chamber",
|
||||||
|
@ -163,6 +164,7 @@
|
||||||
"item.bloodmagic.sigilofmagnetism": "Sigil of Magnetism",
|
"item.bloodmagic.sigilofmagnetism": "Sigil of Magnetism",
|
||||||
"item.bloodmagic.silk_touch_anointment": "Soft Coating",
|
"item.bloodmagic.silk_touch_anointment": "Soft Coating",
|
||||||
"item.bloodmagic.slate_vial": "Slate-infused Vial",
|
"item.bloodmagic.slate_vial": "Slate-infused Vial",
|
||||||
|
"item.bloodmagic.smelting_anointment": "Slow-burning Oil",
|
||||||
"item.bloodmagic.soulaxe": "Sentient Axe",
|
"item.bloodmagic.soulaxe": "Sentient Axe",
|
||||||
"item.bloodmagic.soulgemcommon": "Common Tartaric Gem",
|
"item.bloodmagic.soulgemcommon": "Common Tartaric Gem",
|
||||||
"item.bloodmagic.soulgemgreater": "Greater Tartaric Gem",
|
"item.bloodmagic.soulgemgreater": "Greater Tartaric Gem",
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
"type": "bloodmagic:alchemytable",
|
||||||
|
"input": [
|
||||||
|
{
|
||||||
|
"item": "bloodmagic:slate_vial"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "forge:crops/nether_wart"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "forge:ingots/iron"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"item": "minecraft:bow"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"output": {
|
||||||
|
"item": "bloodmagic:bow_power_anointment"
|
||||||
|
},
|
||||||
|
"syphon": 500,
|
||||||
|
"ticks": 100,
|
||||||
|
"upgradeLevel": 1
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
"type": "bloodmagic:alchemytable",
|
||||||
|
"input": [
|
||||||
|
{
|
||||||
|
"item": "bloodmagic:slate_vial"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "forge:crops/nether_wart"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "forge:gems/lapis"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "forge:bones"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"output": {
|
||||||
|
"item": "bloodmagic:looting_anointment"
|
||||||
|
},
|
||||||
|
"syphon": 500,
|
||||||
|
"ticks": 100,
|
||||||
|
"upgradeLevel": 1
|
||||||
|
}
|
|
@ -0,0 +1,28 @@
|
||||||
|
{
|
||||||
|
"type": "bloodmagic:alchemytable",
|
||||||
|
"input": [
|
||||||
|
{
|
||||||
|
"item": "bloodmagic:slate_vial"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "forge:crops/nether_wart"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"item": "minecraft:furnace"
|
||||||
|
},
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"item": "minecraft:charcoal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"item": "minecraft:coal"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"output": {
|
||||||
|
"item": "bloodmagic:smelting_anointment"
|
||||||
|
},
|
||||||
|
"syphon": 500,
|
||||||
|
"ticks": 100,
|
||||||
|
"upgradeLevel": 1
|
||||||
|
}
|
|
@ -355,6 +355,7 @@ public class GeneratorLanguage extends LanguageProvider
|
||||||
add("anointment.bloodmagic.quick_draw", "Deft Hands");
|
add("anointment.bloodmagic.quick_draw", "Deft Hands");
|
||||||
add("anointment.bloodmagic.bow_power", "Heavy Shot");
|
add("anointment.bloodmagic.bow_power", "Heavy Shot");
|
||||||
add("anointment.bloodmagic.looting", "Plundering");
|
add("anointment.bloodmagic.looting", "Plundering");
|
||||||
|
add("anointment.bloodmagic.smelting", "Heated Tool");
|
||||||
|
|
||||||
// Guide
|
// Guide
|
||||||
add("guide.bloodmagic.name", "Sanguine Scientiem");
|
add("guide.bloodmagic.name", "Sanguine Scientiem");
|
||||||
|
@ -544,6 +545,7 @@ public class GeneratorLanguage extends LanguageProvider
|
||||||
addItem(BloodMagicItems.QUICK_DRAW_ANOINTMENT, "Dexterity Alkahest");
|
addItem(BloodMagicItems.QUICK_DRAW_ANOINTMENT, "Dexterity Alkahest");
|
||||||
addItem(BloodMagicItems.BOW_POWER_ANOINTMENT, "Iron Tip");
|
addItem(BloodMagicItems.BOW_POWER_ANOINTMENT, "Iron Tip");
|
||||||
addItem(BloodMagicItems.LOOTING_ANOINTMENT, "Plunderer's Glint");
|
addItem(BloodMagicItems.LOOTING_ANOINTMENT, "Plunderer's Glint");
|
||||||
|
addItem(BloodMagicItems.SMELTING_ANOINTMENT, "Slow-burning Oil");
|
||||||
|
|
||||||
// Alchemy Items
|
// Alchemy Items
|
||||||
addItem(BloodMagicItems.PLANT_OIL, "Plant Oil");
|
addItem(BloodMagicItems.PLANT_OIL, "Plant Oil");
|
||||||
|
|
|
@ -50,5 +50,8 @@ public class AlchemyTableRecipeProvider implements ISubRecipeProvider
|
||||||
AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.HOLY_WATER_ANOINTMENT.get()), 500, 100, 1).addIngredient(Ingredient.fromItems(BloodMagicItems.SLATE_VIAL.get())).addIngredient(Ingredient.fromTag(Tags.Items.CROPS_NETHER_WART)).addIngredient(Ingredient.fromItems(Items.GLISTERING_MELON_SLICE)).addIngredient(Ingredient.fromTag(Tags.Items.GEMS_QUARTZ)).build(consumer, BloodMagic.rl(basePath + "holy_water_anointment"));
|
AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.HOLY_WATER_ANOINTMENT.get()), 500, 100, 1).addIngredient(Ingredient.fromItems(BloodMagicItems.SLATE_VIAL.get())).addIngredient(Ingredient.fromTag(Tags.Items.CROPS_NETHER_WART)).addIngredient(Ingredient.fromItems(Items.GLISTERING_MELON_SLICE)).addIngredient(Ingredient.fromTag(Tags.Items.GEMS_QUARTZ)).build(consumer, BloodMagic.rl(basePath + "holy_water_anointment"));
|
||||||
AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.HIDDEN_KNOWLEDGE_ANOINTMENT.get()), 500, 100, 1).addIngredient(Ingredient.fromItems(BloodMagicItems.SLATE_VIAL.get())).addIngredient(Ingredient.fromTag(Tags.Items.CROPS_NETHER_WART)).addIngredient(Ingredient.fromItems(Items.GLASS_BOTTLE)).addIngredient(Ingredient.fromItems(Items.ENCHANTED_BOOK)).build(consumer, BloodMagic.rl(basePath + "hidden_knowledge_anointment"));
|
AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.HIDDEN_KNOWLEDGE_ANOINTMENT.get()), 500, 100, 1).addIngredient(Ingredient.fromItems(BloodMagicItems.SLATE_VIAL.get())).addIngredient(Ingredient.fromTag(Tags.Items.CROPS_NETHER_WART)).addIngredient(Ingredient.fromItems(Items.GLASS_BOTTLE)).addIngredient(Ingredient.fromItems(Items.ENCHANTED_BOOK)).build(consumer, BloodMagic.rl(basePath + "hidden_knowledge_anointment"));
|
||||||
AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.QUICK_DRAW_ANOINTMENT.get()), 500, 100, 1).addIngredient(Ingredient.fromItems(BloodMagicItems.SLATE_VIAL.get())).addIngredient(Ingredient.fromTag(Tags.Items.CROPS_NETHER_WART)).addIngredient(Ingredient.fromTag(Tags.Items.STRING)).addIngredient(Ingredient.fromItems(Items.SPECTRAL_ARROW)).build(consumer, BloodMagic.rl(basePath + "quick_draw_anointment"));
|
AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.QUICK_DRAW_ANOINTMENT.get()), 500, 100, 1).addIngredient(Ingredient.fromItems(BloodMagicItems.SLATE_VIAL.get())).addIngredient(Ingredient.fromTag(Tags.Items.CROPS_NETHER_WART)).addIngredient(Ingredient.fromTag(Tags.Items.STRING)).addIngredient(Ingredient.fromItems(Items.SPECTRAL_ARROW)).build(consumer, BloodMagic.rl(basePath + "quick_draw_anointment"));
|
||||||
|
AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.LOOTING_ANOINTMENT.get()), 500, 100, 1).addIngredient(Ingredient.fromItems(BloodMagicItems.SLATE_VIAL.get())).addIngredient(Ingredient.fromTag(Tags.Items.CROPS_NETHER_WART)).addIngredient(Ingredient.fromTag(Tags.Items.GEMS_LAPIS)).addIngredient(Ingredient.fromTag(Tags.Items.BONES)).build(consumer, BloodMagic.rl(basePath + "looting_anointment"));
|
||||||
|
AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.BOW_POWER_ANOINTMENT.get()), 500, 100, 1).addIngredient(Ingredient.fromItems(BloodMagicItems.SLATE_VIAL.get())).addIngredient(Ingredient.fromTag(Tags.Items.CROPS_NETHER_WART)).addIngredient(Ingredient.fromTag(Tags.Items.INGOTS_IRON)).addIngredient(Ingredient.fromItems(Items.BOW)).build(consumer, BloodMagic.rl(basePath + "bow_power_anointment"));
|
||||||
|
AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.SMELTING_ANOINTMENT.get()), 500, 100, 1).addIngredient(Ingredient.fromItems(BloodMagicItems.SLATE_VIAL.get())).addIngredient(Ingredient.fromTag(Tags.Items.CROPS_NETHER_WART)).addIngredient(Ingredient.fromItems(Items.FURNACE)).addIngredient(Ingredient.fromItems(Items.CHARCOAL, Items.COAL)).build(consumer, BloodMagic.rl(basePath + "smelting_anointment"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,6 +51,10 @@ public class EntityShapedCharge extends ThrowableEntity
|
||||||
super.tick();
|
super.tick();
|
||||||
RayTraceResult raytraceresult = ProjectileHelper.func_234618_a_(this, this::func_230298_a_);
|
RayTraceResult raytraceresult = ProjectileHelper.func_234618_a_(this, this::func_230298_a_);
|
||||||
// boolean flag = false;
|
// boolean flag = false;
|
||||||
|
if (world.isRemote)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (raytraceresult.getType() == RayTraceResult.Type.BLOCK)
|
if (raytraceresult.getType() == RayTraceResult.Type.BLOCK)
|
||||||
{
|
{
|
||||||
Direction faceHit = ((BlockRayTraceResult) raytraceresult).getFace();
|
Direction faceHit = ((BlockRayTraceResult) raytraceresult).getFace();
|
||||||
|
|
|
@ -0,0 +1,157 @@
|
||||||
|
package wayoftime.bloodmagic.ritual.types;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
|
import net.minecraft.entity.LivingEntity;
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
import net.minecraft.util.math.AxisAlignedBB;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import wayoftime.bloodmagic.BloodMagic;
|
||||||
|
import wayoftime.bloodmagic.impl.BloodMagicAPI;
|
||||||
|
import wayoftime.bloodmagic.ritual.AreaDescriptor;
|
||||||
|
import wayoftime.bloodmagic.ritual.EnumRuneType;
|
||||||
|
import wayoftime.bloodmagic.ritual.IMasterRitualStone;
|
||||||
|
import wayoftime.bloodmagic.ritual.Ritual;
|
||||||
|
import wayoftime.bloodmagic.ritual.RitualComponent;
|
||||||
|
import wayoftime.bloodmagic.ritual.RitualManager;
|
||||||
|
import wayoftime.bloodmagic.ritual.RitualRegister;
|
||||||
|
import wayoftime.bloodmagic.tile.TileAltar;
|
||||||
|
|
||||||
|
@RitualRegister("well_of_suffering")
|
||||||
|
public class RitualWellOfSuffering extends Ritual
|
||||||
|
{
|
||||||
|
public static final String ALTAR_RANGE = "altar";
|
||||||
|
public static final String DAMAGE_RANGE = "damage";
|
||||||
|
|
||||||
|
public static final int SACRIFICE_AMOUNT = 25;
|
||||||
|
|
||||||
|
public BlockPos altarOffsetPos = new BlockPos(0, 0, 0); // TODO: Save!
|
||||||
|
|
||||||
|
public RitualWellOfSuffering()
|
||||||
|
{
|
||||||
|
super("ritualWellOfSuffering", 0, 40000, "ritual." + BloodMagic.MODID + ".wellOfSufferingRitual");
|
||||||
|
addBlockRange(ALTAR_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-5, -10, -5), 11, 21, 11));
|
||||||
|
addBlockRange(DAMAGE_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-10, -10, -10), 21));
|
||||||
|
|
||||||
|
setMaximumVolumeAndDistanceOfRange(ALTAR_RANGE, 0, 10, 15);
|
||||||
|
setMaximumVolumeAndDistanceOfRange(DAMAGE_RANGE, 0, 15, 15);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void performRitual(IMasterRitualStone masterRitualStone)
|
||||||
|
{
|
||||||
|
World world = masterRitualStone.getWorldObj();
|
||||||
|
int currentEssence = masterRitualStone.getOwnerNetwork().getCurrentEssence();
|
||||||
|
|
||||||
|
if (currentEssence < getRefreshCost())
|
||||||
|
{
|
||||||
|
masterRitualStone.getOwnerNetwork().causeNausea();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
BlockPos pos = masterRitualStone.getBlockPos();
|
||||||
|
|
||||||
|
int maxEffects = currentEssence / getRefreshCost();
|
||||||
|
int totalEffects = 0;
|
||||||
|
|
||||||
|
BlockPos altarPos = pos.add(altarOffsetPos);
|
||||||
|
|
||||||
|
TileEntity tile = world.getTileEntity(altarPos);
|
||||||
|
|
||||||
|
AreaDescriptor altarRange = masterRitualStone.getBlockRange(ALTAR_RANGE);
|
||||||
|
|
||||||
|
if (!altarRange.isWithinArea(altarOffsetPos) || !(tile instanceof TileAltar))
|
||||||
|
{
|
||||||
|
for (BlockPos newPos : altarRange.getContainedPositions(pos))
|
||||||
|
{
|
||||||
|
TileEntity nextTile = world.getTileEntity(newPos);
|
||||||
|
if (nextTile instanceof TileAltar)
|
||||||
|
{
|
||||||
|
tile = nextTile;
|
||||||
|
altarOffsetPos = newPos.subtract(pos);
|
||||||
|
|
||||||
|
altarRange.resetCache();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tile instanceof TileAltar)
|
||||||
|
{
|
||||||
|
TileAltar tileAltar = (TileAltar) tile;
|
||||||
|
|
||||||
|
AreaDescriptor damageRange = masterRitualStone.getBlockRange(DAMAGE_RANGE);
|
||||||
|
AxisAlignedBB range = damageRange.getAABB(pos);
|
||||||
|
|
||||||
|
List<LivingEntity> entities = world.getEntitiesWithinAABB(LivingEntity.class, range);
|
||||||
|
|
||||||
|
for (LivingEntity entity : entities)
|
||||||
|
{
|
||||||
|
// EntityEntry entityEntry = ForgeRegistries.ENTITIES.getKe;
|
||||||
|
ResourceLocation id = entity.getType().getRegistryName();
|
||||||
|
|
||||||
|
if (BloodMagicAPI.INSTANCE.getBlacklist().getSacrifice().contains(id))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
int lifeEssenceRatio = BloodMagicAPI.INSTANCE.getValueManager().getSacrificial().getOrDefault(id, SACRIFICE_AMOUNT);
|
||||||
|
|
||||||
|
if (lifeEssenceRatio <= 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (entity.isAlive() && !(entity instanceof PlayerEntity))
|
||||||
|
{
|
||||||
|
if (entity.attackEntityFrom(RitualManager.RITUAL_DAMAGE, 1))
|
||||||
|
{
|
||||||
|
if (entity.isChild())
|
||||||
|
lifeEssenceRatio *= 0.5F;
|
||||||
|
|
||||||
|
tileAltar.sacrificialDaggerCall(lifeEssenceRatio, true);
|
||||||
|
|
||||||
|
totalEffects++;
|
||||||
|
|
||||||
|
if (totalEffects >= maxEffects)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
masterRitualStone.getOwnerNetwork().syphon(masterRitualStone.ticket(getRefreshCost() * totalEffects));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getRefreshTime()
|
||||||
|
{
|
||||||
|
return 25;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getRefreshCost()
|
||||||
|
{
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void gatherComponents(Consumer<RitualComponent> components)
|
||||||
|
{
|
||||||
|
addCornerRunes(components, 1, 0, EnumRuneType.FIRE);
|
||||||
|
addCornerRunes(components, 2, -1, EnumRuneType.FIRE);
|
||||||
|
addParallelRunes(components, 2, -1, EnumRuneType.EARTH);
|
||||||
|
addCornerRunes(components, -3, -1, EnumRuneType.DUSK);
|
||||||
|
addOffsetRunes(components, 2, 4, -1, EnumRuneType.WATER);
|
||||||
|
addOffsetRunes(components, 1, 4, 0, EnumRuneType.WATER);
|
||||||
|
addParallelRunes(components, 4, 1, EnumRuneType.AIR);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Ritual getNewCopy()
|
||||||
|
{
|
||||||
|
return new RitualWellOfSuffering();
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue