2022-10-28 16:20:12 +02:00
|
|
|
package mffs.item.module.projector;
|
|
|
|
|
|
|
|
import mffs.ModularForceFieldSystem;
|
|
|
|
import mffs.item.module.ItemModule;
|
|
|
|
import net.minecraft.entity.Entity;
|
|
|
|
import net.minecraft.entity.EntityLiving;
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
import net.minecraft.world.World;
|
|
|
|
|
|
|
|
public class ItemModuleShock extends ItemModule {
|
2023-01-08 16:58:21 +01:00
|
|
|
public ItemModuleShock() {
|
|
|
|
super("moduleShock");
|
|
|
|
}
|
2022-10-28 16:20:12 +02:00
|
|
|
|
2023-01-08 16:58:21 +01:00
|
|
|
@Override
|
|
|
|
public boolean onCollideWithForceField(
|
|
|
|
final World world,
|
|
|
|
final int x,
|
|
|
|
final int y,
|
|
|
|
final int z,
|
|
|
|
final Entity entity,
|
|
|
|
final ItemStack moduleStack
|
|
|
|
) {
|
|
|
|
if (entity instanceof EntityLiving) {
|
|
|
|
entity.attackEntityFrom(
|
|
|
|
ModularForceFieldSystem.damagefieldShock, moduleStack.stackSize
|
|
|
|
);
|
|
|
|
}
|
|
|
|
return false;
|
2022-10-28 16:20:12 +02:00
|
|
|
}
|
|
|
|
}
|