Commits

md_5 authored cf6dea390f8
TileEntitySkull goes back
No tags

CraftBukkit-Patches/0003-mc-dev-imports.patch

Modified
1 -From 2b87fb80d1c6feb442c3d029672c28d0c1fa4824 Mon Sep 17 00:00:00 2001
1 +From c2c4378d7d78148502d76b9ba476ff4db2499310 Mon Sep 17 00:00:00 2001
2 2 From: md_5 <md_5@live.com.au>
3 3 Date: Sun, 1 Dec 2013 15:10:48 +1100
4 4 Subject: [PATCH] mc-dev imports
5 5
6 6 Imported files which are only modified by Spigot, not upstream. Files here should be completely unmodified aside from trivial changes such as adding throws statements to ensure proper compilation. You may need to add unrelated files in order to ensure a compilable result in the face of synthetic methods.
7 7
8 8 diff --git a/src/main/java/net/minecraft/server/AttributeRanged.java b/src/main/java/net/minecraft/server/AttributeRanged.java
9 9 new file mode 100644
10 10 index 0000000..130597c
11 11 --- /dev/null
1494 1494 + }
1495 1495 + }
1496 1496 +
1497 1497 + entityplayer.playerConnection.sendPacket(new PacketPlayOutStatistic(hashmap));
1498 1498 + }
1499 1499 +
1500 1500 + public boolean e() {
1501 1501 + return this.g;
1502 1502 + }
1503 1503 +}
1504 +diff --git a/src/main/java/net/minecraft/server/TileEntitySkull.java b/src/main/java/net/minecraft/server/TileEntitySkull.java
1505 +new file mode 100644
1506 +index 0000000..4ae6796
1507 +--- /dev/null
1508 ++++ b/src/main/java/net/minecraft/server/TileEntitySkull.java
1509 +@@ -0,0 +1,152 @@
1510 ++package net.minecraft.server;
1511 ++
1512 ++import com.google.common.collect.Iterables;
1513 ++import com.mojang.authlib.GameProfile;
1514 ++import com.mojang.authlib.minecraft.MinecraftSessionService;
1515 ++import com.mojang.authlib.properties.Property;
1516 ++import java.util.UUID;
1517 ++import javax.annotation.Nullable;
1518 ++
1519 ++public class TileEntitySkull extends TileEntity implements ITickable {
1520 ++
1521 ++ private int a;
1522 ++ public int rotation;
1523 ++ private GameProfile g;
1524 ++ private int h;
1525 ++ private boolean i;
1526 ++ private static UserCache j;
1527 ++ private static MinecraftSessionService k;
1528 ++
1529 ++ public TileEntitySkull() {}
1530 ++
1531 ++ public static void a(UserCache usercache) {
1532 ++ TileEntitySkull.j = usercache;
1533 ++ }
1534 ++
1535 ++ public static void a(MinecraftSessionService minecraftsessionservice) {
1536 ++ TileEntitySkull.k = minecraftsessionservice;
1537 ++ }
1538 ++
1539 ++ public NBTTagCompound save(NBTTagCompound nbttagcompound) {
1540 ++ super.save(nbttagcompound);
1541 ++ nbttagcompound.setByte("SkullType", (byte) (this.a & 255));
1542 ++ nbttagcompound.setByte("Rot", (byte) (this.rotation & 255));
1543 ++ if (this.g != null) {
1544 ++ NBTTagCompound nbttagcompound1 = new NBTTagCompound();
1545 ++
1546 ++ GameProfileSerializer.serialize(nbttagcompound1, this.g);
1547 ++ nbttagcompound.set("Owner", nbttagcompound1);
1548 ++ }
1549 ++
1550 ++ return nbttagcompound;
1551 ++ }
1552 ++
1553 ++ public void a(NBTTagCompound nbttagcompound) {
1554 ++ super.a(nbttagcompound);
1555 ++ this.a = nbttagcompound.getByte("SkullType");
1556 ++ this.rotation = nbttagcompound.getByte("Rot");
1557 ++ if (this.a == 3) {
1558 ++ if (nbttagcompound.hasKeyOfType("Owner", 10)) {
1559 ++ this.g = GameProfileSerializer.deserialize(nbttagcompound.getCompound("Owner"));
1560 ++ } else if (nbttagcompound.hasKeyOfType("ExtraType", 8)) {
1561 ++ String s = nbttagcompound.getString("ExtraType");
1562 ++
1563 ++ if (!UtilColor.b(s)) {
1564 ++ this.g = new GameProfile((UUID) null, s);
1565 ++ this.h();
1566 ++ }
1567 ++ }
1568 ++ }
1569 ++
1570 ++ }
1571 ++
1572 ++ public void E_() {
1573 ++ if (this.a == 5) {
1574 ++ if (this.world.isBlockIndirectlyPowered(this.position)) {
1575 ++ this.i = true;
1576 ++ ++this.h;
1577 ++ } else {
1578 ++ this.i = false;
1579 ++ }
1580 ++ }
1581 ++
1582 ++ }
1583 ++
1584 ++ @Nullable
1585 ++ public GameProfile getGameProfile() {
1586 ++ return this.g;
1587 ++ }
1588 ++
1589 ++ @Nullable
1590 ++ public PacketPlayOutTileEntityData getUpdatePacket() {
1591 ++ return new PacketPlayOutTileEntityData(this.position, 4, this.c());
1592 ++ }
1593 ++
1594 ++ public NBTTagCompound c() {
1595 ++ return this.save(new NBTTagCompound());
1596 ++ }
1597 ++
1598 ++ public void setSkullType(int i) {
1599 ++ this.a = i;
1600 ++ this.g = null;
1601 ++ }
1602 ++
1603 ++ public void setGameProfile(@Nullable GameProfile gameprofile) {
1604 ++ this.a = 3;
1605 ++ this.g = gameprofile;
1606 ++ this.h();
1607 ++ }
1608 ++
1609 ++ private void h() {
1610 ++ this.g = b(this.g);
1611 ++ this.update();
1612 ++ }
1613 ++
1614 ++ public static GameProfile b(GameProfile gameprofile) {
1615 ++ if (gameprofile != null && !UtilColor.b(gameprofile.getName())) {
1616 ++ if (gameprofile.isComplete() && gameprofile.getProperties().containsKey("textures")) {
1617 ++ return gameprofile;
1618 ++ } else if (TileEntitySkull.j != null && TileEntitySkull.k != null) {
1619 ++ GameProfile gameprofile1 = TileEntitySkull.j.getProfile(gameprofile.getName());
1620 ++
1621 ++ if (gameprofile1 == null) {
1622 ++ return gameprofile;
1623 ++ } else {
1624 ++ Property property = (Property) Iterables.getFirst(gameprofile1.getProperties().get("textures"), (Object) null);
1625 ++
1626 ++ if (property == null) {
1627 ++ gameprofile1 = TileEntitySkull.k.fillProfileProperties(gameprofile1, true);
1628 ++ }
1629 ++
1630 ++ return gameprofile1;
1631 ++ }
1632 ++ } else {
1633 ++ return gameprofile;
1634 ++ }
1635 ++ } else {
1636 ++ return gameprofile;
1637 ++ }
1638 ++ }
1639 ++
1640 ++ public int getSkullType() {
1641 ++ return this.a;
1642 ++ }
1643 ++
1644 ++ public void setRotation(int i) {
1645 ++ this.rotation = i;
1646 ++ }
1647 ++
1648 ++ public void a(EnumBlockMirror enumblockmirror) {
1649 ++ if (this.world != null && this.world.getType(this.getPosition()).get(BlockSkull.FACING) == EnumDirection.UP) {
1650 ++ this.rotation = enumblockmirror.a(this.rotation, 16);
1651 ++ }
1652 ++
1653 ++ }
1654 ++
1655 ++ public void a(EnumBlockRotation enumblockrotation) {
1656 ++ if (this.world != null && this.world.getType(this.getPosition()).get(BlockSkull.FACING) == EnumDirection.UP) {
1657 ++ this.rotation = enumblockrotation.a(this.rotation, 16);
1658 ++ }
1659 ++
1660 ++ }
1661 ++}
1504 1662 diff --git a/src/main/java/net/minecraft/server/WorldGenLargeFeature.java b/src/main/java/net/minecraft/server/WorldGenLargeFeature.java
1505 1663 new file mode 100644
1506 1664 index 0000000..8ceac26
1507 1665 --- /dev/null
1508 1666 +++ b/src/main/java/net/minecraft/server/WorldGenLargeFeature.java
1509 1667 @@ -0,0 +1,139 @@
1510 1668 +package net.minecraft.server;
1511 1669 +
1512 1670 +import com.google.common.collect.Lists;
1513 1671 +import java.util.Arrays;

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut