19 lines
630 B
Java
19 lines
630 B
Java
package com.atsuishio.superbwarfare.capability;
|
|
|
|
import net.minecraft.world.entity.Entity;
|
|
import net.minecraft.world.entity.player.Player;
|
|
import net.minecraftforge.event.AttachCapabilitiesEvent;
|
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
|
import net.minecraftforge.fml.common.Mod;
|
|
|
|
@Mod.EventBusSubscriber()
|
|
public class CapabilityHandler {
|
|
|
|
@SubscribeEvent
|
|
public static void registerCapabilities(AttachCapabilitiesEvent<Entity> event) {
|
|
if (event.getObject() instanceof Player) {
|
|
event.addCapability(LaserCapability.ID, new LaserCapability.LaserCapabilityProvider());
|
|
}
|
|
}
|
|
|
|
}
|