mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 12:13:54 -07:00
Update to Minecraft 1.3 beta
By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
@@ -38,7 +38,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.bukkit</groupId>
|
<groupId>org.bukkit</groupId>
|
||||||
<artifactId>minecraft-server</artifactId>
|
<artifactId>minecraft-server</artifactId>
|
||||||
<version>1.2_01_02</version>
|
<version>1.3</version>
|
||||||
<type>jar</type>
|
<type>jar</type>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
@@ -9,10 +9,12 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
import net.minecraft.server.ChunkCoordinates;
|
||||||
import net.minecraft.server.EntityPlayer;
|
import net.minecraft.server.EntityPlayer;
|
||||||
import net.minecraft.server.MinecraftServer;
|
import net.minecraft.server.MinecraftServer;
|
||||||
import net.minecraft.server.PropertyManager;
|
import net.minecraft.server.PropertyManager;
|
||||||
import net.minecraft.server.ServerConfigurationManager;
|
import net.minecraft.server.ServerConfigurationManager;
|
||||||
|
import net.minecraft.server.ServerNBTManager;
|
||||||
import net.minecraft.server.WorldManager;
|
import net.minecraft.server.WorldManager;
|
||||||
import net.minecraft.server.WorldServer;
|
import net.minecraft.server.WorldServer;
|
||||||
import org.bukkit.*;
|
import org.bukkit.*;
|
||||||
@@ -177,14 +179,14 @@ public final class CraftServer implements Server {
|
|||||||
console.d = config;
|
console.d = config;
|
||||||
|
|
||||||
boolean animals = config.a("spawn-monsters", console.m);
|
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.l = config.a("online-mode", console.l);
|
||||||
console.m = config.a("spawn-animals", console.m);
|
console.m = config.a("spawn-animals", console.m);
|
||||||
console.n = config.a("pvp", console.n);
|
console.n = config.a("pvp", console.n);
|
||||||
|
|
||||||
for (WorldServer world : console.worlds) {
|
for (WorldServer world : console.worlds) {
|
||||||
world.k = monsters ? 1 : 0;
|
world.j = monsters ? 1 : 0;
|
||||||
world.a(monsters, animals);
|
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");
|
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.a(new WorldManager(console, internal));
|
||||||
internal.k = 1;
|
internal.j = 1;
|
||||||
internal.a(true, true);
|
internal.a(true, true);
|
||||||
console.f.a(internal);
|
console.f.a(internal);
|
||||||
console.worlds.add(internal);
|
console.worlds.add(internal);
|
||||||
@@ -236,9 +238,10 @@ public final class CraftServer implements Server {
|
|||||||
i = l;
|
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) {
|
public CraftWorld(WorldServer world) {
|
||||||
this.world = world;
|
this.world = world;
|
||||||
this.server = world.getServer();
|
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;
|
environment = Environment.NETHER;
|
||||||
} else {
|
} else {
|
||||||
environment = Environment.NORMAL;
|
environment = Environment.NORMAL;
|
||||||
@@ -65,7 +65,8 @@ public class CraftWorld implements World {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Location getSpawnLocation() {
|
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) {
|
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) {
|
public org.bukkit.entity.Item dropItemNaturally(Location loc, ItemStack item) {
|
||||||
double xs = 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.l.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.l.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 = loc.clone();
|
||||||
loc.setX(loc.getX() + xs);
|
loc.setX(loc.getX() + xs);
|
||||||
loc.setY(loc.getY() + ys);
|
loc.setY(loc.getY() + ys);
|
||||||
@@ -324,11 +325,11 @@ public class CraftWorld implements World {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return world.w;
|
return world.q.j;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getId() {
|
public long getId() {
|
||||||
return world.u;
|
return world.q.b();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -349,11 +350,11 @@ public class CraftWorld implements World {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public long getFullTime() {
|
public long getFullTime() {
|
||||||
return world.e;
|
return world.k();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFullTime(long time) {
|
public void setFullTime(long time) {
|
||||||
world.e = time;
|
world.a(time);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Environment getEnvironment() {
|
public Environment getEnvironment() {
|
||||||
|
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
package org.bukkit.craftbukkit.block;
|
package org.bukkit.craftbukkit.block;
|
||||||
|
|
||||||
import org.bukkit.block.BlockFace;
|
import org.bukkit.block.BlockFace;
|
||||||
@@ -349,7 +348,7 @@ public class CraftBlock implements Block {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isBlockFacePowered(BlockFace face) {
|
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) {
|
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;
|
package org.bukkit.craftbukkit.block;
|
||||||
|
|
||||||
import net.minecraft.server.TileEntityChest;
|
import net.minecraft.server.TileEntityChest;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.block.Chest;
|
import org.bukkit.block.Chest;
|
||||||
import org.bukkit.craftbukkit.CraftWorld;
|
import org.bukkit.craftbukkit.CraftWorld;
|
||||||
import org.bukkit.craftbukkit.inventory.CraftInventory;
|
import org.bukkit.craftbukkit.inventory.CraftInventory;
|
||||||
import org.bukkit.inventory.Inventory;
|
import org.bukkit.inventory.Inventory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a chest.
|
* Represents a chest.
|
||||||
*
|
*
|
||||||
* @author sk89q
|
* @author sk89q
|
||||||
*/
|
*/
|
||||||
public class CraftChest extends CraftBlockState implements Chest {
|
public class CraftChest extends CraftBlockState implements Chest {
|
||||||
private final CraftWorld world;
|
private final CraftWorld world;
|
||||||
private final TileEntityChest chest;
|
private final TileEntityChest chest;
|
||||||
|
|
||||||
public CraftChest(final Block block) {
|
public CraftChest(final Block block) {
|
||||||
super(block);
|
super(block);
|
||||||
|
|
||||||
world = (CraftWorld)block.getWorld();
|
world = (CraftWorld)block.getWorld();
|
||||||
chest = (TileEntityChest)world.getTileEntityAt(getX(), getY(), getZ());
|
chest = (TileEntityChest)world.getTileEntityAt(getX(), getY(), getZ());
|
||||||
}
|
}
|
||||||
|
|
||||||
public Inventory getInventory() {
|
public Inventory getInventory() {
|
||||||
return new CraftInventory(chest);
|
return new CraftInventory(chest);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean update(boolean force) {
|
public boolean update(boolean force) {
|
||||||
boolean result = super.update(force);
|
boolean result = super.update(force);
|
||||||
|
|
||||||
if (result) {
|
if (result) {
|
||||||
chest.d();
|
chest.h();
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,84 +1,84 @@
|
|||||||
package org.bukkit.craftbukkit.block;
|
package org.bukkit.craftbukkit.block;
|
||||||
|
|
||||||
import net.minecraft.server.TileEntityMobSpawner;
|
import net.minecraft.server.TileEntityMobSpawner;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.block.CreatureSpawner;
|
import org.bukkit.block.CreatureSpawner;
|
||||||
import org.bukkit.block.MobSpawner;
|
import org.bukkit.block.MobSpawner;
|
||||||
import org.bukkit.craftbukkit.CraftWorld;
|
import org.bukkit.craftbukkit.CraftWorld;
|
||||||
import org.bukkit.entity.CreatureType;
|
import org.bukkit.entity.CreatureType;
|
||||||
import org.bukkit.entity.MobType;
|
import org.bukkit.entity.MobType;
|
||||||
|
|
||||||
public class CraftCreatureSpawner extends CraftBlockState implements CreatureSpawner, MobSpawner {
|
public class CraftCreatureSpawner extends CraftBlockState implements CreatureSpawner, MobSpawner {
|
||||||
private final CraftWorld world;
|
private final CraftWorld world;
|
||||||
private final TileEntityMobSpawner spawner;
|
private final TileEntityMobSpawner spawner;
|
||||||
|
|
||||||
public CraftCreatureSpawner(final Block block) {
|
public CraftCreatureSpawner(final Block block) {
|
||||||
super(block);
|
super(block);
|
||||||
|
|
||||||
world = (CraftWorld)block.getWorld();
|
world = (CraftWorld)block.getWorld();
|
||||||
spawner = (TileEntityMobSpawner)world.getTileEntityAt(getX(), getY(), getZ());
|
spawner = (TileEntityMobSpawner)world.getTileEntityAt(getX(), getY(), getZ());
|
||||||
}
|
}
|
||||||
|
|
||||||
public CreatureType getCreatureType() {
|
public CreatureType getCreatureType() {
|
||||||
return CreatureType.fromName(spawner.h);
|
return CreatureType.fromName(spawner.h);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCreatureType(CreatureType creatureType) {
|
public void setCreatureType(CreatureType creatureType) {
|
||||||
spawner.h = creatureType.getName();
|
spawner.h = creatureType.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getCreatureTypeId() {
|
public String getCreatureTypeId() {
|
||||||
return spawner.h;
|
return spawner.h;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCreatureTypeId(String creatureType) {
|
public void setCreatureTypeId(String creatureType) {
|
||||||
// Verify input
|
// Verify input
|
||||||
CreatureType type = CreatureType.fromName(creatureType);
|
CreatureType type = CreatureType.fromName(creatureType);
|
||||||
if (type == null) {
|
if (type == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
spawner.h = type.getName();
|
spawner.h = type.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getDelay() {
|
public int getDelay() {
|
||||||
return spawner.e;
|
return spawner.a;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDelay(int delay) {
|
public void setDelay(int delay) {
|
||||||
spawner.e = delay;
|
spawner.a = delay;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated Use getCreatureType() instead.
|
* @deprecated Use getCreatureType() instead.
|
||||||
*/
|
*/
|
||||||
public MobType getMobType() {
|
public MobType getMobType() {
|
||||||
return MobType.fromName(spawner.h);
|
return MobType.fromName(spawner.h);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated Use setCreatureType() instead.
|
* @deprecated Use setCreatureType() instead.
|
||||||
*/
|
*/
|
||||||
public void setMobType(MobType mobType) {
|
public void setMobType(MobType mobType) {
|
||||||
spawner.h = mobType.getName();
|
spawner.h = mobType.getName();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated Use getCreatureTypeId() instead.
|
* @deprecated Use getCreatureTypeId() instead.
|
||||||
*/
|
*/
|
||||||
public String getMobTypeId() {
|
public String getMobTypeId() {
|
||||||
return spawner.h;
|
return spawner.h;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated Use setCreatureTypeId() instead.
|
* @deprecated Use setCreatureTypeId() instead.
|
||||||
*/
|
*/
|
||||||
public void setMobTypeId(String mobType) {
|
public void setMobTypeId(String mobType) {
|
||||||
// Verify input
|
// Verify input
|
||||||
MobType type = MobType.fromName(mobType);
|
MobType type = MobType.fromName(mobType);
|
||||||
if (type == null) {
|
if (type == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
spawner.h = type.getName();
|
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);
|
boolean result = super.update(force);
|
||||||
|
|
||||||
if (result) {
|
if (result) {
|
||||||
dispenser.d();
|
dispenser.h();
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
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;
|
package org.bukkit.craftbukkit.block;
|
||||||
|
|
||||||
import net.minecraft.server.TileEntityFurnace;
|
import net.minecraft.server.TileEntityFurnace;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.block.Furnace;
|
import org.bukkit.block.Furnace;
|
||||||
import org.bukkit.craftbukkit.CraftWorld;
|
import org.bukkit.craftbukkit.CraftWorld;
|
||||||
import org.bukkit.craftbukkit.inventory.CraftInventory;
|
import org.bukkit.craftbukkit.inventory.CraftInventory;
|
||||||
import org.bukkit.inventory.Inventory;
|
import org.bukkit.inventory.Inventory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a furnace.
|
* Represents a furnace.
|
||||||
*
|
*
|
||||||
* @author sk89q
|
* @author sk89q
|
||||||
*/
|
*/
|
||||||
public class CraftFurnace extends CraftBlockState implements Furnace {
|
public class CraftFurnace extends CraftBlockState implements Furnace {
|
||||||
private final CraftWorld world;
|
private final CraftWorld world;
|
||||||
private final TileEntityFurnace furnace;
|
private final TileEntityFurnace furnace;
|
||||||
|
|
||||||
public CraftFurnace(final Block block) {
|
public CraftFurnace(final Block block) {
|
||||||
super(block);
|
super(block);
|
||||||
|
|
||||||
world = (CraftWorld)block.getWorld();
|
world = (CraftWorld)block.getWorld();
|
||||||
furnace = (TileEntityFurnace)world.getTileEntityAt(getX(), getY(), getZ());
|
furnace = (TileEntityFurnace)world.getTileEntityAt(getX(), getY(), getZ());
|
||||||
}
|
}
|
||||||
|
|
||||||
public Inventory getInventory() {
|
public Inventory getInventory() {
|
||||||
return new CraftInventory(furnace);
|
return new CraftInventory(furnace);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean update(boolean force) {
|
public boolean update(boolean force) {
|
||||||
boolean result = super.update(force);
|
boolean result = super.update(force);
|
||||||
|
|
||||||
if (result) {
|
if (result) {
|
||||||
furnace.d();
|
furnace.h();
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public short getBurnTime() {
|
public short getBurnTime() {
|
||||||
return (short)furnace.e;
|
return (short)furnace.a;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setBurnTime(short burnTime) {
|
public void setBurnTime(short burnTime) {
|
||||||
furnace.e = burnTime;
|
furnace.a = burnTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public short getCookTime() {
|
public short getCookTime() {
|
||||||
return (short)furnace.g;
|
return (short)furnace.c;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCookTime(short cookTime) {
|
public void setCookTime(short cookTime) {
|
||||||
furnace.g = cookTime;
|
furnace.c = cookTime;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -23,11 +23,11 @@ public class CraftNoteBlock extends CraftBlockState implements NoteBlock {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public byte getNote() {
|
public byte getNote() {
|
||||||
return note.e;
|
return note.a;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setNote(byte n) {
|
public void setNote(byte n) {
|
||||||
note.e = n;
|
note.a = n;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean play() {
|
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;
|
package org.bukkit.craftbukkit.block;
|
||||||
|
|
||||||
import net.minecraft.server.TileEntitySign;
|
import net.minecraft.server.TileEntitySign;
|
||||||
@@ -18,15 +17,15 @@ public class CraftSign extends CraftBlockState implements Sign {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String[] getLines() {
|
public String[] getLines() {
|
||||||
return sign.e;
|
return sign.a;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getLine(int index) throws IndexOutOfBoundsException {
|
public String getLine(int index) throws IndexOutOfBoundsException {
|
||||||
return sign.e[index];
|
return sign.a[index];
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLine(int index, String line) throws IndexOutOfBoundsException {
|
public void setLine(int index, String line) throws IndexOutOfBoundsException {
|
||||||
sign.e[index] = line;
|
sign.a[index] = line;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -34,7 +33,7 @@ public class CraftSign extends CraftBlockState implements Sign {
|
|||||||
boolean result = super.update(force);
|
boolean result = super.update(force);
|
||||||
|
|
||||||
if (result) {
|
if (result) {
|
||||||
sign.d();
|
sign.h();
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@@ -160,7 +160,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||||||
newEntity.inventory.e = newEntity;
|
newEntity.inventory.e = newEntity;
|
||||||
newEntity.activeContainer = entity.activeContainer;
|
newEntity.activeContainer = entity.activeContainer;
|
||||||
newEntity.defaultContainer = entity.defaultContainer;
|
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());
|
newEntity.a.a(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
|
||||||
newWorld.manager.a(newEntity);
|
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() {
|
public DyeColor getColor() {
|
||||||
EntitySheep entity = (EntitySheep) getHandle();
|
EntitySheep entity = (EntitySheep) getHandle();
|
||||||
return DyeColor.getByData((byte) entity.e_());
|
return DyeColor.getByData((byte) entity.n());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setColor(DyeColor color) {
|
public void setColor(DyeColor color) {
|
||||||
EntitySheep entity = (EntitySheep) getHandle();
|
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() {
|
public int getSize() {
|
||||||
return getInventory().h_();
|
return getInventory().m_();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return getInventory().b();
|
return getInventory().c();
|
||||||
}
|
}
|
||||||
|
|
||||||
public CraftItemStack getItem(int index) {
|
public CraftItemStack getItem(int index) {
|
||||||
return new CraftItemStack(getInventory().a(index));
|
return new CraftItemStack(getInventory().c_(index));
|
||||||
}
|
}
|
||||||
|
|
||||||
public CraftItemStack[] getContents() {
|
public CraftItemStack[] getContents() {
|
||||||
@@ -290,7 +290,7 @@ public class CraftInventory implements org.bukkit.inventory.Inventory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private int getMaxItemStack() {
|
private int getMaxItemStack() {
|
||||||
return getInventory().c();
|
return getInventory().n_();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void remove(int materialId) {
|
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() {
|
public CraftItemStack getItemInHand() {
|
||||||
return new CraftItemStack( getInventory().e() );
|
return new CraftItemStack( getInventory().b() );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setItemInHand(ItemStack stack) {
|
public void setItemInHand(ItemStack stack) {
|
||||||
|
@@ -12,14 +12,14 @@ public class CraftSlot implements org.bukkit.inventory.Slot {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Inventory getInventory() {
|
public Inventory getInventory() {
|
||||||
return new CraftInventory( slot.b );
|
return new CraftInventory( slot.e );
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getIndex() {
|
public int getIndex() {
|
||||||
return slot.a;
|
return slot.d;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemStack getItem() {
|
public ItemStack getItem() {
|
||||||
return new CraftItemStack( slot.c() );
|
return new CraftItemStack( slot.b() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user