Update CraftBukkit to Minecraft 1.7.5
By: Nate Mortensen <nate.richard.mortensen@gmail.com>
This commit is contained in:
@@ -17,19 +17,19 @@ public class CraftArrow extends AbstractProjectile implements Arrow {
|
||||
|
||||
public void setKnockbackStrength(int knockbackStrength) {
|
||||
Validate.isTrue(knockbackStrength >= 0, "Knockback cannot be negative");
|
||||
getHandle().a(knockbackStrength);
|
||||
getHandle().setKnockbackStrength(knockbackStrength);
|
||||
}
|
||||
|
||||
public int getKnockbackStrength() {
|
||||
return getHandle().aw;
|
||||
return getHandle().knockbackStrength;
|
||||
}
|
||||
|
||||
public boolean isCritical() {
|
||||
return getHandle().f();
|
||||
return getHandle().isCritical();
|
||||
}
|
||||
|
||||
public void setCritical(boolean critical) {
|
||||
getHandle().a(critical);
|
||||
getHandle().setCritical(critical);
|
||||
}
|
||||
|
||||
public ProjectileSource getShooter() {
|
||||
|
||||
@@ -348,7 +348,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
}
|
||||
|
||||
public boolean hasLineOfSight(Entity other) {
|
||||
return getHandle().o(((CraftEntity) other).getHandle());
|
||||
return getHandle().p(((CraftEntity) other).getHandle());
|
||||
}
|
||||
|
||||
public boolean getRemoveWhenFarAway() {
|
||||
|
||||
@@ -522,8 +522,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
if (achievement.hasParent() && !hasAchievement(achievement.getParent())) {
|
||||
awardAchievement(achievement.getParent());
|
||||
}
|
||||
getHandle().x().a(getHandle(), CraftStatistic.getNMSAchievement(achievement), 1);
|
||||
getHandle().x().b(getHandle());
|
||||
getHandle().getStatisticManager().setStatistic(getHandle(), CraftStatistic.getNMSAchievement(achievement), 1);
|
||||
getHandle().getStatisticManager().updateStatistics(getHandle());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -534,13 +534,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
removeAchievement(achieve);
|
||||
}
|
||||
}
|
||||
getHandle().x().a(getHandle(), CraftStatistic.getNMSAchievement(achievement), 0);
|
||||
getHandle().getStatisticManager().setStatistic(getHandle(), CraftStatistic.getNMSAchievement(achievement), 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasAchievement(Achievement achievement) {
|
||||
Validate.notNull(achievement, "Achievement cannot be null");
|
||||
return getHandle().x().a(CraftStatistic.getNMSAchievement(achievement));
|
||||
return getHandle().getStatisticManager().a(CraftStatistic.getNMSAchievement(achievement));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -557,7 +557,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
public int getStatistic(Statistic statistic) {
|
||||
Validate.notNull(statistic, "Statistic cannot be null");
|
||||
Validate.isTrue(statistic.getType() == Type.UNTYPED, "Must supply additional paramater for this statistic");
|
||||
return getHandle().x().a(CraftStatistic.getNMSStatistic(statistic));
|
||||
return getHandle().getStatisticManager().getStatisticValue(CraftStatistic.getNMSStatistic(statistic));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -578,7 +578,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
Validate.isTrue(statistic.getType() == Type.UNTYPED, "Must supply additional paramater for this statistic");
|
||||
Validate.isTrue(newValue >= 0, "Value must be greater than or equal to 0");
|
||||
net.minecraft.server.Statistic nmsStatistic = CraftStatistic.getNMSStatistic(statistic);
|
||||
getHandle().x().a(getHandle(), nmsStatistic, newValue);
|
||||
getHandle().getStatisticManager().setStatistic(getHandle(), nmsStatistic, newValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -598,7 +598,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
Validate.isTrue(statistic.getType() == Type.BLOCK || statistic.getType() == Type.ITEM, "This statistic does not take a Material parameter");
|
||||
net.minecraft.server.Statistic nmsStatistic = CraftStatistic.getMaterialStatistic(statistic, material);
|
||||
Validate.notNull(nmsStatistic, "The supplied Material does not have a corresponding statistic");
|
||||
return getHandle().x().a(nmsStatistic);
|
||||
return getHandle().getStatisticManager().getStatisticValue(nmsStatistic);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -621,7 +621,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
Validate.isTrue(statistic.getType() == Type.BLOCK || statistic.getType() == Type.ITEM, "This statistic does not take a Material parameter");
|
||||
net.minecraft.server.Statistic nmsStatistic = CraftStatistic.getMaterialStatistic(statistic, material);
|
||||
Validate.notNull(nmsStatistic, "The supplied Material does not have a corresponding statistic");
|
||||
getHandle().x().a(getHandle(), nmsStatistic, newValue);
|
||||
getHandle().getStatisticManager().setStatistic(getHandle(), nmsStatistic, newValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -641,7 +641,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
Validate.isTrue(statistic.getType() == Type.ENTITY, "This statistic does not take an EntityType parameter");
|
||||
net.minecraft.server.Statistic nmsStatistic = CraftStatistic.getEntityStatistic(statistic, entityType);
|
||||
Validate.notNull(nmsStatistic, "The supplied EntityType does not have a corresponding statistic");
|
||||
return getHandle().x().a(nmsStatistic);
|
||||
return getHandle().getStatisticManager().getStatisticValue(nmsStatistic);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -664,7 +664,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
Validate.isTrue(statistic.getType() == Type.ENTITY, "This statistic does not take an EntityType parameter");
|
||||
net.minecraft.server.Statistic nmsStatistic = CraftStatistic.getEntityStatistic(statistic, entityType);
|
||||
Validate.notNull(nmsStatistic, "The supplied EntityType does not have a corresponding statistic");
|
||||
getHandle().x().a(getHandle(), nmsStatistic, newValue);
|
||||
getHandle().getStatisticManager().setStatistic(getHandle(), nmsStatistic, newValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1011,7 +1011,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
public void setResourcePack(String url) {
|
||||
Validate.notNull(url, "Resource pack URL cannot be null");
|
||||
|
||||
getHandle().a(url); // should be setResourcePack
|
||||
getHandle().setResourcePack(url);
|
||||
}
|
||||
|
||||
public void addChannel(String channel) {
|
||||
@@ -1225,7 +1225,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
|
||||
public void updateScaledHealth() {
|
||||
AttributeMapServer attributemapserver = (AttributeMapServer) getHandle().bc();
|
||||
AttributeMapServer attributemapserver = (AttributeMapServer) getHandle().bb();
|
||||
Set set = attributemapserver.b();
|
||||
|
||||
injectScaledMaxHealth(set, true);
|
||||
@@ -1250,6 +1250,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
continue;
|
||||
}
|
||||
collection.add(new AttributeModifiable(getHandle().bc(), (new AttributeRanged("generic.maxHealth", scaledHealth ? healthScale : getMaxHealth(), 0.0D, Float.MAX_VALUE)).a("Max Health").a(true)));
|
||||
collection.add(new AttributeModifiable(getHandle().bb(), (new AttributeRanged("generic.maxHealth", scaledHealth ? healthScale : getMaxHealth(), 0.0D, Float.MAX_VALUE)).a("Max Health").a(true)));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user