public void initLocation(int home) { Matrix3D trans = npc.getLocalTranslation(); int mix = Math.min(10, -10) + (int) (Math.abs(10 + 12) * Math.random()); switch (home) { case 1: spawnValue = 153; moveDirection = 1; trans.translate(153 + mix, 0, 0); break; case 2: spawnValue = 203; moveDirection = 1; trans.translate(203 + mix, 0, 0); break; case 3: spawnValue = 322; moveDirection = 1; trans.translate(322 + mix, 0, 0); break; case 4: spawnValue = 265; moveDirection = 1; trans.translate(265 + mix, 0, 0); break; } location = trans; npc.setLocalTranslation(trans); npc.updateWorldBound(); }
public void moveForward() { Matrix3D npcMove = npc.getLocalTranslation(); npcMove.translate(0, 0, (1 * difficulty * moveDirection)); npc.setLocalTranslation(npcMove); }
public void moveToSpawn() { Matrix3D npcMove = npc.getLocalTranslation(); npcMove.translate(0, 0, -300); npc.setLocalTranslation(npcMove); }
public Matrix3D getScale() { return npc.getLocalScale(); }
public void scale(int i, int j, int k) { Matrix3D scaler = npc.getLocalScale(); scaler.scale(i, j, k); npc.setLocalScale(scaler); }