Skip to content

Commit 22fb185

Browse files
committed
Dragonskin Spell Book, Final Touches
1 parent ab59900 commit 22fb185

File tree

21 files changed

+165
-19
lines changed

21 files changed

+165
-19
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ apply plugin: 'org.spongepowered.mixin'
1717
apply plugin: 'org.parchmentmc.librarian.forgegradle'
1818
apply plugin: 'maven-publish'
1919

20-
version = '1.0.9'
20+
version = '1.1.0'
2121
group = 'io.redspace.ironsspellbooks'
2222
archivesBaseName = 'irons_spellbooks'
2323

src/main/java/io/redspace/ironsspellbooks/config/ServerConfigs.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,17 +132,17 @@ public class ServerConfigs {
132132
BUILDER.comment("Void Spells");
133133
createSpellConfig(SpellType.ABYSSAL_SHROUD_SPELL, true, 3, SpellRarity.LEGENDARY, 300);
134134
createSpellConfig(SpellType.VOID_TENTACLES_SPELL, true, 3, SpellRarity.LEGENDARY, 30);
135-
createSpellConfig(SpellType.BLACK_HOLE_SPELL, true, 6, SpellRarity.LEGENDARY, 40);
136-
BUILDER.pop();
135+
createSpellConfig(SpellType.BLACK_HOLE_SPELL, true, 6, SpellRarity.LEGENDARY, 120);
137136
//Poison
138137
BUILDER.comment("Poison Spells");
139138
createSpellConfig(SpellType.POISON_ARROW_SPELL, true, 10, SpellRarity.COMMON, 15);
140139
createSpellConfig(SpellType.POISON_SPLASH_SPELL, true, 10, SpellRarity.UNCOMMON, 20);
141140
createSpellConfig(SpellType.POISON_BREATH_SPELL, true, 10, SpellRarity.COMMON, 12);
142141
createSpellConfig(SpellType.ACID_ORB_SPELL, true, 10, SpellRarity.COMMON, 15);
143-
createSpellConfig(SpellType.SPIDER_ASPECT_SPELL, true, 8, SpellRarity.COMMON, 35);
144-
145-
142+
createSpellConfig(SpellType.SPIDER_ASPECT_SPELL, true, 8, SpellRarity.RARE, 35);
143+
createSpellConfig(SpellType.BLIGHT_SPELL, true, 10, SpellRarity.RARE, 35);
144+
createSpellConfig(SpellType.ROOT_SPELL, true, 10, SpellRarity.UNCOMMON, 35);
145+
BUILDER.pop();
146146

147147

148148
SPEC = BUILDER.build();

src/main/java/io/redspace/ironsspellbooks/entity/mobs/necromancer/NecromancerEntity.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import io.redspace.ironsspellbooks.entity.mobs.abstract_spell_casting_mob.AbstractSpellCastingMob;
44
import io.redspace.ironsspellbooks.entity.mobs.goals.WizardAttackGoal;
55
import io.redspace.ironsspellbooks.entity.mobs.goals.WizardRecoverGoal;
6-
import io.redspace.ironsspellbooks.registries.AttributeRegistry;
76
import io.redspace.ironsspellbooks.registries.ItemRegistry;
87
import io.redspace.ironsspellbooks.spells.SpellType;
98
import net.minecraft.nbt.CompoundTag;
@@ -47,7 +46,7 @@ protected void registerGoals() {
4746
List.of(),
4847
List.of(SpellType.BLIGHT_SPELL)
4948
)
50-
.setSingleUseSpell(SpellType.RAISE_DEAD_SPELL, 80, 350, 3, 5)
49+
.setSingleUseSpell(SpellType.RAISE_DEAD_SPELL, 80, 350, 4, 5)
5150
.setDrinksPotions());
5251
this.goalSelector.addGoal(5, new WaterAvoidingRandomStrollGoal(this, 1.0D));
5352
this.goalSelector.addGoal(6, new LookAtPlayerGoal(this, Player.class, 8.0F));

src/main/java/io/redspace/ironsspellbooks/entity/mobs/wizards/archevoker/ArchevokerEntity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public ArchevokerEntity(EntityType<? extends AbstractSpellCastingMob> pEntityTyp
4040
@Override
4141
protected void registerGoals() {
4242
this.goalSelector.addGoal(0, new FloatGoal(this));
43-
this.goalSelector.addGoal(1, new SpellBarrageGoal(this, SpellType.SUMMON_VEX_SPELL, 3, 4, 160, 300, 1));
43+
this.goalSelector.addGoal(1, new SpellBarrageGoal(this, SpellType.SUMMON_VEX_SPELL, 3, 4, 80, 300, 1));
4444
this.goalSelector.addGoal(2, new WizardAttackGoal(this, 1.5f, 65, 100)
4545
.setSpells(
4646
List.of(SpellType.FANG_STRIKE_SPELL, SpellType.FIRECRACKER_SPELL),
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package io.redspace.ironsspellbooks.item;
2+
3+
import io.redspace.ironsspellbooks.util.SpellbookModCreativeTabs;
4+
import net.minecraft.world.item.Item;
5+
6+
public class DragonskinItem extends Item {
7+
public DragonskinItem() {
8+
super((new Item.Properties()).tab(SpellbookModCreativeTabs.SPELL_MATERIALS_TAB));
9+
}
10+
11+
// @Override
12+
// public boolean hasCustomEntity(ItemStack stack) {
13+
// return true;
14+
// }
15+
//
16+
// @Nullable
17+
// @Override
18+
// public Entity createEntity(Level world, Entity entity, ItemStack itemstack) {
19+
// if (!world.dimensionType().respawnAnchorWorks() && !world.dimensionType().bedWorks()) {
20+
// entity.setNoGravity(true);
21+
// if (!world.isClientSide)
22+
// MagicManager.spawnParticles(world, ParticleHelper.UNSTABLE_ENDER, entity.getX(), entity.getY(), entity.getZ(), 100, 0, 0, 0, 2, true);
23+
// }
24+
//
25+
// return null;
26+
// }
27+
}

src/main/java/io/redspace/ironsspellbooks/item/SpellBook.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public int getSpellSlots() {
5050

5151
@Override
5252
public InteractionResultHolder<ItemStack> use(Level level, Player player, InteractionHand hand) {
53-
//Ironsspellbooks.logger.debug("Spellbook.use: level.isClientSide:{}", level.isClientSide);
53+
//Ironsspellbooks.logger.debug("Spellbook.use: level.isClientSide:{}", level.isClientSide);
5454
ItemStack itemStack = player.getItemInHand(hand);
5555
var spellBookData = SpellBookData.getSpellBookData(itemStack);
5656
AbstractSpell spell = spellBookData.getActiveSpell();

src/main/java/io/redspace/ironsspellbooks/item/spell_books/BlazeSpellBook.java renamed to src/main/java/io/redspace/ironsspellbooks/item/spell_books/SimpleAttributeSpellBook.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,20 @@
33
import com.google.common.collect.ImmutableMultimap;
44
import com.google.common.collect.Multimap;
55
import io.redspace.ironsspellbooks.item.SpellBook;
6-
import io.redspace.ironsspellbooks.registries.AttributeRegistry;
76
import io.redspace.ironsspellbooks.spells.SpellRarity;
87
import net.minecraft.world.entity.EquipmentSlot;
98
import net.minecraft.world.entity.ai.attributes.Attribute;
109
import net.minecraft.world.entity.ai.attributes.AttributeModifier;
1110

1211
import java.util.UUID;
1312

14-
public class BlazeSpellBook extends SpellBook {
13+
public class SimpleAttributeSpellBook extends SpellBook {
1514
private final Multimap<Attribute, AttributeModifier> defaultModifiers;
1615

17-
public BlazeSpellBook() {
18-
super(5, SpellRarity.EPIC);
16+
public SimpleAttributeSpellBook(int spellSlots, SpellRarity rarity, Attribute attribute, double value) {
17+
super(spellSlots, rarity);
1918
ImmutableMultimap.Builder<Attribute, AttributeModifier> builder = ImmutableMultimap.builder();
20-
builder.put(AttributeRegistry.FIRE_SPELL_POWER.get(), new AttributeModifier(UUID.fromString("667ad88f-901d-4691-b2a2-3664e42026d3"), "Weapon modifier", .10, AttributeModifier.Operation.MULTIPLY_BASE));
19+
builder.put(attribute, new AttributeModifier(UUID.fromString("667ad88f-901d-4691-b2a2-3664e42026d3"), "Weapon modifier", value, AttributeModifier.Operation.MULTIPLY_BASE));
2120
this.defaultModifiers = builder.build();
2221
}
2322

src/main/java/io/redspace/ironsspellbooks/registries/ItemRegistry.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import io.redspace.ironsspellbooks.item.*;
55
import io.redspace.ironsspellbooks.item.armor.*;
66
import io.redspace.ironsspellbooks.item.curios.*;
7-
import io.redspace.ironsspellbooks.item.spell_books.BlazeSpellBook;
7+
import io.redspace.ironsspellbooks.item.spell_books.SimpleAttributeSpellBook;
88
import io.redspace.ironsspellbooks.item.spell_books.VillagerSpellBook;
99
import io.redspace.ironsspellbooks.item.weapons.BloodStaffItem;
1010
import io.redspace.ironsspellbooks.item.weapons.MagehunterItem;
@@ -47,14 +47,15 @@ public static void register(IEventBus eventBus) {
4747
*/
4848
public static final RegistryObject<Item> WIMPY_SPELL_BOOK = ITEMS.register("wimpy_spell_book", () -> new SpellBook(0, SpellRarity.LEGENDARY, new Item.Properties().stacksTo(1).rarity(Rarity.UNCOMMON)));
4949
public static final RegistryObject<Item> LEGENDARY_SPELL_BOOK = ITEMS.register("legendary_spell_book", () -> new SpellBook(12, SpellRarity.LEGENDARY, new Item.Properties().stacksTo(1).rarity(Rarity.UNCOMMON)));
50-
public static final RegistryObject<Item> NETHERITE_SPELL_BOOK = ITEMS.register("netherite_spell_book", () -> new SpellBook(10, SpellRarity.LEGENDARY));
50+
public static final RegistryObject<Item> NETHERITE_SPELL_BOOK = ITEMS.register("netherite_spell_book", () -> new SimpleAttributeSpellBook(10, SpellRarity.LEGENDARY, AttributeRegistry.COOLDOWN_REDUCTION.get(), .20));
5151
public static final RegistryObject<Item> DIAMOND_SPELL_BOOK = ITEMS.register("diamond_spell_book", () -> new SpellBook(8, SpellRarity.EPIC));
5252
public static final RegistryObject<Item> GOLD_SPELL_BOOK = ITEMS.register("gold_spell_book", () -> new SpellBook(6, SpellRarity.RARE));
5353
public static final RegistryObject<Item> IRON_SPELL_BOOK = ITEMS.register("iron_spell_book", () -> new SpellBook(5, SpellRarity.UNCOMMON));
5454
public static final RegistryObject<Item> COPPER_SPELL_BOOK = ITEMS.register("copper_spell_book", () -> new SpellBook(4, SpellRarity.COMMON));
5555
public static final RegistryObject<Item> EVOKER_SPELL_BOOK = ITEMS.register("evoker_spell_book", () -> new UniqueSpellBook(SpellRarity.COMMON, new AbstractSpell[]{new FangStrikeSpell(6), new FangWardSpell(4), new SummonVexSpell(4)}));
5656
public static final RegistryObject<Item> ROTTEN_SPELL_BOOK = ITEMS.register("rotten_spell_book", () -> new SpellBook(3, SpellRarity.RARE));
57-
public static final RegistryObject<Item> BLAZE_SPELL_BOOK = ITEMS.register("blaze_spell_book", BlazeSpellBook::new);
57+
public static final RegistryObject<Item> BLAZE_SPELL_BOOK = ITEMS.register("blaze_spell_book", () -> new SimpleAttributeSpellBook(5, SpellRarity.EPIC, AttributeRegistry.FIRE_SPELL_POWER.get(), .10));
58+
public static final RegistryObject<Item> DRAGONSKIN_SPELL_BOOK = ITEMS.register("dragonskin_spell_book", () -> new SimpleAttributeSpellBook(10, SpellRarity.LEGENDARY, AttributeRegistry.ENDER_SPELL_POWER.get(), .10));
5859
public static final RegistryObject<Item> VILLAGER_SPELL_BOOK = ITEMS.register("villager_spell_book", VillagerSpellBook::new);
5960
public static final RegistryObject<Item> BLOOD_STAFF = ITEMS.register("blood_staff", () -> new BloodStaffItem(new AbstractSpell[]{new WitherSkullSpell(6), new RayOfSiphoningSpell(6), new BloodStepSpell(3), new BloodSlashSpell(6), new BlazeStormSpell(6)}));
6061
public static final RegistryObject<Item> MAGEHUNTER = ITEMS.register("magehunter", () -> new MagehunterItem(SpellType.COUNTERSPELL_SPELL, 1));
@@ -93,6 +94,7 @@ public static void register(IEventBus eventBus) {
9394
public static final RegistryObject<Item> BLOOD_VIAL = ITEMS.register("blood_vial", () -> new Item((new Item.Properties()).tab(SpellbookModCreativeTabs.SPELL_MATERIALS_TAB)));
9495
public static final RegistryObject<Item> DIVINE_PEARL = ITEMS.register("divine_pearl", () -> new Item((new Item.Properties()).tab(SpellbookModCreativeTabs.SPELL_MATERIALS_TAB)));
9596
public static final RegistryObject<Item> HOGSKIN = ITEMS.register("hogskin", () -> new Item((new Item.Properties()).tab(SpellbookModCreativeTabs.SPELL_MATERIALS_TAB)));
97+
public static final RegistryObject<Item> DRAGONSKIN = ITEMS.register("dragonskin", DragonskinItem::new);
9698
public static final RegistryObject<Item> ARCANE_ESSENCE = ITEMS.register("arcane_essence", () -> new Item((new Item.Properties()).tab(SpellbookModCreativeTabs.SPELL_MATERIALS_TAB)));
9799
public static final RegistryObject<Item> MAGIC_CLOTH = ITEMS.register("magic_cloth", () -> new Item((new Item.Properties()).tab(SpellbookModCreativeTabs.SPELL_MATERIALS_TAB)));
98100
public static final RegistryObject<Item> BLANK_RUNE = ITEMS.register("blank_rune", () -> new Item((new Item.Properties()).tab(SpellbookModCreativeTabs.SPELL_MATERIALS_TAB)));

src/main/resources/assets/irons_spellbooks/lang/en_us.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"item.irons_spellbooks.illusioner_spell_book": "Book of Illusions",
66
"item.irons_spellbooks.rotten_spell_book": "Rotten Spell Book",
77
"item.irons_spellbooks.blaze_spell_book": "Blaze Instruction Manual",
8+
"item.irons_spellbooks.dragonskin_spell_book": "Dragonskin Spell Book",
89
"item.irons_spellbooks.villager_spell_book": "Villager Bible",
910
"item.irons_spellbooks.netherite_spell_book": "Ancient Codex",
1011
"item.irons_spellbooks.diamond_spell_book": "Enchanted Spell Book",
@@ -22,6 +23,7 @@
2223
"item.irons_spellbooks.blood_vial": "Blood Vial",
2324
"item.irons_spellbooks.divine_pearl": "Divine Pearl",
2425
"item.irons_spellbooks.hogskin": "Hogskin",
26+
"item.irons_spellbooks.dragonskin": "Dragonskin",
2527
"item.irons_spellbooks.ruined_book": "Ruined Book",
2628
"item.irons_spellbooks.arcane_essence": "Arcane Essence",
2729
"item.irons_spellbooks.cinder_essence": "Cinder Essence",
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"parent": "item/generated",
3+
"textures": {
4+
"layer0": "irons_spellbooks:item/dragonskin"
5+
}
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"parent": "item/generated",
3+
"textures": {
4+
"layer0": "irons_spellbooks:item/dragonskin_spell_book"
5+
}
6+
}
Loading
Loading
Loading
Binary file not shown.
Binary file not shown.

src/main/resources/data/forge/loot_modifiers/global_loot_modifiers.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"irons_spellbooks:entity_drops/hoglin_modifier",
66
"irons_spellbooks:entity_drops/evoker_modifier",
77
"irons_spellbooks:entity_drops/blaze_modifier",
8+
"irons_spellbooks:entity_drops/ender_dragon_modifier",
89
"irons_spellbooks:chest_loot/ancient_city_modifier",
910
"irons_spellbooks:chest_loot/nether_loot_modifier",
1011
"irons_spellbooks:chest_loot/generic_low_quality_loot_modifier"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"type": "irons_spellbooks:append_loot",
3+
"conditions": [
4+
{
5+
"condition": "minecraft:entity_properties",
6+
"entity": "this",
7+
"predicate": {
8+
"type": "minecraft:ender_dragon"
9+
}
10+
}
11+
],
12+
"key": "irons_spellbooks:entities/additional_dragon_loot"
13+
}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"pools": [
3+
{
4+
"rolls": 1,
5+
"bonus_rolls": 0.0,
6+
"entries": [
7+
{
8+
"type": "minecraft:item",
9+
"functions": [
10+
{
11+
"function": "minecraft:set_count",
12+
"count": {
13+
"type": "minecraft:uniform",
14+
"min": 6.0,
15+
"max": 10.0
16+
},
17+
"add": false
18+
},
19+
{
20+
"function": "minecraft:looting_enchant",
21+
"count": {
22+
"type": "minecraft:uniform",
23+
"min": 0.0,
24+
"max": 2.0
25+
}
26+
}
27+
],
28+
"name": "irons_spellbooks:dragonskin"
29+
}
30+
]
31+
},
32+
{
33+
"rolls": 1,
34+
"bonus_rolls": 0.0,
35+
"entries": [
36+
{
37+
"type": "minecraft:item",
38+
"functions": [
39+
{
40+
"add": false,
41+
"count": {
42+
"type": "minecraft:uniform",
43+
"max": 45.0,
44+
"min": 28.0
45+
},
46+
"function": "minecraft:set_count"
47+
},
48+
{
49+
"count": {
50+
"type": "minecraft:uniform",
51+
"max": 3.0,
52+
"min": 0.0
53+
},
54+
"function": "minecraft:looting_enchant"
55+
}
56+
],
57+
"name": "irons_spellbooks:arcane_essence"
58+
}
59+
]
60+
}
61+
]
62+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"type": "minecraft:crafting_shaped",
3+
"pattern":
4+
[
5+
"DOD",
6+
"DRD",
7+
"DOD"
8+
],
9+
"key":
10+
{
11+
"O":
12+
{
13+
"tag": "forge:obsidian"
14+
},
15+
"R":
16+
{
17+
"item": "irons_spellbooks:ruined_book"
18+
},
19+
"D":
20+
{
21+
"item": "irons_spellbooks:dragonskin"
22+
}
23+
},
24+
"result":
25+
{
26+
"item": "irons_spellbooks:dragonskin_spell_book",
27+
"count": 1
28+
}
29+
}

src/main/resources/data/irons_spellbooks/worldgen/structure/mountain_tower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"use_expansion_hack": false,
1515

1616
"start_height": {
17-
"absolute": -1
17+
"absolute": 0
1818
},
1919

2020
"project_start_to_heightmap": "WORLD_SURFACE_WG",

0 commit comments

Comments
 (0)