Allow Creative players to bypass Aura of Expulsion
This commit is contained in:
parent
9fb1f61a6a
commit
fa78706fca
1 changed files with 7 additions and 0 deletions
|
@ -16,6 +16,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.entity.player.EntityPlayerMP;
|
import net.minecraft.entity.player.EntityPlayerMP;
|
||||||
import net.minecraft.inventory.IInventory;
|
import net.minecraft.inventory.IInventory;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.server.MinecraftServer;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.MathHelper;
|
import net.minecraft.util.MathHelper;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
@ -157,6 +158,12 @@ public class RitualEffectExpulsion extends RitualEffect
|
||||||
|
|
||||||
public boolean teleportRandomly(EntityLivingBase entityLiving, double distance)
|
public boolean teleportRandomly(EntityLivingBase entityLiving, double distance)
|
||||||
{
|
{
|
||||||
|
if (entityLiving instanceof EntityPlayer) {
|
||||||
|
EntityPlayer player = (EntityPlayer) entityLiving;
|
||||||
|
if (player.capabilities.isCreativeMode)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
double x = entityLiving.posX;
|
double x = entityLiving.posX;
|
||||||
double y = entityLiving.posY;
|
double y = entityLiving.posY;
|
||||||
double z = entityLiving.posZ;
|
double z = entityLiving.posZ;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue