mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
Update to Minecraft 1.3 beta
By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
parent
745746fc1c
commit
d1e9de156b
15 changed files with 220 additions and 218 deletions
|
@ -38,7 +38,7 @@
|
|||
<dependency>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>minecraft-server</artifactId>
|
||||
<version>1.2_01_02</version>
|
||||
<version>1.3</version>
|
||||
<type>jar</type>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
|
|
@ -9,10 +9,12 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import net.minecraft.server.ChunkCoordinates;
|
||||
import net.minecraft.server.EntityPlayer;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.PropertyManager;
|
||||
import net.minecraft.server.ServerConfigurationManager;
|
||||
import net.minecraft.server.ServerNBTManager;
|
||||
import net.minecraft.server.WorldManager;
|
||||
import net.minecraft.server.WorldServer;
|
||||
import org.bukkit.*;
|
||||
|
@ -177,14 +179,14 @@ public final class CraftServer implements Server {
|
|||
console.d = config;
|
||||
|
||||
boolean animals = config.a("spawn-monsters", console.m);
|
||||
boolean monsters = config.a("spawn-monsters", console.worlds.get(0).k > 0);
|
||||
boolean monsters = config.a("spawn-monsters", console.worlds.get(0).j > 0);
|
||||
|
||||
console.l = config.a("online-mode", console.l);
|
||||
console.m = config.a("spawn-animals", console.m);
|
||||
console.n = config.a("pvp", console.n);
|
||||
|
||||
for (WorldServer world : console.worlds) {
|
||||
world.k = monsters ? 1 : 0;
|
||||
world.j = monsters ? 1 : 0;
|
||||
world.a(monsters, animals);
|
||||
}
|
||||
|
||||
|
@ -210,10 +212,10 @@ public final class CraftServer implements Server {
|
|||
throw new IllegalArgumentException("File exists with the name '" + name + "' and isn't a folder");
|
||||
}
|
||||
|
||||
WorldServer internal = new WorldServer(console, new File("."), name, environment == World.Environment.NETHER ? -1 : 0);
|
||||
WorldServer internal = new WorldServer(console, new ServerNBTManager(new File("."), name, true), name, environment == World.Environment.NETHER ? -1 : 0);
|
||||
|
||||
internal.a(new WorldManager(console, internal));
|
||||
internal.k = 1;
|
||||
internal.j = 1;
|
||||
internal.a(true, true);
|
||||
console.f.a(internal);
|
||||
console.worlds.add(internal);
|
||||
|
@ -236,9 +238,10 @@ public final class CraftServer implements Server {
|
|||
i = l;
|
||||
}
|
||||
|
||||
internal.A.d(internal.spawnX + j >> 4, internal.spawnZ + k >> 4);
|
||||
ChunkCoordinates chunkcoordinates = internal.l();
|
||||
internal.u.d(chunkcoordinates.a + j >> 4, chunkcoordinates.c + k >> 4);
|
||||
|
||||
while (internal.d()) {
|
||||
while (internal.e()) {
|
||||
;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,9 +33,9 @@ public class CraftWorld implements World {
|
|||
public CraftWorld(WorldServer world) {
|
||||
this.world = world;
|
||||
this.server = world.getServer();
|
||||
this.provider = world.A;
|
||||
this.provider = world.u;
|
||||
|
||||
if (world.q instanceof WorldProviderHell) {
|
||||
if (world.m instanceof WorldProviderHell) {
|
||||
environment = Environment.NETHER;
|
||||
} else {
|
||||
environment = Environment.NORMAL;
|
||||
|
@ -65,7 +65,8 @@ public class CraftWorld implements World {
|
|||
}
|
||||
|
||||
public Location getSpawnLocation() {
|
||||
return new Location(this, world.spawnX, world.e(world.spawnX, world.spawnZ), world.spawnZ);
|
||||
ChunkCoordinates spawn = world.l();
|
||||
return new Location(this, spawn.a, world.e(spawn.a, spawn.c), spawn.c);
|
||||
}
|
||||
|
||||
public Chunk getChunkAt(int x, int z) {
|
||||
|
@ -225,9 +226,9 @@ public class CraftWorld implements World {
|
|||
}
|
||||
|
||||
public org.bukkit.entity.Item dropItemNaturally(Location loc, ItemStack item) {
|
||||
double xs = world.l.nextFloat() * 0.7F + (1.0F - 0.7F) * 0.5D;
|
||||
double ys = world.l.nextFloat() * 0.7F + (1.0F - 0.7F) * 0.5D;
|
||||
double zs = world.l.nextFloat() * 0.7F + (1.0F - 0.7F) * 0.5D;
|
||||
double xs = world.k.nextFloat() * 0.7F + (1.0F - 0.7F) * 0.5D;
|
||||
double ys = world.k.nextFloat() * 0.7F + (1.0F - 0.7F) * 0.5D;
|
||||
double zs = world.k.nextFloat() * 0.7F + (1.0F - 0.7F) * 0.5D;
|
||||
loc = loc.clone();
|
||||
loc.setX(loc.getX() + xs);
|
||||
loc.setY(loc.getY() + ys);
|
||||
|
@ -324,11 +325,11 @@ public class CraftWorld implements World {
|
|||
}
|
||||
|
||||
public String getName() {
|
||||
return world.w;
|
||||
return world.q.j;
|
||||
}
|
||||
|
||||
public long getId() {
|
||||
return world.u;
|
||||
return world.q.b();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -349,11 +350,11 @@ public class CraftWorld implements World {
|
|||
}
|
||||
|
||||
public long getFullTime() {
|
||||
return world.e;
|
||||
return world.k();
|
||||
}
|
||||
|
||||
public void setFullTime(long time) {
|
||||
world.e = time;
|
||||
world.a(time);
|
||||
}
|
||||
|
||||
public Environment getEnvironment() {
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package org.bukkit.craftbukkit.block;
|
||||
|
||||
import org.bukkit.block.BlockFace;
|
||||
|
@ -349,7 +348,7 @@ public class CraftBlock implements Block {
|
|||
}
|
||||
|
||||
public boolean isBlockFacePowered(BlockFace face) {
|
||||
return chunk.getHandle().d.j(x, y, z, blockFaceToNotch(face));
|
||||
return chunk.getHandle().d.i(x, y, z, blockFaceToNotch(face));
|
||||
}
|
||||
|
||||
public boolean isBlockFaceIndirectlyPowered(BlockFace face) {
|
||||
|
|
80
paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java
Normal file → Executable file
80
paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java
Normal file → Executable file
|
@ -1,40 +1,40 @@
|
|||
package org.bukkit.craftbukkit.block;
|
||||
|
||||
import net.minecraft.server.TileEntityChest;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.Chest;
|
||||
import org.bukkit.craftbukkit.CraftWorld;
|
||||
import org.bukkit.craftbukkit.inventory.CraftInventory;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
|
||||
/**
|
||||
* Represents a chest.
|
||||
*
|
||||
* @author sk89q
|
||||
*/
|
||||
public class CraftChest extends CraftBlockState implements Chest {
|
||||
private final CraftWorld world;
|
||||
private final TileEntityChest chest;
|
||||
|
||||
public CraftChest(final Block block) {
|
||||
super(block);
|
||||
|
||||
world = (CraftWorld)block.getWorld();
|
||||
chest = (TileEntityChest)world.getTileEntityAt(getX(), getY(), getZ());
|
||||
}
|
||||
|
||||
public Inventory getInventory() {
|
||||
return new CraftInventory(chest);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean update(boolean force) {
|
||||
boolean result = super.update(force);
|
||||
|
||||
if (result) {
|
||||
chest.d();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
package org.bukkit.craftbukkit.block;
|
||||
|
||||
import net.minecraft.server.TileEntityChest;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.Chest;
|
||||
import org.bukkit.craftbukkit.CraftWorld;
|
||||
import org.bukkit.craftbukkit.inventory.CraftInventory;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
|
||||
/**
|
||||
* Represents a chest.
|
||||
*
|
||||
* @author sk89q
|
||||
*/
|
||||
public class CraftChest extends CraftBlockState implements Chest {
|
||||
private final CraftWorld world;
|
||||
private final TileEntityChest chest;
|
||||
|
||||
public CraftChest(final Block block) {
|
||||
super(block);
|
||||
|
||||
world = (CraftWorld)block.getWorld();
|
||||
chest = (TileEntityChest)world.getTileEntityAt(getX(), getY(), getZ());
|
||||
}
|
||||
|
||||
public Inventory getInventory() {
|
||||
return new CraftInventory(chest);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean update(boolean force) {
|
||||
boolean result = super.update(force);
|
||||
|
||||
if (result) {
|
||||
chest.h();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,84 +1,84 @@
|
|||
package org.bukkit.craftbukkit.block;
|
||||
|
||||
import net.minecraft.server.TileEntityMobSpawner;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.CreatureSpawner;
|
||||
import org.bukkit.block.MobSpawner;
|
||||
import org.bukkit.craftbukkit.CraftWorld;
|
||||
import org.bukkit.entity.CreatureType;
|
||||
import org.bukkit.entity.MobType;
|
||||
|
||||
public class CraftCreatureSpawner extends CraftBlockState implements CreatureSpawner, MobSpawner {
|
||||
private final CraftWorld world;
|
||||
private final TileEntityMobSpawner spawner;
|
||||
|
||||
public CraftCreatureSpawner(final Block block) {
|
||||
super(block);
|
||||
|
||||
world = (CraftWorld)block.getWorld();
|
||||
spawner = (TileEntityMobSpawner)world.getTileEntityAt(getX(), getY(), getZ());
|
||||
}
|
||||
|
||||
public CreatureType getCreatureType() {
|
||||
return CreatureType.fromName(spawner.h);
|
||||
}
|
||||
|
||||
public void setCreatureType(CreatureType creatureType) {
|
||||
spawner.h = creatureType.getName();
|
||||
}
|
||||
|
||||
public String getCreatureTypeId() {
|
||||
return spawner.h;
|
||||
}
|
||||
|
||||
public void setCreatureTypeId(String creatureType) {
|
||||
// Verify input
|
||||
CreatureType type = CreatureType.fromName(creatureType);
|
||||
if (type == null) {
|
||||
return;
|
||||
}
|
||||
spawner.h = type.getName();
|
||||
}
|
||||
|
||||
public int getDelay() {
|
||||
return spawner.e;
|
||||
}
|
||||
|
||||
public void setDelay(int delay) {
|
||||
spawner.e = delay;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use getCreatureType() instead.
|
||||
*/
|
||||
public MobType getMobType() {
|
||||
return MobType.fromName(spawner.h);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use setCreatureType() instead.
|
||||
*/
|
||||
public void setMobType(MobType mobType) {
|
||||
spawner.h = mobType.getName();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use getCreatureTypeId() instead.
|
||||
*/
|
||||
public String getMobTypeId() {
|
||||
return spawner.h;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use setCreatureTypeId() instead.
|
||||
*/
|
||||
public void setMobTypeId(String mobType) {
|
||||
// Verify input
|
||||
MobType type = MobType.fromName(mobType);
|
||||
if (type == null) {
|
||||
return;
|
||||
}
|
||||
spawner.h = type.getName();
|
||||
}
|
||||
}
|
||||
package org.bukkit.craftbukkit.block;
|
||||
|
||||
import net.minecraft.server.TileEntityMobSpawner;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.CreatureSpawner;
|
||||
import org.bukkit.block.MobSpawner;
|
||||
import org.bukkit.craftbukkit.CraftWorld;
|
||||
import org.bukkit.entity.CreatureType;
|
||||
import org.bukkit.entity.MobType;
|
||||
|
||||
public class CraftCreatureSpawner extends CraftBlockState implements CreatureSpawner, MobSpawner {
|
||||
private final CraftWorld world;
|
||||
private final TileEntityMobSpawner spawner;
|
||||
|
||||
public CraftCreatureSpawner(final Block block) {
|
||||
super(block);
|
||||
|
||||
world = (CraftWorld)block.getWorld();
|
||||
spawner = (TileEntityMobSpawner)world.getTileEntityAt(getX(), getY(), getZ());
|
||||
}
|
||||
|
||||
public CreatureType getCreatureType() {
|
||||
return CreatureType.fromName(spawner.h);
|
||||
}
|
||||
|
||||
public void setCreatureType(CreatureType creatureType) {
|
||||
spawner.h = creatureType.getName();
|
||||
}
|
||||
|
||||
public String getCreatureTypeId() {
|
||||
return spawner.h;
|
||||
}
|
||||
|
||||
public void setCreatureTypeId(String creatureType) {
|
||||
// Verify input
|
||||
CreatureType type = CreatureType.fromName(creatureType);
|
||||
if (type == null) {
|
||||
return;
|
||||
}
|
||||
spawner.h = type.getName();
|
||||
}
|
||||
|
||||
public int getDelay() {
|
||||
return spawner.a;
|
||||
}
|
||||
|
||||
public void setDelay(int delay) {
|
||||
spawner.a = delay;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use getCreatureType() instead.
|
||||
*/
|
||||
public MobType getMobType() {
|
||||
return MobType.fromName(spawner.h);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use setCreatureType() instead.
|
||||
*/
|
||||
public void setMobType(MobType mobType) {
|
||||
spawner.h = mobType.getName();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use getCreatureTypeId() instead.
|
||||
*/
|
||||
public String getMobTypeId() {
|
||||
return spawner.h;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use setCreatureTypeId() instead.
|
||||
*/
|
||||
public void setMobTypeId(String mobType) {
|
||||
// Verify input
|
||||
MobType type = MobType.fromName(mobType);
|
||||
if (type == null) {
|
||||
return;
|
||||
}
|
||||
spawner.h = type.getName();
|
||||
}
|
||||
}
|
||||
|
|
2
paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftDispenser.java
Normal file → Executable file
2
paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftDispenser.java
Normal file → Executable file
|
@ -49,7 +49,7 @@ public class CraftDispenser extends CraftBlockState implements Dispenser {
|
|||
boolean result = super.update(force);
|
||||
|
||||
if (result) {
|
||||
dispenser.d();
|
||||
dispenser.h();
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
112
paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftFurnace.java
Normal file → Executable file
112
paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftFurnace.java
Normal file → Executable file
|
@ -1,56 +1,56 @@
|
|||
package org.bukkit.craftbukkit.block;
|
||||
|
||||
import net.minecraft.server.TileEntityFurnace;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.Furnace;
|
||||
import org.bukkit.craftbukkit.CraftWorld;
|
||||
import org.bukkit.craftbukkit.inventory.CraftInventory;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
|
||||
/**
|
||||
* Represents a furnace.
|
||||
*
|
||||
* @author sk89q
|
||||
*/
|
||||
public class CraftFurnace extends CraftBlockState implements Furnace {
|
||||
private final CraftWorld world;
|
||||
private final TileEntityFurnace furnace;
|
||||
|
||||
public CraftFurnace(final Block block) {
|
||||
super(block);
|
||||
|
||||
world = (CraftWorld)block.getWorld();
|
||||
furnace = (TileEntityFurnace)world.getTileEntityAt(getX(), getY(), getZ());
|
||||
}
|
||||
|
||||
public Inventory getInventory() {
|
||||
return new CraftInventory(furnace);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean update(boolean force) {
|
||||
boolean result = super.update(force);
|
||||
|
||||
if (result) {
|
||||
furnace.d();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public short getBurnTime() {
|
||||
return (short)furnace.e;
|
||||
}
|
||||
|
||||
public void setBurnTime(short burnTime) {
|
||||
furnace.e = burnTime;
|
||||
}
|
||||
|
||||
public short getCookTime() {
|
||||
return (short)furnace.g;
|
||||
}
|
||||
|
||||
public void setCookTime(short cookTime) {
|
||||
furnace.g = cookTime;
|
||||
}
|
||||
}
|
||||
package org.bukkit.craftbukkit.block;
|
||||
|
||||
import net.minecraft.server.TileEntityFurnace;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.Furnace;
|
||||
import org.bukkit.craftbukkit.CraftWorld;
|
||||
import org.bukkit.craftbukkit.inventory.CraftInventory;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
|
||||
/**
|
||||
* Represents a furnace.
|
||||
*
|
||||
* @author sk89q
|
||||
*/
|
||||
public class CraftFurnace extends CraftBlockState implements Furnace {
|
||||
private final CraftWorld world;
|
||||
private final TileEntityFurnace furnace;
|
||||
|
||||
public CraftFurnace(final Block block) {
|
||||
super(block);
|
||||
|
||||
world = (CraftWorld)block.getWorld();
|
||||
furnace = (TileEntityFurnace)world.getTileEntityAt(getX(), getY(), getZ());
|
||||
}
|
||||
|
||||
public Inventory getInventory() {
|
||||
return new CraftInventory(furnace);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean update(boolean force) {
|
||||
boolean result = super.update(force);
|
||||
|
||||
if (result) {
|
||||
furnace.h();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public short getBurnTime() {
|
||||
return (short)furnace.a;
|
||||
}
|
||||
|
||||
public void setBurnTime(short burnTime) {
|
||||
furnace.a = burnTime;
|
||||
}
|
||||
|
||||
public short getCookTime() {
|
||||
return (short)furnace.c;
|
||||
}
|
||||
|
||||
public void setCookTime(short cookTime) {
|
||||
furnace.c = cookTime;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,11 +23,11 @@ public class CraftNoteBlock extends CraftBlockState implements NoteBlock {
|
|||
}
|
||||
|
||||
public byte getNote() {
|
||||
return note.e;
|
||||
return note.a;
|
||||
}
|
||||
|
||||
public void setNote(byte n) {
|
||||
note.e = n;
|
||||
note.a = n;
|
||||
}
|
||||
|
||||
public boolean play() {
|
||||
|
|
9
paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
Normal file → Executable file
9
paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
Normal file → Executable file
|
@ -1,4 +1,3 @@
|
|||
|
||||
package org.bukkit.craftbukkit.block;
|
||||
|
||||
import net.minecraft.server.TileEntitySign;
|
||||
|
@ -18,15 +17,15 @@ public class CraftSign extends CraftBlockState implements Sign {
|
|||
}
|
||||
|
||||
public String[] getLines() {
|
||||
return sign.e;
|
||||
return sign.a;
|
||||
}
|
||||
|
||||
public String getLine(int index) throws IndexOutOfBoundsException {
|
||||
return sign.e[index];
|
||||
return sign.a[index];
|
||||
}
|
||||
|
||||
public void setLine(int index, String line) throws IndexOutOfBoundsException {
|
||||
sign.e[index] = line;
|
||||
sign.a[index] = line;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -34,7 +33,7 @@ public class CraftSign extends CraftBlockState implements Sign {
|
|||
boolean result = super.update(force);
|
||||
|
||||
if (result) {
|
||||
sign.d();
|
||||
sign.h();
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
|
@ -160,7 +160,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||
newEntity.inventory.e = newEntity;
|
||||
newEntity.activeContainer = entity.activeContainer;
|
||||
newEntity.defaultContainer = entity.defaultContainer;
|
||||
newWorld.A.d((int) location.getBlockX() >> 4, (int) location.getBlockZ() >> 4);
|
||||
newWorld.u.d((int) location.getBlockX() >> 4, (int) location.getBlockZ() >> 4);
|
||||
|
||||
newEntity.a.a(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
|
||||
newWorld.manager.a(newEntity);
|
||||
|
|
4
paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSheep.java
Normal file → Executable file
4
paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSheep.java
Normal file → Executable file
|
@ -19,12 +19,12 @@ public class CraftSheep extends CraftAnimals implements Sheep {
|
|||
|
||||
public DyeColor getColor() {
|
||||
EntitySheep entity = (EntitySheep) getHandle();
|
||||
return DyeColor.getByData((byte) entity.e_());
|
||||
return DyeColor.getByData((byte) entity.n());
|
||||
}
|
||||
|
||||
public void setColor(DyeColor color) {
|
||||
EntitySheep entity = (EntitySheep) getHandle();
|
||||
entity.a(color.getData());
|
||||
entity.a_(color.getData());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -19,15 +19,15 @@ public class CraftInventory implements org.bukkit.inventory.Inventory {
|
|||
}
|
||||
|
||||
public int getSize() {
|
||||
return getInventory().h_();
|
||||
return getInventory().m_();
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return getInventory().b();
|
||||
return getInventory().c();
|
||||
}
|
||||
|
||||
public CraftItemStack getItem(int index) {
|
||||
return new CraftItemStack(getInventory().a(index));
|
||||
return new CraftItemStack(getInventory().c_(index));
|
||||
}
|
||||
|
||||
public CraftItemStack[] getContents() {
|
||||
|
@ -290,7 +290,7 @@ public class CraftInventory implements org.bukkit.inventory.Inventory {
|
|||
}
|
||||
|
||||
private int getMaxItemStack() {
|
||||
return getInventory().c();
|
||||
return getInventory().n_();
|
||||
}
|
||||
|
||||
public void remove(int materialId) {
|
||||
|
|
2
paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java
Normal file → Executable file
2
paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java
Normal file → Executable file
|
@ -19,7 +19,7 @@ public class CraftInventoryPlayer extends CraftInventory implements PlayerInvent
|
|||
}
|
||||
|
||||
public CraftItemStack getItemInHand() {
|
||||
return new CraftItemStack( getInventory().e() );
|
||||
return new CraftItemStack( getInventory().b() );
|
||||
}
|
||||
|
||||
public void setItemInHand(ItemStack stack) {
|
||||
|
|
|
@ -12,14 +12,14 @@ public class CraftSlot implements org.bukkit.inventory.Slot {
|
|||
}
|
||||
|
||||
public Inventory getInventory() {
|
||||
return new CraftInventory( slot.b );
|
||||
return new CraftInventory( slot.e );
|
||||
}
|
||||
|
||||
public int getIndex() {
|
||||
return slot.a;
|
||||
return slot.d;
|
||||
}
|
||||
|
||||
public ItemStack getItem() {
|
||||
return new CraftItemStack( slot.c() );
|
||||
return new CraftItemStack( slot.b() );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue