Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. package com.uranium.UraniumFevermod;
  2.  
  3. import net.minecraft.entity.EntityLiving;
  4. import net.minecraft.entity.EntityLivingBase;
  5. import net.minecraft.potion.PotionEffect;
  6. import net.minecraft.tileentity.TileEntity;
  7. import net.minecraft.world.World;
  8.  
  9. public class TileEntitynuclearWasteBarrel extends TileEntity {
  10.  
  11. public int direction;
  12.  
  13. public void TileEntityDetection() {
  14.  
  15. }
  16. EntityLiving entity;
  17.  
  18. public boolean anyPlayerInRange() {
  19. return this.worldObj.getClosestPlayer((double)this.xCoord + 0.5D, (double)this.yCoord + 0.5D, (double)this.zCoord + 0.5D, 5) != null;
  20. }
  21.  
  22. public void updateEntity() {
  23. if(this.anyPlayerInRange()){
  24. if (!this.worldObj.isRemote) {
  25. entity.addPotionEffect(new PotionEffect(UraniumFeverMod.Rads.getId(), 100, 0));
  26. }
  27. }
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement