Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-19 04:50:06 +01:00
Remember, minimal diffs and *NO TABS*
Dieser Commit ist enthalten in:
Ursprung
b1ee09f733
Commit
136ad76e6a
@ -51,7 +51,7 @@ public class EntityPlayerMP extends EntityPlayer
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void k() {
|
public void k() {
|
||||||
// CraftBukkit: Downcast to make it work.
|
// CraftBukkit: Downcast to make it work.
|
||||||
ap.a((ICrafting)this);
|
ap.a((ICrafting)this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -223,7 +223,7 @@ public class EntityPlayerMP extends EntityPlayer
|
|||||||
a.b(new Packet100(bH, 1, "Crafting", 9));
|
a.b(new Packet100(bH, 1, "Crafting", 9));
|
||||||
ap = new CraftingInventoryWorkbenchCB(an, this.l, i, j, l);
|
ap = new CraftingInventoryWorkbenchCB(an, this.l, i, j, l);
|
||||||
ap.f = bH;
|
ap.f = bH;
|
||||||
// CraftBukkit: Downcast to make it work.
|
// CraftBukkit: Downcast to make it work.
|
||||||
ap.a((ICrafting)this);
|
ap.a((ICrafting)this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -232,7 +232,7 @@ public class EntityPlayerMP extends EntityPlayer
|
|||||||
a.b(new Packet100(bH, 0, iinventory.b(), iinventory.a()));
|
a.b(new Packet100(bH, 0, iinventory.b(), iinventory.a()));
|
||||||
ap = new CraftingInventoryChestCB(an, iinventory);
|
ap = new CraftingInventoryChestCB(an, iinventory);
|
||||||
ap.f = bH;
|
ap.f = bH;
|
||||||
// CraftBukkit: Downcast to make it work.
|
// CraftBukkit: Downcast to make it work.
|
||||||
ap.a((ICrafting)this);
|
ap.a((ICrafting)this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -241,7 +241,7 @@ public class EntityPlayerMP extends EntityPlayer
|
|||||||
a.b(new Packet100(bH, 2, tileentityfurnace.b(), tileentityfurnace.a()));
|
a.b(new Packet100(bH, 2, tileentityfurnace.b(), tileentityfurnace.a()));
|
||||||
ap = new CraftingInventoryFurnaceCB(an, tileentityfurnace);
|
ap = new CraftingInventoryFurnaceCB(an, tileentityfurnace);
|
||||||
ap.f = bH;
|
ap.f = bH;
|
||||||
// CraftBukkit: Downcast to make it work.
|
// CraftBukkit: Downcast to make it work.
|
||||||
ap.a((ICrafting)this);
|
ap.a((ICrafting)this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -283,7 +283,7 @@ public class EntityPlayerMP extends EntityPlayer
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void K() {
|
public void K() {
|
||||||
// CraftBukkit: Downcast to make it work.
|
// CraftBukkit: Downcast to make it work.
|
||||||
ap.a((ICrafting)this);
|
ap.a((ICrafting)this);
|
||||||
ap = ao;
|
ap = ao;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package net.minecraft.server;
|
package net.minecraft.server;
|
||||||
|
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import org.bukkit.craftbukkit.CraftLivingEntity;
|
import org.bukkit.craftbukkit.CraftLivingEntity;
|
||||||
@ -9,78 +10,79 @@ import org.bukkit.event.entity.EntityCombustEvent;
|
|||||||
|
|
||||||
public class EntitySkeleton extends EntityMobs {
|
public class EntitySkeleton extends EntityMobs {
|
||||||
|
|
||||||
private static final ItemStack a;
|
private static final ItemStack a;
|
||||||
|
|
||||||
public EntitySkeleton(World world) {
|
public EntitySkeleton(World world) {
|
||||||
super(world);
|
super(world);
|
||||||
aQ = "/mob/skeleton.png";
|
aQ = "/mob/skeleton.png";
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String d() {
|
protected String d() {
|
||||||
return "mob.skeleton";
|
return "mob.skeleton";
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String e() {
|
protected String e() {
|
||||||
return "mob.skeletonhurt";
|
return "mob.skeletonhurt";
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String f() {
|
protected String f() {
|
||||||
return "mob.skeletonhurt";
|
return "mob.skeletonhurt";
|
||||||
}
|
}
|
||||||
|
|
||||||
public void G() {
|
public void G() {
|
||||||
if (l.b()) {
|
if (l.b()) {
|
||||||
float f1 = b(1.0F);
|
float f1 = b(1.0F);
|
||||||
|
|
||||||
if (f1 > 0.5F && l.h(MathHelper.b(p), MathHelper.b(q), MathHelper.b(r)) && W.nextFloat() * 30F < (f1 - 0.4F) * 2.0F) {
|
if (f1 > 0.5F && l.h(MathHelper.b(p), MathHelper.b(q), MathHelper.b(r)) && W.nextFloat() * 30F < (f1 - 0.4F) * 2.0F) {
|
||||||
//Craftbukkit start
|
//Craftbukkit start
|
||||||
CraftServer server = ((WorldServer) l).getServer();
|
CraftServer server = ((WorldServer) l).getServer();
|
||||||
EntityCombustEvent event = new EntityCombustEvent(Type.ENTITY_COMBUST, new CraftLivingEntity(server, (EntityLiving) this));
|
EntityCombustEvent event = new EntityCombustEvent(Type.ENTITY_COMBUST, new CraftLivingEntity(server, (EntityLiving) this));
|
||||||
server.getPluginManager().callEvent(event);
|
server.getPluginManager().callEvent(event);
|
||||||
if (!event.isCancelled()) {
|
if (!event.isCancelled()) {
|
||||||
Z = 300;
|
Z = 300;
|
||||||
}
|
}
|
||||||
//Craftbukkit stop
|
//Craftbukkit stop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
super.G();
|
super.G();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void a(Entity entity, float f1) {
|
protected void a(Entity entity, float f1) {
|
||||||
if (f1 < 10F) {
|
if (f1 < 10F) {
|
||||||
double d1 = entity.p - p;
|
double d1 = entity.p - p;
|
||||||
double d2 = entity.r - r;
|
double d2 = entity.r - r;
|
||||||
|
|
||||||
if (bg == 0) {
|
if (bg == 0) {
|
||||||
EntityArrow entityarrow = new EntityArrow(l, this);
|
EntityArrow entityarrow = new EntityArrow(l, this);
|
||||||
|
|
||||||
entityarrow.q += 1.3999999761581421D;
|
entityarrow.q += 1.3999999761581421D;
|
||||||
double d3 = entity.q - 0.20000000298023224D - entityarrow.q;
|
double d3 = entity.q - 0.20000000298023224D - entityarrow.q;
|
||||||
float f2 = MathHelper.a(d1 * d1 + d2 * d2) * 0.2F;
|
float f2 = MathHelper.a(d1 * d1 + d2 * d2) * 0.2F;
|
||||||
|
|
||||||
l.a(this, "random.bow", 1.0F, 1.0F / (W.nextFloat() * 0.4F + 0.8F));
|
l.a(this, "random.bow", 1.0F, 1.0F / (W.nextFloat() * 0.4F + 0.8F));
|
||||||
l.a(entityarrow);
|
l.a(entityarrow);
|
||||||
entityarrow.a(d1, d3 + (double) f2, d2, 0.6F, 12F);
|
entityarrow.a(d1, d3 + (double) f2, d2, 0.6F, 12F);
|
||||||
bg = 30;
|
bg = 30;
|
||||||
}
|
}
|
||||||
v = (float) ((Math.atan2(d2, d1) * 180D) / 3.1415927410125732D) - 90F;
|
v = (float) ((Math.atan2(d2, d1) * 180D) / 3.1415927410125732D) - 90F;
|
||||||
ak = true;
|
ak = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(NBTTagCompound nbttagcompound) {
|
public void a(NBTTagCompound nbttagcompound) {
|
||||||
super.a(nbttagcompound);
|
super.a(nbttagcompound);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void b(NBTTagCompound nbttagcompound) {
|
public void b(NBTTagCompound nbttagcompound) {
|
||||||
super.b(nbttagcompound);
|
super.b(nbttagcompound);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected int g() {
|
protected int g() {
|
||||||
return Item.j.aW;
|
return Item.j.aW;
|
||||||
}
|
}
|
||||||
|
|
||||||
static {
|
static {
|
||||||
a = new ItemStack(Item.i, 1);
|
a = new ItemStack(Item.i, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,14 +23,14 @@ public class EntityZombie extends EntityMobs {
|
|||||||
float f1 = b(1.0F);
|
float f1 = b(1.0F);
|
||||||
|
|
||||||
if (f1 > 0.5F && l.h(MathHelper.b(p), MathHelper.b(q), MathHelper.b(r)) && W.nextFloat() * 30F < (f1 - 0.4F) * 2.0F) {
|
if (f1 > 0.5F && l.h(MathHelper.b(p), MathHelper.b(q), MathHelper.b(r)) && W.nextFloat() * 30F < (f1 - 0.4F) * 2.0F) {
|
||||||
//Craftbukkit start
|
//Craftbukkit start
|
||||||
CraftServer server = ((WorldServer) l).getServer();
|
CraftServer server = ((WorldServer) l).getServer();
|
||||||
EntityCombustEvent event = new EntityCombustEvent(Type.ENTITY_COMBUST, new CraftLivingEntity(server, (EntityLiving) this));
|
EntityCombustEvent event = new EntityCombustEvent(Type.ENTITY_COMBUST, new CraftLivingEntity(server, (EntityLiving) this));
|
||||||
server.getPluginManager().callEvent(event);
|
server.getPluginManager().callEvent(event);
|
||||||
if (!event.isCancelled()) {
|
if (!event.isCancelled()) {
|
||||||
Z = 300;
|
Z = 300;
|
||||||
}
|
}
|
||||||
//Craftbukkit stop
|
//Craftbukkit stop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
super.G();
|
super.G();
|
||||||
|
@ -3,17 +3,15 @@ package net.minecraft.server;
|
|||||||
|
|
||||||
public class ItemInWorldManager {
|
public class ItemInWorldManager {
|
||||||
|
|
||||||
private World b; //currWorld
|
private World b;
|
||||||
public EntityPlayer a; //currPlayer
|
public EntityPlayer a;
|
||||||
private float c; // not used?
|
private float c;
|
||||||
//Craftbukkit start
|
public float d; // CraftBukkit private -> public
|
||||||
public float d; // blockDamage (0 up to 1) //Craftbukkit - Made public to get damage
|
private int e;
|
||||||
//Craftbukkit stop
|
private float f;
|
||||||
private int e; // funny counter
|
private int g;
|
||||||
private float f; // blockHits
|
private int h;
|
||||||
private int g; //posX
|
private int i;
|
||||||
private int h; //posY
|
|
||||||
private int i; //posZ
|
|
||||||
|
|
||||||
public ItemInWorldManager(World world) {
|
public ItemInWorldManager(World world) {
|
||||||
d = 0.0F;
|
d = 0.0F;
|
||||||
|
@ -90,12 +90,12 @@ public final class CraftServer implements Server {
|
|||||||
|
|
||||||
if (partialName.equalsIgnoreCase(iterPlayerName)) {
|
if (partialName.equalsIgnoreCase(iterPlayerName)) {
|
||||||
// Exact match
|
// Exact match
|
||||||
matchedPlayers.clear();
|
matchedPlayers.clear();
|
||||||
matchedPlayers.add(iterPlayer);
|
matchedPlayers.add(iterPlayer);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (iterPlayerName.toLowerCase().indexOf(partialName.toLowerCase()) != -1) {
|
if (iterPlayerName.toLowerCase().indexOf(partialName.toLowerCase()) != -1) {
|
||||||
// Partial match
|
// Partial match
|
||||||
matchedPlayers.add(iterPlayer);
|
matchedPlayers.add(iterPlayer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@ public class CraftWorld implements World {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int getHighestBlockYAt(int x, int z) {
|
public int getHighestBlockYAt(int x, int z) {
|
||||||
return world.d(x, z);
|
return world.d(x, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Chunk getChunkAt(int x, int z) {
|
public Chunk getChunkAt(int x, int z) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren