mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-02-13 16:24:23 +01:00
Removed the stream
This commit is contained in:
parent
e618f3f2f6
commit
d58d854354
1 changed files with 7 additions and 13 deletions
|
@ -15,7 +15,6 @@ import com.minelittlepony.model.armour.IArmourTextureResolver;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
public class DefaultArmourTextureResolver<T extends LivingEntity> implements IArmourTextureResolver<T> {
|
public class DefaultArmourTextureResolver<T extends LivingEntity> implements IArmourTextureResolver<T> {
|
||||||
|
@ -55,10 +54,13 @@ public class DefaultArmourTextureResolver<T extends LivingEntity> implements IAr
|
||||||
|
|
||||||
ResourceManager manager = MinecraftClient.getInstance().getResourceManager();
|
ResourceManager manager = MinecraftClient.getInstance().getResourceManager();
|
||||||
|
|
||||||
return Arrays.stream(resources)
|
for (Identifier i : resources) {
|
||||||
.filter(manager::containsResource)
|
if (manager.containsResource(i)) {
|
||||||
.findFirst()
|
return i;
|
||||||
.orElse(resources[resources.length - 1]);
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return resources[resources.length - 1];
|
||||||
}
|
}
|
||||||
|
|
||||||
private Identifier ponifyResource(Identifier human) {
|
private Identifier ponifyResource(Identifier human) {
|
||||||
|
@ -76,11 +78,3 @@ public class DefaultArmourTextureResolver<T extends LivingEntity> implements IAr
|
||||||
return HUMAN_ARMOUR.computeIfAbsent(ForgeProxy.getArmorTexture(entity, item, def, slot, type), Identifier::new);
|
return HUMAN_ARMOUR.computeIfAbsent(ForgeProxy.getArmorTexture(entity, item, def, slot, type), Identifier::new);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue