Skip to content

Commit

Permalink
1.13 NMS update
Browse files Browse the repository at this point in the history
  • Loading branch information
Morphan1 committed Jul 22, 2018
1 parent 0d9eb20 commit 5a7ebc7
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 16 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -10,7 +10,7 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<craftbukkit.version>1.13-pre7-R0.1-SNAPSHOT</craftbukkit.version>
<craftbukkit.version>1.13-R0.1-SNAPSHOT</craftbukkit.version>
<json.version>20090211</json.version>
<citizens.version>2.0.23-SNAPSHOT</citizens.version>
<BUILD_NUMBER>Unknown</BUILD_NUMBER>
Expand Down
4 changes: 2 additions & 2 deletions v1_13_R1/pom.xml
Expand Up @@ -27,7 +27,7 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.13-pre7-R0.1-SNAPSHOT</version>
<version>1.13-R0.1-SNAPSHOT</version>
<scope>provided</scope>
<exclusions>
<exclusion>
Expand All @@ -39,7 +39,7 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.13-pre7-R0.1-SNAPSHOT</version>
<version>1.13-R0.1-SNAPSHOT</version>
<scope>provided</scope>
<exclusions>
<exclusion>
Expand Down
Expand Up @@ -89,7 +89,7 @@ public CompoundTag getNbtData(Block block) {
if (tileEntity == null) {
return null;
}
return CompoundTag_v1_13_R1.fromNMSTag(tileEntity.Z_());
return CompoundTag_v1_13_R1.fromNMSTag(tileEntity.aa_());
}

@Override
Expand Down
Expand Up @@ -144,7 +144,7 @@ public void stopWalking(Entity entity) {
if (!(nmsEntity instanceof EntityInsentient)) {
return;
}
((EntityInsentient) nmsEntity).getNavigation().r();
((EntityInsentient) nmsEntity).getNavigation().q();
}

@Override
Expand Down Expand Up @@ -245,7 +245,7 @@ else if (!inRadius && !Utilities.checkLocation(targetLocation, follower.getLocat
inRadius = true;
}
if (inRadius && !allowWander) {
followerNavigation.r();
followerNavigation.q();
}
nmsFollower.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).setValue(speed);
}
Expand Down Expand Up @@ -280,7 +280,7 @@ public void walkTo(final Entity entity, Location location, double speed, final R
new BukkitRunnable() {
@Override
public void run() {
if (entityNavigation.q() || path.b()) {
if (entityNavigation.p() || path.b()) {
if (callback != null) {
callback.run();
}
Expand Down
Expand Up @@ -69,7 +69,7 @@ private ItemStack catchRandomJunk(EntityFishingHook fishHook) {
//fishHook.owner.a(StatisticList.F, 1); -- removed stat as of 1.12
WorldServer worldServer = (WorldServer) fishHook.getWorld();
LootTableInfo.a playerFishEvent2 = new LootTableInfo.a(worldServer);
playerFishEvent2.a((float) EnchantmentManager.a(Enchantments.LUCK, fishHook.owner) + fishHook.owner.dI());
playerFishEvent2.a((float) EnchantmentManager.a(Enchantments.LUCK, fishHook.owner) + fishHook.owner.dJ());
List<ItemStack> itemStacks = fishHook.getWorld().getMinecraftServer().aP().a(LootTables.aP).a(worldServer.random, playerFishEvent2.a());
return itemStacks.get(worldServer.random.nextInt(itemStacks.size()));
}
Expand All @@ -78,7 +78,7 @@ private ItemStack catchRandomTreasure(EntityFishingHook fishHook) {
//fishHook.owner.a(StatisticList.G, 1); -- removed stat as of 1.12
WorldServer worldServer = (WorldServer) fishHook.getWorld();
LootTableInfo.a playerFishEvent2 = new LootTableInfo.a((WorldServer) fishHook.getWorld());
playerFishEvent2.a((float) EnchantmentManager.a(Enchantments.LUCK, fishHook.owner) + fishHook.owner.dI());
playerFishEvent2.a((float) EnchantmentManager.a(Enchantments.LUCK, fishHook.owner) + fishHook.owner.dJ());
List<ItemStack> itemStacks = fishHook.getWorld().getMinecraftServer().aP().a(LootTables.aQ).a(worldServer.random, playerFishEvent2.a());
return itemStacks.get(worldServer.random.nextInt(itemStacks.size()));
}
Expand All @@ -88,7 +88,7 @@ private ItemStack catchRandomFish(EntityFishingHook fishHook) {
fishHook.owner.a(StatisticList.FISH_CAUGHT, 1);
WorldServer worldServer = (WorldServer) fishHook.getWorld();
LootTableInfo.a playerFishEvent2 = new LootTableInfo.a((WorldServer) fishHook.getWorld());
playerFishEvent2.a((float) EnchantmentManager.a(Enchantments.LUCK, fishHook.owner) + fishHook.owner.dI());
playerFishEvent2.a((float) EnchantmentManager.a(Enchantments.LUCK, fishHook.owner) + fishHook.owner.dJ());
List<ItemStack> itemStacks = fishHook.getWorld().getMinecraftServer().aP().a(LootTables.aR).a(worldServer.random, playerFishEvent2.a());
return itemStacks.get(worldServer.random.nextInt(itemStacks.size()));
}
Expand Down
Expand Up @@ -15,15 +15,17 @@ public class Sidebar_v1_13_R1 extends Sidebar {

public Sidebar_v1_13_R1(Player player) {
super(player);
this.obj1 = new ScoreboardObjective(dummyScoreboard, "dummy_1", dummyCriteria, title);
this.obj2 = new ScoreboardObjective(dummyScoreboard, "dummy_2", dummyCriteria, title);
IChatBaseComponent chatComponentTitle = new ChatComponentText(title);
this.obj1 = new ScoreboardObjective(dummyScoreboard, "dummy_1", dummyCriteria, chatComponentTitle, IScoreboardCriteria.EnumScoreboardHealthDisplay.INTEGER);
this.obj2 = new ScoreboardObjective(dummyScoreboard, "dummy_2", dummyCriteria, chatComponentTitle, IScoreboardCriteria.EnumScoreboardHealthDisplay.INTEGER);
}

@Override
protected void setDisplayName(String title) {
if (this.obj1 != null) {
this.obj1.setDisplayName(title);
this.obj2.setDisplayName(title);
IChatBaseComponent chatComponentTitle = new ChatComponentText(title);
this.obj1.setDisplayName(chatComponentTitle);
this.obj2.setDisplayName(chatComponentTitle);
}
}

Expand Down
Expand Up @@ -72,8 +72,8 @@ public void chat(String s, boolean async) {
}

@Override
public void X_() {
oldListener.X_();
public void Y_() {
oldListener.Y_();
}

@Override
Expand Down

0 comments on commit 5a7ebc7

Please sign in to comment.