Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- public class gd extends arj implements aiq, aro
- {
- public gd(acz acz1)
- {
- this(acz1, 0);
- }
- public gd(acz acz1, int j)
- {
- super(acz1);
- b = 0;
- c = false;
- d = false;
- a = null;
- f_(j);
- bo = "/mob/villager/villager.png";
- cl = 0.5F;
- aP().b(true);
- aP().a(true);
- bV.a(0, new aqt(this));
- bV.a(1, new hj(this, aqw, 8F, 0.3F, 0.35F));
- bV.a(1, new is(this));
- bV.a(1, new qb(this));
- bV.a(2, new cs(this));
- bV.a(3, new ys(this));
- bV.a(4, new ajp(this, true));
- bV.a(5, new abf(this, 0.3F));
- bV.a(6, new ada(this));
- bV.a(7, new aeg(this));
- bV.a(8, new zy(this, 0.32F));
- bV.a(9, new aan(this, aex, 3F, 1.0F));
- bV.a(9, new aan(this, gd, 5F, 0.02F));
- bV.a(9, new ajl(this, 0.3F));
- bV.a(10, new rw(this, ajf, 8F));
- }
- public boolean b_()
- {
- return true;
- }
- protected void g()
- {
- if(--b <= 0)
- {
- o.B.a(iv.c(s), iv.c(t), iv.c(u));
- b = 70 + Y.nextInt(50);
- a = o.B.a(iv.c(s), iv.c(t), iv.c(u), 32);
- if(a == null)
- {
- ba();
- } else
- {
- zi zi1 = a.a();
- b(zi1.a, zi1.b, zi1.c, a.b());
- }
- }
- if(!A() && g > 0)
- {
- g--;
- if(g <= 0)
- {
- i(1);
- e(new atg(agj.l.H, 200, 0));
- }
- }
- super.g();
- }
- public boolean b_(aex aex1)
- {
- if(!A() && !bk())
- {
- if(!o.H)
- {
- c_(aex1);
- aex1.a(this);
- }
- return true;
- } else
- {
- return super.b_(aex1);
- }
- }
- protected void b()
- {
- super.b();
- ag.a(16, Integer.valueOf(0));
- }
- public int d()
- {
- return 20;
- }
- public void b(akt akt1)
- {
- super.b(akt1);
- akt1.a("Profession", x());
- akt1.a("Riches", as);
- if(f != null)
- akt1.a("Offers", f.a());
- }
- public void a(akt akt1)
- {
- super.a(akt1);
- f_(akt1.f("Profession"));
- as = akt1.f("Riches");
- if(akt1.c("Offers"))
- {
- akt akt2 = akt1.m("Offers");
- f = new ia(akt2);
- }
- }
- public String u()
- {
- switch(x())
- {
- case 0: // '\0'
- return "/mob/villager/farmer.png";
- case 1: // '\001'
- return "/mob/villager/librarian.png";
- case 2: // '\002'
- return "/mob/villager/priest.png";
- case 3: // '\003'
- return "/mob/villager/smith.png";
- case 4: // '\004'
- return "/mob/villager/butcher.png";
- }
- return super.u();
- }
- protected boolean d_()
- {
- return false;
- }
- protected String m()
- {
- return "mob.villager.default";
- }
- protected String n()
- {
- return "mob.villager.defaulthurt";
- }
- protected String c_()
- {
- return "mob.villager.defaultdeath";
- }
- public void f_(int j)
- {
- ag.b(16, Integer.valueOf(j));
- }
- public int x()
- {
- return ag.c(16);
- }
- public boolean J_()
- {
- return c;
- }
- public void a(boolean flag)
- {
- c = flag;
- }
- public void b(boolean flag)
- {
- d = flag;
- }
- public boolean z()
- {
- return d;
- }
- public void a(ajf ajf1)
- {
- super.a(ajf1);
- if(a != null && ajf1 != null)
- a.a(ajf1);
- }
- public void c_(aex aex1)
- {
- e = aex1;
- }
- public aex a()
- {
- return e;
- }
- public boolean A()
- {
- return e != null;
- }
- public void a(aof aof1)
- {
- if(aof1.a((aof)f.get(f.size() - 1)))
- g = 60;
- if(aof1.a().c == aeq.bH.bT)
- as += aof1.a().a;
- }
- public ia b(aex aex1)
- {
- if(f == null)
- i(1);
- return f;
- }
- private void i(int j)
- {
- ia ia1 = new ia();
- switch(x())
- {
- case 0: // '\0'
- a(ia1, aeq.T.bT, Y, 0.9F);
- a(ia1, tg.ab.bX, Y, 0.5F);
- a(ia1, aeq.bk.bT, Y, 0.5F);
- a(ia1, aeq.aV.bT, Y, 0.4F);
- b(ia1, aeq.U.bT, Y, 0.9F);
- b(ia1, aeq.bf.bT, Y, 0.3F);
- b(ia1, aeq.j.bT, Y, 0.3F);
- b(ia1, aeq.bc.bT, Y, 0.3F);
- b(ia1, aeq.be.bT, Y, 0.3F);
- b(ia1, aeq.i.bT, Y, 0.3F);
- b(ia1, aeq.bl.bT, Y, 0.3F);
- b(ia1, aeq.l.bT, Y, 0.5F);
- if(Y.nextFloat() < 0.5F)
- ia1.add(new aof(new agv(tg.F, 10), new agv(aeq.bH), new agv(aeq.ap.bT, 2 + Y.nextInt(2), 0)));
- break;
- case 4: // '\004'
- a(ia1, aeq.m.bT, Y, 0.7F);
- a(ia1, aeq.aq.bT, Y, 0.5F);
- a(ia1, aeq.bi.bT, Y, 0.5F);
- b(ia1, aeq.aA.bT, Y, 0.1F);
- b(ia1, aeq.W.bT, Y, 0.3F);
- b(ia1, aeq.Y.bT, Y, 0.3F);
- b(ia1, aeq.V.bT, Y, 0.3F);
- b(ia1, aeq.X.bT, Y, 0.3F);
- b(ia1, aeq.ar.bT, Y, 0.3F);
- b(ia1, aeq.bj.bT, Y, 0.3F);
- break;
- case 3: // '\003'
- a(ia1, aeq.m.bT, Y, 0.7F);
- a(ia1, aeq.o.bT, Y, 0.5F);
- a(ia1, aeq.p.bT, Y, 0.5F);
- a(ia1, aeq.n.bT, Y, 0.5F);
- b(ia1, aeq.q.bT, Y, 0.5F);
- b(ia1, aeq.z.bT, Y, 0.5F);
- b(ia1, aeq.h.bT, Y, 0.3F);
- b(ia1, aeq.C.bT, Y, 0.3F);
- b(ia1, aeq.g.bT, Y, 0.5F);
- b(ia1, aeq.B.bT, Y, 0.5F);
- b(ia1, aeq.f.bT, Y, 0.2F);
- b(ia1, aeq.A.bT, Y, 0.2F);
- b(ia1, aeq.P.bT, Y, 0.2F);
- b(ia1, aeq.Q.bT, Y, 0.2F);
- b(ia1, aeq.ag.bT, Y, 0.2F);
- b(ia1, aeq.ak.bT, Y, 0.2F);
- b(ia1, aeq.ad.bT, Y, 0.2F);
- b(ia1, aeq.ah.bT, Y, 0.2F);
- b(ia1, aeq.ae.bT, Y, 0.2F);
- b(ia1, aeq.ai.bT, Y, 0.2F);
- b(ia1, aeq.af.bT, Y, 0.2F);
- b(ia1, aeq.aj.bT, Y, 0.2F);
- b(ia1, aeq.ac.bT, Y, 0.1F);
- b(ia1, aeq.Z.bT, Y, 0.1F);
- b(ia1, aeq.aa.bT, Y, 0.1F);
- b(ia1, aeq.ab.bT, Y, 0.1F);
- break;
- case 1: // '\001'
- a(ia1, aeq.aK.bT, Y, 0.8F);
- a(ia1, aeq.aL.bT, Y, 0.8F);
- a(ia1, aeq.bG.bT, Y, 1.3F);
- b(ia1, tg.an.bX, Y, 0.8F);
- b(ia1, tg.M.bX, Y, 0.2F);
- b(ia1, aeq.aQ.bT, Y, 0.2F);
- b(ia1, aeq.aS.bT, Y, 0.2F);
- break;
- case 2: // '\002'
- b(ia1, aeq.bA.bT, Y, 0.3F);
- b(ia1, aeq.bD.bT, Y, 0.2F);
- b(ia1, aeq.aC.bT, Y, 0.4F);
- b(ia1, tg.bd.bX, Y, 0.3F);
- int ai[] = {
- aeq.q.bT, aeq.z.bT, aeq.ae.bT, aeq.ai.bT, aeq.h.bT, aeq.C.bT, aeq.g.bT, aeq.B.bT
- };
- int ai1[] = ai;
- int l = ai1.length;
- for(int i1 = 0; i1 < l; i1++)
- {
- int j1 = ai1[i1];
- if(Y.nextFloat() < 0.1F)
- ia1.add(new aof(new agv(j1, 1, 0), new agv(aeq.bH, 2 + Y.nextInt(3), 0), aqf.a(Y, new agv(j1, 1, 0), 5 + Y.nextInt(15))));
- }
- break;
- }
- if(ia1.isEmpty())
- a(ia1, aeq.p.bT, Y, 1.0F);
- Collections.shuffle(ia1);
- if(f == null)
- f = new ia();
- for(int k = 0; k < j && k < ia1.size(); k++)
- f.a((aof)ia1.get(k));
- }
- public void a(ia ia1)
- {
- }
- private static void a(ia ia1, int j, Random random, float f1)
- {
- if(random.nextFloat() < f1)
- ia1.add(new aof(a(j, random), aeq.bH));
- }
- private static agv a(int j, Random random)
- {
- return new agv(j, b(j, random), 0);
- }
- private static int b(int j, Random random)
- {
- ey ey1 = (ey)at.get(Integer.valueOf(j));
- if(ey1 == null)
- return 1;
- if(((Integer)ey1.a()).intValue() >= ((Integer)ey1.b()).intValue())
- return ((Integer)ey1.a()).intValue();
- else
- return ((Integer)ey1.a()).intValue() + random.nextInt(((Integer)ey1.b()).intValue() - ((Integer)ey1.a()).intValue());
- }
- private static void b(ia ia1, int j, Random random, float f1)
- {
- if(random.nextFloat() < f1)
- {
- int k = c(j, random);
- agv agv1;
- agv agv2;
- if(k < 0)
- {
- agv1 = new agv(aeq.bH.bT, 1, 0);
- agv2 = new agv(j, -k, 0);
- } else
- {
- agv1 = new agv(aeq.bH.bT, k, 0);
- agv2 = new agv(j, 1, 0);
- }
- ia1.add(new aof(agv1, agv2));
- }
- }
- private static int c(int j, Random random)
- {
- ey ey1 = (ey)au.get(Integer.valueOf(j));
- if(ey1 == null)
- return 1;
- if(((Integer)ey1.a()).intValue() >= ((Integer)ey1.b()).intValue())
- return ((Integer)ey1.a()).intValue();
- else
- return ((Integer)ey1.a()).intValue() + random.nextInt(((Integer)ey1.b()).intValue() - ((Integer)ey1.a()).intValue());
- }
- private int b;
- private boolean c;
- private boolean d;
- nh a;
- private aex e;
- private ia f;
- private int g;
- private int as;
- private static final Map at;
- private static final Map au;
- static
- {
- at = new HashMap();
- au = new HashMap();
- at.put(Integer.valueOf(aeq.m.bT), new ey(Integer.valueOf(16), Integer.valueOf(24)));
- at.put(Integer.valueOf(aeq.o.bT), new ey(Integer.valueOf(8), Integer.valueOf(10)));
- at.put(Integer.valueOf(aeq.p.bT), new ey(Integer.valueOf(8), Integer.valueOf(10)));
- at.put(Integer.valueOf(aeq.n.bT), new ey(Integer.valueOf(4), Integer.valueOf(6)));
- at.put(Integer.valueOf(aeq.aK.bT), new ey(Integer.valueOf(19), Integer.valueOf(30)));
- at.put(Integer.valueOf(aeq.aL.bT), new ey(Integer.valueOf(12), Integer.valueOf(15)));
- at.put(Integer.valueOf(aeq.bG.bT), new ey(Integer.valueOf(1), Integer.valueOf(1)));
- at.put(Integer.valueOf(aeq.bn.bT), new ey(Integer.valueOf(3), Integer.valueOf(4)));
- at.put(Integer.valueOf(aeq.bA.bT), new ey(Integer.valueOf(2), Integer.valueOf(3)));
- at.put(Integer.valueOf(aeq.aq.bT), new ey(Integer.valueOf(14), Integer.valueOf(18)));
- at.put(Integer.valueOf(aeq.bi.bT), new ey(Integer.valueOf(14), Integer.valueOf(18)));
- at.put(Integer.valueOf(aeq.bk.bT), new ey(Integer.valueOf(14), Integer.valueOf(18)));
- at.put(Integer.valueOf(aeq.aV.bT), new ey(Integer.valueOf(9), Integer.valueOf(13)));
- at.put(Integer.valueOf(aeq.S.bT), new ey(Integer.valueOf(34), Integer.valueOf(48)));
- at.put(Integer.valueOf(aeq.bh.bT), new ey(Integer.valueOf(30), Integer.valueOf(38)));
- at.put(Integer.valueOf(aeq.bg.bT), new ey(Integer.valueOf(30), Integer.valueOf(38)));
- at.put(Integer.valueOf(aeq.T.bT), new ey(Integer.valueOf(18), Integer.valueOf(22)));
- at.put(Integer.valueOf(tg.ab.bX), new ey(Integer.valueOf(14), Integer.valueOf(22)));
- at.put(Integer.valueOf(aeq.bm.bT), new ey(Integer.valueOf(36), Integer.valueOf(64)));
- au.put(Integer.valueOf(aeq.i.bT), new ey(Integer.valueOf(3), Integer.valueOf(4)));
- au.put(Integer.valueOf(aeq.be.bT), new ey(Integer.valueOf(3), Integer.valueOf(4)));
- au.put(Integer.valueOf(aeq.q.bT), new ey(Integer.valueOf(7), Integer.valueOf(11)));
- au.put(Integer.valueOf(aeq.z.bT), new ey(Integer.valueOf(12), Integer.valueOf(14)));
- au.put(Integer.valueOf(aeq.h.bT), new ey(Integer.valueOf(6), Integer.valueOf(8)));
- au.put(Integer.valueOf(aeq.C.bT), new ey(Integer.valueOf(9), Integer.valueOf(12)));
- au.put(Integer.valueOf(aeq.g.bT), new ey(Integer.valueOf(7), Integer.valueOf(9)));
- au.put(Integer.valueOf(aeq.B.bT), new ey(Integer.valueOf(10), Integer.valueOf(12)));
- au.put(Integer.valueOf(aeq.f.bT), new ey(Integer.valueOf(4), Integer.valueOf(6)));
- au.put(Integer.valueOf(aeq.A.bT), new ey(Integer.valueOf(7), Integer.valueOf(8)));
- au.put(Integer.valueOf(aeq.P.bT), new ey(Integer.valueOf(4), Integer.valueOf(6)));
- au.put(Integer.valueOf(aeq.Q.bT), new ey(Integer.valueOf(7), Integer.valueOf(8)));
- au.put(Integer.valueOf(aeq.ag.bT), new ey(Integer.valueOf(4), Integer.valueOf(6)));
- au.put(Integer.valueOf(aeq.ak.bT), new ey(Integer.valueOf(7), Integer.valueOf(8)));
- au.put(Integer.valueOf(aeq.ad.bT), new ey(Integer.valueOf(4), Integer.valueOf(6)));
- au.put(Integer.valueOf(aeq.ah.bT), new ey(Integer.valueOf(7), Integer.valueOf(8)));
- au.put(Integer.valueOf(aeq.ae.bT), new ey(Integer.valueOf(10), Integer.valueOf(14)));
- au.put(Integer.valueOf(aeq.ai.bT), new ey(Integer.valueOf(16), Integer.valueOf(19)));
- au.put(Integer.valueOf(aeq.af.bT), new ey(Integer.valueOf(8), Integer.valueOf(10)));
- au.put(Integer.valueOf(aeq.aj.bT), new ey(Integer.valueOf(11), Integer.valueOf(14)));
- au.put(Integer.valueOf(aeq.ac.bT), new ey(Integer.valueOf(5), Integer.valueOf(7)));
- au.put(Integer.valueOf(aeq.Z.bT), new ey(Integer.valueOf(5), Integer.valueOf(7)));
- au.put(Integer.valueOf(aeq.aa.bT), new ey(Integer.valueOf(11), Integer.valueOf(15)));
- au.put(Integer.valueOf(aeq.ab.bT), new ey(Integer.valueOf(9), Integer.valueOf(11)));
- au.put(Integer.valueOf(aeq.U.bT), new ey(Integer.valueOf(-4), Integer.valueOf(-2)));
- au.put(Integer.valueOf(aeq.bf.bT), new ey(Integer.valueOf(-8), Integer.valueOf(-4)));
- au.put(Integer.valueOf(aeq.j.bT), new ey(Integer.valueOf(-8), Integer.valueOf(-4)));
- au.put(Integer.valueOf(aeq.bc.bT), new ey(Integer.valueOf(-10), Integer.valueOf(-7)));
- au.put(Integer.valueOf(tg.M.bX), new ey(Integer.valueOf(-5), Integer.valueOf(-3)));
- au.put(Integer.valueOf(tg.an.bX), new ey(Integer.valueOf(3), Integer.valueOf(4)));
- au.put(Integer.valueOf(aeq.W.bT), new ey(Integer.valueOf(4), Integer.valueOf(5)));
- au.put(Integer.valueOf(aeq.Y.bT), new ey(Integer.valueOf(2), Integer.valueOf(4)));
- au.put(Integer.valueOf(aeq.V.bT), new ey(Integer.valueOf(2), Integer.valueOf(4)));
- au.put(Integer.valueOf(aeq.X.bT), new ey(Integer.valueOf(2), Integer.valueOf(4)));
- au.put(Integer.valueOf(aeq.aA.bT), new ey(Integer.valueOf(6), Integer.valueOf(8)));
- au.put(Integer.valueOf(aeq.bD.bT), new ey(Integer.valueOf(-4), Integer.valueOf(-1)));
- au.put(Integer.valueOf(aeq.aC.bT), new ey(Integer.valueOf(-4), Integer.valueOf(-1)));
- au.put(Integer.valueOf(aeq.aQ.bT), new ey(Integer.valueOf(10), Integer.valueOf(12)));
- au.put(Integer.valueOf(aeq.aS.bT), new ey(Integer.valueOf(10), Integer.valueOf(12)));
- au.put(Integer.valueOf(tg.bd.bX), new ey(Integer.valueOf(-3), Integer.valueOf(-1)));
- au.put(Integer.valueOf(aeq.ar.bT), new ey(Integer.valueOf(-7), Integer.valueOf(-5)));
- au.put(Integer.valueOf(aeq.bj.bT), new ey(Integer.valueOf(-7), Integer.valueOf(-5)));
- au.put(Integer.valueOf(aeq.bl.bT), new ey(Integer.valueOf(-8), Integer.valueOf(-6)));
- au.put(Integer.valueOf(aeq.bA.bT), new ey(Integer.valueOf(7), Integer.valueOf(11)));
- au.put(Integer.valueOf(aeq.l.bT), new ey(Integer.valueOf(-5), Integer.valueOf(-19)));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement