fsd6gty72 tjn6g wgh
This commit is contained in:
parent
61b7a86b67
commit
e8ddfc266e
Binary file not shown.
@ -2,11 +2,11 @@
|
|||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="src" path="src"/>
|
<classpathentry kind="src" path="src"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre7"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre7"/>
|
||||||
<classpathentry combineaccessrules="false" kind="src" path="/Mineplex.Core.Common"/>
|
|
||||||
<classpathentry combineaccessrules="false" kind="src" path="/Nautilus.Core.CraftBukkit"/>
|
<classpathentry combineaccessrules="false" kind="src" path="/Nautilus.Core.CraftBukkit"/>
|
||||||
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/httpcore-4.2.jar"/>
|
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/httpcore-4.2.jar"/>
|
||||||
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/httpclient-4.2.jar"/>
|
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/httpclient-4.2.jar"/>
|
||||||
<classpathentry kind="var" path="REPO_DIR/Plugins/bin/craftbukkit.jar"/>
|
<classpathentry kind="var" path="REPO_DIR/Plugins/bin/craftbukkit.jar"/>
|
||||||
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/commons-codec-1.6.jar"/>
|
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/commons-codec-1.6.jar"/>
|
||||||
|
<classpathentry combineaccessrules="false" kind="src" path="/Mineplex.Core.Common"/>
|
||||||
<classpathentry kind="output" path="bin"/>
|
<classpathentry kind="output" path="bin"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
@ -6,7 +6,7 @@ import java.util.HashSet;
|
|||||||
import mineplex.core.account.event.AsyncClientLoadEvent;
|
import mineplex.core.account.event.AsyncClientLoadEvent;
|
||||||
import mineplex.core.account.event.ClientUnloadEvent;
|
import mineplex.core.account.event.ClientUnloadEvent;
|
||||||
import mineplex.core.account.event.ClientWebResponseEvent;
|
import mineplex.core.account.event.ClientWebResponseEvent;
|
||||||
import mineplex.core.account.event.RetrieveClientInformationEvent;
|
//import mineplex.core.account.event.RetrieveClientInformationEvent;
|
||||||
import mineplex.core.account.repository.AccountRepository;
|
import mineplex.core.account.repository.AccountRepository;
|
||||||
import mineplex.core.account.repository.token.ClientToken;
|
import mineplex.core.account.repository.token.ClientToken;
|
||||||
import mineplex.core.common.Rank;
|
import mineplex.core.common.Rank;
|
||||||
@ -151,7 +151,7 @@ public class CoreClientManager implements Listener
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Bukkit.getServer().getPluginManager().callEvent(new RetrieveClientInformationEvent(connection));
|
//Bukkit.getServer().getPluginManager().callEvent(new RetrieveClientInformationEvent(connection));
|
||||||
}
|
}
|
||||||
catch (Exception exception)
|
catch (Exception exception)
|
||||||
{
|
{
|
||||||
|
@ -5,10 +5,10 @@ import mineplex.core.recharge.Recharge;
|
|||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
import mineplex.core.updater.UpdateType;
|
import mineplex.core.updater.UpdateType;
|
||||||
import mineplex.core.account.CoreClientManager;
|
import mineplex.core.account.CoreClientManager;
|
||||||
import mineplex.core.account.event.RetrieveClientInformationEvent;
|
//import mineplex.core.account.event.RetrieveClientInformationEvent;
|
||||||
import mineplex.core.chat.command.BroadcastCommand;
|
import mineplex.core.chat.command.BroadcastCommand;
|
||||||
import mineplex.core.chat.command.SilenceCommand;
|
import mineplex.core.chat.command.SilenceCommand;
|
||||||
import mineplex.core.chat.repository.ChatRepository;
|
//import mineplex.core.chat.repository.ChatRepository;
|
||||||
import mineplex.core.common.Rank;
|
import mineplex.core.common.Rank;
|
||||||
import mineplex.core.common.util.F;
|
import mineplex.core.common.util.F;
|
||||||
import mineplex.core.common.util.UtilPlayer;
|
import mineplex.core.common.util.UtilPlayer;
|
||||||
@ -25,7 +25,7 @@ import org.bukkit.plugin.java.JavaPlugin;
|
|||||||
public class Chat extends MiniClientPlugin<ChatClient>
|
public class Chat extends MiniClientPlugin<ChatClient>
|
||||||
{
|
{
|
||||||
private CoreClientManager _clientManager;
|
private CoreClientManager _clientManager;
|
||||||
private ChatRepository _repository;
|
//private ChatRepository _repository;
|
||||||
|
|
||||||
private long _silenced = 0;
|
private long _silenced = 0;
|
||||||
|
|
||||||
@ -44,12 +44,13 @@ public class Chat extends MiniClientPlugin<ChatClient>
|
|||||||
AddCommand(new BroadcastCommand(this));
|
AddCommand(new BroadcastCommand(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void retrieveClientInformation(RetrieveClientInformationEvent event)
|
public void retrieveClientInformation(RetrieveClientInformationEvent event)
|
||||||
{
|
{
|
||||||
_repository.loadClientInformation(event.getConnection());
|
_repository.loadClientInformation(event.getConnection());
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
public void Silence(long duration, boolean inform)
|
public void Silence(long duration, boolean inform)
|
||||||
{
|
{
|
||||||
//Set Silenced
|
//Set Silenced
|
||||||
|
@ -8,240 +8,251 @@ import org.bukkit.event.entity.EntityTargetEvent;
|
|||||||
|
|
||||||
public class EntityGhast extends EntityFlying implements IMonster {
|
public class EntityGhast extends EntityFlying implements IMonster {
|
||||||
|
|
||||||
public int h;
|
public int h;
|
||||||
public double i;
|
public double i;
|
||||||
public double j;
|
public double j;
|
||||||
public double bn;
|
public double bn;
|
||||||
private Entity target;
|
private Entity target;
|
||||||
private int br;
|
private int br;
|
||||||
public int bo;
|
public int bo;
|
||||||
public int bp;
|
public int bp;
|
||||||
private int explosionPower = 1;
|
private int explosionPower = 1;
|
||||||
|
|
||||||
public EntityGhast(World world) {
|
public EntityGhast(World world) {
|
||||||
super(world);
|
super(world);
|
||||||
this.a(4.0F, 4.0F);
|
this.a(4.0F, 4.0F);
|
||||||
this.fireProof = true;
|
this.fireProof = true;
|
||||||
this.b = 5;
|
this.b = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean damageEntity(DamageSource damagesource, float f) {
|
public boolean damageEntity(DamageSource damagesource, float f) {
|
||||||
if (this.isInvulnerable()) {
|
if (this.isInvulnerable()) {
|
||||||
return false;
|
return false;
|
||||||
} else if ("fireball".equals(damagesource.n()) && damagesource.getEntity() instanceof EntityHuman) {
|
} else if ("fireball".equals(damagesource.n()) && damagesource.getEntity() instanceof EntityHuman) {
|
||||||
super.damageEntity(damagesource, 1000.0F);
|
super.damageEntity(damagesource, 1000.0F);
|
||||||
((EntityHuman) damagesource.getEntity()).a((Statistic) AchievementList.y);
|
((EntityHuman) damagesource.getEntity()).a((Statistic) AchievementList.y);
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return super.damageEntity(damagesource, f);
|
return super.damageEntity(damagesource, f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void a() {
|
protected void a() {
|
||||||
super.a();
|
super.a();
|
||||||
this.datawatcher.a(16, Byte.valueOf((byte) 0));
|
this.datawatcher.a(16, Byte.valueOf((byte) 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void az() {
|
protected void az() {
|
||||||
super.az();
|
super.az();
|
||||||
this.getAttributeInstance(GenericAttributes.a).setValue(10.0D);
|
this.getAttributeInstance(GenericAttributes.a).setValue(10.0D);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void bl() {
|
protected void bl() {
|
||||||
if (!this.world.isStatic && this.world.difficulty == 0) {
|
if (!this.world.isStatic && this.world.difficulty == 0) {
|
||||||
this.die();
|
this.die();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Vegetated)
|
|
||||||
return;
|
|
||||||
|
|
||||||
this.u();
|
if (Vegetated)
|
||||||
this.bo = this.bp;
|
{
|
||||||
double d0 = this.i - this.locX;
|
double d0 = this.i - this.locX;
|
||||||
double d1 = this.j - this.locY;
|
double d1 = this.j - this.locY;
|
||||||
double d2 = this.bn - this.locZ;
|
double d2 = this.bn - this.locZ;
|
||||||
double d3 = d0 * d0 + d1 * d1 + d2 * d2;
|
double d3 = d0 * d0 + d1 * d1 + d2 * d2;
|
||||||
|
|
||||||
if (d3 < 1.0D || d3 > 3600.0D) {
|
this.motX += d0 / d3 * 0.1D;
|
||||||
this.i = this.locX + (double) ((this.random.nextFloat() * 2.0F - 1.0F) * 16.0F);
|
this.motY += d1 / d3 * 0.1D;
|
||||||
this.j = this.locY + (double) ((this.random.nextFloat() * 2.0F - 1.0F) * 16.0F);
|
this.motZ += d2 / d3 * 0.1D;
|
||||||
this.bn = this.locZ + (double) ((this.random.nextFloat() * 2.0F - 1.0F) * 16.0F);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.h-- <= 0) {
|
return;
|
||||||
this.h += this.random.nextInt(5) + 2;
|
}
|
||||||
d3 = (double) MathHelper.sqrt(d3);
|
|
||||||
if (this.a(this.i, this.j, this.bn, d3)) {
|
|
||||||
this.motX += d0 / d3 * 0.1D;
|
|
||||||
this.motY += d1 / d3 * 0.1D;
|
|
||||||
this.motZ += d2 / d3 * 0.1D;
|
|
||||||
} else {
|
|
||||||
this.i = this.locX;
|
|
||||||
this.j = this.locY;
|
|
||||||
this.bn = this.locZ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.target != null && this.target.dead) {
|
this.u();
|
||||||
// CraftBukkit start
|
this.bo = this.bp;
|
||||||
EntityTargetEvent event = new EntityTargetEvent(this.getBukkitEntity(), null, EntityTargetEvent.TargetReason.TARGET_DIED);
|
double d0 = this.i - this.locX;
|
||||||
this.world.getServer().getPluginManager().callEvent(event);
|
double d1 = this.j - this.locY;
|
||||||
|
double d2 = this.bn - this.locZ;
|
||||||
|
double d3 = d0 * d0 + d1 * d1 + d2 * d2;
|
||||||
|
|
||||||
if (!event.isCancelled()) {
|
if (d3 < 1.0D || d3 > 3600.0D) {
|
||||||
if (event.getTarget() == null) {
|
this.i = this.locX + (double) ((this.random.nextFloat() * 2.0F - 1.0F) * 16.0F);
|
||||||
this.target = null;
|
this.j = this.locY + (double) ((this.random.nextFloat() * 2.0F - 1.0F) * 16.0F);
|
||||||
} else {
|
this.bn = this.locZ + (double) ((this.random.nextFloat() * 2.0F - 1.0F) * 16.0F);
|
||||||
this.target = ((CraftEntity) event.getTarget()).getHandle();
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
// CraftBukkit end
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.target == null || this.br-- <= 0) {
|
if (this.h-- <= 0) {
|
||||||
// CraftBukkit start
|
this.h += this.random.nextInt(5) + 2;
|
||||||
Entity target = this.world.findNearbyVulnerablePlayer(this, 100.0D);
|
d3 = (double) MathHelper.sqrt(d3);
|
||||||
if (target != null) {
|
if (this.a(this.i, this.j, this.bn, d3)) {
|
||||||
EntityTargetEvent event = new EntityTargetEvent(this.getBukkitEntity(), target.getBukkitEntity(), EntityTargetEvent.TargetReason.CLOSEST_PLAYER);
|
this.motX += d0 / d3 * 0.1D;
|
||||||
this.world.getServer().getPluginManager().callEvent(event);
|
this.motY += d1 / d3 * 0.1D;
|
||||||
|
this.motZ += d2 / d3 * 0.1D;
|
||||||
|
} else {
|
||||||
|
this.i = this.locX;
|
||||||
|
this.j = this.locY;
|
||||||
|
this.bn = this.locZ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!event.isCancelled()) {
|
if (this.target != null && this.target.dead) {
|
||||||
if (event.getTarget() == null) {
|
// CraftBukkit start
|
||||||
this.target = null;
|
EntityTargetEvent event = new EntityTargetEvent(this.getBukkitEntity(), null, EntityTargetEvent.TargetReason.TARGET_DIED);
|
||||||
} else {
|
this.world.getServer().getPluginManager().callEvent(event);
|
||||||
this.target = ((CraftEntity) event.getTarget()).getHandle();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// CraftBukkit end
|
|
||||||
|
|
||||||
if (this.target != null) {
|
if (!event.isCancelled()) {
|
||||||
this.br = 20;
|
if (event.getTarget() == null) {
|
||||||
}
|
this.target = null;
|
||||||
}
|
} else {
|
||||||
|
this.target = ((CraftEntity) event.getTarget()).getHandle();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// CraftBukkit end
|
||||||
|
}
|
||||||
|
|
||||||
double d4 = 64.0D;
|
if (this.target == null || this.br-- <= 0) {
|
||||||
|
// CraftBukkit start
|
||||||
|
Entity target = this.world.findNearbyVulnerablePlayer(this, 100.0D);
|
||||||
|
if (target != null) {
|
||||||
|
EntityTargetEvent event = new EntityTargetEvent(this.getBukkitEntity(), target.getBukkitEntity(), EntityTargetEvent.TargetReason.CLOSEST_PLAYER);
|
||||||
|
this.world.getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
if (this.target != null && this.target.e((Entity) this) < d4 * d4) {
|
if (!event.isCancelled()) {
|
||||||
double d5 = this.target.locX - this.locX;
|
if (event.getTarget() == null) {
|
||||||
double d6 = this.target.boundingBox.b + (double) (this.target.length / 2.0F) - (this.locY + (double) (this.length / 2.0F));
|
this.target = null;
|
||||||
double d7 = this.target.locZ - this.locZ;
|
} else {
|
||||||
|
this.target = ((CraftEntity) event.getTarget()).getHandle();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// CraftBukkit end
|
||||||
|
|
||||||
this.aN = this.yaw = -((float) Math.atan2(d5, d7)) * 180.0F / 3.1415927F;
|
if (this.target != null) {
|
||||||
if (this.o(this.target)) {
|
this.br = 20;
|
||||||
if (this.bp == 10) {
|
}
|
||||||
this.world.a((EntityHuman) null, 1007, (int) this.locX, (int) this.locY, (int) this.locZ, 0);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
++this.bp;
|
double d4 = 64.0D;
|
||||||
if (this.bp == 20) {
|
|
||||||
this.world.a((EntityHuman) null, 1008, (int) this.locX, (int) this.locY, (int) this.locZ, 0);
|
|
||||||
EntityLargeFireball entitylargefireball = new EntityLargeFireball(this.world, this, d5, d6, d7);
|
|
||||||
|
|
||||||
// CraftBukkit - set bukkitYield when setting explosionpower
|
if (this.target != null && this.target.e((Entity) this) < d4 * d4) {
|
||||||
entitylargefireball.bukkitYield = entitylargefireball.yield = this.explosionPower;
|
double d5 = this.target.locX - this.locX;
|
||||||
double d8 = 4.0D;
|
double d6 = this.target.boundingBox.b + (double) (this.target.length / 2.0F) - (this.locY + (double) (this.length / 2.0F));
|
||||||
Vec3D vec3d = this.j(1.0F);
|
double d7 = this.target.locZ - this.locZ;
|
||||||
|
|
||||||
entitylargefireball.locX = this.locX + vec3d.c * d8;
|
this.aN = this.yaw = -((float) Math.atan2(d5, d7)) * 180.0F / 3.1415927F;
|
||||||
entitylargefireball.locY = this.locY + (double) (this.length / 2.0F) + 0.5D;
|
if (this.o(this.target)) {
|
||||||
entitylargefireball.locZ = this.locZ + vec3d.e * d8;
|
if (this.bp == 10) {
|
||||||
this.world.addEntity(entitylargefireball);
|
this.world.a((EntityHuman) null, 1007, (int) this.locX, (int) this.locY, (int) this.locZ, 0);
|
||||||
this.bp = -40;
|
}
|
||||||
}
|
|
||||||
} else if (this.bp > 0) {
|
|
||||||
--this.bp;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.aN = this.yaw = -((float) Math.atan2(this.motX, this.motZ)) * 180.0F / 3.1415927F;
|
|
||||||
if (this.bp > 0) {
|
|
||||||
--this.bp;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!this.world.isStatic) {
|
++this.bp;
|
||||||
byte b0 = this.datawatcher.getByte(16);
|
if (this.bp == 20) {
|
||||||
byte b1 = (byte) (this.bp > 10 ? 1 : 0);
|
this.world.a((EntityHuman) null, 1008, (int) this.locX, (int) this.locY, (int) this.locZ, 0);
|
||||||
|
EntityLargeFireball entitylargefireball = new EntityLargeFireball(this.world, this, d5, d6, d7);
|
||||||
|
|
||||||
if (b0 != b1) {
|
// CraftBukkit - set bukkitYield when setting explosionpower
|
||||||
this.datawatcher.watch(16, Byte.valueOf(b1));
|
entitylargefireball.bukkitYield = entitylargefireball.yield = this.explosionPower;
|
||||||
}
|
double d8 = 4.0D;
|
||||||
}
|
Vec3D vec3d = this.j(1.0F);
|
||||||
}
|
|
||||||
|
|
||||||
private boolean a(double d0, double d1, double d2, double d3) {
|
entitylargefireball.locX = this.locX + vec3d.c * d8;
|
||||||
double d4 = (this.i - this.locX) / d3;
|
entitylargefireball.locY = this.locY + (double) (this.length / 2.0F) + 0.5D;
|
||||||
double d5 = (this.j - this.locY) / d3;
|
entitylargefireball.locZ = this.locZ + vec3d.e * d8;
|
||||||
double d6 = (this.bn - this.locZ) / d3;
|
this.world.addEntity(entitylargefireball);
|
||||||
AxisAlignedBB axisalignedbb = this.boundingBox.clone();
|
this.bp = -40;
|
||||||
|
}
|
||||||
|
} else if (this.bp > 0) {
|
||||||
|
--this.bp;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.aN = this.yaw = -((float) Math.atan2(this.motX, this.motZ)) * 180.0F / 3.1415927F;
|
||||||
|
if (this.bp > 0) {
|
||||||
|
--this.bp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 1; (double) i < d3; ++i) {
|
if (!this.world.isStatic) {
|
||||||
axisalignedbb.d(d4, d5, d6);
|
byte b0 = this.datawatcher.getByte(16);
|
||||||
if (!this.world.getCubes(this, axisalignedbb).isEmpty()) {
|
byte b1 = (byte) (this.bp > 10 ? 1 : 0);
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
if (b0 != b1) {
|
||||||
}
|
this.datawatcher.watch(16, Byte.valueOf(b1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected String r() {
|
private boolean a(double d0, double d1, double d2, double d3) {
|
||||||
return "mob.ghast.moan";
|
double d4 = (this.i - this.locX) / d3;
|
||||||
}
|
double d5 = (this.j - this.locY) / d3;
|
||||||
|
double d6 = (this.bn - this.locZ) / d3;
|
||||||
|
AxisAlignedBB axisalignedbb = this.boundingBox.clone();
|
||||||
|
|
||||||
protected String aO() {
|
for (int i = 1; (double) i < d3; ++i) {
|
||||||
return "mob.ghast.scream";
|
axisalignedbb.d(d4, d5, d6);
|
||||||
}
|
if (!this.world.getCubes(this, axisalignedbb).isEmpty()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected String aP() {
|
return true;
|
||||||
return "mob.ghast.death";
|
}
|
||||||
}
|
|
||||||
|
|
||||||
protected int getLootId() {
|
protected String r() {
|
||||||
return Item.SULPHUR.id;
|
return "mob.ghast.moan";
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void dropDeathLoot(boolean flag, int i) {
|
protected String aO() {
|
||||||
// CraftBukkit start
|
return "mob.ghast.scream";
|
||||||
java.util.List<org.bukkit.inventory.ItemStack> loot = new java.util.ArrayList<org.bukkit.inventory.ItemStack>();
|
}
|
||||||
int j = this.random.nextInt(2) + this.random.nextInt(1 + i);
|
|
||||||
|
|
||||||
int k;
|
protected String aP() {
|
||||||
|
return "mob.ghast.death";
|
||||||
|
}
|
||||||
|
|
||||||
if (j > 0) {
|
protected int getLootId() {
|
||||||
loot.add(CraftItemStack.asNewCraftStack(Item.GHAST_TEAR, j));
|
return Item.SULPHUR.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
j = this.random.nextInt(3) + this.random.nextInt(1 + i);
|
protected void dropDeathLoot(boolean flag, int i) {
|
||||||
|
// CraftBukkit start
|
||||||
|
java.util.List<org.bukkit.inventory.ItemStack> loot = new java.util.ArrayList<org.bukkit.inventory.ItemStack>();
|
||||||
|
int j = this.random.nextInt(2) + this.random.nextInt(1 + i);
|
||||||
|
|
||||||
if (j > 0) {
|
int k;
|
||||||
loot.add(CraftItemStack.asNewCraftStack(Item.SULPHUR, j));
|
|
||||||
}
|
|
||||||
|
|
||||||
org.bukkit.craftbukkit.v1_6_R3.event.CraftEventFactory.callEntityDeathEvent(this, loot);
|
if (j > 0) {
|
||||||
// CraftBukkit end
|
loot.add(CraftItemStack.asNewCraftStack(Item.GHAST_TEAR, j));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected float ba() {
|
j = this.random.nextInt(3) + this.random.nextInt(1 + i);
|
||||||
return 10.0F;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean canSpawn() {
|
if (j > 0) {
|
||||||
return this.random.nextInt(20) == 0 && super.canSpawn() && this.world.difficulty > 0;
|
loot.add(CraftItemStack.asNewCraftStack(Item.SULPHUR, j));
|
||||||
}
|
}
|
||||||
|
|
||||||
public int bv() {
|
org.bukkit.craftbukkit.v1_6_R3.event.CraftEventFactory.callEntityDeathEvent(this, loot);
|
||||||
return 1;
|
// CraftBukkit end
|
||||||
}
|
}
|
||||||
|
|
||||||
public void b(NBTTagCompound nbttagcompound) {
|
protected float ba() {
|
||||||
super.b(nbttagcompound);
|
return 10.0F;
|
||||||
nbttagcompound.setInt("ExplosionPower", this.explosionPower);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public void a(NBTTagCompound nbttagcompound) {
|
public boolean canSpawn() {
|
||||||
super.a(nbttagcompound);
|
return this.random.nextInt(20) == 0 && super.canSpawn() && this.world.difficulty > 0;
|
||||||
if (nbttagcompound.hasKey("ExplosionPower")) {
|
}
|
||||||
this.explosionPower = nbttagcompound.getInt("ExplosionPower");
|
|
||||||
}
|
public int bv() {
|
||||||
}
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void b(NBTTagCompound nbttagcompound) {
|
||||||
|
super.b(nbttagcompound);
|
||||||
|
nbttagcompound.setInt("ExplosionPower", this.explosionPower);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void a(NBTTagCompound nbttagcompound) {
|
||||||
|
super.a(nbttagcompound);
|
||||||
|
if (nbttagcompound.hasKey("ExplosionPower")) {
|
||||||
|
this.explosionPower = nbttagcompound.getInt("ExplosionPower");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
@ -7,7 +7,7 @@
|
|||||||
<classpathentry combineaccessrules="false" kind="src" path="/Nautilus.Core.CraftBukkit"/>
|
<classpathentry combineaccessrules="false" kind="src" path="/Nautilus.Core.CraftBukkit"/>
|
||||||
<classpathentry combineaccessrules="false" kind="src" path="/Core"/>
|
<classpathentry combineaccessrules="false" kind="src" path="/Core"/>
|
||||||
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/craftbukkit.jar" sourcepath="/REPO_DIR/GitHubLibraries/CraftBukkit/src"/>
|
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/craftbukkit.jar" sourcepath="/REPO_DIR/GitHubLibraries/CraftBukkit/src"/>
|
||||||
<classpathentry combineaccessrules="false" kind="src" path="/Mineplex.Core"/>
|
|
||||||
<classpathentry combineaccessrules="false" kind="src" path="/Nautilus.Core"/>
|
<classpathentry combineaccessrules="false" kind="src" path="/Nautilus.Core"/>
|
||||||
|
<classpathentry combineaccessrules="false" kind="src" path="/Mineplex.Core"/>
|
||||||
<classpathentry kind="output" path="bin"/>
|
<classpathentry kind="output" path="bin"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
@ -1,20 +1,16 @@
|
|||||||
package nautilus.game.arcade.game.games.halloween.creatures;
|
package nautilus.game.arcade.game.games.halloween.creatures;
|
||||||
|
|
||||||
import mineplex.core.common.util.UtilAlg;
|
|
||||||
import mineplex.core.common.util.UtilBlock;
|
import mineplex.core.common.util.UtilBlock;
|
||||||
import mineplex.core.common.util.UtilEnt;
|
import mineplex.core.common.util.UtilEnt;
|
||||||
import mineplex.core.updater.UpdateType;
|
import mineplex.core.updater.UpdateType;
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||||
import nautilus.game.arcade.game.Game;
|
import nautilus.game.arcade.game.Game;
|
||||||
import net.minecraft.server.v1_6_R3.Entity;
|
|
||||||
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftGhast;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftGhast;
|
||||||
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftPlayer;
|
|
||||||
import org.bukkit.entity.Ghast;
|
import org.bukkit.entity.Ghast;
|
||||||
import org.bukkit.event.entity.EntityTargetEvent;
|
import org.bukkit.event.entity.EntityTargetEvent;
|
||||||
import org.bukkit.util.Vector;
|
|
||||||
|
|
||||||
public class MobGhast extends CreatureBase<Ghast>
|
public class MobGhast extends CreatureBase<Ghast>
|
||||||
{
|
{
|
||||||
@ -27,7 +23,6 @@ public class MobGhast extends CreatureBase<Ghast>
|
|||||||
public void SpawnCustom(Ghast ent)
|
public void SpawnCustom(Ghast ent)
|
||||||
{
|
{
|
||||||
UtilEnt.Vegetate(ent);
|
UtilEnt.Vegetate(ent);
|
||||||
((CraftGhast)GetEntity()).getHandle().a(1f, 1f, 0.02f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -45,19 +40,7 @@ public class MobGhast extends CreatureBase<Ghast>
|
|||||||
@Override
|
@Override
|
||||||
public void Update(UpdateEvent event)
|
public void Update(UpdateEvent event)
|
||||||
{
|
{
|
||||||
if (true)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (event.getType() == UpdateType.TICK)
|
|
||||||
Move();
|
|
||||||
|
|
||||||
if (event.getType() == UpdateType.SEC)
|
|
||||||
Destroy();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Destroy()
|
|
||||||
{
|
|
||||||
Host.Manager.GetExplosion().BlockExplosion(UtilBlock.getInRadius(GetEntity().getLocation().add(0, 8, 0), 6d).keySet(), GetEntity().getLocation().add(0, 8, 0), false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Move()
|
private void Move()
|
||||||
@ -65,8 +48,6 @@ public class MobGhast extends CreatureBase<Ghast>
|
|||||||
if (GetTarget() == null)
|
if (GetTarget() == null)
|
||||||
SetTarget(GetPlayerTarget());
|
SetTarget(GetPlayerTarget());
|
||||||
|
|
||||||
Vector vel = UtilAlg.getTrajectory(GetEntity().getLocation(), GetTarget());
|
|
||||||
|
|
||||||
((CraftGhast)GetEntity()).getHandle().i = GetTarget().getX();
|
((CraftGhast)GetEntity()).getHandle().i = GetTarget().getX();
|
||||||
((CraftGhast)GetEntity()).getHandle().j = GetTarget().getY();
|
((CraftGhast)GetEntity()).getHandle().j = GetTarget().getY();
|
||||||
((CraftGhast)GetEntity()).getHandle().bn = GetTarget().getZ();
|
((CraftGhast)GetEntity()).getHandle().bn = GetTarget().getZ();
|
||||||
|
Loading…
Reference in New Issue
Block a user