That's one heck of a commit you've got there...
I may have got a bit behind with version control. A lot behind, in fact. Maybe I'll go back and split this sometime - then again, I probably won't. But hey, at least it's here!
This commit is contained in:
@@ -1,49 +1,11 @@
|
||||
package electroblob.wizardry.registry;
|
||||
|
||||
import org.apache.commons.lang3.tuple.Triple;
|
||||
|
||||
import electroblob.wizardry.Wizardry;
|
||||
import electroblob.wizardry.constants.Element;
|
||||
import electroblob.wizardry.constants.SpellType;
|
||||
import electroblob.wizardry.constants.Tier;
|
||||
import electroblob.wizardry.entity.construct.EntityBlackHole;
|
||||
import electroblob.wizardry.entity.construct.EntityBlizzard;
|
||||
import electroblob.wizardry.entity.construct.EntityFireRing;
|
||||
import electroblob.wizardry.entity.construct.EntityFireSigil;
|
||||
import electroblob.wizardry.entity.construct.EntityForcefield;
|
||||
import electroblob.wizardry.entity.construct.EntityFrostSigil;
|
||||
import electroblob.wizardry.entity.construct.EntityHealAura;
|
||||
import electroblob.wizardry.entity.construct.EntityLightningSigil;
|
||||
import electroblob.wizardry.entity.living.EntityBlazeMinion;
|
||||
import electroblob.wizardry.entity.living.EntityIceGiant;
|
||||
import electroblob.wizardry.entity.living.EntityIceWraith;
|
||||
import electroblob.wizardry.entity.living.EntityLightningWraith;
|
||||
import electroblob.wizardry.entity.living.EntityPhoenix;
|
||||
import electroblob.wizardry.entity.living.EntitySilverfishMinion;
|
||||
import electroblob.wizardry.entity.living.EntitySpiderMinion;
|
||||
import electroblob.wizardry.entity.living.EntityStormElemental;
|
||||
import electroblob.wizardry.entity.living.EntityWitherSkeletonMinion;
|
||||
import electroblob.wizardry.entity.living.EntityZombieMinion;
|
||||
import electroblob.wizardry.entity.projectile.EntityDarknessOrb;
|
||||
import electroblob.wizardry.entity.projectile.EntityDart;
|
||||
import electroblob.wizardry.entity.projectile.EntityFirebolt;
|
||||
import electroblob.wizardry.entity.projectile.EntityFirebomb;
|
||||
import electroblob.wizardry.entity.projectile.EntityForceArrow;
|
||||
import electroblob.wizardry.entity.projectile.EntityForceOrb;
|
||||
import electroblob.wizardry.entity.projectile.EntityIceCharge;
|
||||
import electroblob.wizardry.entity.projectile.EntityIceLance;
|
||||
import electroblob.wizardry.entity.projectile.EntityIceShard;
|
||||
import electroblob.wizardry.entity.projectile.EntityLightningArrow;
|
||||
import electroblob.wizardry.entity.projectile.EntityLightningDisc;
|
||||
import electroblob.wizardry.entity.projectile.EntityMagicMissile;
|
||||
import electroblob.wizardry.entity.projectile.EntityPoisonBomb;
|
||||
import electroblob.wizardry.entity.projectile.EntitySmokeBomb;
|
||||
import electroblob.wizardry.entity.projectile.EntitySpark;
|
||||
import electroblob.wizardry.entity.projectile.EntitySparkBomb;
|
||||
import electroblob.wizardry.entity.projectile.EntityThunderbolt;
|
||||
import electroblob.wizardry.entity.construct.*;
|
||||
import electroblob.wizardry.entity.living.*;
|
||||
import electroblob.wizardry.entity.projectile.*;
|
||||
import electroblob.wizardry.spell.*;
|
||||
import net.minecraft.init.MobEffects;
|
||||
import net.minecraft.init.SoundEvents;
|
||||
import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.event.RegistryEvent;
|
||||
@@ -53,6 +15,8 @@ import net.minecraftforge.fml.common.registry.GameRegistry.ObjectHolder;
|
||||
import net.minecraftforge.registries.IForgeRegistry;
|
||||
import net.minecraftforge.registries.RegistryBuilder;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
/**
|
||||
* Class responsible for defining, storing and registering all of wizardry's spells. Use this to access individual
|
||||
* spell instances, similar to the {@code Blocks} and {@code Items} classes.
|
||||
@@ -60,23 +24,16 @@ import net.minecraftforge.registries.RegistryBuilder;
|
||||
* @author Electroblob
|
||||
* @since Wizardry 2.1
|
||||
*/
|
||||
// In case anyone was wondering, the reason @ObjectHolder is useful within one mod is that it allows you to initialise
|
||||
// stuff during the registry events (or whenever), whilst still having a final field (which is important, not only
|
||||
// because it makes the text go bold, but also because it stops anyone fiddling with your fields). "Why would I want to
|
||||
// initialise things within the registry events?", I hear you ask - well, for one, custom registries don't like it if
|
||||
// you haven't created the registry before you start calling constructors of classes extending IForgeRegistryEntry.Impl,
|
||||
// and secondly, you might want to initialise objects based on certain conditions - perhaps a config option, or whether
|
||||
// another mod is installed. This, presumably, is why everyone at forge is encouraging us to use @ObjectHolder.
|
||||
@ObjectHolder(Wizardry.MODID)
|
||||
@Mod.EventBusSubscriber
|
||||
public final class Spells {
|
||||
|
||||
private Spells(){} // No instances!
|
||||
|
||||
// This is here because this class is already an event handler.
|
||||
@SubscribeEvent
|
||||
public static void createRegistry(RegistryEvent.NewRegistry event){
|
||||
|
||||
// Beats me why we need both of these. Surely the type parameter means it already knows?
|
||||
// EDIT: It's probably because of type erasure, thinking about it.
|
||||
RegistryBuilder<Spell> builder = new RegistryBuilder<>();
|
||||
builder.setType(Spell.class);
|
||||
builder.setName(new ResourceLocation(Wizardry.MODID, "spells"));
|
||||
@@ -85,158 +42,200 @@ public final class Spells {
|
||||
Spell.registry = builder.create();
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@SuppressWarnings("ConstantConditions")
|
||||
private static <T> T placeholder(){ return null; }
|
||||
|
||||
// Wizardry 1.0 spells
|
||||
|
||||
public static final Spell none = null;
|
||||
public static final Spell magic_missile = null;
|
||||
public static final Spell ignite = null;
|
||||
public static final Spell freeze = null;
|
||||
public static final Spell snowball = null;
|
||||
public static final Spell arc = null;
|
||||
public static final Spell thunderbolt = null;
|
||||
public static final Spell summon_zombie = null;
|
||||
public static final Spell snare = null;
|
||||
public static final Spell dart = null;
|
||||
public static final Spell light = null;
|
||||
public static final Spell telekinesis = null;
|
||||
public static final Spell heal = null;
|
||||
public static final Spell none = placeholder();
|
||||
public static final Spell magic_missile = placeholder();
|
||||
public static final Spell ignite = placeholder();
|
||||
public static final Spell freeze = placeholder();
|
||||
public static final Spell snowball = placeholder();
|
||||
public static final Spell arc = placeholder();
|
||||
public static final Spell thunderbolt = placeholder();
|
||||
public static final Spell summon_zombie = placeholder();
|
||||
public static final Spell snare = placeholder();
|
||||
public static final Spell dart = placeholder();
|
||||
public static final Spell light = placeholder();
|
||||
public static final Spell telekinesis = placeholder();
|
||||
public static final Spell heal = placeholder();
|
||||
|
||||
public static final Spell fireball = null;
|
||||
public static final Spell flame_ray = null;
|
||||
public static final Spell firebomb = null;
|
||||
public static final Spell fire_sigil = null;
|
||||
public static final Spell firebolt = null;
|
||||
public static final Spell frost_ray = null;
|
||||
public static final Spell summon_snow_golem = null;
|
||||
public static final Spell ice_shard = null;
|
||||
public static final Spell ice_statue = null;
|
||||
public static final Spell frost_sigil = null;
|
||||
public static final Spell lightning_ray = null;
|
||||
public static final Spell spark_bomb = null;
|
||||
public static final Spell homing_spark = null;
|
||||
public static final Spell lightning_sigil = null;
|
||||
public static final Spell lightning_arrow = null;
|
||||
public static final Spell life_drain = null;
|
||||
public static final Spell summon_skeleton = null;
|
||||
public static final Spell metamorphosis = null;
|
||||
public static final Spell wither = null;
|
||||
public static final Spell poison = null;
|
||||
public static final Spell growth_aura = null;
|
||||
public static final Spell bubble = null;
|
||||
public static final Spell whirlwind = null;
|
||||
public static final Spell poison_bomb = null;
|
||||
public static final Spell summon_spirit_wolf = null;
|
||||
public static final Spell blink = null;
|
||||
public static final Spell agility = null;
|
||||
public static final Spell conjure_sword = null;
|
||||
public static final Spell conjure_pickaxe = null;
|
||||
public static final Spell conjure_bow = null;
|
||||
public static final Spell force_arrow = null;
|
||||
public static final Spell shield = null;
|
||||
public static final Spell replenish_hunger = null;
|
||||
public static final Spell cure_effects = null;
|
||||
public static final Spell heal_ally = null;
|
||||
public static final Spell fireball = placeholder();
|
||||
public static final Spell flame_ray = placeholder();
|
||||
public static final Spell firebomb = placeholder();
|
||||
public static final Spell fire_sigil = placeholder();
|
||||
public static final Spell firebolt = placeholder();
|
||||
public static final Spell frost_ray = placeholder();
|
||||
public static final Spell summon_snow_golem = placeholder();
|
||||
public static final Spell ice_shard = placeholder();
|
||||
public static final Spell ice_statue = placeholder();
|
||||
public static final Spell frost_sigil = placeholder();
|
||||
public static final Spell lightning_ray = placeholder();
|
||||
public static final Spell spark_bomb = placeholder();
|
||||
public static final Spell homing_spark = placeholder();
|
||||
public static final Spell lightning_sigil = placeholder();
|
||||
public static final Spell lightning_arrow = placeholder();
|
||||
public static final Spell life_drain = placeholder();
|
||||
public static final Spell summon_skeleton = placeholder();
|
||||
public static final Spell metamorphosis = placeholder();
|
||||
public static final Spell wither = placeholder();
|
||||
public static final Spell poison = placeholder();
|
||||
public static final Spell growth_aura = placeholder();
|
||||
public static final Spell bubble = placeholder();
|
||||
public static final Spell whirlwind = placeholder();
|
||||
public static final Spell poison_bomb = placeholder();
|
||||
public static final Spell summon_spirit_wolf = placeholder();
|
||||
public static final Spell blink = placeholder();
|
||||
public static final Spell agility = placeholder();
|
||||
public static final Spell conjure_sword = placeholder();
|
||||
public static final Spell conjure_pickaxe = placeholder();
|
||||
public static final Spell conjure_bow = placeholder();
|
||||
public static final Spell force_arrow = placeholder();
|
||||
public static final Spell shield = placeholder();
|
||||
public static final Spell replenish_hunger = placeholder();
|
||||
public static final Spell cure_effects = placeholder();
|
||||
public static final Spell heal_ally = placeholder();
|
||||
|
||||
public static final Spell summon_blaze = null;
|
||||
public static final Spell ring_of_fire = null;
|
||||
public static final Spell detonate = null;
|
||||
public static final Spell fire_resistance = null;
|
||||
public static final Spell fireskin = null;
|
||||
public static final Spell flaming_axe = null;
|
||||
public static final Spell blizzard = null;
|
||||
public static final Spell summon_ice_wraith = null;
|
||||
public static final Spell ice_shroud = null;
|
||||
public static final Spell ice_charge = null;
|
||||
public static final Spell frost_axe = null;
|
||||
public static final Spell invoke_weather = null;
|
||||
public static final Spell chain_lightning = null;
|
||||
public static final Spell lightning_bolt = null;
|
||||
public static final Spell summon_lightning_wraith = null;
|
||||
public static final Spell static_aura = null;
|
||||
public static final Spell lightning_disc = null;
|
||||
public static final Spell mind_control = null;
|
||||
public static final Spell summon_wither_skeleton = null;
|
||||
public static final Spell entrapment = null;
|
||||
public static final Spell wither_skull = null;
|
||||
public static final Spell darkness_orb = null;
|
||||
public static final Spell shadow_ward = null;
|
||||
public static final Spell decay = null;
|
||||
public static final Spell water_breathing = null;
|
||||
public static final Spell tornado = null;
|
||||
public static final Spell glide = null;
|
||||
public static final Spell summon_spirit_horse = null;
|
||||
public static final Spell spider_swarm = null;
|
||||
public static final Spell slime = null;
|
||||
public static final Spell petrify = null;
|
||||
public static final Spell invisibility = null;
|
||||
public static final Spell levitation = null;
|
||||
public static final Spell force_orb = null;
|
||||
public static final Spell transportation = null;
|
||||
public static final Spell spectral_pathway = null;
|
||||
public static final Spell phase_step = null;
|
||||
public static final Spell vanishing_box = null;
|
||||
public static final Spell greater_heal = null;
|
||||
public static final Spell healing_aura = null;
|
||||
public static final Spell forcefield = null;
|
||||
public static final Spell ironflesh = null;
|
||||
public static final Spell transience = null;
|
||||
public static final Spell summon_blaze = placeholder();
|
||||
public static final Spell ring_of_fire = placeholder();
|
||||
public static final Spell detonate = placeholder();
|
||||
public static final Spell fire_resistance = placeholder();
|
||||
public static final Spell fireskin = placeholder();
|
||||
public static final Spell flaming_axe = placeholder();
|
||||
public static final Spell blizzard = placeholder();
|
||||
public static final Spell summon_ice_wraith = placeholder();
|
||||
public static final Spell ice_shroud = placeholder();
|
||||
public static final Spell ice_charge = placeholder();
|
||||
public static final Spell frost_axe = placeholder();
|
||||
public static final Spell invoke_weather = placeholder();
|
||||
public static final Spell chain_lightning = placeholder();
|
||||
public static final Spell lightning_bolt = placeholder();
|
||||
public static final Spell summon_lightning_wraith = placeholder();
|
||||
public static final Spell static_aura = placeholder();
|
||||
public static final Spell lightning_disc = placeholder();
|
||||
public static final Spell mind_control = placeholder();
|
||||
public static final Spell summon_wither_skeleton = placeholder();
|
||||
public static final Spell entrapment = placeholder();
|
||||
public static final Spell wither_skull = placeholder();
|
||||
public static final Spell darkness_orb = placeholder();
|
||||
public static final Spell shadow_ward = placeholder();
|
||||
public static final Spell decay = placeholder();
|
||||
public static final Spell water_breathing = placeholder();
|
||||
public static final Spell tornado = placeholder();
|
||||
public static final Spell glide = placeholder();
|
||||
public static final Spell summon_spirit_horse = placeholder();
|
||||
public static final Spell spider_swarm = placeholder();
|
||||
public static final Spell slime = placeholder();
|
||||
public static final Spell petrify = placeholder();
|
||||
public static final Spell invisibility = placeholder();
|
||||
public static final Spell levitation = placeholder();
|
||||
public static final Spell force_orb = placeholder();
|
||||
public static final Spell transportation = placeholder();
|
||||
public static final Spell spectral_pathway = placeholder();
|
||||
public static final Spell phase_step = placeholder();
|
||||
public static final Spell vanishing_box = placeholder();
|
||||
public static final Spell greater_heal = placeholder();
|
||||
public static final Spell healing_aura = placeholder();
|
||||
public static final Spell forcefield = placeholder();
|
||||
public static final Spell ironflesh = placeholder();
|
||||
public static final Spell transience = placeholder();
|
||||
|
||||
public static final Spell meteor = null;
|
||||
public static final Spell firestorm = null;
|
||||
public static final Spell summon_phoenix = null;
|
||||
public static final Spell ice_age = null;
|
||||
public static final Spell wall_of_frost = null;
|
||||
public static final Spell summon_ice_giant = null;
|
||||
public static final Spell thunderstorm = null;
|
||||
public static final Spell lightning_hammer = null;
|
||||
public static final Spell plague_of_darkness = null;
|
||||
public static final Spell summon_skeleton_legion = null;
|
||||
public static final Spell summon_shadow_wraith = null;
|
||||
public static final Spell forests_curse = null;
|
||||
public static final Spell flight = null;
|
||||
public static final Spell silverfish_swarm = null;
|
||||
public static final Spell black_hole = null;
|
||||
public static final Spell shockwave = null;
|
||||
public static final Spell summon_iron_golem = null;
|
||||
public static final Spell arrow_rain = null;
|
||||
public static final Spell diamondflesh = null;
|
||||
public static final Spell font_of_vitality = null;
|
||||
public static final Spell meteor = placeholder();
|
||||
public static final Spell fire_breath = placeholder();
|
||||
public static final Spell summon_phoenix = placeholder();
|
||||
public static final Spell ice_age = placeholder();
|
||||
public static final Spell wall_of_frost = placeholder();
|
||||
public static final Spell summon_ice_giant = placeholder();
|
||||
public static final Spell thunderstorm = placeholder();
|
||||
public static final Spell lightning_hammer = placeholder();
|
||||
public static final Spell plague_of_darkness = placeholder();
|
||||
public static final Spell summon_skeleton_legion = placeholder();
|
||||
public static final Spell summon_shadow_wraith = placeholder();
|
||||
public static final Spell forests_curse = placeholder();
|
||||
public static final Spell flight = placeholder();
|
||||
public static final Spell silverfish_swarm = placeholder();
|
||||
public static final Spell black_hole = placeholder();
|
||||
public static final Spell shockwave = placeholder();
|
||||
public static final Spell summon_iron_golem = placeholder();
|
||||
public static final Spell arrow_rain = placeholder();
|
||||
public static final Spell diamondflesh = placeholder();
|
||||
public static final Spell font_of_vitality = placeholder();
|
||||
|
||||
// Wizardry 1.1 spells
|
||||
|
||||
public static final Spell smoke_bomb = null;
|
||||
public static final Spell mind_trick = null;
|
||||
public static final Spell leap = null;
|
||||
public static final Spell smoke_bomb = placeholder();
|
||||
public static final Spell mind_trick = placeholder();
|
||||
public static final Spell leap = placeholder();
|
||||
|
||||
public static final Spell pocket_furnace = null;
|
||||
public static final Spell intimidate = null;
|
||||
public static final Spell banish = null;
|
||||
public static final Spell sixth_sense = null;
|
||||
public static final Spell darkvision = null;
|
||||
public static final Spell clairvoyance = null;
|
||||
public static final Spell pocket_workbench = null;
|
||||
public static final Spell imbue_weapon = null;
|
||||
public static final Spell invigorating_presence = null;
|
||||
public static final Spell oakflesh = null;
|
||||
public static final Spell pocket_furnace = placeholder();
|
||||
public static final Spell intimidate = placeholder();
|
||||
public static final Spell banish = placeholder();
|
||||
public static final Spell sixth_sense = placeholder();
|
||||
public static final Spell darkvision = placeholder();
|
||||
public static final Spell clairvoyance = placeholder();
|
||||
public static final Spell pocket_workbench = placeholder();
|
||||
public static final Spell imbue_weapon = placeholder();
|
||||
public static final Spell invigorating_presence = placeholder();
|
||||
public static final Spell oakflesh = placeholder();
|
||||
|
||||
public static final Spell greater_fireball = null;
|
||||
public static final Spell flaming_weapon = null;
|
||||
public static final Spell ice_lance = null;
|
||||
public static final Spell freezing_weapon = null;
|
||||
public static final Spell ice_spikes = null;
|
||||
public static final Spell lightning_pulse = null;
|
||||
public static final Spell curse_of_soulbinding = null;
|
||||
public static final Spell cobwebs = null;
|
||||
public static final Spell decoy = null;
|
||||
public static final Spell arcane_jammer = null;
|
||||
public static final Spell conjure_armour = null;
|
||||
public static final Spell group_heal = null;
|
||||
public static final Spell greater_fireball = placeholder();
|
||||
public static final Spell flaming_weapon = placeholder();
|
||||
public static final Spell ice_lance = placeholder();
|
||||
public static final Spell freezing_weapon = placeholder();
|
||||
public static final Spell ice_spikes = placeholder();
|
||||
public static final Spell lightning_pulse = placeholder();
|
||||
public static final Spell curse_of_soulbinding = placeholder();
|
||||
public static final Spell cobwebs = placeholder();
|
||||
public static final Spell decoy = placeholder();
|
||||
public static final Spell arcane_jammer = placeholder();
|
||||
public static final Spell conjure_armour = placeholder();
|
||||
public static final Spell group_heal = placeholder();
|
||||
|
||||
public static final Spell hailstorm = null;
|
||||
public static final Spell lightning_web = null;
|
||||
public static final Spell summon_storm_elemental = null;
|
||||
public static final Spell earthquake = null;
|
||||
public static final Spell font_of_mana = null;
|
||||
public static final Spell hailstorm = placeholder();
|
||||
public static final Spell lightning_web = placeholder();
|
||||
public static final Spell summon_storm_elemental = placeholder();
|
||||
public static final Spell earthquake = placeholder();
|
||||
public static final Spell font_of_mana = placeholder();
|
||||
|
||||
// Wizardry 4.2 spells
|
||||
|
||||
public static final Spell mine = placeholder();
|
||||
public static final Spell conjure_block = placeholder();
|
||||
public static final Spell muffle = placeholder();
|
||||
public static final Spell ward = placeholder();
|
||||
public static final Spell evade = placeholder();
|
||||
|
||||
public static final Spell iceball = placeholder();
|
||||
public static final Spell charge = placeholder();
|
||||
public static final Spell reversal = placeholder();
|
||||
public static final Spell grapple = placeholder();
|
||||
public static final Spell divination = placeholder();
|
||||
public static final Spell empowering_presence = placeholder();
|
||||
|
||||
public static final Spell disintegration = placeholder();
|
||||
public static final Spell combustion_rune = placeholder();
|
||||
public static final Spell frost_step = placeholder();
|
||||
public static final Spell paralysis = placeholder();
|
||||
public static final Spell shulker_bullet = placeholder();
|
||||
public static final Spell curse_of_undeath = placeholder();
|
||||
public static final Spell dragon_fireball = placeholder();
|
||||
public static final Spell greater_telekinesis = placeholder();
|
||||
public static final Spell vex_swarm = placeholder();
|
||||
public static final Spell arcane_lock = placeholder();
|
||||
public static final Spell containment = placeholder();
|
||||
public static final Spell satiety = placeholder();
|
||||
public static final Spell greater_ward = placeholder();
|
||||
public static final Spell ray_of_purification = placeholder();
|
||||
public static final Spell remove_curse = placeholder();
|
||||
|
||||
public static final Spell possession = placeholder();
|
||||
public static final Spell curse_of_enfeeblement = placeholder();
|
||||
public static final Spell forest_of_thorns = placeholder();
|
||||
public static final Spell speed_time = placeholder();
|
||||
public static final Spell slow_time = placeholder();
|
||||
public static final Spell resurrection = placeholder();
|
||||
|
||||
@SubscribeEvent
|
||||
public static void register(RegistryEvent.Register<Spell> event){
|
||||
@@ -244,34 +243,34 @@ public final class Spells {
|
||||
IForgeRegistry<Spell> registry = event.getRegistry();
|
||||
|
||||
registry.register(new None());
|
||||
registry.register(new SpellArrow("magic_missile", Tier.BASIC, Element.MAGIC, 5, 10, EntityMagicMissile::new, 2, WizardrySounds.SPELL_MAGIC).soundValues(1, 1.4f, 0.4f));
|
||||
registry.register(new SpellArrow<>("magic_missile", EntityMagicMissile::new).addProperties(Spell.DAMAGE).soundValues(1, 1.4f, 0.4f));
|
||||
registry.register(new Ignite());
|
||||
registry.register(new Freeze());
|
||||
registry.register(new Snowball());
|
||||
registry.register(new Arc());
|
||||
registry.register(new SpellProjectile("thunderbolt", Tier.BASIC, Element.LIGHTNING, 10, 15, EntityThunderbolt::new, 2.5f, WizardrySounds.SPELL_ICE).soundValues(0.8f, 0.9f, 0.2f));
|
||||
registry.register(new SpellMinion<>("summon_zombie", Tier.BASIC, Element.NECROMANCY, 10, 40, EntityZombieMinion::new, 600, WizardrySounds.SPELL_SUMMONING).soundValues(7, 0.6f, 0));
|
||||
registry.register(new SpellProjectile<>("thunderbolt", EntityThunderbolt::new).addProperties(Spell.DAMAGE, EntityThunderbolt.KNOCKBACK_STRENGTH).soundValues(0.8f, 0.9f, 0.2f));
|
||||
registry.register(new SummonZombie());
|
||||
registry.register(new Snare());
|
||||
registry.register(new SpellArrow("dart", Tier.BASIC, Element.EARTH, 5, 10, EntityDart::new, 2, SoundEvents.ENTITY_ARROW_SHOOT).soundValues(0.5f, 0.4f, 0.2f));
|
||||
registry.register(new SpellArrow<>("dart", EntityDart::new).addProperties(Spell.DAMAGE, Spell.EFFECT_DURATION, Spell.EFFECT_STRENGTH).soundValues(0.5f, 0.4f, 0.2f));
|
||||
registry.register(new Light());
|
||||
registry.register(new Telekinesis());
|
||||
registry.register(new Heal());
|
||||
|
||||
registry.register(new Fireball());
|
||||
registry.register(new SpellProjectile<>("fireball", EntityMagicFireball::new).addProperties(Spell.DAMAGE, Spell.BURN_DURATION));//new Fireball());
|
||||
registry.register(new FlameRay());
|
||||
registry.register(new SpellProjectile("firebomb", Tier.APPRENTICE, Element.FIRE, 15, 25, EntityFirebomb::new, 1.5f, SoundEvents.ENTITY_SNOWBALL_THROW).soundValues(0.5f, 0.4f, 0.2f));
|
||||
registry.register(new SpellConstructRanged<>("fire_sigil", Tier.APPRENTICE, Element.FIRE, SpellType.CONSTRUCT, 10, 20, EntityFireSigil::new, -1, 10, SoundEvents.ITEM_FLINTANDSTEEL_USE).floor(true));
|
||||
registry.register(new SpellProjectile("firebolt", Tier.APPRENTICE, Element.FIRE, 10, 10, EntityFirebolt::new, 2.5f, SoundEvents.ENTITY_BLAZE_SHOOT));
|
||||
registry.register(new SpellProjectile<>("firebomb", EntityFirebomb::new).addProperties(Spell.DIRECT_DAMAGE, Spell.SPLASH_DAMAGE, Spell.BLAST_RADIUS, Spell.BURN_DURATION).soundValues(0.5f, 0.4f, 0.2f));
|
||||
registry.register(new SpellConstructRanged<>("fire_sigil", EntityFireSigil::new, true).floor(true).addProperties(Spell.DAMAGE, Spell.BURN_DURATION));
|
||||
registry.register(new SpellProjectile<>("firebolt", EntityFirebolt::new).addProperties(Spell.DAMAGE, Spell.BURN_DURATION));
|
||||
registry.register(new FrostRay());
|
||||
registry.register(new SummonSnowGolem());
|
||||
registry.register(new SpellArrow("ice_shard", Tier.APPRENTICE, Element.ICE, 10, 10, EntityIceShard::new, 2, WizardrySounds.SPELL_ICE).soundValues(1, 1.6f, 0.4f));
|
||||
registry.register(new SpellArrow<>("ice_shard", EntityIceShard::new).addProperties(Spell.DAMAGE, Spell.EFFECT_DURATION, Spell.EFFECT_STRENGTH).soundValues(1, 1.6f, 0.4f));
|
||||
registry.register(new IceStatue());
|
||||
registry.register(new SpellConstructRanged<>("frost_sigil", Tier.APPRENTICE, Element.ICE, SpellType.CONSTRUCT, 10, 20, EntityFrostSigil::new, -1, 10, WizardrySounds.SPELL_ICE).floor(true));
|
||||
registry.register(new SpellConstructRanged<>("frost_sigil", EntityFrostSigil::new, true).floor(true).addProperties(Spell.DAMAGE, Spell.EFFECT_DURATION, Spell.EFFECT_STRENGTH));
|
||||
registry.register(new LightningRay());
|
||||
registry.register(new SpellProjectile("spark_bomb", Tier.APPRENTICE, Element.LIGHTNING, 15, 25, EntitySparkBomb::new, 1.5f, SoundEvents.ENTITY_SNOWBALL_THROW).soundValues(0.5f, 0.4f, 0.2f));
|
||||
registry.register(new SpellProjectile("homing_spark", Tier.APPRENTICE, Element.LIGHTNING, 10, 20, EntitySpark::new, 0.5f, WizardrySounds.SPELL_CONJURATION).soundValues(1.0f, 0.4f, 0.2f));
|
||||
registry.register(new SpellConstructRanged<>("lightning_sigil", Tier.APPRENTICE, Element.LIGHTNING, SpellType.CONSTRUCT, 10, 20, EntityLightningSigil::new, -1, 10, WizardrySounds.SPELL_CONJURATION).floor(true));
|
||||
registry.register(new SpellArrow("lightning_arrow", Tier.APPRENTICE, Element.LIGHTNING, 15, 20, EntityLightningArrow::new, 2, WizardrySounds.SPELL_LIGHTNING).soundValues(1, 1.45f, 0.3f));
|
||||
registry.register(new SpellProjectile<>("spark_bomb", EntitySparkBomb::new).addProperties(Spell.DIRECT_DAMAGE, Spell.EFFECT_RADIUS, EntitySparkBomb.SECONDARY_MAX_TARGETS, Spell.SPLASH_DAMAGE).soundValues(0.5f, 0.4f, 0.2f));
|
||||
registry.register(new SpellProjectile<>("homing_spark", EntitySpark::new).addProperties(Spell.DAMAGE, Spell.SEEKING_STRENGTH).soundValues(1.0f, 0.4f, 0.2f));
|
||||
registry.register(new SpellConstructRanged<>("lightning_sigil", EntityLightningSigil::new, true).floor(true).addProperties(Spell.DIRECT_DAMAGE, Spell.EFFECT_RADIUS, EntityLightningSigil.SECONDARY_MAX_TARGETS, Spell.SPLASH_DAMAGE));
|
||||
registry.register(new SpellArrow<>("lightning_arrow", EntityLightningArrow::new).addProperties(Spell.DAMAGE).soundValues(1, 1.45f, 0.3f));
|
||||
registry.register(new LifeDrain());
|
||||
registry.register(new SummonSkeleton());
|
||||
registry.register(new Metamorphosis());
|
||||
@@ -280,69 +279,69 @@ public final class Spells {
|
||||
registry.register(new GrowthAura());
|
||||
registry.register(new Bubble());
|
||||
registry.register(new Whirlwind());
|
||||
registry.register(new SpellProjectile("poison_bomb", Tier.APPRENTICE, Element.EARTH, 15, 25, EntityPoisonBomb::new, 1.5f, SoundEvents.ENTITY_SNOWBALL_THROW).soundValues(0.5f, 0.4f, 0.2f));
|
||||
registry.register(new SpellProjectile<>("poison_bomb", EntityPoisonBomb::new).addProperties(Spell.DIRECT_DAMAGE, Spell.EFFECT_RADIUS, Spell.DIRECT_EFFECT_DURATION, Spell.DIRECT_EFFECT_STRENGTH, Spell.SPLASH_DAMAGE, Spell.SPLASH_EFFECT_DURATION, Spell.SPLASH_EFFECT_STRENGTH).soundValues(0.5f, 0.4f, 0.2f));
|
||||
registry.register(new SummonSpiritWolf());
|
||||
registry.register(new Blink());
|
||||
registry.register(new SpellBuff("agility", Tier.APPRENTICE, Element.SORCERY, SpellType.BUFF, 20, 40, WizardrySounds.SPELL_HEAL, 0.4f, 1.0f, 0.8f, Triple.of(MobEffects.SPEED, 600, 1), Triple.of(MobEffects.JUMP_BOOST, 600, 1)).soundValues(0.7f, 1.2f, 0.4f));
|
||||
registry.register(new SpellConjuration("conjure_sword", Tier.APPRENTICE, Element.SORCERY, SpellType.UTILITY, 25, 50, WizardryItems.spectral_sword, WizardrySounds.SPELL_CONJURATION));
|
||||
registry.register(new SpellConjuration("conjure_pickaxe", Tier.APPRENTICE, Element.SORCERY, SpellType.UTILITY, 25, 50, WizardryItems.spectral_pickaxe, WizardrySounds.SPELL_CONJURATION));
|
||||
registry.register(new SpellConjuration("conjure_bow", Tier.APPRENTICE, Element.SORCERY, SpellType.UTILITY, 40, 50, WizardryItems.spectral_bow, WizardrySounds.SPELL_CONJURATION));
|
||||
registry.register(new SpellArrow("force_arrow", Tier.APPRENTICE, Element.SORCERY, 15, 20, EntityForceArrow::new, 1, WizardrySounds.SPELL_FORCE).soundValues(1, 1.3f, 0.2f));
|
||||
registry.register(new SpellBuff("agility", 0.4f, 1.0f, 0.8f, () -> MobEffects.SPEED, () -> MobEffects.JUMP_BOOST).soundValues(0.7f, 1.2f, 0.4f));
|
||||
registry.register(new SpellConjuration("conjure_sword", WizardryItems.spectral_sword));
|
||||
registry.register(new SpellConjuration("conjure_pickaxe", WizardryItems.spectral_pickaxe));
|
||||
registry.register(new SpellConjuration("conjure_bow", WizardryItems.spectral_bow));
|
||||
registry.register(new ForceArrow());
|
||||
registry.register(new Shield());
|
||||
registry.register(new ReplenishHunger());
|
||||
registry.register(new CureEffects());
|
||||
registry.register(new HealAlly());
|
||||
|
||||
registry.register(new SpellMinion<>("summon_blaze", Tier.ADVANCED, Element.FIRE, 40, 200, EntityBlazeMinion::new, 600, SoundEvents.ENTITY_WITHER_AMBIENT).soundValues(1, 1.1f, 0.2f));
|
||||
registry.register(new SpellConstruct<>("ring_of_fire", Tier.ADVANCED, Element.FIRE, SpellType.CONSTRUCT, 30, 100, EnumAction.BOW, EntityFireRing::new, 600, SoundEvents.ENTITY_BLAZE_SHOOT));
|
||||
registry.register(new SpellMinion<>("summon_blaze", EntityBlazeMinion::new).soundValues(1, 1.1f, 0.2f));
|
||||
registry.register(new SpellConstruct<>("ring_of_fire", EnumAction.BOW, EntityFireRing::new, false).floor(true).addProperties(Spell.DAMAGE, Spell.BURN_DURATION));
|
||||
registry.register(new Detonate());
|
||||
registry.register(new SpellBuff("fire_resistance", Tier.ADVANCED, Element.FIRE, SpellType.DEFENCE, 20, 80, WizardrySounds.SPELL_HEAL, 1, 0.5f, 0, Triple.of(MobEffects.FIRE_RESISTANCE, 600, 0)).soundValues(0.7f, 1.2f, 0.4f));
|
||||
registry.register(new SpellBuff("fireskin", Tier.ADVANCED, Element.FIRE, SpellType.DEFENCE, 40, 250, SoundEvents.ENTITY_BLAZE_SHOOT, 1, 0.5f, 0, Triple.of(WizardryPotions.fireskin, 600, 0)));
|
||||
registry.register(new SpellBuff("fire_resistance", 1, 0.5f, 0, () -> MobEffects.FIRE_RESISTANCE).soundValues(0.7f, 1.2f, 0.4f));
|
||||
registry.register(new SpellBuff("fireskin", 1, 0.5f, 0, () -> WizardryPotions.fireskin).addProperties(Spell.BURN_DURATION));
|
||||
registry.register(new FlamingAxe());
|
||||
registry.register(new SpellConstructRanged<>("blizzard", Tier.ADVANCED, Element.ICE, SpellType.CONSTRUCT, 40, 100, EntityBlizzard::new, 600, 20, WizardrySounds.SPELL_ICE));
|
||||
registry.register(new SpellMinion<>("summon_ice_wraith", Tier.ADVANCED, Element.ICE, 40, 200, EntityIceWraith::new, 600, SoundEvents.ENTITY_WITHER_AMBIENT).soundValues(1, 1.1f, 0.2f));
|
||||
registry.register(new SpellBuff("ice_shroud", Tier.ADVANCED, Element.ICE, SpellType.DEFENCE, 40, 250, WizardrySounds.SPELL_ICE, 0.3f, 0.5f, 1, Triple.of(WizardryPotions.ice_shroud, 600, 0)).soundValues(1, 1.6f, 0.4f));
|
||||
registry.register(new SpellProjectile("ice_charge", Tier.ADVANCED, Element.ICE, 20, 30, EntityIceCharge::new, 1.5f, WizardrySounds.SPELL_ICE).soundValues(1, 1.6f, 0.4f));
|
||||
registry.register(new SpellConstructRanged<>("blizzard", EntityBlizzard::new, false).addProperties(Spell.EFFECT_RADIUS));
|
||||
registry.register(new SpellMinion<>("summon_ice_wraith", EntityIceWraith::new).soundValues(1, 1.1f, 0.2f));
|
||||
registry.register(new SpellBuff("ice_shroud", 0.3f, 0.5f, 1, () -> WizardryPotions.ice_shroud).addProperties(Spell.EFFECT_DURATION, Spell.EFFECT_STRENGTH).soundValues(1, 1.6f, 0.4f));
|
||||
registry.register(new SpellProjectile<>("ice_charge", EntityIceCharge::new).addProperties(Spell.DAMAGE, Spell.EFFECT_RADIUS, Spell.DIRECT_EFFECT_DURATION, Spell.DIRECT_EFFECT_STRENGTH, Spell.SPLASH_EFFECT_DURATION, Spell.SPLASH_EFFECT_STRENGTH, EntityIceCharge.ICE_SHARDS).soundValues(1, 1.6f, 0.4f));
|
||||
registry.register(new FrostAxe());
|
||||
registry.register(new InvokeWeather());
|
||||
registry.register(new ChainLightning());
|
||||
registry.register(new LightningBolt());
|
||||
registry.register(new SpellMinion<>("summon_lightning_wraith", Tier.ADVANCED, Element.LIGHTNING, 40, 200, EntityLightningWraith::new, 600, SoundEvents.ENTITY_WITHER_AMBIENT).soundValues(1, 1.1f, 0.2f));
|
||||
registry.register(new SpellBuff("static_aura", Tier.ADVANCED, Element.LIGHTNING, SpellType.DEFENCE, 40, 250, WizardrySounds.SPELL_SPARK, 0, 0.5f, 0.7f, Triple.of(WizardryPotions.static_aura, 600, 0)).soundValues(1, 1.6f, 0.4f));
|
||||
registry.register(new SpellProjectile("lightning_disc", Tier.ADVANCED, Element.LIGHTNING, 25, 60, EntityLightningDisc::new, 1.2f, WizardrySounds.SPELL_LIGHTNING).soundValues(1, 0.95f, 0.3f));
|
||||
registry.register(new SpellMinion<>("summon_lightning_wraith", EntityLightningWraith::new).soundValues(1, 1.1f, 0.2f));
|
||||
registry.register(new SpellBuff("static_aura", 0, 0.5f, 0.7f, () -> WizardryPotions.static_aura).addProperties(Spell.DAMAGE).soundValues(1, 1.6f, 0.4f));
|
||||
registry.register(new SpellProjectile<>("lightning_disc", EntityLightningDisc::new).addProperties(Spell.DAMAGE, Spell.SEEKING_STRENGTH).soundValues(1, 0.95f, 0.3f));
|
||||
registry.register(new MindControl());
|
||||
registry.register(new SpellMinion<>("summon_wither_skeleton", Tier.ADVANCED, Element.NECROMANCY, 35, 150, EntityWitherSkeletonMinion::new, 600, WizardrySounds.SPELL_SUMMONING).soundValues(7, 0.6f, 0));
|
||||
registry.register(new SummonWitherSkeleton());
|
||||
registry.register(new Entrapment());
|
||||
registry.register(new WitherSkull());
|
||||
registry.register(new SpellProjectile("darkness_orb", Tier.ADVANCED, Element.NECROMANCY, 20, 20, EntityDarknessOrb::new, 0.5f, SoundEvents.ENTITY_WITHER_SHOOT).soundValues(0.5f, 0.4f, 0.2f));
|
||||
registry.register(new SpellProjectile<>("darkness_orb", EntityDarknessOrb::new).addProperties(Spell.DAMAGE, Spell.EFFECT_DURATION, Spell.EFFECT_STRENGTH).soundValues(0.5f, 0.4f, 0.2f));
|
||||
registry.register(new ShadowWard());
|
||||
registry.register(new Decay());
|
||||
registry.register(new SpellBuff("water_breathing", Tier.ADVANCED, Element.EARTH, SpellType.BUFF, 30, 250, WizardrySounds.SPELL_HEAL, 0.3f, 0.3f, 1, Triple.of(MobEffects.WATER_BREATHING, 1200, 0)){ @Override public boolean canBeCastByNPCs(){ return false; } }.soundValues(0.7f, 1.2f, 0.4f));
|
||||
registry.register(new SpellBuff("water_breathing", 0.3f, 0.3f, 1, () -> MobEffects.WATER_BREATHING){ @Override public boolean canBeCastByNPCs(){ return false; } }.soundValues(0.7f, 1.2f, 0.4f));
|
||||
registry.register(new Tornado());
|
||||
registry.register(new Glide());
|
||||
registry.register(new SummonSpiritHorse());
|
||||
registry.register(new SpellMinion<>("spider_swarm", Tier.ADVANCED, Element.EARTH, 45, 200, EntitySpiderMinion::new, 600, SoundEvents.BLOCK_FIRE_EXTINGUISH).soundValues(1, 1.1f, 0.1f).quantity(5).range(3));
|
||||
registry.register(new SpellMinion<>("spider_swarm", EntitySpiderMinion::new).soundValues(1, 1.1f, 0.1f));
|
||||
registry.register(new Slime());
|
||||
registry.register(new Petrify());
|
||||
registry.register(new SpellBuff("invisibility", Tier.ADVANCED, Element.SORCERY, SpellType.BUFF, 35, 200, WizardrySounds.SPELL_HEAL, 0.7f, 1, 1, Triple.of(MobEffects.INVISIBILITY, 600, 0)).soundValues(0.7f, 1.2f, 0.4f));
|
||||
registry.register(new SpellBuff("invisibility", 0.7f, 1, 1, () -> MobEffects.INVISIBILITY).soundValues(0.7f, 1.2f, 0.4f));
|
||||
registry.register(new Levitation());
|
||||
registry.register(new SpellProjectile("force_orb", Tier.ADVANCED, Element.SORCERY, 20, 20, EntityForceOrb::new, 1.5f, SoundEvents.ENTITY_SNOWBALL_THROW).soundValues(0.5f, 0.4f, 0.2f));
|
||||
registry.register(new SpellProjectile<>("force_orb", EntityForceOrb::new).addProperties(Spell.DAMAGE, Spell.BLAST_RADIUS).soundValues(0.5f, 0.4f, 0.2f));
|
||||
registry.register(new Transportation());
|
||||
registry.register(new SpectralPathway());
|
||||
registry.register(new PhaseStep());
|
||||
registry.register(new VanishingBox());
|
||||
registry.register(new GreaterHeal());
|
||||
registry.register(new SpellConstruct<>("healing_aura", Tier.ADVANCED, Element.HEALING, SpellType.CONSTRUCT, 35, 150, EnumAction.BOW, EntityHealAura::new, 600, null));
|
||||
registry.register(new SpellConstruct<>("forcefield", Tier.ADVANCED, Element.HEALING, SpellType.DEFENCE, 45, 200, EnumAction.BOW, EntityForcefield::new, 600, WizardrySounds.SPELL_CONJURATION_LARGE));
|
||||
registry.register(new SpellBuff("ironflesh", Tier.ADVANCED, Element.HEALING, SpellType.DEFENCE, 30, 100, WizardrySounds.SPELL_HEAL, 0.4f, 0.5f, 0.6f, Triple.of(MobEffects.RESISTANCE, 600, 2)).soundValues(0.7f, 1.2f, 0.4f));
|
||||
registry.register(new SpellConstruct<>("healing_aura", EnumAction.BOW, EntityHealAura::new, false).addProperties(Spell.DAMAGE, Spell.HEALTH));
|
||||
registry.register(new Forcefield());
|
||||
registry.register(new SpellBuff("ironflesh", 0.4f, 0.5f, 0.6f, () -> MobEffects.RESISTANCE).soundValues(0.7f, 1.2f, 0.4f));
|
||||
registry.register(new Transience());
|
||||
|
||||
registry.register(new Meteor());
|
||||
registry.register(new Firestorm());
|
||||
registry.register(new SpellMinion<>("summon_phoenix", Tier.MASTER, Element.FIRE, 150, 400, EntityPhoenix::new, 600, SoundEvents.ENTITY_WITHER_AMBIENT).soundValues(1, 1.1f, 0.1f));
|
||||
registry.register(new FireBreath());
|
||||
registry.register(new SpellMinion<>("summon_phoenix", EntityPhoenix::new).flying(true).soundValues(1, 1.1f, 0.1f));
|
||||
registry.register(new IceAge());
|
||||
registry.register(new WallOfFrost());
|
||||
registry.register(new SpellMinion<>("summon_ice_giant", Tier.MASTER, Element.ICE, 100, 400, EntityIceGiant::new, 600, WizardrySounds.SPELL_ICE).soundValues(1, 0.15f, 0.1f));
|
||||
registry.register(new SpellMinion<>("summon_ice_giant", EntityIceGiant::new).soundValues(1, 0.15f, 0.1f));
|
||||
registry.register(new Thunderstorm());
|
||||
registry.register(new LightningHammer());
|
||||
registry.register(new PlagueOfDarkness());
|
||||
@@ -350,17 +349,17 @@ public final class Spells {
|
||||
registry.register(new SummonShadowWraith());
|
||||
registry.register(new ForestsCurse());
|
||||
registry.register(new Flight());
|
||||
registry.register(new SpellMinion<>("silverfish_swarm", Tier.MASTER, Element.EARTH, 80, 300, EntitySilverfishMinion::new, 600, SoundEvents.BLOCK_FIRE_EXTINGUISH).soundValues(1, 1.1f, 0.1f).quantity(20).range(3));
|
||||
registry.register(new SpellConstructRanged<>("black_hole", Tier.MASTER, Element.SORCERY, SpellType.CONSTRUCT, 150, 400, EntityBlackHole::new, 600, 10, SoundEvents.ENTITY_WITHER_SPAWN).soundValues(2, 0.7f, 0));
|
||||
registry.register(new SpellMinion<>("silverfish_swarm", EntitySilverfishMinion::new).soundValues(1, 1.1f, 0.1f));
|
||||
registry.register(new SpellConstructRanged<>("black_hole", EntityBlackHole::new, false).soundValues(2, 0.7f, 0));
|
||||
registry.register(new Shockwave());
|
||||
registry.register(new SummonIronGolem());
|
||||
registry.register(new ArrowRain());
|
||||
registry.register(new SpellBuff("diamondflesh", Tier.MASTER, Element.HEALING, SpellType.DEFENCE, 100, 300, WizardrySounds.SPELL_HEAL, 0.1f, 0.7f, 1, Triple.of(MobEffects.RESISTANCE, 600, 5)).soundValues(0.7f, 1.2f, 0.4f));
|
||||
registry.register(new SpellBuff("font_of_vitality", Tier.MASTER, Element.HEALING, SpellType.DEFENCE, 75, 300, WizardrySounds.SPELL_HEAL, 1, 0.8f, 0.3f, Triple.of(MobEffects.ABSORPTION, 1200, 1), Triple.of(MobEffects.REGENERATION, 300, 1)).soundValues(0.7f, 1.2f, 0.4f));
|
||||
registry.register(new SpellBuff("diamondflesh", 0.1f, 0.7f, 1, () -> MobEffects.RESISTANCE).soundValues(0.7f, 1.2f, 0.4f));
|
||||
registry.register(new SpellBuff("font_of_vitality", 1, 0.8f, 0.3f, () -> MobEffects.ABSORPTION, () -> MobEffects.REGENERATION).soundValues(0.7f, 1.2f, 0.4f));
|
||||
|
||||
// Wizardry 1.1 spells
|
||||
|
||||
registry.register(new SpellProjectile("smoke_bomb", Tier.BASIC, Element.FIRE, 10, 20, EntitySmokeBomb::new, 1.5f, SoundEvents.ENTITY_SNOWBALL_THROW).soundValues(0.5f, 0.4f, 0.2f));
|
||||
registry.register(new SpellProjectile<>("smoke_bomb", EntitySmokeBomb::new).addProperties(Spell.BLAST_RADIUS, Spell.EFFECT_DURATION).soundValues(0.5f, 0.4f, 0.2f));
|
||||
registry.register(new MindTrick());
|
||||
registry.register(new Leap());
|
||||
|
||||
@@ -368,16 +367,16 @@ public final class Spells {
|
||||
registry.register(new Intimidate());
|
||||
registry.register(new Banish());
|
||||
registry.register(new SixthSense());
|
||||
registry.register(new SpellBuff("darkvision", Tier.APPRENTICE, Element.EARTH, SpellType.BUFF, 20, 40, WizardrySounds.SPELL_HEAL, 0, 0.4f, 0.7f, Triple.of(MobEffects.NIGHT_VISION, 900, 0)){ @Override public boolean canBeCastByNPCs(){ return false; } }.soundValues(0.7f, 1.2f, 0.4f));
|
||||
registry.register(new SpellBuff("darkvision", 0, 0.4f, 0.7f, () -> MobEffects.NIGHT_VISION){ @Override public boolean canBeCastByNPCs(){ return false; } }.soundValues(0.7f, 1.2f, 0.4f));
|
||||
registry.register(new Clairvoyance());
|
||||
registry.register(new PocketWorkbench());
|
||||
registry.register(new ImbueWeapon());
|
||||
registry.register(new InvigoratingPresence());
|
||||
registry.register(new SpellBuff("oakflesh", Tier.ADVANCED, Element.HEALING, SpellType.DEFENCE, 20, 50, WizardrySounds.SPELL_HEAL, 0.6f, 0.5f, 0.4f, Triple.of(MobEffects.RESISTANCE, 600, 1)).soundValues(0.7f, 1.2f, 0.4f));
|
||||
registry.register(new SpellBuff("oakflesh", 0.6f, 0.5f, 0.4f, () -> MobEffects.RESISTANCE).soundValues(0.7f, 1.2f, 0.4f));
|
||||
|
||||
registry.register(new GreaterFireball());
|
||||
registry.register(new SpellProjectile<>("greater_fireball", EntityLargeMagicFireball::new).addProperties(Spell.DAMAGE, EntityLargeMagicFireball.EXPLOSION_POWER));//new GreaterFireball());
|
||||
registry.register(new FlamingWeapon());
|
||||
registry.register(new SpellArrow("ice_lance", Tier.ADVANCED, Element.ICE, 20, 20, EntityIceLance::new, 2, WizardrySounds.SPELL_ICE).soundValues(1, 1, 0.4f));
|
||||
registry.register(new SpellArrow<>("ice_lance", EntityIceLance::new).addProperties(Spell.DAMAGE, Spell.EFFECT_DURATION, Spell.EFFECT_STRENGTH).soundValues(1, 1, 0.4f));
|
||||
registry.register(new FreezingWeapon());
|
||||
registry.register(new IceSpikes());
|
||||
registry.register(new LightningPulse());
|
||||
@@ -390,9 +389,47 @@ public final class Spells {
|
||||
|
||||
registry.register(new Hailstorm());
|
||||
registry.register(new LightningWeb());
|
||||
registry.register(new SpellMinion<>("summon_storm_elemental", Tier.MASTER, Element.LIGHTNING, 100, 400, EntityStormElemental::new, 600, SoundEvents.ENTITY_WITHER_AMBIENT).soundValues(1, 1.1f, 0.1f));
|
||||
registry.register(new SpellMinion<>("summon_storm_elemental", EntityStormElemental::new).soundValues(1, 1.1f, 0.1f));
|
||||
registry.register(new Earthquake());
|
||||
registry.register(new FontOfMana());
|
||||
|
||||
// Wizardry 4.2 spells
|
||||
|
||||
registry.register(new Mine());
|
||||
registry.register(new ConjureBlock());
|
||||
registry.register(new SpellBuff("muffle", 0.3f, 0.4f, 0.8f, () -> WizardryPotions.muffle).soundValues(0.7f, 1.2f, 0.4f));
|
||||
registry.register(new SpellBuff("ward", 0.75f, 0.6f, 0.8f, () -> WizardryPotions.ward).soundValues(0.7f, 1.2f, 0.4f));
|
||||
registry.register(new Evade());
|
||||
|
||||
registry.register(new SpellProjectile<>("iceball", EntityIceball::new).addProperties(Spell.DAMAGE, Spell.EFFECT_DURATION, Spell.EFFECT_STRENGTH));
|
||||
registry.register(new Charge());
|
||||
registry.register(new Reversal());
|
||||
registry.register(new Grapple());
|
||||
registry.register(new Divination());
|
||||
registry.register(new EmpoweringPresence());
|
||||
|
||||
registry.register(new Disintegration());
|
||||
registry.register(new SpellConstructRanged<>("combustion_rune", EntityCombustionRune::new, true).floor(true).addProperties(Spell.BLAST_RADIUS));
|
||||
registry.register(new SpellBuff("frost_step", 0.3f, 0.4f, 0.8f, () -> WizardryPotions.frost_step).soundValues(0.7f, 1.2f, 0.4f));
|
||||
registry.register(new Paralysis());
|
||||
registry.register(new ShulkerBullet());
|
||||
registry.register(new CurseOfUndeath());
|
||||
registry.register(new DragonFireball());
|
||||
registry.register(new GreaterTelekinesis());
|
||||
registry.register(new SpellMinion<>("vex_swarm", EntityVexMinion::new).flying(true).soundValues(1, 1.1f, 0.1f));
|
||||
registry.register(new ArcaneLock());
|
||||
registry.register(new Containment());
|
||||
registry.register(new Satiety());
|
||||
registry.register(new SpellBuff("greater_ward", 0.75f, 0.6f, 0.8f, () -> WizardryPotions.ward).soundValues(0.7f, 1.2f, 0.4f));
|
||||
registry.register(new RayOfPurification());
|
||||
registry.register(new RemoveCurse());
|
||||
|
||||
registry.register(new Possession());
|
||||
registry.register(new CurseOfEnfeeblement());
|
||||
registry.register(new ForestOfThorns());
|
||||
registry.register(new SpeedTime());
|
||||
registry.register(new SlowTime());
|
||||
registry.register(new Resurrection());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,59 +1,48 @@
|
||||
package electroblob.wizardry.registry;
|
||||
|
||||
import electroblob.wizardry.util.CustomAdvancementTrigger;
|
||||
import electroblob.wizardry.Wizardry;
|
||||
import electroblob.wizardry.advancement.*;
|
||||
import net.minecraft.advancements.CriteriaTriggers;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
/**
|
||||
* This class stores a collection of custom advancement triggers, for advancements that cannot be triggered
|
||||
* from plain vanilla JSON definitions. It replaces the old WizardryAchievements class.
|
||||
* Class responsible for defining, storing and registering all of wizardry's advancement triggers. As of wizardry 4.2,
|
||||
* the 'dummy' advancement triggers are being phased out in favour of proper custom triggers with JSON parameters, or
|
||||
* where possible, existing triggers in Minecraft.
|
||||
*
|
||||
* @author 12foo
|
||||
* @author 12foo, Electroblob
|
||||
* @since Wizardry 4.1.0
|
||||
*/
|
||||
public final class WizardryAdvancementTriggers {
|
||||
|
||||
public static final CustomAdvancementTrigger armour_set = new CustomAdvancementTrigger("trigger_armour_set");
|
||||
public static final CustomAdvancementTrigger jam_wizard = new CustomAdvancementTrigger("trigger_jam_wizard");
|
||||
public static final CustomAdvancementTrigger self_destruct = new CustomAdvancementTrigger("trigger_self_destruct");
|
||||
public static final CustomAdvancementTrigger all_spells = new CustomAdvancementTrigger("trigger_all_spells");
|
||||
public static final CustomAdvancementTrigger element_master = new CustomAdvancementTrigger("trigger_element_master");
|
||||
public static final CustomAdvancementTrigger identify_spell = new CustomAdvancementTrigger("trigger_identify_spell");
|
||||
public static final CustomAdvancementTrigger elemental = new CustomAdvancementTrigger("trigger_elemental");
|
||||
|
||||
private WizardryAdvancementTriggers(){} // No instances!
|
||||
|
||||
public static final CustomAdvancementTrigger legendary = new CustomAdvancementTrigger("trigger_legendary");
|
||||
public static final CustomAdvancementTrigger max_out_wand = new CustomAdvancementTrigger("trigger_max_out_wand");
|
||||
public static final CustomAdvancementTrigger special_upgrade = new CustomAdvancementTrigger("trigger_special_upgrade");
|
||||
public static final CustomAdvancementTrigger pig_tornado = new CustomAdvancementTrigger("trigger_pig_tornado");
|
||||
public static final CustomAdvancementTrigger master = new CustomAdvancementTrigger("trigger_master");
|
||||
public static final CustomAdvancementTrigger apprentice = new CustomAdvancementTrigger("trigger_apprentice");
|
||||
public static final CustomAdvancementTrigger anger_wizard = new CustomAdvancementTrigger("trigger_anger_wizard");
|
||||
public static final CustomAdvancementTrigger buy_master_spell = new CustomAdvancementTrigger("trigger_buy_master_spell");
|
||||
public static final CustomAdvancementTrigger wizard_trade = new CustomAdvancementTrigger("trigger_wizard_trade");
|
||||
public static final CustomAdvancementTrigger slime_skeleton = new CustomAdvancementTrigger("trigger_slime_skeleton");
|
||||
public static final CustomAdvancementTrigger freeze_blaze = new CustomAdvancementTrigger("trigger_freeze_blaze");
|
||||
public static final CustomAdvancementTrigger frankenstein = new CustomAdvancementTrigger("trigger_frankenstein");
|
||||
public static final CustomAdvancementTrigger charge_creeper = new CustomAdvancementTrigger("trigger_charge_creeper");
|
||||
public static final CustomAdvancementTrigger wizard_trade = new CustomAdvancementTrigger("trigger_wizard_trade");
|
||||
public static final CustomAdvancementTrigger spell_failure = new CustomAdvancementTrigger("trigger_spell_failure");
|
||||
|
||||
public static final StructureTrigger visit_structure = new StructureTrigger(new ResourceLocation(Wizardry.MODID, "visit_structure"));
|
||||
public static final ArcaneWorkbenchTrigger arcane_workbench = new ArcaneWorkbenchTrigger(new ResourceLocation(Wizardry.MODID, "arcane_workbench"));
|
||||
public static final SpellCastTrigger cast_spell = new SpellCastTrigger(new ResourceLocation(Wizardry.MODID, "cast_spell"));
|
||||
public static final SpellDiscoveryTrigger discover_spell = new SpellDiscoveryTrigger(new ResourceLocation(Wizardry.MODID, "discover_spell"));
|
||||
|
||||
public static void register(){
|
||||
|
||||
CriteriaTriggers.register(armour_set);
|
||||
CriteriaTriggers.register(jam_wizard);
|
||||
CriteriaTriggers.register(self_destruct);
|
||||
CriteriaTriggers.register(all_spells);
|
||||
CriteriaTriggers.register(element_master);
|
||||
CriteriaTriggers.register(identify_spell);
|
||||
CriteriaTriggers.register(elemental);
|
||||
|
||||
CriteriaTriggers.register(legendary);
|
||||
CriteriaTriggers.register(max_out_wand);
|
||||
CriteriaTriggers.register(special_upgrade);
|
||||
CriteriaTriggers.register(pig_tornado);
|
||||
CriteriaTriggers.register(master);
|
||||
CriteriaTriggers.register(apprentice);
|
||||
CriteriaTriggers.register(anger_wizard);
|
||||
CriteriaTriggers.register(buy_master_spell);
|
||||
CriteriaTriggers.register(wizard_trade);
|
||||
CriteriaTriggers.register(slime_skeleton);
|
||||
CriteriaTriggers.register(freeze_blaze);
|
||||
CriteriaTriggers.register(frankenstein);
|
||||
CriteriaTriggers.register(charge_creeper);
|
||||
CriteriaTriggers.register(spell_failure);
|
||||
|
||||
CriteriaTriggers.register(visit_structure);
|
||||
CriteriaTriggers.register(arcane_workbench);
|
||||
CriteriaTriggers.register(cast_spell);
|
||||
CriteriaTriggers.register(discover_spell);
|
||||
}
|
||||
}
|
||||
@@ -2,16 +2,22 @@ package electroblob.wizardry.registry;
|
||||
|
||||
import electroblob.wizardry.Wizardry;
|
||||
import electroblob.wizardry.block.*;
|
||||
import electroblob.wizardry.tileentity.*;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.event.RegistryEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry.ObjectHolder;
|
||||
import net.minecraftforge.registries.IForgeRegistry;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
/**
|
||||
* Class responsible for defining, storing and registering all of wizardry's blocks.
|
||||
* Class responsible for defining, storing and registering all of wizardry's blocks. Also handles registry of the
|
||||
* tile entities.
|
||||
*
|
||||
* @author Electroblob
|
||||
* @since Wizardry 2.1
|
||||
@@ -20,6 +26,8 @@ import net.minecraftforge.registries.IForgeRegistry;
|
||||
@Mod.EventBusSubscriber
|
||||
public final class WizardryBlocks {
|
||||
|
||||
private WizardryBlocks(){} // No instances!
|
||||
|
||||
// Found a very nice way of registering things using arrays, which might make @ObjectHolder actually useful.
|
||||
// http://www.minecraftforge.net/forum/topic/49497-1112-is-using-registryevent-this-way-ok/
|
||||
|
||||
@@ -27,29 +35,37 @@ public final class WizardryBlocks {
|
||||
|
||||
// setSoundType should be public, but in this particular version it isn't... which is a bit of a pain.
|
||||
|
||||
public static final Block arcane_workbench = null;
|
||||
public static final Block crystal_ore = null;
|
||||
public static final Block petrified_stone = null;
|
||||
public static final Block ice_statue = null;
|
||||
public static final Block magic_light = null;
|
||||
public static final Block crystal_flower = null;
|
||||
public static final Block snare = null;
|
||||
public static final Block transportation_stone = null;
|
||||
public static final Block spectral_block = null;
|
||||
public static final Block crystal_block = null;
|
||||
public static final Block meteor = null;
|
||||
public static final Block vanishing_cobweb = null;
|
||||
public static final Block runestone = null;
|
||||
@Nonnull
|
||||
@SuppressWarnings("ConstantConditions")
|
||||
private static <T> T placeholder(){ return null; }
|
||||
|
||||
public static final Block arcane_workbench = placeholder();
|
||||
public static final Block crystal_ore = placeholder();
|
||||
public static final Block petrified_stone = placeholder();
|
||||
public static final Block ice_statue = placeholder();
|
||||
public static final Block magic_light = placeholder();
|
||||
public static final Block crystal_flower = placeholder();
|
||||
public static final Block snare = placeholder();
|
||||
public static final Block transportation_stone = placeholder();
|
||||
public static final Block spectral_block = placeholder();
|
||||
public static final Block crystal_block = placeholder();
|
||||
public static final Block meteor = placeholder();
|
||||
public static final Block vanishing_cobweb = placeholder();
|
||||
public static final Block runestone = placeholder();
|
||||
public static final Block runestone_pedestal = placeholder();
|
||||
public static final Block thorns = placeholder();
|
||||
public static final Block obsidian_crust = placeholder();
|
||||
public static final Block dry_frosted_ice = placeholder();
|
||||
|
||||
/**
|
||||
* Sets both the registry and unlocalised names of the given block, then registers it with the given registry. Use
|
||||
* this instead of {@link Block#setRegistryName(String)} and {@link Block#setUnlocalizedName(String)} during
|
||||
* this instead of {@link Block#setRegistryName(String)} and {@link Block#setTranslationKey(String)} during
|
||||
* construction, for convenience and consistency.
|
||||
*
|
||||
* @param registry The registry to register the given block to.
|
||||
* @param name The name of the block, without the mod ID or the .name stuff. The registry name will be
|
||||
* {@code ebwizardry:[name]}. The unlocalised name will be {@code tile.ebwizardry:[name].name}.
|
||||
* @param item The block to register.
|
||||
* @param block The block to register.
|
||||
*/
|
||||
public static void registerBlock(IForgeRegistry<Block> registry, String name, Block block){
|
||||
block.setRegistryName(Wizardry.MODID, name);
|
||||
@@ -62,19 +78,35 @@ public final class WizardryBlocks {
|
||||
|
||||
IForgeRegistry<Block> registry = event.getRegistry();
|
||||
|
||||
registerBlock(registry, "arcane_workbench", new BlockArcaneWorkbench().setHardness(1.0F).setCreativeTab(WizardryTabs.WIZARDRY));
|
||||
registerBlock(registry, "arcane_workbench", new BlockArcaneWorkbench().setHardness(1.0F).setCreativeTab(WizardryTabs.WIZARDRY));
|
||||
registerBlock(registry, "crystal_ore", new BlockCrystalOre(Material.ROCK).setHardness(3.0F).setCreativeTab(WizardryTabs.WIZARDRY));
|
||||
registerBlock(registry, "petrified_stone", new BlockStatue(Material.ROCK).setHardness(1.5F).setResistance(10.0F));
|
||||
registerBlock(registry, "ice_statue", new BlockStatue(Material.ICE).setHardness(0.5F).setLightOpacity(3));
|
||||
registerBlock(registry, "ice_statue", new BlockStatue(Material.ICE).setHardness(0.5F).setLightOpacity(3));
|
||||
registerBlock(registry, "magic_light", new BlockMagicLight(Material.CIRCUITS));
|
||||
registerBlock(registry, "crystal_flower", new BlockCrystalFlower(Material.PLANTS).setHardness(0.0F).setCreativeTab(WizardryTabs.WIZARDRY));
|
||||
registerBlock(registry, "snare", new BlockSnare(Material.PLANTS).setHardness(0.0F));
|
||||
registerBlock(registry, "transportation_stone", new BlockTransportationStone(Material.ROCK).setHardness(0.3F).setLightLevel(0.5f).setLightOpacity(0).setCreativeTab(WizardryTabs.WIZARDRY));
|
||||
registerBlock(registry, "spectral_block", new BlockSpectral(Material.GLASS).setLightLevel(0.7f).setLightOpacity(0).setBlockUnbreakable().setResistance(6000000.0F));
|
||||
registerBlock(registry, "crystal_block", new BlockCrystal(Material.IRON).setHardness(5.0F).setResistance(10.0F).setCreativeTab(WizardryTabs.WIZARDRY));
|
||||
registerBlock(registry, "meteor", new Block(Material.ROCK).setLightLevel(1));
|
||||
registerBlock(registry, "vanishing_cobweb", new BlockVanishingCobweb(Material.WEB).setLightOpacity(1).setHardness(4.0F));
|
||||
registerBlock(registry, "runestone", new BlockRunestone(Material.ROCK));
|
||||
registerBlock(registry, "crystal_flower", new BlockCrystalFlower(Material.PLANTS).setHardness(0.0F).setCreativeTab(WizardryTabs.WIZARDRY));
|
||||
registerBlock(registry, "snare", new BlockSnare(Material.PLANTS).setHardness(0.0F));
|
||||
registerBlock(registry, "transportation_stone", new BlockTransportationStone(Material.ROCK).setHardness(0.3F).setLightLevel(0.5f).setLightOpacity(0).setCreativeTab(WizardryTabs.WIZARDRY));
|
||||
registerBlock(registry, "spectral_block", new BlockSpectral(Material.GLASS).setLightLevel(0.7f).setLightOpacity(0).setBlockUnbreakable().setResistance(6000000.0F));
|
||||
registerBlock(registry, "crystal_block", new BlockCrystal(Material.IRON).setHardness(5.0F).setResistance(10.0F).setCreativeTab(WizardryTabs.WIZARDRY));
|
||||
registerBlock(registry, "meteor", new Block(Material.ROCK).setLightLevel(1));
|
||||
registerBlock(registry, "vanishing_cobweb", new BlockVanishingCobweb(Material.WEB).setLightOpacity(1).setHardness(4.0F));
|
||||
registerBlock(registry, "runestone", new BlockRunestone(Material.ROCK));
|
||||
registerBlock(registry, "runestone_pedestal", new BlockPedestal(Material.ROCK));
|
||||
registerBlock(registry, "thorns", new BlockThorns());
|
||||
registerBlock(registry, "obsidian_crust", new BlockObsidianCrust());
|
||||
registerBlock(registry, "dry_frosted_ice", new BlockDryFrostedIce());
|
||||
|
||||
}
|
||||
|
||||
/** Called from the preInit method in the main mod class to register all the tile entities. */
|
||||
public static void registerTileEntities(){
|
||||
// Nope, these still don't have their own registry...
|
||||
GameRegistry.registerTileEntity(TileEntityArcaneWorkbench.class, new ResourceLocation(Wizardry.MODID, "arcane_workbench"));
|
||||
GameRegistry.registerTileEntity(TileEntityStatue.class, new ResourceLocation(Wizardry.MODID, "petrified_stone"));
|
||||
GameRegistry.registerTileEntity(TileEntityMagicLight.class, new ResourceLocation(Wizardry.MODID, "magic_light"));
|
||||
GameRegistry.registerTileEntity(TileEntityTimer.class, new ResourceLocation(Wizardry.MODID, "timer"));
|
||||
GameRegistry.registerTileEntity(TileEntityPlayerSave.class, new ResourceLocation(Wizardry.MODID, "player_save"));
|
||||
GameRegistry.registerTileEntity(TileEntityPlayerSaveTimed.class, new ResourceLocation(Wizardry.MODID, "player_save_timed"));
|
||||
GameRegistry.registerTileEntity(TileEntityShrineCore.class, new ResourceLocation(Wizardry.MODID, "shrine_core"));
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,17 @@
|
||||
package electroblob.wizardry.registry;
|
||||
|
||||
import electroblob.wizardry.Wizardry;
|
||||
import electroblob.wizardry.enchantment.EnchantmentMagicProtection;
|
||||
import electroblob.wizardry.enchantment.EnchantmentMagicSword;
|
||||
import electroblob.wizardry.enchantment.EnchantmentTimed;
|
||||
import electroblob.wizardry.util.WizardryUtilities;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraftforge.event.RegistryEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
/**
|
||||
* Class responsible for defining, storing and registering all of wizardry's enchantments.
|
||||
*
|
||||
@@ -17,6 +21,8 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
@Mod.EventBusSubscriber
|
||||
public final class WizardryEnchantments {
|
||||
|
||||
private WizardryEnchantments(){} // No instances!
|
||||
|
||||
// At the moment these enchantments generate on books in dungeon chests due to a bad bit of code (EnchantRandomly:49).
|
||||
// No idea how to fix this because I have no way of hooking into that code... removing the enchantments from the
|
||||
// registry works, but breaks everything else!
|
||||
@@ -26,17 +32,31 @@ public final class WizardryEnchantments {
|
||||
|
||||
// All of these have custom classes, so the unlocalised name (referred to simply as 'name' for enchantments) is
|
||||
// dealt with inside those classes.
|
||||
public static final Enchantment magic_sword = null;
|
||||
public static final Enchantment magic_bow = null;
|
||||
public static final Enchantment flaming_weapon = null;
|
||||
public static final Enchantment freezing_weapon = null;
|
||||
|
||||
@Nonnull
|
||||
@SuppressWarnings("ConstantConditions")
|
||||
private static <T> T placeholder(){ return null; }
|
||||
|
||||
public static final Enchantment magic_sword = placeholder();
|
||||
public static final Enchantment magic_bow = placeholder();
|
||||
public static final Enchantment flaming_weapon = placeholder();
|
||||
public static final Enchantment freezing_weapon = placeholder();
|
||||
|
||||
public static final Enchantment magic_protection = placeholder();
|
||||
public static final Enchantment frost_protection = placeholder();
|
||||
public static final Enchantment shock_protection = placeholder();
|
||||
|
||||
@SubscribeEvent
|
||||
public static void register(RegistryEvent.Register<Enchantment> event){
|
||||
|
||||
event.getRegistry().register(new EnchantmentMagicSword().setRegistryName(Wizardry.MODID, "magic_sword"));
|
||||
event.getRegistry().register(new EnchantmentTimed().setRegistryName(Wizardry.MODID, "magic_bow"));
|
||||
event.getRegistry().register(new EnchantmentTimed().setRegistryName(Wizardry.MODID, "flaming_weapon"));
|
||||
event.getRegistry().register(new EnchantmentTimed().setRegistryName(Wizardry.MODID, "freezing_weapon"));
|
||||
|
||||
event.getRegistry().register(new EnchantmentMagicProtection(Enchantment.Rarity.UNCOMMON, EnchantmentMagicProtection.Type.MAGIC, WizardryUtilities.ARMOUR_SLOTS).setRegistryName(Wizardry.MODID, "magic_protection"));
|
||||
event.getRegistry().register(new EnchantmentMagicProtection(Enchantment.Rarity.RARE, EnchantmentMagicProtection.Type.FROST, WizardryUtilities.ARMOUR_SLOTS).setRegistryName(Wizardry.MODID, "frost_protection"));
|
||||
event.getRegistry().register(new EnchantmentMagicProtection(Enchantment.Rarity.RARE, EnchantmentMagicProtection.Type.SHOCK, WizardryUtilities.ARMOUR_SLOTS).setRegistryName(Wizardry.MODID, "shock_protection"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,190 @@
|
||||
package electroblob.wizardry.registry;
|
||||
|
||||
import electroblob.wizardry.Wizardry;
|
||||
import electroblob.wizardry.entity.EntityLevitatingBlock;
|
||||
import electroblob.wizardry.entity.EntityMeteor;
|
||||
import electroblob.wizardry.entity.EntityShield;
|
||||
import electroblob.wizardry.entity.construct.*;
|
||||
import electroblob.wizardry.entity.living.*;
|
||||
import electroblob.wizardry.entity.projectile.*;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EnumCreatureType;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.common.BiomeDictionary;
|
||||
import net.minecraftforge.event.RegistryEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.registry.EntityEntry;
|
||||
import net.minecraftforge.fml.common.registry.EntityEntryBuilder;
|
||||
import net.minecraftforge.fml.common.registry.ForgeRegistries;
|
||||
import net.minecraftforge.registries.IForgeRegistry;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Class responsible for registering all of wizardry's entities and their spawning conditions.
|
||||
*
|
||||
* @author Electroblob
|
||||
* @since Wizardry 4.2
|
||||
*/
|
||||
@Mod.EventBusSubscriber
|
||||
public class WizardryEntities {
|
||||
|
||||
private WizardryEntities(){} // No instances!
|
||||
|
||||
/** Most entity trackers fall into one of a few categories, so they are defined here for convenience. This
|
||||
* generally follows the values used in vanilla for each entity type. */
|
||||
enum TrackingType {
|
||||
|
||||
LIVING(80, 3, true),
|
||||
PROJECTILE(64, 10, true),
|
||||
CONSTRUCT(160, 10, false);
|
||||
|
||||
int range;
|
||||
int interval;
|
||||
boolean trackVelocity;
|
||||
|
||||
TrackingType(int range, int interval, boolean trackVelocity){
|
||||
this.range = range;
|
||||
this.interval = interval;
|
||||
this.trackVelocity = trackVelocity;
|
||||
}
|
||||
}
|
||||
|
||||
/** Incrementing index for the mod-specific entity network ID. */
|
||||
private static int id = 0;
|
||||
|
||||
@SubscribeEvent
|
||||
public static void register(RegistryEvent.Register<EntityEntry> event){
|
||||
|
||||
IForgeRegistry<EntityEntry> registry = event.getRegistry();
|
||||
|
||||
// Vanilla summoned creatures
|
||||
registry.register(createEntry(EntityZombieMinion.class, "zombie_minion", TrackingType.LIVING).build());
|
||||
registry.register(createEntry(EntityHuskMinion.class, "husk_minion", TrackingType.LIVING).build());
|
||||
registry.register(createEntry(EntitySkeletonMinion.class, "skeleton_minion", TrackingType.LIVING).build());
|
||||
registry.register(createEntry(EntityStrayMinion.class, "stray_minion", TrackingType.LIVING).build());
|
||||
registry.register(createEntry(EntitySpiderMinion.class, "spider_minion", TrackingType.LIVING).build());
|
||||
registry.register(createEntry(EntityBlazeMinion.class, "blaze_minion", TrackingType.LIVING).build());
|
||||
registry.register(createEntry(EntityWitherSkeletonMinion.class, "wither_skeleton_minion", TrackingType.LIVING).build());
|
||||
registry.register(createEntry(EntitySilverfishMinion.class, "silverfish_minion", TrackingType.LIVING).build());
|
||||
registry.register(createEntry(EntityVexMinion.class, "vex_minion", TrackingType.LIVING).build());
|
||||
|
||||
// Custom summoned creatures
|
||||
registry.register(createEntry(EntityIceWraith.class, "ice_wraith", TrackingType.LIVING).egg(0xaafaff, 0x001ce1)
|
||||
.spawn(EnumCreatureType.MONSTER, Wizardry.settings.iceWraithSpawnRate, 1, 1, ForgeRegistries.BIOMES.getValuesCollection().stream()
|
||||
.filter(b -> !Arrays.asList(Wizardry.settings.mobSpawnBiomeBlacklist).contains(b.getRegistryName())
|
||||
&& BiomeDictionary.hasType(b, BiomeDictionary.Type.SNOWY)
|
||||
&& !BiomeDictionary.hasType(b, BiomeDictionary.Type.FOREST))
|
||||
.collect(Collectors.toSet())).build());
|
||||
|
||||
registry.register(createEntry(EntityLightningWraith.class, "lightning_wraith", TrackingType.LIVING).egg(0x35424b, 0x27b9d9)
|
||||
.spawn(EnumCreatureType.MONSTER, Wizardry.settings.lightningWraithSpawnRate, 1, 1, ForgeRegistries.BIOMES.getValuesCollection().stream()
|
||||
.filter(b -> !Arrays.asList(Wizardry.settings.mobSpawnBiomeBlacklist).contains(b.getRegistryName()))
|
||||
.collect(Collectors.toSet())).build());
|
||||
|
||||
registry.register(createEntry(EntitySpiritWolf.class, "spirit_wolf", TrackingType.LIVING).egg(0xbcc2e8, 0x5464c6).build());
|
||||
registry.register(createEntry(EntitySpiritHorse.class, "spirit_horse", TrackingType.LIVING).egg(0x5464c6, 0xbcc2e8).build());
|
||||
registry.register(createEntry(EntityPhoenix.class, "phoenix", TrackingType.LIVING).egg(0xff4900, 0xfde535).build());
|
||||
registry.register(createEntry(EntityIceGiant.class, "ice_giant", TrackingType.LIVING).egg(0x5bacd9, 0xeffaff).build());
|
||||
|
||||
registry.register(createEntry(EntityMagicSlime.class, "magic_slime", TrackingType.LIVING).build());
|
||||
registry.register(createEntry(EntityDecoy.class, "decoy", TrackingType.LIVING).build());
|
||||
|
||||
// These two are only made of particles, so we can afford a lower update frequency
|
||||
registry.register(createEntry(EntityShadowWraith.class, "shadow_wraith") .tracker(80, 10, true).egg(0x11071c, 0x421384).build());
|
||||
registry.register(createEntry(EntityStormElemental.class, "storm_elemental") .tracker(80, 10, true).egg(0x162128, 0x135279).build());
|
||||
|
||||
// Other living entities
|
||||
registry.register(createEntry(EntityWizard.class, "wizard", TrackingType.LIVING).egg(0x19295e, 0xee9312).build());
|
||||
registry.register(createEntry(EntityEvilWizard.class, "evil_wizard", TrackingType.LIVING).egg(0x290404, 0xee9312)
|
||||
// For reference: 5, 1, 1 are the parameters for the witch in vanilla
|
||||
.spawn(EnumCreatureType.MONSTER, Wizardry.settings.evilWizardSpawnRate, 1, 1, ForgeRegistries.BIOMES.getValuesCollection().stream()
|
||||
.filter(b -> !Arrays.asList(Wizardry.settings.mobSpawnBiomeBlacklist).contains(b.getRegistryName()))
|
||||
.collect(Collectors.toSet())).build());
|
||||
|
||||
// Directed projectiles
|
||||
registry.register(createEntry(EntityMagicMissile.class, "magic_missile", TrackingType.PROJECTILE).build());
|
||||
registry.register(createEntry(EntityIceShard.class, "ice_shard", TrackingType.PROJECTILE).build());
|
||||
registry.register(createEntry(EntityLightningArrow.class, "lightning_arrow", TrackingType.PROJECTILE).build());
|
||||
registry.register(createEntry(EntityForceArrow.class, "force_arrow", TrackingType.PROJECTILE).build());
|
||||
registry.register(createEntry(EntityDart.class, "dart", TrackingType.PROJECTILE).build());
|
||||
registry.register(createEntry(EntityIceLance.class, "ice_lance", TrackingType.PROJECTILE).build());
|
||||
|
||||
// Directionless projectiles
|
||||
registry.register(createEntry(EntityFirebomb.class, "firebomb", TrackingType.PROJECTILE).build());
|
||||
registry.register(createEntry(EntityPoisonBomb.class, "poison_bomb", TrackingType.PROJECTILE).build());
|
||||
registry.register(createEntry(EntitySparkBomb.class, "spark_bomb", TrackingType.PROJECTILE).build());
|
||||
registry.register(createEntry(EntitySmokeBomb.class, "smoke_bomb", TrackingType.PROJECTILE).build());
|
||||
registry.register(createEntry(EntityIceCharge.class, "ice_charge", TrackingType.PROJECTILE).build());
|
||||
registry.register(createEntry(EntityForceOrb.class, "force_orb", TrackingType.PROJECTILE).build());
|
||||
registry.register(createEntry(EntitySpark.class, "spark", TrackingType.PROJECTILE).build());
|
||||
registry.register(createEntry(EntityDarknessOrb.class, "darkness_orb", TrackingType.PROJECTILE).build());
|
||||
registry.register(createEntry(EntityFirebolt.class, "firebolt", TrackingType.PROJECTILE).build());
|
||||
registry.register(createEntry(EntityThunderbolt.class, "thunderbolt", TrackingType.PROJECTILE).build());
|
||||
registry.register(createEntry(EntityLightningDisc.class, "lightning_disc", TrackingType.PROJECTILE).build());
|
||||
registry.register(createEntry(EntityEmber.class, "ember", TrackingType.PROJECTILE).build());
|
||||
registry.register(createEntry(EntityMagicFireball.class, "magic_fireball", TrackingType.PROJECTILE).build());
|
||||
registry.register(createEntry(EntityLargeMagicFireball.class, "large_magic_fireball", TrackingType.PROJECTILE).build());
|
||||
registry.register(createEntry(EntityIceball.class, "iceball", TrackingType.PROJECTILE).build());
|
||||
|
||||
// These are effectively projectiles, but since they're bigger and start high up they need updating from further away
|
||||
registry.register(createEntry(EntityMeteor.class, "meteor") .tracker(160, 3, true).build());
|
||||
registry.register(createEntry(EntityHammer.class, "lightning_hammer") .tracker(160, 3, true).build());
|
||||
registry.register(createEntry(EntityLevitatingBlock.class, "levitating_block") .tracker(160, 3, true).build());
|
||||
|
||||
// Constructs
|
||||
registry.register(createEntry(EntityBlackHole.class, "black_hole", TrackingType.CONSTRUCT).build());
|
||||
registry.register(createEntry(EntityBlizzard.class, "blizzard", TrackingType.CONSTRUCT).build());
|
||||
registry.register(createEntry(EntityForcefield.class, "forcefield", TrackingType.CONSTRUCT).build());
|
||||
registry.register(createEntry(EntityFireSigil.class, "fire_sigil", TrackingType.CONSTRUCT).build());
|
||||
registry.register(createEntry(EntityFrostSigil.class, "frost_sigil", TrackingType.CONSTRUCT).build());
|
||||
registry.register(createEntry(EntityLightningSigil.class, "lightning_sigil", TrackingType.CONSTRUCT).build());
|
||||
registry.register(createEntry(EntityCombustionRune.class, "combustion_rune", TrackingType.CONSTRUCT).build());
|
||||
registry.register(createEntry(EntityFireRing.class, "ring_of_fire", TrackingType.CONSTRUCT).build());
|
||||
registry.register(createEntry(EntityHealAura.class, "healing_aura", TrackingType.CONSTRUCT).build());
|
||||
registry.register(createEntry(EntityDecay.class, "decay", TrackingType.CONSTRUCT).build());
|
||||
|
||||
// These ones don't render, currently that makes no difference here but we might as well separate them
|
||||
registry.register(createEntry(EntityArrowRain.class, "arrow_rain", TrackingType.CONSTRUCT).build());
|
||||
registry.register(createEntry(EntityEarthquake.class, "earthquake", TrackingType.CONSTRUCT).build());
|
||||
registry.register(createEntry(EntityHailstorm.class, "hailstorm", TrackingType.CONSTRUCT).build());
|
||||
|
||||
// These ones move, velocity updates are sent if that's not at constant velocity
|
||||
registry.register(createEntry(EntityShield.class, "shield") .tracker(160, 10, true).build());
|
||||
registry.register(createEntry(EntityBubble.class, "bubble") .tracker(160, 3, false).build());
|
||||
registry.register(createEntry(EntityTornado.class, "tornado") .tracker(160, 3, false).build());
|
||||
registry.register(createEntry(EntityIceSpike.class, "ice_spike") .tracker(160, 1, true).build());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Private helper method that simplifies the parts of an {@link EntityEntry} that are common to all entities.
|
||||
* This automatically assigns a network id, and accepts a {@link TrackingType} for automatic tracker assignment.
|
||||
* @param entityClass The entity class to use.
|
||||
* @param name The name of the entity. This will form the path of a {@code ResourceLocation} with domain
|
||||
* {@code ebwizardry}, which in turn will be used as both the registry name and the 'command' name.
|
||||
* @param tracking The {@link TrackingType} to use for this entity.
|
||||
* @param <T> The type of entity.
|
||||
* @return The (part-built) builder instance, allowing other builder methods to be added as necessary.
|
||||
*/
|
||||
private static <T extends Entity> EntityEntryBuilder<T> createEntry(Class<T> entityClass, String name, TrackingType tracking){
|
||||
return createEntry(entityClass, name).tracker(tracking.range, tracking.interval, tracking.trackVelocity);
|
||||
}
|
||||
|
||||
/**
|
||||
* Private helper method that simplifies the parts of an {@link EntityEntry} that are common to all entities.
|
||||
* This automatically assigns a network id.
|
||||
* @param entityClass The entity class to use.
|
||||
* @param name The name of the entity. This will form the path of a {@code ResourceLocation} with domain
|
||||
* {@code ebwizardry}, which in turn will be used as both the registry name and the 'command' name.
|
||||
* @param <T> The type of entity.
|
||||
* @return The (part-built) builder instance, allowing other builder methods to be added as necessary.
|
||||
*/
|
||||
private static <T extends Entity> EntityEntryBuilder<T> createEntry(Class<T> entityClass, String name){
|
||||
ResourceLocation registryName = new ResourceLocation(Wizardry.MODID, name);
|
||||
return EntityEntryBuilder.<T>create().entity(entityClass).id(registryName, id++).name(registryName.toString());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,47 +1,42 @@
|
||||
package electroblob.wizardry.registry;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang3.tuple.ImmutablePair;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
|
||||
import electroblob.wizardry.Wizardry;
|
||||
import electroblob.wizardry.constants.Element;
|
||||
import electroblob.wizardry.constants.Tier;
|
||||
import electroblob.wizardry.item.ItemArcaneTome;
|
||||
import electroblob.wizardry.item.ItemArmourUpgrade;
|
||||
import electroblob.wizardry.item.ItemBlankScroll;
|
||||
import electroblob.wizardry.item.ItemFirebomb;
|
||||
import electroblob.wizardry.item.ItemFlamingAxe;
|
||||
import electroblob.wizardry.item.ItemFrostAxe;
|
||||
import electroblob.wizardry.item.ItemIdentificationScroll;
|
||||
import electroblob.wizardry.item.ItemPoisonBomb;
|
||||
import electroblob.wizardry.item.ItemScroll;
|
||||
import electroblob.wizardry.item.ItemSmokeBomb;
|
||||
import electroblob.wizardry.item.ItemSpectralArmour;
|
||||
import electroblob.wizardry.item.ItemSpectralBow;
|
||||
import electroblob.wizardry.item.ItemSpectralPickaxe;
|
||||
import electroblob.wizardry.item.ItemSpectralSword;
|
||||
import electroblob.wizardry.item.ItemSpellBook;
|
||||
import electroblob.wizardry.item.ItemWand;
|
||||
import electroblob.wizardry.item.ItemWizardArmour;
|
||||
import electroblob.wizardry.item.ItemWizardHandbook;
|
||||
import electroblob.wizardry.entity.projectile.EntityFirebomb;
|
||||
import electroblob.wizardry.entity.projectile.EntityPoisonBomb;
|
||||
import electroblob.wizardry.entity.projectile.EntitySmokeBomb;
|
||||
import electroblob.wizardry.entity.projectile.EntitySparkBomb;
|
||||
import electroblob.wizardry.item.*;
|
||||
import electroblob.wizardry.misc.BehaviourSpellDispense;
|
||||
import electroblob.wizardry.registry.WizardryTabs.CreativeTabListed;
|
||||
import electroblob.wizardry.registry.WizardryTabs.CreativeTabSorted;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.SoundEvents;
|
||||
import net.minecraft.block.BlockDispenser;
|
||||
import net.minecraft.dispenser.BehaviorProjectileDispense;
|
||||
import net.minecraft.dispenser.IPosition;
|
||||
import net.minecraft.entity.IProjectile;
|
||||
import net.minecraft.inventory.EntityEquipmentSlot;
|
||||
import net.minecraft.inventory.EntityEquipmentSlot.Type;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.Item.ToolMaterial;
|
||||
import net.minecraft.item.ItemArmor.ArmorMaterial;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.EnumHelper;
|
||||
import net.minecraftforge.event.RegistryEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry.ObjectHolder;
|
||||
import net.minecraftforge.registries.IForgeRegistry;
|
||||
import org.apache.commons.lang3.tuple.ImmutablePair;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Class responsible for defining, storing and registering all of wizardry's items. Also registers the ItemBlocks for
|
||||
@@ -53,7 +48,9 @@ import net.minecraftforge.registries.IForgeRegistry;
|
||||
@ObjectHolder(Wizardry.MODID)
|
||||
@Mod.EventBusSubscriber
|
||||
public final class WizardryItems {
|
||||
|
||||
|
||||
private WizardryItems(){} // No instances!
|
||||
|
||||
/** Keeping the material fields in here means {@code @ObjectHolder} ignores them. In actual fact, I could have just
|
||||
* made them private since wizardry only uses them within this class, but in case someone needs them elsewhere I've
|
||||
* used this trick instead to keep them public. */
|
||||
@@ -62,223 +59,228 @@ public final class WizardryItems {
|
||||
public static final ToolMaterial MAGICAL = EnumHelper.addToolMaterial("MAGICAL", 3, 1000, 8.0f, 4.0f, 0);
|
||||
|
||||
public static final ArmorMaterial SILK = EnumHelper.addArmorMaterial("SILK", "wizardry/textures/armour/wizard_armour",
|
||||
15, new int[]{0, 0, 0, 0}, 0, WizardrySounds.ITEM_ARMOUR_EQUIP_SILK, 0.0F);
|
||||
15, new int[]{0, 0, 0, 0}, 15, WizardrySounds.ITEM_ARMOUR_EQUIP_SILK, 0.0F);
|
||||
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@SuppressWarnings("ConstantConditions")
|
||||
private static <T> T placeholder(){ return null; }
|
||||
|
||||
// This is the most concise way I can think of to register the items. Really, I'd prefer it if there was only one
|
||||
// point where all the items were listed, but that's not possible within the current system unless you use an array,
|
||||
// which means you lose the individual fields...
|
||||
|
||||
public static final Item magic_crystal = null;
|
||||
public static final Item magic_crystal = placeholder();
|
||||
|
||||
public static final Item magic_wand = null;
|
||||
public static final Item apprentice_wand = null;
|
||||
public static final Item advanced_wand = null;
|
||||
public static final Item master_wand = null;
|
||||
public static final Item grand_crystal = placeholder();
|
||||
public static final Item crystal_shard = placeholder();
|
||||
|
||||
public static final Item arcane_tome = null;
|
||||
public static final Item wizard_handbook = null;
|
||||
public static final Item spell_book = null;
|
||||
public static final Item wizard_handbook = placeholder();
|
||||
public static final Item arcane_tome = placeholder();
|
||||
public static final Item spell_book = placeholder();
|
||||
public static final Item scroll = placeholder();
|
||||
|
||||
public static final Item basic_fire_wand = null;
|
||||
public static final Item basic_ice_wand = null;
|
||||
public static final Item basic_lightning_wand = null;
|
||||
public static final Item basic_necromancy_wand = null;
|
||||
public static final Item basic_earth_wand = null;
|
||||
public static final Item basic_sorcery_wand = null;
|
||||
public static final Item basic_healing_wand = null;
|
||||
public static final Item magic_wand = placeholder();
|
||||
public static final Item apprentice_wand = placeholder();
|
||||
public static final Item advanced_wand = placeholder();
|
||||
public static final Item master_wand = placeholder();
|
||||
|
||||
public static final Item apprentice_fire_wand = null;
|
||||
public static final Item apprentice_ice_wand = null;
|
||||
public static final Item apprentice_lightning_wand = null;
|
||||
public static final Item apprentice_necromancy_wand = null;
|
||||
public static final Item apprentice_earth_wand = null;
|
||||
public static final Item apprentice_sorcery_wand = null;
|
||||
public static final Item apprentice_healing_wand = null;
|
||||
public static final Item novice_fire_wand = placeholder();
|
||||
public static final Item novice_ice_wand = placeholder();
|
||||
public static final Item novice_lightning_wand = placeholder();
|
||||
public static final Item novice_necromancy_wand = placeholder();
|
||||
public static final Item novice_earth_wand = placeholder();
|
||||
public static final Item novice_sorcery_wand = placeholder();
|
||||
public static final Item novice_healing_wand = placeholder();
|
||||
|
||||
public static final Item advanced_fire_wand = null;
|
||||
public static final Item advanced_ice_wand = null;
|
||||
public static final Item advanced_lightning_wand = null;
|
||||
public static final Item advanced_necromancy_wand = null;
|
||||
public static final Item advanced_earth_wand = null;
|
||||
public static final Item advanced_sorcery_wand = null;
|
||||
public static final Item advanced_healing_wand = null;
|
||||
public static final Item apprentice_fire_wand = placeholder();
|
||||
public static final Item apprentice_ice_wand = placeholder();
|
||||
public static final Item apprentice_lightning_wand = placeholder();
|
||||
public static final Item apprentice_necromancy_wand = placeholder();
|
||||
public static final Item apprentice_earth_wand = placeholder();
|
||||
public static final Item apprentice_sorcery_wand = placeholder();
|
||||
public static final Item apprentice_healing_wand = placeholder();
|
||||
|
||||
public static final Item master_fire_wand = null;
|
||||
public static final Item master_ice_wand = null;
|
||||
public static final Item master_lightning_wand = null;
|
||||
public static final Item master_necromancy_wand = null;
|
||||
public static final Item master_earth_wand = null;
|
||||
public static final Item master_sorcery_wand = null;
|
||||
public static final Item master_healing_wand = null;
|
||||
public static final Item advanced_fire_wand = placeholder();
|
||||
public static final Item advanced_ice_wand = placeholder();
|
||||
public static final Item advanced_lightning_wand = placeholder();
|
||||
public static final Item advanced_necromancy_wand = placeholder();
|
||||
public static final Item advanced_earth_wand = placeholder();
|
||||
public static final Item advanced_sorcery_wand = placeholder();
|
||||
public static final Item advanced_healing_wand = placeholder();
|
||||
|
||||
public static final Item spectral_sword = null;
|
||||
public static final Item spectral_pickaxe = null;
|
||||
public static final Item spectral_bow = null;
|
||||
public static final Item master_fire_wand = placeholder();
|
||||
public static final Item master_ice_wand = placeholder();
|
||||
public static final Item master_lightning_wand = placeholder();
|
||||
public static final Item master_necromancy_wand = placeholder();
|
||||
public static final Item master_earth_wand = placeholder();
|
||||
public static final Item master_sorcery_wand = placeholder();
|
||||
public static final Item master_healing_wand = placeholder();
|
||||
|
||||
public static final Item medium_mana_flask = null;
|
||||
public static final Item spectral_sword = placeholder();
|
||||
public static final Item spectral_pickaxe = placeholder();
|
||||
public static final Item spectral_bow = placeholder();
|
||||
|
||||
public static final Item storage_upgrade = null;
|
||||
public static final Item siphon_upgrade = null;
|
||||
public static final Item condenser_upgrade = null;
|
||||
public static final Item range_upgrade = null;
|
||||
public static final Item duration_upgrade = null;
|
||||
public static final Item cooldown_upgrade = null;
|
||||
public static final Item blast_upgrade = null;
|
||||
public static final Item attunement_upgrade = null;
|
||||
public static final Item blank_scroll = placeholder();
|
||||
public static final Item magic_silk = placeholder();
|
||||
|
||||
public static final Item magic_silk = null;
|
||||
public static final Item small_mana_flask = placeholder();
|
||||
public static final Item medium_mana_flask = placeholder();
|
||||
public static final Item large_mana_flask = placeholder();
|
||||
|
||||
public static final Item flaming_axe = null;
|
||||
public static final Item frost_axe = null;
|
||||
public static final Item storage_upgrade = placeholder();
|
||||
public static final Item siphon_upgrade = placeholder();
|
||||
public static final Item condenser_upgrade = placeholder();
|
||||
public static final Item range_upgrade = placeholder();
|
||||
public static final Item duration_upgrade = placeholder();
|
||||
public static final Item cooldown_upgrade = placeholder();
|
||||
public static final Item blast_upgrade = placeholder();
|
||||
public static final Item attunement_upgrade = placeholder();
|
||||
public static final Item melee_upgrade = placeholder();
|
||||
|
||||
public static final Item firebomb = null;
|
||||
public static final Item poison_bomb = null;
|
||||
public static final Item flaming_axe = placeholder();
|
||||
public static final Item frost_axe = placeholder();
|
||||
|
||||
public static final Item blank_scroll = null;
|
||||
public static final Item scroll = null;
|
||||
|
||||
public static final Item armour_upgrade = null;
|
||||
|
||||
public static final Item wizard_hat = null;
|
||||
public static final Item wizard_robe = null;
|
||||
public static final Item wizard_leggings = null;
|
||||
public static final Item wizard_boots = null;
|
||||
public static final Item identification_scroll = placeholder();
|
||||
public static final Item armour_upgrade = placeholder();
|
||||
public static final Item astral_diamond = placeholder();
|
||||
public static final Item purifying_elixir = placeholder();
|
||||
|
||||
public static final Item wizard_hat_fire = null;
|
||||
public static final Item wizard_robe_fire = null;
|
||||
public static final Item wizard_leggings_fire = null;
|
||||
public static final Item wizard_boots_fire = null;
|
||||
public static final Item firebomb = placeholder();
|
||||
public static final Item poison_bomb = placeholder();
|
||||
public static final Item smoke_bomb = placeholder();
|
||||
public static final Item spark_bomb = placeholder();
|
||||
|
||||
public static final Item wizard_hat_ice = null;
|
||||
public static final Item wizard_robe_ice = null;
|
||||
public static final Item wizard_leggings_ice = null;
|
||||
public static final Item wizard_boots_ice = null;
|
||||
public static final Item wizard_hat = placeholder();
|
||||
public static final Item wizard_robe = placeholder();
|
||||
public static final Item wizard_leggings = placeholder();
|
||||
public static final Item wizard_boots = placeholder();
|
||||
|
||||
public static final Item wizard_hat_lightning = null;
|
||||
public static final Item wizard_robe_lightning = null;
|
||||
public static final Item wizard_leggings_lightning = null;
|
||||
public static final Item wizard_boots_lightning = null;
|
||||
public static final Item wizard_hat_fire = placeholder();
|
||||
public static final Item wizard_robe_fire = placeholder();
|
||||
public static final Item wizard_leggings_fire = placeholder();
|
||||
public static final Item wizard_boots_fire = placeholder();
|
||||
|
||||
public static final Item wizard_hat_necromancy = null;
|
||||
public static final Item wizard_robe_necromancy = null;
|
||||
public static final Item wizard_leggings_necromancy = null;
|
||||
public static final Item wizard_boots_necromancy = null;
|
||||
public static final Item wizard_hat_ice = placeholder();
|
||||
public static final Item wizard_robe_ice = placeholder();
|
||||
public static final Item wizard_leggings_ice = placeholder();
|
||||
public static final Item wizard_boots_ice = placeholder();
|
||||
|
||||
public static final Item wizard_hat_earth = null;
|
||||
public static final Item wizard_robe_earth = null;
|
||||
public static final Item wizard_leggings_earth = null;
|
||||
public static final Item wizard_boots_earth = null;
|
||||
public static final Item wizard_hat_lightning = placeholder();
|
||||
public static final Item wizard_robe_lightning = placeholder();
|
||||
public static final Item wizard_leggings_lightning = placeholder();
|
||||
public static final Item wizard_boots_lightning = placeholder();
|
||||
|
||||
public static final Item wizard_hat_sorcery = null;
|
||||
public static final Item wizard_robe_sorcery = null;
|
||||
public static final Item wizard_leggings_sorcery = null;
|
||||
public static final Item wizard_boots_sorcery = null;
|
||||
public static final Item wizard_hat_necromancy = placeholder();
|
||||
public static final Item wizard_robe_necromancy = placeholder();
|
||||
public static final Item wizard_leggings_necromancy = placeholder();
|
||||
public static final Item wizard_boots_necromancy = placeholder();
|
||||
|
||||
public static final Item wizard_hat_healing = null;
|
||||
public static final Item wizard_robe_healing = null;
|
||||
public static final Item wizard_leggings_healing = null;
|
||||
public static final Item wizard_boots_healing = null;
|
||||
public static final Item wizard_hat_earth = placeholder();
|
||||
public static final Item wizard_robe_earth = placeholder();
|
||||
public static final Item wizard_leggings_earth = placeholder();
|
||||
public static final Item wizard_boots_earth = placeholder();
|
||||
|
||||
public static final Item spectral_helmet = null;
|
||||
public static final Item spectral_chestplate = null;
|
||||
public static final Item spectral_leggings = null;
|
||||
public static final Item spectral_boots = null;
|
||||
|
||||
public static final Item smoke_bomb = null;
|
||||
public static final Item wizard_hat_sorcery = placeholder();
|
||||
public static final Item wizard_robe_sorcery = placeholder();
|
||||
public static final Item wizard_leggings_sorcery = placeholder();
|
||||
public static final Item wizard_boots_sorcery = placeholder();
|
||||
|
||||
public static final Item identification_scroll = null;
|
||||
public static final Item wizard_hat_healing = placeholder();
|
||||
public static final Item wizard_robe_healing = placeholder();
|
||||
public static final Item wizard_leggings_healing = placeholder();
|
||||
public static final Item wizard_boots_healing = placeholder();
|
||||
|
||||
public static final Item spectral_helmet = placeholder();
|
||||
public static final Item spectral_chestplate = placeholder();
|
||||
public static final Item spectral_leggings = placeholder();
|
||||
public static final Item spectral_boots = placeholder();
|
||||
|
||||
public static final Item lightning_hammer = placeholder();
|
||||
|
||||
public static final Item ring_condensing = placeholder();
|
||||
public static final Item ring_siphoning = placeholder();
|
||||
public static final Item ring_battlemage = placeholder();
|
||||
public static final Item ring_combustion = placeholder();
|
||||
public static final Item ring_fire_melee = placeholder();
|
||||
public static final Item ring_fire_biome = placeholder();
|
||||
public static final Item ring_disintegration = placeholder();
|
||||
public static final Item ring_ice_melee = placeholder();
|
||||
public static final Item ring_ice_biome = placeholder();
|
||||
public static final Item ring_arcane_frost = placeholder();
|
||||
public static final Item ring_shattering = placeholder();
|
||||
public static final Item ring_lightning_melee = placeholder();
|
||||
public static final Item ring_storm = placeholder();
|
||||
public static final Item ring_seeking = placeholder();
|
||||
public static final Item ring_hammer = placeholder();
|
||||
public static final Item ring_soulbinding = placeholder();
|
||||
public static final Item ring_leeching = placeholder();
|
||||
public static final Item ring_necromancy_melee = placeholder();
|
||||
public static final Item ring_mind_control = placeholder();
|
||||
public static final Item ring_poison = placeholder();
|
||||
public static final Item ring_earth_melee = placeholder();
|
||||
public static final Item ring_earth_biome = placeholder();
|
||||
public static final Item ring_full_moon = placeholder();
|
||||
public static final Item ring_extraction = placeholder();
|
||||
public static final Item ring_mana_return = placeholder();
|
||||
public static final Item ring_blockwrangler = placeholder();
|
||||
public static final Item ring_conjurer = placeholder();
|
||||
public static final Item ring_defender = placeholder();
|
||||
public static final Item ring_paladin = placeholder();
|
||||
public static final Item ring_interdiction = placeholder();
|
||||
|
||||
public static final Item amulet_arcane_defence = placeholder();
|
||||
public static final Item amulet_warding = placeholder();
|
||||
public static final Item amulet_wisdom = placeholder();
|
||||
public static final Item amulet_fire_protection = placeholder();
|
||||
public static final Item amulet_fire_cloaking = placeholder();
|
||||
public static final Item amulet_ice_immunity = placeholder();
|
||||
public static final Item amulet_ice_protection = placeholder();
|
||||
public static final Item amulet_potential = placeholder();
|
||||
public static final Item amulet_channeling = placeholder();
|
||||
public static final Item amulet_lich = placeholder();
|
||||
public static final Item amulet_wither_immunity = placeholder();
|
||||
public static final Item amulet_glide = placeholder();
|
||||
public static final Item amulet_banishing = placeholder();
|
||||
public static final Item amulet_anchoring = placeholder();
|
||||
public static final Item amulet_recovery = placeholder();
|
||||
public static final Item amulet_transience = placeholder();
|
||||
public static final Item amulet_resurrection = placeholder();
|
||||
public static final Item amulet_auto_shield = placeholder();
|
||||
|
||||
public static final Item charm_haggler = placeholder();
|
||||
public static final Item charm_experience_tome = placeholder();
|
||||
public static final Item charm_auto_smelt = placeholder();
|
||||
public static final Item charm_lava_walking = placeholder();
|
||||
public static final Item charm_storm = placeholder();
|
||||
public static final Item charm_minion_health = placeholder();
|
||||
public static final Item charm_minion_variants = placeholder();
|
||||
public static final Item charm_flight = placeholder();
|
||||
public static final Item charm_growth = placeholder();
|
||||
public static final Item charm_abseiling = placeholder();
|
||||
public static final Item charm_silk_touch = placeholder();
|
||||
public static final Item charm_stop_time = placeholder();
|
||||
public static final Item charm_light = placeholder();
|
||||
public static final Item charm_transportation = placeholder();
|
||||
public static final Item charm_feeding = placeholder();
|
||||
|
||||
private static final Map<Pair<Tier, Element>, Item> WAND_MAP = new HashMap<>();
|
||||
private static final Map<Pair<EntityEquipmentSlot, Element>, Item> ARMOUR_MAP = new HashMap<>();
|
||||
|
||||
static {
|
||||
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.BASIC, Element.MAGIC), magic_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.BASIC, Element.FIRE), basic_fire_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.BASIC, Element.ICE), basic_ice_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.BASIC, Element.LIGHTNING), basic_lightning_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.BASIC, Element.NECROMANCY), basic_necromancy_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.BASIC, Element.EARTH), basic_earth_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.BASIC, Element.SORCERY), basic_sorcery_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.BASIC, Element.HEALING), basic_healing_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.APPRENTICE, Element.MAGIC), apprentice_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.APPRENTICE, Element.FIRE), apprentice_fire_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.APPRENTICE, Element.ICE), apprentice_ice_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.APPRENTICE, Element.LIGHTNING), apprentice_lightning_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.APPRENTICE, Element.NECROMANCY), apprentice_necromancy_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.APPRENTICE, Element.EARTH), apprentice_earth_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.APPRENTICE, Element.SORCERY), apprentice_sorcery_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.APPRENTICE, Element.HEALING), apprentice_healing_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.ADVANCED, Element.MAGIC), advanced_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.ADVANCED, Element.FIRE), advanced_fire_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.ADVANCED, Element.ICE), advanced_ice_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.ADVANCED, Element.LIGHTNING), advanced_lightning_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.ADVANCED, Element.NECROMANCY), advanced_necromancy_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.ADVANCED, Element.EARTH), advanced_earth_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.ADVANCED, Element.SORCERY), advanced_sorcery_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.ADVANCED, Element.HEALING), advanced_healing_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.MASTER, Element.MAGIC), master_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.MASTER, Element.FIRE), master_fire_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.MASTER, Element.ICE), master_ice_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.MASTER, Element.LIGHTNING), master_lightning_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.MASTER, Element.NECROMANCY), master_necromancy_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.MASTER, Element.EARTH), master_earth_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.MASTER, Element.SORCERY), master_sorcery_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.MASTER, Element.HEALING), master_healing_wand);
|
||||
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.HEAD, Element.MAGIC), wizard_hat);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.HEAD, Element.FIRE), wizard_hat_fire);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.HEAD, Element.ICE), wizard_hat_ice);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.HEAD, Element.LIGHTNING), wizard_hat_lightning);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.HEAD, Element.NECROMANCY), wizard_hat_necromancy);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.HEAD, Element.EARTH), wizard_hat_earth);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.HEAD, Element.SORCERY), wizard_hat_sorcery);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.HEAD, Element.HEALING), wizard_hat_healing);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.CHEST, Element.MAGIC), wizard_robe);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.CHEST, Element.FIRE), wizard_robe_fire);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.CHEST, Element.ICE), wizard_robe_ice);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.CHEST, Element.LIGHTNING), wizard_robe_lightning);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.CHEST, Element.NECROMANCY), wizard_robe_necromancy);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.CHEST, Element.EARTH), wizard_robe_earth);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.CHEST, Element.SORCERY), wizard_robe_sorcery);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.CHEST, Element.HEALING), wizard_robe_healing);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.LEGS, Element.MAGIC), wizard_leggings);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.LEGS, Element.FIRE), wizard_leggings_fire);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.LEGS, Element.ICE), wizard_leggings_ice);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.LEGS, Element.LIGHTNING), wizard_leggings_lightning);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.LEGS, Element.NECROMANCY), wizard_leggings_necromancy);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.LEGS, Element.EARTH), wizard_leggings_earth);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.LEGS, Element.SORCERY), wizard_leggings_sorcery);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.LEGS, Element.HEALING), wizard_leggings_healing);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.FEET, Element.MAGIC), wizard_boots);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.FEET, Element.FIRE), wizard_boots_fire);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.FEET, Element.ICE), wizard_boots_ice);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.FEET, Element.LIGHTNING), wizard_boots_lightning);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.FEET, Element.NECROMANCY), wizard_boots_necromancy);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.FEET, Element.EARTH), wizard_boots_earth);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.FEET, Element.SORCERY), wizard_boots_sorcery);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.FEET, Element.HEALING), wizard_boots_healing);
|
||||
}
|
||||
|
||||
// TODO: These methods need a rethink. What are we trying to achieve with them? Should each use case look in the
|
||||
// same pool of items? For example, might we (or someone else) want to have a wand which can generate in chests, but
|
||||
// is not used by wizards?
|
||||
|
||||
// I reckon this should be strictly for cases where we only ever want the standard wand set, i.e. wizards' gear,
|
||||
// etc.
|
||||
|
||||
/**
|
||||
* Helper method to return the appropriate wand based on tier and element. As of Wizardry 2.1, this uses the
|
||||
* immutable map stored in {@link WizardryItems#WAND_MAP}. Currently used for upgrading wands, for chest generation
|
||||
* and to iterate through wands for charging recipes.
|
||||
*
|
||||
*
|
||||
* @param tier The tier of the wand required.
|
||||
* @param element The element of the wand required. Null will be converted to {@link Element#MAGIC}.
|
||||
* @return The wand item which corresponds to the given element and slot, or null if no such item exists.
|
||||
* @return The wand item which corresponds to the given tier and element, or null if no such item exists.
|
||||
* @throws NullPointerException if the given tier is null.
|
||||
* @deprecated This is being phased out; it is now only used for wizard gear and trades. To add an item to
|
||||
* charging recipes, use {@link WizardryRecipes#addToManaFlaskCharging(Item)}.
|
||||
*/
|
||||
@Deprecated
|
||||
public static Item getWand(Tier tier, Element element){
|
||||
if(tier == null) throw new NullPointerException("The given tier cannot be null.");
|
||||
if(element == null) element = Element.MAGIC;
|
||||
@@ -289,26 +291,29 @@ public final class WizardryItems {
|
||||
* Helper method to return the appropriate armour item based on element and slot. As of Wizardry 2.1, this uses the
|
||||
* immutable map stored in {@link WizardryItems#ARMOUR_MAP}. Currently used to iterate through armour for
|
||||
* registering charging recipes and for chest generation.
|
||||
*
|
||||
*
|
||||
* @param element The EnumElement of the armour required. Null will be converted to {@link Element#MAGIC}.
|
||||
* @param slot EntityEquipmentSlot of the armour piece required
|
||||
* @return The armour item which corresponds to the given element and slot, or null if no such item exists.
|
||||
* @throws IllegalArgumentException if the given slot is not an armour slot.
|
||||
* @deprecated This is being phased out; it is now only used for wizard gear and trades. To add an item to
|
||||
* charging recipes, use {@link WizardryRecipes#addToManaFlaskCharging(Item)}.
|
||||
*/
|
||||
@Deprecated
|
||||
public static Item getArmour(Element element, EntityEquipmentSlot slot){
|
||||
if(slot == null || slot.getSlotType() != Type.ARMOR)
|
||||
throw new IllegalArgumentException("Must be a valid armour slot");
|
||||
if(element == null) element = Element.MAGIC;
|
||||
return ARMOUR_MAP.get(ImmutablePair.of(slot, element));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets both the registry and unlocalised names of the given item, then registers it with the given registry. Use
|
||||
* this instead of {@link Item#setRegistryName(String)} and {@link Item#setUnlocalizedName(String)} during
|
||||
* this instead of {@link Item#setRegistryName(String)} and {@link Item#setTranslationKey(String)} during
|
||||
* construction, for convenience and consistency. As of wizardry 4.2, this also automatically adds it to the order
|
||||
* list for its creative tab if that tab is a {@link CreativeTabListed}, meaning the order can be defined simply
|
||||
* by the order in which the items are registered in this class.
|
||||
*
|
||||
*
|
||||
* @param registry The registry to register the given item to.
|
||||
* @param name The name of the item, without the mod ID or the .name stuff. The registry name will be
|
||||
* {@code ebwizardry:[name]}. The unlocalised name will be {@code item.ebwizardry:[name].name}.
|
||||
@@ -321,11 +326,11 @@ public final class WizardryItems {
|
||||
|
||||
/**
|
||||
* Sets both the registry and unlocalised names of the given item, then registers it with the given registry. Use
|
||||
* this instead of {@link Item#setRegistryName(String)} and {@link Item#setUnlocalizedName(String)} during
|
||||
* this instead of {@link Item#setRegistryName(String)} and {@link Item#setTranslationKey(String)} during
|
||||
* construction, for convenience and consistency. As of wizardry 4.2, this also automatically adds it to the order
|
||||
* list for its creative tab if that tab is a {@link CreativeTabListed}, meaning the order can be defined simply
|
||||
* by the order in which the items are registered in this class.
|
||||
*
|
||||
*
|
||||
* @param registry The registry to register the given item to.
|
||||
* @param name The name of the item, without the mod ID or the .name stuff. The registry name will be
|
||||
* {@code ebwizardry:[name]}. The unlocalised name will be {@code item.ebwizardry:[name].name}.
|
||||
@@ -334,6 +339,7 @@ public final class WizardryItems {
|
||||
*/
|
||||
// It now makes sense to have the name first, since it's shorter than an entire item declaration.
|
||||
public static void registerItem(IForgeRegistry<Item> registry, String name, Item item, boolean setTabIcon){
|
||||
|
||||
item.setRegistryName(Wizardry.MODID, name);
|
||||
item.setTranslationKey(item.getRegistryName().toString());
|
||||
registry.register(item);
|
||||
@@ -341,7 +347,7 @@ public final class WizardryItems {
|
||||
if(setTabIcon && item.getCreativeTab() instanceof CreativeTabSorted){
|
||||
((CreativeTabSorted)item.getCreativeTab()).setIconItem(new ItemStack(item));
|
||||
}
|
||||
|
||||
|
||||
if(item.getCreativeTab() instanceof CreativeTabListed){
|
||||
((CreativeTabListed)item.getCreativeTab()).order.add(item);
|
||||
}
|
||||
@@ -354,15 +360,26 @@ public final class WizardryItems {
|
||||
// We don't need to keep a reference to the ItemBlock
|
||||
Item itemblock = new ItemBlock(block).setRegistryName(block.getRegistryName());
|
||||
registry.register(itemblock);
|
||||
|
||||
if(block.getCreativeTabToDisplayOn() instanceof CreativeTabListed){
|
||||
((CreativeTabListed)block.getCreativeTabToDisplayOn()).order.add(itemblock);
|
||||
|
||||
if(block.getCreativeTab() instanceof CreativeTabListed){
|
||||
((CreativeTabListed)block.getCreativeTab()).order.add(itemblock);
|
||||
}
|
||||
}
|
||||
|
||||
private static void registerMultiTexturedItemBlock(IForgeRegistry<Item> registry, Block block, boolean separateNames){
|
||||
// We don't need to keep a reference to the ItemBlock
|
||||
Item itemblock = new ItemBlockMultiTexturedElemental(block, separateNames).setRegistryName(block.getRegistryName());
|
||||
registry.register(itemblock);
|
||||
|
||||
if(block.getCreativeTab() instanceof CreativeTabListed){
|
||||
((CreativeTabListed)block.getCreativeTab()).order.add(itemblock);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@SubscribeEvent
|
||||
public static void register(RegistryEvent.Register<Item> event){
|
||||
|
||||
IForgeRegistry<Item> registry = event.getRegistry();
|
||||
|
||||
// ItemBlocks
|
||||
@@ -372,52 +389,58 @@ public final class WizardryItems {
|
||||
registerItemBlock(registry, WizardryBlocks.crystal_ore);
|
||||
registerItemBlock(registry, WizardryBlocks.crystal_flower);
|
||||
registerItemBlock(registry, WizardryBlocks.transportation_stone);
|
||||
registerItemBlock(registry, WizardryBlocks.crystal_block);
|
||||
registerMultiTexturedItemBlock(registry, WizardryBlocks.crystal_block, true);
|
||||
registerMultiTexturedItemBlock(registry, WizardryBlocks.runestone, false);
|
||||
registerMultiTexturedItemBlock(registry, WizardryBlocks.runestone_pedestal, false);
|
||||
|
||||
// Items
|
||||
|
||||
|
||||
registerItem(registry, "magic_crystal", new ItemCrystal());
|
||||
|
||||
registerItem(registry, "magic_wand", new ItemWand(Tier.BASIC, null));
|
||||
registerItem(registry, "crystal_shard", new Item().setCreativeTab(WizardryTabs.WIZARDRY));
|
||||
registerItem(registry, "grand_crystal", new Item().setCreativeTab(WizardryTabs.WIZARDRY));
|
||||
|
||||
registerItem(registry, "wizard_handbook", new ItemWizardHandbook(), true);
|
||||
registerItem(registry, "arcane_tome", new ItemArcaneTome());
|
||||
registerItem(registry, "spell_book", new ItemSpellBook(), true);
|
||||
registerItem(registry, "scroll", new ItemScroll());
|
||||
|
||||
registerItem(registry, "magic_wand", new ItemWand(Tier.NOVICE, null));
|
||||
registerItem(registry, "apprentice_wand", new ItemWand(Tier.APPRENTICE, null));
|
||||
registerItem(registry, "advanced_wand", new ItemWand(Tier.ADVANCED, null));
|
||||
registerItem(registry, "master_wand", new ItemWand(Tier.MASTER, null));
|
||||
|
||||
registerItem(registry, "arcane_tome", new ItemArcaneTome());
|
||||
registerItem(registry, "wizard_handbook", new ItemWizardHandbook(), true);
|
||||
registerItem(registry, "spell_book", new ItemSpellBook(), true);
|
||||
|
||||
registerItem(registry, "basic_fire_wand", new ItemWand(Tier.BASIC, Element.FIRE));
|
||||
registerItem(registry, "novice_fire_wand", new ItemWand(Tier.NOVICE, Element.FIRE));
|
||||
registerItem(registry, "apprentice_fire_wand", new ItemWand(Tier.APPRENTICE, Element.FIRE));
|
||||
registerItem(registry, "advanced_fire_wand", new ItemWand(Tier.ADVANCED, Element.FIRE));
|
||||
registerItem(registry, "master_fire_wand", new ItemWand(Tier.MASTER, Element.FIRE));
|
||||
|
||||
registerItem(registry, "basic_ice_wand", new ItemWand(Tier.BASIC, Element.ICE));
|
||||
|
||||
registerItem(registry, "novice_ice_wand", new ItemWand(Tier.NOVICE, Element.ICE));
|
||||
registerItem(registry, "apprentice_ice_wand", new ItemWand(Tier.APPRENTICE, Element.ICE));
|
||||
registerItem(registry, "advanced_ice_wand", new ItemWand(Tier.ADVANCED, Element.ICE));
|
||||
registerItem(registry, "master_ice_wand", new ItemWand(Tier.MASTER, Element.ICE));
|
||||
|
||||
registerItem(registry, "basic_lightning_wand", new ItemWand(Tier.BASIC, Element.LIGHTNING));
|
||||
|
||||
registerItem(registry, "novice_lightning_wand", new ItemWand(Tier.NOVICE, Element.LIGHTNING));
|
||||
registerItem(registry, "apprentice_lightning_wand", new ItemWand(Tier.APPRENTICE, Element.LIGHTNING));
|
||||
registerItem(registry, "advanced_lightning_wand", new ItemWand(Tier.ADVANCED, Element.LIGHTNING));
|
||||
registerItem(registry, "master_lightning_wand", new ItemWand(Tier.MASTER, Element.LIGHTNING));
|
||||
|
||||
registerItem(registry, "basic_necromancy_wand", new ItemWand(Tier.BASIC, Element.NECROMANCY));
|
||||
|
||||
registerItem(registry, "novice_necromancy_wand", new ItemWand(Tier.NOVICE, Element.NECROMANCY));
|
||||
registerItem(registry, "apprentice_necromancy_wand", new ItemWand(Tier.APPRENTICE, Element.NECROMANCY));
|
||||
registerItem(registry, "advanced_necromancy_wand", new ItemWand(Tier.ADVANCED, Element.NECROMANCY));
|
||||
registerItem(registry, "master_necromancy_wand", new ItemWand(Tier.MASTER, Element.NECROMANCY));
|
||||
|
||||
registerItem(registry, "basic_earth_wand", new ItemWand(Tier.BASIC, Element.EARTH));
|
||||
|
||||
registerItem(registry, "novice_earth_wand", new ItemWand(Tier.NOVICE, Element.EARTH));
|
||||
registerItem(registry, "apprentice_earth_wand", new ItemWand(Tier.APPRENTICE, Element.EARTH));
|
||||
registerItem(registry, "advanced_earth_wand", new ItemWand(Tier.ADVANCED, Element.EARTH));
|
||||
registerItem(registry, "master_earth_wand", new ItemWand(Tier.MASTER, Element.EARTH));
|
||||
|
||||
registerItem(registry, "basic_sorcery_wand", new ItemWand(Tier.BASIC, Element.SORCERY));
|
||||
|
||||
registerItem(registry, "novice_sorcery_wand", new ItemWand(Tier.NOVICE, Element.SORCERY));
|
||||
registerItem(registry, "apprentice_sorcery_wand", new ItemWand(Tier.APPRENTICE, Element.SORCERY));
|
||||
registerItem(registry, "advanced_sorcery_wand", new ItemWand(Tier.ADVANCED, Element.SORCERY));
|
||||
registerItem(registry, "master_sorcery_wand", new ItemWand(Tier.MASTER, Element.SORCERY));
|
||||
|
||||
registerItem(registry, "basic_healing_wand", new ItemWand(Tier.BASIC, Element.HEALING));
|
||||
|
||||
registerItem(registry, "novice_healing_wand", new ItemWand(Tier.NOVICE, Element.HEALING));
|
||||
registerItem(registry, "apprentice_healing_wand", new ItemWand(Tier.APPRENTICE, Element.HEALING));
|
||||
registerItem(registry, "advanced_healing_wand", new ItemWand(Tier.ADVANCED, Element.HEALING));
|
||||
registerItem(registry, "master_healing_wand", new ItemWand(Tier.MASTER, Element.HEALING));
|
||||
@@ -426,31 +449,35 @@ public final class WizardryItems {
|
||||
registerItem(registry, "spectral_pickaxe", new ItemSpectralPickaxe(ToolMaterial.IRON));
|
||||
registerItem(registry, "spectral_bow", new ItemSpectralBow());
|
||||
|
||||
registerItem(registry, "medium_mana_flask", new Item().setCreativeTab(WizardryTabs.WIZARDRY));
|
||||
|
||||
registerItem(registry, "storage_upgrade", new Item().setCreativeTab(WizardryTabs.WIZARDRY));
|
||||
registerItem(registry, "siphon_upgrade", new Item().setCreativeTab(WizardryTabs.WIZARDRY));
|
||||
registerItem(registry, "condenser_upgrade", new Item().setCreativeTab(WizardryTabs.WIZARDRY));
|
||||
registerItem(registry, "range_upgrade", new Item().setCreativeTab(WizardryTabs.WIZARDRY));
|
||||
registerItem(registry, "duration_upgrade", new Item().setCreativeTab(WizardryTabs.WIZARDRY));
|
||||
registerItem(registry, "cooldown_upgrade", new Item().setCreativeTab(WizardryTabs.WIZARDRY));
|
||||
registerItem(registry, "blast_upgrade", new Item().setCreativeTab(WizardryTabs.WIZARDRY));
|
||||
registerItem(registry, "attunement_upgrade", new Item().setCreativeTab(WizardryTabs.WIZARDRY));
|
||||
|
||||
registerItem(registry, "blank_scroll", new ItemBlankScroll());
|
||||
registerItem(registry, "magic_silk", new Item().setCreativeTab(WizardryTabs.WIZARDRY));
|
||||
|
||||
registerItem(registry, "small_mana_flask", new ItemManaFlask(ItemManaFlask.Size.SMALL));
|
||||
registerItem(registry, "medium_mana_flask", new ItemManaFlask(ItemManaFlask.Size.MEDIUM));
|
||||
registerItem(registry, "large_mana_flask", new ItemManaFlask(ItemManaFlask.Size.LARGE));
|
||||
|
||||
registerItem(registry, "storage_upgrade", new ItemWandUpgrade());
|
||||
registerItem(registry, "siphon_upgrade", new ItemWandUpgrade());
|
||||
registerItem(registry, "condenser_upgrade", new ItemWandUpgrade());
|
||||
registerItem(registry, "range_upgrade", new ItemWandUpgrade());
|
||||
registerItem(registry, "duration_upgrade", new ItemWandUpgrade());
|
||||
registerItem(registry, "cooldown_upgrade", new ItemWandUpgrade());
|
||||
registerItem(registry, "blast_upgrade", new ItemWandUpgrade());
|
||||
registerItem(registry, "attunement_upgrade", new ItemWandUpgrade());
|
||||
registerItem(registry, "melee_upgrade", new ItemWandUpgrade());
|
||||
|
||||
registerItem(registry, "flaming_axe", new ItemFlamingAxe(Materials.MAGICAL));
|
||||
registerItem(registry, "frost_axe", new ItemFrostAxe(Materials.MAGICAL));
|
||||
|
||||
registerItem(registry, "identification_scroll", new ItemIdentificationScroll());
|
||||
registerItem(registry, "armour_upgrade", new ItemArmourUpgrade());
|
||||
registerItem(registry, "astral_diamond", new Item(){ @Override public EnumRarity getRarity(ItemStack stack){ return EnumRarity.RARE; }}.setCreativeTab(WizardryTabs.WIZARDRY));
|
||||
registerItem(registry, "purifying_elixir", new ItemPurifyingElixir());
|
||||
|
||||
registerItem(registry, "firebomb", new ItemFirebomb());
|
||||
registerItem(registry, "poison_bomb", new ItemPoisonBomb());
|
||||
|
||||
registerItem(registry, "blank_scroll", new ItemBlankScroll());
|
||||
registerItem(registry, "scroll", new ItemScroll());
|
||||
|
||||
// The only way to get these is in dungeon chests (They are legendary, after all. Wizards don't just have them.
|
||||
// Also if they were sold you could buy four from the same wizard - and that's no fun at all!)
|
||||
registerItem(registry, "armour_upgrade", new ItemArmourUpgrade());
|
||||
registerItem(registry, "smoke_bomb", new ItemSmokeBomb());
|
||||
registerItem(registry, "spark_bomb", new ItemSparkBomb());
|
||||
|
||||
registerItem(registry, "wizard_hat", new ItemWizardArmour(Materials.SILK, 1, EntityEquipmentSlot.HEAD, null), true);
|
||||
registerItem(registry, "wizard_robe", new ItemWizardArmour(Materials.SILK, 1, EntityEquipmentSlot.CHEST, null));
|
||||
@@ -496,13 +523,198 @@ public final class WizardryItems {
|
||||
registerItem(registry, "spectral_chestplate", new ItemSpectralArmour(ArmorMaterial.IRON, 1, EntityEquipmentSlot.CHEST));
|
||||
registerItem(registry, "spectral_leggings", new ItemSpectralArmour(ArmorMaterial.IRON, 1, EntityEquipmentSlot.LEGS));
|
||||
registerItem(registry, "spectral_boots", new ItemSpectralArmour(ArmorMaterial.IRON, 1, EntityEquipmentSlot.FEET));
|
||||
|
||||
registerItem(registry, "smoke_bomb", new ItemSmokeBomb());
|
||||
|
||||
registerItem(registry, "identification_scroll", new ItemIdentificationScroll());
|
||||
|
||||
registerItem(registry, "test_artefact", new ItemArtefact(EnumRarity.UNCOMMON));
|
||||
registerItem(registry, "lightning_hammer", new ItemLightningHammer());
|
||||
|
||||
registerItem(registry, "ring_condensing", new ItemArtefact(EnumRarity.RARE, ItemArtefact.Type.RING));
|
||||
registerItem(registry, "ring_siphoning", new ItemArtefact(EnumRarity.UNCOMMON, ItemArtefact.Type.RING));
|
||||
registerItem(registry, "ring_battlemage", new ItemArtefact(EnumRarity.UNCOMMON, ItemArtefact.Type.RING));
|
||||
registerItem(registry, "ring_combustion", new ItemArtefact(EnumRarity.EPIC, ItemArtefact.Type.RING));
|
||||
registerItem(registry, "ring_fire_melee", new ItemArtefact(EnumRarity.UNCOMMON, ItemArtefact.Type.RING));
|
||||
registerItem(registry, "ring_fire_biome", new ItemArtefact(EnumRarity.UNCOMMON, ItemArtefact.Type.RING));
|
||||
registerItem(registry, "ring_disintegration", new ItemArtefact(EnumRarity.RARE, ItemArtefact.Type.RING));
|
||||
registerItem(registry, "ring_ice_melee", new ItemArtefact(EnumRarity.UNCOMMON, ItemArtefact.Type.RING));
|
||||
registerItem(registry, "ring_ice_biome", new ItemArtefact(EnumRarity.UNCOMMON, ItemArtefact.Type.RING));
|
||||
registerItem(registry, "ring_arcane_frost", new ItemArtefact(EnumRarity.EPIC, ItemArtefact.Type.RING));
|
||||
registerItem(registry, "ring_shattering", new ItemArtefact(EnumRarity.RARE, ItemArtefact.Type.RING));
|
||||
registerItem(registry, "ring_lightning_melee", new ItemArtefact(EnumRarity.UNCOMMON, ItemArtefact.Type.RING));
|
||||
registerItem(registry, "ring_storm", new ItemArtefact(EnumRarity.RARE, ItemArtefact.Type.RING));
|
||||
registerItem(registry, "ring_seeking", new ItemArtefact(EnumRarity.EPIC, ItemArtefact.Type.RING));
|
||||
registerItem(registry, "ring_hammer", new ItemArtefact(EnumRarity.EPIC, ItemArtefact.Type.RING));
|
||||
registerItem(registry, "ring_soulbinding", new ItemArtefact(EnumRarity.EPIC, ItemArtefact.Type.RING));
|
||||
registerItem(registry, "ring_leeching", new ItemArtefact(EnumRarity.RARE, ItemArtefact.Type.RING));
|
||||
registerItem(registry, "ring_necromancy_melee", new ItemArtefact(EnumRarity.UNCOMMON, ItemArtefact.Type.RING));
|
||||
registerItem(registry, "ring_mind_control", new ItemArtefact(EnumRarity.RARE, ItemArtefact.Type.RING));
|
||||
registerItem(registry, "ring_poison", new ItemArtefact(EnumRarity.RARE, ItemArtefact.Type.RING));
|
||||
registerItem(registry, "ring_earth_melee", new ItemArtefact(EnumRarity.UNCOMMON, ItemArtefact.Type.RING));
|
||||
registerItem(registry, "ring_earth_biome", new ItemArtefact(EnumRarity.UNCOMMON, ItemArtefact.Type.RING));
|
||||
registerItem(registry, "ring_full_moon", new ItemArtefact(EnumRarity.RARE, ItemArtefact.Type.RING));
|
||||
registerItem(registry, "ring_extraction", new ItemArtefact(EnumRarity.UNCOMMON, ItemArtefact.Type.RING));
|
||||
registerItem(registry, "ring_mana_return", new ItemArtefact(EnumRarity.EPIC, ItemArtefact.Type.RING));
|
||||
registerItem(registry, "ring_blockwrangler", new ItemArtefact(EnumRarity.RARE, ItemArtefact.Type.RING));
|
||||
registerItem(registry, "ring_conjurer", new ItemArtefact(EnumRarity.RARE, ItemArtefact.Type.RING));
|
||||
registerItem(registry, "ring_defender", new ItemArtefact(EnumRarity.RARE, ItemArtefact.Type.RING));
|
||||
registerItem(registry, "ring_paladin", new ItemArtefact(EnumRarity.UNCOMMON, ItemArtefact.Type.RING));
|
||||
registerItem(registry, "ring_interdiction", new ItemArtefact(EnumRarity.EPIC, ItemArtefact.Type.RING));
|
||||
|
||||
registerItem(registry, "amulet_arcane_defence", new ItemArtefact(EnumRarity.RARE, ItemArtefact.Type.AMULET));
|
||||
registerItem(registry, "amulet_warding", new ItemArtefact(EnumRarity.UNCOMMON, ItemArtefact.Type.AMULET));
|
||||
registerItem(registry, "amulet_wisdom", new ItemArtefact(EnumRarity.RARE, ItemArtefact.Type.AMULET));
|
||||
registerItem(registry, "amulet_fire_protection", new ItemArtefact(EnumRarity.UNCOMMON, ItemArtefact.Type.AMULET));
|
||||
registerItem(registry, "amulet_fire_cloaking", new ItemArtefact(EnumRarity.RARE, ItemArtefact.Type.AMULET));
|
||||
registerItem(registry, "amulet_ice_immunity", new ItemArtefact(EnumRarity.EPIC, ItemArtefact.Type.AMULET));
|
||||
registerItem(registry, "amulet_ice_protection", new ItemArtefact(EnumRarity.UNCOMMON, ItemArtefact.Type.AMULET));
|
||||
registerItem(registry, "amulet_potential", new ItemArtefact(EnumRarity.RARE, ItemArtefact.Type.AMULET));
|
||||
registerItem(registry, "amulet_channeling", new ItemArtefact(EnumRarity.UNCOMMON, ItemArtefact.Type.AMULET));
|
||||
registerItem(registry, "amulet_lich", new ItemArtefact(EnumRarity.UNCOMMON, ItemArtefact.Type.AMULET));
|
||||
registerItem(registry, "amulet_wither_immunity", new ItemArtefact(EnumRarity.EPIC, ItemArtefact.Type.AMULET));
|
||||
registerItem(registry, "amulet_glide", new ItemArtefact(EnumRarity.EPIC, ItemArtefact.Type.AMULET));
|
||||
registerItem(registry, "amulet_banishing", new ItemArtefact(EnumRarity.UNCOMMON, ItemArtefact.Type.AMULET));
|
||||
registerItem(registry, "amulet_anchoring", new ItemArtefact(EnumRarity.RARE, ItemArtefact.Type.AMULET));
|
||||
registerItem(registry, "amulet_recovery", new ItemArtefact(EnumRarity.UNCOMMON, ItemArtefact.Type.AMULET));
|
||||
registerItem(registry, "amulet_transience", new ItemArtefact(EnumRarity.RARE, ItemArtefact.Type.AMULET));
|
||||
registerItem(registry, "amulet_resurrection", new ItemArtefact(EnumRarity.EPIC, ItemArtefact.Type.AMULET));
|
||||
registerItem(registry, "amulet_auto_shield", new ItemArtefact(EnumRarity.RARE, ItemArtefact.Type.AMULET));
|
||||
|
||||
registerItem(registry, "charm_haggler", new ItemArtefact(EnumRarity.RARE, ItemArtefact.Type.CHARM));
|
||||
registerItem(registry, "charm_experience_tome", new ItemArtefact(EnumRarity.EPIC, ItemArtefact.Type.CHARM));
|
||||
registerItem(registry, "charm_auto_smelt", new ItemArtefact(EnumRarity.RARE, ItemArtefact.Type.CHARM));
|
||||
registerItem(registry, "charm_lava_walking", new ItemArtefact(EnumRarity.EPIC, ItemArtefact.Type.CHARM));
|
||||
registerItem(registry, "charm_storm", new ItemArtefact(EnumRarity.RARE, ItemArtefact.Type.CHARM));
|
||||
registerItem(registry, "charm_minion_health", new ItemArtefact(EnumRarity.UNCOMMON, ItemArtefact.Type.CHARM));
|
||||
registerItem(registry, "charm_minion_variants", new ItemArtefact(EnumRarity.RARE, ItemArtefact.Type.CHARM));
|
||||
registerItem(registry, "charm_flight", new ItemArtefact(EnumRarity.RARE, ItemArtefact.Type.CHARM));
|
||||
registerItem(registry, "charm_growth", new ItemArtefact(EnumRarity.UNCOMMON, ItemArtefact.Type.CHARM));
|
||||
registerItem(registry, "charm_abseiling", new ItemArtefact(EnumRarity.RARE, ItemArtefact.Type.CHARM));
|
||||
registerItem(registry, "charm_silk_touch", new ItemArtefact(EnumRarity.EPIC, ItemArtefact.Type.CHARM));
|
||||
registerItem(registry, "charm_stop_time", new ItemArtefact(EnumRarity.EPIC, ItemArtefact.Type.CHARM));
|
||||
registerItem(registry, "charm_light", new ItemArtefact(EnumRarity.RARE, ItemArtefact.Type.CHARM));
|
||||
registerItem(registry, "charm_transportation", new ItemArtefact(EnumRarity.RARE, ItemArtefact.Type.CHARM));
|
||||
registerItem(registry, "charm_feeding", new ItemArtefact(EnumRarity.UNCOMMON, ItemArtefact.Type.CHARM));
|
||||
|
||||
}
|
||||
|
||||
/** Called from init() in the main mod class to register wizardry's dispenser behaviours. */
|
||||
public static void registerDispenseBehaviours(){
|
||||
|
||||
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(firebomb, new BehaviorProjectileDispense(){
|
||||
|
||||
@Override
|
||||
protected IProjectile getProjectileEntity(World world, IPosition position, ItemStack stack){
|
||||
EntityFirebomb entity = new EntityFirebomb(world);
|
||||
entity.setPosition(position.getX(), position.getY(), position.getZ());
|
||||
return entity;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(poison_bomb, new BehaviorProjectileDispense(){
|
||||
|
||||
@Override
|
||||
protected IProjectile getProjectileEntity(World world, IPosition position, ItemStack stack){
|
||||
EntityPoisonBomb entity = new EntityPoisonBomb(world);
|
||||
entity.setPosition(position.getX(), position.getY(), position.getZ());
|
||||
return entity;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(smoke_bomb, new BehaviorProjectileDispense(){
|
||||
|
||||
@Override
|
||||
protected IProjectile getProjectileEntity(World world, IPosition position, ItemStack stack){
|
||||
EntitySmokeBomb entity = new EntitySmokeBomb(world);
|
||||
entity.setPosition(position.getX(), position.getY(), position.getZ());
|
||||
return entity;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(spark_bomb, new BehaviorProjectileDispense(){
|
||||
|
||||
@Override
|
||||
protected IProjectile getProjectileEntity(World world, IPosition position, ItemStack stack){
|
||||
EntitySparkBomb entity = new EntitySparkBomb(world);
|
||||
entity.setPosition(position.getX(), position.getY(), position.getZ());
|
||||
return entity;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(scroll, new BehaviourSpellDispense());
|
||||
|
||||
}
|
||||
|
||||
public static void populateWandMap(){
|
||||
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.NOVICE, Element.MAGIC), magic_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.NOVICE, Element.FIRE), novice_fire_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.NOVICE, Element.ICE), novice_ice_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.NOVICE, Element.LIGHTNING), novice_lightning_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.NOVICE, Element.NECROMANCY), novice_necromancy_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.NOVICE, Element.EARTH), novice_earth_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.NOVICE, Element.SORCERY), novice_sorcery_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.NOVICE, Element.HEALING), novice_healing_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.APPRENTICE, Element.MAGIC), apprentice_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.APPRENTICE, Element.FIRE), apprentice_fire_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.APPRENTICE, Element.ICE), apprentice_ice_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.APPRENTICE, Element.LIGHTNING), apprentice_lightning_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.APPRENTICE, Element.NECROMANCY), apprentice_necromancy_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.APPRENTICE, Element.EARTH), apprentice_earth_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.APPRENTICE, Element.SORCERY), apprentice_sorcery_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.APPRENTICE, Element.HEALING), apprentice_healing_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.ADVANCED, Element.MAGIC), advanced_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.ADVANCED, Element.FIRE), advanced_fire_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.ADVANCED, Element.ICE), advanced_ice_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.ADVANCED, Element.LIGHTNING), advanced_lightning_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.ADVANCED, Element.NECROMANCY), advanced_necromancy_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.ADVANCED, Element.EARTH), advanced_earth_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.ADVANCED, Element.SORCERY), advanced_sorcery_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.ADVANCED, Element.HEALING), advanced_healing_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.MASTER, Element.MAGIC), master_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.MASTER, Element.FIRE), master_fire_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.MASTER, Element.ICE), master_ice_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.MASTER, Element.LIGHTNING), master_lightning_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.MASTER, Element.NECROMANCY), master_necromancy_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.MASTER, Element.EARTH), master_earth_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.MASTER, Element.SORCERY), master_sorcery_wand);
|
||||
WAND_MAP.put(ImmutablePair.of(Tier.MASTER, Element.HEALING), master_healing_wand);
|
||||
}
|
||||
|
||||
public static void populateArmourMap(){
|
||||
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.HEAD, Element.MAGIC), wizard_hat);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.HEAD, Element.FIRE), wizard_hat_fire);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.HEAD, Element.ICE), wizard_hat_ice);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.HEAD, Element.LIGHTNING), wizard_hat_lightning);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.HEAD, Element.NECROMANCY), wizard_hat_necromancy);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.HEAD, Element.EARTH), wizard_hat_earth);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.HEAD, Element.SORCERY), wizard_hat_sorcery);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.HEAD, Element.HEALING), wizard_hat_healing);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.CHEST, Element.MAGIC), wizard_robe);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.CHEST, Element.FIRE), wizard_robe_fire);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.CHEST, Element.ICE), wizard_robe_ice);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.CHEST, Element.LIGHTNING), wizard_robe_lightning);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.CHEST, Element.NECROMANCY), wizard_robe_necromancy);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.CHEST, Element.EARTH), wizard_robe_earth);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.CHEST, Element.SORCERY), wizard_robe_sorcery);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.CHEST, Element.HEALING), wizard_robe_healing);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.LEGS, Element.MAGIC), wizard_leggings);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.LEGS, Element.FIRE), wizard_leggings_fire);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.LEGS, Element.ICE), wizard_leggings_ice);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.LEGS, Element.LIGHTNING), wizard_leggings_lightning);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.LEGS, Element.NECROMANCY), wizard_leggings_necromancy);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.LEGS, Element.EARTH), wizard_leggings_earth);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.LEGS, Element.SORCERY), wizard_leggings_sorcery);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.LEGS, Element.HEALING), wizard_leggings_healing);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.FEET, Element.MAGIC), wizard_boots);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.FEET, Element.FIRE), wizard_boots_fire);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.FEET, Element.ICE), wizard_boots_ice);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.FEET, Element.LIGHTNING), wizard_boots_lightning);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.FEET, Element.NECROMANCY), wizard_boots_necromancy);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.FEET, Element.EARTH), wizard_boots_earth);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.FEET, Element.SORCERY), wizard_boots_sorcery);
|
||||
ARMOUR_MAP.put(ImmutablePair.of(EntityEquipmentSlot.FEET, Element.HEALING), wizard_boots_healing);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
package electroblob.wizardry.registry;
|
||||
|
||||
import electroblob.wizardry.Wizardry;
|
||||
import electroblob.wizardry.constants.Tier;
|
||||
import electroblob.wizardry.loot.RandomSpell;
|
||||
import electroblob.wizardry.loot.WizardSpell;
|
||||
import electroblob.wizardry.spell.Spell;
|
||||
import net.minecraft.entity.EntityList;
|
||||
import net.minecraft.entity.EnumCreatureType;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.storage.loot.*;
|
||||
import net.minecraft.world.storage.loot.conditions.LootCondition;
|
||||
import net.minecraft.world.storage.loot.functions.LootFunctionManager;
|
||||
import net.minecraftforge.event.LootTableLoadEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.registry.EntityEntry;
|
||||
import net.minecraftforge.fml.common.registry.ForgeRegistries;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
/**
|
||||
* Class responsible for registering wizardry's loot functions and loot tables. Also handles loot injection and the
|
||||
* standard weighting.
|
||||
*
|
||||
* @author Electroblob
|
||||
* @since Wizardry 1.0
|
||||
*/
|
||||
@Mod.EventBusSubscriber
|
||||
public final class WizardryLoot {
|
||||
|
||||
//public static final String FROM_SPAWNER_NBT_FLAG = "fromSpawner";
|
||||
|
||||
private WizardryLoot(){} // No instances!
|
||||
|
||||
/** Called from the preInit method in the main mod class to register the custom dungeon loot. */
|
||||
public static void register(){
|
||||
|
||||
/* Loot tables work as follows: Minecraft goes through each pool in turn. For each pool, it does a certain
|
||||
* number of rolls, which can either be set to always be one number or a random number from a range. Each roll,
|
||||
* it generates one stack of a single random entry in that pool, weighted according to the weights of the
|
||||
* entries. Functions allow properties of that stack (stack size, damage, nbt) to be set, and even allow it to
|
||||
* be replaced dynamically with a completely different item (though there's very little point in doing that as
|
||||
* it could be achieved just as easily with more entries, which makes me think it would be bad practice). You
|
||||
* can also use conditions to control whether an entry or pool is used at all, which is mostly for mob drops
|
||||
* under specific conditions, but one of them is simply a random chance, meaning you could use it to make a pool
|
||||
* that only gets rolled sometimes. All in all, this can get rather confusing, because stackable items can have
|
||||
* 5 stages of randomness applied to them at once: a random chance for the pool, a random number of rolls for
|
||||
* the pool, the weighted random chance of choosing that particular entry, a random chance for that entry, and a
|
||||
* random stack size, and that's before you take functions into account.
|
||||
*
|
||||
* ...oh, and entries can be entire loot tables in themselves, allowing for potentially infinite levels of
|
||||
* randomness. Yeah. */
|
||||
|
||||
// Always registers the loot tables, but only injects the additions into vanilla if the appropriate option is
|
||||
// enabled in the config (see WizardryEventHandler).
|
||||
LootFunctionManager.registerFunction(new RandomSpell.Serializer());
|
||||
LootFunctionManager.registerFunction(new WizardSpell.Serializer());
|
||||
LootTableList.register(new ResourceLocation(Wizardry.MODID, "chests/wizard_tower"));
|
||||
LootTableList.register(new ResourceLocation(Wizardry.MODID, "chests/obelisk"));
|
||||
LootTableList.register(new ResourceLocation(Wizardry.MODID, "chests/shrine"));
|
||||
LootTableList.register(new ResourceLocation(Wizardry.MODID, "chests/dungeon_additions"));
|
||||
LootTableList.register(new ResourceLocation(Wizardry.MODID, "chests/jungle_dispenser_additions"));
|
||||
LootTableList.register(new ResourceLocation(Wizardry.MODID, "subsets/elemental_crystals"));
|
||||
LootTableList.register(new ResourceLocation(Wizardry.MODID, "subsets/wizard_armour"));
|
||||
LootTableList.register(new ResourceLocation(Wizardry.MODID, "subsets/arcane_tomes"));
|
||||
LootTableList.register(new ResourceLocation(Wizardry.MODID, "subsets/wand_upgrades"));
|
||||
LootTableList.register(new ResourceLocation(Wizardry.MODID, "entities/evil_wizard"));
|
||||
LootTableList.register(new ResourceLocation(Wizardry.MODID, "entities/mob_additions"));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method which gets a spell id according to the standard weighting. The tier is a weighted random value; the
|
||||
* actual spell within that tier is completely random. Will not return the id of a spell which has been disabled in
|
||||
* the config. This is for simple stuff like chests and drops; more complex generators like wizard trades don't use
|
||||
* this method.
|
||||
* <p></p>
|
||||
* For reference, the standard weighting is as follows: Novice: 60%, Apprentice: 25%, Advanced: 10%, Master: 5%
|
||||
*
|
||||
* @param random An instance of {@link Random} to use for RNG
|
||||
* @param filter A {@link Predicate} specifying any requirements the chosen spell must fulfil
|
||||
* @return A random spell id number, or -1 if no spell exists that satisfies the given filter
|
||||
* @deprecated Everything uses loot tables now, I may remove this as some point
|
||||
*/
|
||||
@Deprecated
|
||||
public static int getStandardWeightedRandomSpellId(Random random, Predicate<Spell> filter){
|
||||
|
||||
Tier tier = Tier.getWeightedRandomTier(random);
|
||||
|
||||
List<Spell> spells = Spell.getSpells(new Spell.TierElementFilter(tier, null));
|
||||
spells.removeIf(filter.negate());
|
||||
|
||||
// Ensures the tier chosen actually has spells in it, and if not uses NOVICE instead.
|
||||
if(spells.isEmpty()){
|
||||
spells = Spell.getSpells(new Spell.TierElementFilter(Tier.NOVICE, null));
|
||||
spells.removeIf(filter.negate());
|
||||
}
|
||||
|
||||
if(spells.isEmpty()) return -1;
|
||||
|
||||
// Finds a random spell in the list and returns its id.
|
||||
return spells.get(random.nextInt(spells.size())).metadata();
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public static void onLootTableLoadEvent(LootTableLoadEvent event){
|
||||
// General dungeon loot
|
||||
if(Arrays.asList(Wizardry.settings.lootInjectionLocations).contains(event.getName())){
|
||||
event.getTable().addPool(getAdditive(Wizardry.MODID + ":chests/dungeon_additions", Wizardry.MODID + "_additional_dungeon_loot"));
|
||||
}
|
||||
// Jungle temple dispensers
|
||||
if(event.getName().toString().matches("minecraft:chests/jungle_temple_dispenser")){
|
||||
event.getTable().addPool(getAdditive(Wizardry.MODID + ":chests/jungle_dispenser_additions", Wizardry.MODID + "_additional_dispenser_loot"));
|
||||
}
|
||||
// Mob drops
|
||||
// Let's hope mods will play nice and store their entity loot tables under 'entities' or 'entity'
|
||||
// If not, packmakers will have to sort it out themselves using the whitelist/blacklist
|
||||
if(Arrays.asList(Wizardry.settings.mobLootTableWhitelist).contains(event.getName())){
|
||||
event.getTable().addPool(getAdditive(Wizardry.MODID + ":entities/mob_additions", Wizardry.MODID + "_additional_mob_drops"));
|
||||
|
||||
}else if(!Arrays.asList(Wizardry.settings.mobLootTableBlacklist).contains(event.getName())
|
||||
&& event.getName().getPath().contains("entities") || event.getName().getPath().contains("entity")){
|
||||
// Get the filename of the loot table json, for well-behaved mods this will be the entity name
|
||||
String[] split = event.getName().getPath().split("/");
|
||||
String entityName = split[split.length - 1];
|
||||
|
||||
EntityEntry entry = ForgeRegistries.ENTITIES.getValue(new ResourceLocation(entityName));
|
||||
if(entry == null) return; // If this is true it didn't work :(
|
||||
Class entityClass = entry.getEntityClass();
|
||||
|
||||
if(EnumCreatureType.MONSTER.getCreatureClass().isAssignableFrom(entityClass)){
|
||||
event.getTable().addPool(getAdditive(Wizardry.MODID + ":entities/mob_additions", Wizardry.MODID + "_additional_mob_drops"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static LootPool getAdditive(String entryName, String poolName){
|
||||
return new LootPool(new LootEntry[]{getAdditiveEntry(entryName, 1)}, new LootCondition[0],
|
||||
new RandomValueRange(1), new RandomValueRange(0, 1), Wizardry.MODID + "_" + poolName);
|
||||
}
|
||||
|
||||
private static LootEntryTable getAdditiveEntry(String name, int weight){
|
||||
return new LootEntryTable(new ResourceLocation(name), weight, 0, new LootCondition[0],
|
||||
Wizardry.MODID + "_additive_entry");
|
||||
}
|
||||
|
||||
// @SubscribeEvent
|
||||
// public static void onLivingSpawnEvent(LivingSpawnEvent.SpecialSpawn event){
|
||||
// if(event.getSpawner() != null) event.getEntityLiving().getEntityData().setBoolean(FROM_SPAWNER_NBT_FLAG, true);
|
||||
// }
|
||||
|
||||
}
|
||||
@@ -5,7 +5,6 @@ import electroblob.wizardry.potion.*;
|
||||
import electroblob.wizardry.util.ParticleBuilder;
|
||||
import electroblob.wizardry.util.ParticleBuilder.Type;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.ai.attributes.AbstractAttributeMap;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
@@ -16,6 +15,8 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry.ObjectHolder;
|
||||
import net.minecraftforge.registries.IForgeRegistry;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
/**
|
||||
* Class responsible for defining, storing and registering all of wizardry's potion effects.
|
||||
*
|
||||
@@ -26,23 +27,34 @@ import net.minecraftforge.registries.IForgeRegistry;
|
||||
@Mod.EventBusSubscriber
|
||||
public final class WizardryPotions {
|
||||
|
||||
public static final Potion frost = null;
|
||||
public static final Potion transience = null;
|
||||
public static final Potion fireskin = null;
|
||||
public static final Potion ice_shroud = null;
|
||||
public static final Potion static_aura = null;
|
||||
public static final Potion decay = null;
|
||||
public static final Potion sixth_sense = null;
|
||||
public static final Potion arcane_jammer = null;
|
||||
public static final Potion mind_trick = null;
|
||||
public static final Potion mind_control = null;
|
||||
public static final Potion font_of_mana = null;
|
||||
public static final Potion fear = null;
|
||||
public static final Potion curse_of_soulbinding = null;
|
||||
public static final Potion paralysis = null;
|
||||
public static final Potion muffle = null;
|
||||
public static final Potion ward = null;
|
||||
public static final Potion slow_time = null;
|
||||
private WizardryPotions(){} // No instances!
|
||||
|
||||
@Nonnull
|
||||
@SuppressWarnings("ConstantConditions")
|
||||
private static <T> T placeholder(){ return null; }
|
||||
|
||||
public static final Potion frost = placeholder();
|
||||
public static final Potion transience = placeholder();
|
||||
public static final Potion fireskin = placeholder();
|
||||
public static final Potion ice_shroud = placeholder();
|
||||
public static final Potion static_aura = placeholder();
|
||||
public static final Potion decay = placeholder();
|
||||
public static final Potion sixth_sense = placeholder();
|
||||
public static final Potion arcane_jammer = placeholder();
|
||||
public static final Potion mind_trick = placeholder();
|
||||
public static final Potion mind_control = placeholder();
|
||||
public static final Potion font_of_mana = placeholder();
|
||||
public static final Potion fear = placeholder();
|
||||
public static final Potion curse_of_soulbinding = placeholder();
|
||||
public static final Potion paralysis = placeholder();
|
||||
public static final Potion muffle = placeholder();
|
||||
public static final Potion ward = placeholder();
|
||||
public static final Potion slow_time = placeholder();
|
||||
public static final Potion empowerment = placeholder();
|
||||
public static final Potion curse_of_enfeeblement = placeholder();
|
||||
public static final Potion curse_of_undeath = placeholder();
|
||||
public static final Potion containment = placeholder();
|
||||
public static final Potion frost_step = placeholder();
|
||||
|
||||
/**
|
||||
* Sets both the registry and unlocalised names of the given potion, then registers it with the given registry. Use
|
||||
@@ -71,7 +83,7 @@ public final class WizardryPotions {
|
||||
registerPotion(registry, "frost", new PotionFrost(true, 0)); // Colour was 0x38ddec (was arbitrary anyway)
|
||||
|
||||
registerPotion(registry, "transience", new PotionMagicEffectParticles(false, 0,
|
||||
new ResourceLocation(Wizardry.MODID, "potion_icon_transience")){
|
||||
new ResourceLocation(Wizardry.MODID, "textures/gui/potion_icon_transience.png")){
|
||||
@Override
|
||||
public void spawnCustomParticle(World world, double x, double y, double z){
|
||||
ParticleBuilder.create(Type.DUST).pos(x, y, z).clr(0.8f, 0.8f, 1.0f).shaded(true).spawn(world);
|
||||
@@ -79,7 +91,7 @@ public final class WizardryPotions {
|
||||
}.setBeneficial()); // 0xffe89b
|
||||
|
||||
registerPotion(registry, "fireskin", new PotionMagicEffectParticles(false, 0,
|
||||
new ResourceLocation(Wizardry.MODID, "potion_icon_fireskin")){
|
||||
new ResourceLocation(Wizardry.MODID, "textures/gui/potion_icon_fireskin.png")){
|
||||
@Override
|
||||
public void spawnCustomParticle(World world, double x, double y, double z){
|
||||
world.spawnParticle(EnumParticleTypes.FLAME, x, y, z, 0, 0, 0);
|
||||
@@ -89,11 +101,11 @@ public final class WizardryPotions {
|
||||
public void performEffect(EntityLivingBase entitylivingbase, int strength){
|
||||
entitylivingbase.extinguish(); // Stops melee mobs that are on fire from setting the player on fire,
|
||||
// without allowing the player to actually stand in fire or swim in lava without taking damage.
|
||||
};
|
||||
}
|
||||
}.setBeneficial()); // 0xff2f02
|
||||
|
||||
registerPotion(registry, "ice_shroud", new PotionMagicEffectParticles(false, 0,
|
||||
new ResourceLocation(Wizardry.MODID, "potion_icon_ice_shroud")){
|
||||
new ResourceLocation(Wizardry.MODID, "textures/gui/potion_icon_ice_shroud.png")){
|
||||
@Override
|
||||
public void spawnCustomParticle(World world, double x, double y, double z){
|
||||
float brightness = 0.5f + (world.rand.nextFloat() / 2);
|
||||
@@ -103,7 +115,7 @@ public final class WizardryPotions {
|
||||
}.setBeneficial()); // 0x52f1ff
|
||||
|
||||
registerPotion(registry, "static_aura", new PotionMagicEffectParticles(false, 0,
|
||||
new ResourceLocation(Wizardry.MODID, "potion_icon_static_aura")){
|
||||
new ResourceLocation(Wizardry.MODID, "textures/gui/potion_icon_static_aura.png")){
|
||||
@Override
|
||||
public void spawnCustomParticle(World world, double x, double y, double z){
|
||||
ParticleBuilder.create(Type.SPARK).pos(x, y, z).spawn(world);
|
||||
@@ -113,33 +125,35 @@ public final class WizardryPotions {
|
||||
registerPotion(registry, "decay", new PotionDecay(true, 0x3c006c));
|
||||
|
||||
registerPotion(registry, "sixth_sense", new PotionMagicEffect(false, 0xc6ff01,
|
||||
new ResourceLocation(Wizardry.MODID, "potion_icon_sixth_sense")){
|
||||
new ResourceLocation(Wizardry.MODID, "textures/gui/potion_icon_sixth_sense.png")){
|
||||
@Override
|
||||
public void removeAttributesModifiersFromEntity(EntityLivingBase target, AbstractAttributeMap attributeMapIn, int amplifier){
|
||||
// Reset the shader
|
||||
if(target.world.isRemote && target == net.minecraft.client.Minecraft.getMinecraft().player){
|
||||
public void performEffect(EntityLivingBase target, int strength){
|
||||
// Reset the shader (a bit dirty but both the potion expiry hooks are only fired server-side, and
|
||||
// there's no point sending packets unnecessarily if we can just do this instead)
|
||||
if(target.getActivePotionEffect(this).getDuration() <= 1 && target.world.isRemote
|
||||
&& target == net.minecraft.client.Minecraft.getMinecraft().player){
|
||||
net.minecraft.client.Minecraft.getMinecraft().entityRenderer.stopUseShader();
|
||||
}
|
||||
}
|
||||
}.setBeneficial());
|
||||
|
||||
registerPotion(registry, "arcane_jammer", new PotionMagicEffect(true, 0xcf4aa2,
|
||||
new ResourceLocation(Wizardry.MODID, "potion_icon_arcane_jammer")));
|
||||
new ResourceLocation(Wizardry.MODID, "textures/gui/potion_icon_arcane_jammer.png")));
|
||||
|
||||
registerPotion(registry, "mind_trick", new PotionMagicEffect(true, 0x601683,
|
||||
new ResourceLocation(Wizardry.MODID, "potion_icon_mind_trick")));
|
||||
new ResourceLocation(Wizardry.MODID, "textures/gui/potion_icon_mind_trick.png")));
|
||||
|
||||
registerPotion(registry, "mind_control", new PotionMagicEffect(true, 0x320b44,
|
||||
new ResourceLocation(Wizardry.MODID, "potion_icon_mind_control")));
|
||||
new ResourceLocation(Wizardry.MODID, "textures/gui/potion_icon_mind_control.png")));
|
||||
|
||||
registerPotion(registry, "font_of_mana", new PotionMagicEffect(false, 0xffe5bb,
|
||||
new ResourceLocation(Wizardry.MODID, "potion_icon_font_of_mana")).setBeneficial());
|
||||
new ResourceLocation(Wizardry.MODID, "textures/gui/potion_icon_font_of_mana.png")).setBeneficial());
|
||||
|
||||
registerPotion(registry, "fear", new PotionMagicEffect(true, 0xbd0100,
|
||||
new ResourceLocation(Wizardry.MODID, "potion_icon_fear")));
|
||||
new ResourceLocation(Wizardry.MODID, "textures/gui/potion_icon_fear.png")));
|
||||
|
||||
registerPotion(registry, "curse_of_soulbinding", new Curse(true, 0x0f000f,
|
||||
new ResourceLocation(Wizardry.MODID, "potion_icon_curse_of_soulbinding")){
|
||||
new ResourceLocation(Wizardry.MODID, "textures/gui/potion_icon_curse_of_soulbinding.png")){
|
||||
@Override // We're not removing any attributes, but it's called when we want it to be so...
|
||||
public void removeAttributesModifiersFromEntity(EntityLivingBase entity, net.minecraft.entity.ai.attributes.AbstractAttributeMap attributeMapIn, int amplifier){
|
||||
// TODO: Hmmmm...
|
||||
@@ -147,7 +161,7 @@ public final class WizardryPotions {
|
||||
});
|
||||
|
||||
registerPotion(registry, "paralysis", new PotionMagicEffectParticles(true, 0,
|
||||
new ResourceLocation(Wizardry.MODID, "potion_icon_paralysis")){
|
||||
new ResourceLocation(Wizardry.MODID, "textures/gui/potion_icon_paralysis.png")){
|
||||
@Override
|
||||
public void spawnCustomParticle(World world, double x, double y, double z){
|
||||
ParticleBuilder.create(Type.SPARK).pos(x, y, z).spawn(world);
|
||||
@@ -155,12 +169,24 @@ public final class WizardryPotions {
|
||||
});
|
||||
|
||||
registerPotion(registry, "muffle", new PotionMagicEffect(false, 0x4464d9,
|
||||
new ResourceLocation(Wizardry.MODID, "potion_icon_muffle")).setBeneficial());
|
||||
new ResourceLocation(Wizardry.MODID, "textures/gui/potion_icon_muffle.png")).setBeneficial());
|
||||
|
||||
registerPotion(registry, "ward", new PotionMagicEffect(false, 0xc991d0,
|
||||
new ResourceLocation(Wizardry.MODID, "potion_icon_ward")).setBeneficial());
|
||||
new ResourceLocation(Wizardry.MODID, "textures/gui/potion_icon_ward.png")).setBeneficial());
|
||||
|
||||
registerPotion(registry, "slow_time", new PotionSlowTime(false, 0x5be3bb).setBeneficial());
|
||||
|
||||
registerPotion(registry, "empowerment", new PotionMagicEffect(false, 0x8367bd,
|
||||
new ResourceLocation(Wizardry.MODID, "textures/gui/potion_icon_empowerment.png")).setBeneficial());
|
||||
|
||||
registerPotion(registry, "curse_of_enfeeblement", new CurseEnfeeblement(true, 0x36000b));
|
||||
|
||||
registerPotion(registry, "curse_of_undeath", new CurseUndeath(true, 0x685c00));
|
||||
|
||||
registerPotion(registry, "containment", new PotionContainment(true, 0x7988cc));
|
||||
|
||||
registerPotion(registry, "frost_step", new PotionFrostStep(false, 0).setBeneficial());
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
package electroblob.wizardry.registry;
|
||||
|
||||
import electroblob.wizardry.Wizardry;
|
||||
import electroblob.wizardry.item.IManaStoringItem;
|
||||
import electroblob.wizardry.item.ItemManaFlask;
|
||||
import net.minecraft.inventory.ContainerPlayer;
|
||||
import net.minecraft.inventory.ContainerWorkbench;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.event.RegistryEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.gameevent.TickEvent;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
import net.minecraftforge.registries.IForgeRegistry;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.Queue;
|
||||
|
||||
/**
|
||||
* Class responsible for defining and registering wizardry's non-JSON recipes (i.e. smelting recipes and dynamic
|
||||
* crafting recipes). Also handles dynamic recipe display and usage.
|
||||
*
|
||||
* @author Electroblob
|
||||
* @since Wizardry 4.2
|
||||
*/
|
||||
@Mod.EventBusSubscriber
|
||||
public final class WizardryRecipes {
|
||||
|
||||
private WizardryRecipes(){} // No instances!
|
||||
|
||||
private static final Queue<Item> chargingRecipeQueue = new LinkedList<>();
|
||||
|
||||
/** Adds the given item to the list of items that can be charged using mana flasks. Dynamic charging recipes
|
||||
* will be added for these items during {@code RegistryEvent.Register<IRecipe>}. The item must implement
|
||||
* {@link IManaStoringItem} for the recipes to work correctly. This method should be called from the item's
|
||||
* constructor. */
|
||||
public static void addToManaFlaskCharging(Item item){
|
||||
chargingRecipeQueue.offer(item);
|
||||
}
|
||||
|
||||
/** Now only deals with the dynamic crafting recipes and the smelting recipes. */
|
||||
@SubscribeEvent
|
||||
public static void registerRecipes(RegistryEvent.Register<IRecipe> event){
|
||||
|
||||
IForgeRegistry<IRecipe> registry = event.getRegistry();
|
||||
|
||||
FurnaceRecipes.instance().addSmeltingRecipeForBlock(WizardryBlocks.crystal_ore, new ItemStack(WizardryItems.magic_crystal), 0.5f);
|
||||
|
||||
// Mana flask recipes
|
||||
|
||||
ItemStack smallFlaskStack = new ItemStack(WizardryItems.small_mana_flask);
|
||||
ItemStack mediumFlaskStack = new ItemStack(WizardryItems.medium_mana_flask);
|
||||
ItemStack largeFlaskStack = new ItemStack(WizardryItems.large_mana_flask);
|
||||
|
||||
ItemStack chargeable;
|
||||
|
||||
while(!chargingRecipeQueue.isEmpty()){
|
||||
// Use remove() and not poll() because the queue shouldn't be empty in here
|
||||
chargeable = new ItemStack(chargingRecipeQueue.remove(), 1, OreDictionary.WILDCARD_VALUE);
|
||||
|
||||
registry.register(new ShapelessOreRecipe(null, chargeable, chargeable, smallFlaskStack){
|
||||
@Override public boolean isDynamic(){ return true; } // Stops it appearing in the recipe book
|
||||
}.setRegistryName(new ResourceLocation(Wizardry.MODID, "recipes/small_flask_" + chargeable.getItem().getRegistryName().getPath())));
|
||||
|
||||
registry.register(new ShapelessOreRecipe(null, chargeable, chargeable, mediumFlaskStack){
|
||||
@Override public boolean isDynamic(){ return true; }
|
||||
}.setRegistryName(new ResourceLocation(Wizardry.MODID, "recipes/medium_flask_" + chargeable.getItem().getRegistryName().getPath())));
|
||||
|
||||
registry.register(new ShapelessOreRecipe(null, chargeable, chargeable, largeFlaskStack){
|
||||
@Override public boolean isDynamic(){ return true; }
|
||||
}.setRegistryName(new ResourceLocation(Wizardry.MODID, "recipes/large_flask_" + chargeable.getItem().getRegistryName().getPath())));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public static void onPlayerTickEvent(TickEvent.PlayerTickEvent event){
|
||||
|
||||
if(event.phase == TickEvent.Phase.START){
|
||||
|
||||
if(event.player.openContainer instanceof ContainerWorkbench){
|
||||
|
||||
IInventory craftMatrix = ((ContainerWorkbench)event.player.openContainer).craftMatrix;
|
||||
ItemStack output = ((ContainerWorkbench)event.player.openContainer).craftResult.getStackInSlot(0);
|
||||
processManaFlaskCrafting(craftMatrix, output);
|
||||
|
||||
}else if(event.player.openContainer instanceof ContainerPlayer){
|
||||
|
||||
IInventory craftMatrix = ((ContainerPlayer)event.player.openContainer).craftMatrix;
|
||||
ItemStack output = ((ContainerPlayer)event.player.openContainer).craftResult.getStackInSlot(0);
|
||||
// Unfortunately I have no choice but to call this method every tick when the player isn't using another
|
||||
// inventory, since the only thing tracking whether the player is looking at their inventory is the GUI
|
||||
// itself, which is client-side only.
|
||||
processManaFlaskCrafting(craftMatrix, output);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void processManaFlaskCrafting(IInventory craftMatrix, ItemStack output){
|
||||
|
||||
// Charges wand using mana flask
|
||||
|
||||
ItemManaFlask flask = null;
|
||||
ItemStack input = ItemStack.EMPTY;
|
||||
|
||||
for(int i = 0; i < craftMatrix.getSizeInventory(); i++){
|
||||
|
||||
ItemStack stack = craftMatrix.getStackInSlot(i);
|
||||
|
||||
if(stack.getItem() instanceof ItemManaFlask){
|
||||
flask = (ItemManaFlask)stack.getItem();
|
||||
}
|
||||
|
||||
if(stack.getItem() instanceof IManaStoringItem){
|
||||
input = stack;
|
||||
}
|
||||
}
|
||||
|
||||
if(flask == null) return;
|
||||
|
||||
if(output.getItem() instanceof IManaStoringItem && !input.isEmpty()){
|
||||
|
||||
output.setTagCompound((input.getTagCompound()));
|
||||
|
||||
int currentMana = ((IManaStoringItem)input.getItem()).getMana(input);
|
||||
|
||||
((IManaStoringItem)output.getItem()).setMana(output, Math.min(currentMana + flask.size.capacity,
|
||||
((IManaStoringItem)input.getItem()).getManaCapacity(input)));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,225 +0,0 @@
|
||||
package electroblob.wizardry.registry;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import electroblob.wizardry.Wizardry;
|
||||
import electroblob.wizardry.constants.Element;
|
||||
import electroblob.wizardry.constants.Tier;
|
||||
import electroblob.wizardry.entity.EntityArc;
|
||||
import electroblob.wizardry.entity.EntityMeteor;
|
||||
import electroblob.wizardry.entity.EntityShield;
|
||||
import electroblob.wizardry.entity.construct.*;
|
||||
import electroblob.wizardry.entity.living.*;
|
||||
import electroblob.wizardry.entity.projectile.*;
|
||||
import electroblob.wizardry.loot.RandomSpell;
|
||||
import electroblob.wizardry.loot.WizardSpell;
|
||||
import electroblob.wizardry.tileentity.*;
|
||||
import electroblob.wizardry.util.WizardryUtilities;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EnumCreatureType;
|
||||
import net.minecraft.init.Biomes;
|
||||
import net.minecraft.inventory.EntityEquipmentSlot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.storage.loot.LootTableList;
|
||||
import net.minecraft.world.storage.loot.functions.LootFunctionManager;
|
||||
import net.minecraftforge.event.RegistryEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.registry.EntityRegistry;
|
||||
import net.minecraftforge.fml.common.registry.ForgeRegistries;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
import net.minecraftforge.registries.IForgeRegistry;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Class responsible for registering all the things that don't have (or need) instances: entities, loot tables, recipes,
|
||||
* etc.
|
||||
*
|
||||
* @author Electroblob
|
||||
* @since Wizardry 1.0
|
||||
*/
|
||||
@Mod.EventBusSubscriber
|
||||
public final class WizardryRegistry {
|
||||
|
||||
/** Called from the preInit method in the main mod class to register the custom dungeon loot. */
|
||||
public static void registerLoot(){
|
||||
|
||||
/* Loot tables work as follows: Minecraft goes through each pool in turn. For each pool, it does a certain
|
||||
* number of rolls, which can either be set to always be one number or a random number from a range. Each roll,
|
||||
* it generates one stack of a single random entry in that pool, weighted according to the weights of the
|
||||
* entries. Functions allow properties of that stack (stack size, damage, nbt) to be set, and even allow it to
|
||||
* be replaced dynamically with a completely different item (though there's very little point in doing that as
|
||||
* it could be achieved just as easily with more entries, which makes me think it would be bad practice). You
|
||||
* can also use conditions to control whether an entry or pool is used at all, which is mostly for mob drops
|
||||
* under specific conditions, but one of them is simply a random chance, meaning you could use it to make a pool
|
||||
* that only gets rolled sometimes. All in all, this can get rather confusing, because stackable items can have
|
||||
* 5 stages of randomness applied to them at once: a random chance for the pool, a random number of rolls for
|
||||
* the pool, the weighted random chance of choosing that particular entry, a random chance for that entry, and a
|
||||
* random stack size, and that's before you take functions into account.
|
||||
*
|
||||
* ...oh, and entries can be entire loot tables in themselves, allowing for potentially infinite levels of
|
||||
* randomness. Yeah. */
|
||||
|
||||
// Always registers the loot tables, but only injects the additions into vanilla if the appropriate option is
|
||||
// enabled in the config (see WizardryEventHandler).
|
||||
LootFunctionManager.registerFunction(new RandomSpell.Serializer());
|
||||
LootFunctionManager.registerFunction(new WizardSpell.Serializer());
|
||||
LootTableList.register(new ResourceLocation(Wizardry.MODID, "chests/wizard_tower"));
|
||||
LootTableList.register(new ResourceLocation(Wizardry.MODID, "chests/dungeon_additions"));
|
||||
LootTableList.register(new ResourceLocation(Wizardry.MODID, "subsets/novice_wands"));
|
||||
LootTableList.register(new ResourceLocation(Wizardry.MODID, "subsets/wizard_armour"));
|
||||
LootTableList.register(new ResourceLocation(Wizardry.MODID, "subsets/arcane_tomes"));
|
||||
LootTableList.register(new ResourceLocation(Wizardry.MODID, "subsets/wand_upgrades"));
|
||||
LootTableList.register(new ResourceLocation(Wizardry.MODID, "entities/evil_wizard"));
|
||||
// TODO: At the moment this is not used anywhere because I can't find a way to add it to all mobs.
|
||||
// LootTableList.register(new ResourceLocation(Wizardry.MODID, "entities/mob_additions"));
|
||||
|
||||
}
|
||||
|
||||
/** Called from the preInit method in the main mod class to register all the tile entities. */
|
||||
public static void registerTileEntities(){
|
||||
|
||||
GameRegistry.registerTileEntity(TileEntityArcaneWorkbench.class, Wizardry.MODID + "ArcaneWorkbenchTileEntity");
|
||||
GameRegistry.registerTileEntity(TileEntityStatue.class, Wizardry.MODID + "PetrifiedStoneTileEntity");
|
||||
GameRegistry.registerTileEntity(TileEntityMagicLight.class, Wizardry.MODID + "MagicLightTileEntity");
|
||||
GameRegistry.registerTileEntity(TileEntityTimer.class, Wizardry.MODID + "TimerTileEntity");
|
||||
GameRegistry.registerTileEntity(TileEntityPlayerSave.class, Wizardry.MODID + "TileEntityPlayerSave");
|
||||
}
|
||||
|
||||
/** Not actually the frequency at all; smaller numbers are more frequent. Vanilla uses 3 I think. */
|
||||
private static final int LIVING_UPDATE_INTERVAL = 3;
|
||||
/** Not actually the frequency at all; smaller numbers are more frequent. */
|
||||
private static final int PROJECTILE_UPDATE_INTERVAL = 10;
|
||||
|
||||
/** Called from the preInit method in the main mod class to register all the entities. */
|
||||
public static void registerEntities(){
|
||||
|
||||
int id = 0; // Incrementable index for the mod specific entity id.
|
||||
|
||||
registerEntity(EntityZombieMinion.class, "zombie_minion", id++, 128, LIVING_UPDATE_INTERVAL, true);
|
||||
registerEntity(EntityMagicMissile.class, "magic_missile", id++, 128, PROJECTILE_UPDATE_INTERVAL, true);
|
||||
// TODO: This should be a particle
|
||||
registerEntity(EntityArc.class, "arc", id++, 128, PROJECTILE_UPDATE_INTERVAL, false);
|
||||
registerEntity(EntitySkeletonMinion.class, "skeleton_minion", id++, 128, LIVING_UPDATE_INTERVAL, true);
|
||||
registerEntity(EntitySparkBomb.class, "spark_bomb", id++, 128, PROJECTILE_UPDATE_INTERVAL, true);
|
||||
registerEntity(EntitySpiritWolf.class, "spirit_wolf", id++, 128, LIVING_UPDATE_INTERVAL, true);
|
||||
registerEntity(EntityIceShard.class, "ice_shard", id++, 128, PROJECTILE_UPDATE_INTERVAL, true);
|
||||
registerEntity(EntityBlazeMinion.class, "blaze_minion", id++, 128, LIVING_UPDATE_INTERVAL, true);
|
||||
registerEntity(EntityIceWraith.class, "ice_wraith", id++, 128, LIVING_UPDATE_INTERVAL, true);
|
||||
registerEntity(EntityLightningWraith.class, "lightning_wraith", id++, 128, LIVING_UPDATE_INTERVAL, true);
|
||||
registerEntity(EntityBlackHole.class, "black_hole", id++, 128, PROJECTILE_UPDATE_INTERVAL, false);
|
||||
registerEntity(EntityShield.class, "shield", id++, 128, 1, true);
|
||||
registerEntity(EntityMeteor.class, "meteor", id++, 128, 5, true);
|
||||
registerEntity(EntityBlizzard.class, "blizzard", id++, 128, PROJECTILE_UPDATE_INTERVAL, false);
|
||||
registerEntityAndEgg(EntityWizard.class, "wizard", id++, 128, LIVING_UPDATE_INTERVAL, true, 0x19295e, 0xee9312);
|
||||
registerEntity(EntityBubble.class, "bubble", id++, 128, 3, false);
|
||||
registerEntity(EntityTornado.class, "tornado", id++, 128, 1, false);
|
||||
registerEntity(EntityHammer.class, "lightning_hammer", id++, 128, 1, true);
|
||||
registerEntity(EntityFirebomb.class, "firebomb", id++, 128, PROJECTILE_UPDATE_INTERVAL, true);
|
||||
registerEntity(EntityForceOrb.class, "force_orb", id++, 128, PROJECTILE_UPDATE_INTERVAL, true);
|
||||
registerEntity(EntityArrowRain.class, "arrow_rain", id++, 128, PROJECTILE_UPDATE_INTERVAL, false);
|
||||
registerEntity(EntitySpark.class, "spark", id++, 128, PROJECTILE_UPDATE_INTERVAL, true);
|
||||
registerEntity(EntityShadowWraith.class, "shadow_wraith", id++, 128, PROJECTILE_UPDATE_INTERVAL, true);
|
||||
registerEntity(EntityDarknessOrb.class, "darkness_orb", id++, 128, PROJECTILE_UPDATE_INTERVAL, true);
|
||||
registerEntity(EntitySpiderMinion.class, "spider_minion", id++, 128, LIVING_UPDATE_INTERVAL, true);
|
||||
registerEntity(EntityHealAura.class, "healing_aura", id++, 128, PROJECTILE_UPDATE_INTERVAL, false);
|
||||
registerEntity(EntityFireSigil.class, "fire_sigil", id++, 128, PROJECTILE_UPDATE_INTERVAL, false);
|
||||
registerEntity(EntityFrostSigil.class, "frost_sigil", id++, 128, PROJECTILE_UPDATE_INTERVAL, false);
|
||||
registerEntity(EntityLightningSigil.class, "lightning_sigil", id++, 128, PROJECTILE_UPDATE_INTERVAL, false);
|
||||
registerEntity(EntityLightningArrow.class, "lightning_arrow", id++, 128, PROJECTILE_UPDATE_INTERVAL, true);
|
||||
registerEntity(EntityFirebolt.class, "firebolt", id++, 128, PROJECTILE_UPDATE_INTERVAL, true);
|
||||
registerEntity(EntityPoisonBomb.class, "poison_bomb", id++, 128, PROJECTILE_UPDATE_INTERVAL, true);
|
||||
registerEntity(EntityIceCharge.class, "ice_charge", id++, 128, PROJECTILE_UPDATE_INTERVAL, true);
|
||||
registerEntity(EntityForceArrow.class, "force_arrow", id++, 128, PROJECTILE_UPDATE_INTERVAL, true);
|
||||
registerEntity(EntityDart.class, "dart", id++, 128, PROJECTILE_UPDATE_INTERVAL, true);
|
||||
registerEntity(EntityMagicSlime.class, "magic_slime", id++, 128, LIVING_UPDATE_INTERVAL, true);
|
||||
registerEntity(EntityForcefield.class, "forcefield", id++, 128, PROJECTILE_UPDATE_INTERVAL, false);
|
||||
registerEntity(EntityFireRing.class, "ring_of_fire", id++, 128, PROJECTILE_UPDATE_INTERVAL, false);
|
||||
registerEntity(EntityLightningDisc.class, "lightning_disc", id++, 128, PROJECTILE_UPDATE_INTERVAL, true);
|
||||
registerEntity(EntityThunderbolt.class, "thunderbolt", id++, 128, PROJECTILE_UPDATE_INTERVAL, true);
|
||||
registerEntity(EntityIceGiant.class, "ice_giant", id++, 128, LIVING_UPDATE_INTERVAL, true);
|
||||
registerEntity(EntitySpiritHorse.class, "spirit_horse", id++, 128, LIVING_UPDATE_INTERVAL, true);
|
||||
registerEntity(EntityPhoenix.class, "phoenix", id++, 128, LIVING_UPDATE_INTERVAL, true);
|
||||
registerEntity(EntitySilverfishMinion.class, "silverfish_minion", id++, 128, LIVING_UPDATE_INTERVAL, true);
|
||||
registerEntity(EntityDecay.class, "decay", id++, 128, PROJECTILE_UPDATE_INTERVAL, false);
|
||||
registerEntity(EntityStormElemental.class, "storm_elemental", id++, 128, PROJECTILE_UPDATE_INTERVAL, true);
|
||||
registerEntity(EntityEarthquake.class, "earthquake", id++, 128, PROJECTILE_UPDATE_INTERVAL, false);
|
||||
registerEntity(EntityIceLance.class, "ice_lance", id++, 128, PROJECTILE_UPDATE_INTERVAL, true);
|
||||
registerEntity(EntityHailstorm.class, "hailstorm", id++, 128, PROJECTILE_UPDATE_INTERVAL, false);
|
||||
registerEntity(EntitySmokeBomb.class, "smoke_bomb", id++, 128, PROJECTILE_UPDATE_INTERVAL, true);
|
||||
registerEntityAndEgg(EntityEvilWizard.class, "evil_wizard", id++, 128, LIVING_UPDATE_INTERVAL, true, 0x290404, 0xee9312);
|
||||
registerEntity(EntityDecoy.class, "decoy", id++, 128, LIVING_UPDATE_INTERVAL, true);
|
||||
registerEntity(EntityIceSpike.class, "ice_spike", id++, 128, 1, true);
|
||||
// TODO: This should be a particle.
|
||||
registerEntity(EntityLightningPulse.class, "lightning_pulse", id++, 128, PROJECTILE_UPDATE_INTERVAL, false);
|
||||
registerEntity(EntityWitherSkeletonMinion.class, "wither_skeleton_minion", id++, 128, LIVING_UPDATE_INTERVAL, true);
|
||||
|
||||
// TODO: May need fixing
|
||||
List<Biome> biomes = Lists.newArrayList();
|
||||
for (Biome biome : ForgeRegistries.BIOMES.getValuesCollection()) {
|
||||
biomes.add(biome);
|
||||
}
|
||||
biomes.remove(Biomes.MUSHROOM_ISLAND);
|
||||
biomes.remove(Biomes.MUSHROOM_ISLAND_SHORE);
|
||||
// For reference: 5, 1, 1 are the parameters for the witch in vanilla.
|
||||
EntityRegistry.addSpawn(EntityEvilWizard.class, 3, 1, 1, EnumCreatureType.MONSTER, biomes.toArray(new Biome[biomes.size()]));
|
||||
|
||||
}
|
||||
|
||||
/** Private helper method for registering entities; keeps things neater. For some reason, Forge 1.11.2 wants a
|
||||
* ResourceLocation and a string name... probably because it's transitioning to the registry system. */
|
||||
private static void registerEntity(Class<? extends Entity> entityClass, String name, int id, int trackingRange, int updateFrequency, boolean sendsVelocityUpdates){
|
||||
ResourceLocation registryName = new ResourceLocation(Wizardry.MODID, name);
|
||||
EntityRegistry.registerModEntity(registryName, entityClass, registryName.toString(), id, Wizardry.instance, trackingRange, updateFrequency, sendsVelocityUpdates);
|
||||
}
|
||||
|
||||
/** Private helper method for registering entities with eggs; keeps things neater. For some reason, Forge 1.11.2
|
||||
* wants a ResourceLocation and a string name... probably because it's transitioning to the registry system. */
|
||||
private static void registerEntityAndEgg(Class<? extends Entity> entityClass, String name, int id, int trackingRange, int updateFrequency, boolean sendsVelocityUpdates, int eggColour, int spotColour){
|
||||
ResourceLocation registryName = new ResourceLocation(Wizardry.MODID, name);
|
||||
EntityRegistry.registerModEntity(registryName, entityClass, registryName.toString(), id, Wizardry.instance, trackingRange, updateFrequency, sendsVelocityUpdates);
|
||||
EntityRegistry.registerEgg(registryName, eggColour, spotColour);
|
||||
}
|
||||
|
||||
/** Now only deals with the dynamic crafting recipes and the smelting recipes. */
|
||||
@SubscribeEvent
|
||||
public static void registerRecipes(RegistryEvent.Register<IRecipe> event){
|
||||
|
||||
IForgeRegistry<IRecipe> registry = event.getRegistry();
|
||||
|
||||
FurnaceRecipes.instance().addSmeltingRecipeForBlock(WizardryBlocks.crystal_ore, new ItemStack(WizardryItems.magic_crystal), 0.5f);
|
||||
|
||||
// Mana flask recipes
|
||||
|
||||
ItemStack manaFlaskStack = new ItemStack(WizardryItems.mana_flask);
|
||||
|
||||
ItemStack miscWandStack;
|
||||
|
||||
for(Element element : Element.values()){
|
||||
for(Tier tier : Tier.values()){
|
||||
miscWandStack = new ItemStack(WizardryUtilities.getWand(tier, element), 1, OreDictionary.WILDCARD_VALUE);
|
||||
registry.register(new ShapelessOreRecipe(null, miscWandStack, miscWandStack, manaFlaskStack){
|
||||
@Override public boolean isDynamic(){ return true; } // Stops it appearing in the recipe book
|
||||
}.setRegistryName(new ResourceLocation(Wizardry.MODID, "recipes/flask_wand_" + element.getUnlocalisedName() + "_" + tier.getUnlocalisedName())));
|
||||
}
|
||||
}
|
||||
|
||||
ItemStack miscArmourStack;
|
||||
|
||||
for(Element element : Element.values()){
|
||||
for(EntityEquipmentSlot slot : WizardryUtilities.ARMOUR_SLOTS){
|
||||
miscArmourStack = new ItemStack(WizardryUtilities.getArmour(element, slot), 1, OreDictionary.WILDCARD_VALUE);
|
||||
registry.register(new ShapelessOreRecipe(null, miscArmourStack, miscArmourStack, manaFlaskStack){
|
||||
@Override public boolean isDynamic(){ return true; } // Stops it appearing in the recipe book
|
||||
}.setRegistryName(new ResourceLocation(Wizardry.MODID, "recipes/flask_armour_" + element.getUnlocalisedName() + "_" + slot.getName())));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,7 +1,10 @@
|
||||
package electroblob.wizardry.registry;
|
||||
|
||||
import electroblob.wizardry.Wizardry;
|
||||
import electroblob.wizardry.misc.Forfeit;
|
||||
import electroblob.wizardry.spell.Spell;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.SoundEvent;
|
||||
import net.minecraftforge.event.RegistryEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
@@ -16,27 +19,118 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
@Mod.EventBusSubscriber
|
||||
public final class WizardrySounds {
|
||||
|
||||
// Anything with LOOP in its name is intended to be played in a continuous loop.
|
||||
public static final SoundEvent SPELL_SPARK = createSound("arc");
|
||||
public static final SoundEvent SPELL_CONJURATION = createSound("aura");
|
||||
public static final SoundEvent SPELL_SHOCKWAVE = createSound("boom");
|
||||
public static final SoundEvent SPELL_LOOP_CRACKLE = createSound("crackle");
|
||||
public static final SoundEvent SPELL_SUMMONING = createSound("darkaura");
|
||||
public static final SoundEvent SPELL_DEFLECTION = createSound("effect");
|
||||
public static final SoundEvent SPELL_LIGHTNING = createSound("electricitya");
|
||||
public static final SoundEvent SPELL_LOOP_LIGHTNING = createSound("electricityb");
|
||||
public static final SoundEvent SPELL_LOOP_FIRE = createSound("flameray");
|
||||
public static final SoundEvent SPELL_FREEZE = createSound("freeze");
|
||||
public static final SoundEvent SPELL_LOOP_ICE = createSound("frostray");
|
||||
public static final SoundEvent SPELL_HEAL = createSound("heal");
|
||||
public static final SoundEvent SPELL_ICE = createSound("ice");
|
||||
public static final SoundEvent SPELL_CONJURATION_LARGE = createSound("largeaura");
|
||||
public static final SoundEvent SPELL_MAGIC = createSound("magic");
|
||||
public static final SoundEvent SPELL_LOOP_SPARKLE = createSound("sparkle");
|
||||
public static final SoundEvent SPELL_LOOP_WIND = createSound("wind");
|
||||
public static final SoundEvent SPELL_EARTHQUAKE = createSound("rumble");
|
||||
public static final SoundEvent SPELL_FORCE = createSound("force");
|
||||
public static final SoundEvent SELECT_SPELL = createSound("select");
|
||||
private WizardrySounds(){} // No instances!
|
||||
|
||||
/** Sound category for all spell-related sounds. This includes inanimate magical entities, but not minions.
|
||||
* @see electroblob.wizardry.util.CustomSoundCategory */
|
||||
public static SoundCategory SPELLS;
|
||||
|
||||
public static final SoundEvent BLOCK_ARCANE_WORKBENCH_SPELLBIND = createSound("block.arcane_workbench.bind_spell");
|
||||
public static final SoundEvent BLOCK_PEDESTAL_ACTIVATE = createSound("block.pedestal.activate");
|
||||
public static final SoundEvent BLOCK_PEDESTAL_CONQUER = createSound("block.pedestal.conquer");
|
||||
|
||||
public static final SoundEvent ITEM_WAND_SWITCH_SPELL = createSound("item.wand.switch_spell");
|
||||
public static final SoundEvent ITEM_WAND_LEVELUP = createSound("item.wand.levelup");
|
||||
public static final SoundEvent ITEM_WAND_MELEE = createSound("item.wand.melee");
|
||||
public static final SoundEvent ITEM_ARMOUR_EQUIP_SILK = createSound("item.armour.equip_silk");
|
||||
public static final SoundEvent ITEM_PURIFYING_ELIXIR_DRINK = createSound("item.purifying_elixir.drink");
|
||||
|
||||
public static final SoundEvent ENTITY_BLACK_HOLE_AMBIENT = createSound("entity.black_hole.ambient");
|
||||
public static final SoundEvent ENTITY_BLACK_HOLE_VANISH = createSound("entity.black_hole.vanish");
|
||||
public static final SoundEvent ENTITY_BUBBLE_POP = createSound("entity.bubble.pop");
|
||||
public static final SoundEvent ENTITY_BLIZZARD_AMBIENT = createSound("entity.blizzard.ambient");
|
||||
public static final SoundEvent ENTITY_DECAY_AMBIENT = createSound("entity.decay.ambient");
|
||||
public static final SoundEvent ENTITY_ENTRAPMENT_AMBIENT = createSound("entity.entrapment.ambient");
|
||||
public static final SoundEvent ENTITY_ENTRAPMENT_VANISH = createSound("entity.entrapment.vanish");
|
||||
public static final SoundEvent ENTITY_FIRE_RING_AMBIENT = createSound("entity.fire_ring.ambient");
|
||||
public static final SoundEvent ENTITY_FIRE_SIGIL_TRIGGER = createSound("entity.fire_sigil.trigger");
|
||||
public static final SoundEvent ENTITY_FORCEFIELD_DEFLECT = createSound("entity.forcefield.deflect");
|
||||
public static final SoundEvent ENTITY_FROST_SIGIL_TRIGGER = createSound("entity.frost_sigil.trigger");
|
||||
public static final SoundEvent ENTITY_HAMMER_ATTACK = createSound("entity.hammer.attack");
|
||||
public static final SoundEvent ENTITY_HAMMER_EXPLODE = createSound("entity.hammer.explode");
|
||||
public static final SoundEvent ENTITY_HAMMER_THROW = createSound("entity.hammer.throw");
|
||||
public static final SoundEvent ENTITY_HAMMER_LAND = createSound("entity.hammer.land");
|
||||
public static final SoundEvent ENTITY_HEAL_AURA_AMBIENT = createSound("entity.heal_aura.ambient");
|
||||
public static final SoundEvent ENTITY_ICE_SPIKE_EXTEND = createSound("entity.ice_spike.extend");
|
||||
public static final SoundEvent ENTITY_LIGHTNING_SIGIL_TRIGGER = createSound("entity.lightning_sigil.trigger");
|
||||
public static final SoundEvent ENTITY_METEOR_FALLING = createSound("entity.meteor.falling");
|
||||
public static final SoundEvent ENTITY_SHIELD_DEFLECT = createSound("entity.shield.deflect");
|
||||
public static final SoundEvent ENTITY_TORNADO_AMBIENT = createSound("entity.tornado.ambient");
|
||||
|
||||
public static final SoundEvent ENTITY_EVIL_WIZARD_AMBIENT = createSound("entity.evil_wizard.ambient");
|
||||
public static final SoundEvent ENTITY_EVIL_WIZARD_HURT = createSound("entity.evil_wizard.hurt");
|
||||
public static final SoundEvent ENTITY_EVIL_WIZARD_DEATH = createSound("entity.evil_wizard.death");
|
||||
public static final SoundEvent ENTITY_ICE_GIANT_ATTACK = createSound("entity.ice_giant.attack");
|
||||
public static final SoundEvent ENTITY_ICE_GIANT_DESPAWN = createSound("entity.ice_giant.despawn");
|
||||
public static final SoundEvent ENTITY_ICE_WRAITH_AMBIENT = createSound("entity.ice_wraith.ambient");
|
||||
public static final SoundEvent ENTITY_MAGIC_SLIME_ATTACK = createSound("entity.magic_slime.attack");
|
||||
public static final SoundEvent ENTITY_MAGIC_SLIME_EXPLODE = createSound("entity.magic_slime.explode");
|
||||
public static final SoundEvent ENTITY_MAGIC_SLIME_SPLAT = createSound("entity.magic_slime.splat");
|
||||
public static final SoundEvent ENTITY_PHOENIX_AMBIENT = createSound("entity.phoenix.ambient");
|
||||
public static final SoundEvent ENTITY_PHOENIX_BURN = createSound("entity.phoenix.burn");
|
||||
public static final SoundEvent ENTITY_PHOENIX_FLAP = createSound("entity.phoenix.flap");
|
||||
public static final SoundEvent ENTITY_PHOENIX_HURT = createSound("entity.phoenix.hurt");
|
||||
public static final SoundEvent ENTITY_PHOENIX_DEATH = createSound("entity.phoenix.death");
|
||||
public static final SoundEvent ENTITY_SHADOW_WRAITH_AMBIENT = createSound("entity.shadow_wraith.ambient");
|
||||
public static final SoundEvent ENTITY_SHADOW_WRAITH_NOISE = createSound("entity.shadow_wraith.noise");
|
||||
public static final SoundEvent ENTITY_SHADOW_WRAITH_HURT = createSound("entity.shadow_wraith.hurt");
|
||||
public static final SoundEvent ENTITY_SHADOW_WRAITH_DEATH = createSound("entity.shadow_wraith.death");
|
||||
public static final SoundEvent ENTITY_SPIRIT_HORSE_VANISH = createSound("entity.spirit_horse.vanish");
|
||||
public static final SoundEvent ENTITY_SPIRIT_WOLF_VANISH = createSound("entity.spirit_wolf.vanish");
|
||||
public static final SoundEvent ENTITY_STORM_ELEMENTAL_AMBIENT = createSound("entity.storm_elemental.ambient");
|
||||
public static final SoundEvent ENTITY_STORM_ELEMENTAL_BURN = createSound("entity.storm_elemental.burn");
|
||||
public static final SoundEvent ENTITY_STORM_ELEMENTAL_WIND = createSound("entity.storm_elemental.wind");
|
||||
public static final SoundEvent ENTITY_STORM_ELEMENTAL_HURT = createSound("entity.storm_elemental.hurt");
|
||||
public static final SoundEvent ENTITY_STORM_ELEMENTAL_DEATH = createSound("entity.storm_elemental.death");
|
||||
public static final SoundEvent ENTITY_WIZARD_YES = createSound("entity.wizard.yes");
|
||||
public static final SoundEvent ENTITY_WIZARD_NO = createSound("entity.wizard.no");
|
||||
public static final SoundEvent ENTITY_WIZARD_AMBIENT = createSound("entity.wizard.ambient");
|
||||
public static final SoundEvent ENTITY_WIZARD_TRADING = createSound("entity.wizard.trading");
|
||||
public static final SoundEvent ENTITY_WIZARD_HURT = createSound("entity.wizard.hurt");
|
||||
public static final SoundEvent ENTITY_WIZARD_DEATH = createSound("entity.wizard.death");
|
||||
|
||||
public static final SoundEvent ENTITY_DARKNESS_ORB_HIT = createSound("entity.darkness_orb.hit");
|
||||
public static final SoundEvent ENTITY_DART_HIT = createSound("entity.dart.hit");
|
||||
public static final SoundEvent ENTITY_DART_HIT_BLOCK = createSound("entity.dart.hit_block");
|
||||
public static final SoundEvent ENTITY_FIREBOLT_HIT = createSound("entity.firebolt.hit");
|
||||
public static final SoundEvent ENTITY_FIREBOMB_THROW = createSound("entity.firebomb.throw");
|
||||
public static final SoundEvent ENTITY_FIREBOMB_SMASH = createSound("entity.firebomb.smash");
|
||||
public static final SoundEvent ENTITY_FIREBOMB_FIRE = createSound("entity.firebomb.fire");
|
||||
public static final SoundEvent ENTITY_FORCE_ARROW_HIT = createSound("entity.force_arrow.hit");
|
||||
public static final SoundEvent ENTITY_FORCE_ORB_HIT = createSound("entity.force_orb.hit");
|
||||
public static final SoundEvent ENTITY_FORCE_ORB_HIT_BLOCK = createSound("entity.force_orb.hit_block");
|
||||
public static final SoundEvent ENTITY_ICEBALL_HIT = createSound("entity.iceball.hit");
|
||||
public static final SoundEvent ENTITY_ICE_CHARGE_SMASH = createSound("entity.ice_charge.smash");
|
||||
public static final SoundEvent ENTITY_ICE_CHARGE_ICE = createSound("entity.ice_charge.ice");
|
||||
public static final SoundEvent ENTITY_ICE_LANCE_SMASH = createSound("entity.ice_lance.smash");
|
||||
public static final SoundEvent ENTITY_ICE_LANCE_HIT = createSound("entity.ice_lance.hit");
|
||||
public static final SoundEvent ENTITY_ICE_SHARD_SMASH = createSound("entity.ice_shard.smash");
|
||||
public static final SoundEvent ENTITY_ICE_SHARD_HIT = createSound("entity.ice_shard.hit");
|
||||
public static final SoundEvent ENTITY_LIGHTNING_ARROW_HIT = createSound("entity.lightning_arrow.hit");
|
||||
public static final SoundEvent ENTITY_LIGHTNING_DISC_HIT = createSound("entity.lightning_disc.hit");
|
||||
// public static final SoundEvent ENTITY_MAGIC_FIREBALL_HIT = createSound("entity.magic_fireball.hit");
|
||||
public static final SoundEvent ENTITY_MAGIC_MISSILE_HIT = createSound("entity.magic_missile.hit");
|
||||
public static final SoundEvent ENTITY_POISON_BOMB_THROW = createSound("entity.poison_bomb.throw");
|
||||
public static final SoundEvent ENTITY_POISON_BOMB_SMASH = createSound("entity.poison_bomb.smash");
|
||||
public static final SoundEvent ENTITY_POISON_BOMB_POISON = createSound("entity.poison_bomb.poison");
|
||||
public static final SoundEvent ENTITY_SMOKE_BOMB_THROW = createSound("entity.smoke_bomb.throw");
|
||||
public static final SoundEvent ENTITY_SMOKE_BOMB_SMASH = createSound("entity.smoke_bomb.smash");
|
||||
public static final SoundEvent ENTITY_SMOKE_BOMB_SMOKE = createSound("entity.smoke_bomb.smoke");
|
||||
public static final SoundEvent ENTITY_HOMING_SPARK_HIT = createSound("entity.homing_spark.hit");
|
||||
public static final SoundEvent ENTITY_SPARK_BOMB_THROW = createSound("entity.spark_bomb.throw");
|
||||
public static final SoundEvent ENTITY_SPARK_BOMB_HIT = createSound("entity.spark_bomb.hit");
|
||||
public static final SoundEvent ENTITY_SPARK_BOMB_HIT_BLOCK = createSound("entity.spark_bomb.hit_block");
|
||||
public static final SoundEvent ENTITY_SPARK_BOMB_CHAIN = createSound("entity.spark_bomb.chain");
|
||||
public static final SoundEvent ENTITY_THUNDERBOLT_HIT = createSound("entity.thunderbolt.hit");
|
||||
|
||||
public static final SoundEvent SPELL_STATIC_AURA_RETALIATE = createSound("spell.static_aura.retaliate");
|
||||
public static final SoundEvent SPELL_CURSE_OF_SOULBINDING_RETALIATE = createSound("spell.curse_of_soulbinding.retaliate");
|
||||
public static final SoundEvent SPELL_TRANSPORTATION_TRAVEL = createSound("spell.transportation.travel");
|
||||
|
||||
public static final SoundEvent MISC_DISCOVER_SPELL = createSound("misc.discover_spell");
|
||||
public static final SoundEvent MISC_BOOK_OPEN = createSound("misc.book_open");
|
||||
public static final SoundEvent MISC_PAGE_TURN = createSound("misc.page_turn");
|
||||
public static final SoundEvent MISC_FREEZE = createSound("misc.freeze");
|
||||
|
||||
/** Trick borrowed from the Twilight Forest, makes things neater. */
|
||||
public static SoundEvent createSound(String name){
|
||||
@@ -44,27 +138,124 @@ public final class WizardrySounds {
|
||||
return new SoundEvent(new ResourceLocation(Wizardry.MODID, name)).setRegistryName(name);
|
||||
}
|
||||
|
||||
// For some reason, sound events seem to work even when they aren't registered, without even so much as a warning.
|
||||
|
||||
@SubscribeEvent
|
||||
public static void register(RegistryEvent.Register<SoundEvent> event){
|
||||
event.getRegistry().register(SPELL_SPARK);
|
||||
event.getRegistry().register(SPELL_CONJURATION);
|
||||
event.getRegistry().register(SPELL_SHOCKWAVE);
|
||||
event.getRegistry().register(SPELL_LOOP_CRACKLE);
|
||||
event.getRegistry().register(SPELL_SUMMONING);
|
||||
event.getRegistry().register(SPELL_DEFLECTION);
|
||||
event.getRegistry().register(SPELL_LIGHTNING);
|
||||
event.getRegistry().register(SPELL_LOOP_LIGHTNING);
|
||||
event.getRegistry().register(SPELL_LOOP_FIRE);
|
||||
event.getRegistry().register(SPELL_FREEZE);
|
||||
event.getRegistry().register(SPELL_LOOP_ICE);
|
||||
event.getRegistry().register(SPELL_HEAL);
|
||||
event.getRegistry().register(SPELL_ICE);
|
||||
event.getRegistry().register(SPELL_CONJURATION_LARGE);
|
||||
event.getRegistry().register(SPELL_MAGIC);
|
||||
event.getRegistry().register(SPELL_LOOP_SPARKLE);
|
||||
event.getRegistry().register(SPELL_LOOP_WIND);
|
||||
event.getRegistry().register(SPELL_EARTHQUAKE);
|
||||
event.getRegistry().register(SPELL_FORCE);
|
||||
event.getRegistry().register(SELECT_SPELL);
|
||||
|
||||
event.getRegistry().register(BLOCK_ARCANE_WORKBENCH_SPELLBIND);
|
||||
event.getRegistry().register(BLOCK_PEDESTAL_ACTIVATE);
|
||||
event.getRegistry().register(BLOCK_PEDESTAL_CONQUER);
|
||||
|
||||
event.getRegistry().register(ITEM_WAND_SWITCH_SPELL);
|
||||
event.getRegistry().register(ITEM_WAND_LEVELUP);
|
||||
event.getRegistry().register(ITEM_WAND_MELEE);
|
||||
event.getRegistry().register(ITEM_ARMOUR_EQUIP_SILK);
|
||||
event.getRegistry().register(ITEM_PURIFYING_ELIXIR_DRINK);
|
||||
|
||||
event.getRegistry().register(ENTITY_BLACK_HOLE_AMBIENT);
|
||||
event.getRegistry().register(ENTITY_BLACK_HOLE_VANISH);
|
||||
event.getRegistry().register(ENTITY_BUBBLE_POP);
|
||||
event.getRegistry().register(ENTITY_BLIZZARD_AMBIENT);
|
||||
event.getRegistry().register(ENTITY_DECAY_AMBIENT);
|
||||
event.getRegistry().register(ENTITY_ENTRAPMENT_AMBIENT);
|
||||
event.getRegistry().register(ENTITY_ENTRAPMENT_VANISH);
|
||||
event.getRegistry().register(ENTITY_FIRE_RING_AMBIENT);
|
||||
event.getRegistry().register(ENTITY_FIRE_SIGIL_TRIGGER);
|
||||
event.getRegistry().register(ENTITY_FORCEFIELD_DEFLECT);
|
||||
event.getRegistry().register(ENTITY_FROST_SIGIL_TRIGGER);
|
||||
event.getRegistry().register(ENTITY_HAMMER_ATTACK);
|
||||
event.getRegistry().register(ENTITY_HAMMER_EXPLODE);
|
||||
event.getRegistry().register(ENTITY_HAMMER_THROW);
|
||||
event.getRegistry().register(ENTITY_HAMMER_LAND);
|
||||
event.getRegistry().register(ENTITY_HEAL_AURA_AMBIENT);
|
||||
event.getRegistry().register(ENTITY_ICE_SPIKE_EXTEND);
|
||||
event.getRegistry().register(ENTITY_LIGHTNING_SIGIL_TRIGGER);
|
||||
event.getRegistry().register(ENTITY_METEOR_FALLING);
|
||||
event.getRegistry().register(ENTITY_SHIELD_DEFLECT);
|
||||
event.getRegistry().register(ENTITY_TORNADO_AMBIENT);
|
||||
|
||||
event.getRegistry().register(ENTITY_EVIL_WIZARD_AMBIENT);
|
||||
event.getRegistry().register(ENTITY_EVIL_WIZARD_HURT);
|
||||
event.getRegistry().register(ENTITY_EVIL_WIZARD_DEATH);
|
||||
event.getRegistry().register(ENTITY_ICE_GIANT_ATTACK);
|
||||
event.getRegistry().register(ENTITY_ICE_GIANT_DESPAWN);
|
||||
event.getRegistry().register(ENTITY_ICE_WRAITH_AMBIENT);
|
||||
event.getRegistry().register(ENTITY_MAGIC_SLIME_ATTACK);
|
||||
event.getRegistry().register(ENTITY_MAGIC_SLIME_EXPLODE);
|
||||
event.getRegistry().register(ENTITY_MAGIC_SLIME_SPLAT);
|
||||
event.getRegistry().register(ENTITY_PHOENIX_AMBIENT);
|
||||
event.getRegistry().register(ENTITY_PHOENIX_BURN);
|
||||
event.getRegistry().register(ENTITY_PHOENIX_FLAP);
|
||||
event.getRegistry().register(ENTITY_PHOENIX_HURT);
|
||||
event.getRegistry().register(ENTITY_PHOENIX_DEATH);
|
||||
event.getRegistry().register(ENTITY_SHADOW_WRAITH_AMBIENT);
|
||||
event.getRegistry().register(ENTITY_SHADOW_WRAITH_NOISE);
|
||||
event.getRegistry().register(ENTITY_SHADOW_WRAITH_HURT);
|
||||
event.getRegistry().register(ENTITY_SHADOW_WRAITH_DEATH);
|
||||
event.getRegistry().register(ENTITY_SPIRIT_HORSE_VANISH);
|
||||
event.getRegistry().register(ENTITY_SPIRIT_WOLF_VANISH);
|
||||
event.getRegistry().register(ENTITY_STORM_ELEMENTAL_AMBIENT);
|
||||
event.getRegistry().register(ENTITY_STORM_ELEMENTAL_BURN);
|
||||
event.getRegistry().register(ENTITY_STORM_ELEMENTAL_WIND);
|
||||
event.getRegistry().register(ENTITY_STORM_ELEMENTAL_HURT);
|
||||
event.getRegistry().register(ENTITY_STORM_ELEMENTAL_DEATH);
|
||||
event.getRegistry().register(ENTITY_WIZARD_YES);
|
||||
event.getRegistry().register(ENTITY_WIZARD_NO);
|
||||
event.getRegistry().register(ENTITY_WIZARD_AMBIENT);
|
||||
event.getRegistry().register(ENTITY_WIZARD_TRADING);
|
||||
event.getRegistry().register(ENTITY_WIZARD_HURT);
|
||||
event.getRegistry().register(ENTITY_WIZARD_DEATH);
|
||||
|
||||
event.getRegistry().register(ENTITY_DARKNESS_ORB_HIT);
|
||||
event.getRegistry().register(ENTITY_DART_HIT);
|
||||
event.getRegistry().register(ENTITY_DART_HIT_BLOCK);
|
||||
event.getRegistry().register(ENTITY_FIREBOLT_HIT);
|
||||
event.getRegistry().register(ENTITY_FIREBOMB_THROW);
|
||||
event.getRegistry().register(ENTITY_FIREBOMB_SMASH);
|
||||
event.getRegistry().register(ENTITY_FIREBOMB_FIRE);
|
||||
event.getRegistry().register(ENTITY_FORCE_ARROW_HIT);
|
||||
event.getRegistry().register(ENTITY_FORCE_ORB_HIT);
|
||||
event.getRegistry().register(ENTITY_FORCE_ORB_HIT_BLOCK);
|
||||
event.getRegistry().register(ENTITY_ICEBALL_HIT);
|
||||
event.getRegistry().register(ENTITY_ICE_CHARGE_SMASH);
|
||||
event.getRegistry().register(ENTITY_ICE_CHARGE_ICE);
|
||||
event.getRegistry().register(ENTITY_ICE_LANCE_SMASH);
|
||||
event.getRegistry().register(ENTITY_ICE_LANCE_HIT);
|
||||
event.getRegistry().register(ENTITY_ICE_SHARD_SMASH);
|
||||
event.getRegistry().register(ENTITY_ICE_SHARD_HIT);
|
||||
event.getRegistry().register(ENTITY_LIGHTNING_ARROW_HIT);
|
||||
event.getRegistry().register(ENTITY_LIGHTNING_DISC_HIT);
|
||||
// event.getRegistry().register(ENTITY_MAGIC_FIREBALL_HIT);
|
||||
event.getRegistry().register(ENTITY_MAGIC_MISSILE_HIT);
|
||||
event.getRegistry().register(ENTITY_POISON_BOMB_THROW);
|
||||
event.getRegistry().register(ENTITY_POISON_BOMB_SMASH);
|
||||
event.getRegistry().register(ENTITY_POISON_BOMB_POISON);
|
||||
event.getRegistry().register(ENTITY_SMOKE_BOMB_THROW);
|
||||
event.getRegistry().register(ENTITY_SMOKE_BOMB_SMASH);
|
||||
event.getRegistry().register(ENTITY_SMOKE_BOMB_SMOKE);
|
||||
event.getRegistry().register(ENTITY_HOMING_SPARK_HIT);
|
||||
event.getRegistry().register(ENTITY_SPARK_BOMB_THROW);
|
||||
event.getRegistry().register(ENTITY_SPARK_BOMB_HIT);
|
||||
event.getRegistry().register(ENTITY_SPARK_BOMB_HIT_BLOCK);
|
||||
event.getRegistry().register(ENTITY_SPARK_BOMB_CHAIN);
|
||||
event.getRegistry().register(ENTITY_THUNDERBOLT_HIT);
|
||||
|
||||
event.getRegistry().register(SPELL_STATIC_AURA_RETALIATE);
|
||||
event.getRegistry().register(SPELL_CURSE_OF_SOULBINDING_RETALIATE);
|
||||
event.getRegistry().register(SPELL_TRANSPORTATION_TRAVEL);
|
||||
|
||||
event.getRegistry().register(MISC_DISCOVER_SPELL);
|
||||
event.getRegistry().register(MISC_BOOK_OPEN);
|
||||
event.getRegistry().register(MISC_PAGE_TURN);
|
||||
event.getRegistry().register(MISC_FREEZE);
|
||||
|
||||
for(Spell spell : Spell.getSpells(Spell.allSpells)){
|
||||
event.getRegistry().registerAll(spell.getSounds());
|
||||
}
|
||||
|
||||
for(Forfeit forfeit : Forfeit.getForfeits()){
|
||||
event.getRegistry().register(forfeit.getSound());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,5 @@
|
||||
package electroblob.wizardry.registry;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
import electroblob.wizardry.item.ItemScroll;
|
||||
import electroblob.wizardry.item.ItemSpellBook;
|
||||
import electroblob.wizardry.spell.Spell;
|
||||
@@ -15,6 +10,10 @@ import net.minecraft.util.NonNullList;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Class responsible for defining and storing all of wizardry's creative tabs. Also handles sorting of the items.
|
||||
*
|
||||
@@ -23,111 +22,100 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
*/
|
||||
public final class WizardryTabs {
|
||||
|
||||
private static Comparator<ItemStack> itemSorter;
|
||||
private static Comparator<ItemStack> spellItemSorter;
|
||||
private WizardryTabs(){} // No instances!
|
||||
|
||||
// Creative Tabs
|
||||
public static final CreativeTabs WIZARDRY = new CreativeTabs("ebwizardry"){
|
||||
public static final CreativeTabs WIZARDRY = new CreativeTabListed("ebwizardry");
|
||||
public static final CreativeTabs GEAR = new CreativeTabListed("ebwizardrygear");
|
||||
public static final CreativeTabs SPELLS = new CreativeTabSorted("ebwizardryspells",
|
||||
|
||||
(stack1, stack2) -> {
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ItemStack createIcon(){
|
||||
return new ItemStack(WizardryItems.wizard_handbook);
|
||||
}
|
||||
if((stack1.getItem() instanceof ItemSpellBook && stack2.getItem() instanceof ItemSpellBook)
|
||||
|| (stack1.getItem() instanceof ItemScroll && stack2.getItem() instanceof ItemScroll)){
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void displayAllRelevantItems(NonNullList<ItemStack> items){
|
||||
super.displayAllRelevantItems(items);
|
||||
Collections.sort(items, itemSorter);
|
||||
}
|
||||
};
|
||||
Spell spell1 = Spell.byMetadata(stack1.getItemDamage());
|
||||
Spell spell2 = Spell.byMetadata(stack2.getItemDamage());
|
||||
|
||||
return spell1.compareTo(spell2);
|
||||
|
||||
}else if(stack1.getItem() instanceof ItemScroll){
|
||||
return 1;
|
||||
}else if(stack2.getItem() instanceof ItemScroll){
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
},
|
||||
|
||||
true);
|
||||
|
||||
public static final CreativeTabs SPELLS = new CreativeTabs("ebwizardryspells"){
|
||||
public static class CreativeTabSorted extends CreativeTabs {
|
||||
|
||||
private ItemStack iconItem;
|
||||
private final Comparator<? super ItemStack> sorter;
|
||||
private final boolean searchable;
|
||||
|
||||
public CreativeTabSorted(String label, Comparator<? super ItemStack> sorter){
|
||||
this(label, sorter, false);
|
||||
}
|
||||
|
||||
public CreativeTabSorted(String label, Comparator<? super ItemStack> sorter, boolean searchable){
|
||||
super(label);
|
||||
this.sorter = sorter;
|
||||
this.searchable = searchable;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ItemStack createIcon(){
|
||||
return new ItemStack(WizardryItems.spell_book);
|
||||
return iconItem;
|
||||
}
|
||||
|
||||
public void setIconItem(ItemStack iconItem){
|
||||
this.iconItem = iconItem;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void displayAllRelevantItems(NonNullList<ItemStack> items){
|
||||
super.displayAllRelevantItems(items);
|
||||
Collections.sort(items, spellItemSorter);
|
||||
items.sort(sorter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasSearchBar(){
|
||||
return true;
|
||||
return searchable;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public String getBackgroundImageName(){
|
||||
return "item_search.png";
|
||||
return searchable ? "item_search.png" : super.getBackgroundImageName();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public static class CreativeTabListed extends CreativeTabSorted {
|
||||
|
||||
/** Initialises the item sorters for the creative tabs. */
|
||||
public static void sort(){
|
||||
public final List<Item> order;
|
||||
|
||||
List<Item> orderedItemList = Arrays.asList(
|
||||
|
||||
Item.getItemFromBlock(WizardryBlocks.arcane_workbench),
|
||||
Item.getItemFromBlock(WizardryBlocks.crystal_ore), Item.getItemFromBlock(WizardryBlocks.crystal_block),
|
||||
Item.getItemFromBlock(WizardryBlocks.crystal_flower),
|
||||
Item.getItemFromBlock(WizardryBlocks.transportation_stone), WizardryItems.magic_crystal,
|
||||
WizardryItems.magic_wand, WizardryItems.apprentice_wand, WizardryItems.advanced_wand,
|
||||
WizardryItems.master_wand, WizardryItems.arcane_tome, WizardryItems.wizard_handbook,
|
||||
WizardryItems.basic_fire_wand, WizardryItems.basic_ice_wand, WizardryItems.basic_lightning_wand,
|
||||
WizardryItems.basic_necromancy_wand, WizardryItems.basic_earth_wand, WizardryItems.basic_sorcery_wand,
|
||||
WizardryItems.basic_healing_wand, WizardryItems.smoke_bomb, WizardryItems.firebomb,
|
||||
WizardryItems.poison_bomb, WizardryItems.blank_scroll, WizardryItems.identification_scroll,
|
||||
WizardryItems.mana_flask, WizardryItems.storage_upgrade, WizardryItems.siphon_upgrade,
|
||||
WizardryItems.condenser_upgrade, WizardryItems.range_upgrade, WizardryItems.duration_upgrade,
|
||||
WizardryItems.cooldown_upgrade, WizardryItems.blast_upgrade, WizardryItems.attunement_upgrade,
|
||||
WizardryItems.magic_silk, WizardryItems.armour_upgrade, WizardryItems.wizard_hat,
|
||||
WizardryItems.wizard_robe, WizardryItems.wizard_leggings, WizardryItems.wizard_boots,
|
||||
WizardryItems.wizard_hat_fire, WizardryItems.wizard_robe_fire, WizardryItems.wizard_leggings_fire,
|
||||
WizardryItems.wizard_boots_fire, WizardryItems.wizard_hat_ice, WizardryItems.wizard_robe_ice,
|
||||
WizardryItems.wizard_leggings_ice, WizardryItems.wizard_boots_ice, WizardryItems.wizard_hat_lightning,
|
||||
WizardryItems.wizard_robe_lightning, WizardryItems.wizard_leggings_lightning,
|
||||
WizardryItems.wizard_boots_lightning, WizardryItems.wizard_hat_necromancy,
|
||||
WizardryItems.wizard_robe_necromancy, WizardryItems.wizard_leggings_necromancy,
|
||||
WizardryItems.wizard_boots_necromancy, WizardryItems.wizard_hat_earth, WizardryItems.wizard_robe_earth,
|
||||
WizardryItems.wizard_leggings_earth, WizardryItems.wizard_boots_earth, WizardryItems.wizard_hat_sorcery,
|
||||
WizardryItems.wizard_robe_sorcery, WizardryItems.wizard_leggings_sorcery,
|
||||
WizardryItems.wizard_boots_sorcery, WizardryItems.wizard_hat_healing, WizardryItems.wizard_robe_healing,
|
||||
WizardryItems.wizard_leggings_healing, WizardryItems.wizard_boots_healing);
|
||||
|
||||
itemSorter = (stack1, stack2) -> {
|
||||
// Neither stack is in the creative tab
|
||||
if(!orderedItemList.contains(stack1.getItem()) && !orderedItemList.contains(stack2.getItem())) return 0;
|
||||
if(!orderedItemList.contains(stack1.getItem())) return 1; // Only stack 2 is in the creative tab
|
||||
if(!orderedItemList.contains(stack2.getItem())) return -1; // Only stack 1 is in the creative tab
|
||||
// Both stacks are in the creative tab
|
||||
return orderedItemList.indexOf(stack1.getItem()) - orderedItemList.indexOf(stack2.getItem());
|
||||
};
|
||||
|
||||
spellItemSorter = (stack1, stack2) -> {
|
||||
|
||||
if((stack1.getItem() instanceof ItemSpellBook && stack2.getItem() instanceof ItemSpellBook)
|
||||
|| (stack1.getItem() instanceof ItemScroll && stack2.getItem() instanceof ItemScroll)){
|
||||
|
||||
Spell spell1 = Spell.get(stack1.getItemDamage());
|
||||
Spell spell2 = Spell.get(stack2.getItemDamage());
|
||||
|
||||
return spell1.compareTo(spell2);
|
||||
|
||||
}else if(stack1.getItem() instanceof ItemScroll){
|
||||
return 1;
|
||||
}else if(stack2.getItem() instanceof ItemScroll){
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
public CreativeTabListed(String label){
|
||||
// Can't accomplish this in a single constructor... just a quirk of the java compiler!
|
||||
this(label, new ArrayList<>());
|
||||
}
|
||||
|
||||
// Hey, maybe someone might want to keep a reference to the list, or pass in a different one.
|
||||
public CreativeTabListed(String label, List<Item> order){
|
||||
|
||||
super(label, (stack1, stack2) -> {
|
||||
// Neither stack is in the creative tab
|
||||
if(!order.contains(stack1.getItem()) && !order.contains(stack2.getItem())) return 0;
|
||||
if(!order.contains(stack1.getItem())) return 1; // Only stack 2 is in the creative tab
|
||||
if(!order.contains(stack2.getItem())) return -1; // Only stack 1 is in the creative tab
|
||||
// Both stacks are in the creative tab
|
||||
return order.indexOf(stack1.getItem()) - order.indexOf(stack2.getItem());
|
||||
});
|
||||
|
||||
this.order = order;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user