minecraft-src/net/minecraft/client/model/geom/ModelLayerLocation.java
2025-07-04 01:41:11 +03:00

43 lines
985 B
Java

package net.minecraft.client.model.geom;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.resources.ResourceLocation;
@Environment(EnvType.CLIENT)
public final class ModelLayerLocation {
private final ResourceLocation model;
private final String layer;
public ModelLayerLocation(ResourceLocation model, String layer) {
this.model = model;
this.layer = layer;
}
public ResourceLocation getModel() {
return this.model;
}
public String getLayer() {
return this.layer;
}
public boolean equals(Object object) {
if (this == object) {
return true;
} else {
return !(object instanceof ModelLayerLocation modelLayerLocation)
? false
: this.model.equals(modelLayerLocation.model) && this.layer.equals(modelLayerLocation.layer);
}
}
public int hashCode() {
int i = this.model.hashCode();
return 31 * i + this.layer.hashCode();
}
public String toString() {
return this.model + "#" + this.layer;
}
}