use of com.lying.variousoddities.entity.mount.EntityWarg in project VariousOddities by Lyinginbedmon.
the class PacketSit method handle.
public static void handle(PacketSit msg, Supplier<NetworkEvent.Context> cxt) {
NetworkEvent.Context context = cxt.get();
if (context.getDirection().getReceptionSide().isServer()) {
World world = context.getSender().getEntityWorld();
PlayerEntity player = world.getPlayerByUuid(msg.playerID);
if (player != null)
if (player.getRidingEntity() != null && player.getRidingEntity().getType() == VOEntities.WARG) {
EntityWarg warg = (EntityWarg) player.getRidingEntity();
warg.func_233687_w_(msg.sitting);
}
}
context.setPacketHandled(true);
}
use of com.lying.variousoddities.entity.mount.EntityWarg in project VariousOddities by Lyinginbedmon.
the class EntityWorg method func_241840_a.
public AgeableEntity func_241840_a(ServerWorld arg0, AgeableEntity arg1) {
if (arg1.getType() == VOEntities.WORG) {
EntityWorg worg2 = (EntityWorg) arg1;
Genetics genesA = getGenetics();
Genetics genesB = worg2.getGenetics();
Genetics genesC = Genetics.cross(genesA, genesB, getRNG());
AbstractGoblinWolf offspring;
if (genesC.gene(6) == false && genesC.gene(7) == false) {
EntityWarg warg = VOEntities.WARG.create(arg0);
warg.setGenetics(genesC);
offspring = warg;
} else {
EntityWorg worg = VOEntities.WORG.create(arg0);
worg.setGenetics(genesC);
offspring = worg;
}
offspring.setColor(getRNG().nextBoolean() ? getColor() : worg2.getColor());
return offspring;
}
return null;
}
Aggregations