25 lines
		
	
	
	
		
			601 B
		
	
	
	
		
			Java
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
	
		
			601 B
		
	
	
	
		
			Java
		
	
	
	
	
	
| package net.minecraft.network.syncher;
 | |
| 
 | |
| /**
 | |
|  * A Key for {@link SynchedEntityData}.
 | |
|  */
 | |
| public record EntityDataAccessor<T>(int id, EntityDataSerializer<T> serializer) {
 | |
| 	public boolean equals(Object object) {
 | |
| 		if (this == object) {
 | |
| 			return true;
 | |
| 		} else if (object != null && this.getClass() == object.getClass()) {
 | |
| 			EntityDataAccessor<?> entityDataAccessor = (EntityDataAccessor<?>)object;
 | |
| 			return this.id == entityDataAccessor.id;
 | |
| 		} else {
 | |
| 			return false;
 | |
| 		}
 | |
| 	}
 | |
| 
 | |
| 	public int hashCode() {
 | |
| 		return this.id;
 | |
| 	}
 | |
| 
 | |
| 	public String toString() {
 | |
| 		return "<entity data: " + this.id + ">";
 | |
| 	}
 | |
| }
 |