Added recipes to Shaped and Deforester charges.
Also fixed bug with Living Armour that prevented it from upgrading under certain conditions.
This commit is contained in:
parent
8e6f36d2a9
commit
b3af1b8e77
18 changed files with 104 additions and 37 deletions
|
@ -422,6 +422,9 @@ public class GeneratorLanguage extends LanguageProvider
|
|||
|
||||
addBlock(BloodMagicBlocks.DUNGEON_ORE, "Demonite");
|
||||
|
||||
addBlock(BloodMagicBlocks.SHAPED_CHARGE, "Shaped Charge");
|
||||
addBlock(BloodMagicBlocks.DEFORESTER_CHARGE, "Deforester Charge");
|
||||
|
||||
// Item names
|
||||
addItem(BloodMagicItems.WEAK_BLOOD_ORB, "Weak Blood Orb");
|
||||
addItem(BloodMagicItems.APPRENTICE_BLOOD_ORB, "Apprentice Blood Orb");
|
||||
|
|
|
@ -518,38 +518,42 @@ public class ItemSentientScythe extends HoeItem implements IDemonWillWeapon, IMu
|
|||
@Override
|
||||
public boolean hitEntity(ItemStack stack, LivingEntity target, LivingEntity attacker)
|
||||
{
|
||||
if (super.hitEntity(stack, target, attacker))
|
||||
stack.damageItem(1, attacker, (entity) -> {
|
||||
entity.sendBreakAnimation(EquipmentSlotType.MAINHAND);
|
||||
});
|
||||
|
||||
// if (super.hitEntity(stack, target, attacker))
|
||||
// {
|
||||
if (attacker instanceof PlayerEntity)
|
||||
{
|
||||
if (attacker instanceof PlayerEntity)
|
||||
UUID id = attacker.getUniqueID();
|
||||
|
||||
PlayerEntity attackerPlayer = (PlayerEntity) attacker;
|
||||
|
||||
// System.out.println("Hit map: " + hitMap.containsKey(id));
|
||||
|
||||
if (hitMap.containsKey(id) && hitMap.get(id))
|
||||
{
|
||||
UUID id = attacker.getUniqueID();
|
||||
|
||||
PlayerEntity attackerPlayer = (PlayerEntity) attacker;
|
||||
|
||||
System.out.println("Hit map: " + hitMap.containsKey(id));
|
||||
|
||||
if (hitMap.containsKey(id) && hitMap.get(id))
|
||||
{
|
||||
EnumDemonWillType type = this.getCurrentType(stack);
|
||||
double will = PlayerDemonWillHandler.getTotalDemonWill(type, attackerPlayer);
|
||||
int willBracket = this.getLevel(stack, will);
|
||||
applyEffectToEntity(type, willBracket, target, attackerPlayer);
|
||||
} else
|
||||
{
|
||||
this.recalculatePowers(stack, attackerPlayer.getEntityWorld(), attackerPlayer);
|
||||
EnumDemonWillType type = this.getCurrentType(stack);
|
||||
double will = PlayerDemonWillHandler.getTotalDemonWill(type, attackerPlayer);
|
||||
int willBracket = this.getLevel(stack, will);
|
||||
hitMap.put(id, true);
|
||||
this.attackEntitiesInAreaExcludingEntity(stack, attackerPlayer, type, willBracket, target);
|
||||
hitMap.remove(id);
|
||||
}
|
||||
EnumDemonWillType type = this.getCurrentType(stack);
|
||||
double will = PlayerDemonWillHandler.getTotalDemonWill(type, attackerPlayer);
|
||||
int willBracket = this.getLevel(stack, will);
|
||||
applyEffectToEntity(type, willBracket, target, attackerPlayer);
|
||||
} else
|
||||
{
|
||||
this.recalculatePowers(stack, attackerPlayer.getEntityWorld(), attackerPlayer);
|
||||
EnumDemonWillType type = this.getCurrentType(stack);
|
||||
double will = PlayerDemonWillHandler.getTotalDemonWill(type, attackerPlayer);
|
||||
int willBracket = this.getLevel(stack, will);
|
||||
hitMap.put(id, true);
|
||||
this.attackEntitiesInAreaExcludingEntity(stack, attackerPlayer, type, willBracket, target);
|
||||
hitMap.remove(id);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return true;
|
||||
// }
|
||||
|
||||
// return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -21,7 +21,7 @@ public class AlchemyTableRecipeProvider implements ISubRecipeProvider
|
|||
{
|
||||
String basePath = "alchemytable/";
|
||||
AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(Items.STRING, 4), 100, 100, 0).addIngredient(Ingredient.fromTag(ItemTags.WOOL)).addIngredient(Ingredient.fromItems(Items.FLINT)).build(consumer, BloodMagic.rl(basePath + "string"));
|
||||
AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(Items.FLINT), 50, 20, 0).addIngredient(Ingredient.fromItems(Items.GRAVEL)).addIngredient(Ingredient.fromItems(Items.FLINT)).build(consumer, BloodMagic.rl(basePath + "flint_from_gravel"));
|
||||
AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(Items.FLINT, 2), 50, 20, 0).addIngredient(Ingredient.fromItems(Items.GRAVEL)).addIngredient(Ingredient.fromItems(Items.FLINT)).build(consumer, BloodMagic.rl(basePath + "flint_from_gravel"));
|
||||
AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(Items.LEATHER, 4), 100, 200, 1).addIngredient(Ingredient.fromItems(Items.ROTTEN_FLESH)).addIngredient(Ingredient.fromItems(Items.ROTTEN_FLESH)).addIngredient(Ingredient.fromItems(Items.ROTTEN_FLESH)).addIngredient(Ingredient.fromItems(Items.ROTTEN_FLESH)).addIngredient(Ingredient.fromItems(Items.FLINT)).addIngredient(Ingredient.fromItems(Items.WATER_BUCKET)).build(consumer, BloodMagic.rl(basePath + "leather_from_flesh"));
|
||||
AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.EXPLOSIVE_POWDER.get()), 500, 200, 1).addIngredient(Ingredient.fromTag(Tags.Items.GUNPOWDER)).addIngredient(Ingredient.fromTag(Tags.Items.GUNPOWDER)).addIngredient(Ingredient.fromTag(BloodMagicTags.DUST_COAL)).build(consumer, BloodMagic.rl(basePath + "explosive_powder"));
|
||||
AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(Items.BREAD), 100, 200, 1).addIngredient(Ingredient.fromTag(Tags.Items.CROPS_WHEAT)).addIngredient(Ingredient.fromItems(Items.SUGAR)).build(consumer, BloodMagic.rl(basePath + "bread"));
|
||||
|
|
|
@ -55,6 +55,9 @@ public class TartaricForgeRecipeProvider implements ISubRecipeProvider
|
|||
TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicBlocks.DESTRUCTIVE_CRYSTAL_BLOCK.get()), 1200, 100, Ingredient.fromItems(BloodMagicItems.DESTRUCTIVE_CRYSTAL.get()), Ingredient.fromItems(BloodMagicItems.DESTRUCTIVE_CRYSTAL.get()), Ingredient.fromItems(BloodMagicItems.DESTRUCTIVE_CRYSTAL.get()), Ingredient.fromItems(BloodMagicItems.DESTRUCTIVE_CRYSTAL.get())).build(consumer, BloodMagic.rl(basePath + "destructive_crystal_block"));
|
||||
TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicBlocks.VENGEFUL_CRYSTAL_BLOCK.get()), 1200, 100, Ingredient.fromItems(BloodMagicItems.VENGEFUL_CRYSTAL.get()), Ingredient.fromItems(BloodMagicItems.VENGEFUL_CRYSTAL.get()), Ingredient.fromItems(BloodMagicItems.VENGEFUL_CRYSTAL.get()), Ingredient.fromItems(BloodMagicItems.VENGEFUL_CRYSTAL.get())).build(consumer, BloodMagic.rl(basePath + "vengeful_crystal_block"));
|
||||
TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicBlocks.STEADFAST_CRYSTAL_BLOCK.get()), 1200, 100, Ingredient.fromItems(BloodMagicItems.STEADFAST_CRYSTAL.get()), Ingredient.fromItems(BloodMagicItems.STEADFAST_CRYSTAL.get()), Ingredient.fromItems(BloodMagicItems.STEADFAST_CRYSTAL.get()), Ingredient.fromItems(BloodMagicItems.STEADFAST_CRYSTAL.get())).build(consumer, BloodMagic.rl(basePath + "steadfast_crystal_block"));
|
||||
|
||||
TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicBlocks.SHAPED_CHARGE.get(), 8), 10, 0.5, Ingredient.fromTag(Tags.Items.COBBLESTONE), Ingredient.fromItems(Items.CHARCOAL), Ingredient.fromTag(Tags.Items.SAND), Ingredient.fromTag(Tags.Items.STONE)).build(consumer, BloodMagic.rl(basePath + "shaped_charge"));
|
||||
TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicBlocks.DEFORESTER_CHARGE.get(), 8), 10, 0.5, Ingredient.fromTag(Tags.Items.COBBLESTONE), Ingredient.fromItems(Items.CHARCOAL), Ingredient.fromTag(ItemTags.LOGS), Ingredient.fromTag(ItemTags.PLANKS)).build(consumer, BloodMagic.rl(basePath + "deforester_charge"));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -50,14 +50,23 @@ public class LivingUtil
|
|||
if (currentPoints >= stats.getMaxPoints())
|
||||
return stats;
|
||||
|
||||
int currentPointCost = upgrade.getLevelCost(upgrade.getLevel((int) currentExperience));
|
||||
int nextPointCost = upgrade.getLevelCost(upgrade.getLevel((int) currentExperience) + 1);
|
||||
|
||||
// System.out.println("Current point cost: " + currentPointCost + ", Next point cost: " + nextPointCost);
|
||||
// If there's no more levels in this upgrade, we don't want to add experience
|
||||
if (nextPointCost == -1)
|
||||
return stats;
|
||||
|
||||
int pointDif = nextPointCost - currentPointCost;
|
||||
if (pointDif < 0)
|
||||
{
|
||||
return stats;
|
||||
}
|
||||
|
||||
// If applying this new level will go over our cap, we don't want to add
|
||||
// experience
|
||||
if (currentPoints + nextPointCost > stats.getMaxPoints())
|
||||
if (currentPoints + pointDif > stats.getMaxPoints())
|
||||
return stats;
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ public class RitualArmourEvolve extends Ritual
|
|||
|
||||
public RitualArmourEvolve()
|
||||
{
|
||||
super("ritualArmourEvolve", 2, 50000, "ritual." + BloodMagic.MODID + ".armourEvolveRitual");
|
||||
super("ritualArmourEvolve", 0, 50000, "ritual." + BloodMagic.MODID + ".armourEvolveRitual");
|
||||
addBlockRange(CHECK_RANGE, new AreaDescriptor.Rectangle(new BlockPos(0, 1, 0), 1, 2, 1));
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ public class RitualUpgradeRemove extends Ritual
|
|||
|
||||
public RitualUpgradeRemove()
|
||||
{
|
||||
super("ritualUpgradeRemove", 2, 25000, "ritual." + BloodMagic.MODID + ".upgradeRemoveRitual");
|
||||
super("ritualUpgradeRemove", 0, 25000, "ritual." + BloodMagic.MODID + ".upgradeRemoveRitual");
|
||||
addBlockRange(CHECK_RANGE, new AreaDescriptor.Rectangle(new BlockPos(0, 1, 0), 1, 2, 1));
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,6 @@ public class DungeonStructure
|
|||
|
||||
public boolean placeStructureAtPosition(Random rand, PlacementSettings settings, ServerWorld world, BlockPos pos)
|
||||
{
|
||||
|
||||
if (pos == null)
|
||||
return false;
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ public class TileShapedExplosive extends TileTicking
|
|||
|
||||
BlockState blockstate = this.world.getBlockState(blockpos);
|
||||
Block block = blockstate.getBlock();
|
||||
if (!blockstate.isAir(this.world, blockpos))
|
||||
if (!blockstate.isAir(this.world, blockpos) && blockstate.getBlockHardness(world, blockpos) != -1.0F)
|
||||
{
|
||||
BlockPos blockpos1 = blockpos.toImmutable();
|
||||
// this.world.getProfiler().startSection("explosion_blocks");
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue