[SPIGOT-946] Begin making use of access transforms to simplify patching.

This commit is contained in:
md_5 2015-06-06 19:33:48 +10:00
parent a6a57a96d0
commit a65e45d889
47 changed files with 76 additions and 632 deletions

View file

@ -8,15 +8,6 @@
protected BlockDispenser() { protected BlockDispenser() {
super(Material.STONE); super(Material.STONE);
@@ -68,7 +69,7 @@
}
}
- protected void dispense(World world, BlockPosition blockposition) {
+ public void dispense(World world, BlockPosition blockposition) { // CraftBukkit - public
SourceBlock sourceblock = new SourceBlock(world, blockposition);
TileEntityDispenser tileentitydispenser = (TileEntityDispenser) sourceblock.getTileEntity();
@@ -83,6 +84,7 @@ @@ -83,6 +84,7 @@
if (idispensebehavior != IDispenseBehavior.a) { if (idispensebehavior != IDispenseBehavior.a) {

View file

@ -1,14 +1,5 @@
--- a/net/minecraft/server/BlockJukeBox.java --- a/net/minecraft/server/BlockJukeBox.java
+++ b/net/minecraft/server/BlockJukeBox.java +++ b/net/minecraft/server/BlockJukeBox.java
@@ -32,7 +32,7 @@
}
}
- private void dropRecord(World world, BlockPosition blockposition, IBlockData iblockdata) {
+ public void dropRecord(World world, BlockPosition blockposition, IBlockData iblockdata) { // CraftBukkit - public
if (!world.isClientSide) {
TileEntity tileentity = world.getTileEntity(blockposition);
@@ -136,6 +136,11 @@ @@ -136,6 +136,11 @@
} }

View file

@ -25,12 +25,3 @@
if (i != j) { if (i != j) {
iblockdata = iblockdata.set(BlockRedstoneWire.POWER, Integer.valueOf(j)); iblockdata = iblockdata.set(BlockRedstoneWire.POWER, Integer.valueOf(j));
if (world.getType(blockposition) == iblockdata1) { if (world.getType(blockposition) == iblockdata1) {
@@ -232,7 +243,7 @@
}
}
- private int getPower(World world, BlockPosition blockposition, int i) {
+ public int getPower(World world, BlockPosition blockposition, int i) { // CraftBukkit - public
if (world.getType(blockposition).getBlock() != this) {
return i;
} else {

View file

@ -10,24 +10,6 @@
public class Chunk { public class Chunk {
private static final Logger c = LogManager.getLogger(); private static final Logger c = LogManager.getLogger();
@@ -22,13 +25,13 @@
private final int[] f;
private final boolean[] g;
private boolean h;
- private final World world;
- private final int[] heightMap;
+ public final World world; // CraftBukkit - public
+ public final int[] heightMap; // CraftBukkit - public
public final int locX;
public final int locZ;
private boolean k;
- private final Map<BlockPosition, TileEntity> tileEntities;
- private final EntitySlice<Entity>[] entitySlices;
+ public final Map<BlockPosition, TileEntity> tileEntities;
+ public final EntitySlice<Entity>[] entitySlices; // CraftBukkit - public
private boolean done;
private boolean lit;
private boolean p;
@@ -40,6 +43,34 @@ @@ -40,6 +43,34 @@
private int v; private int v;
private ConcurrentLinkedQueue<BlockPosition> w; private ConcurrentLinkedQueue<BlockPosition> w;

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/server/ChunkProviderServer.java --- a/net/minecraft/server/ChunkProviderServer.java
+++ b/net/minecraft/server/ChunkProviderServer.java +++ b/net/minecraft/server/ChunkProviderServer.java
@@ -11,17 +11,28 @@ @@ -11,16 +11,27 @@
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
@ -20,22 +20,18 @@
private static final Logger b = LogManager.getLogger(); private static final Logger b = LogManager.getLogger();
- private Set<Long> unloadQueue = Collections.newSetFromMap(new ConcurrentHashMap()); - private Set<Long> unloadQueue = Collections.newSetFromMap(new ConcurrentHashMap());
- private Chunk emptyChunk;
- private IChunkProvider chunkProvider;
+ public LongHashSet unloadQueue = new LongHashSet(); // CraftBukkit - LongHashSet + public LongHashSet unloadQueue = new LongHashSet(); // CraftBukkit - LongHashSet
+ public Chunk emptyChunk; // CraftBukkit - public public Chunk emptyChunk;
+ public IChunkProvider chunkProvider; // CraftBukkit - public public IChunkProvider chunkProvider;
private IChunkLoader chunkLoader; private IChunkLoader chunkLoader;
- public boolean forceChunkLoad = true; - public boolean forceChunkLoad = true;
- private LongHashMap<Chunk> chunks = new LongHashMap(); - private LongHashMap<Chunk> chunks = new LongHashMap();
- private List<Chunk> chunkList = Lists.newArrayList(); - private List<Chunk> chunkList = Lists.newArrayList();
- private WorldServer world;
+ public boolean forceChunkLoad = false; // CraftBukkit - true -> false + public boolean forceChunkLoad = false; // CraftBukkit - true -> false
+ public LongObjectHashMap<Chunk> chunks = new LongObjectHashMap<Chunk>(); + public LongObjectHashMap<Chunk> chunks = new LongObjectHashMap<Chunk>();
+ public WorldServer world; // CraftBukkit - public public WorldServer world;
public ChunkProviderServer(WorldServer worldserver, IChunkLoader ichunkloader, IChunkProvider ichunkprovider) { public ChunkProviderServer(WorldServer worldserver, IChunkLoader ichunkloader, IChunkProvider ichunkprovider) {
this.emptyChunk = new EmptyChunk(worldserver, 0, 0);
@@ -31,26 +42,43 @@ @@ -31,26 +42,43 @@
} }
@ -186,7 +182,7 @@
chunk.loadNearby(this, this, i, j); chunk.loadNearby(this, this, i, j);
} }
@@ -96,12 +189,25 @@ @@ -96,9 +189,22 @@
} }
public Chunk getOrCreateChunk(int i, int j) { public Chunk getOrCreateChunk(int i, int j) {
@ -210,29 +206,7 @@
+ // CraftBukkit end + // CraftBukkit end
} }
- private Chunk loadChunk(int i, int j) { public Chunk loadChunk(int i, int j) {
+ public Chunk loadChunk(int i, int j) { // CraftBukkit - public
if (this.chunkLoader == null) {
return null;
} else {
@@ -123,7 +229,7 @@
}
}
- private void saveChunkNOP(Chunk chunk) {
+ public void saveChunkNOP(Chunk chunk) { // CraftBukkit - public
if (this.chunkLoader != null) {
try {
this.chunkLoader.b(this.world, chunk);
@@ -134,7 +240,7 @@
}
}
- private void saveChunk(Chunk chunk) {
+ public void saveChunk(Chunk chunk) { // CraftBukkit - public
if (this.chunkLoader != null) {
try {
chunk.setLastSaved(this.world.getTime());
@@ -155,6 +261,30 @@ @@ -155,6 +261,30 @@
chunk.n(); chunk.n();
if (this.chunkProvider != null) { if (this.chunkProvider != null) {

View file

@ -10,8 +10,7 @@
+ +
public class ContainerDispenser extends Container { public class ContainerDispenser extends Container {
- private IInventory items; public IInventory items;
+ public IInventory items; // CraftBukkit - private -> public
+ // CraftBukkit start + // CraftBukkit start
+ private CraftInventoryView bukkitEntity = null; + private CraftInventoryView bukkitEntity = null;
+ private PlayerInventory player; + private PlayerInventory player;

View file

@ -9,8 +9,7 @@
public class CraftingManager { public class CraftingManager {
private static final CraftingManager a = new CraftingManager(); private static final CraftingManager a = new CraftingManager();
- private final List<IRecipe> recipes = Lists.newArrayList(); public List<IRecipe> recipes = Lists.newArrayList();
+ public List<IRecipe> recipes = Lists.newArrayList(); // CraftBukkit - public, removed final
+ // CraftBukkit start + // CraftBukkit start
+ public IRecipe lastRecipe; + public IRecipe lastRecipe;
+ public org.bukkit.inventory.InventoryView lastCraftView; + public org.bukkit.inventory.InventoryView lastCraftView;
@ -21,7 +20,7 @@
} }
- private CraftingManager() { - private CraftingManager() {
+ public CraftingManager() { // CraftBukkit - public + public CraftingManager() { // PAIL: Public
(new RecipesTools()).a(this); (new RecipesTools()).a(this);
(new RecipesWeapons()).a(this); (new RecipesWeapons()).a(this);
(new RecipeIngots()).a(this); (new RecipeIngots()).a(this);

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/server/DedicatedServer.java --- a/net/minecraft/server/DedicatedServer.java
+++ b/net/minecraft/server/DedicatedServer.java +++ b/net/minecraft/server/DedicatedServer.java
@@ -15,20 +15,32 @@ @@ -15,10 +15,20 @@
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
@ -21,10 +21,8 @@
+ private final List<ServerCommand> l = Collections.synchronizedList(Lists.<ServerCommand>newArrayList()); // CraftBukkit - fix decompile error + private final List<ServerCommand> l = Collections.synchronizedList(Lists.<ServerCommand>newArrayList()); // CraftBukkit - fix decompile error
private RemoteStatusListener m; private RemoteStatusListener m;
private RemoteControlListener n; private RemoteControlListener n;
- private PropertyManager propertyManager; public PropertyManager propertyManager;
+ public PropertyManager propertyManager; // CraftBukkit - public @@ -27,8 +37,10 @@
private EULA p;
private boolean generateStructures;
private WorldSettings.EnumGamemode r; private WorldSettings.EnumGamemode r;
private boolean s; private boolean s;

View file

@ -41,15 +41,6 @@
private static final AxisAlignedBB a = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D); private static final AxisAlignedBB a = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D);
private static int entityCount; private static int entityCount;
private int id; private int id;
@@ -55,7 +87,7 @@
protected Random random;
public int ticksLived;
public int maxFireTicks;
- private int fireTicks;
+ public int fireTicks; // CraftBukkit - public
protected boolean inWater;
public int noDamageTicks;
protected boolean justCreated;
@@ -79,6 +111,8 @@ @@ -79,6 +111,8 @@
private boolean invulnerable; private boolean invulnerable;
protected UUID uniqueID; protected UUID uniqueID;
@ -59,15 +50,6 @@
public int getId() { public int getId() {
return this.id; return this.id;
@@ -137,7 +171,7 @@
this.dead = true;
}
- protected void setSize(float f, float f1) {
+ public void setSize(float f, float f1) { // CraftBukkit - public
if (f != this.width || f1 != this.length) {
float f2 = this.width;
@@ -152,6 +186,33 @@ @@ -152,6 +186,33 @@
} }

View file

@ -16,28 +16,7 @@
public class EntityArmorStand extends EntityLiving { public class EntityArmorStand extends EntityLiving {
private static final Vector3f a = new Vector3f(0.0F, 0.0F, 0.0F); private static final Vector3f a = new Vector3f(0.0F, 0.0F, 0.0F);
@@ -15,12 +24,14 @@ @@ -332,6 +341,22 @@
private long i;
private int bi;
private boolean bj;
- private Vector3f headPose;
- private Vector3f bodyPose;
- private Vector3f leftArmPose;
- private Vector3f rightArmPose;
- private Vector3f leftLegPose;
- private Vector3f rightLegPose;
+ // CraftBukkit start - public all the things!
+ public Vector3f headPose;
+ public Vector3f bodyPose;
+ public Vector3f leftArmPose;
+ public Vector3f rightArmPose;
+ public Vector3f leftLegPose;
+ public Vector3f rightLegPose;
+ // CraftBukkit end
public EntityArmorStand(World world) {
super(world);
@@ -332,6 +343,22 @@
ItemStack itemstack1 = entityhuman.inventory.getItem(j); ItemStack itemstack1 = entityhuman.inventory.getItem(j);
ItemStack itemstack2; ItemStack itemstack2;
@ -60,7 +39,7 @@
if (entityhuman.abilities.canInstantlyBuild && (itemstack == null || itemstack.getItem() == Item.getItemOf(Blocks.AIR)) && itemstack1 != null) { if (entityhuman.abilities.canInstantlyBuild && (itemstack == null || itemstack.getItem() == Item.getItemOf(Blocks.AIR)) && itemstack1 != null) {
itemstack2 = itemstack1.cloneItemStack(); itemstack2 = itemstack1.cloneItemStack();
itemstack2.count = 1; itemstack2.count = 1;
@@ -352,6 +379,11 @@ @@ -352,6 +377,11 @@
} }
public boolean damageEntity(DamageSource damagesource, float f) { public boolean damageEntity(DamageSource damagesource, float f) {
@ -72,46 +51,3 @@
if (this.world.isClientSide) { if (this.world.isClientSide) {
return false; return false;
} else if (DamageSource.OUT_OF_WORLD.equals(damagesource)) { } else if (DamageSource.OUT_OF_WORLD.equals(damagesource)) {
@@ -552,7 +584,7 @@
return this.isInvisible();
}
- private void setSmall(boolean flag) {
+ public void setSmall(boolean flag) { // CraftBukkit - public
byte b0 = this.datawatcher.getByte(10);
if (flag) {
@@ -568,7 +600,7 @@
return (this.datawatcher.getByte(10) & 1) != 0;
}
- private void setGravity(boolean flag) {
+ public void setGravity(boolean flag) { // CraftBukkit - public
byte b0 = this.datawatcher.getByte(10);
if (flag) {
@@ -578,13 +610,14 @@
}
this.datawatcher.watch(10, Byte.valueOf(b0));
+ this.noclip = flag; // CraftBukkit.
}
public boolean hasGravity() {
return (this.datawatcher.getByte(10) & 2) != 0;
}
- private void setArms(boolean flag) {
+ public void setArms(boolean flag) { // CraftBukkit - public
byte b0 = this.datawatcher.getByte(10);
if (flag) {
@@ -600,7 +633,7 @@
return (this.datawatcher.getByte(10) & 4) != 0;
}
- private void setBasePlate(boolean flag) {
+ public void setBasePlate(boolean flag) { // CraftBukkit - public
byte b0 = this.datawatcher.getByte(10);
if (flag) {

View file

@ -13,15 +13,6 @@
public class EntityArrow extends Entity implements IProjectile { public class EntityArrow extends Entity implements IProjectile {
private int d = -1; private int d = -1;
@@ -16,7 +22,7 @@
private int ar;
private int as;
private double damage = 2.0D;
- private int knockbackStrength;
+ public int knockbackStrength; // CraftBukkit - public
public EntityArrow(World world) {
super(world);
@@ -35,6 +41,7 @@ @@ -35,6 +41,7 @@
super(world); super(world);
this.j = 10.0D; this.j = 10.0D;

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/server/EntityExperienceOrb.java --- a/net/minecraft/server/EntityExperienceOrb.java
+++ b/net/minecraft/server/EntityExperienceOrb.java +++ b/net/minecraft/server/EntityExperienceOrb.java
@@ -1,12 +1,18 @@ @@ -1,5 +1,11 @@
package net.minecraft.server; package net.minecraft.server;
+// CraftBukkit start +// CraftBukkit start
@ -12,14 +12,6 @@
public class EntityExperienceOrb extends Entity { public class EntityExperienceOrb extends Entity {
public int a; public int a;
public int b;
public int c;
private int d = 5;
- private int value;
+ public int value; // CraftBukkit - public
private EntityHuman targetPlayer;
private int targetTime;
@@ -34,6 +40,7 @@ @@ -34,6 +40,7 @@
public void t_() { public void t_() {

View file

@ -1,11 +1 @@
--- a/net/minecraft/server/EntityFireworks.java
+++ b/net/minecraft/server/EntityFireworks.java
@@ -3,7 +3,7 @@
public class EntityFireworks extends Entity {
private int ticksFlown;
- private int expectedLifespan;
+ public int expectedLifespan; // CraftBukkit - public
public EntityFireworks(World world) {
super(world);

View file

@ -1,29 +0,0 @@
--- a/net/minecraft/server/EntityGuardian.java
+++ b/net/minecraft/server/EntityGuardian.java
@@ -14,7 +14,7 @@
private EntityLiving bo;
private int bp;
private boolean bq;
- private PathfinderGoalRandomStroll goalRandomStroll;
+ public PathfinderGoalRandomStroll goalRandomStroll; // CraftBukkit - public
public EntityGuardian(World world) {
super(world);
@@ -35,7 +35,7 @@
this.b = this.a = this.random.nextFloat();
}
- protected void initAttributes() {
+ public void initAttributes() { // CraftBukkit - public
super.initAttributes();
this.getAttributeInstance(GenericAttributes.ATTACK_DAMAGE).setValue(6.0D);
this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).setValue(0.5D);
@@ -516,7 +516,7 @@
return (entityliving instanceof EntityHuman || entityliving instanceof EntitySquid) && entityliving.h(this.a) > 9.0D;
}
- public boolean apply(Object object) {
+ public boolean apply(EntityLiving object) { // CraftBukkit - fix decompile error
return this.a((EntityLiving) object);
}
}

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/server/EntityHanging.java --- a/net/minecraft/server/EntityHanging.java
+++ b/net/minecraft/server/EntityHanging.java +++ b/net/minecraft/server/EntityHanging.java
@@ -4,10 +4,17 @@ @@ -4,6 +4,13 @@
import java.util.List; import java.util.List;
import org.apache.commons.lang3.Validate; import org.apache.commons.lang3.Validate;
@ -14,20 +14,6 @@
public abstract class EntityHanging extends Entity { public abstract class EntityHanging extends Entity {
private int c; private int c;
- protected BlockPosition blockPosition;
+ public BlockPosition blockPosition; // CraftBukkit - public
public EnumDirection direction;
public EntityHanging(World world) {
@@ -22,7 +29,7 @@
protected void h() {}
- protected void setDirection(EnumDirection enumdirection) {
+ public void setDirection(EnumDirection enumdirection) { // CraftBukkit - public
Validate.notNull(enumdirection);
Validate.isTrue(enumdirection.k().c());
this.direction = enumdirection;
@@ -30,30 +37,34 @@ @@ -30,30 +37,34 @@
this.updateBoundingBox(); this.updateBoundingBox();
} }

View file

@ -9,24 +9,6 @@
public class EntityHorse extends EntityAnimal implements IInventoryListener { public class EntityHorse extends EntityAnimal implements IInventoryListener {
private static final Predicate<Entity> bs = new Predicate() { private static final Predicate<Entity> bs = new Predicate() {
@@ -15,7 +17,7 @@
return this.a((Entity) object);
}
};
- private static final IAttribute attributeJumpStrength = (new AttributeRanged((IAttribute) null, "horse.jumpStrength", 0.7D, 0.0D, 2.0D)).a("Jump Strength").a(true);
+ public static final IAttribute attributeJumpStrength = (new AttributeRanged((IAttribute) null, "horse.jumpStrength", 0.7D, 0.0D, 2.0D)).a("Jump Strength").a(true); // CraftBukkit - public
private static final String[] bu = new String[] { null, "textures/entity/horse/armor/horse_armor_iron.png", "textures/entity/horse/armor/horse_armor_gold.png", "textures/entity/horse/armor/horse_armor_diamond.png"};
private static final String[] bv = new String[] { "", "meo", "goo", "dio"};
private static final int[] bw = new int[] { 0, 5, 7, 11};
@@ -29,7 +31,7 @@
public int bm;
public int bo;
protected boolean bp;
- private InventoryHorseChest inventoryChest;
+ public InventoryHorseChest inventoryChest; // CraftBukkit - public
private boolean bF;
protected int bq;
protected float br;
@@ -44,6 +46,7 @@ @@ -44,6 +46,7 @@
private String bO; private String bO;
private String[] bP = new String[3]; private String[] bP = new String[3];
@ -43,8 +25,7 @@
+ return this.hasChest() /* && (i == 1 || i == 2) */ ? 17 : 2; // CraftBukkit - Remove type check + return this.hasChest() /* && (i == 1 || i == 2) */ ? 17 : 2; // CraftBukkit - Remove type check
} }
- private void loadChest() { public void loadChest() {
+ public void loadChest() { // CraftBukkit - public
InventoryHorseChest inventoryhorsechest = this.inventoryChest; InventoryHorseChest inventoryhorsechest = this.inventoryChest;
- this.inventoryChest = new InventoryHorseChest("HorseChest", this.cZ()); - this.inventoryChest = new InventoryHorseChest("HorseChest", this.cZ());

View file

@ -29,32 +29,14 @@
protected int bm; protected int bm;
public float bn; public float bn;
public float bo; public float bo;
@@ -25,15 +39,16 @@ @@ -47,6 +61,17 @@
public double bt;
public double bu;
public double bv;
- protected boolean sleeping;
+ public boolean sleeping; // CraftBukkit - public
public BlockPosition bx;
- private int sleepTicks;
+ public int sleepTicks; // CraftBukkit - public
public float by;
public float bz;
private BlockPosition c;
private boolean d;
private BlockPosition e;
public PlayerAbilities abilities = new PlayerAbilities();
+ public int oldLevel = -1; // CraftBukkit - add field
public int expLevel;
public int expTotal;
public float exp;
@@ -47,6 +62,16 @@
private boolean bI = false; private boolean bI = false;
public EntityFishingHook hookedFish; public EntityFishingHook hookedFish;
+ // CraftBukkit start + // CraftBukkit start
+ public boolean fauxSleeping; + public boolean fauxSleeping;
+ public String spawnWorld = ""; + public String spawnWorld = "";
+ public int oldLevel = -1;
+ +
+ @Override + @Override
+ public CraftHumanEntity getBukkitEntity() { + public CraftHumanEntity getBukkitEntity() {
@ -98,15 +80,6 @@
ItemStack itemstack = this.g.b(this.world, this); ItemStack itemstack = this.g.b(this.world, this);
if (itemstack != this.g || itemstack != null && itemstack.count != i) { if (itemstack != this.g || itemstack != null && itemstack.count != i) {
@@ -283,7 +334,7 @@
return this.getHealth() <= 0.0F || this.isSleeping();
}
- protected void closeInventory() {
+ public void closeInventory() { // CraftBukkit - public
this.activeContainer = this.defaultContainer;
}
@@ -324,7 +375,8 @@ @@ -324,7 +375,8 @@
if (this.world.getDifficulty() == EnumDifficulty.PEACEFUL && this.world.getGameRules().getBoolean("naturalRegeneration")) { if (this.world.getDifficulty() == EnumDifficulty.PEACEFUL && this.world.getGameRules().getBoolean("naturalRegeneration")) {

View file

@ -16,26 +16,17 @@
public abstract class EntityInsentient extends EntityLiving { public abstract class EntityInsentient extends EntityLiving {
public int a_; public int a_;
@@ -13,14 +22,14 @@ @@ -13,8 +22,8 @@
protected ControllerJump g; protected ControllerJump g;
private EntityAIBodyControl b; private EntityAIBodyControl b;
protected NavigationAbstract navigation; protected NavigationAbstract navigation;
- protected final PathfinderGoalSelector goalSelector; - public final PathfinderGoalSelector goalSelector;
- protected final PathfinderGoalSelector targetSelector; - public final PathfinderGoalSelector targetSelector;
+ public PathfinderGoalSelector goalSelector; // CraftBukkit - public + public PathfinderGoalSelector goalSelector; // PAIL: -final
+ public PathfinderGoalSelector targetSelector; // CraftBukkit - public + public PathfinderGoalSelector targetSelector; // PAIL: -final
private EntityLiving goalTarget; private EntityLiving goalTarget;
private EntitySenses bk; private EntitySenses bk;
private ItemStack[] equipment = new ItemStack[5]; private ItemStack[] equipment = new ItemStack[5];
- protected float[] dropChances = new float[5];
- private boolean canPickUpLoot;
- private boolean persistent;
+ public float[] dropChances = new float[5]; // CraftBukkit - public
+ public boolean canPickUpLoot; // CraftBukkit - public
+ public boolean persistent; // CraftBukkit - public
private boolean bo;
private Entity bp;
private NBTTagCompound bq;
@@ -40,6 +49,9 @@ @@ -40,6 +49,9 @@
this.dropChances[i] = 0.085F; this.dropChances[i] = 0.085F;
} }

View file

@ -1,18 +1,14 @@
--- a/net/minecraft/server/EntityItem.java --- a/net/minecraft/server/EntityItem.java
+++ b/net/minecraft/server/EntityItem.java +++ b/net/minecraft/server/EntityItem.java
@@ -4,15 +4,18 @@ @@ -3,6 +3,7 @@
import java.util.Iterator;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
+import org.bukkit.event.player.PlayerPickupItemEvent; // CraftBukkit +import org.bukkit.event.player.PlayerPickupItemEvent; // CraftBukkit
+
public class EntityItem extends Entity { public class EntityItem extends Entity {
private static final Logger b = LogManager.getLogger(); @@ -13,6 +14,7 @@
private int age;
- private int pickupDelay;
+ public int pickupDelay; // CraftBukkit - public
private int e;
private String f; private String f;
private String g; private String g;
public float a; public float a;
@ -20,7 +16,7 @@
public EntityItem(World world, double d0, double d1, double d2) { public EntityItem(World world, double d0, double d1, double d2) {
super(world); super(world);
@@ -28,6 +31,11 @@ @@ -28,6 +30,11 @@
public EntityItem(World world, double d0, double d1, double d2, ItemStack itemstack) { public EntityItem(World world, double d0, double d1, double d2, ItemStack itemstack) {
this(world, d0, d1, d2); this(world, d0, d1, d2);
@ -32,7 +28,7 @@
this.setItemStack(itemstack); this.setItemStack(itemstack);
} }
@@ -52,9 +60,12 @@ @@ -52,9 +59,12 @@
this.die(); this.die();
} else { } else {
super.t_(); super.t_();
@ -48,7 +44,7 @@
this.lastX = this.locX; this.lastX = this.locX;
this.lastY = this.locY; this.lastY = this.locY;
@@ -90,12 +101,21 @@ @@ -90,12 +100,21 @@
this.motY *= -0.5D; this.motY *= -0.5D;
} }
@ -70,7 +66,7 @@
this.die(); this.die();
} }
@@ -183,6 +203,11 @@ @@ -183,6 +202,11 @@
} else if (this.getItemStack() != null && this.getItemStack().getItem() == Items.NETHER_STAR && damagesource.isExplosion()) { } else if (this.getItemStack() != null && this.getItemStack().getItem() == Items.NETHER_STAR && damagesource.isExplosion()) {
return false; return false;
} else { } else {
@ -82,7 +78,7 @@
this.ac(); this.ac();
this.e = (int) ((float) this.e - f); this.e = (int) ((float) this.e - f);
if (this.e <= 0) { if (this.e <= 0) {
@@ -228,7 +253,18 @@ @@ -228,7 +252,18 @@
NBTTagCompound nbttagcompound1 = nbttagcompound.getCompound("Item"); NBTTagCompound nbttagcompound1 = nbttagcompound.getCompound("Item");
@ -102,7 +98,7 @@
if (this.getItemStack() == null) { if (this.getItemStack() == null) {
this.die(); this.die();
} }
@@ -240,6 +276,26 @@ @@ -240,6 +275,26 @@
ItemStack itemstack = this.getItemStack(); ItemStack itemstack = this.getItemStack();
int i = itemstack.count; int i = itemstack.count;

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/server/EntityLiving.java --- a/net/minecraft/server/EntityLiving.java
+++ b/net/minecraft/server/EntityLiving.java +++ b/net/minecraft/server/EntityLiving.java
@@ -10,13 +10,26 @@ @@ -10,12 +10,25 @@
import java.util.Random; import java.util.Random;
import java.util.UUID; import java.util.UUID;
@ -22,43 +22,12 @@
private static final UUID a = UUID.fromString("662A6B8D-DA3E-4C1C-8813-96EA6097278D"); private static final UUID a = UUID.fromString("662A6B8D-DA3E-4C1C-8813-96EA6097278D");
private static final AttributeModifier b = (new AttributeModifier(EntityLiving.a, "Sprinting speed boost", 0.30000001192092896D, 2)).a(false); private static final AttributeModifier b = (new AttributeModifier(EntityLiving.a, "Sprinting speed boost", 0.30000001192092896D, 2)).a(false);
private AttributeMapBase c; private AttributeMapBase c;
- private final CombatTracker combatTracker = new CombatTracker(this); - public final CombatTracker combatTracker = new CombatTracker(this);
- private final Map<Integer, MobEffect> effects = Maps.newHashMap(); + public CombatTracker combatTracker = new CombatTracker(this);
+ public CombatTracker combatTracker = new CombatTracker(this); // CraftBukkit - public public final Map<Integer, MobEffect> effects = Maps.newHashMap();
+ public final Map<Integer, MobEffect> effects = Maps.newHashMap(); // CraftBukkit - public
private final ItemStack[] h = new ItemStack[5]; private final ItemStack[] h = new ItemStack[5];
public boolean ar; public boolean ar;
public int as; @@ -69,6 +82,11 @@
@@ -40,7 +53,7 @@
public float aK;
public float aL;
public float aM = 0.02F;
- protected EntityHuman killer;
+ public EntityHuman killer;
protected int lastDamageByPlayerTime;
protected boolean aP;
protected int ticksFarFromPlayer;
@@ -50,7 +63,7 @@
protected float aU;
protected float aV;
protected int aW;
- protected float lastDamage;
+ public float lastDamage; // CraftBukkit - public
protected boolean aY;
public float aZ;
public float ba;
@@ -61,14 +74,19 @@
protected double bf;
protected double bg;
protected double bh;
- private boolean updateEffects = true;
- private EntityLiving lastDamager;
- private int hurtTimestamp;
+ public boolean updateEffects = true; // CraftBukkit - public
+ public EntityLiving lastDamager; // CraftBukkit - public
+ public int hurtTimestamp; // CraftBukkit - public
private EntityLiving bk;
private int bl;
private float bm; private float bm;
private int bn; private int bn;
private float bo; private float bo;

View file

@ -1,11 +0,0 @@
--- a/net/minecraft/server/EntityPigZombie.java
+++ b/net/minecraft/server/EntityPigZombie.java
@@ -6,7 +6,7 @@
private static final UUID b = UUID.fromString("49455A49-7EC5-45BA-B886-3B90B23A1718");
private static final AttributeModifier c = (new AttributeModifier(EntityPigZombie.b, "Attacking speed boost", 0.05D, 0)).a(false);
- private int angerLevel;
+ public int angerLevel; // CraftBukkit - public
private int soundDelay;
private UUID hurtBy;

View file

@ -18,24 +18,6 @@
public class EntityPlayer extends EntityHuman implements ICrafting { public class EntityPlayer extends EntityHuman implements ICrafting {
private static final Logger bH = LogManager.getLogger(); private static final Logger bH = LogManager.getLogger();
@@ -23,14 +34,14 @@
public double d;
public double e;
public final List<ChunkCoordIntPair> chunkCoordIntPairQueue = Lists.newLinkedList();
- private final List<Integer> removeQueue = Lists.newLinkedList();
+ public final List<Integer> removeQueue = Lists.newLinkedList(); // CraftBukkit - public
private final ServerStatisticManager bK;
private float bL = Float.MIN_VALUE;
private float bM = -1.0E8F;
private int bN = -99999999;
private boolean bO = true;
- private int lastSentExp = -99999999;
- private int invulnerableTicks = 60;
+ public int lastSentExp = -99999999; // CraftBukkit - public
+ public int invulnerableTicks = 60; // CraftBukkit - public
private EntityHuman.EnumChatVisibility bR;
private boolean bS = true;
private long bT = System.currentTimeMillis();
@@ -40,6 +51,18 @@ @@ -40,6 +51,18 @@
public int ping; public int ping;
public boolean viewingCredits; public boolean viewingCredits;

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/server/EntityPotion.java --- a/net/minecraft/server/EntityPotion.java
+++ b/net/minecraft/server/EntityPotion.java +++ b/net/minecraft/server/EntityPotion.java
@@ -3,9 +3,16 @@ @@ -3,6 +3,13 @@
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
@ -13,11 +13,7 @@
+ +
public class EntityPotion extends EntityProjectile { public class EntityPotion extends EntityProjectile {
- private ItemStack item; public ItemStack item;
+ public ItemStack item; // CraftBukkit - public
public EntityPotion(World world) {
super(world);
@@ -57,13 +64,16 @@ @@ -57,13 +64,16 @@
if (!this.world.isClientSide) { if (!this.world.isClientSide) {
List list = Items.POTION.h(this.item); List list = Items.POTION.h(this.item);

View file

@ -1,16 +1,5 @@
--- a/net/minecraft/server/EntityProjectile.java --- a/net/minecraft/server/EntityProjectile.java
+++ b/net/minecraft/server/EntityProjectile.java +++ b/net/minecraft/server/EntityProjectile.java
@@ -11,8 +11,8 @@
private Block inBlockId;
protected boolean inGround;
public int shake;
- private EntityLiving shooter;
- private String shooterName;
+ public EntityLiving shooter; // CraftBukkit - public
+ public String shooterName; // CraftBukkit - public
private int i;
private int ar;
@@ -26,6 +26,7 @@ @@ -26,6 +26,7 @@
public EntityProjectile(World world, EntityLiving entityliving) { public EntityProjectile(World world, EntityLiving entityliving) {
super(world); super(world);

View file

@ -10,15 +10,6 @@
public class EntitySlime extends EntityInsentient implements IMonster { public class EntitySlime extends EntityInsentient implements IMonster {
public float a; public float a;
@@ -23,7 +27,7 @@
this.datawatcher.a(16, Byte.valueOf((byte) 1));
}
- protected void setSize(int i) {
+ public void setSize(int i) { // CraftBukkit - public
this.datawatcher.watch(16, Byte.valueOf((byte) i));
this.setSize(0.51000005F * (float) i, 0.51000005F * (float) i);
this.setPosition(this.locX, this.locY, this.locZ);
@@ -133,6 +137,18 @@ @@ -133,6 +137,18 @@
if (!this.world.isClientSide && i > 1 && this.getHealth() <= 0.0F) { if (!this.world.isClientSide && i > 1 && this.getHealth() <= 0.0F) {
int j = 2 + this.random.nextInt(3); int j = 2 + this.random.nextInt(3);

View file

@ -1,14 +1,5 @@
--- a/net/minecraft/server/EntityTracker.java --- a/net/minecraft/server/EntityTracker.java
+++ b/net/minecraft/server/EntityTracker.java +++ b/net/minecraft/server/EntityTracker.java
@@ -14,7 +14,7 @@
private static final Logger a = LogManager.getLogger();
private final WorldServer world;
private Set<EntityTrackerEntry> c = Sets.newHashSet();
- private IntHashMap<EntityTrackerEntry> trackedEntities = new IntHashMap();
+ public IntHashMap<EntityTrackerEntry> trackedEntities = new IntHashMap(); // CraftBukkit - public
private int e;
public EntityTracker(WorldServer worldserver) {
@@ -113,11 +113,12 @@ @@ -113,11 +113,12 @@
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity To Track"); CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity To Track");

File diff suppressed because one or more lines are too long

View file

@ -14,12 +14,7 @@
public class Explosion { public class Explosion {
private final boolean a; private final boolean a;
@@ -18,15 +25,16 @@ @@ -22,11 +29,12 @@
private final double posX;
private final double posY;
private final double posZ;
- private final Entity source;
+ public final Entity source; // CraftBukkit - public
private final float size; private final float size;
private final List<BlockPosition> blocks = Lists.newArrayList(); private final List<BlockPosition> blocks = Lists.newArrayList();
private final Map<EntityHuman, Vec3D> k = Maps.newHashMap(); private final Map<EntityHuman, Vec3D> k = Maps.newHashMap();

View file

@ -1,15 +1,8 @@
--- a/net/minecraft/server/FoodMetaData.java --- a/net/minecraft/server/FoodMetaData.java
+++ b/net/minecraft/server/FoodMetaData.java +++ b/net/minecraft/server/FoodMetaData.java
@@ -2,13 +2,21 @@ @@ -6,9 +6,17 @@
public float saturationLevel = 5.0F;
public class FoodMetaData { public float exhaustionLevel;
- private int foodLevel = 20;
- private float saturationLevel = 5.0F;
- private float exhaustionLevel;
+ public int foodLevel = 20; // CraftBukkit - public
+ public float saturationLevel = 5.0F; // CraftBukkit - public
+ public float exhaustionLevel; // CraftBukkit - public
private int foodTickTimer; private int foodTickTimer;
+ private EntityHuman entityhuman; // CraftBukkit + private EntityHuman entityhuman; // CraftBukkit
private int e = 20; private int e = 20;

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/server/InventoryLargeChest.java --- a/net/minecraft/server/InventoryLargeChest.java
+++ b/net/minecraft/server/InventoryLargeChest.java +++ b/net/minecraft/server/InventoryLargeChest.java
@@ -1,10 +1,54 @@ @@ -1,11 +1,55 @@
package net.minecraft.server; package net.minecraft.server;
+// CraftBukkit start +// CraftBukkit start
@ -13,11 +13,9 @@
public class InventoryLargeChest implements ITileInventory { public class InventoryLargeChest implements ITileInventory {
private String a; private String a;
- private ITileInventory left; public ITileInventory left;
- private ITileInventory right; public ITileInventory right;
+ public ITileInventory left;
+ public ITileInventory right;
+
+ // CraftBukkit start - add fields and methods + // CraftBukkit start - add fields and methods
+ public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>(); + public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>();
+ +
@ -54,9 +52,10 @@
+ this.right.setMaxStackSize(size); + this.right.setMaxStackSize(size);
+ } + }
+ // CraftBukkit end + // CraftBukkit end
+
public InventoryLargeChest(String s, ITileInventory itileinventory, ITileInventory itileinventory1) { public InventoryLargeChest(String s, ITileInventory itileinventory, ITileInventory itileinventory1) {
this.a = s; this.a = s;
if (itileinventory == null) {
@@ -68,7 +112,7 @@ @@ -68,7 +112,7 @@
} }

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/server/InventorySubcontainer.java --- a/net/minecraft/server/InventorySubcontainer.java
+++ b/net/minecraft/server/InventorySubcontainer.java +++ b/net/minecraft/server/InventorySubcontainer.java
@@ -3,15 +3,56 @@ @@ -3,6 +3,12 @@
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import java.util.List; import java.util.List;
@ -13,9 +13,7 @@
public class InventorySubcontainer implements IInventory { public class InventorySubcontainer implements IInventory {
private String a; private String a;
private int b; @@ -11,7 +17,42 @@
- private ItemStack[] items;
+ public ItemStack[] items; // CraftBukkit - public
private List<IInventoryListener> d; private List<IInventoryListener> d;
private boolean e; private boolean e;

View file

@ -1,11 +0,0 @@
--- a/net/minecraft/server/JsonListEntry.java
+++ b/net/minecraft/server/JsonListEntry.java
@@ -14,7 +14,7 @@
this.a = t0;
}
- T getKey() {
+ public T getKey() { // CraftBukkit - public
return this.a;
}

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/server/MinecraftServer.java --- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java
@@ -38,14 +38,27 @@ @@ -38,6 +38,19 @@
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
@ -19,18 +19,7 @@
+ +
public abstract class MinecraftServer implements Runnable, ICommandListener, IAsyncTaskHandler, IMojangStatistics { public abstract class MinecraftServer implements Runnable, ICommandListener, IAsyncTaskHandler, IMojangStatistics {
- private static final Logger LOGGER = LogManager.getLogger(); public static final Logger LOGGER = LogManager.getLogger();
+ public static final Logger LOGGER = LogManager.getLogger(); // CraftBukkit - make public
public static final File a = new File("usercache.json");
private static MinecraftServer l;
- private final Convertable convertable;
+ public Convertable convertable; // CraftBukkit - remove final, public
private final MojangStatisticsGenerator n = new MojangStatisticsGenerator("server", this, az());
- private final File universe;
+ public File universe; // CraftBukkit - remove final, public
private final List<IUpdatePlayerListBox> p = Lists.newArrayList();
protected final ICommandHandler b;
public final MethodProfiler methodProfiler = new MethodProfiler();
@@ -94,19 +107,61 @@ @@ -94,19 +107,61 @@
private Thread serverThread; private Thread serverThread;
private long ab = az(); private long ab = az();

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/server/MobSpawnerAbstract.java --- a/net/minecraft/server/MobSpawnerAbstract.java
+++ b/net/minecraft/server/MobSpawnerAbstract.java +++ b/net/minecraft/server/MobSpawnerAbstract.java
@@ -4,9 +4,11 @@ @@ -4,6 +4,8 @@
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
@ -8,17 +8,10 @@
+ +
public abstract class MobSpawnerAbstract { public abstract class MobSpawnerAbstract {
- private int spawnDelay = 20; public int spawnDelay = 20;
+ public int spawnDelay = 20; // CraftBukkit - public @@ -24,6 +26,11 @@
private String mobName = "Pig";
private final List<MobSpawnerAbstract.a> mobs = Lists.newArrayList();
private MobSpawnerAbstract.a spawnData;
@@ -22,8 +24,13 @@
public MobSpawnerAbstract() {} public String getMobName() {
- private String getMobName() {
+ public String getMobName() { // CraftBukkit - public
if (this.i() == null) { if (this.i() == null) {
+ // CraftBukkit start - fix NPE + // CraftBukkit start - fix NPE
+ if (this.mobName == null) { + if (this.mobName == null) {

View file

@ -1,14 +1,5 @@
--- a/net/minecraft/server/NetworkManager.java --- a/net/minecraft/server/NetworkManager.java
+++ b/net/minecraft/server/NetworkManager.java +++ b/net/minecraft/server/NetworkManager.java
@@ -63,7 +63,7 @@
private final EnumProtocolDirection h;
private final Queue<NetworkManager.QueuedPacket> i = Queues.newConcurrentLinkedQueue();
private final ReentrantReadWriteLock j = new ReentrantReadWriteLock();
- private Channel channel;
+ public Channel channel; // CraftBukkit - public
private SocketAddress l;
private PacketListener m;
private IChatBaseComponent n;
@@ -231,7 +231,7 @@ @@ -231,7 +231,7 @@
public void close(IChatBaseComponent ichatbasecomponent) { public void close(IChatBaseComponent ichatbasecomponent) {

View file

@ -1,20 +0,0 @@
--- a/net/minecraft/server/PacketPlayOutBlockChange.java
+++ b/net/minecraft/server/PacketPlayOutBlockChange.java
@@ -5,7 +5,7 @@
public class PacketPlayOutBlockChange implements Packet<PacketListenerPlayOut> {
private BlockPosition a;
- private IBlockData block;
+ public IBlockData block; // CraftBukkit - public
public PacketPlayOutBlockChange() {}
@@ -27,8 +27,4 @@
public void a(PacketListenerPlayOut packetlistenerplayout) {
packetlistenerplayout.a(this);
}
-
- public void a(PacketListener packetlistener) {
- this.a((PacketListenerPlayOut) packetlistener);
- }
}

View file

@ -1,20 +0,0 @@
--- a/net/minecraft/server/PacketPlayOutSpawnPosition.java
+++ b/net/minecraft/server/PacketPlayOutSpawnPosition.java
@@ -4,7 +4,7 @@
public class PacketPlayOutSpawnPosition implements Packet<PacketListenerPlayOut> {
- private BlockPosition position;
+ public BlockPosition position; // CraftBukkit - public
public PacketPlayOutSpawnPosition() {}
@@ -23,8 +23,4 @@
public void a(PacketListenerPlayOut packetlistenerplayout) {
packetlistenerplayout.a(this);
}
-
- public void a(PacketListener packetlistener) {
- this.a((PacketListenerPlayOut) packetlistener);
- }
}

View file

@ -1,13 +0,0 @@
--- a/net/minecraft/server/PlayerAbilities.java
+++ b/net/minecraft/server/PlayerAbilities.java
@@ -7,8 +7,8 @@
public boolean canFly;
public boolean canInstantlyBuild;
public boolean mayBuild = true;
- private float flySpeed = 0.05F;
- private float walkSpeed = 0.1F;
+ public float flySpeed = 0.05F; // CraftBukkit - public
+ public float walkSpeed = 0.1F; // CraftBukkit - public
public PlayerAbilities() {}

View file

@ -27,23 +27,15 @@
public abstract class PlayerList { public abstract class PlayerList {
public static final File a = new File("banned-players.json"); public static final File a = new File("banned-players.json");
@@ -27,14 +47,14 @@ @@ -27,7 +47,7 @@
private static final Logger f = LogManager.getLogger(); private static final Logger f = LogManager.getLogger();
private static final SimpleDateFormat g = new SimpleDateFormat("yyyy-MM-dd \'at\' HH:mm:ss z"); private static final SimpleDateFormat g = new SimpleDateFormat("yyyy-MM-dd \'at\' HH:mm:ss z");
private final MinecraftServer server; private final MinecraftServer server;
- private final List<EntityPlayer> players = Lists.newArrayList(); - public final List<EntityPlayer> players = Lists.newArrayList();
+ public final List<EntityPlayer> players = new java.util.concurrent.CopyOnWriteArrayList(); // CraftBukkit - ArrayList -> CopyOnWriteArrayList: Iterator safety, public + public final List<EntityPlayer> players = new java.util.concurrent.CopyOnWriteArrayList(); // CraftBukkit - ArrayList -> CopyOnWriteArrayList: Iterator safety
private final Map<UUID, EntityPlayer> j = Maps.newHashMap(); private final Map<UUID, EntityPlayer> j = Maps.newHashMap();
private final GameProfileBanList k; private final GameProfileBanList k;
private final IpBanList l; private final IpBanList l;
private final OpList operators;
private final WhiteList whitelist;
private final Map<UUID, ServerStatisticManager> o;
- private IPlayerFileData playerFileData;
+ public IPlayerFileData playerFileData; // CraftBukkit - public
private boolean hasWhitelist;
protected int maxPlayers;
private int r;
@@ -42,7 +62,15 @@ @@ -42,7 +62,15 @@
private boolean t; private boolean t;
private int u; private int u;
@ -121,7 +113,7 @@
playerconnection.a(entityplayer.locX, entityplayer.locY, entityplayer.locZ, entityplayer.yaw, entityplayer.pitch); playerconnection.a(entityplayer.locX, entityplayer.locY, entityplayer.locZ, entityplayer.yaw, entityplayer.pitch);
this.b(entityplayer, worldserver); this.b(entityplayer, worldserver);
if (this.server.getResourcePack().length() > 0) { if (this.server.getResourcePack().length() > 0) {
@@ -126,9 +168,11 @@ @@ -126,6 +168,8 @@
} }
} }
@ -129,11 +121,7 @@
+ PlayerList.f.info(entityplayer.getName() + "[" + s1 + "] logged in with entity id " + entityplayer.getId() + " at ([" + entityplayer.world.worldData.getName() + "]" + entityplayer.locX + ", " + entityplayer.locY + ", " + entityplayer.locZ + ")"); + PlayerList.f.info(entityplayer.getName() + "[" + s1 + "] logged in with entity id " + entityplayer.getId() + " at ([" + entityplayer.world.worldData.getName() + "]" + entityplayer.locX + ", " + entityplayer.locY + ", " + entityplayer.locZ + ")");
} }
- protected void sendScoreboard(ScoreboardServer scoreboardserver, EntityPlayer entityplayer) { public void sendScoreboard(ScoreboardServer scoreboardserver, EntityPlayer entityplayer) {
+ public void sendScoreboard(ScoreboardServer scoreboardserver, EntityPlayer entityplayer) { // CraftBukkit - public
HashSet hashset = Sets.newHashSet();
Iterator iterator = scoreboardserver.getTeams().iterator();
@@ -158,6 +202,7 @@ @@ -158,6 +202,7 @@
} }

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/server/PropertyManager.java --- a/net/minecraft/server/PropertyManager.java
+++ b/net/minecraft/server/PropertyManager.java +++ b/net/minecraft/server/PropertyManager.java
@@ -8,10 +8,12 @@ @@ -8,6 +8,8 @@
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
@ -9,11 +9,6 @@
public class PropertyManager { public class PropertyManager {
private static final Logger a = LogManager.getLogger(); private static final Logger a = LogManager.getLogger();
- private final Properties properties = new Properties();
+ public final Properties properties = new Properties(); // CraftBukkit - public
private final File file;
public PropertyManager(File file) {
@@ -42,6 +44,24 @@ @@ -42,6 +44,24 @@
} }

View file

@ -1,11 +1,8 @@
--- a/net/minecraft/server/RecipesFurnace.java --- a/net/minecraft/server/RecipesFurnace.java
+++ b/net/minecraft/server/RecipesFurnace.java +++ b/net/minecraft/server/RecipesFurnace.java
@@ -8,14 +8,15 @@ @@ -10,12 +10,13 @@
public class RecipesFurnace {
private static final RecipesFurnace a = new RecipesFurnace(); private static final RecipesFurnace a = new RecipesFurnace();
- private Map<ItemStack, ItemStack> recipes = Maps.newHashMap(); public Map<ItemStack, ItemStack> recipes = Maps.newHashMap();
+ public Map<ItemStack, ItemStack> recipes = Maps.newHashMap(); // CraftBukkit - public
private Map<ItemStack, Float> c = Maps.newHashMap(); private Map<ItemStack, Float> c = Maps.newHashMap();
+ public Map customRecipes = Maps.newHashMap(); // CraftBukkit - add field + public Map customRecipes = Maps.newHashMap(); // CraftBukkit - add field
@ -14,7 +11,7 @@
} }
- private RecipesFurnace() { - private RecipesFurnace() {
+ public RecipesFurnace() { // CraftBukkit - public + public RecipesFurnace() { // PAIL: Public
this.registerRecipe(Blocks.IRON_ORE, new ItemStack(Items.IRON_INGOT), 0.7F); this.registerRecipe(Blocks.IRON_ORE, new ItemStack(Items.IRON_INGOT), 0.7F);
this.registerRecipe(Blocks.GOLD_ORE, new ItemStack(Items.GOLD_INGOT), 1.0F); this.registerRecipe(Blocks.GOLD_ORE, new ItemStack(Items.GOLD_INGOT), 1.0F);
this.registerRecipe(Blocks.DIAMOND_ORE, new ItemStack(Items.DIAMOND), 1.0F); this.registerRecipe(Blocks.DIAMOND_ORE, new ItemStack(Items.DIAMOND), 1.0F);

View file

@ -1,14 +1,5 @@
--- a/net/minecraft/server/Slot.java --- a/net/minecraft/server/Slot.java
+++ b/net/minecraft/server/Slot.java +++ b/net/minecraft/server/Slot.java
@@ -2,7 +2,7 @@
public class Slot {
- private final int index;
+ public final int index; // CraftBukkit - public
public final IInventory inventory;
public int rawSlotIndex;
public int f;
@@ -45,6 +45,9 @@ @@ -45,6 +45,9 @@
} }

View file

@ -1,13 +0,0 @@
--- a/net/minecraft/server/TileEntityBanner.java
+++ b/net/minecraft/server/TileEntityBanner.java
@@ -4,8 +4,8 @@
public class TileEntityBanner extends TileEntity {
- private int color;
- private NBTTagList patterns;
+ public int color; // CraftBukkit - public
+ public NBTTagList patterns; // CraftBukkit - public
private boolean g;
private List<TileEntityBanner.EnumBannerPatternType> h;
private List<EnumColor> i;

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/server/TileEntityBrewingStand.java --- a/net/minecraft/server/TileEntityBrewingStand.java
+++ b/net/minecraft/server/TileEntityBrewingStand.java +++ b/net/minecraft/server/TileEntityBrewingStand.java
@@ -3,18 +3,50 @@ @@ -3,6 +3,12 @@
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
@ -13,10 +13,7 @@
public class TileEntityBrewingStand extends TileEntityContainer implements IUpdatePlayerListBox, IWorldInventory { public class TileEntityBrewingStand extends TileEntityContainer implements IUpdatePlayerListBox, IWorldInventory {
private static final int[] a = new int[] { 3}; private static final int[] a = new int[] { 3};
private static final int[] f = new int[] { 0, 1, 2}; @@ -12,9 +18,35 @@
private ItemStack[] items = new ItemStack[4];
- private int brewTime;
+ public int brewTime; // CraftBukkit - public
private boolean[] i; private boolean[] i;
private Item j; private Item j;
private String k; private String k;

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/server/TileEntityFurnace.java --- a/net/minecraft/server/TileEntityFurnace.java
+++ b/net/minecraft/server/TileEntityFurnace.java +++ b/net/minecraft/server/TileEntityFurnace.java
@@ -1,17 +1,53 @@ @@ -1,5 +1,15 @@
package net.minecraft.server; package net.minecraft.server;
+// CraftBukkit start +// CraftBukkit start
@ -16,14 +16,7 @@
public class TileEntityFurnace extends TileEntityContainer implements IUpdatePlayerListBox, IWorldInventory { public class TileEntityFurnace extends TileEntityContainer implements IUpdatePlayerListBox, IWorldInventory {
private static final int[] a = new int[] { 0}; private static final int[] a = new int[] { 0};
private static final int[] f = new int[] { 2, 1}; @@ -12,6 +22,32 @@
private static final int[] g = new int[] { 1};
private ItemStack[] items = new ItemStack[3];
- private int burnTime;
+ public int burnTime; // CraftBukkit - public
private int ticksForCurrentFuel;
- private int cookTime;
+ public int cookTime; // CraftBukkit - public
private int cookTimeTotal; private int cookTimeTotal;
private String m; private String m;

View file

@ -1,14 +1,5 @@
--- a/net/minecraft/server/TileEntitySign.java --- a/net/minecraft/server/TileEntitySign.java
+++ b/net/minecraft/server/TileEntitySign.java +++ b/net/minecraft/server/TileEntitySign.java
@@ -6,7 +6,7 @@
public final IChatBaseComponent[] lines = new IChatBaseComponent[] { new ChatComponentText(""), new ChatComponentText(""), new ChatComponentText(""), new ChatComponentText("")};
public int f = -1;
- private boolean isEditable = true;
+ public boolean isEditable = true; // CraftBukkit - public
private EntityHuman h;
private final CommandObjectiveExecutor i = new CommandObjectiveExecutor();
@@ -21,6 +21,12 @@ @@ -21,6 +21,12 @@
nbttagcompound.setString("Text" + (i + 1), s); nbttagcompound.setString("Text" + (i + 1), s);
} }

View file

@ -21,13 +21,12 @@
private static final Logger a = LogManager.getLogger(); private static final Logger a = LogManager.getLogger();
private final MinecraftServer server; private final MinecraftServer server;
- private final EntityTracker tracker; public EntityTracker tracker;
+ public EntityTracker tracker; // CraftBukkit - public, remove final
private final PlayerChunkMap manager; private final PlayerChunkMap manager;
- private final Set<NextTickListEntry> L = Sets.newHashSet(); - private final Set<NextTickListEntry> L = Sets.newHashSet();
- private final TreeSet<NextTickListEntry> M = new TreeSet(); - private final TreeSet<NextTickListEntry> M = new TreeSet();
+ // private final Set<NextTickListEntry> L = Sets.newHashSet(); // CraftBukkit, PAIL: Rename nextTickListHash + // private final Set<NextTickListEntry> L = Sets.newHashSet(); // PAIL: Rename nextTickListHash
+ private final HashTreeSet<NextTickListEntry> M = new HashTreeSet<NextTickListEntry>(); // CraftBukkit - HashTreeSet, PAIL: Rename nextTickList + private final TreeSet<NextTickListEntry> M = new TreeSet(); // CraftBukkit - HashTreeSet // PAIL: Rename nextTickList
private final Map<UUID, Entity> entitiesByUUID = Maps.newHashMap(); private final Map<UUID, Entity> entitiesByUUID = Maps.newHashMap();
public ChunkProviderServer chunkProviderServer; public ChunkProviderServer chunkProviderServer;
public boolean savingDisabled; public boolean savingDisabled;