use of com.microsoft.Malmo.Schemas.ColourMapProducer in project malmo by Microsoft.
the class ColourMapProducerImplementation method parseParameters.
@Override
public boolean parseParameters(Object params) {
MinecraftForge.EVENT_BUS.register(this);
if (params == null || !(params instanceof ColourMapProducer))
return false;
this.cmParams = (ColourMapProducer) params;
for (MobWithColour mob : this.cmParams.getColourSpec()) {
byte[] col = mob.getColour();
int c = (col[2] & 0xff) + ((col[1] & 0xff) << 8) + ((col[0] & 0xff) << 16);
for (EntityTypes ent : mob.getType()) {
String mobName = ent.value();
this.mobColours.put(mobName, c);
}
}
miscColours.put("textures/environment/sun.png", 0xffff00);
miscColours.put("textures/environment/moon_phases.png", 0xffffff);
return true;
}
Aggregations