Run source format
This commit is contained in:
parent
b31f1a351c
commit
dfb63084b2
|
@ -141,7 +141,7 @@ public class AStarNavigationStrategy extends AbstractPathStrategy {
|
|||
}
|
||||
Location loc = npc.getEntity().getLocation(NPC_LOCATION);
|
||||
/* Proper door movement - gets stuck on corners at times
|
||||
|
||||
|
||||
Block block = currLoc.getWorld().getBlockAt(vector.getBlockX(), vector.getBlockY(), vector.getBlockZ());
|
||||
if (MinecraftBlockExaminer.isDoor(block.getType())) {
|
||||
Door door = (Door) block.getState().getData();
|
||||
|
|
|
@ -30,7 +30,7 @@ public class VillagerProfession extends Trait {
|
|||
public void load(DataKey key) throws NPCLoadException {
|
||||
try {
|
||||
profession = Profession.valueOf(key.getString(""));
|
||||
if (profession.name().equals("NORMAL")) {
|
||||
if ("NORMAL".equals(profession.name())) {
|
||||
profession = Profession.FARMER;
|
||||
}
|
||||
} catch (IllegalArgumentException ex) {
|
||||
|
@ -40,6 +40,8 @@ public class VillagerProfession extends Trait {
|
|||
|
||||
@Override
|
||||
public void onSpawn() {
|
||||
if (!npc.isSpawned())
|
||||
return;
|
||||
if (npc.getEntity() instanceof Villager) {
|
||||
((Villager) npc.getEntity()).setProfession(profession);
|
||||
} else if (npc.getEntity() instanceof ZombieVillager) {
|
||||
|
@ -53,15 +55,11 @@ public class VillagerProfession extends Trait {
|
|||
}
|
||||
|
||||
public void setProfession(Profession profession) {
|
||||
if (profession.name().equals("NORMAL")) {
|
||||
if ("NORMAL".equals(profession.name())) {
|
||||
profession = Profession.FARMER;
|
||||
}
|
||||
this.profession = profession;
|
||||
if (npc.getEntity() instanceof Villager) {
|
||||
((Villager) npc.getEntity()).setProfession(profession);
|
||||
} else if (npc.getEntity() instanceof ZombieVillager) {
|
||||
((ZombieVillager) npc.getEntity()).setVillagerProfession(profession);
|
||||
}
|
||||
onSpawn();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -19,7 +19,8 @@ public class EmptyChannel extends AbstractChannel {
|
|||
static {
|
||||
Map<String, Version> versionMap = Version.identify();
|
||||
Version nettyVersion = versionMap.get("netty-common");
|
||||
if (nettyVersion == null) nettyVersion = versionMap.get("netty-all");
|
||||
if (nettyVersion == null)
|
||||
nettyVersion = versionMap.get("netty-all");
|
||||
|
||||
if (nettyVersion != null) {
|
||||
String[] split = nettyVersion.artifactVersion().split("\\.");
|
||||
|
@ -31,10 +32,8 @@ public class EmptyChannel extends AbstractChannel {
|
|||
if (major > 4 || minor > 1 || revision > 24) {
|
||||
updatedNetty = true;
|
||||
}
|
||||
}
|
||||
catch (ArrayIndexOutOfBoundsException ignored) {
|
||||
}
|
||||
catch (NumberFormatException ignored) {
|
||||
} catch (ArrayIndexOutOfBoundsException ignored) {
|
||||
} catch (NumberFormatException ignored) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue