Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class CapabilityHandler
- {
- private static final ResourceLocation RUNECRAFT_LEVEL = new ResourceLocation(Reference.MODID, "runeCraftLevel");
- private static final ResourceLocation RUNEBAG_CAP = new ResourceLocation(Reference.MODID, "runeBagCapability");
- private static final ResourceLocation SPELL_CAST_LEVEL_CAP = new ResourceLocation(Reference.MODID, "spellCastLevel");
- private static final ResourceLocation LEARNED_SPELLS_CAPABILITY = new ResourceLocation(Reference.MODID, "learnedSpellList");
- private static final ResourceLocation RUNE_BLADE_CAPABILITY = new ResourceLocation(Reference.MODID, "runeBladeCapability");
- @SubscribeEvent
- public void attachCapability(AttachCapabilitiesEvent<Entity> event)
- {
- if (!(event.getObject() instanceof EntityPlayer)) return;
- event.addCapability(RUNECRAFT_LEVEL, new rcLvl_Provider());
- event.addCapability(RUNEBAG_CAP, new RuneBagProvider());
- event.addCapability(SPELL_CAST_LEVEL_CAP, new SpellCastLvLProvider());
- event.addCapability(LEARNED_SPELLS_CAPABILITY, new LearnedSpellsMain.LearnedSpellsProvider());
- }
- }
Add Comment
Please, Sign In to add comment