package me.km.entities; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.entity.MoverType; import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.SoundEvent; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class EntityNobody extends Entity { public EntityNobody(World w) { super(w); } @Override public void onUpdate() { this.onEntityUpdate(); } @Override public void onEntityUpdate() { this.world.profiler.startSection("entityBaseTick"); if(this.isRiding() && this.getRidingEntity().isDead) { this.dismountRidingEntity(); } if(this.rideCooldown > 0) { --this.rideCooldown; } if(this.posY < -64.0D) { this.outOfWorld(); } this.firstUpdate = false; this.world.profiler.endSection(); } @Override public void move(MoverType type, double x, double y, double z) { } @Override protected void doBlockCollisions() { } @Override public void playSound(SoundEvent soundIn, float volume, float pitch) { } @Override public boolean isSilent() { return true; } @Override public void setSilent(boolean isSilent) { } @Override public boolean hasNoGravity() { return true; } @Override public void setNoGravity(boolean noGravity) { } @Override protected boolean canTriggerWalking() { return false; } @Override protected void updateFallState(double y, boolean onGroundIn, IBlockState state, BlockPos pos) { } @Override protected void dealFireDamage(int amount) { } @Override public boolean isWet() { return false; } @Override public boolean isInWater() { return false; } @Override public boolean isOverWater() { return false; } @Override public boolean handleWaterMovement() { return false; } @Override protected void doWaterSplashEffect() { } @Override public void spawnRunningParticles() { } @Override protected void createRunningParticles() { } @Override public boolean isInsideOfMaterial(Material materialIn) { return false; } @Override public boolean isInLava() { return false; } @Override public void moveRelative(float strafe, float up, float forward, float friction) { } @SideOnly(Side.CLIENT) @Override public int getBrightnessForRender() { return 0; } @Override public float getBrightness() { return 0; } @Override public void applyEntityCollision(Entity entityIn) { } @Override public void addVelocity(double x, double y, double z) { } @Override public void setPortal(BlockPos pos) { } @Override public void onStruckByLightning(EntityLightningBolt lightningBolt) { } @Override protected boolean pushOutOfBlocks(double x, double y, double z) { return false; } @Override public String getName() { if(this.hasCustomName()) { return this.getCustomNameTag(); } return "Nobody"; } @Override public boolean isPushedByWater() { return true; } @Override protected void entityInit() { } @Override protected void readEntityFromNBT(NBTTagCompound compound) { } @Override protected void writeEntityToNBT(NBTTagCompound compound) { } }