001 package net.minecraft.entity; 002 003 public class WatchableObject 004 { 005 private final int objectType; 006 007 /** id of max 31 */ 008 private final int dataValueId; 009 private Object watchedObject; 010 private boolean watched; 011 012 public WatchableObject(int par1, int par2, Object par3Obj) 013 { 014 this.dataValueId = par2; 015 this.watchedObject = par3Obj; 016 this.objectType = par1; 017 this.watched = true; 018 } 019 020 public int getDataValueId() 021 { 022 return this.dataValueId; 023 } 024 025 public void setObject(Object par1Obj) 026 { 027 this.watchedObject = par1Obj; 028 } 029 030 public Object getObject() 031 { 032 return this.watchedObject; 033 } 034 035 public int getObjectType() 036 { 037 return this.objectType; 038 } 039 040 public boolean isWatched() 041 { 042 return this.watched; 043 } 044 045 public void setWatched(boolean par1) 046 { 047 this.watched = par1; 048 } 049 050 /** 051 * Set whether the specified watchable object is being watched. 052 */ 053 static boolean setWatchableObjectWatched(WatchableObject par0WatchableObject, boolean par1) 054 { 055 return par0WatchableObject.watched = par1; 056 } 057 }