Advertisement
Guest User

Untitled

a guest
Nov 30th, 2016
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.31 KB | None | 0 0
  1. package elec0.luxcraft.entities;
  2.  
  3. import elec0.luxcraft.tileentities.MirrorEntity;
  4. import net.minecraft.entity.Entity;
  5. import net.minecraft.nbt.NBTTagCompound;
  6. import net.minecraft.tileentity.TileEntity;
  7. import net.minecraft.world.World;
  8.  
  9. public class BeamEntity extends Entity
  10. {
  11.     public BeamEntity(World worldIn) {
  12.         super(worldIn);
  13.         this.isImmuneToFire = true;
  14.         this.ignoreFrustumCheck = true;
  15.        
  16.         setSize(0.1F, 0.5F);
  17.     }
  18.    
  19.     @Override
  20.     public void onUpdate()
  21.     {
  22.         super.onUpdate();
  23.         System.out.println("Beam entity update " + this.getUniqueID());
  24.         if(!worldObj.isRemote)
  25.         {
  26.             TileEntity e = this.worldObj.getTileEntity(this.getPosition());
  27.             if(e == null || !(e instanceof MirrorEntity))
  28.             {
  29.                 System.out.println("No mirror below, dying.");
  30.                 setDead(); // If a mirror isn't below the entity, kill it
  31.                
  32.             }
  33.         }
  34.     }
  35.    
  36.     /*protected void entityInit() {
  37.        
  38.     }*/
  39.  
  40.     @Override
  41.     public boolean canBeCollidedWith() {
  42.         return false;
  43.     }
  44.  
  45.     @Override
  46.     protected void entityInit() {
  47.         // TODO Auto-generated method stub
  48.        
  49.     }
  50.  
  51.     @Override
  52.     protected void readEntityFromNBT(NBTTagCompound compound) {
  53.         // TODO Auto-generated method stub
  54.        
  55.     }
  56.  
  57.     @Override
  58.     protected void writeEntityToNBT(NBTTagCompound compound) {
  59.         // TODO Auto-generated method stub
  60.        
  61.     }
  62.    
  63. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement