From 0c24068ad6ff719017323fe53c5f6189647e0eb2 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 9 Mar 2021 08:47:33 +1100 Subject: [PATCH] Organise imports --- nms-patches/BehaviorAttackTargetForget.patch | 9 +-- nms-patches/BehaviorAttackTargetSet.patch | 9 +-- nms-patches/BehaviorCareer.patch | 11 ++-- nms-patches/BehaviorProfession.patch | 9 +-- nms-patches/BlockComposter.patch | 20 +++--- nms-patches/BlockPortal.patch | 9 +-- nms-patches/BlockPumpkinCarved.patch | 9 ++- nms-patches/BlockSponge.patch | 13 ++-- nms-patches/BlockSweetBerryBush.patch | 13 ++-- nms-patches/BlockTrapdoor.patch | 9 +-- nms-patches/BlockTurtleEgg.patch | 10 +-- nms-patches/ChestLock.patch | 9 +-- .../CommandBlockListenerAbstract.patch | 14 +--- nms-patches/CommandListenerWrapper.patch | 25 +++---- nms-patches/CommandTeleport.patch | 11 ++-- nms-patches/CommandTime.patch | 13 ++-- nms-patches/ContainerEnchantTable.patch | 21 +++--- nms-patches/ContainerGrindstone.patch | 12 ++-- nms-patches/ContainerStonecutter.patch | 13 ++-- nms-patches/ContainerWorkbench.patch | 20 +++--- nms-patches/DedicatedServerProperties.patch | 13 ++-- nms-patches/DedicatedServerSettings.patch | 6 +- nms-patches/DispenseBehaviorShears.patch | 13 ++-- nms-patches/DispenserRegistry.patch | 19 +----- nms-patches/DragonControllerManager.patch | 11 ++-- nms-patches/EnchantmentFrostWalker.patch | 13 +--- nms-patches/EntityAnimal.patch | 16 ++--- nms-patches/EntityAreaEffectCloud.patch | 15 +++-- nms-patches/EntityBat.patch | 13 ++-- nms-patches/EntityCreeper.patch | 15 +++-- nms-patches/EntityEnderDragon.patch | 7 +- nms-patches/EntityEnderPearl.patch | 11 ++-- nms-patches/EntityExperienceOrb.patch | 15 +++-- nms-patches/EntityFireworks.patch | 17 ++--- nms-patches/EntityFishingHook.patch | 23 +++---- nms-patches/EntityHorseAbstract.patch | 23 +++---- nms-patches/EntityItem.patch | 23 +++---- nms-patches/EntityMinecartContainer.patch | 9 +-- nms-patches/EntityMushroomCow.patch | 13 ++-- nms-patches/EntityPotion.patch | 47 ++++++------- nms-patches/EntityShulker.patch | 13 ++-- nms-patches/EntitySlime.patch | 13 ++-- nms-patches/EntitySnowman.patch | 13 ++-- nms-patches/EntityTNTPrimed.patch | 12 ++-- nms-patches/EntityVex.patch | 14 +--- nms-patches/EntityVillager.patch | 30 ++++----- nms-patches/EntityVillagerAbstract.patch | 8 +-- nms-patches/EntityVillagerTrader.patch | 11 ++-- nms-patches/EntityZombie.patch | 21 +++--- nms-patches/EntityZombieVillager.patch | 8 +-- nms-patches/FluidTypeFlowing.patch | 13 ++-- nms-patches/FurnaceRecipe.patch | 7 +- nms-patches/IChatBaseComponent.patch | 12 ++-- nms-patches/IDispenseBehavior.patch | 8 +-- nms-patches/IInventory.patch | 11 ++-- nms-patches/InventoryCraftResult.patch | 8 +-- nms-patches/InventoryCrafting.patch | 9 +-- nms-patches/InventoryEnderChest.patch | 4 +- nms-patches/InventoryMerchant.patch | 9 +-- nms-patches/ItemBlock.patch | 19 +++--- nms-patches/ItemBucket.patch | 15 +++-- nms-patches/LootTable.patch | 9 +-- nms-patches/MinecraftServer.patch | 66 +++++++++---------- nms-patches/PathfinderGoalFollowOwner.patch | 9 +-- nms-patches/PathfinderGoalRemoveBlock.patch | 9 +-- nms-patches/PathfinderGoalTarget.patch | 11 ++-- nms-patches/PathfinderGoalTempt.patch | 11 ++-- nms-patches/PlayerChunkMap.patch | 31 ++++----- nms-patches/PlayerInteractManager.patch | 31 ++++----- nms-patches/PlayerList.patch | 58 ++++++++-------- nms-patches/RecipeBookServer.patch | 11 ++-- nms-patches/RecipeSmithing.patch | 9 +-- nms-patches/ShapedRecipes.patch | 12 ++-- nms-patches/ShapelessRecipes.patch | 9 +-- nms-patches/TileEntity.patch | 12 ++-- nms-patches/TileEntityBarrel.patch | 10 +-- nms-patches/TileEntityBeacon.patch | 10 ++- nms-patches/TileEntityCampfire.patch | 9 +-- nms-patches/TileEntityChest.patch | 19 +++--- nms-patches/TileEntityConduit.patch | 15 +++-- nms-patches/TileEntityDispenser.patch | 6 +- nms-patches/TileEntityEndGateway.patch | 13 ++-- nms-patches/TileEntityFurnace.patch | 21 +++--- nms-patches/TileEntityLectern.patch | 9 ++- nms-patches/TileEntityShulkerBox.patch | 13 ++-- nms-patches/TileEntitySign.patch | 15 ++--- nms-patches/WorldDataServer.patch | 22 +++---- nms-patches/WorldGenTreeProvider.patch | 11 ++-- .../org/bukkit/craftbukkit/CraftRaid.java | 1 + .../org/bukkit/craftbukkit/CraftWorld.java | 1 + .../craftbukkit/block/data/CraftBisected.java | 6 +- .../block/data/CraftFaceAttachable.java | 6 +- .../craftbukkit/block/data/CraftRail.java | 10 +-- .../block/data/type/CraftBamboo.java | 6 +- .../craftbukkit/block/data/type/CraftBed.java | 6 +- .../block/data/type/CraftBell.java | 6 +- .../block/data/type/CraftChest.java | 6 +- .../block/data/type/CraftComparator.java | 6 +- .../block/data/type/CraftDoor.java | 6 +- .../block/data/type/CraftJigsaw.java | 6 +- .../block/data/type/CraftRedstoneWire.java | 12 ++-- .../block/data/type/CraftSlab.java | 6 +- .../block/data/type/CraftStairs.java | 6 +- .../block/data/type/CraftStructureBlock.java | 6 +- .../block/data/type/CraftSwitch.java | 6 +- .../block/data/type/CraftTechnicalPiston.java | 6 +- .../block/data/type/CraftWall.java | 6 +- .../craftbukkit/block/impl/CraftBamboo.java | 6 +- .../craftbukkit/block/impl/CraftBed.java | 6 +- .../craftbukkit/block/impl/CraftBell.java | 6 +- .../craftbukkit/block/impl/CraftChest.java | 6 +- .../block/impl/CraftChestTrapped.java | 6 +- .../block/impl/CraftCobbleWall.java | 6 +- .../craftbukkit/block/impl/CraftDoor.java | 12 ++-- .../block/impl/CraftGrindstone.java | 6 +- .../craftbukkit/block/impl/CraftJigsaw.java | 6 +- .../craftbukkit/block/impl/CraftLever.java | 12 ++-- .../block/impl/CraftMinecartDetector.java | 10 +-- .../block/impl/CraftMinecartTrack.java | 10 +-- .../block/impl/CraftPistonExtension.java | 6 +- .../block/impl/CraftPistonMoving.java | 6 +- .../block/impl/CraftPoweredRail.java | 10 +-- .../block/impl/CraftRedstoneComparator.java | 6 +- .../block/impl/CraftRedstoneWire.java | 12 ++-- .../craftbukkit/block/impl/CraftStairs.java | 12 ++-- .../block/impl/CraftStepAbstract.java | 6 +- .../block/impl/CraftStoneButton.java | 12 ++-- .../block/impl/CraftStructure.java | 6 +- .../block/impl/CraftTallPlant.java | 6 +- .../block/impl/CraftTallPlantFlower.java | 6 +- .../block/impl/CraftTallSeaGrass.java | 6 +- .../craftbukkit/block/impl/CraftTrapdoor.java | 6 +- .../block/impl/CraftWoodButton.java | 12 ++-- .../craftbukkit/boss/CraftDragonBattle.java | 1 + .../command/ProxiedNativeCommandSender.java | 1 - .../craftbukkit/entity/CraftArmorStand.java | 1 + .../bukkit/craftbukkit/entity/CraftArrow.java | 1 + .../bukkit/craftbukkit/entity/CraftCat.java | 1 + .../craftbukkit/entity/CraftEnderDragon.java | 1 + .../craftbukkit/entity/CraftFishHook.java | 1 + .../bukkit/craftbukkit/entity/CraftFox.java | 1 + .../bukkit/craftbukkit/entity/CraftHorse.java | 3 + .../bukkit/craftbukkit/entity/CraftLlama.java | 1 + .../craftbukkit/entity/CraftMushroomCow.java | 1 + .../craftbukkit/entity/CraftOcelot.java | 1 + .../bukkit/craftbukkit/entity/CraftPanda.java | 1 + .../craftbukkit/entity/CraftParrot.java | 1 + .../craftbukkit/entity/CraftRabbit.java | 1 + .../craftbukkit/entity/CraftSkeleton.java | 1 + .../craftbukkit/entity/CraftSpellcaster.java | 1 + .../bukkit/craftbukkit/entity/CraftStray.java | 1 + .../craftbukkit/entity/CraftTropicalFish.java | 1 + .../craftbukkit/entity/CraftVillager.java | 2 + .../entity/CraftWitherSkeleton.java | 1 + .../inventory/CraftMetaArmorStand.java | 1 + .../inventory/CraftMetaBanner.java | 2 + .../inventory/CraftMetaBlockState.java | 2 + .../craftbukkit/inventory/CraftMetaBook.java | 2 + .../inventory/CraftMetaCharge.java | 1 + .../inventory/CraftMetaCompass.java | 2 + .../inventory/CraftMetaCrossbow.java | 2 + .../inventory/CraftMetaEnchantedBook.java | 1 + .../inventory/CraftMetaEntityTag.java | 1 + .../inventory/CraftMetaFirework.java | 1 + .../inventory/CraftMetaKnowledgeBook.java | 1 + .../inventory/CraftMetaLeatherArmor.java | 1 + .../craftbukkit/inventory/CraftMetaMap.java | 1 + .../inventory/CraftMetaPotion.java | 1 + .../craftbukkit/inventory/CraftMetaSkull.java | 1 + .../inventory/CraftMetaSpawnEgg.java | 2 + .../inventory/CraftMetaSuspiciousStew.java | 2 + .../CraftMetaTropicalFishBucket.java | 1 + .../bukkit/craftbukkit/map/CraftMapView.java | 1 + .../craftbukkit/scheduler/CraftTask.java | 1 - .../craftbukkit/scoreboard/CraftTeam.java | 2 + .../org/bukkit/craftbukkit/util/Waitable.java | 1 - .../inventory/CompositeSerialization.java | 1 - .../inventory/ItemStackBookTest.java | 3 + .../ItemStackEnchantStorageTest.java | 3 + .../ItemStackFireworkChargeTest.java | 3 + .../inventory/ItemStackFireworkTest.java | 3 + .../inventory/ItemStackLeatherTest.java | 3 + .../ItemStackLoreEnchantmentTest.java | 3 + .../inventory/ItemStackMapTest.java | 3 + .../inventory/ItemStackPotionsTest.java | 3 + .../inventory/ItemStackSkullTest.java | 3 + .../util/CraftChatMessageTest.java | 3 +- src/test/java/org/bukkit/map/MapTest.java | 1 - 188 files changed, 879 insertions(+), 825 deletions(-) diff --git a/nms-patches/BehaviorAttackTargetForget.patch b/nms-patches/BehaviorAttackTargetForget.patch index 19b3cca27..31f7edc9f 100644 --- a/nms-patches/BehaviorAttackTargetForget.patch +++ b/nms-patches/BehaviorAttackTargetForget.patch @@ -1,18 +1,19 @@ --- a/net/minecraft/server/BehaviorAttackTargetForget.java +++ b/net/minecraft/server/BehaviorAttackTargetForget.java -@@ -3,6 +3,11 @@ - import com.google.common.collect.ImmutableMap; +@@ -4,6 +4,12 @@ import java.util.Optional; import java.util.function.Predicate; + +// CraftBukkit start +import org.bukkit.craftbukkit.entity.CraftLivingEntity; +import org.bukkit.craftbukkit.event.CraftEventFactory; +import org.bukkit.event.entity.EntityTargetEvent; +// CraftBukkit end - ++ public class BehaviorAttackTargetForget extends Behavior { -@@ -54,6 +59,17 @@ + private final Predicate b; +@@ -54,6 +60,17 @@ } private void d(E e0) { diff --git a/nms-patches/BehaviorAttackTargetSet.patch b/nms-patches/BehaviorAttackTargetSet.patch index c2476ef32..8950ac6f0 100644 --- a/nms-patches/BehaviorAttackTargetSet.patch +++ b/nms-patches/BehaviorAttackTargetSet.patch @@ -1,18 +1,19 @@ --- a/net/minecraft/server/BehaviorAttackTargetSet.java +++ b/net/minecraft/server/BehaviorAttackTargetSet.java -@@ -4,6 +4,11 @@ - import java.util.Optional; +@@ -5,6 +5,12 @@ import java.util.function.Function; import java.util.function.Predicate; + +// CraftBukkit start +import org.bukkit.craftbukkit.entity.CraftLivingEntity; +import org.bukkit.craftbukkit.event.CraftEventFactory; +import org.bukkit.event.entity.EntityTargetEvent; +// CraftBukkit end - ++ public class BehaviorAttackTargetSet extends Behavior { -@@ -33,13 +38,21 @@ + private final Predicate b; +@@ -33,13 +39,21 @@ } protected void a(WorldServer worldserver, E e0, long i) { diff --git a/nms-patches/BehaviorCareer.patch b/nms-patches/BehaviorCareer.patch index 4f1e37fd1..88f8bc27a 100644 --- a/nms-patches/BehaviorCareer.patch +++ b/nms-patches/BehaviorCareer.patch @@ -1,18 +1,19 @@ --- a/net/minecraft/server/BehaviorCareer.java +++ b/net/minecraft/server/BehaviorCareer.java -@@ -2,6 +2,11 @@ - +@@ -3,6 +3,12 @@ import com.google.common.collect.ImmutableMap; import java.util.Optional; + +// CraftBukkit start +import org.bukkit.craftbukkit.entity.CraftVillager; +import org.bukkit.craftbukkit.event.CraftEventFactory; +import org.bukkit.event.entity.VillagerCareerChangeEvent; +// CraftBukkit end - ++ public class BehaviorCareer extends Behavior { -@@ -19,7 +24,7 @@ + public BehaviorCareer() { +@@ -19,7 +25,7 @@ GlobalPos globalpos = (GlobalPos) entityvillager.getBehaviorController().getMemory(MemoryModuleType.POTENTIAL_JOB_SITE).get(); entityvillager.getBehaviorController().removeMemory(MemoryModuleType.POTENTIAL_JOB_SITE); @@ -21,7 +22,7 @@ worldserver.broadcastEntityEffect(entityvillager, (byte) 14); if (entityvillager.getVillagerData().getProfession() == VillagerProfession.NONE) { MinecraftServer minecraftserver = worldserver.getMinecraftServer(); -@@ -31,7 +36,14 @@ +@@ -31,7 +37,14 @@ return villagerprofession.b() == villageplacetype; }).findFirst(); }).ifPresent((villagerprofession) -> { diff --git a/nms-patches/BehaviorProfession.patch b/nms-patches/BehaviorProfession.patch index facca964f..f183f8356 100644 --- a/nms-patches/BehaviorProfession.patch +++ b/nms-patches/BehaviorProfession.patch @@ -1,18 +1,19 @@ --- a/net/minecraft/server/BehaviorProfession.java +++ b/net/minecraft/server/BehaviorProfession.java -@@ -1,6 +1,11 @@ - package net.minecraft.server; +@@ -2,6 +2,12 @@ import com.google.common.collect.ImmutableMap; + +// CraftBukkit start +import org.bukkit.craftbukkit.entity.CraftVillager; +import org.bukkit.craftbukkit.event.CraftEventFactory; +import org.bukkit.event.entity.VillagerCareerChangeEvent; +// CraftBukkit end - ++ public class BehaviorProfession extends Behavior { -@@ -15,7 +20,14 @@ + public BehaviorProfession() { +@@ -15,7 +21,14 @@ } protected void a(WorldServer worldserver, EntityVillager entityvillager, long i) { diff --git a/nms-patches/BlockComposter.patch b/nms-patches/BlockComposter.patch index 3121dd5a1..be3e31a1e 100644 --- a/nms-patches/BlockComposter.patch +++ b/nms-patches/BlockComposter.patch @@ -1,14 +1,14 @@ --- a/net/minecraft/server/BlockComposter.java +++ b/net/minecraft/server/BlockComposter.java -@@ -4,13 +4,17 @@ - import it.unimi.dsi.fastutil.objects.Object2FloatOpenHashMap; +@@ -5,12 +5,17 @@ import java.util.Random; import javax.annotation.Nullable; + +// CraftBukkit start +import org.bukkit.craftbukkit.inventory.CraftBlockInventoryHolder; +import org.bukkit.craftbukkit.util.DummyGeneratorAccess; +// CraftBukkit end - ++ public class BlockComposter extends Block implements IInventoryHolder { public static final BlockStateInteger a = BlockProperties.as; @@ -19,7 +19,7 @@ for (int i = 0; i < 8; ++i) { avoxelshape[i] = VoxelShapes.a(BlockComposter.c, Block.a(2.0D, (double) Math.max(2, 1 + i * 2), 2.0D, 14.0D, 16.0D, 14.0D), OperatorBoolean.ONLY_FIRST); } -@@ -156,18 +160,25 @@ +@@ -156,18 +161,25 @@ return EnumInteractionResult.a(world.isClientSide); } else if (i == 8) { @@ -48,7 +48,7 @@ itemstack.subtract(1); return iblockdata1; -@@ -176,7 +187,15 @@ +@@ -176,7 +188,15 @@ } } @@ -65,7 +65,7 @@ if (!world.isClientSide) { float f = 0.7F; double d0 = (double) (world.random.nextFloat() * 0.7F) + 0.15000000596046448D; -@@ -202,10 +221,16 @@ +@@ -202,10 +222,16 @@ } private static IBlockData b(IBlockData iblockdata, GeneratorAccess generatoraccess, BlockPosition blockposition, ItemStack itemstack) { @@ -83,7 +83,7 @@ return iblockdata; } else { int j = i + 1; -@@ -253,7 +278,8 @@ +@@ -253,7 +279,8 @@ public IWorldInventory a(IBlockData iblockdata, GeneratorAccess generatoraccess, BlockPosition blockposition) { int i = (Integer) iblockdata.get(BlockComposter.a); @@ -93,7 +93,7 @@ } static class ContainerInput extends InventorySubcontainer implements IWorldInventory { -@@ -265,6 +291,7 @@ +@@ -265,6 +292,7 @@ public ContainerInput(IBlockData iblockdata, GeneratorAccess generatoraccess, BlockPosition blockposition) { super(1); @@ -101,7 +101,7 @@ this.a = iblockdata; this.b = generatoraccess; this.c = blockposition; -@@ -317,6 +344,7 @@ +@@ -317,6 +345,7 @@ this.blockData = iblockdata; this.generatorAccess = generatoraccess; this.blockPosition = blockposition; @@ -109,7 +109,7 @@ } @Override -@@ -341,15 +369,23 @@ +@@ -341,15 +370,23 @@ @Override public void update() { diff --git a/nms-patches/BlockPortal.patch b/nms-patches/BlockPortal.patch index c4b1aa516..b625ad30b 100644 --- a/nms-patches/BlockPortal.patch +++ b/nms-patches/BlockPortal.patch @@ -1,20 +1,17 @@ --- a/net/minecraft/server/BlockPortal.java +++ b/net/minecraft/server/BlockPortal.java -@@ -2,6 +2,13 @@ +@@ -2,6 +2,10 @@ import java.util.Random; +// CraftBukkit start -+import org.bukkit.craftbukkit.block.CraftBlock; -+import org.bukkit.craftbukkit.block.CraftBlockState; +import org.bukkit.event.entity.EntityPortalEnterEvent; -+import org.bukkit.event.world.PortalCreateEvent; +// CraftBukkit end + public class BlockPortal extends Block { public static final BlockStateEnum AXIS = BlockProperties.E; -@@ -32,7 +39,8 @@ +@@ -32,7 +36,8 @@ } if (worldserver.getType(blockposition).a((IBlockAccess) worldserver, blockposition, EntityTypes.ZOMBIFIED_PIGLIN)) { @@ -24,7 +21,7 @@ if (entity != null) { entity.resetPortalCooldown(); -@@ -54,6 +62,10 @@ +@@ -54,6 +59,10 @@ @Override public void a(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) { if (!entity.isPassenger() && !entity.isVehicle() && entity.canPortal()) { diff --git a/nms-patches/BlockPumpkinCarved.patch b/nms-patches/BlockPumpkinCarved.patch index 4b523d17a..43e888daa 100644 --- a/nms-patches/BlockPumpkinCarved.patch +++ b/nms-patches/BlockPumpkinCarved.patch @@ -1,19 +1,18 @@ --- a/net/minecraft/server/BlockPumpkinCarved.java +++ b/net/minecraft/server/BlockPumpkinCarved.java -@@ -4,6 +4,12 @@ +@@ -4,6 +4,11 @@ import java.util.function.Predicate; import javax.annotation.Nullable; +// CraftBukkit start +import org.bukkit.craftbukkit.util.BlockStateListPopulator; -+import org.bukkit.event.block.BlockRedstoneEvent; +import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason; +// CraftBukkit end + public class BlockPumpkinCarved extends BlockFacingHorizontal implements ItemWearable { public static final BlockStateDirection a = BlockFacingHorizontal.FACING; -@@ -42,19 +48,28 @@ +@@ -42,19 +47,28 @@ EntityPlayer entityplayer; int j; @@ -45,7 +44,7 @@ iterator = world.a(EntityPlayer.class, entitysnowman.getBoundingBox().g(5.0D)).iterator(); while (iterator.hasNext()) { -@@ -74,8 +89,8 @@ +@@ -74,8 +88,8 @@ for (int k = 0; k < this.getIronGolemShape().b(); ++k) { ShapeDetectorBlock shapedetectorblock2 = shapedetector_shapedetectorcollection.a(i, k, 0); @@ -56,7 +55,7 @@ } } -@@ -84,7 +99,15 @@ +@@ -84,7 +98,15 @@ entityirongolem.setPlayerCreated(true); entityirongolem.setPositionRotation((double) blockposition2.getX() + 0.5D, (double) blockposition2.getY() + 0.05D, (double) blockposition2.getZ() + 0.5D, 0.0F, 0.0F); diff --git a/nms-patches/BlockSponge.patch b/nms-patches/BlockSponge.patch index c991e8a02..b39c53b2a 100644 --- a/nms-patches/BlockSponge.patch +++ b/nms-patches/BlockSponge.patch @@ -1,19 +1,20 @@ --- a/net/minecraft/server/BlockSponge.java +++ b/net/minecraft/server/BlockSponge.java -@@ -2,6 +2,12 @@ - +@@ -3,6 +3,13 @@ import com.google.common.collect.Lists; import java.util.Queue; + +// CraftBukkit start +import java.util.List; +import org.bukkit.craftbukkit.block.CraftBlockState; +import org.bukkit.craftbukkit.util.BlockStateListPopulator; +import org.bukkit.event.block.SpongeAbsorbEvent; +// CraftBukkit end - ++ public class BlockSponge extends Block { -@@ -35,6 +41,7 @@ + protected BlockSponge(BlockBase.Info blockbase_info) { +@@ -35,6 +42,7 @@ queue.add(new Tuple<>(blockposition, 0)); int i = 0; @@ -21,7 +22,7 @@ while (!queue.isEmpty()) { Tuple tuple = (Tuple) queue.poll(); -@@ -46,27 +53,31 @@ +@@ -46,27 +54,31 @@ for (int l = 0; l < k; ++l) { EnumDirection enumdirection = aenumdirection[l]; BlockPosition blockposition2 = blockposition1.shift(enumdirection); @@ -60,7 +61,7 @@ ++i; if (j < 6) { queue.add(new Tuple<>(blockposition2, j + 1)); -@@ -79,6 +90,39 @@ +@@ -79,6 +91,39 @@ break; } } diff --git a/nms-patches/BlockSweetBerryBush.patch b/nms-patches/BlockSweetBerryBush.patch index 5da8acc3a..b4a28febd 100644 --- a/nms-patches/BlockSweetBerryBush.patch +++ b/nms-patches/BlockSweetBerryBush.patch @@ -1,9 +1,9 @@ --- a/net/minecraft/server/BlockSweetBerryBush.java +++ b/net/minecraft/server/BlockSweetBerryBush.java -@@ -1,6 +1,13 @@ - package net.minecraft.server; +@@ -2,6 +2,14 @@ import java.util.Random; + +// CraftBukkit start +import java.util.Collections; +import org.bukkit.craftbukkit.block.CraftBlock; @@ -11,10 +11,11 @@ +import org.bukkit.craftbukkit.inventory.CraftItemStack; +import org.bukkit.event.player.PlayerHarvestBlockEvent; +// CraftBukkit end - ++ public class BlockSweetBerryBush extends BlockPlant implements IBlockFragilePlantElement { -@@ -28,7 +35,7 @@ + public static final BlockStateInteger a = BlockProperties.ag; +@@ -28,7 +36,7 @@ int i = (Integer) iblockdata.get(BlockSweetBerryBush.a); if (i < 3 && random.nextInt(5) == 0 && worldserver.getLightLevel(blockposition.up(), 0) >= 9) { @@ -23,7 +24,7 @@ } } -@@ -42,7 +49,9 @@ +@@ -42,7 +50,9 @@ double d1 = Math.abs(entity.locZ() - entity.F); if (d0 >= 0.003000000026077032D || d1 >= 0.003000000026077032D) { @@ -33,7 +34,7 @@ } } -@@ -59,7 +68,15 @@ +@@ -59,7 +69,15 @@ } else if (i > 1) { int j = 1 + world.random.nextInt(2); diff --git a/nms-patches/BlockTrapdoor.patch b/nms-patches/BlockTrapdoor.patch index 7955e533f..4a274e0e4 100644 --- a/nms-patches/BlockTrapdoor.patch +++ b/nms-patches/BlockTrapdoor.patch @@ -1,14 +1,15 @@ --- a/net/minecraft/server/BlockTrapdoor.java +++ b/net/minecraft/server/BlockTrapdoor.java -@@ -1,6 +1,7 @@ - package net.minecraft.server; +@@ -2,6 +2,8 @@ import javax.annotation.Nullable; -+import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit ++import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit ++ public class BlockTrapdoor extends BlockFacingHorizontal implements IBlockWaterlogged { -@@ -88,6 +89,19 @@ + public static final BlockStateBoolean OPEN = BlockProperties.u; +@@ -88,6 +90,19 @@ boolean flag1 = world.isBlockIndirectlyPowered(blockposition); if (flag1 != (Boolean) iblockdata.get(BlockTrapdoor.c)) { diff --git a/nms-patches/BlockTurtleEgg.patch b/nms-patches/BlockTurtleEgg.patch index cd2011c60..5c7a4610b 100644 --- a/nms-patches/BlockTurtleEgg.patch +++ b/nms-patches/BlockTurtleEgg.patch @@ -1,18 +1,18 @@ --- a/net/minecraft/server/BlockTurtleEgg.java +++ b/net/minecraft/server/BlockTurtleEgg.java -@@ -2,6 +2,12 @@ - +@@ -3,6 +3,12 @@ import java.util.Random; import javax.annotation.Nullable; -+import org.bukkit.craftbukkit.block.CraftBlock; -+ + +// CraftBukkit start +import org.bukkit.event.entity.EntityInteractEvent; ++import org.bukkit.craftbukkit.block.CraftBlock; +import org.bukkit.craftbukkit.event.CraftEventFactory; +// CraftBukkit end - ++ public class BlockTurtleEgg extends Block { + private static final VoxelShape c = Block.a(3.0D, 0.0D, 3.0D, 12.0D, 7.0D, 12.0D); @@ -36,6 +42,19 @@ IBlockData iblockdata = world.getType(blockposition); diff --git a/nms-patches/ChestLock.patch b/nms-patches/ChestLock.patch index d62f742ab..cbb12f07c 100644 --- a/nms-patches/ChestLock.patch +++ b/nms-patches/ChestLock.patch @@ -1,17 +1,18 @@ --- a/net/minecraft/server/ChestLock.java +++ b/net/minecraft/server/ChestLock.java -@@ -1,6 +1,10 @@ - package net.minecraft.server; +@@ -2,6 +2,11 @@ import javax.annotation.concurrent.Immutable; + +// CraftBukkit start +import org.bukkit.ChatColor; +import org.bukkit.craftbukkit.util.CraftChatMessage; +// CraftBukkit end - ++ @Immutable public class ChestLock { -@@ -13,7 +17,19 @@ + +@@ -13,7 +18,19 @@ } public boolean a(ItemStack itemstack) { diff --git a/nms-patches/CommandBlockListenerAbstract.patch b/nms-patches/CommandBlockListenerAbstract.patch index ff4b686b6..9c9947619 100644 --- a/nms-patches/CommandBlockListenerAbstract.patch +++ b/nms-patches/CommandBlockListenerAbstract.patch @@ -1,25 +1,17 @@ --- a/net/minecraft/server/CommandBlockListenerAbstract.java +++ b/net/minecraft/server/CommandBlockListenerAbstract.java -@@ -4,6 +4,7 @@ - import java.util.Date; - import java.util.UUID; - import javax.annotation.Nullable; -+import org.bukkit.command.CommandSender; - - public abstract class CommandBlockListenerAbstract implements ICommandListener { - -@@ -17,6 +18,10 @@ +@@ -17,6 +17,10 @@ private IChatBaseComponent lastOutput; private String command = ""; private IChatBaseComponent customName; + // CraftBukkit start + @Override -+ public abstract CommandSender getBukkitSender(CommandListenerWrapper wrapper); ++ public abstract org.bukkit.command.CommandSender getBukkitSender(CommandListenerWrapper wrapper); + // CraftBukkit end public CommandBlockListenerAbstract() { this.customName = CommandBlockListenerAbstract.c; -@@ -113,7 +118,7 @@ +@@ -113,7 +117,7 @@ }); diff --git a/nms-patches/CommandListenerWrapper.patch b/nms-patches/CommandListenerWrapper.patch index 3dd3ade5c..aae57b973 100644 --- a/nms-patches/CommandListenerWrapper.patch +++ b/nms-patches/CommandListenerWrapper.patch @@ -1,14 +1,15 @@ --- a/net/minecraft/server/CommandListenerWrapper.java +++ b/net/minecraft/server/CommandListenerWrapper.java -@@ -7,6 +7,7 @@ - import com.mojang.brigadier.exceptions.SimpleCommandExceptionType; - import com.mojang.brigadier.suggestion.Suggestions; - import com.mojang.brigadier.suggestion.SuggestionsBuilder; -+import com.mojang.brigadier.tree.CommandNode; - import java.util.Collection; - import java.util.Iterator; - import java.util.Set; -@@ -32,6 +33,7 @@ +@@ -15,6 +15,8 @@ + import java.util.stream.Stream; + import javax.annotation.Nullable; + ++import com.mojang.brigadier.tree.CommandNode; // CraftBukkit ++ + public class CommandListenerWrapper implements ICompletionProvider { + + public static final SimpleCommandExceptionType a = new SimpleCommandExceptionType(new ChatMessage("permissions.requires.player")); +@@ -32,6 +34,7 @@ private final ResultConsumer l; private final ArgumentAnchor.Anchor m; private final Vec2F n; @@ -16,7 +17,7 @@ public CommandListenerWrapper(ICommandListener icommandlistener, Vec3D vec3d, Vec2F vec2f, WorldServer worldserver, int i, String s, IChatBaseComponent ichatbasecomponent, MinecraftServer minecraftserver, @Nullable Entity entity) { this(icommandlistener, vec3d, vec2f, worldserver, i, s, ichatbasecomponent, minecraftserver, entity, false, (commandcontext, flag, j) -> { -@@ -128,9 +130,23 @@ +@@ -128,9 +131,23 @@ @Override public boolean hasPermission(int i) { @@ -40,7 +41,7 @@ public Vec3D getPosition() { return this.d; } -@@ -192,7 +208,7 @@ +@@ -192,7 +209,7 @@ while (iterator.hasNext()) { EntityPlayer entityplayer = (EntityPlayer) iterator.next(); @@ -49,7 +50,7 @@ entityplayer.sendMessage(ichatmutablecomponent, SystemUtils.b); } } -@@ -252,4 +268,10 @@ +@@ -252,4 +269,10 @@ public IRegistryCustom q() { return this.i.getCustomRegistry(); } diff --git a/nms-patches/CommandTeleport.patch b/nms-patches/CommandTeleport.patch index feeb8e0a4..d19b84e27 100644 --- a/nms-patches/CommandTeleport.patch +++ b/nms-patches/CommandTeleport.patch @@ -1,18 +1,19 @@ --- a/net/minecraft/server/CommandTeleport.java +++ b/net/minecraft/server/CommandTeleport.java -@@ -12,6 +12,11 @@ - import java.util.Iterator; +@@ -13,6 +13,12 @@ import java.util.Set; import javax.annotation.Nullable; + +// CraftBukkit start +import org.bukkit.Location; +import org.bukkit.craftbukkit.CraftWorld; +import org.bukkit.event.entity.EntityTeleportEvent; +// CraftBukkit end - ++ public class CommandTeleport { -@@ -128,9 +133,9 @@ + private static final SimpleCommandExceptionType a = new SimpleCommandExceptionType(new ChatMessage("commands.teleport.invalidPosition")); +@@ -128,9 +134,9 @@ } if (worldserver == entity.world) { @@ -24,7 +25,7 @@ } entity.setHeadRotation(f); -@@ -139,6 +144,21 @@ +@@ -139,6 +145,21 @@ float f3 = MathHelper.g(f1); f3 = MathHelper.a(f3, -90.0F, 90.0F); diff --git a/nms-patches/CommandTime.patch b/nms-patches/CommandTime.patch index bf79dcb13..70526898e 100644 --- a/nms-patches/CommandTime.patch +++ b/nms-patches/CommandTime.patch @@ -1,17 +1,18 @@ --- a/net/minecraft/server/CommandTime.java +++ b/net/minecraft/server/CommandTime.java -@@ -4,6 +4,10 @@ - import com.mojang.brigadier.arguments.IntegerArgumentType; +@@ -5,6 +5,11 @@ import com.mojang.brigadier.builder.LiteralArgumentBuilder; import java.util.Iterator; + +// CraftBukkit start +import org.bukkit.Bukkit; +import org.bukkit.event.world.TimeSkipEvent; -+// CrafBukkit end - ++// CraftBukkit end ++ public class CommandTime { -@@ -46,7 +50,13 @@ + public static void a(com.mojang.brigadier.CommandDispatcher com_mojang_brigadier_commanddispatcher) { +@@ -46,7 +51,13 @@ while (iterator.hasNext()) { WorldServer worldserver = (WorldServer) iterator.next(); @@ -26,7 +27,7 @@ } commandlistenerwrapper.sendMessage(new ChatMessage("commands.time.set", new Object[]{i}), true); -@@ -59,7 +69,13 @@ +@@ -59,7 +70,13 @@ while (iterator.hasNext()) { WorldServer worldserver = (WorldServer) iterator.next(); diff --git a/nms-patches/ContainerEnchantTable.patch b/nms-patches/ContainerEnchantTable.patch index c0c3bbb16..c5710cede 100644 --- a/nms-patches/ContainerEnchantTable.patch +++ b/nms-patches/ContainerEnchantTable.patch @@ -1,11 +1,10 @@ --- a/net/minecraft/server/ContainerEnchantTable.java +++ b/net/minecraft/server/ContainerEnchantTable.java -@@ -3,6 +3,21 @@ +@@ -3,6 +3,20 @@ import java.util.List; import java.util.Random; +// CraftBukkit start -+import java.util.Collections; +import java.util.Map; +import org.bukkit.Location; +import org.bukkit.NamespacedKey; @@ -22,7 +21,7 @@ public class ContainerEnchantTable extends Container { private final IInventory enchantSlots; -@@ -12,6 +27,10 @@ +@@ -12,6 +26,10 @@ public final int[] costs; public final int[] enchantments; public final int[] levels; @@ -33,7 +32,7 @@ public ContainerEnchantTable(int i, PlayerInventory playerinventory) { this(i, playerinventory, ContainerAccess.a); -@@ -25,6 +44,13 @@ +@@ -25,6 +43,13 @@ super.update(); ContainerEnchantTable.this.a((IInventory) this); } @@ -47,7 +46,7 @@ }; this.h = new Random(); this.i = ContainerProperty.a(); -@@ -72,6 +98,9 @@ +@@ -72,6 +97,9 @@ this.a(ContainerProperty.a(this.levels, 0)); this.a(ContainerProperty.a(this.levels, 1)); this.a(ContainerProperty.a(this.levels, 2)); @@ -57,7 +56,7 @@ } @Override -@@ -79,7 +108,7 @@ +@@ -79,7 +107,7 @@ if (iinventory == this.enchantSlots) { ItemStack itemstack = iinventory.getItem(0); @@ -66,7 +65,7 @@ this.containerAccess.a((world, blockposition) -> { int i = 0; -@@ -135,12 +164,47 @@ +@@ -135,12 +163,47 @@ if (list != null && !list.isEmpty()) { WeightedRandomEnchant weightedrandomenchant = (WeightedRandomEnchant) list.get(this.h.nextInt(list.size())); @@ -115,7 +114,7 @@ this.c(); }); } else { -@@ -167,9 +231,24 @@ +@@ -167,9 +230,24 @@ ItemStack itemstack2 = itemstack; List list = this.a(itemstack, i, this.costs[i]); @@ -142,7 +141,7 @@ if (flag) { itemstack2 = new ItemStack(Items.ENCHANTED_BOOK); -@@ -182,16 +261,29 @@ +@@ -182,16 +260,29 @@ this.enchantSlots.setItem(0, itemstack2); } @@ -178,7 +177,7 @@ if (!entityhuman.abilities.canInstantlyBuild) { itemstack1.subtract(j); if (itemstack1.isEmpty()) { -@@ -238,6 +330,7 @@ +@@ -238,6 +329,7 @@ @Override public boolean canUse(EntityHuman entityhuman) { @@ -186,7 +185,7 @@ return a(this.containerAccess, entityhuman, Blocks.ENCHANTING_TABLE); } -@@ -289,4 +382,17 @@ +@@ -289,4 +381,17 @@ return itemstack; } diff --git a/nms-patches/ContainerGrindstone.patch b/nms-patches/ContainerGrindstone.patch index 5bb9d0d46..69f9a45a5 100644 --- a/nms-patches/ContainerGrindstone.patch +++ b/nms-patches/ContainerGrindstone.patch @@ -1,16 +1,16 @@ --- a/net/minecraft/server/ContainerGrindstone.java +++ b/net/minecraft/server/ContainerGrindstone.java -@@ -4,9 +4,30 @@ - import java.util.Map; +@@ -5,8 +5,30 @@ import java.util.Map.Entry; import java.util.stream.Collectors; + +// CraftBukkit start +import org.bukkit.Location; +import org.bukkit.craftbukkit.inventory.CraftInventoryGrindstone; +import org.bukkit.craftbukkit.inventory.CraftInventoryView; +import org.bukkit.entity.Player; +// CraftBukkit end - ++ public class ContainerGrindstone extends Container { + // CraftBukkit start @@ -31,7 +31,7 @@ private final IInventory resultInventory; private final IInventory craftInventory; private final ContainerAccess containerAccess; -@@ -24,6 +45,13 @@ +@@ -24,6 +46,13 @@ super.update(); ContainerGrindstone.this.a((IInventory) this); } @@ -45,7 +45,7 @@ }; this.containerAccess = containeraccess; this.a(new Slot(this.craftInventory, 0, 49, 19) { -@@ -108,6 +136,7 @@ +@@ -108,6 +137,7 @@ this.a(new Slot(playerinventory, j, 8 + j * 18, 142)); } @@ -53,7 +53,7 @@ } @Override -@@ -235,6 +264,7 @@ +@@ -235,6 +265,7 @@ @Override public boolean canUse(EntityHuman entityhuman) { diff --git a/nms-patches/ContainerStonecutter.patch b/nms-patches/ContainerStonecutter.patch index ff24b9507..8897fd625 100644 --- a/nms-patches/ContainerStonecutter.patch +++ b/nms-patches/ContainerStonecutter.patch @@ -1,19 +1,20 @@ --- a/net/minecraft/server/ContainerStonecutter.java +++ b/net/minecraft/server/ContainerStonecutter.java -@@ -2,6 +2,12 @@ - +@@ -3,6 +3,13 @@ import com.google.common.collect.Lists; import java.util.List; + +// CraftBukkit start +import org.bukkit.Location; +import org.bukkit.craftbukkit.inventory.CraftInventoryStonecutter; +import org.bukkit.craftbukkit.inventory.CraftInventoryView; +import org.bukkit.entity.Player; +// CraftBukkit end - ++ public class ContainerStonecutter extends Container { -@@ -16,6 +22,21 @@ + private final ContainerAccess containerAccess; +@@ -16,6 +23,21 @@ private Runnable l; public final IInventory inventory; private final InventoryCraftResult resultInventory; @@ -35,7 +36,7 @@ public ContainerStonecutter(int i, PlayerInventory playerinventory) { this(i, playerinventory, ContainerAccess.a); -@@ -35,6 +56,13 @@ +@@ -35,6 +57,13 @@ ContainerStonecutter.this.a((IInventory) this); ContainerStonecutter.this.l.run(); } @@ -49,7 +50,7 @@ }; this.resultInventory = new InventoryCraftResult(); this.containerAccess = containeraccess; -@@ -82,10 +110,12 @@ +@@ -82,10 +111,12 @@ } this.a(this.containerProperty); diff --git a/nms-patches/ContainerWorkbench.patch b/nms-patches/ContainerWorkbench.patch index 3a6d2a54b..a338ab568 100644 --- a/nms-patches/ContainerWorkbench.patch +++ b/nms-patches/ContainerWorkbench.patch @@ -1,17 +1,17 @@ --- a/net/minecraft/server/ContainerWorkbench.java +++ b/net/minecraft/server/ContainerWorkbench.java -@@ -1,6 +1,10 @@ - package net.minecraft.server; +@@ -2,12 +2,21 @@ import java.util.Optional; + +// CraftBukkit start +import org.bukkit.craftbukkit.inventory.CraftInventoryCrafting; +import org.bukkit.craftbukkit.inventory.CraftInventoryView; +// CraftBukkit end - ++ public class ContainerWorkbench extends ContainerRecipeBook { -@@ -8,6 +12,10 @@ + private final InventoryCrafting craftInventory; private final InventoryCraftResult resultInventory; public final ContainerAccess containerAccess; private final EntityHuman f; @@ -22,7 +22,7 @@ public ContainerWorkbench(int i, PlayerInventory playerinventory) { this(i, playerinventory, ContainerAccess.a); -@@ -15,8 +23,12 @@ +@@ -15,8 +24,12 @@ public ContainerWorkbench(int i, PlayerInventory playerinventory, ContainerAccess containeraccess) { super(Containers.CRAFTING, i); @@ -36,7 +36,7 @@ this.containerAccess = containeraccess; this.f = playerinventory.player; this.a((Slot) (new SlotResult(playerinventory.player, this.craftInventory, this.resultInventory, 0, 124, 35))); -@@ -42,7 +54,7 @@ +@@ -42,7 +55,7 @@ } @@ -45,7 +45,7 @@ if (!world.isClientSide) { EntityPlayer entityplayer = (EntityPlayer) entityhuman; ItemStack itemstack = ItemStack.b; -@@ -55,6 +67,7 @@ +@@ -55,6 +68,7 @@ itemstack = recipecrafting.a(inventorycrafting); } } @@ -53,7 +53,7 @@ inventorycraftresult.setItem(0, itemstack); entityplayer.playerConnection.sendPacket(new PacketPlayOutSetSlot(i, 0, itemstack)); -@@ -64,7 +77,7 @@ +@@ -64,7 +78,7 @@ @Override public void a(IInventory iinventory) { this.containerAccess.a((world, blockposition) -> { @@ -62,7 +62,7 @@ }); } -@@ -94,6 +107,7 @@ +@@ -94,6 +108,7 @@ @Override public boolean canUse(EntityHuman entityhuman) { @@ -70,7 +70,7 @@ return a(this.containerAccess, entityhuman, Blocks.CRAFTING_TABLE); } -@@ -168,4 +182,17 @@ +@@ -168,4 +183,17 @@ public int h() { return this.craftInventory.f(); } diff --git a/nms-patches/DedicatedServerProperties.patch b/nms-patches/DedicatedServerProperties.patch index 8452a0d56..cf05169f0 100644 --- a/nms-patches/DedicatedServerProperties.patch +++ b/nms-patches/DedicatedServerProperties.patch @@ -1,18 +1,21 @@ --- a/net/minecraft/server/DedicatedServerProperties.java +++ b/net/minecraft/server/DedicatedServerProperties.java -@@ -2,9 +2,11 @@ - +@@ -3,8 +3,14 @@ import java.util.Properties; import java.util.concurrent.TimeUnit; -+import joptsimple.OptionSet; // CraftBukkit ++// CraftBukkit start ++import joptsimple.OptionSet; ++import net.minecraft.server.PropertyManager.EditableProperty; ++// CraftBukkit end ++ public class DedicatedServerProperties extends PropertyManager { + public final boolean debug = this.getBoolean("debug", false); // CraftBukkit public final boolean onlineMode = this.getBoolean("online-mode", true); public final boolean preventProxyConnections = this.getBoolean("prevent-proxy-connections", false); public final String serverIp = this.getString("server-ip", ""); -@@ -55,8 +57,10 @@ +@@ -55,8 +61,10 @@ public final PropertyManager.EditableProperty whiteList; public final GeneratorSettings generatorSettings; @@ -25,7 +28,7 @@ this.difficulty = (EnumDifficulty) this.a("difficulty", a(EnumDifficulty::getById, EnumDifficulty::a), EnumDifficulty::c, EnumDifficulty.EASY); this.gamemode = (EnumGamemode) this.a("gamemode", a(EnumGamemode::getById, EnumGamemode::a), EnumGamemode::b, EnumGamemode.SURVIVAL); this.levelName = this.getString("level-name", "world"); -@@ -107,12 +111,14 @@ +@@ -107,12 +115,14 @@ this.generatorSettings = GeneratorSettings.a(iregistrycustom, properties); } diff --git a/nms-patches/DedicatedServerSettings.patch b/nms-patches/DedicatedServerSettings.patch index ae3f30d0a..09600053c 100644 --- a/nms-patches/DedicatedServerSettings.patch +++ b/nms-patches/DedicatedServerSettings.patch @@ -1,14 +1,14 @@ --- a/net/minecraft/server/DedicatedServerSettings.java +++ b/net/minecraft/server/DedicatedServerSettings.java -@@ -1,15 +1,21 @@ - package net.minecraft.server; +@@ -2,14 +2,21 @@ import java.util.function.UnaryOperator; + +// CraftBukkit start +import java.io.File; +import joptsimple.OptionSet; +// CraftBukkit end - ++ public class DedicatedServerSettings { private final java.nio.file.Path path; diff --git a/nms-patches/DispenseBehaviorShears.patch b/nms-patches/DispenseBehaviorShears.patch index d3d5ac13e..4915ea060 100644 --- a/nms-patches/DispenseBehaviorShears.patch +++ b/nms-patches/DispenseBehaviorShears.patch @@ -1,18 +1,19 @@ --- a/net/minecraft/server/DispenseBehaviorShears.java +++ b/net/minecraft/server/DispenseBehaviorShears.java -@@ -2,6 +2,11 @@ - +@@ -3,6 +3,12 @@ import java.util.Iterator; import java.util.List; + +// CraftBukkit start +import org.bukkit.craftbukkit.event.CraftEventFactory; +import org.bukkit.craftbukkit.inventory.CraftItemStack; +import org.bukkit.event.block.BlockDispenseEvent; +// CraftBukkit end - ++ public class DispenseBehaviorShears extends DispenseBehaviorMaybe { -@@ -10,11 +15,34 @@ + public DispenseBehaviorShears() {} +@@ -10,11 +16,34 @@ @Override protected ItemStack a(ISourceBlock isourceblock, ItemStack itemstack) { WorldServer worldserver = isourceblock.getWorld(); @@ -48,7 +49,7 @@ if (this.a() && itemstack.isDamaged(1, worldserver.getRandom(), (EntityPlayer) null)) { itemstack.setCount(0); } -@@ -40,7 +68,7 @@ +@@ -40,7 +69,7 @@ return false; } @@ -57,7 +58,7 @@ List list = worldserver.a(EntityLiving.class, new AxisAlignedBB(blockposition), IEntitySelector.g); Iterator iterator = list.iterator(); -@@ -51,6 +79,11 @@ +@@ -51,6 +80,11 @@ IShearable ishearable = (IShearable) entityliving; if (ishearable.canShear()) { diff --git a/nms-patches/DispenserRegistry.patch b/nms-patches/DispenserRegistry.patch index 737d96bd1..3a9628978 100644 --- a/nms-patches/DispenserRegistry.patch +++ b/nms-patches/DispenserRegistry.patch @@ -1,23 +1,6 @@ --- a/net/minecraft/server/DispenserRegistry.java +++ b/net/minecraft/server/DispenserRegistry.java -@@ -7,6 +7,16 @@ - import org.apache.logging.log4j.LogManager; - import org.apache.logging.log4j.Logger; - -+// CraftBukkit start -+import java.util.List; -+import org.bukkit.Location; -+import org.bukkit.TreeType; -+import org.bukkit.craftbukkit.inventory.CraftItemStack; -+import org.bukkit.craftbukkit.util.DummyGeneratorAccess; -+import org.bukkit.event.block.BlockDispenseEvent; -+import org.bukkit.event.world.StructureGrowEvent; -+// CraftBukkit end -+ - public class DispenserRegistry { - - public static final PrintStream a = System.out; -@@ -31,6 +41,69 @@ +@@ -31,6 +31,69 @@ TagStatic.b(); d(); } diff --git a/nms-patches/DragonControllerManager.patch b/nms-patches/DragonControllerManager.patch index 45c6e6d33..3ea1dc2c0 100644 --- a/nms-patches/DragonControllerManager.patch +++ b/nms-patches/DragonControllerManager.patch @@ -1,17 +1,18 @@ --- a/net/minecraft/server/DragonControllerManager.java +++ b/net/minecraft/server/DragonControllerManager.java -@@ -2,6 +2,10 @@ - +@@ -3,6 +3,11 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; + +// CraftBukkit start +import org.bukkit.craftbukkit.entity.CraftEnderDragon; +import org.bukkit.event.entity.EnderDragonChangePhaseEvent; +// CraftBukkit end - ++ public class DragonControllerManager { -@@ -21,6 +25,19 @@ + private static final Logger LOGGER = LogManager.getLogger(); +@@ -21,6 +26,19 @@ this.currentDragonController.e(); } @@ -31,7 +32,7 @@ this.currentDragonController = this.b(dragoncontrollerphase); if (!this.enderDragon.world.isClientSide) { this.enderDragon.getDataWatcher().set(EntityEnderDragon.PHASE, dragoncontrollerphase.b()); -@@ -42,6 +59,6 @@ +@@ -42,6 +60,6 @@ this.dragonControllers[i] = dragoncontrollerphase.a(this.enderDragon); } diff --git a/nms-patches/EnchantmentFrostWalker.patch b/nms-patches/EnchantmentFrostWalker.patch index 2d7b9399f..635d3443c 100644 --- a/nms-patches/EnchantmentFrostWalker.patch +++ b/nms-patches/EnchantmentFrostWalker.patch @@ -1,17 +1,6 @@ --- a/net/minecraft/server/EnchantmentFrostWalker.java +++ b/net/minecraft/server/EnchantmentFrostWalker.java -@@ -1,6 +1,10 @@ - package net.minecraft.server; - - import java.util.Iterator; -+// CraftBukkit start -+import org.bukkit.craftbukkit.util.CraftMagicNumbers; -+import org.bukkit.event.block.EntityBlockFormEvent; -+// CraftBukkit end - - public class EnchantmentFrostWalker extends Enchantment { - -@@ -46,8 +50,11 @@ +@@ -46,8 +46,11 @@ IBlockData iblockdata2 = world.getType(blockposition1); if (iblockdata2.getMaterial() == Material.WATER && (Integer) iblockdata2.get(BlockFluids.LEVEL) == 0 && iblockdata.canPlace(world, blockposition1) && world.a(iblockdata, blockposition1, VoxelShapeCollision.a())) { diff --git a/nms-patches/EntityAnimal.patch b/nms-patches/EntityAnimal.patch index b7850fbaa..83652a239 100644 --- a/nms-patches/EntityAnimal.patch +++ b/nms-patches/EntityAnimal.patch @@ -1,14 +1,14 @@ --- a/net/minecraft/server/EntityAnimal.java +++ b/net/minecraft/server/EntityAnimal.java -@@ -3,11 +3,16 @@ - import java.util.Random; +@@ -4,10 +4,16 @@ import java.util.UUID; import javax.annotation.Nullable; + +// CraftBukkit start +import org.bukkit.craftbukkit.event.CraftEventFactory; +import org.bukkit.event.entity.EntityEnterLoveModeEvent; +// CraftBukkit end - ++ public abstract class EntityAnimal extends EntityAgeable { public int loveTicks; @@ -17,7 +17,7 @@ protected EntityAnimal(EntityTypes entitytypes, World world) { super(entitytypes, world); -@@ -44,6 +49,9 @@ +@@ -44,6 +50,9 @@ } @@ -27,7 +27,7 @@ @Override public boolean damageEntity(DamageSource damagesource, float f) { if (this.isInvulnerable(damagesource)) { -@@ -53,6 +61,7 @@ +@@ -53,6 +62,7 @@ return super.damageEntity(damagesource, f); } } @@ -35,7 +35,7 @@ @Override public float a(BlockPosition blockposition, IWorldReader iworldreader) { -@@ -143,10 +152,17 @@ +@@ -143,10 +153,17 @@ } public void g(@Nullable EntityHuman entityhuman) { @@ -54,7 +54,7 @@ this.world.broadcastEntityEffect(this, (byte) 18); } -@@ -186,11 +202,24 @@ +@@ -186,11 +203,24 @@ EntityAgeable entityageable = this.createChild(worldserver, entityanimal); if (entityageable != null) { @@ -79,7 +79,7 @@ if (entityplayer != null) { entityplayer.a(StatisticList.ANIMALS_BRED); -@@ -203,10 +232,14 @@ +@@ -203,10 +233,14 @@ entityanimal.resetLove(); entityageable.setBaby(true); entityageable.setPositionRotation(this.locX(), this.locY(), this.locZ(), 0.0F, 0.0F); diff --git a/nms-patches/EntityAreaEffectCloud.patch b/nms-patches/EntityAreaEffectCloud.patch index 6eb173d92..5f08c6c1b 100644 --- a/nms-patches/EntityAreaEffectCloud.patch +++ b/nms-patches/EntityAreaEffectCloud.patch @@ -1,17 +1,18 @@ --- a/net/minecraft/server/EntityAreaEffectCloud.java +++ b/net/minecraft/server/EntityAreaEffectCloud.java -@@ -13,6 +13,10 @@ - import javax.annotation.Nullable; +@@ -14,6 +14,11 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; + +// CraftBukkit start +import org.bukkit.craftbukkit.entity.CraftLivingEntity; +import org.bukkit.entity.LivingEntity; +// CraftBukkit end - ++ public class EntityAreaEffectCloud extends Entity { -@@ -105,6 +109,22 @@ + private static final Logger LOGGER = LogManager.getLogger(); +@@ -105,6 +110,22 @@ } @@ -34,7 +35,7 @@ public int getColor() { return (Integer) this.getDataWatcher().get(EntityAreaEffectCloud.COLOR); } -@@ -249,6 +269,7 @@ +@@ -249,6 +270,7 @@ if (!list1.isEmpty()) { Iterator iterator2 = list1.iterator(); @@ -42,7 +43,7 @@ while (iterator2.hasNext()) { EntityLiving entityliving = (EntityLiving) iterator2.next(); -@@ -258,6 +279,17 @@ +@@ -258,6 +280,17 @@ double d2 = d0 * d0 + d1 * d1; if (d2 <= (double) (f * f)) { @@ -60,7 +61,7 @@ this.affectedEntities.put(entityliving, this.ticksLived + this.reapplicationDelay); Iterator iterator3 = list.iterator(); -@@ -267,7 +299,7 @@ +@@ -267,7 +300,7 @@ if (mobeffect1.getMobEffect().isInstant()) { mobeffect1.getMobEffect().applyInstantEffect(this, this.getSource(), entityliving, mobeffect1.getAmplifier(), 0.5D); } else { diff --git a/nms-patches/EntityBat.patch b/nms-patches/EntityBat.patch index 7de514617..6983e56e8 100644 --- a/nms-patches/EntityBat.patch +++ b/nms-patches/EntityBat.patch @@ -1,14 +1,15 @@ --- a/net/minecraft/server/EntityBat.java +++ b/net/minecraft/server/EntityBat.java -@@ -4,6 +4,7 @@ - import java.time.temporal.ChronoField; +@@ -5,6 +5,8 @@ import java.util.Random; import javax.annotation.Nullable; -+import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit ++import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit ++ public class EntityBat extends EntityAmbient { -@@ -105,16 +106,24 @@ + private static final DataWatcherObject b = DataWatcher.a(EntityBat.class, DataWatcherRegistry.a); +@@ -105,16 +107,24 @@ } if (this.world.a(EntityBat.c, (EntityLiving) this) != null) { @@ -38,7 +39,7 @@ } } else { if (this.d != null && (!this.world.isEmpty(this.d) || this.d.getY() < 1)) { -@@ -138,7 +147,11 @@ +@@ -138,7 +148,11 @@ this.aT = 0.5F; this.yaw += f1; if (this.random.nextInt(100) == 0 && this.world.getType(blockposition1).isOccluding(this.world, blockposition1)) { @@ -51,7 +52,7 @@ } } -@@ -168,7 +181,11 @@ +@@ -168,7 +182,11 @@ return false; } else { if (!this.world.isClientSide && this.isAsleep()) { diff --git a/nms-patches/EntityCreeper.patch b/nms-patches/EntityCreeper.patch index cbcbb5d89..ed6fe58a7 100644 --- a/nms-patches/EntityCreeper.patch +++ b/nms-patches/EntityCreeper.patch @@ -1,18 +1,19 @@ --- a/net/minecraft/server/EntityCreeper.java +++ b/net/minecraft/server/EntityCreeper.java -@@ -2,6 +2,11 @@ - +@@ -3,6 +3,12 @@ import java.util.Collection; import java.util.Iterator; + +// CraftBukkit start +import org.bukkit.craftbukkit.event.CraftEventFactory; +import org.bukkit.event.entity.CreatureSpawnEvent; +import org.bukkit.event.entity.ExplosionPrimeEvent; +// CraftBukkit end - ++ public class EntityCreeper extends EntityMonster { -@@ -165,9 +170,19 @@ + private static final DataWatcherObject b = DataWatcher.a(EntityCreeper.class, DataWatcherRegistry.b); +@@ -165,9 +171,19 @@ @Override public void onLightningStrike(WorldServer worldserver, EntityLightning entitylightning) { super.onLightningStrike(worldserver, entitylightning); @@ -33,7 +34,7 @@ @Override protected EnumInteractionResult b(EntityHuman entityhuman, EnumHand enumhand) { ItemStack itemstack = entityhuman.b(enumhand); -@@ -192,10 +207,18 @@ +@@ -192,10 +208,18 @@ Explosion.Effect explosion_effect = this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING) ? Explosion.Effect.DESTROY : Explosion.Effect.NONE; float f = this.isPowered() ? 2.0F : 1.0F; @@ -56,7 +57,7 @@ } } -@@ -206,6 +229,7 @@ +@@ -206,6 +230,7 @@ if (!collection.isEmpty()) { EntityAreaEffectCloud entityareaeffectcloud = new EntityAreaEffectCloud(this.world, this.locX(), this.locY(), this.locZ()); @@ -64,7 +65,7 @@ entityareaeffectcloud.setRadius(2.5F); entityareaeffectcloud.setRadiusOnUse(-0.5F); entityareaeffectcloud.setWaitTime(10); -@@ -219,7 +243,7 @@ +@@ -219,7 +244,7 @@ entityareaeffectcloud.addEffect(new MobEffect(mobeffect)); } diff --git a/nms-patches/EntityEnderDragon.patch b/nms-patches/EntityEnderDragon.patch index 903655016..534f75c06 100644 --- a/nms-patches/EntityEnderDragon.patch +++ b/nms-patches/EntityEnderDragon.patch @@ -1,16 +1,15 @@ --- a/net/minecraft/server/EntityEnderDragon.java +++ b/net/minecraft/server/EntityEnderDragon.java -@@ -6,7 +6,13 @@ - import javax.annotation.Nullable; +@@ -7,6 +7,12 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; + +// CraftBukkit start +import org.bukkit.craftbukkit.block.CraftBlock; +import org.bukkit.event.entity.EntityExplodeEvent; +import org.bukkit.event.entity.EntityRegainHealthEvent; +// CraftBukkit end - -+// PAIL: Fixme ++ public class EntityEnderDragon extends EntityInsentient implements IMonster { private static final Logger LOGGER = LogManager.getLogger(); diff --git a/nms-patches/EntityEnderPearl.patch b/nms-patches/EntityEnderPearl.patch index 69309292d..36ff72776 100644 --- a/nms-patches/EntityEnderPearl.patch +++ b/nms-patches/EntityEnderPearl.patch @@ -1,19 +1,20 @@ --- a/net/minecraft/server/EntityEnderPearl.java +++ b/net/minecraft/server/EntityEnderPearl.java -@@ -1,6 +1,12 @@ - package net.minecraft.server; +@@ -2,6 +2,13 @@ import javax.annotation.Nullable; + +// CraftBukkit start +import org.bukkit.Bukkit; +import org.bukkit.craftbukkit.event.CraftEventFactory; +import org.bukkit.event.entity.CreatureSpawnEvent; +import org.bukkit.event.player.PlayerTeleportEvent; +// CraftBukkit end - ++ public class EntityEnderPearl extends EntityProjectileThrowable { -@@ -37,21 +43,35 @@ + public EntityEnderPearl(EntityTypes entitytypes, World world) { +@@ -37,21 +44,35 @@ EntityPlayer entityplayer = (EntityPlayer) entity; if (entityplayer.playerConnection.a().isConnected() && entityplayer.world == this.world && !entityplayer.isSleeping()) { @@ -60,7 +61,7 @@ } } else if (entity != null) { entity.enderTeleportTo(this.locX(), this.locY(), this.locZ()); -@@ -80,7 +100,7 @@ +@@ -80,7 +101,7 @@ public Entity b(WorldServer worldserver) { Entity entity = this.getShooter(); diff --git a/nms-patches/EntityExperienceOrb.patch b/nms-patches/EntityExperienceOrb.patch index da8f63ef5..d6d7153d5 100644 --- a/nms-patches/EntityExperienceOrb.patch +++ b/nms-patches/EntityExperienceOrb.patch @@ -1,18 +1,19 @@ --- a/net/minecraft/server/EntityExperienceOrb.java +++ b/net/minecraft/server/EntityExperienceOrb.java -@@ -1,6 +1,11 @@ - package net.minecraft.server; +@@ -2,6 +2,12 @@ import java.util.Map.Entry; + +// CraftBukkit start +import org.bukkit.craftbukkit.event.CraftEventFactory; +import org.bukkit.event.entity.EntityTargetLivingEntityEvent; +import org.bukkit.event.entity.EntityTargetEvent; +// CraftBukkit end - ++ public class EntityExperienceOrb extends Entity { -@@ -36,6 +41,7 @@ + public int b; +@@ -36,6 +42,7 @@ @Override public void tick() { super.tick(); @@ -20,7 +21,7 @@ if (this.d > 0) { --this.d; } -@@ -72,7 +78,22 @@ +@@ -72,7 +79,22 @@ this.targetPlayer = null; } @@ -44,7 +45,7 @@ Vec3D vec3d = new Vec3D(this.targetPlayer.locX() - this.locX(), this.targetPlayer.locY() + (double) this.targetPlayer.getHeadHeight() / 2.0D - this.locY(), this.targetPlayer.locZ() - this.locZ()); double d1 = vec3d.g(); -@@ -155,13 +176,19 @@ +@@ -155,13 +177,19 @@ if (!itemstack.isEmpty() && itemstack.f()) { int i = Math.min(this.c(this.value), itemstack.getDamage()); @@ -67,7 +68,7 @@ } this.die(); -@@ -183,6 +210,24 @@ +@@ -183,6 +211,24 @@ } public static int getOrbValue(int i) { diff --git a/nms-patches/EntityFireworks.patch b/nms-patches/EntityFireworks.patch index 36cb62f07..2a6c512df 100644 --- a/nms-patches/EntityFireworks.patch +++ b/nms-patches/EntityFireworks.patch @@ -1,14 +1,15 @@ --- a/net/minecraft/server/EntityFireworks.java +++ b/net/minecraft/server/EntityFireworks.java -@@ -4,6 +4,7 @@ - import java.util.List; +@@ -5,6 +5,8 @@ import java.util.OptionalInt; import javax.annotation.Nullable; -+import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit ++import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit ++ public class EntityFireworks extends IProjectile { -@@ -121,7 +122,11 @@ + public static final DataWatcherObject FIREWORK_ITEM = DataWatcher.a(EntityFireworks.class, DataWatcherRegistry.g); +@@ -121,7 +123,11 @@ } if (!this.world.isClientSide && this.ticksFlown > this.expectedLifespan) { @@ -21,7 +22,7 @@ } } -@@ -136,7 +141,11 @@ +@@ -136,7 +142,11 @@ protected void a(MovingObjectPositionEntity movingobjectpositionentity) { super.a(movingobjectpositionentity); if (!this.world.isClientSide) { @@ -34,7 +35,7 @@ } } -@@ -146,7 +155,11 @@ +@@ -146,7 +156,11 @@ this.world.getType(blockposition).a(this.world, blockposition, (Entity) this); if (!this.world.s_() && this.hasExplosions()) { @@ -47,7 +48,7 @@ } super.a(movingobjectpositionblock); -@@ -172,7 +185,9 @@ +@@ -172,7 +186,9 @@ if (f > 0.0F) { if (this.ridingEntity != null) { @@ -57,7 +58,7 @@ } double d0 = 5.0D; -@@ -199,7 +214,9 @@ +@@ -199,7 +215,9 @@ if (flag) { float f1 = f * (float) Math.sqrt((5.0D - (double) this.g((Entity) entityliving)) / 5.0D); diff --git a/nms-patches/EntityFishingHook.patch b/nms-patches/EntityFishingHook.patch index 8836fbe14..977e401d5 100644 --- a/nms-patches/EntityFishingHook.patch +++ b/nms-patches/EntityFishingHook.patch @@ -1,18 +1,19 @@ --- a/net/minecraft/server/EntityFishingHook.java +++ b/net/minecraft/server/EntityFishingHook.java -@@ -6,6 +6,11 @@ - import java.util.List; +@@ -7,6 +7,12 @@ import java.util.Random; import javax.annotation.Nullable; + +// CraftBukkit start +import org.bukkit.entity.Player; +import org.bukkit.entity.FishHook; +import org.bukkit.event.player.PlayerFishEvent; +// CraftBukkit end - ++ public class EntityFishingHook extends IProjectile { -@@ -25,6 +30,12 @@ + private final Random b; +@@ -25,6 +31,12 @@ private final int an; private final int lureLevel; @@ -25,7 +26,7 @@ private EntityFishingHook(World world, EntityHuman entityhuman, int i, int j) { super(EntityTypes.FISHING_BOBBER, world); this.b = new Random(); -@@ -253,6 +264,10 @@ +@@ -253,6 +265,10 @@ this.waitTime = 0; this.ai = 0; this.getDataWatcher().set(EntityFishingHook.f, false); @@ -36,7 +37,7 @@ } } else { float f; -@@ -286,6 +301,13 @@ +@@ -286,6 +302,13 @@ worldserver.a(Particles.FISHING, d0, d1, d2, 0, (double) (-f4), 0.01D, (double) f3, 1.0D); } } else { @@ -50,7 +51,7 @@ this.playSound(SoundEffects.ENTITY_FISHING_BOBBER_SPLASH, 0.25F, 1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.4F); double d3 = this.locY() + 0.5D; -@@ -322,8 +344,10 @@ +@@ -322,8 +345,10 @@ this.ai = MathHelper.nextInt(this.random, 20, 80); } } else { @@ -63,7 +64,7 @@ } } -@@ -390,6 +414,14 @@ +@@ -390,6 +415,14 @@ int i = 0; if (this.hooked != null) { @@ -78,7 +79,7 @@ this.reel(); CriterionTriggers.D.a((EntityPlayer) entityhuman, itemstack, this, (Collection) Collections.emptyList()); this.world.broadcastEntityEffect(this, (byte) 31); -@@ -405,6 +437,15 @@ +@@ -405,6 +438,15 @@ while (iterator.hasNext()) { ItemStack itemstack1 = (ItemStack) iterator.next(); EntityItem entityitem = new EntityItem(this.world, this.locX(), this.locY(), this.locZ(), itemstack1); @@ -94,7 +95,7 @@ double d0 = entityhuman.locX() - this.locX(); double d1 = entityhuman.locY() - this.locY(); double d2 = entityhuman.locZ() - this.locZ(); -@@ -412,7 +453,11 @@ +@@ -412,7 +454,11 @@ entityitem.setMot(d0 * 0.1D, d1 * 0.1D + Math.sqrt(Math.sqrt(d0 * d0 + d1 * d1 + d2 * d2)) * 0.08D, d2 * 0.1D); this.world.addEntity(entityitem); @@ -107,7 +108,7 @@ if (itemstack1.getItem().a((Tag) TagsItem.FISHES)) { entityhuman.a(StatisticList.FISH_CAUGHT, 1); } -@@ -422,8 +467,25 @@ +@@ -422,8 +468,25 @@ } if (this.onGround) { diff --git a/nms-patches/EntityHorseAbstract.patch b/nms-patches/EntityHorseAbstract.patch index 8d2d2ac7e..ab96211ec 100644 --- a/nms-patches/EntityHorseAbstract.patch +++ b/nms-patches/EntityHorseAbstract.patch @@ -1,14 +1,15 @@ --- a/net/minecraft/server/EntityHorseAbstract.java +++ b/net/minecraft/server/EntityHorseAbstract.java -@@ -6,6 +6,7 @@ - import java.util.UUID; +@@ -7,6 +7,8 @@ import java.util.function.Predicate; import javax.annotation.Nullable; -+import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason; // CraftBukkit ++import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason; // CraftBukkit ++ public abstract class EntityHorseAbstract extends EntityAnimal implements IInventoryListener, IJumpable, ISaddleable { -@@ -34,6 +35,7 @@ + private static final Predicate bw = (entityliving) -> { +@@ -34,6 +36,7 @@ private float bK; protected boolean bu = true; protected int bv; @@ -16,7 +17,7 @@ protected EntityHorseAbstract(EntityTypes entitytypes, World world) { super(entitytypes, world); -@@ -218,7 +220,7 @@ +@@ -218,7 +221,7 @@ public void loadChest() { InventorySubcontainer inventorysubcontainer = this.inventoryChest; @@ -25,7 +26,7 @@ if (inventorysubcontainer != null) { inventorysubcontainer.b((IInventoryListener) this); int i = Math.min(inventorysubcontainer.getSize(), this.inventoryChest.getSize()); -@@ -334,7 +336,7 @@ +@@ -334,7 +337,7 @@ } public int getMaxDomestication() { @@ -34,7 +35,7 @@ } @Override -@@ -405,7 +407,7 @@ +@@ -405,7 +408,7 @@ } if (this.getHealth() < this.getMaxHealth() && f > 0.0F) { @@ -43,7 +44,7 @@ flag = true; } -@@ -481,7 +483,7 @@ +@@ -481,7 +484,7 @@ super.movementTick(); if (!this.world.isClientSide && this.isAlive()) { if (this.random.nextInt(900) == 0 && this.deathTicks == 0) { @@ -52,7 +53,7 @@ } if (this.fl()) { -@@ -718,6 +720,7 @@ +@@ -718,6 +721,7 @@ if (this.getOwnerUUID() != null) { nbttagcompound.a("Owner", this.getOwnerUUID()); } @@ -60,7 +61,7 @@ if (!this.inventoryChest.getItem(0).isEmpty()) { nbttagcompound.set("SaddleItem", this.inventoryChest.getItem(0).save(new NBTTagCompound())); -@@ -745,6 +748,11 @@ +@@ -745,6 +749,11 @@ if (uuid != null) { this.setOwnerUUID(uuid); } @@ -72,7 +73,7 @@ if (nbttagcompound.hasKeyOfType("SaddleItem", 10)) { ItemStack itemstack = ItemStack.a(nbttagcompound.getCompound("SaddleItem")); -@@ -796,6 +804,18 @@ +@@ -796,6 +805,18 @@ @Override public void b(int i) { diff --git a/nms-patches/EntityItem.patch b/nms-patches/EntityItem.patch index 52029bd63..fb3057ad1 100644 --- a/nms-patches/EntityItem.patch +++ b/nms-patches/EntityItem.patch @@ -1,17 +1,18 @@ --- a/net/minecraft/server/EntityItem.java +++ b/net/minecraft/server/EntityItem.java -@@ -5,6 +5,10 @@ - import java.util.Objects; +@@ -6,6 +6,11 @@ import java.util.UUID; import javax.annotation.Nullable; + +// CraftBukkit start +import org.bukkit.event.entity.EntityPickupItemEvent; +import org.bukkit.event.player.PlayerPickupItemEvent; +// CraftBukkit end - ++ public class EntityItem extends Entity { -@@ -15,6 +19,7 @@ + private static final DataWatcherObject ITEM = DataWatcher.a(EntityItem.class, DataWatcherRegistry.g); +@@ -15,6 +20,7 @@ private UUID thrower; private UUID owner; public final float b; @@ -19,7 +20,7 @@ public EntityItem(EntityTypes entitytypes, World world) { super(entitytypes, world); -@@ -50,9 +55,12 @@ +@@ -50,9 +56,12 @@ this.die(); } else { super.tick(); @@ -35,7 +36,7 @@ this.lastX = this.locX(); this.lastY = this.locY(); -@@ -108,9 +116,11 @@ +@@ -108,9 +117,11 @@ } } @@ -47,7 +48,7 @@ this.impulse |= this.aK(); if (!this.world.isClientSide) { -@@ -122,6 +132,12 @@ +@@ -122,6 +133,12 @@ } if (!this.world.isClientSide && this.age >= 6000) { @@ -60,7 +61,7 @@ this.die(); } -@@ -197,10 +213,11 @@ +@@ -197,10 +214,11 @@ private static void a(EntityItem entityitem, ItemStack itemstack, ItemStack itemstack1) { ItemStack itemstack2 = a(itemstack, itemstack1, 64); @@ -73,7 +74,7 @@ a(entityitem, itemstack, itemstack1); entityitem.pickupDelay = Math.max(entityitem.pickupDelay, entityitem1.pickupDelay); entityitem.age = Math.min(entityitem.age, entityitem1.age); -@@ -224,6 +241,11 @@ +@@ -224,6 +242,11 @@ } else if (!this.getItemStack().getItem().a(damagesource)) { return false; } else { @@ -85,7 +86,7 @@ this.velocityChanged(); this.f = (int) ((float) this.f - f); if (this.f <= 0) { -@@ -285,6 +307,46 @@ +@@ -285,6 +308,46 @@ Item item = itemstack.getItem(); int i = itemstack.getCount(); @@ -132,7 +133,7 @@ if (this.pickupDelay == 0 && (this.owner == null || this.owner.equals(entityhuman.getUniqueID())) && entityhuman.inventory.pickup(itemstack)) { entityhuman.receive(this, i); if (itemstack.isEmpty()) { -@@ -328,7 +390,9 @@ +@@ -328,7 +391,9 @@ } public void setItemStack(ItemStack itemstack) { diff --git a/nms-patches/EntityMinecartContainer.patch b/nms-patches/EntityMinecartContainer.patch index b43e3bf6e..de105add0 100644 --- a/nms-patches/EntityMinecartContainer.patch +++ b/nms-patches/EntityMinecartContainer.patch @@ -1,9 +1,9 @@ --- a/net/minecraft/server/EntityMinecartContainer.java +++ b/net/minecraft/server/EntityMinecartContainer.java -@@ -2,6 +2,13 @@ - +@@ -3,6 +3,14 @@ import java.util.Iterator; import javax.annotation.Nullable; + +// CraftBukkit start +import java.util.List; +import org.bukkit.Location; @@ -11,10 +11,11 @@ +import org.bukkit.entity.HumanEntity; +import org.bukkit.inventory.InventoryHolder; +// CraftBukkit end - ++ public abstract class EntityMinecartContainer extends EntityMinecartAbstract implements IInventory, ITileInventory { -@@ -11,15 +18,56 @@ + private NonNullList items; +@@ -11,15 +19,56 @@ public MinecraftKey lootTable; public long lootTableSeed; diff --git a/nms-patches/EntityMushroomCow.patch b/nms-patches/EntityMushroomCow.patch index b69ce75cc..01309b8ac 100644 --- a/nms-patches/EntityMushroomCow.patch +++ b/nms-patches/EntityMushroomCow.patch @@ -1,17 +1,18 @@ --- a/net/minecraft/server/EntityMushroomCow.java +++ b/net/minecraft/server/EntityMushroomCow.java -@@ -4,6 +4,10 @@ - import java.util.Random; +@@ -5,6 +5,11 @@ import java.util.UUID; import org.apache.commons.lang3.tuple.Pair; + +// CraftBukkit start +import org.bukkit.craftbukkit.event.CraftEventFactory; +import org.bukkit.event.entity.EntityTransformEvent; +// CraftBukkit end - ++ public class EntityMushroomCow extends EntityCow implements IShearable { -@@ -75,6 +79,11 @@ + private static final DataWatcherObject bo = DataWatcher.a(EntityMushroomCow.class, DataWatcherRegistry.d); +@@ -75,6 +80,11 @@ this.playSound(soundeffect, 1.0F, 1.0F); return EnumInteractionResult.a(this.world.isClientSide); } else if (itemstack.getItem() == Items.SHEARS && this.canShear()) { @@ -23,7 +24,7 @@ this.shear(SoundCategory.PLAYERS); if (!this.world.isClientSide) { itemstack.damage(1, entityhuman, (entityhuman1) -> { -@@ -121,7 +130,7 @@ +@@ -121,7 +131,7 @@ this.world.playSound((EntityHuman) null, (Entity) this, SoundEffects.ENTITY_MOOSHROOM_SHEAR, soundcategory, 1.0F, 1.0F); if (!this.world.s_()) { ((WorldServer) this.world).a(Particles.EXPLOSION, this.locX(), this.e(0.5D), this.locZ(), 1, 0.0D, 0.0D, 0.0D, 0.0D); @@ -32,7 +33,7 @@ EntityCow entitycow = (EntityCow) EntityTypes.COW.a(this.world); entitycow.setPositionRotation(this.locX(), this.locY(), this.locZ(), this.yaw, this.pitch); -@@ -137,7 +146,14 @@ +@@ -137,7 +147,14 @@ } entitycow.setInvulnerable(this.isInvulnerable()); diff --git a/nms-patches/EntityPotion.patch b/nms-patches/EntityPotion.patch index 385a33452..2af85dd28 100644 --- a/nms-patches/EntityPotion.patch +++ b/nms-patches/EntityPotion.patch @@ -1,9 +1,9 @@ --- a/net/minecraft/server/EntityPotion.java +++ b/net/minecraft/server/EntityPotion.java -@@ -4,6 +4,13 @@ - import java.util.List; +@@ -5,6 +5,14 @@ import java.util.function.Predicate; import javax.annotation.Nullable; + +// CraftBukkit start +import java.util.HashMap; +import java.util.Map; @@ -11,10 +11,11 @@ +import org.bukkit.craftbukkit.event.CraftEventFactory; +import org.bukkit.entity.LivingEntity; +// CraftBukkit end - ++ public class EntityPotion extends EntityProjectileThrowable { -@@ -69,7 +76,7 @@ + public static final Predicate b = EntityLiving::dO; +@@ -69,7 +77,7 @@ if (flag) { this.splash(); @@ -23,7 +24,7 @@ if (this.isLingering()) { this.a(itemstack, potionregistry); } else { -@@ -106,6 +113,7 @@ +@@ -106,6 +114,7 @@ private void a(List list, @Nullable Entity entity) { AxisAlignedBB axisalignedbb = this.getBoundingBox().grow(4.0D, 2.0D, 4.0D); List list1 = this.world.a(EntityLiving.class, axisalignedbb); @@ -31,7 +32,7 @@ if (!list1.isEmpty()) { Iterator iterator = list1.iterator(); -@@ -123,21 +131,46 @@ +@@ -123,21 +132,46 @@ d1 = 1.0D; } @@ -42,20 +43,7 @@ + } + } + } - -- while (iterator1.hasNext()) { -- MobEffect mobeffect = (MobEffect) iterator1.next(); -- MobEffectList mobeffectlist = mobeffect.getMobEffect(); -- -- if (mobeffectlist.isInstant()) { -- mobeffectlist.applyInstantEffect(this, this.getShooter(), entityliving, mobeffect.getAmplifier(), d1); -- } else { -- int i = (int) (d1 * (double) mobeffect.getDuration() + 0.5D); -- -- if (i > 20) { -- entityliving.addEffect(new MobEffect(mobeffectlist, i, mobeffect.getAmplifier(), mobeffect.isAmbient(), mobeffect.isShowParticles())); -- } -- } ++ + org.bukkit.event.entity.PotionSplashEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPotionSplashEvent(this, affected); + if (!event.isCancelled() && list != null && !list.isEmpty()) { // do not process effects if there are no effects to process + for (LivingEntity victim : event.getAffectedEntities()) { @@ -86,13 +74,26 @@ + mobeffectlist.applyInstantEffect(this, this.getShooter(), entityliving, mobeffect.getAmplifier(), d1); + } else { + int i = (int) (d1 * (double) mobeffect.getDuration() + 0.5D); -+ + +- while (iterator1.hasNext()) { +- MobEffect mobeffect = (MobEffect) iterator1.next(); +- MobEffectList mobeffectlist = mobeffect.getMobEffect(); +- +- if (mobeffectlist.isInstant()) { +- mobeffectlist.applyInstantEffect(this, this.getShooter(), entityliving, mobeffect.getAmplifier(), d1); +- } else { +- int i = (int) (d1 * (double) mobeffect.getDuration() + 0.5D); +- +- if (i > 20) { +- entityliving.addEffect(new MobEffect(mobeffectlist, i, mobeffect.getAmplifier(), mobeffect.isAmbient(), mobeffect.isShowParticles())); +- } +- } + if (i > 20) { + entityliving.addEffect(new MobEffect(mobeffectlist, i, mobeffect.getAmplifier(), mobeffect.isAmbient(), mobeffect.isShowParticles()), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.POTION_SPLASH); // CraftBukkit } } } -@@ -173,7 +206,14 @@ +@@ -173,7 +207,14 @@ entityareaeffectcloud.setColor(nbttagcompound.getInt("CustomPotionColor")); } @@ -108,7 +109,7 @@ } public boolean isLingering() { -@@ -184,11 +224,19 @@ +@@ -184,11 +225,19 @@ IBlockData iblockdata = this.world.getType(blockposition); if (iblockdata.a((Tag) TagsBlock.FIRE)) { diff --git a/nms-patches/EntityShulker.patch b/nms-patches/EntityShulker.patch index 403d93210..024591f07 100644 --- a/nms-patches/EntityShulker.patch +++ b/nms-patches/EntityShulker.patch @@ -1,17 +1,18 @@ --- a/net/minecraft/server/EntityShulker.java +++ b/net/minecraft/server/EntityShulker.java -@@ -6,6 +6,10 @@ - import java.util.Optional; +@@ -7,6 +7,11 @@ import java.util.UUID; import javax.annotation.Nullable; + +// CraftBukkit start +import org.bukkit.Location; +import org.bukkit.event.entity.EntityTeleportEvent; +// CraftBukkit end - ++ public class EntityShulker extends EntityGolem implements IMonster { -@@ -31,7 +35,7 @@ + private static final UUID bp = UUID.fromString("7E0292F2-9434-48D5-A29F-9583AF7DF27F"); +@@ -31,7 +36,7 @@ this.goalSelector.a(4, new EntityShulker.a()); this.goalSelector.a(7, new EntityShulker.e()); this.goalSelector.a(8, new PathfinderGoalRandomLookaround(this)); @@ -20,7 +21,7 @@ this.targetSelector.a(2, new EntityShulker.d(this)); this.targetSelector.a(3, new EntityShulker.c(this)); } -@@ -279,6 +283,16 @@ +@@ -279,6 +284,16 @@ EnumDirection enumdirection = this.g(blockposition1); if (enumdirection != null) { @@ -37,7 +38,7 @@ this.datawatcher.set(EntityShulker.b, enumdirection); this.playSound(SoundEffects.ENTITY_SHULKER_TELEPORT, 1.0F, 1.0F); this.datawatcher.set(EntityShulker.c, Optional.of(blockposition1)); -@@ -319,6 +333,7 @@ +@@ -319,6 +334,7 @@ } this.g((double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D); diff --git a/nms-patches/EntitySlime.patch b/nms-patches/EntitySlime.patch index 529d3d771..060ca1702 100644 --- a/nms-patches/EntitySlime.patch +++ b/nms-patches/EntitySlime.patch @@ -1,9 +1,9 @@ --- a/net/minecraft/server/EntitySlime.java +++ b/net/minecraft/server/EntitySlime.java -@@ -5,6 +5,13 @@ - import java.util.Optional; +@@ -6,6 +6,14 @@ import java.util.Random; import javax.annotation.Nullable; + +// CraftBukkit start +import java.util.ArrayList; +import java.util.List; @@ -11,10 +11,11 @@ +import org.bukkit.event.entity.EntityTransformEvent; +import org.bukkit.event.entity.SlimeSplitEvent; +// CraftBukkit end - ++ public class EntitySlime extends EntityInsentient implements IMonster { -@@ -149,7 +156,7 @@ + private static final DataWatcherObject bo = DataWatcher.a(EntitySlime.class, DataWatcherRegistry.b); +@@ -149,7 +157,7 @@ @Override public EntityTypes getEntityType() { @@ -23,7 +24,7 @@ } @Override -@@ -163,6 +170,19 @@ +@@ -163,6 +171,19 @@ int j = i / 2; int k = 2 + this.random.nextInt(3); @@ -43,7 +44,7 @@ for (int l = 0; l < k; ++l) { float f1 = ((float) (l % 2) - 0.5F) * f; float f2 = ((float) (l / 2) - 0.5F) * f; -@@ -177,8 +197,17 @@ +@@ -177,8 +198,17 @@ entityslime.setInvulnerable(this.isInvulnerable()); entityslime.setSize(j, true); entityslime.setPositionRotation(this.locX() + (double) f1, this.locY() + 0.5D, this.locZ() + (double) f2, this.random.nextFloat() * 360.0F, 0.0F); diff --git a/nms-patches/EntitySnowman.patch b/nms-patches/EntitySnowman.patch index a44a8085e..cad2f2154 100644 --- a/nms-patches/EntitySnowman.patch +++ b/nms-patches/EntitySnowman.patch @@ -1,16 +1,17 @@ --- a/net/minecraft/server/EntitySnowman.java +++ b/net/minecraft/server/EntitySnowman.java -@@ -1,6 +1,9 @@ - package net.minecraft.server; +@@ -2,6 +2,10 @@ import javax.annotation.Nullable; + +// CraftBukkit start +import org.bukkit.craftbukkit.event.CraftEventFactory; +// CraftBukkit end - ++ public class EntitySnowman extends EntityGolem implements IShearable, IRangedEntity { -@@ -60,7 +63,7 @@ + private static final DataWatcherObject b = DataWatcher.a(EntitySnowman.class, DataWatcherRegistry.a); +@@ -60,7 +64,7 @@ int k = MathHelper.floor(this.locZ()); if (this.world.getBiome(new BlockPosition(i, 0, k)).getAdjustedTemperature(new BlockPosition(i, j, k)) > 1.0F) { @@ -19,7 +20,7 @@ } if (!this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) { -@@ -76,7 +79,7 @@ +@@ -76,7 +80,7 @@ BlockPosition blockposition = new BlockPosition(i, j, k); if (this.world.getType(blockposition).isAir() && this.world.getBiome(blockposition).getAdjustedTemperature(blockposition) < 0.8F && iblockdata.canPlace(this.world, blockposition)) { @@ -28,7 +29,7 @@ } } } -@@ -107,6 +110,11 @@ +@@ -107,6 +111,11 @@ ItemStack itemstack = entityhuman.b(enumhand); if (itemstack.getItem() == Items.SHEARS && this.canShear()) { diff --git a/nms-patches/EntityTNTPrimed.patch b/nms-patches/EntityTNTPrimed.patch index 50b78af52..e30d8ca03 100644 --- a/nms-patches/EntityTNTPrimed.patch +++ b/nms-patches/EntityTNTPrimed.patch @@ -1,14 +1,14 @@ --- a/net/minecraft/server/EntityTNTPrimed.java +++ b/net/minecraft/server/EntityTNTPrimed.java -@@ -1,6 +1,7 @@ - package net.minecraft.server; +@@ -2,12 +2,16 @@ import javax.annotation.Nullable; -+import org.bukkit.event.entity.ExplosionPrimeEvent; // CraftBukkit ++import org.bukkit.event.entity.ExplosionPrimeEvent; // CraftBukkit ++ public class EntityTNTPrimed extends Entity { -@@ -8,6 +9,8 @@ + private static final DataWatcherObject FUSE_TICKS = DataWatcher.a(EntityTNTPrimed.class, DataWatcherRegistry.b); @Nullable public EntityLiving source; private int fuseTicks; @@ -17,7 +17,7 @@ public EntityTNTPrimed(EntityTypes entitytypes, World world) { super(entitytypes, world); -@@ -57,10 +60,13 @@ +@@ -57,10 +61,13 @@ --this.fuseTicks; if (this.fuseTicks <= 0) { @@ -32,7 +32,7 @@ } else { this.aK(); if (this.world.isClientSide) { -@@ -71,9 +77,16 @@ +@@ -71,9 +78,16 @@ } private void explode() { diff --git a/nms-patches/EntityVex.patch b/nms-patches/EntityVex.patch index b049459a5..4fa8ccde3 100644 --- a/nms-patches/EntityVex.patch +++ b/nms-patches/EntityVex.patch @@ -1,14 +1,6 @@ --- a/net/minecraft/server/EntityVex.java +++ b/net/minecraft/server/EntityVex.java -@@ -2,6 +2,7 @@ - - import java.util.EnumSet; - import javax.annotation.Nullable; -+import org.bukkit.event.entity.EntityTargetEvent; - - public class EntityVex extends EntityMonster { - -@@ -45,7 +46,7 @@ +@@ -45,7 +45,7 @@ this.goalSelector.a(8, new EntityVex.d()); this.goalSelector.a(9, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 3.0F, 1.0F)); this.goalSelector.a(10, new PathfinderGoalLookAtPlayer(this, EntityInsentient.class, 8.0F)); @@ -17,12 +9,12 @@ this.targetSelector.a(2, new EntityVex.b(this)); this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true)); } -@@ -186,7 +187,7 @@ +@@ -186,7 +186,7 @@ @Override public void c() { - EntityVex.this.setGoalTarget(EntityVex.this.c.getGoalTarget()); -+ EntityVex.this.setGoalTarget(EntityVex.this.c.getGoalTarget(), EntityTargetEvent.TargetReason.OWNER_ATTACKED_TARGET, true); // CraftBukkit ++ EntityVex.this.setGoalTarget(EntityVex.this.c.getGoalTarget(), org.bukkit.event.entity.EntityTargetEvent.TargetReason.OWNER_ATTACKED_TARGET, true); // CraftBukkit super.c(); } } diff --git a/nms-patches/EntityVillager.patch b/nms-patches/EntityVillager.patch index 87a1ec525..6e5123bec 100644 --- a/nms-patches/EntityVillager.patch +++ b/nms-patches/EntityVillager.patch @@ -1,23 +1,21 @@ --- a/net/minecraft/server/EntityVillager.java +++ b/net/minecraft/server/EntityVillager.java -@@ -18,6 +18,16 @@ - import java.util.stream.Collectors; +@@ -19,6 +19,14 @@ import javax.annotation.Nullable; import org.apache.logging.log4j.Logger; + +// CraftBukkit start +import org.bukkit.Bukkit; -+import org.bukkit.craftbukkit.entity.CraftVillager; +import org.bukkit.craftbukkit.event.CraftEventFactory; -+import org.bukkit.craftbukkit.inventory.CraftMerchantRecipe; +import org.bukkit.entity.Villager; +import org.bukkit.event.entity.EntityTransformEvent; -+import org.bukkit.event.entity.VillagerAcquireTradeEvent; +import org.bukkit.event.entity.VillagerReplenishTradeEvent; +// CraftBukkit end - ++ public class EntityVillager extends EntityVillagerAbstract implements ReputationHandler, VillagerDataHolder { -@@ -64,7 +74,7 @@ + private static final DataWatcherObject br = DataWatcher.a(EntityVillager.class, DataWatcherRegistry.q); +@@ -64,7 +72,7 @@ @Override public BehaviorController getBehaviorController() { @@ -26,7 +24,7 @@ } @Override -@@ -83,7 +93,7 @@ +@@ -83,7 +91,7 @@ public void c(WorldServer worldserver) { BehaviorController behaviorcontroller = this.getBehaviorController(); @@ -35,7 +33,7 @@ this.bg = behaviorcontroller.h(); this.a(this.getBehaviorController()); } -@@ -133,7 +143,7 @@ +@@ -133,7 +141,7 @@ @Override protected void mobTick() { this.world.getMethodProfiler().enter("villagerBrain"); @@ -44,7 +42,7 @@ this.world.getMethodProfiler().exit(); if (this.bF) { this.bF = false; -@@ -147,7 +157,7 @@ +@@ -147,7 +155,7 @@ this.bu = false; } @@ -53,7 +51,7 @@ } } -@@ -358,7 +368,14 @@ +@@ -358,7 +366,14 @@ while (iterator.hasNext()) { MerchantRecipe merchantrecipe = (MerchantRecipe) iterator.next(); @@ -69,7 +67,7 @@ } } -@@ -387,7 +404,7 @@ +@@ -387,7 +402,7 @@ @Override public void saveData(NBTTagCompound nbttagcompound) { super.saveData(nbttagcompound); @@ -78,7 +76,7 @@ Logger logger = EntityVillager.LOGGER; logger.getClass(); -@@ -700,7 +717,12 @@ +@@ -700,7 +715,12 @@ } entitywitch.setPersistent(); @@ -92,7 +90,7 @@ this.fq(); this.die(); } else { -@@ -833,7 +855,7 @@ +@@ -833,7 +853,7 @@ if (entityirongolem != null) { if (entityirongolem.a((GeneratorAccess) worldserver, EnumMobSpawn.MOB_SUMMONED) && entityirongolem.a((IWorldReader) worldserver)) { @@ -101,7 +99,7 @@ return entityirongolem; } -@@ -911,7 +933,7 @@ +@@ -911,7 +931,7 @@ @Override public void entitySleep(BlockPosition blockposition) { super.entitySleep(blockposition); @@ -110,7 +108,7 @@ this.bg.removeMemory(MemoryModuleType.WALK_TARGET); this.bg.removeMemory(MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE); } -@@ -919,7 +941,7 @@ +@@ -919,7 +939,7 @@ @Override public void entityWakeup() { super.entityWakeup(); diff --git a/nms-patches/EntityVillagerAbstract.patch b/nms-patches/EntityVillagerAbstract.patch index f23405865..47919b889 100644 --- a/nms-patches/EntityVillagerAbstract.patch +++ b/nms-patches/EntityVillagerAbstract.patch @@ -1,9 +1,9 @@ --- a/net/minecraft/server/EntityVillagerAbstract.java +++ b/net/minecraft/server/EntityVillagerAbstract.java -@@ -4,15 +4,30 @@ - import java.util.Iterator; +@@ -5,14 +5,30 @@ import java.util.Set; import javax.annotation.Nullable; + +// CraftBukkit start +import org.bukkit.Bukkit; +import org.bukkit.craftbukkit.inventory.CraftMerchant; @@ -11,7 +11,7 @@ +import org.bukkit.entity.AbstractVillager; +import org.bukkit.event.entity.VillagerAcquireTradeEvent; +// CraftBukkit end - ++ public abstract class EntityVillagerAbstract extends EntityAgeable implements NPC, IMerchant { + // CraftBukkit start @@ -32,7 +32,7 @@ public EntityVillagerAbstract(EntityTypes entitytypes, World world) { super(entitytypes, world); -@@ -213,7 +228,16 @@ +@@ -213,7 +229,16 @@ MerchantRecipe merchantrecipe = villagertrades_imerchantrecipeoption.a(this, this.random); if (merchantrecipe != null) { diff --git a/nms-patches/EntityVillagerTrader.patch b/nms-patches/EntityVillagerTrader.patch index 0ed4a7a05..e0ede8543 100644 --- a/nms-patches/EntityVillagerTrader.patch +++ b/nms-patches/EntityVillagerTrader.patch @@ -1,19 +1,20 @@ --- a/net/minecraft/server/EntityVillagerTrader.java +++ b/net/minecraft/server/EntityVillagerTrader.java -@@ -2,6 +2,12 @@ - +@@ -3,6 +3,13 @@ import java.util.EnumSet; import javax.annotation.Nullable; + +// CraftBukkit start +import org.bukkit.Bukkit; +import org.bukkit.craftbukkit.inventory.CraftMerchantRecipe; +import org.bukkit.entity.AbstractVillager; +import org.bukkit.event.entity.VillagerAcquireTradeEvent; +// CraftBukkit end - ++ public class EntityVillagerTrader extends EntityVillagerAbstract { -@@ -12,6 +18,7 @@ + @Nullable +@@ -12,6 +19,7 @@ public EntityVillagerTrader(EntityTypes entitytypes, World world) { super(entitytypes, world); this.attachedToPlayer = true; @@ -21,7 +22,7 @@ } @Override -@@ -89,7 +96,16 @@ +@@ -89,7 +97,16 @@ MerchantRecipe merchantrecipe = villagertrades_imerchantrecipeoption.a(this, this.random); if (merchantrecipe != null) { diff --git a/nms-patches/EntityZombie.patch b/nms-patches/EntityZombie.patch index f4b15f523..9b58dd5b2 100644 --- a/nms-patches/EntityZombie.patch +++ b/nms-patches/EntityZombie.patch @@ -1,11 +1,10 @@ --- a/net/minecraft/server/EntityZombie.java +++ b/net/minecraft/server/EntityZombie.java -@@ -9,6 +9,15 @@ +@@ -9,6 +9,14 @@ import java.util.function.Predicate; import javax.annotation.Nullable; +// CraftBukkit start -+import org.bukkit.craftbukkit.event.CraftEventFactory; +import org.bukkit.entity.Zombie; +import org.bukkit.event.entity.CreatureSpawnEvent; +import org.bukkit.event.entity.EntityCombustByEntityEvent; @@ -16,7 +15,7 @@ public class EntityZombie extends EntityMonster { private static final UUID b = UUID.fromString("B9766B59-9566-4402-BC1F-2EE2A276D836"); -@@ -23,6 +32,7 @@ +@@ -23,6 +31,7 @@ private boolean bs; private int bt; public int drownedConversionTime; @@ -24,7 +23,7 @@ public EntityZombie(EntityTypes entitytypes, World world) { super(entitytypes, world); -@@ -139,7 +149,10 @@ +@@ -139,7 +148,10 @@ public void tick() { if (!this.world.isClientSide && this.isAlive() && !this.isNoAI()) { if (this.isDrownConverting()) { @@ -36,7 +35,7 @@ if (this.drownedConversionTime < 0) { this.eP(); } -@@ -156,6 +169,7 @@ +@@ -156,6 +168,7 @@ } super.tick(); @@ -44,7 +43,7 @@ } @Override -@@ -188,6 +202,7 @@ +@@ -188,6 +201,7 @@ } public void startDrownedConversion(int i) { @@ -52,7 +51,7 @@ this.drownedConversionTime = i; this.getDataWatcher().set(EntityZombie.DROWN_CONVERTING, true); } -@@ -201,11 +216,15 @@ +@@ -201,11 +215,15 @@ } protected void b(EntityTypes entitytypes) { @@ -69,7 +68,7 @@ } } -@@ -245,9 +264,9 @@ +@@ -245,9 +263,9 @@ if (SpawnerCreature.a(entitypositiontypes_surface, (IWorldReader) this.world, blockposition, entitytypes) && EntityPositionTypes.a(entitytypes, worldserver, EnumMobSpawn.REINFORCEMENT, blockposition, this.world.random)) { entityzombie.setPosition((double) i1, (double) j1, (double) k1); if (!this.world.isPlayerNearby((double) i1, (double) j1, (double) k1, 7.0D) && this.world.j((Entity) entityzombie) && this.world.getCubes(entityzombie) && !this.world.containsLiquid(entityzombie.getBoundingBox())) { @@ -81,7 +80,7 @@ this.getAttributeInstance(GenericAttributes.SPAWN_REINFORCEMENTS).addModifier(new AttributeModifier("Zombie reinforcement caller charge", -0.05000000074505806D, AttributeModifier.Operation.ADDITION)); entityzombie.getAttributeInstance(GenericAttributes.SPAWN_REINFORCEMENTS).addModifier(new AttributeModifier("Zombie reinforcement callee charge", -0.05000000074505806D, AttributeModifier.Operation.ADDITION)); break; -@@ -268,7 +287,14 @@ +@@ -268,7 +286,14 @@ float f = this.world.getDamageScaler(this.getChunkCoordinates()).b(); if (this.getItemInMainHand().isEmpty() && this.isBurning() && this.random.nextFloat() < f * 0.3F) { @@ -97,7 +96,7 @@ } } -@@ -349,7 +375,12 @@ +@@ -349,7 +374,12 @@ } EntityVillager entityvillager = (EntityVillager) entityliving; @@ -111,7 +110,7 @@ entityzombievillager.prepare(worldserver, worldserver.getDamageScaler(entityzombievillager.getChunkCoordinates()), EnumMobSpawn.CONVERSION, new EntityZombie.GroupDataZombie(false, true), (NBTTagCompound) null); entityzombievillager.setVillagerData(entityvillager.getVillagerData()); -@@ -406,7 +437,7 @@ +@@ -406,7 +436,7 @@ entitychicken1.prepare(worldaccess, difficultydamagescaler, EnumMobSpawn.JOCKEY, (GroupDataEntity) null, (NBTTagCompound) null); entitychicken1.setChickenJockey(true); this.startRiding(entitychicken1); diff --git a/nms-patches/EntityZombieVillager.patch b/nms-patches/EntityZombieVillager.patch index 5fbf0556b..d8a3e11ec 100644 --- a/nms-patches/EntityZombieVillager.patch +++ b/nms-patches/EntityZombieVillager.patch @@ -1,18 +1,18 @@ --- a/net/minecraft/server/EntityZombieVillager.java +++ b/net/minecraft/server/EntityZombieVillager.java -@@ -5,6 +5,12 @@ - import java.util.UUID; +@@ -6,6 +6,12 @@ import javax.annotation.Nullable; import org.apache.logging.log4j.Logger; + +// CraftBukkit start -+import org.bukkit.craftbukkit.event.CraftEventFactory; +import org.bukkit.entity.ZombieVillager; +import org.bukkit.event.entity.CreatureSpawnEvent; +import org.bukkit.event.entity.EntityTransformEvent; +// CraftBukkit end - ++ public class EntityZombieVillager extends EntityZombie implements VillagerDataHolder { + public static final DataWatcherObject CONVERTING = DataWatcher.a(EntityZombieVillager.class, DataWatcherRegistry.i); @@ -15,6 +21,7 @@ private NBTBase bp; private NBTTagCompound bq; diff --git a/nms-patches/FluidTypeFlowing.patch b/nms-patches/FluidTypeFlowing.patch index 142907abd..bc8142f99 100644 --- a/nms-patches/FluidTypeFlowing.patch +++ b/nms-patches/FluidTypeFlowing.patch @@ -1,9 +1,9 @@ --- a/net/minecraft/server/FluidTypeFlowing.java +++ b/net/minecraft/server/FluidTypeFlowing.java -@@ -10,6 +10,14 @@ - import java.util.Iterator; +@@ -11,6 +11,15 @@ import java.util.Map; import java.util.Map.Entry; + +// CraftBukkit start +import org.bukkit.block.BlockFace; +import org.bukkit.craftbukkit.block.CraftBlock; @@ -12,10 +12,11 @@ +import org.bukkit.event.block.BlockFromToEvent; +import org.bukkit.event.block.FluidLevelChangeEvent; +// CraftBukkit end - ++ public abstract class FluidTypeFlowing extends FluidType { -@@ -110,6 +118,15 @@ + public static final BlockStateBoolean FALLING = BlockProperties.i; +@@ -110,6 +119,15 @@ Fluid fluid1 = this.a((IWorldReader) generatoraccess, blockposition1, iblockdata1); if (this.a(generatoraccess, blockposition, iblockdata, EnumDirection.DOWN, blockposition1, iblockdata1, generatoraccess.getFluid(blockposition1), fluid1.getType())) { @@ -31,7 +32,7 @@ this.a(generatoraccess, blockposition1, iblockdata1, EnumDirection.DOWN, fluid1); if (this.a((IWorldReader) generatoraccess, blockposition) >= 3) { this.a(generatoraccess, blockposition, fluid, iblockdata); -@@ -140,6 +157,15 @@ +@@ -140,6 +158,15 @@ IBlockData iblockdata1 = generatoraccess.getType(blockposition1); if (this.a(generatoraccess, blockposition, iblockdata, enumdirection, blockposition1, iblockdata1, generatoraccess.getFluid(blockposition1), fluid1.getType())) { @@ -47,7 +48,7 @@ this.a(generatoraccess, blockposition1, iblockdata1, enumdirection, fluid1); } } -@@ -418,12 +444,23 @@ +@@ -418,12 +445,23 @@ if (fluid1.isEmpty()) { fluid = fluid1; diff --git a/nms-patches/FurnaceRecipe.patch b/nms-patches/FurnaceRecipe.patch index 7fa648634..3f1a15ae4 100644 --- a/nms-patches/FurnaceRecipe.patch +++ b/nms-patches/FurnaceRecipe.patch @@ -1,15 +1,12 @@ --- a/net/minecraft/server/FurnaceRecipe.java +++ b/net/minecraft/server/FurnaceRecipe.java -@@ -1,5 +1,16 @@ +@@ -1,5 +1,13 @@ package net.minecraft.server; +// CraftBukkit start -+import java.util.ArrayList; -+import java.util.List; +import org.bukkit.craftbukkit.inventory.CraftFurnaceRecipe; +import org.bukkit.craftbukkit.inventory.CraftItemStack; +import org.bukkit.craftbukkit.inventory.CraftRecipe; -+import org.bukkit.craftbukkit.util.CraftMagicNumbers; +import org.bukkit.craftbukkit.util.CraftNamespacedKey; +import org.bukkit.inventory.Recipe; +// CraftBukkit end @@ -17,7 +14,7 @@ public class FurnaceRecipe extends RecipeCooking { public FurnaceRecipe(MinecraftKey minecraftkey, String s, RecipeItemStack recipeitemstack, ItemStack itemstack, float f, int i) { -@@ -10,4 +21,14 @@ +@@ -10,4 +18,14 @@ public RecipeSerializer getRecipeSerializer() { return RecipeSerializer.p; } diff --git a/nms-patches/IChatBaseComponent.patch b/nms-patches/IChatBaseComponent.patch index 64fce6922..95b2fbcde 100644 --- a/nms-patches/IChatBaseComponent.patch +++ b/nms-patches/IChatBaseComponent.patch @@ -1,16 +1,18 @@ --- a/net/minecraft/server/IChatBaseComponent.java +++ b/net/minecraft/server/IChatBaseComponent.java -@@ -22,8 +22,21 @@ - import java.util.Map.Entry; +@@ -23,7 +23,23 @@ import java.util.Optional; import javax.annotation.Nullable; + +-public interface IChatBaseComponent extends Message, IChatFormatted { +// CraftBukkit start +import com.google.common.collect.Streams; +import java.util.stream.Stream; - --public interface IChatBaseComponent extends Message, IChatFormatted { -+public interface IChatBaseComponent extends Message, IChatFormatted, Iterable { ++// CraftBukkit end + ++public interface IChatBaseComponent extends Message, IChatFormatted, Iterable { // CraftBukkit ++ ++ // CraftBukkit start + default Stream stream() { + return Streams.concat(new Stream[]{Stream.of(this), this.getSiblings().stream().flatMap(IChatBaseComponent::stream)}); + } diff --git a/nms-patches/IDispenseBehavior.patch b/nms-patches/IDispenseBehavior.patch index 498151746..5de9d4309 100644 --- a/nms-patches/IDispenseBehavior.patch +++ b/nms-patches/IDispenseBehavior.patch @@ -1,21 +1,21 @@ --- a/net/minecraft/server/IDispenseBehavior.java +++ b/net/minecraft/server/IDispenseBehavior.java -@@ -3,6 +3,15 @@ - import java.util.Iterator; +@@ -4,6 +4,15 @@ import java.util.List; import java.util.Random; + +// CraftBukkit start +import org.bukkit.Location; +import org.bukkit.TreeType; -+import org.bukkit.craftbukkit.event.CraftEventFactory; +import org.bukkit.craftbukkit.inventory.CraftItemStack; +import org.bukkit.craftbukkit.util.DummyGeneratorAccess; +import org.bukkit.event.block.BlockDispenseEvent; +import org.bukkit.event.world.StructureGrowEvent; +// CraftBukkit end - ++ public interface IDispenseBehavior { + IDispenseBehavior NONE = (isourceblock, itemstack) -> { @@ -44,7 +53,7 @@ BlockDispenser.a((IMaterial) Items.EGG, (IDispenseBehavior) (new DispenseBehaviorProjectile() { @Override diff --git a/nms-patches/IInventory.patch b/nms-patches/IInventory.patch index d5f8168d9..b4afe81b8 100644 --- a/nms-patches/IInventory.patch +++ b/nms-patches/IInventory.patch @@ -1,14 +1,15 @@ --- a/net/minecraft/server/IInventory.java +++ b/net/minecraft/server/IInventory.java -@@ -1,6 +1,7 @@ - package net.minecraft.server; +@@ -2,6 +2,8 @@ import java.util.Set; -+import org.bukkit.craftbukkit.entity.CraftHumanEntity; // CraftBukkit ++import org.bukkit.craftbukkit.entity.CraftHumanEntity; // CraftBukkit ++ public interface IInventory extends Clearable { -@@ -16,9 +17,7 @@ + int getSize(); +@@ -16,9 +18,7 @@ void setItem(int i, ItemStack itemstack); @@ -19,7 +20,7 @@ void update(); -@@ -57,4 +56,29 @@ +@@ -57,4 +57,29 @@ return false; } diff --git a/nms-patches/InventoryCraftResult.patch b/nms-patches/InventoryCraftResult.patch index 101edf7f5..b2a2198b9 100644 --- a/nms-patches/InventoryCraftResult.patch +++ b/nms-patches/InventoryCraftResult.patch @@ -1,18 +1,18 @@ --- a/net/minecraft/server/InventoryCraftResult.java +++ b/net/minecraft/server/InventoryCraftResult.java -@@ -2,6 +2,11 @@ - +@@ -3,12 +3,51 @@ import java.util.Iterator; import javax.annotation.Nullable; + +// CraftBukkit start +import org.bukkit.Location; +import org.bukkit.craftbukkit.entity.CraftHumanEntity; +import org.bukkit.entity.HumanEntity; +// CraftBukkit end - ++ public class InventoryCraftResult implements IInventory, RecipeHolder { -@@ -9,6 +14,39 @@ + private final NonNullList items; @Nullable private IRecipe b; diff --git a/nms-patches/InventoryCrafting.patch b/nms-patches/InventoryCrafting.patch index d749d7fc0..3d8ece0c4 100644 --- a/nms-patches/InventoryCrafting.patch +++ b/nms-patches/InventoryCrafting.patch @@ -1,9 +1,9 @@ --- a/net/minecraft/server/InventoryCrafting.java +++ b/net/minecraft/server/InventoryCrafting.java -@@ -1,6 +1,14 @@ - package net.minecraft.server; +@@ -2,6 +2,15 @@ import java.util.Iterator; + +// CraftBukkit start +import java.util.List; +import org.bukkit.Location; @@ -12,10 +12,11 @@ +import org.bukkit.entity.HumanEntity; +import org.bukkit.event.inventory.InventoryType; +// CraftBukkit end - ++ public class InventoryCrafting implements IInventory, AutoRecipeOutput { -@@ -9,6 +17,68 @@ + private final NonNullList items; +@@ -9,6 +18,68 @@ private final int c; public final Container container; diff --git a/nms-patches/InventoryEnderChest.patch b/nms-patches/InventoryEnderChest.patch index 13625b306..753c934b5 100644 --- a/nms-patches/InventoryEnderChest.patch +++ b/nms-patches/InventoryEnderChest.patch @@ -1,10 +1,12 @@ --- a/net/minecraft/server/InventoryEnderChest.java +++ b/net/minecraft/server/InventoryEnderChest.java -@@ -1,11 +1,27 @@ +@@ -1,11 +1,29 @@ package net.minecraft.server; ++// CraftBukkit start +import org.bukkit.Location; +import org.bukkit.inventory.InventoryHolder; ++// CraftBukkit end + public class InventoryEnderChest extends InventorySubcontainer { diff --git a/nms-patches/InventoryMerchant.patch b/nms-patches/InventoryMerchant.patch index a57eb6323..0319be933 100644 --- a/nms-patches/InventoryMerchant.patch +++ b/nms-patches/InventoryMerchant.patch @@ -1,9 +1,9 @@ --- a/net/minecraft/server/InventoryMerchant.java +++ b/net/minecraft/server/InventoryMerchant.java -@@ -2,6 +2,13 @@ - +@@ -3,6 +3,14 @@ import java.util.Iterator; import javax.annotation.Nullable; + +// CraftBukkit start +import java.util.List; +import org.bukkit.Location; @@ -11,10 +11,11 @@ +import org.bukkit.craftbukkit.entity.CraftAbstractVillager; +import org.bukkit.entity.HumanEntity; +// CraftBukkit end - ++ public class InventoryMerchant implements IInventory { -@@ -12,6 +19,46 @@ + private final IMerchant merchant; +@@ -12,6 +20,46 @@ public int selectedIndex; private int e; diff --git a/nms-patches/ItemBlock.patch b/nms-patches/ItemBlock.patch index 557e1a04b..5cd83d6f7 100644 --- a/nms-patches/ItemBlock.patch +++ b/nms-patches/ItemBlock.patch @@ -1,18 +1,19 @@ --- a/net/minecraft/server/ItemBlock.java +++ b/net/minecraft/server/ItemBlock.java -@@ -3,6 +3,11 @@ - import java.util.Iterator; +@@ -4,6 +4,12 @@ import java.util.Map; import javax.annotation.Nullable; + +// CraftBukkit start +import org.bukkit.craftbukkit.block.CraftBlock; +import org.bukkit.craftbukkit.block.data.CraftBlockData; +import org.bukkit.event.block.BlockCanBuildEvent; +// CraftBukkit end - ++ public class ItemBlock extends Item { -@@ -31,6 +36,12 @@ + @Deprecated +@@ -31,6 +37,12 @@ return EnumInteractionResult.FAIL; } else { IBlockData iblockdata = this.c(blockactioncontext1); @@ -25,7 +26,7 @@ if (iblockdata == null) { return EnumInteractionResult.FAIL; -@@ -48,6 +59,15 @@ +@@ -48,6 +60,15 @@ iblockdata1 = this.a(blockposition, world, itemstack, iblockdata1); this.a(blockposition, world, entityhuman, itemstack, iblockdata1); block.postPlace(world, blockposition, iblockdata1, entityhuman, itemstack); @@ -41,7 +42,7 @@ if (entityhuman instanceof EntityPlayer) { CriterionTriggers.y.a((EntityPlayer) entityhuman, blockposition, itemstack); } -@@ -55,8 +75,8 @@ +@@ -55,8 +76,8 @@ SoundEffectType soundeffecttype = iblockdata1.getStepSound(); @@ -52,7 +53,7 @@ itemstack.subtract(1); } -@@ -92,6 +112,21 @@ +@@ -92,6 +113,21 @@ if (nbttagcompound != null) { NBTTagCompound nbttagcompound1 = nbttagcompound.getCompound("BlockStateTag"); @@ -74,7 +75,7 @@ BlockStateList blockstatelist = iblockdata.getBlock().getStates(); Iterator iterator = nbttagcompound1.getKeys().iterator(); -@@ -106,11 +141,6 @@ +@@ -106,11 +142,6 @@ } } } @@ -86,7 +87,7 @@ return iblockdata1; } -@@ -123,8 +153,15 @@ +@@ -123,8 +154,15 @@ protected boolean b(BlockActionContext blockactioncontext, IBlockData iblockdata) { EntityHuman entityhuman = blockactioncontext.getEntity(); VoxelShapeCollision voxelshapecollision = entityhuman == null ? VoxelShapeCollision.a() : VoxelShapeCollision.a((Entity) entityhuman); diff --git a/nms-patches/ItemBucket.patch b/nms-patches/ItemBucket.patch index 630d3d06e..9a4a1a9fb 100644 --- a/nms-patches/ItemBucket.patch +++ b/nms-patches/ItemBucket.patch @@ -1,9 +1,9 @@ --- a/net/minecraft/server/ItemBucket.java +++ b/net/minecraft/server/ItemBucket.java -@@ -1,6 +1,13 @@ - package net.minecraft.server; +@@ -2,6 +2,14 @@ import javax.annotation.Nullable; + +// CraftBukkit start +import org.bukkit.craftbukkit.event.CraftEventFactory; +import org.bukkit.craftbukkit.inventory.CraftItemStack; @@ -11,10 +11,11 @@ +import org.bukkit.event.player.PlayerBucketEmptyEvent; +import org.bukkit.event.player.PlayerBucketFillEvent; +// CraftBukkit end - ++ public class ItemBucket extends Item { -@@ -32,12 +39,22 @@ + public final FluidType fluidType; +@@ -32,12 +40,22 @@ if (this.fluidType == FluidTypes.EMPTY) { iblockdata = world.getType(blockposition); if (iblockdata.getBlock() instanceof IFluidSource) { @@ -38,7 +39,7 @@ if (!world.isClientSide) { CriterionTriggers.j.a((EntityPlayer) entityhuman, new ItemStack(fluidtype.a())); -@@ -52,7 +69,7 @@ +@@ -52,7 +70,7 @@ iblockdata = world.getType(blockposition); BlockPosition blockposition2 = iblockdata.getBlock() instanceof IFluidContainer && this.fluidType == FluidTypes.WATER ? blockposition : blockposition1; @@ -47,7 +48,7 @@ this.a(world, itemstack, blockposition2); if (entityhuman instanceof EntityPlayer) { CriterionTriggers.y.a((EntityPlayer) entityhuman, blockposition2, itemstack); -@@ -77,6 +94,11 @@ +@@ -77,6 +95,11 @@ public void a(World world, ItemStack itemstack, BlockPosition blockposition) {} public boolean a(@Nullable EntityHuman entityhuman, World world, BlockPosition blockposition, @Nullable MovingObjectPositionBlock movingobjectpositionblock) { @@ -59,7 +60,7 @@ if (!(this.fluidType instanceof FluidTypeFlowing)) { return false; } else { -@@ -86,8 +108,18 @@ +@@ -86,8 +109,18 @@ boolean flag = iblockdata.a(this.fluidType); boolean flag1 = iblockdata.isAir() || flag || block instanceof IFluidContainer && ((IFluidContainer) block).canPlace(world, blockposition, iblockdata, this.fluidType); diff --git a/nms-patches/LootTable.patch b/nms-patches/LootTable.patch index 817b13617..4aa2e2524 100644 --- a/nms-patches/LootTable.patch +++ b/nms-patches/LootTable.patch @@ -1,19 +1,20 @@ --- a/net/minecraft/server/LootTable.java +++ b/net/minecraft/server/LootTable.java -@@ -18,6 +18,12 @@ - import org.apache.commons.lang3.ArrayUtils; +@@ -19,6 +19,13 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; + +// CraftBukkit start +import java.util.stream.Collectors; +import org.bukkit.craftbukkit.event.CraftEventFactory; +import org.bukkit.craftbukkit.inventory.CraftItemStack; +import org.bukkit.event.world.LootGenerateEvent; +// CraftBukkit end - ++ public class LootTable { -@@ -103,8 +109,21 @@ + private static final Logger LOGGER = LogManager.getLogger(); +@@ -103,8 +110,21 @@ } public void fillInventory(IInventory iinventory, LootTableInfo loottableinfo) { diff --git a/nms-patches/MinecraftServer.patch b/nms-patches/MinecraftServer.patch index 1ac53cfbf..0022c7eab 100644 --- a/nms-patches/MinecraftServer.patch +++ b/nms-patches/MinecraftServer.patch @@ -1,19 +1,12 @@ --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java -@@ -9,6 +9,8 @@ - import com.mojang.authlib.GameProfileRepository; - import com.mojang.authlib.minecraft.MinecraftSessionService; - import com.mojang.datafixers.DataFixer; -+import com.mojang.serialization.DynamicOps; -+import com.mojang.serialization.Lifecycle; - import io.netty.buffer.ByteBuf; - import io.netty.buffer.ByteBufOutputStream; - import io.netty.buffer.Unpooled; -@@ -54,6 +56,15 @@ - import org.apache.commons.lang3.Validate; +@@ -55,6 +55,18 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; + +// CraftBukkit start ++import com.mojang.serialization.DynamicOps; ++import com.mojang.serialization.Lifecycle; +import com.google.common.collect.ImmutableSet; +import jline.console.ConsoleReader; +import joptsimple.OptionSet; @@ -22,10 +15,11 @@ +import org.bukkit.craftbukkit.Main; +import org.bukkit.event.server.ServerLoadEvent; +// CraftBukkit end - ++ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant implements IMojangStatistics, ICommandListener, AutoCloseable { -@@ -124,6 +135,20 @@ + public static final Logger LOGGER = LogManager.getLogger(); +@@ -124,6 +136,20 @@ private final DefinedStructureManager ak; protected SaveData saveData; @@ -46,7 +40,7 @@ public static S a(Function function) { AtomicReference atomicreference = new AtomicReference(); Thread thread = new Thread(() -> { -@@ -133,21 +158,21 @@ +@@ -133,21 +159,21 @@ thread.setUncaughtExceptionHandler((thread1, throwable) -> { MinecraftServer.LOGGER.error(throwable); }); @@ -71,7 +65,7 @@ this.isRunning = true; this.h = new long[100]; this.K = ""; -@@ -173,7 +198,34 @@ +@@ -173,7 +199,34 @@ this.ak = new DefinedStructureManager(datapackresources.h(), convertable_conversionsession, datafixer); this.serverThread = thread; this.executorService = SystemUtils.f(); @@ -106,7 +100,7 @@ private void initializeScoreboards(WorldPersistentData worldpersistentdata) { PersistentScoreboard persistentscoreboard = (PersistentScoreboard) worldpersistentdata.a(PersistentScoreboard::new, "scoreboard"); -@@ -186,7 +238,7 @@ +@@ -186,7 +239,7 @@ public static void convertWorld(Convertable.ConversionSession convertable_conversionsession) { if (convertable_conversionsession.isConvertable()) { @@ -115,7 +109,7 @@ convertable_conversionsession.convert(new IProgressUpdate() { private long a = SystemUtils.getMonotonicMillis(); -@@ -209,45 +261,184 @@ +@@ -209,45 +262,184 @@ } @@ -199,7 +193,8 @@ + } + MinecraftServer.convertWorld(worldSession); // Run conversion now + } -+ + +- this.a(worldloadlistener); + org.bukkit.generator.ChunkGenerator gen = this.server.getGenerator(name); + + IRegistryCustom.Dimension iregistrycustom_dimension = this.customRegistry; @@ -251,8 +246,7 @@ + } + + ResourceKey worldKey = ResourceKey.a(IRegistry.L, dimensionKey.a()); - -- this.a(worldloadlistener); ++ + if (worldId == 0) { + this.saveData = worlddata; + this.saveData.setGameType(((DedicatedServer) this).getDedicatedServerProperties().gamemode); // From DedicatedServer.init @@ -331,7 +325,7 @@ WorldBorder worldborder = worldserver.getWorldBorder(); worldborder.a(iworlddataserver.r()); -@@ -272,31 +463,8 @@ +@@ -272,31 +464,8 @@ iworlddataserver.c(true); } @@ -364,7 +358,7 @@ private static void a(WorldServer worldserver, IWorldDataServer iworlddataserver, boolean flag, boolean flag1, boolean flag2) { ChunkGenerator chunkgenerator = worldserver.getChunkProvider().getChunkGenerator(); -@@ -312,6 +480,21 @@ +@@ -312,6 +481,21 @@ return biomebase.b().b(); }, random); ChunkCoordIntPair chunkcoordintpair = blockposition == null ? new ChunkCoordIntPair(0, 0) : new ChunkCoordIntPair(blockposition); @@ -386,7 +380,7 @@ if (blockposition == null) { MinecraftServer.LOGGER.warn("Unable to find spawn biome"); -@@ -378,8 +561,15 @@ +@@ -378,8 +562,15 @@ iworlddataserver.setGameType(EnumGamemode.SPECTATOR); } @@ -404,7 +398,7 @@ MinecraftServer.LOGGER.info("Preparing start region for dimension {}", worldserver.getDimensionKey().a()); BlockPosition blockposition = worldserver.getSpawn(); -@@ -392,17 +582,21 @@ +@@ -392,17 +583,21 @@ chunkproviderserver.addTicket(TicketType.START, new ChunkCoordIntPair(blockposition), 11, Unit.INSTANCE); while (chunkproviderserver.b() != 441) { @@ -435,7 +429,7 @@ if (forcedchunk != null) { LongIterator longiterator = forcedchunk.a().iterator(); -@@ -416,11 +610,18 @@ +@@ -416,11 +611,18 @@ } } @@ -457,7 +451,7 @@ } protected void loadResourcesZip() { -@@ -465,12 +666,16 @@ +@@ -465,12 +667,16 @@ worldserver.save((IProgressUpdate) null, flag1, worldserver.savingDisabled && !flag2); } @@ -474,7 +468,7 @@ return flag3; } -@@ -479,8 +684,29 @@ +@@ -479,8 +685,29 @@ this.stop(); } @@ -504,7 +498,7 @@ if (this.getServerConnection() != null) { this.getServerConnection().b(); } -@@ -489,6 +715,7 @@ +@@ -489,6 +716,7 @@ MinecraftServer.LOGGER.info("Saving players"); this.playerList.savePlayers(); this.playerList.shutdown(); @@ -512,7 +506,7 @@ } MinecraftServer.LOGGER.info("Saving worlds"); -@@ -566,14 +793,16 @@ +@@ -566,14 +794,16 @@ while (this.isRunning) { long i = SystemUtils.getMonotonicMillis() - this.nextTick; @@ -530,7 +524,7 @@ this.nextTick += 50L; GameProfilerTick gameprofilertick = GameProfilerTick.a("Server"); -@@ -619,6 +848,12 @@ +@@ -619,6 +849,12 @@ } catch (Throwable throwable1) { MinecraftServer.LOGGER.error("Exception stopping the server", throwable1); } finally { @@ -543,7 +537,7 @@ this.exit(); } -@@ -627,8 +862,15 @@ +@@ -627,8 +863,15 @@ } private boolean canSleepForTick() { @@ -560,7 +554,7 @@ protected void sleepForTick() { this.executeAll(); -@@ -734,7 +976,7 @@ +@@ -734,7 +977,7 @@ this.serverPing.b().a(agameprofile); } @@ -569,7 +563,7 @@ MinecraftServer.LOGGER.debug("Autosave started"); this.methodProfiler.enter("save"); this.playerList.savePlayers(); -@@ -764,22 +1006,39 @@ +@@ -764,22 +1007,39 @@ } protected void b(BooleanSupplier booleansupplier) { @@ -609,7 +603,7 @@ this.methodProfiler.enter("tick"); -@@ -863,7 +1122,7 @@ +@@ -863,7 +1123,7 @@ } public String getServerModName() { @@ -618,7 +612,7 @@ } public CrashReport b(CrashReport crashreport) { -@@ -1220,16 +1479,17 @@ +@@ -1220,16 +1480,17 @@ public CompletableFuture a(Collection collection) { CompletableFuture completablefuture = CompletableFuture.supplyAsync(() -> { @@ -638,7 +632,7 @@ this.resourcePackRepository.a(collection); this.saveData.a(a(this.resourcePackRepository)); datapackresources.i(); -@@ -1595,6 +1855,22 @@ +@@ -1595,6 +1856,22 @@ } diff --git a/nms-patches/PathfinderGoalFollowOwner.patch b/nms-patches/PathfinderGoalFollowOwner.patch index 5c640a379..257d1bc3a 100644 --- a/nms-patches/PathfinderGoalFollowOwner.patch +++ b/nms-patches/PathfinderGoalFollowOwner.patch @@ -1,18 +1,19 @@ --- a/net/minecraft/server/PathfinderGoalFollowOwner.java +++ b/net/minecraft/server/PathfinderGoalFollowOwner.java -@@ -1,6 +1,11 @@ - package net.minecraft.server; +@@ -2,6 +2,12 @@ import java.util.EnumSet; + +// CraftBukkit start +import org.bukkit.Location; +import org.bukkit.craftbukkit.entity.CraftEntity; +import org.bukkit.event.entity.EntityTeleportEvent; +// CraftBukkit end - ++ public class PathfinderGoalFollowOwner extends PathfinderGoal { -@@ -104,7 +109,18 @@ + private final EntityTameableAnimal a; +@@ -104,7 +110,18 @@ } else if (!this.a(new BlockPosition(i, j, k))) { return false; } else { diff --git a/nms-patches/PathfinderGoalRemoveBlock.patch b/nms-patches/PathfinderGoalRemoveBlock.patch index 1f040cb33..c9c97266e 100644 --- a/nms-patches/PathfinderGoalRemoveBlock.patch +++ b/nms-patches/PathfinderGoalRemoveBlock.patch @@ -1,17 +1,18 @@ --- a/net/minecraft/server/PathfinderGoalRemoveBlock.java +++ b/net/minecraft/server/PathfinderGoalRemoveBlock.java -@@ -2,6 +2,10 @@ - +@@ -3,6 +3,11 @@ import java.util.Random; import javax.annotation.Nullable; + +// CraftBukkit start +import org.bukkit.craftbukkit.block.CraftBlock; +import org.bukkit.event.entity.EntityInteractEvent; +// CraftBukkit end - ++ public class PathfinderGoalRemoveBlock extends PathfinderGoalGotoTarget { -@@ -81,6 +85,14 @@ + private final Block g; +@@ -81,6 +86,14 @@ } if (this.i > 60) { diff --git a/nms-patches/PathfinderGoalTarget.patch b/nms-patches/PathfinderGoalTarget.patch index eb920b76c..69f8439ab 100644 --- a/nms-patches/PathfinderGoalTarget.patch +++ b/nms-patches/PathfinderGoalTarget.patch @@ -1,14 +1,15 @@ --- a/net/minecraft/server/PathfinderGoalTarget.java +++ b/net/minecraft/server/PathfinderGoalTarget.java -@@ -1,6 +1,7 @@ - package net.minecraft.server; +@@ -2,6 +2,8 @@ import javax.annotation.Nullable; -+import org.bukkit.event.entity.EntityTargetEvent; // CraftBukkit ++import org.bukkit.event.entity.EntityTargetEvent; // CraftBukkit ++ public abstract class PathfinderGoalTarget extends PathfinderGoal { -@@ -59,7 +60,7 @@ + protected final EntityInsentient e; +@@ -59,7 +61,7 @@ if (entityliving instanceof EntityHuman && ((EntityHuman) entityliving).abilities.isInvulnerable) { return false; } else { @@ -17,7 +18,7 @@ return true; } } -@@ -80,7 +81,7 @@ +@@ -80,7 +82,7 @@ @Override public void d() { diff --git a/nms-patches/PathfinderGoalTempt.patch b/nms-patches/PathfinderGoalTempt.patch index 307810a56..475a5030e 100644 --- a/nms-patches/PathfinderGoalTempt.patch +++ b/nms-patches/PathfinderGoalTempt.patch @@ -1,19 +1,20 @@ --- a/net/minecraft/server/PathfinderGoalTempt.java +++ b/net/minecraft/server/PathfinderGoalTempt.java -@@ -1,6 +1,12 @@ - package net.minecraft.server; +@@ -2,6 +2,13 @@ import java.util.EnumSet; + +// CraftBukkit start +import org.bukkit.craftbukkit.entity.CraftLivingEntity; +import org.bukkit.craftbukkit.event.CraftEventFactory; +import org.bukkit.event.entity.EntityTargetEvent; +import org.bukkit.event.entity.EntityTargetLivingEntityEvent; +// CraftBukkit end - ++ public class PathfinderGoalTempt extends PathfinderGoal { -@@ -12,7 +18,7 @@ + private static final PathfinderTargetCondition c = (new PathfinderTargetCondition()).a(10.0D).a().b().d().c(); +@@ -12,7 +19,7 @@ private double g; private double h; private double i; @@ -22,7 +23,7 @@ private int j; private boolean k; private final RecipeItemStack l; -@@ -40,7 +46,17 @@ +@@ -40,7 +47,17 @@ return false; } else { this.target = this.a.world.a(PathfinderGoalTempt.c, (EntityLiving) this.a); diff --git a/nms-patches/PlayerChunkMap.patch b/nms-patches/PlayerChunkMap.patch index 232a6de1b..b24ce144f 100644 --- a/nms-patches/PlayerChunkMap.patch +++ b/nms-patches/PlayerChunkMap.patch @@ -1,14 +1,15 @@ --- a/net/minecraft/server/PlayerChunkMap.java +++ b/net/minecraft/server/PlayerChunkMap.java -@@ -44,6 +44,7 @@ - import org.apache.commons.lang3.mutable.MutableBoolean; +@@ -45,6 +45,8 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -+import org.bukkit.entity.Player; // CraftBukkit ++import org.bukkit.entity.Player; // CraftBukkit ++ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { -@@ -75,6 +76,31 @@ + private static final Logger LOGGER = LogManager.getLogger(); +@@ -75,6 +77,31 @@ private final Queue A; private int viewDistance; @@ -40,7 +41,7 @@ public PlayerChunkMap(WorldServer worldserver, Convertable.ConversionSession convertable_conversionsession, DataFixer datafixer, DefinedStructureManager definedstructuremanager, Executor executor, IAsyncTaskHandler iasynctaskhandler, ILightAccess ilightaccess, ChunkGenerator chunkgenerator, WorldLoadListener worldloadlistener, Supplier supplier, int i, boolean flag) { super(new File(convertable_conversionsession.a(worldserver.getDimensionKey()), "region"), datafixer, flag); this.visibleChunks = this.updatingChunks.clone(); -@@ -195,9 +221,12 @@ +@@ -195,9 +222,12 @@ return completablefuture1.thenApply((list1) -> { List list2 = Lists.newArrayList(); @@ -55,7 +56,7 @@ final Either either = (Either) iterator.next(); Optional optional = either.left(); -@@ -300,7 +329,7 @@ +@@ -300,7 +330,7 @@ PlayerChunkMap.LOGGER.info("ThreadedAnvilChunkStorage ({}): All chunks are saved", this.w.getName()); } else { this.visibleChunks.values().stream().filter(PlayerChunk::hasBeenLoaded).forEach((playerchunk) -> { @@ -64,7 +65,7 @@ if (ichunkaccess instanceof ProtoChunkExtension || ichunkaccess instanceof Chunk) { this.saveChunk(ichunkaccess); -@@ -311,7 +340,6 @@ +@@ -311,7 +341,6 @@ } } @@ -72,7 +73,7 @@ protected void unloadChunks(BooleanSupplier booleansupplier) { GameProfilerFiller gameprofilerfiller = this.world.getMethodProfiler(); -@@ -350,7 +378,7 @@ +@@ -350,7 +379,7 @@ private void a(long i, PlayerChunk playerchunk) { CompletableFuture completablefuture = playerchunk.getChunkSave(); @@ -81,7 +82,7 @@ CompletableFuture completablefuture1 = playerchunk.getChunkSave(); if (completablefuture1 != completablefuture) { -@@ -572,8 +600,15 @@ +@@ -572,8 +601,15 @@ while (iterator.hasNext()) { Entity entity = (Entity) iterator.next(); @@ -98,7 +99,7 @@ if (list == null) { list = Lists.newArrayList(new Entity[]{entity}); } else { -@@ -784,7 +819,8 @@ +@@ -784,7 +820,8 @@ return ichunkaccess instanceof Chunk ? Optional.of((Chunk) ichunkaccess) : Optional.empty(); }); @@ -108,7 +109,7 @@ return Stream.of(chunk.getEntitySlices()).mapToInt(EntitySlice::size).sum(); }).orElse(0), optional1.map((chunk) -> { return chunk.getTileEntities().size(); -@@ -795,7 +831,7 @@ +@@ -795,7 +832,7 @@ private static String a(CompletableFuture> completablefuture) { try { @@ -117,7 +118,7 @@ return either != null ? (String) either.map((chunk) -> { return "done"; -@@ -813,7 +849,7 @@ +@@ -813,7 +850,7 @@ private NBTTagCompound readChunkData(ChunkCoordIntPair chunkcoordintpair) throws IOException { NBTTagCompound nbttagcompound = this.read(chunkcoordintpair); @@ -126,7 +127,7 @@ } boolean isOutsideOfRange(ChunkCoordIntPair chunkcoordintpair) { -@@ -1145,7 +1181,7 @@ +@@ -1145,7 +1182,7 @@ public final Set trackedPlayers = Sets.newHashSet(); public EntityTracker(Entity entity, int i, int j, boolean flag) { @@ -135,7 +136,7 @@ this.tracker = entity; this.trackingDistance = i; this.e = SectionPosition.a(entity); -@@ -1198,7 +1234,7 @@ +@@ -1198,7 +1235,7 @@ public void updatePlayer(EntityPlayer entityplayer) { if (entityplayer != this.tracker) { @@ -144,7 +145,7 @@ int i = Math.min(this.b(), (PlayerChunkMap.this.viewDistance - 1) * 16); boolean flag = vec3d.x >= (double) (-i) && vec3d.x <= (double) i && vec3d.z >= (double) (-i) && vec3d.z <= (double) i && this.tracker.a(entityplayer); -@@ -1214,6 +1250,17 @@ +@@ -1214,6 +1251,17 @@ } } diff --git a/nms-patches/PlayerInteractManager.patch b/nms-patches/PlayerInteractManager.patch index 291a0126d..9f3df6c0c 100644 --- a/nms-patches/PlayerInteractManager.patch +++ b/nms-patches/PlayerInteractManager.patch @@ -1,9 +1,9 @@ --- a/net/minecraft/server/PlayerInteractManager.java +++ b/net/minecraft/server/PlayerInteractManager.java -@@ -3,6 +3,15 @@ - import java.util.Objects; +@@ -4,6 +4,16 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; + +// CraftBukkit start +import java.util.ArrayList; +import org.bukkit.craftbukkit.block.CraftBlock; @@ -13,10 +13,11 @@ +import org.bukkit.event.block.Action; +import org.bukkit.event.player.PlayerInteractEvent; +// CraftBukkit end - ++ public class PlayerInteractManager { -@@ -38,7 +47,7 @@ + private static final Logger LOGGER = LogManager.getLogger(); +@@ -38,7 +48,7 @@ this.gamemode = enumgamemode; enumgamemode.a(this.player.abilities); this.player.updateAbilities(); @@ -25,7 +26,7 @@ this.world.everyoneSleeping(); } -@@ -67,7 +76,7 @@ +@@ -67,7 +77,7 @@ } public void a() { @@ -34,7 +35,7 @@ IBlockData iblockdata; if (this.j) { -@@ -123,9 +132,31 @@ +@@ -123,9 +133,31 @@ if (packetplayinblockdig_enumplayerdigtype == PacketPlayInBlockDig.EnumPlayerDigType.START_DESTROY_BLOCK) { if (!this.world.a((EntityHuman) this.player, blockposition)) { @@ -66,7 +67,7 @@ if (this.isCreative()) { this.a(blockposition, packetplayinblockdig_enumplayerdigtype, "creative destroy"); -@@ -141,11 +172,43 @@ +@@ -141,11 +173,43 @@ float f = 1.0F; iblockdata = this.world.getType(blockposition); @@ -111,7 +112,7 @@ if (!iblockdata.isAir() && f >= 1.0F) { this.a(blockposition, packetplayinblockdig_enumplayerdigtype, "insta mine"); } else { -@@ -189,7 +252,7 @@ +@@ -189,7 +253,7 @@ } else if (packetplayinblockdig_enumplayerdigtype == PacketPlayInBlockDig.EnumPlayerDigType.ABORT_DESTROY_BLOCK) { this.f = false; if (!Objects.equals(this.h, blockposition)) { @@ -120,7 +121,7 @@ this.world.a(this.player.getId(), this.h, -1); this.player.playerConnection.sendPacket(new PacketPlayOutBlockBreak(this.h, this.world.getType(this.h), packetplayinblockdig_enumplayerdigtype, true, "aborted mismatched destroying")); } -@@ -205,17 +268,73 @@ +@@ -205,17 +269,73 @@ if (this.breakBlock(blockposition)) { this.player.playerConnection.sendPacket(new PacketPlayOutBlockBreak(blockposition, this.world.getType(blockposition), packetplayinblockdig_enumplayerdigtype, true, s)); } else { @@ -196,7 +197,7 @@ TileEntity tileentity = this.world.getTileEntity(blockposition); Block block = iblockdata.getBlock(); -@@ -225,6 +344,10 @@ +@@ -225,6 +345,10 @@ } else if (this.player.a((World) this.world, blockposition, this.gamemode)) { return false; } else { @@ -207,7 +208,7 @@ block.a((World) this.world, blockposition, iblockdata, (EntityHuman) this.player); boolean flag = this.world.a(blockposition, false); -@@ -233,19 +356,32 @@ +@@ -233,19 +357,32 @@ } if (this.isCreative()) { @@ -243,7 +244,7 @@ } } } -@@ -287,12 +423,46 @@ +@@ -287,12 +424,46 @@ } } @@ -290,7 +291,7 @@ if (itileinventory != null) { entityplayer.openContainer(itileinventory); -@@ -306,7 +476,7 @@ +@@ -306,7 +477,7 @@ ItemStack itemstack1 = itemstack.cloneItemStack(); if (!flag1) { @@ -299,7 +300,7 @@ if (enuminteractionresult.a()) { CriterionTriggers.M.a(entityplayer, blockposition, itemstack1); -@@ -314,17 +484,17 @@ +@@ -314,17 +485,17 @@ } } @@ -320,7 +321,7 @@ } if (enuminteractionresult1.a()) { -@@ -332,10 +502,10 @@ +@@ -332,10 +503,10 @@ } return enuminteractionresult1; diff --git a/nms-patches/PlayerList.patch b/nms-patches/PlayerList.patch index 61d14b6da..f0d4dc5e4 100644 --- a/nms-patches/PlayerList.patch +++ b/nms-patches/PlayerList.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/server/PlayerList.java +++ b/net/minecraft/server/PlayerList.java -@@ -21,6 +21,27 @@ +@@ -21,6 +21,23 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -11,24 +11,20 @@ +import org.bukkit.craftbukkit.CraftServer; +import org.bukkit.craftbukkit.CraftWorld; + -+import org.bukkit.Bukkit; +import org.bukkit.Location; +import org.bukkit.craftbukkit.util.CraftChatMessage; +import org.bukkit.entity.Player; +import org.bukkit.event.player.PlayerChangedWorldEvent; -+import org.bukkit.event.player.PlayerPortalEvent; +import org.bukkit.event.player.PlayerJoinEvent; +import org.bukkit.event.player.PlayerLoginEvent; +import org.bukkit.event.player.PlayerQuitEvent; +import org.bukkit.event.player.PlayerRespawnEvent; -+import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; -+import org.bukkit.util.Vector; +// CraftBukkit end + public abstract class PlayerList { public static final File b = new File("banned-players.json"); -@@ -30,14 +51,16 @@ +@@ -30,14 +47,16 @@ private static final Logger LOGGER = LogManager.getLogger(); private static final SimpleDateFormat g = new SimpleDateFormat("yyyy-MM-dd 'at' HH:mm:ss z"); private final MinecraftServer server; @@ -48,7 +44,7 @@ public final WorldNBTStorage playerFileData; private boolean hasWhitelist; private final IRegistryCustom.Dimension s; -@@ -47,13 +70,23 @@ +@@ -47,13 +66,23 @@ private boolean v; private int w; @@ -74,7 +70,7 @@ this.server = minecraftserver; this.s = iregistrycustom_dimension; this.maxPlayers = i; -@@ -69,6 +102,12 @@ +@@ -69,6 +98,12 @@ usercache.a(gameprofile); NBTTagCompound nbttagcompound = this.a(entityplayer); ResourceKey resourcekey; @@ -87,7 +83,7 @@ if (nbttagcompound != null) { DataResult dataresult = DimensionManager.a(new Dynamic(DynamicOpsNBT.a, nbttagcompound.get("Dimension"))); -@@ -99,7 +138,8 @@ +@@ -99,7 +134,8 @@ s1 = networkmanager.getSocketAddress().toString(); } @@ -97,7 +93,7 @@ WorldData worlddata = worldserver1.getWorldData(); this.a(entityplayer, (EntityPlayer) null, worldserver1); -@@ -109,6 +149,7 @@ +@@ -109,6 +145,7 @@ boolean flag1 = gamerules.getBoolean(GameRules.REDUCED_DEBUG_INFO); playerconnection.sendPacket(new PacketPlayOutLogin(entityplayer.getId(), entityplayer.playerInteractManager.getGameMode(), entityplayer.playerInteractManager.c(), BiomeManager.a(worldserver1.getSeed()), worlddata.isHardcore(), this.server.F(), this.s, worldserver1.getDimensionManager(), worldserver1.getDimensionKey(), this.getMaxPlayers(), this.viewDistance, flag1, !flag, worldserver1.isDebugWorld(), worldserver1.isFlatWorld())); @@ -105,7 +101,7 @@ playerconnection.sendPacket(new PacketPlayOutCustomPayload(PacketPlayOutCustomPayload.a, (new PacketDataSerializer(Unpooled.buffer())).a(this.getServer().getServerModName()))); playerconnection.sendPacket(new PacketPlayOutServerDifficulty(worlddata.getDifficulty(), worlddata.isDifficultyLocked())); playerconnection.sendPacket(new PacketPlayOutAbilities(entityplayer.abilities)); -@@ -127,19 +168,61 @@ +@@ -127,19 +164,61 @@ } else { chatmessage = new ChatMessage("multiplayer.player.joined.renamed", new Object[]{entityplayer.getScoreboardDisplayName(), s}); } @@ -172,7 +168,7 @@ this.a(entityplayer, worldserver1); if (!this.server.getResourcePack().isEmpty()) { entityplayer.setResourcePack(this.server.getResourcePack(), this.server.getResourcePackHash()); -@@ -155,8 +238,11 @@ +@@ -155,8 +234,11 @@ if (nbttagcompound != null && nbttagcompound.hasKeyOfType("RootVehicle", 10)) { NBTTagCompound nbttagcompound1 = nbttagcompound.getCompound("RootVehicle"); @@ -186,7 +182,7 @@ }); if (entity != null) { -@@ -199,6 +285,8 @@ +@@ -199,6 +281,8 @@ } entityplayer.syncInventory(); @@ -195,7 +191,7 @@ } public void sendScoreboard(ScoreboardServer scoreboardserver, EntityPlayer entityplayer) { -@@ -231,30 +319,31 @@ +@@ -231,30 +315,31 @@ } public void setPlayerFileData(WorldServer worldserver) { @@ -232,7 +228,7 @@ } @Override -@@ -282,14 +371,15 @@ +@@ -282,14 +367,15 @@ } protected void savePlayerFile(EntityPlayer entityplayer) { @@ -250,7 +246,7 @@ if (advancementdataplayer != null) { advancementdataplayer.b(); -@@ -297,10 +387,24 @@ +@@ -297,10 +383,24 @@ } @@ -276,7 +272,7 @@ this.savePlayerFile(entityplayer); if (entityplayer.isPassenger()) { Entity entity = entityplayer.getRootVehicle(); -@@ -332,18 +436,66 @@ +@@ -332,18 +432,66 @@ if (entityplayer1 == entityplayer) { this.j.remove(uuid); @@ -349,7 +345,7 @@ GameProfileBanEntry gameprofilebanentry = (GameProfileBanEntry) this.k.get(gameprofile); chatmessage = new ChatMessage("multiplayer.disconnect.banned.reason", new Object[]{gameprofilebanentry.getReason()}); -@@ -351,10 +503,12 @@ +@@ -351,10 +499,12 @@ chatmessage.addSibling(new ChatMessage("multiplayer.disconnect.banned.expiration", new Object[]{PlayerList.g.format(gameprofilebanentry.getExpires())})); } @@ -365,7 +361,7 @@ IpBanEntry ipbanentry = this.l.get(socketaddress); chatmessage = new ChatMessage("multiplayer.disconnect.banned_ip.reason", new Object[]{ipbanentry.getReason()}); -@@ -362,13 +516,25 @@ +@@ -362,13 +512,25 @@ chatmessage.addSibling(new ChatMessage("multiplayer.disconnect.banned_ip.expiration", new Object[]{PlayerList.g.format(ipbanentry.getExpires())})); } @@ -394,7 +390,7 @@ UUID uuid = EntityHuman.a(gameprofile); List list = Lists.newArrayList(); -@@ -404,14 +570,24 @@ +@@ -404,14 +566,24 @@ } return new EntityPlayer(this.server, worldserver, gameprofile, (PlayerInteractManager) object); @@ -419,7 +415,7 @@ WorldServer worldserver = this.server.getWorldServer(entityplayer.getSpawnDimension()); Optional optional; -@@ -431,6 +607,11 @@ +@@ -431,6 +603,11 @@ } EntityPlayer entityplayer1 = new EntityPlayer(this.server, worldserver1, entityplayer.getProfile(), (PlayerInteractManager) object); @@ -431,7 +427,7 @@ entityplayer1.playerConnection = entityplayer.playerConnection; entityplayer1.copyFrom(entityplayer, flag); -@@ -444,52 +625,113 @@ +@@ -444,52 +621,113 @@ entityplayer1.addScoreboardTag(s); } @@ -570,7 +566,7 @@ return entityplayer1; } -@@ -502,7 +744,18 @@ +@@ -502,7 +740,18 @@ public void tick() { if (++this.w > 600) { @@ -590,7 +586,7 @@ this.w = 0; } -@@ -515,6 +768,25 @@ +@@ -515,6 +764,25 @@ } @@ -616,7 +612,7 @@ public void a(Packet packet, ResourceKey resourcekey) { for (int i = 0; i < this.players.size(); ++i) { EntityPlayer entityplayer = (EntityPlayer) this.players.get(i); -@@ -615,6 +887,7 @@ +@@ -615,6 +883,7 @@ entityplayer.playerConnection.sendPacket(new PacketPlayOutEntityStatus(entityplayer, b0)); } @@ -624,7 +620,7 @@ this.server.getCommandDispatcher().a(entityplayer); } -@@ -647,6 +920,12 @@ +@@ -647,6 +916,12 @@ for (int i = 0; i < this.players.size(); ++i) { EntityPlayer entityplayer = (EntityPlayer) this.players.get(i); @@ -637,7 +633,7 @@ if (entityplayer != entityhuman && entityplayer.world.getDimensionKey() == resourcekey) { double d4 = d0 - entityplayer.locX(); double d5 = d1 - entityplayer.locY(); -@@ -686,23 +965,34 @@ +@@ -686,23 +961,34 @@ public void reloadWhitelist() {} public void a(EntityPlayer entityplayer, WorldServer worldserver) { @@ -677,7 +673,7 @@ } public int getPlayerCount() { -@@ -755,31 +1045,54 @@ +@@ -755,31 +1041,54 @@ entityplayer.playerInteractManager.a(this.u, EnumGamemode.NOT_SET); } @@ -740,7 +736,7 @@ if (file2.exists() && file2.isFile()) { file2.renameTo(file1); -@@ -787,7 +1100,7 @@ +@@ -787,7 +1096,7 @@ } serverstatisticmanager = new ServerStatisticManager(this.server, file1); @@ -749,7 +745,7 @@ } return serverstatisticmanager; -@@ -795,14 +1108,14 @@ +@@ -795,14 +1104,14 @@ public AdvancementDataPlayer f(EntityPlayer entityplayer) { UUID uuid = entityplayer.getUniqueID(); @@ -766,7 +762,7 @@ } advancementdataplayer.a(entityplayer); -@@ -838,13 +1151,20 @@ +@@ -838,13 +1147,20 @@ } public void reload() { diff --git a/nms-patches/RecipeBookServer.patch b/nms-patches/RecipeBookServer.patch index e298e422d..1f5cd10e3 100644 --- a/nms-patches/RecipeBookServer.patch +++ b/nms-patches/RecipeBookServer.patch @@ -1,14 +1,15 @@ --- a/net/minecraft/server/RecipeBookServer.java +++ b/net/minecraft/server/RecipeBookServer.java -@@ -9,6 +9,7 @@ - import java.util.function.Consumer; +@@ -10,6 +10,8 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -+import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit ++import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit ++ public class RecipeBookServer extends RecipeBook { -@@ -25,7 +26,7 @@ + private static final Logger LOGGER = LogManager.getLogger(); +@@ -25,7 +27,7 @@ IRecipe irecipe = (IRecipe) iterator.next(); MinecraftKey minecraftkey = irecipe.getKey(); @@ -17,7 +18,7 @@ this.a(minecraftkey); this.d(minecraftkey); list.add(minecraftkey); -@@ -59,6 +60,7 @@ +@@ -59,6 +61,7 @@ } private void a(PacketPlayOutRecipes.Action packetplayoutrecipes_action, EntityPlayer entityplayer, List list) { diff --git a/nms-patches/RecipeSmithing.patch b/nms-patches/RecipeSmithing.patch index ee4bce034..09955e723 100644 --- a/nms-patches/RecipeSmithing.patch +++ b/nms-patches/RecipeSmithing.patch @@ -1,9 +1,9 @@ --- a/net/minecraft/server/RecipeSmithing.java +++ b/net/minecraft/server/RecipeSmithing.java -@@ -2,6 +2,13 @@ - +@@ -3,6 +3,14 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; + +// CraftBukkit start +import org.bukkit.craftbukkit.inventory.CraftItemStack; +import org.bukkit.craftbukkit.inventory.CraftRecipe; @@ -11,10 +11,11 @@ +import org.bukkit.craftbukkit.util.CraftNamespacedKey; +import org.bukkit.inventory.Recipe; +// CraftBukkit end - ++ public class RecipeSmithing implements IRecipe { -@@ -58,6 +65,17 @@ + private final RecipeItemStack a; +@@ -58,6 +66,17 @@ return Recipes.SMITHING; } diff --git a/nms-patches/ShapedRecipes.patch b/nms-patches/ShapedRecipes.patch index a70f52a90..e7c698880 100644 --- a/nms-patches/ShapedRecipes.patch +++ b/nms-patches/ShapedRecipes.patch @@ -1,22 +1,20 @@ --- a/net/minecraft/server/ShapedRecipes.java +++ b/net/minecraft/server/ShapedRecipes.java -@@ -12,6 +12,15 @@ - import java.util.Map; +@@ -13,6 +13,13 @@ import java.util.Map.Entry; import java.util.Set; + +// CraftBukkit start -+import java.util.ArrayList; -+import java.util.List; +import org.bukkit.craftbukkit.inventory.CraftItemStack; +import org.bukkit.craftbukkit.inventory.CraftRecipe; +import org.bukkit.craftbukkit.inventory.CraftShapedRecipe; -+import org.bukkit.craftbukkit.util.CraftMagicNumbers; +import org.bukkit.inventory.RecipeChoice; +// CraftBukkit end - ++ public class ShapedRecipes implements RecipeCrafting { -@@ -31,6 +40,66 @@ + private final int width; +@@ -31,6 +38,66 @@ this.result = itemstack; } diff --git a/nms-patches/ShapelessRecipes.patch b/nms-patches/ShapelessRecipes.patch index 640ab8ed8..7d59fd42c 100644 --- a/nms-patches/ShapelessRecipes.patch +++ b/nms-patches/ShapelessRecipes.patch @@ -1,18 +1,19 @@ --- a/net/minecraft/server/ShapelessRecipes.java +++ b/net/minecraft/server/ShapelessRecipes.java -@@ -5,6 +5,11 @@ - import com.google.gson.JsonParseException; +@@ -6,6 +6,12 @@ import it.unimi.dsi.fastutil.ints.IntList; import java.util.Iterator; + +// CraftBukkit start +import org.bukkit.craftbukkit.inventory.CraftItemStack; +import org.bukkit.craftbukkit.inventory.CraftRecipe; +import org.bukkit.craftbukkit.inventory.CraftShapelessRecipe; +// CraftBukkit end - ++ public class ShapelessRecipes implements RecipeCrafting { -@@ -20,6 +25,20 @@ + private final MinecraftKey key; +@@ -20,6 +26,20 @@ this.ingredients = nonnulllist; } diff --git a/nms-patches/TileEntity.patch b/nms-patches/TileEntity.patch index 5d018c7cb..02fa490c3 100644 --- a/nms-patches/TileEntity.patch +++ b/nms-patches/TileEntity.patch @@ -1,15 +1,15 @@ --- a/net/minecraft/server/TileEntity.java +++ b/net/minecraft/server/TileEntity.java -@@ -4,9 +4,18 @@ - import org.apache.logging.log4j.LogManager; +@@ -5,8 +5,18 @@ import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.util.Supplier; + +// CraftBukkit start +import org.bukkit.craftbukkit.persistence.CraftPersistentDataContainer; +import org.bukkit.craftbukkit.persistence.CraftPersistentDataTypeRegistry; +import org.bukkit.inventory.InventoryHolder; +// CraftBukkit end - ++ public abstract class TileEntity { + // CraftBukkit start - data containers @@ -19,7 +19,7 @@ private static final Logger LOGGER = LogManager.getLogger(); private final TileEntityTypes tileType; @Nullable -@@ -38,6 +47,14 @@ +@@ -38,6 +48,14 @@ public void load(IBlockData iblockdata, NBTTagCompound nbttagcompound) { this.position = new BlockPosition(nbttagcompound.getInt("x"), nbttagcompound.getInt("y"), nbttagcompound.getInt("z")); @@ -34,7 +34,7 @@ } public NBTTagCompound save(NBTTagCompound nbttagcompound) { -@@ -54,6 +71,11 @@ +@@ -54,6 +72,11 @@ nbttagcompound.setInt("x", this.position.getX()); nbttagcompound.setInt("y", this.position.getY()); nbttagcompound.setInt("z", this.position.getZ()); @@ -46,7 +46,7 @@ return nbttagcompound; } } -@@ -169,4 +191,13 @@ +@@ -169,4 +192,13 @@ }, this::getPosition}); } } diff --git a/nms-patches/TileEntityBarrel.patch b/nms-patches/TileEntityBarrel.patch index a5779db1f..33e51f722 100644 --- a/nms-patches/TileEntityBarrel.patch +++ b/nms-patches/TileEntityBarrel.patch @@ -1,19 +1,13 @@ --- a/net/minecraft/server/TileEntityBarrel.java +++ b/net/minecraft/server/TileEntityBarrel.java -@@ -1,7 +1,55 @@ +@@ -1,7 +1,49 @@ package net.minecraft.server; +// CraftBukkit start +import java.util.ArrayList; -+import java.util.Arrays; +import java.util.List; -+import org.bukkit.Location; -+import org.bukkit.block.Barrel; -+import org.bukkit.block.Lectern; -+import org.bukkit.craftbukkit.block.CraftBlock; +import org.bukkit.craftbukkit.entity.CraftHumanEntity; +import org.bukkit.entity.HumanEntity; -+import org.bukkit.inventory.InventoryHolder; +// CraftBukkit end + public class TileEntityBarrel extends TileEntityLootable { @@ -56,7 +50,7 @@ private NonNullList items; private int b; -@@ -100,7 +148,7 @@ +@@ -100,7 +142,7 @@ return; } diff --git a/nms-patches/TileEntityBeacon.patch b/nms-patches/TileEntityBeacon.patch index 9c8369c37..7e21b75f4 100644 --- a/nms-patches/TileEntityBeacon.patch +++ b/nms-patches/TileEntityBeacon.patch @@ -1,20 +1,18 @@ --- a/net/minecraft/server/TileEntityBeacon.java +++ b/net/minecraft/server/TileEntityBeacon.java -@@ -8,6 +8,13 @@ +@@ -8,6 +8,11 @@ import java.util.stream.Collectors; import javax.annotation.Nullable; +// CraftBukkit start -+import org.bukkit.craftbukkit.entity.CraftHumanEntity; +import org.bukkit.craftbukkit.potion.CraftPotionUtil; -+import org.bukkit.entity.HumanEntity; +import org.bukkit.potion.PotionEffect; +// CraftBukkit end + public class TileEntityBeacon extends TileEntity implements ITileInventory, ITickable { public static final MobEffectList[][] a = new MobEffectList[][]{{MobEffects.FASTER_MOVEMENT, MobEffects.FASTER_DIG}, {MobEffects.RESISTANCE, MobEffects.JUMP}, {MobEffects.INCREASE_DAMAGE}, {MobEffects.REGENERATION}}; -@@ -24,6 +31,15 @@ +@@ -24,6 +29,15 @@ public IChatBaseComponent customName; public ChestLock chestLock; private final IContainerProperties containerProperties; @@ -30,7 +28,7 @@ public TileEntityBeacon() { super(TileEntityTypes.BEACON); -@@ -192,39 +208,78 @@ +@@ -192,39 +206,78 @@ super.al_(); } @@ -119,7 +117,7 @@ public void a(SoundEffect soundeffect) { this.world.playSound((EntityHuman) null, this.position, soundeffect, SoundCategory.BLOCKS, 1.0F, 1.0F); } -@@ -254,8 +309,11 @@ +@@ -254,8 +307,11 @@ @Override public void load(IBlockData iblockdata, NBTTagCompound nbttagcompound) { super.load(iblockdata, nbttagcompound); diff --git a/nms-patches/TileEntityCampfire.patch b/nms-patches/TileEntityCampfire.patch index 6d4544a9d..3c5707e62 100644 --- a/nms-patches/TileEntityCampfire.patch +++ b/nms-patches/TileEntityCampfire.patch @@ -1,18 +1,19 @@ --- a/net/minecraft/server/TileEntityCampfire.java +++ b/net/minecraft/server/TileEntityCampfire.java -@@ -3,6 +3,11 @@ - import java.util.Optional; +@@ -4,6 +4,12 @@ import java.util.Random; import javax.annotation.Nullable; + +// CraftBukkit start +import org.bukkit.craftbukkit.block.CraftBlock; +import org.bukkit.craftbukkit.inventory.CraftItemStack; +import org.bukkit.event.block.BlockCookEvent; +// CraftBukkit end - ++ public class TileEntityCampfire extends TileEntity implements Clearable, ITickable { -@@ -55,6 +60,20 @@ + private final NonNullList items; +@@ -55,6 +61,20 @@ }).orElse(itemstack); BlockPosition blockposition = this.getPosition(); diff --git a/nms-patches/TileEntityChest.patch b/nms-patches/TileEntityChest.patch index 31ada4dcb..472afa044 100644 --- a/nms-patches/TileEntityChest.patch +++ b/nms-patches/TileEntityChest.patch @@ -1,17 +1,18 @@ --- a/net/minecraft/server/TileEntityChest.java +++ b/net/minecraft/server/TileEntityChest.java -@@ -2,6 +2,10 @@ - +@@ -3,6 +3,11 @@ import java.util.Iterator; import java.util.List; + +// CraftBukkit start +import org.bukkit.craftbukkit.entity.CraftHumanEntity; +import org.bukkit.entity.HumanEntity; +// CraftBukkit end - ++ public class TileEntityChest extends TileEntityLootable implements ITickable { -@@ -11,6 +15,37 @@ + private NonNullList items; +@@ -11,6 +16,37 @@ public int viewingCount; private int j; @@ -49,7 +50,7 @@ protected TileEntityChest(TileEntityTypes tileentitytypes) { super(tileentitytypes); this.items = NonNullList.a(27, ItemStack.b); -@@ -61,6 +96,13 @@ +@@ -61,6 +97,13 @@ this.b = this.a; float f = 0.1F; @@ -63,7 +64,7 @@ if (this.viewingCount > 0 && this.a == 0.0F) { this.playOpenSound(SoundEffects.BLOCK_CHEST_OPEN); } -@@ -155,8 +197,20 @@ +@@ -155,8 +198,20 @@ if (this.viewingCount < 0) { this.viewingCount = 0; } @@ -84,7 +85,7 @@ this.onOpen(); } -@@ -165,7 +219,18 @@ +@@ -165,7 +220,18 @@ @Override public void closeContainer(EntityHuman entityhuman) { if (!entityhuman.isSpectator()) { @@ -103,7 +104,7 @@ this.onOpen(); } -@@ -175,7 +240,7 @@ +@@ -175,7 +241,7 @@ Block block = this.getBlock().getBlock(); if (block instanceof BlockChest) { @@ -112,7 +113,7 @@ this.world.applyPhysics(this.position, block); } -@@ -216,4 +281,11 @@ +@@ -216,4 +282,11 @@ protected Container createContainer(int i, PlayerInventory playerinventory) { return ContainerChest.a(i, playerinventory, this); } diff --git a/nms-patches/TileEntityConduit.patch b/nms-patches/TileEntityConduit.patch index a8f6df069..28ce81948 100644 --- a/nms-patches/TileEntityConduit.patch +++ b/nms-patches/TileEntityConduit.patch @@ -1,17 +1,18 @@ --- a/net/minecraft/server/TileEntityConduit.java +++ b/net/minecraft/server/TileEntityConduit.java -@@ -6,6 +6,10 @@ - import java.util.Random; +@@ -7,6 +7,11 @@ import java.util.UUID; import javax.annotation.Nullable; + +// CraftBukkit start +import org.bukkit.craftbukkit.block.CraftBlock; +import org.bukkit.craftbukkit.event.CraftEventFactory; +// CraftBukkit end - ++ public class TileEntityConduit extends TileEntity implements ITickable { -@@ -158,7 +162,7 @@ + private static final Block[] b = new Block[]{Blocks.PRISMARINE, Blocks.PRISMARINE_BRICKS, Blocks.SEA_LANTERN, Blocks.DARK_PRISMARINE}; +@@ -158,7 +163,7 @@ EntityHuman entityhuman = (EntityHuman) iterator.next(); if (this.position.a((BaseBlockPosition) entityhuman.getChunkCoordinates(), (double) j) && entityhuman.isInWaterOrRain()) { @@ -20,7 +21,7 @@ } } -@@ -175,7 +179,7 @@ +@@ -175,7 +180,7 @@ this.target = this.x(); this.k = null; } else if (this.target == null) { @@ -29,7 +30,7 @@ return entityliving1 instanceof IMonster && entityliving1.isInWaterOrRain(); }); -@@ -187,8 +191,13 @@ +@@ -187,8 +192,13 @@ } if (this.target != null) { @@ -45,7 +46,7 @@ } if (entityliving != this.target) { -@@ -221,7 +230,7 @@ +@@ -221,7 +231,7 @@ @Nullable private EntityLiving x() { diff --git a/nms-patches/TileEntityDispenser.patch b/nms-patches/TileEntityDispenser.patch index 50809c3ac..713cfd14d 100644 --- a/nms-patches/TileEntityDispenser.patch +++ b/nms-patches/TileEntityDispenser.patch @@ -1,16 +1,16 @@ --- a/net/minecraft/server/TileEntityDispenser.java +++ b/net/minecraft/server/TileEntityDispenser.java -@@ -1,12 +1,48 @@ - package net.minecraft.server; +@@ -2,11 +2,48 @@ import java.util.Random; + +// CraftBukkit start +import java.util.List; + +import org.bukkit.craftbukkit.entity.CraftHumanEntity; +import org.bukkit.entity.HumanEntity; +// CraftBukkit end - ++ public class TileEntityDispenser extends TileEntityLootable { private static final Random a = new Random(); diff --git a/nms-patches/TileEntityEndGateway.patch b/nms-patches/TileEntityEndGateway.patch index ea941e144..eab984a8b 100644 --- a/nms-patches/TileEntityEndGateway.patch +++ b/nms-patches/TileEntityEndGateway.patch @@ -1,19 +1,20 @@ --- a/net/minecraft/server/TileEntityEndGateway.java +++ b/net/minecraft/server/TileEntityEndGateway.java -@@ -6,6 +6,12 @@ - import javax.annotation.Nullable; +@@ -7,6 +7,13 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; + +// CraftBukkit start +import org.bukkit.Bukkit; +import org.bukkit.Location; +import org.bukkit.craftbukkit.entity.CraftPlayer; +import org.bukkit.event.player.PlayerTeleportEvent; +// CraftBukkit end - ++ public class TileEntityEndGateway extends TileEntityEnderPortal implements ITickable { -@@ -117,7 +123,7 @@ + private static final Logger LOGGER = LogManager.getLogger(); +@@ -117,7 +124,7 @@ public void b(Entity entity) { if (this.world instanceof WorldServer && !this.f()) { this.c = 100; @@ -22,7 +23,7 @@ this.a((WorldServer) this.world); } -@@ -142,6 +148,27 @@ +@@ -142,6 +149,27 @@ entity1 = entity.getRootVehicle(); } @@ -50,7 +51,7 @@ entity1.resetPortalCooldown(); entity1.enderTeleportAndLoad((double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D); } -@@ -246,7 +273,7 @@ +@@ -246,7 +274,7 @@ } private void a(WorldServer worldserver, BlockPosition blockposition) { diff --git a/nms-patches/TileEntityFurnace.patch b/nms-patches/TileEntityFurnace.patch index 16d3e3aa1..7d941a262 100644 --- a/nms-patches/TileEntityFurnace.patch +++ b/nms-patches/TileEntityFurnace.patch @@ -1,9 +1,9 @@ --- a/net/minecraft/server/TileEntityFurnace.java +++ b/net/minecraft/server/TileEntityFurnace.java -@@ -9,6 +9,16 @@ - import java.util.List; +@@ -10,6 +10,17 @@ import java.util.Map; import javax.annotation.Nullable; + +// CraftBukkit start +import org.bukkit.craftbukkit.block.CraftBlock; +import org.bukkit.craftbukkit.entity.CraftHumanEntity; @@ -14,10 +14,11 @@ +import org.bukkit.event.inventory.FurnaceExtractEvent; +import org.bukkit.event.inventory.FurnaceSmeltEvent; +// CraftBukkit end - ++ public abstract class TileEntityFurnace extends TileEntityContainer implements IWorldInventory, RecipeHolder, AutoRecipeOutput, ITickable { -@@ -137,6 +147,36 @@ + private static final int[] g = new int[]{0}; +@@ -137,6 +148,36 @@ return map; } @@ -54,7 +55,7 @@ private static boolean b(Item item) { return TagsItem.NON_FLAMMABLE_WOOD.isTagged(item); } -@@ -223,12 +263,23 @@ +@@ -223,12 +264,23 @@ this.cookTime = MathHelper.clamp(this.cookTime - 2, 0, this.cookTimeTotal); } } else { @@ -81,7 +82,7 @@ flag1 = true; if (!itemstack.isEmpty()) { Item item = itemstack.getItem(); -@@ -290,11 +341,38 @@ +@@ -290,11 +342,38 @@ ItemStack itemstack1 = irecipe.getResult(); ItemStack itemstack2 = (ItemStack) this.items.get(2); @@ -120,7 +121,7 @@ if (!this.world.isClientSide) { this.a(irecipe); -@@ -319,7 +397,7 @@ +@@ -319,7 +398,7 @@ } protected int getRecipeCookingTime() { @@ -129,7 +130,7 @@ } public static boolean isFuel(ItemStack itemstack) { -@@ -446,14 +524,20 @@ +@@ -446,14 +525,20 @@ @Override public void b(EntityHuman entityhuman) {} @@ -152,7 +153,7 @@ List> list = Lists.newArrayList(); ObjectIterator objectiterator = this.n.object2IntEntrySet().iterator(); -@@ -462,14 +546,14 @@ +@@ -462,14 +547,14 @@ world.getCraftingManager().getRecipe((MinecraftKey) entry.getKey()).ifPresent((irecipe) -> { list.add(irecipe); @@ -169,7 +170,7 @@ int j = MathHelper.d((float) i * f); float f1 = MathHelper.h((float) i * f); -@@ -477,6 +561,14 @@ +@@ -477,6 +562,14 @@ ++j; } diff --git a/nms-patches/TileEntityLectern.patch b/nms-patches/TileEntityLectern.patch index 81e58e9cd..bf78093c0 100644 --- a/nms-patches/TileEntityLectern.patch +++ b/nms-patches/TileEntityLectern.patch @@ -1,9 +1,10 @@ --- a/net/minecraft/server/TileEntityLectern.java +++ b/net/minecraft/server/TileEntityLectern.java -@@ -1,10 +1,64 @@ - package net.minecraft.server; +@@ -2,9 +2,63 @@ import javax.annotation.Nullable; + +-public class TileEntityLectern extends TileEntity implements Clearable, ITileInventory { +// CraftBukkit start +import java.util.ArrayList; +import java.util.Arrays; @@ -11,13 +12,11 @@ +import java.util.UUID; +import org.bukkit.Location; +import org.bukkit.block.Lectern; -+import org.bukkit.craftbukkit.block.CraftBlock; +import org.bukkit.craftbukkit.entity.CraftHumanEntity; +import org.bukkit.entity.HumanEntity; +import org.bukkit.inventory.InventoryHolder; +// CraftBukkit end - --public class TileEntityLectern extends TileEntity implements Clearable, ITileInventory { ++ +public class TileEntityLectern extends TileEntity implements Clearable, ITileInventory, ICommandListener { // CraftBukkit - ICommandListener + + // CraftBukkit start - add fields and methods diff --git a/nms-patches/TileEntityShulkerBox.patch b/nms-patches/TileEntityShulkerBox.patch index cc7d9da15..aedaf4311 100644 --- a/nms-patches/TileEntityShulkerBox.patch +++ b/nms-patches/TileEntityShulkerBox.patch @@ -1,17 +1,18 @@ --- a/net/minecraft/server/TileEntityShulkerBox.java +++ b/net/minecraft/server/TileEntityShulkerBox.java -@@ -3,6 +3,10 @@ - import java.util.List; +@@ -4,6 +4,11 @@ import java.util.stream.IntStream; import javax.annotation.Nullable; + +// CraftBukkit start +import org.bukkit.craftbukkit.entity.CraftHumanEntity; +import org.bukkit.entity.HumanEntity; +// CraftBukkit end - ++ public class TileEntityShulkerBox extends TileEntityLootable implements IWorldInventory, ITickable { -@@ -16,6 +20,37 @@ + private static final int[] a = IntStream.range(0, 27).toArray(); +@@ -16,6 +21,37 @@ private EnumColor l; private boolean m; @@ -49,7 +50,7 @@ public TileEntityShulkerBox(@Nullable EnumColor enumcolor) { super(TileEntityTypes.SHULKER_BOX); this.contents = NonNullList.a(27, ItemStack.b); -@@ -178,6 +213,7 @@ +@@ -178,6 +214,7 @@ } ++this.viewingCount; @@ -57,7 +58,7 @@ this.world.playBlockAction(this.position, this.getBlock().getBlock(), 1, this.viewingCount); if (this.viewingCount == 1) { this.world.playSound((EntityHuman) null, this.position, SoundEffects.BLOCK_SHULKER_BOX_OPEN, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F); -@@ -190,6 +226,7 @@ +@@ -190,6 +227,7 @@ public void closeContainer(EntityHuman entityhuman) { if (!entityhuman.isSpectator()) { --this.viewingCount; diff --git a/nms-patches/TileEntitySign.patch b/nms-patches/TileEntitySign.patch index 98d3e253c..096e174a3 100644 --- a/nms-patches/TileEntitySign.patch +++ b/nms-patches/TileEntitySign.patch @@ -1,10 +1,7 @@ --- a/net/minecraft/server/TileEntitySign.java +++ b/net/minecraft/server/TileEntitySign.java -@@ -1,9 +1,10 @@ - package net.minecraft.server; - +@@ -3,7 +3,7 @@ import com.mojang.brigadier.exceptions.CommandSyntaxException; -+import java.util.UUID; import javax.annotation.Nullable; -public class TileEntitySign extends TileEntity { @@ -12,7 +9,7 @@ public final IChatBaseComponent[] lines; public boolean isEditable; -@@ -29,6 +30,12 @@ +@@ -29,6 +29,12 @@ nbttagcompound.setString("Text" + (i + 1), s); } @@ -25,7 +22,7 @@ nbttagcompound.setString("Color", this.color.c()); return nbttagcompound; } -@@ -39,18 +46,38 @@ +@@ -39,18 +45,38 @@ super.load(iblockdata, nbttagcompound); this.color = EnumColor.a(nbttagcompound.getString("Color"), EnumColor.BLACK); @@ -71,13 +68,13 @@ } this.g[i] = null; -@@ -111,11 +138,37 @@ +@@ -111,11 +137,37 @@ return true; } + // CraftBukkit start + @Override -+ public void sendMessage(IChatBaseComponent ichatbasecomponent, UUID uuid) {} ++ public void sendMessage(IChatBaseComponent ichatbasecomponent, java.util.UUID uuid) {} + + @Override + public org.bukkit.command.CommandSender getBukkitSender(CommandListenerWrapper wrapper) { @@ -110,7 +107,7 @@ } public EnumColor getColor() { -@@ -126,7 +179,7 @@ +@@ -126,7 +178,7 @@ if (enumcolor != this.getColor()) { this.color = enumcolor; this.update(); diff --git a/nms-patches/WorldDataServer.patch b/nms-patches/WorldDataServer.patch index 405815e06..525972f34 100644 --- a/nms-patches/WorldDataServer.patch +++ b/nms-patches/WorldDataServer.patch @@ -1,15 +1,15 @@ --- a/net/minecraft/server/WorldDataServer.java +++ b/net/minecraft/server/WorldDataServer.java -@@ -13,11 +13,16 @@ - import javax.annotation.Nullable; +@@ -14,10 +14,16 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; + +// CraftBukkit start +import org.bukkit.Bukkit; +import org.bukkit.event.weather.ThunderChangeEvent; +import org.bukkit.event.weather.WeatherChangeEvent; +// CraftBukkit end - ++ public class WorldDataServer implements IWorldDataServer, SaveData { private static final Logger LOGGER = LogManager.getLogger(); @@ -18,7 +18,7 @@ private final GeneratorSettings c; private final Lifecycle d; private int e; -@@ -51,6 +56,7 @@ +@@ -51,6 +57,7 @@ private final Set C; private boolean D; private final CustomFunctionCallbackTimerQueue E; @@ -26,7 +26,7 @@ private WorldDataServer(@Nullable DataFixer datafixer, int i, @Nullable NBTTagCompound nbttagcompound, boolean flag, int j, int k, int l, float f, long i1, long j1, int k1, int l1, int i2, boolean flag1, int j2, boolean flag2, boolean flag3, boolean flag4, WorldBorder.c worldborder_c, int k2, int l2, @Nullable UUID uuid, LinkedHashSet linkedhashset, CustomFunctionCallbackTimerQueue customfunctioncallbacktimerqueue, @Nullable NBTTagCompound nbttagcompound1, NBTTagCompound nbttagcompound2, WorldSettings worldsettings, GeneratorSettings generatorsettings, Lifecycle lifecycle) { this.k = datafixer; -@@ -94,7 +100,8 @@ +@@ -94,7 +101,8 @@ return (NBTBase) dynamic.get("DimensionData").get("1").get("DragonFight").orElseEmptyMap().getValue(); }); @@ -36,7 +36,7 @@ return SystemUtils.a(dynamic1.asString().result()); }).collect(Collectors.toCollection(Sets::newLinkedHashSet)), new CustomFunctionCallbackTimerQueue<>(CustomFunctionCallbackTimers.a, dynamic.get("ScheduledEvents").asStream()), (NBTTagCompound) dynamic.get("CustomBossEvents").orElseEmptyMap().getValue(), nbttagcompound1, worldsettings, generatorsettings, lifecycle); } -@@ -126,7 +133,7 @@ +@@ -126,7 +134,7 @@ nbttagcompound.set("Version", nbttagcompound2); nbttagcompound.setInt("DataVersion", SharedConstants.getGameVersion().getWorldVersion()); RegistryWriteOps registrywriteops = RegistryWriteOps.a(DynamicOpsNBT.a, iregistrycustom); @@ -45,7 +45,7 @@ Logger logger = WorldDataServer.LOGGER; logger.getClass(); -@@ -174,6 +181,7 @@ +@@ -174,6 +182,7 @@ nbttagcompound.a("WanderingTraderId", this.B); } @@ -53,7 +53,7 @@ } @Override -@@ -291,6 +299,20 @@ +@@ -291,6 +300,20 @@ @Override public void setThundering(boolean flag) { @@ -74,7 +74,7 @@ this.thundering = flag; } -@@ -311,6 +333,20 @@ +@@ -311,6 +334,20 @@ @Override public void setStorm(boolean flag) { @@ -95,7 +95,7 @@ this.raining = flag; } -@@ -377,6 +413,12 @@ +@@ -377,6 +414,12 @@ @Override public void setDifficulty(EnumDifficulty enumdifficulty) { this.b = this.b.a(enumdifficulty); @@ -108,7 +108,7 @@ } @Override -@@ -481,4 +523,12 @@ +@@ -481,4 +524,12 @@ public IWorldDataServer H() { return this; } diff --git a/nms-patches/WorldGenTreeProvider.patch b/nms-patches/WorldGenTreeProvider.patch index 7d445a038..0d6d528c6 100644 --- a/nms-patches/WorldGenTreeProvider.patch +++ b/nms-patches/WorldGenTreeProvider.patch @@ -1,14 +1,15 @@ --- a/net/minecraft/server/WorldGenTreeProvider.java +++ b/net/minecraft/server/WorldGenTreeProvider.java -@@ -3,6 +3,7 @@ - import java.util.Iterator; +@@ -4,6 +4,8 @@ import java.util.Random; import javax.annotation.Nullable; -+import org.bukkit.TreeType; // CraftBukkit ++import org.bukkit.TreeType; // CraftBukkit ++ public abstract class WorldGenTreeProvider { -@@ -17,6 +18,7 @@ + public WorldGenTreeProvider() {} +@@ -17,6 +19,7 @@ if (worldgenfeatureconfigured == null) { return false; } else { @@ -16,7 +17,7 @@ worldserver.setTypeAndData(blockposition, Blocks.AIR.getBlockData(), 4); ((WorldGenFeatureTreeConfiguration) worldgenfeatureconfigured.f).b(); if (worldgenfeatureconfigured.a(worldserver, chunkgenerator, random, blockposition)) { -@@ -43,4 +45,46 @@ +@@ -43,4 +46,46 @@ return true; } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRaid.java b/src/main/java/org/bukkit/craftbukkit/CraftRaid.java index 360a4901f..c14825e65 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftRaid.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftRaid.java @@ -12,6 +12,7 @@ import net.minecraft.server.EntityRaider; import net.minecraft.server.World; import org.bukkit.Location; import org.bukkit.Raid; +import org.bukkit.Raid.RaidStatus; import org.bukkit.entity.Raider; public final class CraftRaid implements Raid { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index d9dd324c9..9ee5a1bfe 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -106,6 +106,7 @@ import org.bukkit.Sound; import org.bukkit.StructureType; import org.bukkit.TreeType; import org.bukkit.World; +import org.bukkit.World.Environment; import org.bukkit.WorldBorder; import org.bukkit.block.Biome; import org.bukkit.block.Block; diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBisected.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBisected.java index 969b670ea..ddad84f7c 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBisected.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBisected.java @@ -7,12 +7,12 @@ public class CraftBisected extends CraftBlockData implements Bisected { private static final net.minecraft.server.BlockStateEnum HALF = getEnum("half"); @Override - public Half getHalf() { - return get(HALF, Half.class); + public org.bukkit.block.data.Bisected.Half getHalf() { + return get(HALF, org.bukkit.block.data.Bisected.Half.class); } @Override - public void setHalf(Half half) { + public void setHalf(org.bukkit.block.data.Bisected.Half half) { set(HALF, half); } } diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftFaceAttachable.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftFaceAttachable.java index a2c0ed7a4..6f84d54a0 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftFaceAttachable.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftFaceAttachable.java @@ -7,12 +7,12 @@ public abstract class CraftFaceAttachable extends CraftBlockData implements Face private static final net.minecraft.server.BlockStateEnum ATTACH_FACE = getEnum("face"); @Override - public AttachedFace getAttachedFace() { - return get(ATTACH_FACE, AttachedFace.class); + public org.bukkit.block.data.FaceAttachable.AttachedFace getAttachedFace() { + return get(ATTACH_FACE, org.bukkit.block.data.FaceAttachable.AttachedFace.class); } @Override - public void setAttachedFace(AttachedFace face) { + public void setAttachedFace(org.bukkit.block.data.FaceAttachable.AttachedFace face) { set(ATTACH_FACE, face); } } diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftRail.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftRail.java index 5ee64559b..5774ba5f5 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftRail.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftRail.java @@ -7,17 +7,17 @@ public abstract class CraftRail extends CraftBlockData implements Rail { private static final net.minecraft.server.BlockStateEnum SHAPE = getEnum("shape"); @Override - public Shape getShape() { - return get(SHAPE, Shape.class); + public org.bukkit.block.data.Rail.Shape getShape() { + return get(SHAPE, org.bukkit.block.data.Rail.Shape.class); } @Override - public void setShape(Shape shape) { + public void setShape(org.bukkit.block.data.Rail.Shape shape) { set(SHAPE, shape); } @Override - public java.util.Set getShapes() { - return getValues(SHAPE, Shape.class); + public java.util.Set getShapes() { + return getValues(SHAPE, org.bukkit.block.data.Rail.Shape.class); } } diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBamboo.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBamboo.java index 65485a9ed..aab2575cd 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBamboo.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBamboo.java @@ -8,12 +8,12 @@ public abstract class CraftBamboo extends CraftBlockData implements Bamboo { private static final net.minecraft.server.BlockStateEnum LEAVES = getEnum("leaves"); @Override - public Leaves getLeaves() { - return get(LEAVES, Leaves.class); + public org.bukkit.block.data.type.Bamboo.Leaves getLeaves() { + return get(LEAVES, org.bukkit.block.data.type.Bamboo.Leaves.class); } @Override - public void setLeaves(Leaves leaves) { + public void setLeaves(org.bukkit.block.data.type.Bamboo.Leaves leaves) { set(LEAVES, leaves); } } diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBed.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBed.java index f86ed2591..9de782196 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBed.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBed.java @@ -9,12 +9,12 @@ public abstract class CraftBed extends CraftBlockData implements Bed { private static final net.minecraft.server.BlockStateBoolean OCCUPIED = getBoolean("occupied"); @Override - public Part getPart() { - return get(PART, Part.class); + public org.bukkit.block.data.type.Bed.Part getPart() { + return get(PART, org.bukkit.block.data.type.Bed.Part.class); } @Override - public void setPart(Part part) { + public void setPart(org.bukkit.block.data.type.Bed.Part part) { set(PART, part); } diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBell.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBell.java index a94dd1cee..f765b00f9 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBell.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBell.java @@ -8,12 +8,12 @@ public abstract class CraftBell extends CraftBlockData implements Bell { private static final net.minecraft.server.BlockStateEnum ATTACHMENT = getEnum("attachment"); @Override - public Attachment getAttachment() { - return get(ATTACHMENT, Attachment.class); + public org.bukkit.block.data.type.Bell.Attachment getAttachment() { + return get(ATTACHMENT, org.bukkit.block.data.type.Bell.Attachment.class); } @Override - public void setAttachment(Attachment leaves) { + public void setAttachment(org.bukkit.block.data.type.Bell.Attachment leaves) { set(ATTACHMENT, leaves); } } diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftChest.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftChest.java index 70473ef42..822c4fce1 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftChest.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftChest.java @@ -8,12 +8,12 @@ public abstract class CraftChest extends CraftBlockData implements Chest { private static final net.minecraft.server.BlockStateEnum TYPE = getEnum("type"); @Override - public Type getType() { - return get(TYPE, Type.class); + public org.bukkit.block.data.type.Chest.Type getType() { + return get(TYPE, org.bukkit.block.data.type.Chest.Type.class); } @Override - public void setType(Type type) { + public void setType(org.bukkit.block.data.type.Chest.Type type) { set(TYPE, type); } } diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftComparator.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftComparator.java index 4f3130a5f..450361e16 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftComparator.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftComparator.java @@ -8,12 +8,12 @@ public abstract class CraftComparator extends CraftBlockData implements Comparat private static final net.minecraft.server.BlockStateEnum MODE = getEnum("mode"); @Override - public Mode getMode() { - return get(MODE, Mode.class); + public org.bukkit.block.data.type.Comparator.Mode getMode() { + return get(MODE, org.bukkit.block.data.type.Comparator.Mode.class); } @Override - public void setMode(Mode mode) { + public void setMode(org.bukkit.block.data.type.Comparator.Mode mode) { set(MODE, mode); } } diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftDoor.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftDoor.java index 3fc75dd2a..5d435a65c 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftDoor.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftDoor.java @@ -8,12 +8,12 @@ public abstract class CraftDoor extends CraftBlockData implements Door { private static final net.minecraft.server.BlockStateEnum HINGE = getEnum("hinge"); @Override - public Hinge getHinge() { - return get(HINGE, Hinge.class); + public org.bukkit.block.data.type.Door.Hinge getHinge() { + return get(HINGE, org.bukkit.block.data.type.Door.Hinge.class); } @Override - public void setHinge(Hinge hinge) { + public void setHinge(org.bukkit.block.data.type.Door.Hinge hinge) { set(HINGE, hinge); } } diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftJigsaw.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftJigsaw.java index 3ed9e8217..6703235a0 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftJigsaw.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftJigsaw.java @@ -8,12 +8,12 @@ public abstract class CraftJigsaw extends CraftBlockData implements Jigsaw { private static final net.minecraft.server.BlockStateEnum ORIENTATION = getEnum("orientation"); @Override - public Orientation getOrientation() { - return get(ORIENTATION, Orientation.class); + public org.bukkit.block.data.type.Jigsaw.Orientation getOrientation() { + return get(ORIENTATION, org.bukkit.block.data.type.Jigsaw.Orientation.class); } @Override - public void setOrientation(Orientation orientation) { + public void setOrientation(org.bukkit.block.data.type.Jigsaw.Orientation orientation) { set(ORIENTATION, orientation); } } diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftRedstoneWire.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftRedstoneWire.java index c5ec1c55d..ac43a531b 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftRedstoneWire.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftRedstoneWire.java @@ -11,23 +11,23 @@ public abstract class CraftRedstoneWire extends CraftBlockData implements Redsto private static final net.minecraft.server.BlockStateEnum WEST = getEnum("west"); @Override - public Connection getFace(org.bukkit.block.BlockFace face) { + public org.bukkit.block.data.type.RedstoneWire.Connection getFace(org.bukkit.block.BlockFace face) { switch (face) { case NORTH: - return get(NORTH, Connection.class); + return get(NORTH, org.bukkit.block.data.type.RedstoneWire.Connection.class); case EAST: - return get(EAST, Connection.class); + return get(EAST, org.bukkit.block.data.type.RedstoneWire.Connection.class); case SOUTH: - return get(SOUTH, Connection.class); + return get(SOUTH, org.bukkit.block.data.type.RedstoneWire.Connection.class); case WEST: - return get(WEST, Connection.class); + return get(WEST, org.bukkit.block.data.type.RedstoneWire.Connection.class); default: throw new IllegalArgumentException("Cannot have face " + face); } } @Override - public void setFace(org.bukkit.block.BlockFace face, Connection connection) { + public void setFace(org.bukkit.block.BlockFace face, org.bukkit.block.data.type.RedstoneWire.Connection connection) { switch (face) { case NORTH: set(NORTH, connection); diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSlab.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSlab.java index 1fde489e5..e5105cb97 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSlab.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSlab.java @@ -8,12 +8,12 @@ public abstract class CraftSlab extends CraftBlockData implements Slab { private static final net.minecraft.server.BlockStateEnum TYPE = getEnum("type"); @Override - public Type getType() { - return get(TYPE, Type.class); + public org.bukkit.block.data.type.Slab.Type getType() { + return get(TYPE, org.bukkit.block.data.type.Slab.Type.class); } @Override - public void setType(Type type) { + public void setType(org.bukkit.block.data.type.Slab.Type type) { set(TYPE, type); } } diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftStairs.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftStairs.java index c6ccd382f..573bc7cfc 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftStairs.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftStairs.java @@ -8,12 +8,12 @@ public abstract class CraftStairs extends CraftBlockData implements Stairs { private static final net.minecraft.server.BlockStateEnum SHAPE = getEnum("shape"); @Override - public Shape getShape() { - return get(SHAPE, Shape.class); + public org.bukkit.block.data.type.Stairs.Shape getShape() { + return get(SHAPE, org.bukkit.block.data.type.Stairs.Shape.class); } @Override - public void setShape(Shape shape) { + public void setShape(org.bukkit.block.data.type.Stairs.Shape shape) { set(SHAPE, shape); } } diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftStructureBlock.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftStructureBlock.java index 8b8a82bd3..93b878075 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftStructureBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftStructureBlock.java @@ -8,12 +8,12 @@ public abstract class CraftStructureBlock extends CraftBlockData implements Stru private static final net.minecraft.server.BlockStateEnum MODE = getEnum("mode"); @Override - public Mode getMode() { - return get(MODE, Mode.class); + public org.bukkit.block.data.type.StructureBlock.Mode getMode() { + return get(MODE, org.bukkit.block.data.type.StructureBlock.Mode.class); } @Override - public void setMode(Mode mode) { + public void setMode(org.bukkit.block.data.type.StructureBlock.Mode mode) { set(MODE, mode); } } diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSwitch.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSwitch.java index 2761b3710..70c414502 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSwitch.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSwitch.java @@ -8,12 +8,12 @@ public abstract class CraftSwitch extends CraftBlockData implements Switch { private static final net.minecraft.server.BlockStateEnum FACE = getEnum("face"); @Override - public Face getFace() { - return get(FACE, Face.class); + public org.bukkit.block.data.type.Switch.Face getFace() { + return get(FACE, org.bukkit.block.data.type.Switch.Face.class); } @Override - public void setFace(Face face) { + public void setFace(org.bukkit.block.data.type.Switch.Face face) { set(FACE, face); } } diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftTechnicalPiston.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftTechnicalPiston.java index e42fe0d67..fa4398dda 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftTechnicalPiston.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftTechnicalPiston.java @@ -8,12 +8,12 @@ public abstract class CraftTechnicalPiston extends CraftBlockData implements Tec private static final net.minecraft.server.BlockStateEnum TYPE = getEnum("type"); @Override - public Type getType() { - return get(TYPE, Type.class); + public org.bukkit.block.data.type.TechnicalPiston.Type getType() { + return get(TYPE, org.bukkit.block.data.type.TechnicalPiston.Type.class); } @Override - public void setType(Type type) { + public void setType(org.bukkit.block.data.type.TechnicalPiston.Type type) { set(TYPE, type); } } diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftWall.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftWall.java index 7a602bbbd..3c511b153 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftWall.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftWall.java @@ -21,12 +21,12 @@ public abstract class CraftWall extends CraftBlockData implements Wall { } @Override - public Height getHeight(org.bukkit.block.BlockFace face) { - return get(HEIGHTS[face.ordinal()], Height.class); + public org.bukkit.block.data.type.Wall.Height getHeight(org.bukkit.block.BlockFace face) { + return get(HEIGHTS[face.ordinal()], org.bukkit.block.data.type.Wall.Height.class); } @Override - public void setHeight(org.bukkit.block.BlockFace face, Height height) { + public void setHeight(org.bukkit.block.BlockFace face, org.bukkit.block.data.type.Wall.Height height) { set(HEIGHTS[face.ordinal()], height); } } diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBamboo.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBamboo.java index 3c650d4f8..8c2d08450 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBamboo.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBamboo.java @@ -18,12 +18,12 @@ public final class CraftBamboo extends org.bukkit.craftbukkit.block.data.CraftBl private static final net.minecraft.server.BlockStateEnum LEAVES = getEnum(net.minecraft.server.BlockBamboo.class, "leaves"); @Override - public Leaves getLeaves() { - return get(LEAVES, Leaves.class); + public org.bukkit.block.data.type.Bamboo.Leaves getLeaves() { + return get(LEAVES, org.bukkit.block.data.type.Bamboo.Leaves.class); } @Override - public void setLeaves(Leaves leaves) { + public void setLeaves(org.bukkit.block.data.type.Bamboo.Leaves leaves) { set(LEAVES, leaves); } diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBed.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBed.java index c625c964e..04fae20f5 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBed.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBed.java @@ -19,12 +19,12 @@ public final class CraftBed extends org.bukkit.craftbukkit.block.data.CraftBlock private static final net.minecraft.server.BlockStateBoolean OCCUPIED = getBoolean(net.minecraft.server.BlockBed.class, "occupied"); @Override - public Part getPart() { - return get(PART, Part.class); + public org.bukkit.block.data.type.Bed.Part getPart() { + return get(PART, org.bukkit.block.data.type.Bed.Part.class); } @Override - public void setPart(Part part) { + public void setPart(org.bukkit.block.data.type.Bed.Part part) { set(PART, part); } diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBell.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBell.java index b940d9aff..7fa9ba1ce 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBell.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBell.java @@ -18,12 +18,12 @@ public final class CraftBell extends org.bukkit.craftbukkit.block.data.CraftBloc private static final net.minecraft.server.BlockStateEnum ATTACHMENT = getEnum(net.minecraft.server.BlockBell.class, "attachment"); @Override - public Attachment getAttachment() { - return get(ATTACHMENT, Attachment.class); + public org.bukkit.block.data.type.Bell.Attachment getAttachment() { + return get(ATTACHMENT, org.bukkit.block.data.type.Bell.Attachment.class); } @Override - public void setAttachment(Attachment leaves) { + public void setAttachment(org.bukkit.block.data.type.Bell.Attachment leaves) { set(ATTACHMENT, leaves); } diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChest.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChest.java index 44f3a5328..e693aee0e 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChest.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChest.java @@ -18,12 +18,12 @@ public final class CraftChest extends org.bukkit.craftbukkit.block.data.CraftBlo private static final net.minecraft.server.BlockStateEnum TYPE = getEnum(net.minecraft.server.BlockChest.class, "type"); @Override - public Type getType() { - return get(TYPE, Type.class); + public org.bukkit.block.data.type.Chest.Type getType() { + return get(TYPE, org.bukkit.block.data.type.Chest.Type.class); } @Override - public void setType(Type type) { + public void setType(org.bukkit.block.data.type.Chest.Type type) { set(TYPE, type); } diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChestTrapped.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChestTrapped.java index cc8f88baa..fd54dfe8f 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChestTrapped.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChestTrapped.java @@ -18,12 +18,12 @@ public final class CraftChestTrapped extends org.bukkit.craftbukkit.block.data.C private static final net.minecraft.server.BlockStateEnum TYPE = getEnum(net.minecraft.server.BlockChestTrapped.class, "type"); @Override - public Type getType() { - return get(TYPE, Type.class); + public org.bukkit.block.data.type.Chest.Type getType() { + return get(TYPE, org.bukkit.block.data.type.Chest.Type.class); } @Override - public void setType(Type type) { + public void setType(org.bukkit.block.data.type.Chest.Type type) { set(TYPE, type); } diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCobbleWall.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCobbleWall.java index 373f3501d..1fd10df85 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCobbleWall.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCobbleWall.java @@ -31,12 +31,12 @@ public final class CraftCobbleWall extends org.bukkit.craftbukkit.block.data.Cra } @Override - public Height getHeight(org.bukkit.block.BlockFace face) { - return get(HEIGHTS[face.ordinal()], Height.class); + public org.bukkit.block.data.type.Wall.Height getHeight(org.bukkit.block.BlockFace face) { + return get(HEIGHTS[face.ordinal()], org.bukkit.block.data.type.Wall.Height.class); } @Override - public void setHeight(org.bukkit.block.BlockFace face, Height height) { + public void setHeight(org.bukkit.block.BlockFace face, org.bukkit.block.data.type.Wall.Height height) { set(HEIGHTS[face.ordinal()], height); } diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDoor.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDoor.java index ec8639bf1..6b64528ef 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDoor.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDoor.java @@ -18,12 +18,12 @@ public final class CraftDoor extends org.bukkit.craftbukkit.block.data.CraftBloc private static final net.minecraft.server.BlockStateEnum HINGE = getEnum(net.minecraft.server.BlockDoor.class, "hinge"); @Override - public Hinge getHinge() { - return get(HINGE, Hinge.class); + public org.bukkit.block.data.type.Door.Hinge getHinge() { + return get(HINGE, org.bukkit.block.data.type.Door.Hinge.class); } @Override - public void setHinge(Hinge hinge) { + public void setHinge(org.bukkit.block.data.type.Door.Hinge hinge) { set(HINGE, hinge); } @@ -32,12 +32,12 @@ public final class CraftDoor extends org.bukkit.craftbukkit.block.data.CraftBloc private static final net.minecraft.server.BlockStateEnum HALF = getEnum(net.minecraft.server.BlockDoor.class, "half"); @Override - public Half getHalf() { - return get(HALF, Half.class); + public org.bukkit.block.data.Bisected.Half getHalf() { + return get(HALF, org.bukkit.block.data.Bisected.Half.class); } @Override - public void setHalf(Half half) { + public void setHalf(org.bukkit.block.data.Bisected.Half half) { set(HALF, half); } diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftGrindstone.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftGrindstone.java index 151d301ae..bc232bc95 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftGrindstone.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftGrindstone.java @@ -37,12 +37,12 @@ public final class CraftGrindstone extends org.bukkit.craftbukkit.block.data.Cra private static final net.minecraft.server.BlockStateEnum ATTACH_FACE = getEnum(net.minecraft.server.BlockGrindstone.class, "face"); @Override - public AttachedFace getAttachedFace() { - return get(ATTACH_FACE, AttachedFace.class); + public org.bukkit.block.data.FaceAttachable.AttachedFace getAttachedFace() { + return get(ATTACH_FACE, org.bukkit.block.data.FaceAttachable.AttachedFace.class); } @Override - public void setAttachedFace(AttachedFace face) { + public void setAttachedFace(org.bukkit.block.data.FaceAttachable.AttachedFace face) { set(ATTACH_FACE, face); } } diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftJigsaw.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftJigsaw.java index 8699ca52b..4bd11d51a 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftJigsaw.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftJigsaw.java @@ -18,12 +18,12 @@ public final class CraftJigsaw extends org.bukkit.craftbukkit.block.data.CraftBl private static final net.minecraft.server.BlockStateEnum ORIENTATION = getEnum(net.minecraft.server.BlockJigsaw.class, "orientation"); @Override - public Orientation getOrientation() { - return get(ORIENTATION, Orientation.class); + public org.bukkit.block.data.type.Jigsaw.Orientation getOrientation() { + return get(ORIENTATION, org.bukkit.block.data.type.Jigsaw.Orientation.class); } @Override - public void setOrientation(Orientation orientation) { + public void setOrientation(org.bukkit.block.data.type.Jigsaw.Orientation orientation) { set(ORIENTATION, orientation); } } diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLever.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLever.java index c3713d1dc..ab08c9329 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLever.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLever.java @@ -18,12 +18,12 @@ public final class CraftLever extends org.bukkit.craftbukkit.block.data.CraftBlo private static final net.minecraft.server.BlockStateEnum FACE = getEnum(net.minecraft.server.BlockLever.class, "face"); @Override - public Face getFace() { - return get(FACE, Face.class); + public org.bukkit.block.data.type.Switch.Face getFace() { + return get(FACE, org.bukkit.block.data.type.Switch.Face.class); } @Override - public void setFace(Face face) { + public void setFace(org.bukkit.block.data.type.Switch.Face face) { set(FACE, face); } @@ -51,12 +51,12 @@ public final class CraftLever extends org.bukkit.craftbukkit.block.data.CraftBlo private static final net.minecraft.server.BlockStateEnum ATTACH_FACE = getEnum(net.minecraft.server.BlockLever.class, "face"); @Override - public AttachedFace getAttachedFace() { - return get(ATTACH_FACE, AttachedFace.class); + public org.bukkit.block.data.FaceAttachable.AttachedFace getAttachedFace() { + return get(ATTACH_FACE, org.bukkit.block.data.FaceAttachable.AttachedFace.class); } @Override - public void setAttachedFace(AttachedFace face) { + public void setAttachedFace(org.bukkit.block.data.FaceAttachable.AttachedFace face) { set(ATTACH_FACE, face); } diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMinecartDetector.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMinecartDetector.java index 9ad25f9fe..94bc90af3 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMinecartDetector.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMinecartDetector.java @@ -32,17 +32,17 @@ public final class CraftMinecartDetector extends org.bukkit.craftbukkit.block.da private static final net.minecraft.server.BlockStateEnum SHAPE = getEnum(net.minecraft.server.BlockMinecartDetector.class, "shape"); @Override - public Shape getShape() { - return get(SHAPE, Shape.class); + public org.bukkit.block.data.Rail.Shape getShape() { + return get(SHAPE, org.bukkit.block.data.Rail.Shape.class); } @Override - public void setShape(Shape shape) { + public void setShape(org.bukkit.block.data.Rail.Shape shape) { set(SHAPE, shape); } @Override - public java.util.Set getShapes() { - return getValues(SHAPE, Shape.class); + public java.util.Set getShapes() { + return getValues(SHAPE, org.bukkit.block.data.Rail.Shape.class); } } diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMinecartTrack.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMinecartTrack.java index 127681a63..92df0fa60 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMinecartTrack.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMinecartTrack.java @@ -18,17 +18,17 @@ public final class CraftMinecartTrack extends org.bukkit.craftbukkit.block.data. private static final net.minecraft.server.BlockStateEnum SHAPE = getEnum(net.minecraft.server.BlockMinecartTrack.class, "shape"); @Override - public Shape getShape() { - return get(SHAPE, Shape.class); + public org.bukkit.block.data.Rail.Shape getShape() { + return get(SHAPE, org.bukkit.block.data.Rail.Shape.class); } @Override - public void setShape(Shape shape) { + public void setShape(org.bukkit.block.data.Rail.Shape shape) { set(SHAPE, shape); } @Override - public java.util.Set getShapes() { - return getValues(SHAPE, Shape.class); + public java.util.Set getShapes() { + return getValues(SHAPE, org.bukkit.block.data.Rail.Shape.class); } } diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPistonExtension.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPistonExtension.java index 038e58433..cab86c45a 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPistonExtension.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPistonExtension.java @@ -32,12 +32,12 @@ public final class CraftPistonExtension extends org.bukkit.craftbukkit.block.dat private static final net.minecraft.server.BlockStateEnum TYPE = getEnum(net.minecraft.server.BlockPistonExtension.class, "type"); @Override - public Type getType() { - return get(TYPE, Type.class); + public org.bukkit.block.data.type.TechnicalPiston.Type getType() { + return get(TYPE, org.bukkit.block.data.type.TechnicalPiston.Type.class); } @Override - public void setType(Type type) { + public void setType(org.bukkit.block.data.type.TechnicalPiston.Type type) { set(TYPE, type); } diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPistonMoving.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPistonMoving.java index 38b098e0a..36c4d35f0 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPistonMoving.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPistonMoving.java @@ -18,12 +18,12 @@ public final class CraftPistonMoving extends org.bukkit.craftbukkit.block.data.C private static final net.minecraft.server.BlockStateEnum TYPE = getEnum(net.minecraft.server.BlockPistonMoving.class, "type"); @Override - public Type getType() { - return get(TYPE, Type.class); + public org.bukkit.block.data.type.TechnicalPiston.Type getType() { + return get(TYPE, org.bukkit.block.data.type.TechnicalPiston.Type.class); } @Override - public void setType(Type type) { + public void setType(org.bukkit.block.data.type.TechnicalPiston.Type type) { set(TYPE, type); } diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPoweredRail.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPoweredRail.java index ea904ef00..71d62fda3 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPoweredRail.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPoweredRail.java @@ -32,17 +32,17 @@ public final class CraftPoweredRail extends org.bukkit.craftbukkit.block.data.Cr private static final net.minecraft.server.BlockStateEnum SHAPE = getEnum(net.minecraft.server.BlockPoweredRail.class, "shape"); @Override - public Shape getShape() { - return get(SHAPE, Shape.class); + public org.bukkit.block.data.Rail.Shape getShape() { + return get(SHAPE, org.bukkit.block.data.Rail.Shape.class); } @Override - public void setShape(Shape shape) { + public void setShape(org.bukkit.block.data.Rail.Shape shape) { set(SHAPE, shape); } @Override - public java.util.Set getShapes() { - return getValues(SHAPE, Shape.class); + public java.util.Set getShapes() { + return getValues(SHAPE, org.bukkit.block.data.Rail.Shape.class); } } diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneComparator.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneComparator.java index 2456e3071..ceb4b5bfc 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneComparator.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneComparator.java @@ -18,12 +18,12 @@ public final class CraftRedstoneComparator extends org.bukkit.craftbukkit.block. private static final net.minecraft.server.BlockStateEnum MODE = getEnum(net.minecraft.server.BlockRedstoneComparator.class, "mode"); @Override - public Mode getMode() { - return get(MODE, Mode.class); + public org.bukkit.block.data.type.Comparator.Mode getMode() { + return get(MODE, org.bukkit.block.data.type.Comparator.Mode.class); } @Override - public void setMode(Mode mode) { + public void setMode(org.bukkit.block.data.type.Comparator.Mode mode) { set(MODE, mode); } diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneWire.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneWire.java index 45f66eb40..5093e56ef 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneWire.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneWire.java @@ -21,23 +21,23 @@ public final class CraftRedstoneWire extends org.bukkit.craftbukkit.block.data.C private static final net.minecraft.server.BlockStateEnum WEST = getEnum(net.minecraft.server.BlockRedstoneWire.class, "west"); @Override - public Connection getFace(org.bukkit.block.BlockFace face) { + public org.bukkit.block.data.type.RedstoneWire.Connection getFace(org.bukkit.block.BlockFace face) { switch (face) { case NORTH: - return get(NORTH, Connection.class); + return get(NORTH, org.bukkit.block.data.type.RedstoneWire.Connection.class); case EAST: - return get(EAST, Connection.class); + return get(EAST, org.bukkit.block.data.type.RedstoneWire.Connection.class); case SOUTH: - return get(SOUTH, Connection.class); + return get(SOUTH, org.bukkit.block.data.type.RedstoneWire.Connection.class); case WEST: - return get(WEST, Connection.class); + return get(WEST, org.bukkit.block.data.type.RedstoneWire.Connection.class); default: throw new IllegalArgumentException("Cannot have face " + face); } } @Override - public void setFace(org.bukkit.block.BlockFace face, Connection connection) { + public void setFace(org.bukkit.block.BlockFace face, org.bukkit.block.data.type.RedstoneWire.Connection connection) { switch (face) { case NORTH: set(NORTH, connection); diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStairs.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStairs.java index 804a90f21..bb4b8fd22 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStairs.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStairs.java @@ -18,12 +18,12 @@ public final class CraftStairs extends org.bukkit.craftbukkit.block.data.CraftBl private static final net.minecraft.server.BlockStateEnum SHAPE = getEnum(net.minecraft.server.BlockStairs.class, "shape"); @Override - public Shape getShape() { - return get(SHAPE, Shape.class); + public org.bukkit.block.data.type.Stairs.Shape getShape() { + return get(SHAPE, org.bukkit.block.data.type.Stairs.Shape.class); } @Override - public void setShape(Shape shape) { + public void setShape(org.bukkit.block.data.type.Stairs.Shape shape) { set(SHAPE, shape); } @@ -32,12 +32,12 @@ public final class CraftStairs extends org.bukkit.craftbukkit.block.data.CraftBl private static final net.minecraft.server.BlockStateEnum HALF = getEnum(net.minecraft.server.BlockStairs.class, "half"); @Override - public Half getHalf() { - return get(HALF, Half.class); + public org.bukkit.block.data.Bisected.Half getHalf() { + return get(HALF, org.bukkit.block.data.Bisected.Half.class); } @Override - public void setHalf(Half half) { + public void setHalf(org.bukkit.block.data.Bisected.Half half) { set(HALF, half); } diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStepAbstract.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStepAbstract.java index 922d41b1a..68fec26d1 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStepAbstract.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStepAbstract.java @@ -18,12 +18,12 @@ public final class CraftStepAbstract extends org.bukkit.craftbukkit.block.data.C private static final net.minecraft.server.BlockStateEnum TYPE = getEnum(net.minecraft.server.BlockStepAbstract.class, "type"); @Override - public Type getType() { - return get(TYPE, Type.class); + public org.bukkit.block.data.type.Slab.Type getType() { + return get(TYPE, org.bukkit.block.data.type.Slab.Type.class); } @Override - public void setType(Type type) { + public void setType(org.bukkit.block.data.type.Slab.Type type) { set(TYPE, type); } diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStoneButton.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStoneButton.java index ee3bef136..35d3d96d2 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStoneButton.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStoneButton.java @@ -18,12 +18,12 @@ public final class CraftStoneButton extends org.bukkit.craftbukkit.block.data.Cr private static final net.minecraft.server.BlockStateEnum FACE = getEnum(net.minecraft.server.BlockStoneButton.class, "face"); @Override - public Face getFace() { - return get(FACE, Face.class); + public org.bukkit.block.data.type.Switch.Face getFace() { + return get(FACE, org.bukkit.block.data.type.Switch.Face.class); } @Override - public void setFace(Face face) { + public void setFace(org.bukkit.block.data.type.Switch.Face face) { set(FACE, face); } @@ -51,12 +51,12 @@ public final class CraftStoneButton extends org.bukkit.craftbukkit.block.data.Cr private static final net.minecraft.server.BlockStateEnum ATTACH_FACE = getEnum(net.minecraft.server.BlockStoneButton.class, "face"); @Override - public AttachedFace getAttachedFace() { - return get(ATTACH_FACE, AttachedFace.class); + public org.bukkit.block.data.FaceAttachable.AttachedFace getAttachedFace() { + return get(ATTACH_FACE, org.bukkit.block.data.FaceAttachable.AttachedFace.class); } @Override - public void setAttachedFace(AttachedFace face) { + public void setAttachedFace(org.bukkit.block.data.FaceAttachable.AttachedFace face) { set(ATTACH_FACE, face); } diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStructure.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStructure.java index f2435d34e..5cc301f0b 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStructure.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStructure.java @@ -18,12 +18,12 @@ public final class CraftStructure extends org.bukkit.craftbukkit.block.data.Craf private static final net.minecraft.server.BlockStateEnum MODE = getEnum(net.minecraft.server.BlockStructure.class, "mode"); @Override - public Mode getMode() { - return get(MODE, Mode.class); + public org.bukkit.block.data.type.StructureBlock.Mode getMode() { + return get(MODE, org.bukkit.block.data.type.StructureBlock.Mode.class); } @Override - public void setMode(Mode mode) { + public void setMode(org.bukkit.block.data.type.StructureBlock.Mode mode) { set(MODE, mode); } } diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTallPlant.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTallPlant.java index 0ed0ad0cf..718ec49ad 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTallPlant.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTallPlant.java @@ -18,12 +18,12 @@ public final class CraftTallPlant extends org.bukkit.craftbukkit.block.data.Craf private static final net.minecraft.server.BlockStateEnum HALF = getEnum(net.minecraft.server.BlockTallPlant.class, "half"); @Override - public Half getHalf() { - return get(HALF, Half.class); + public org.bukkit.block.data.Bisected.Half getHalf() { + return get(HALF, org.bukkit.block.data.Bisected.Half.class); } @Override - public void setHalf(Half half) { + public void setHalf(org.bukkit.block.data.Bisected.Half half) { set(HALF, half); } } diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTallPlantFlower.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTallPlantFlower.java index 3ae8201c4..07645ac95 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTallPlantFlower.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTallPlantFlower.java @@ -18,12 +18,12 @@ public final class CraftTallPlantFlower extends org.bukkit.craftbukkit.block.dat private static final net.minecraft.server.BlockStateEnum HALF = getEnum(net.minecraft.server.BlockTallPlantFlower.class, "half"); @Override - public Half getHalf() { - return get(HALF, Half.class); + public org.bukkit.block.data.Bisected.Half getHalf() { + return get(HALF, org.bukkit.block.data.Bisected.Half.class); } @Override - public void setHalf(Half half) { + public void setHalf(org.bukkit.block.data.Bisected.Half half) { set(HALF, half); } } diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTallSeaGrass.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTallSeaGrass.java index d51e3ec4d..9242494fd 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTallSeaGrass.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTallSeaGrass.java @@ -18,12 +18,12 @@ public final class CraftTallSeaGrass extends org.bukkit.craftbukkit.block.data.C private static final net.minecraft.server.BlockStateEnum HALF = getEnum(net.minecraft.server.BlockTallSeaGrass.class, "half"); @Override - public Half getHalf() { - return get(HALF, Half.class); + public org.bukkit.block.data.Bisected.Half getHalf() { + return get(HALF, org.bukkit.block.data.Bisected.Half.class); } @Override - public void setHalf(Half half) { + public void setHalf(org.bukkit.block.data.Bisected.Half half) { set(HALF, half); } } diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTrapdoor.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTrapdoor.java index 2ec18b29c..16f789cf5 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTrapdoor.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTrapdoor.java @@ -18,12 +18,12 @@ public final class CraftTrapdoor extends org.bukkit.craftbukkit.block.data.Craft private static final net.minecraft.server.BlockStateEnum HALF = getEnum(net.minecraft.server.BlockTrapdoor.class, "half"); @Override - public Half getHalf() { - return get(HALF, Half.class); + public org.bukkit.block.data.Bisected.Half getHalf() { + return get(HALF, org.bukkit.block.data.Bisected.Half.class); } @Override - public void setHalf(Half half) { + public void setHalf(org.bukkit.block.data.Bisected.Half half) { set(HALF, half); } diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWoodButton.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWoodButton.java index bbe76e7dd..5fef574fc 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWoodButton.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWoodButton.java @@ -18,12 +18,12 @@ public final class CraftWoodButton extends org.bukkit.craftbukkit.block.data.Cra private static final net.minecraft.server.BlockStateEnum FACE = getEnum(net.minecraft.server.BlockWoodButton.class, "face"); @Override - public Face getFace() { - return get(FACE, Face.class); + public org.bukkit.block.data.type.Switch.Face getFace() { + return get(FACE, org.bukkit.block.data.type.Switch.Face.class); } @Override - public void setFace(Face face) { + public void setFace(org.bukkit.block.data.type.Switch.Face face) { set(FACE, face); } @@ -51,12 +51,12 @@ public final class CraftWoodButton extends org.bukkit.craftbukkit.block.data.Cra private static final net.minecraft.server.BlockStateEnum ATTACH_FACE = getEnum(net.minecraft.server.BlockWoodButton.class, "face"); @Override - public AttachedFace getAttachedFace() { - return get(ATTACH_FACE, AttachedFace.class); + public org.bukkit.block.data.FaceAttachable.AttachedFace getAttachedFace() { + return get(ATTACH_FACE, org.bukkit.block.data.FaceAttachable.AttachedFace.class); } @Override - public void setAttachedFace(AttachedFace face) { + public void setAttachedFace(org.bukkit.block.data.FaceAttachable.AttachedFace face) { set(ATTACH_FACE, face); } diff --git a/src/main/java/org/bukkit/craftbukkit/boss/CraftDragonBattle.java b/src/main/java/org/bukkit/craftbukkit/boss/CraftDragonBattle.java index 349f894f7..4c98a811f 100644 --- a/src/main/java/org/bukkit/craftbukkit/boss/CraftDragonBattle.java +++ b/src/main/java/org/bukkit/craftbukkit/boss/CraftDragonBattle.java @@ -7,6 +7,7 @@ import net.minecraft.server.EnumDragonRespawn; import org.bukkit.Location; import org.bukkit.boss.BossBar; import org.bukkit.boss.DragonBattle; +import org.bukkit.boss.DragonBattle.RespawnPhase; import org.bukkit.entity.EnderDragon; public class CraftDragonBattle implements DragonBattle { diff --git a/src/main/java/org/bukkit/craftbukkit/command/ProxiedNativeCommandSender.java b/src/main/java/org/bukkit/craftbukkit/command/ProxiedNativeCommandSender.java index bafdde8a4..49f2416e0 100644 --- a/src/main/java/org/bukkit/craftbukkit/command/ProxiedNativeCommandSender.java +++ b/src/main/java/org/bukkit/craftbukkit/command/ProxiedNativeCommandSender.java @@ -1,4 +1,3 @@ - package org.bukkit.craftbukkit.command; import java.util.Set; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java index 7d07f95e6..8f3850096 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java @@ -5,6 +5,7 @@ import net.minecraft.server.Vector3f; import org.bukkit.craftbukkit.CraftEquipmentSlot; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.ArmorStand; +import org.bukkit.entity.ArmorStand.LockType; import org.bukkit.entity.EntityType; import org.bukkit.inventory.EquipmentSlot; import org.bukkit.inventory.ItemStack; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java index cf40d6249..ddaa10704 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java @@ -7,6 +7,7 @@ import org.apache.commons.lang.Validate; import org.bukkit.block.Block; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.AbstractArrow; +import org.bukkit.entity.AbstractArrow.PickupStatus; import org.bukkit.entity.Entity; import org.bukkit.entity.EntityType; import org.bukkit.projectiles.ProjectileSource; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftCat.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftCat.java index 836110b00..c63a23ff4 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftCat.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftCat.java @@ -6,6 +6,7 @@ import net.minecraft.server.EnumColor; import org.bukkit.DyeColor; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Cat; +import org.bukkit.entity.Cat.Type; import org.bukkit.entity.EntityType; public class CraftCat extends CraftTameableAnimal implements Cat { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java index e8eb5f9f2..66e4e8b5c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java @@ -12,6 +12,7 @@ import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.boss.CraftDragonBattle; import org.bukkit.entity.ComplexEntityPart; import org.bukkit.entity.EnderDragon; +import org.bukkit.entity.EnderDragon.Phase; import org.bukkit.entity.EntityType; public class CraftEnderDragon extends CraftComplexLivingEntity implements EnderDragon { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java index 42b306f1a..f8e897f0b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java @@ -8,6 +8,7 @@ import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Entity; import org.bukkit.entity.EntityType; import org.bukkit.entity.FishHook; +import org.bukkit.entity.FishHook.HookState; public class CraftFishHook extends CraftProjectile implements FishHook { private double biteChance = -1; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFox.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFox.java index 0b73a4486..a00be6ee6 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFox.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFox.java @@ -8,6 +8,7 @@ import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.AnimalTamer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Fox; +import org.bukkit.entity.Fox.Type; public class CraftFox extends CraftAnimals implements Fox { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHorse.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHorse.java index 74396af5d..2a36eee99 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHorse.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHorse.java @@ -8,6 +8,9 @@ import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.inventory.CraftInventoryHorse; import org.bukkit.entity.EntityType; import org.bukkit.entity.Horse; +import org.bukkit.entity.Horse.Color; +import org.bukkit.entity.Horse.Style; +import org.bukkit.entity.Horse.Variant; import org.bukkit.inventory.HorseInventory; public class CraftHorse extends CraftAbstractHorse implements Horse { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLlama.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLlama.java index 23ab78da1..058010b99 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLlama.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLlama.java @@ -7,6 +7,7 @@ import org.bukkit.craftbukkit.inventory.CraftInventoryLlama; import org.bukkit.entity.EntityType; import org.bukkit.entity.Horse; import org.bukkit.entity.Llama; +import org.bukkit.entity.Llama.Color; import org.bukkit.inventory.LlamaInventory; public class CraftLlama extends CraftChestedHorse implements Llama { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java index 1ca04ec4e..375dbf4a4 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java @@ -5,6 +5,7 @@ import net.minecraft.server.EntityMushroomCow; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.MushroomCow; +import org.bukkit.entity.MushroomCow.Variant; public class CraftMushroomCow extends CraftCow implements MushroomCow { public CraftMushroomCow(CraftServer server, EntityMushroomCow entity) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftOcelot.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftOcelot.java index cbd2b6f54..bd25ea0e1 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftOcelot.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftOcelot.java @@ -4,6 +4,7 @@ import net.minecraft.server.EntityOcelot; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Ocelot; +import org.bukkit.entity.Ocelot.Type; public class CraftOcelot extends CraftAnimals implements Ocelot { public CraftOcelot(CraftServer server, EntityOcelot ocelot) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPanda.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPanda.java index feab3601d..a0c5ae379 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPanda.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPanda.java @@ -5,6 +5,7 @@ import net.minecraft.server.EntityPanda; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Panda; +import org.bukkit.entity.Panda.Gene; public class CraftPanda extends CraftAnimals implements Panda { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftParrot.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftParrot.java index 5b2405cf2..491a1706e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftParrot.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftParrot.java @@ -5,6 +5,7 @@ import net.minecraft.server.EntityParrot; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Parrot; +import org.bukkit.entity.Parrot.Variant; public class CraftParrot extends CraftTameableAnimal implements Parrot { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftRabbit.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftRabbit.java index 222fe9571..7c18aed40 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftRabbit.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftRabbit.java @@ -7,6 +7,7 @@ import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.CraftWorld; import org.bukkit.entity.EntityType; import org.bukkit.entity.Rabbit; +import org.bukkit.entity.Rabbit.Type; public class CraftRabbit extends CraftAnimals implements Rabbit { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java index b4ae89840..1cd359b3d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java @@ -4,6 +4,7 @@ import net.minecraft.server.EntitySkeletonAbstract; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Skeleton; +import org.bukkit.entity.Skeleton.SkeletonType; public class CraftSkeleton extends CraftMonster implements Skeleton { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSpellcaster.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSpellcaster.java index 7f5c936b3..91292f4e4 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSpellcaster.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSpellcaster.java @@ -4,6 +4,7 @@ import com.google.common.base.Preconditions; import net.minecraft.server.EntityIllagerWizard; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Spellcaster; +import org.bukkit.entity.Spellcaster.Spell; public class CraftSpellcaster extends CraftIllager implements Spellcaster { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftStray.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftStray.java index 0fcb05bad..180ae3e9a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftStray.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftStray.java @@ -3,6 +3,7 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntitySkeletonStray; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; +import org.bukkit.entity.Skeleton.SkeletonType; import org.bukkit.entity.Stray; public class CraftStray extends CraftSkeleton implements Stray { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftTropicalFish.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftTropicalFish.java index 9243381a2..088022c87 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftTropicalFish.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftTropicalFish.java @@ -7,6 +7,7 @@ import org.bukkit.DyeColor; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.TropicalFish; +import org.bukkit.entity.TropicalFish.Pattern; public class CraftTropicalFish extends CraftFish implements TropicalFish { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java index fe726e788..25a57d94a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java @@ -14,6 +14,8 @@ import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.util.CraftNamespacedKey; import org.bukkit.entity.EntityType; import org.bukkit.entity.Villager; +import org.bukkit.entity.Villager.Profession; +import org.bukkit.entity.Villager.Type; public class CraftVillager extends CraftAbstractVillager implements Villager { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftWitherSkeleton.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftWitherSkeleton.java index 6fb1da7da..a05163039 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftWitherSkeleton.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftWitherSkeleton.java @@ -3,6 +3,7 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntitySkeletonWither; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; +import org.bukkit.entity.Skeleton.SkeletonType; import org.bukkit.entity.WitherSkeleton; public class CraftWitherSkeleton extends CraftSkeleton implements WitherSkeleton { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java index 1a3549480..9be4f8d56 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java @@ -6,6 +6,7 @@ import net.minecraft.server.NBTBase; import net.minecraft.server.NBTTagCompound; import org.bukkit.Material; import org.bukkit.configuration.serialization.DelegateDeserialization; +import org.bukkit.craftbukkit.inventory.CraftMetaItem.ItemMetaKey; @DelegateDeserialization(CraftMetaItem.SerializableMeta.class) public class CraftMetaArmorStand extends CraftMetaItem { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java index 87a19622c..1c1fac698 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java @@ -12,6 +12,8 @@ import org.bukkit.Material; import org.bukkit.block.banner.Pattern; import org.bukkit.block.banner.PatternType; import org.bukkit.configuration.serialization.DelegateDeserialization; +import org.bukkit.craftbukkit.inventory.CraftMetaItem.ItemMetaKey; +import org.bukkit.craftbukkit.inventory.CraftMetaItem.SerializableMeta; import org.bukkit.craftbukkit.util.CraftMagicNumbers; import org.bukkit.inventory.meta.BannerMeta; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java index 852e793c0..b7a574cc6 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java @@ -68,6 +68,8 @@ import org.bukkit.craftbukkit.block.CraftSign; import org.bukkit.craftbukkit.block.CraftSkull; import org.bukkit.craftbukkit.block.CraftSmoker; import org.bukkit.craftbukkit.block.CraftStructureBlock; +import org.bukkit.craftbukkit.inventory.CraftMetaItem.ItemMetaKey; +import org.bukkit.craftbukkit.inventory.CraftMetaItem.SerializableMeta; import org.bukkit.craftbukkit.util.CraftMagicNumbers; import org.bukkit.inventory.meta.BlockStateMeta; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java index 2c8590dfb..25df428b5 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java @@ -15,10 +15,12 @@ import net.minecraft.server.NBTTagString; import org.apache.commons.lang.Validate; import org.bukkit.Material; import org.bukkit.configuration.serialization.DelegateDeserialization; +import org.bukkit.craftbukkit.inventory.CraftMetaItem.ItemMetaKey; import org.bukkit.craftbukkit.inventory.CraftMetaItem.SerializableMeta; import org.bukkit.craftbukkit.util.CraftChatMessage; import org.bukkit.craftbukkit.util.CraftMagicNumbers; import org.bukkit.inventory.meta.BookMeta; +import org.bukkit.inventory.meta.BookMeta.Generation; @DelegateDeserialization(SerializableMeta.class) public class CraftMetaBook extends CraftMetaItem implements BookMeta { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCharge.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCharge.java index 1ff9ff3f2..be967a1d2 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCharge.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCharge.java @@ -6,6 +6,7 @@ import net.minecraft.server.NBTTagCompound; import org.bukkit.FireworkEffect; import org.bukkit.Material; import org.bukkit.configuration.serialization.DelegateDeserialization; +import org.bukkit.craftbukkit.inventory.CraftMetaItem.ItemMetaKey; import org.bukkit.craftbukkit.inventory.CraftMetaItem.SerializableMeta; import org.bukkit.inventory.meta.FireworkEffectMeta; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCompass.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCompass.java index 6edbb3735..c5fe26f54 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCompass.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCompass.java @@ -17,6 +17,8 @@ import org.bukkit.Material; import org.bukkit.World; import org.bukkit.configuration.serialization.DelegateDeserialization; import org.bukkit.craftbukkit.CraftWorld; +import org.bukkit.craftbukkit.inventory.CraftMetaItem.ItemMetaKey; +import org.bukkit.craftbukkit.inventory.CraftMetaItem.SerializableMeta; import org.bukkit.inventory.meta.CompassMeta; @DelegateDeserialization(CraftMetaItem.SerializableMeta.class) diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCrossbow.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCrossbow.java index 8d3d39943..1bb398530 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCrossbow.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCrossbow.java @@ -11,6 +11,8 @@ import net.minecraft.server.NBTTagCompound; import net.minecraft.server.NBTTagList; import org.bukkit.Material; import org.bukkit.configuration.serialization.DelegateDeserialization; +import org.bukkit.craftbukkit.inventory.CraftMetaItem.ItemMetaKey; +import org.bukkit.craftbukkit.inventory.CraftMetaItem.SerializableMeta; import org.bukkit.craftbukkit.util.CraftMagicNumbers; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.CrossbowMeta; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEnchantedBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEnchantedBook.java index f5feea207..40e9a0a53 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEnchantedBook.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEnchantedBook.java @@ -7,6 +7,7 @@ import java.util.Map; import net.minecraft.server.NBTTagCompound; import org.bukkit.Material; import org.bukkit.configuration.serialization.DelegateDeserialization; +import org.bukkit.craftbukkit.inventory.CraftMetaItem.ItemMetaKey; import org.bukkit.craftbukkit.inventory.CraftMetaItem.SerializableMeta; import org.bukkit.enchantments.Enchantment; import org.bukkit.inventory.meta.EnchantmentStorageMeta; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEntityTag.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEntityTag.java index 325fec72a..e6ceba781 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEntityTag.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEntityTag.java @@ -6,6 +6,7 @@ import net.minecraft.server.NBTBase; import net.minecraft.server.NBTTagCompound; import org.bukkit.Material; import org.bukkit.configuration.serialization.DelegateDeserialization; +import org.bukkit.craftbukkit.inventory.CraftMetaItem.ItemMetaKey; @DelegateDeserialization(CraftMetaItem.SerializableMeta.class) public class CraftMetaEntityTag extends CraftMetaItem { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java index e57a0ebf3..10fb58be7 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java @@ -14,6 +14,7 @@ import org.bukkit.FireworkEffect; import org.bukkit.FireworkEffect.Type; import org.bukkit.Material; import org.bukkit.configuration.serialization.DelegateDeserialization; +import org.bukkit.craftbukkit.inventory.CraftMetaItem.ItemMetaKey; import org.bukkit.craftbukkit.inventory.CraftMetaItem.ItemMetaKey.Specific; import org.bukkit.craftbukkit.inventory.CraftMetaItem.ItemMetaKey.Specific.To; import org.bukkit.craftbukkit.inventory.CraftMetaItem.SerializableMeta; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaKnowledgeBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaKnowledgeBook.java index 8c86fe208..b471c5d84 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaKnowledgeBook.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaKnowledgeBook.java @@ -11,6 +11,7 @@ import net.minecraft.server.NBTTagString; import org.bukkit.Material; import org.bukkit.NamespacedKey; import org.bukkit.configuration.serialization.DelegateDeserialization; +import org.bukkit.craftbukkit.inventory.CraftMetaItem.ItemMetaKey; import org.bukkit.craftbukkit.inventory.CraftMetaItem.SerializableMeta; import org.bukkit.craftbukkit.util.CraftNamespacedKey; import org.bukkit.inventory.meta.KnowledgeBookMeta; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java index 01f6bef68..c8c51bc1c 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java @@ -8,6 +8,7 @@ import net.minecraft.server.NBTTagInt; import org.bukkit.Color; import org.bukkit.Material; import org.bukkit.configuration.serialization.DelegateDeserialization; +import org.bukkit.craftbukkit.inventory.CraftMetaItem.ItemMetaKey; import org.bukkit.craftbukkit.inventory.CraftMetaItem.SerializableMeta; import org.bukkit.inventory.meta.LeatherArmorMeta; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMap.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMap.java index edfe1f773..591572e24 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMap.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMap.java @@ -10,6 +10,7 @@ import org.bukkit.Bukkit; import org.bukkit.Color; import org.bukkit.Material; import org.bukkit.configuration.serialization.DelegateDeserialization; +import org.bukkit.craftbukkit.inventory.CraftMetaItem.ItemMetaKey; import org.bukkit.craftbukkit.inventory.CraftMetaItem.SerializableMeta; import org.bukkit.craftbukkit.util.CraftMagicNumbers; import org.bukkit.inventory.meta.MapMeta; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java index f4374ac95..20f4f621d 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java @@ -12,6 +12,7 @@ import org.apache.commons.lang.Validate; import org.bukkit.Color; import org.bukkit.Material; import org.bukkit.configuration.serialization.DelegateDeserialization; +import org.bukkit.craftbukkit.inventory.CraftMetaItem.ItemMetaKey; import org.bukkit.craftbukkit.inventory.CraftMetaItem.SerializableMeta; import org.bukkit.craftbukkit.potion.CraftPotionUtil; import org.bukkit.craftbukkit.util.CraftMagicNumbers; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java index 55c86a893..10cbc3240 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java @@ -13,6 +13,7 @@ import org.bukkit.Material; import org.bukkit.OfflinePlayer; import org.bukkit.configuration.serialization.DelegateDeserialization; import org.bukkit.craftbukkit.entity.CraftPlayer; +import org.bukkit.craftbukkit.inventory.CraftMetaItem.ItemMetaKey; import org.bukkit.craftbukkit.inventory.CraftMetaItem.SerializableMeta; import org.bukkit.craftbukkit.util.CraftMagicNumbers; import org.bukkit.inventory.meta.SkullMeta; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java index 592017c81..973a1895c 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java @@ -7,6 +7,8 @@ import net.minecraft.server.NBTBase; import net.minecraft.server.NBTTagCompound; import org.bukkit.Material; import org.bukkit.configuration.serialization.DelegateDeserialization; +import org.bukkit.craftbukkit.inventory.CraftMetaItem.ItemMetaKey; +import org.bukkit.craftbukkit.inventory.CraftMetaItem.SerializableMeta; import org.bukkit.craftbukkit.util.CraftLegacy; import org.bukkit.entity.EntityType; import org.bukkit.inventory.meta.SpawnEggMeta; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSuspiciousStew.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSuspiciousStew.java index 00bacfe74..6a2d5c53f 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSuspiciousStew.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSuspiciousStew.java @@ -11,6 +11,8 @@ import net.minecraft.server.NBTTagList; import org.apache.commons.lang.Validate; import org.bukkit.Material; import org.bukkit.configuration.serialization.DelegateDeserialization; +import org.bukkit.craftbukkit.inventory.CraftMetaItem.ItemMetaKey; +import org.bukkit.craftbukkit.inventory.CraftMetaItem.SerializableMeta; import org.bukkit.craftbukkit.util.CraftMagicNumbers; import org.bukkit.inventory.meta.SuspiciousStewMeta; import org.bukkit.potion.PotionEffect; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTropicalFishBucket.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTropicalFishBucket.java index 11cfc9843..b9411382e 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTropicalFishBucket.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTropicalFishBucket.java @@ -8,6 +8,7 @@ import org.bukkit.DyeColor; import org.bukkit.Material; import org.bukkit.configuration.serialization.DelegateDeserialization; import org.bukkit.craftbukkit.entity.CraftTropicalFish; +import org.bukkit.craftbukkit.inventory.CraftMetaItem.ItemMetaKey; import org.bukkit.craftbukkit.inventory.CraftMetaItem.SerializableMeta; import org.bukkit.craftbukkit.util.CraftMagicNumbers; import org.bukkit.entity.TropicalFish; diff --git a/src/main/java/org/bukkit/craftbukkit/map/CraftMapView.java b/src/main/java/org/bukkit/craftbukkit/map/CraftMapView.java index 2c21c5a44..587d6690d 100644 --- a/src/main/java/org/bukkit/craftbukkit/map/CraftMapView.java +++ b/src/main/java/org/bukkit/craftbukkit/map/CraftMapView.java @@ -16,6 +16,7 @@ import org.bukkit.craftbukkit.CraftWorld; import org.bukkit.craftbukkit.entity.CraftPlayer; import org.bukkit.map.MapRenderer; import org.bukkit.map.MapView; +import org.bukkit.map.MapView.Scale; public final class CraftMapView implements MapView { diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java index a85fbbb69..b67f2deb8 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java @@ -5,7 +5,6 @@ import org.bukkit.Bukkit; import org.bukkit.plugin.Plugin; import org.bukkit.scheduler.BukkitTask; - class CraftTask implements BukkitTask, Runnable { private volatile CraftTask next = null; diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java index 0fba3d2a8..6c24db0d2 100644 --- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java +++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java @@ -12,6 +12,8 @@ import org.bukkit.OfflinePlayer; import org.bukkit.craftbukkit.util.CraftChatMessage; import org.bukkit.scoreboard.NameTagVisibility; import org.bukkit.scoreboard.Team; +import org.bukkit.scoreboard.Team.Option; +import org.bukkit.scoreboard.Team.OptionStatus; final class CraftTeam extends CraftScoreboardComponent implements Team { private final ScoreboardTeam team; diff --git a/src/main/java/org/bukkit/craftbukkit/util/Waitable.java b/src/main/java/org/bukkit/craftbukkit/util/Waitable.java index a7ec02287..9c23b7693 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/Waitable.java +++ b/src/main/java/org/bukkit/craftbukkit/util/Waitable.java @@ -2,7 +2,6 @@ package org.bukkit.craftbukkit.util; import java.util.concurrent.ExecutionException; - public abstract class Waitable implements Runnable { private enum Status { WAITING, diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/CompositeSerialization.java b/src/test/java/org/bukkit/craftbukkit/inventory/CompositeSerialization.java index 4a85b083b..1bbfa365b 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/CompositeSerialization.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/CompositeSerialization.java @@ -15,7 +15,6 @@ import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.support.AbstractTestingBase; import org.junit.Test; - public class CompositeSerialization extends AbstractTestingBase { public YamlConfiguration getConfig() { diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackBookTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackBookTest.java index c7d10b089..7b107a3c3 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackBookTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackBookTest.java @@ -4,6 +4,9 @@ import com.google.common.base.Joiner; import java.util.Arrays; import java.util.List; import org.bukkit.Material; +import org.bukkit.craftbukkit.inventory.ItemStackTest.CompoundOperator; +import org.bukkit.craftbukkit.inventory.ItemStackTest.Operator; +import org.bukkit.craftbukkit.inventory.ItemStackTest.StackProvider; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.BookMeta; import org.junit.runner.RunWith; diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackEnchantStorageTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackEnchantStorageTest.java index 157eef07e..349c9c8aa 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackEnchantStorageTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackEnchantStorageTest.java @@ -4,6 +4,9 @@ import com.google.common.base.Joiner; import java.util.Arrays; import java.util.List; import org.bukkit.Material; +import org.bukkit.craftbukkit.inventory.ItemStackTest.CompoundOperator; +import org.bukkit.craftbukkit.inventory.ItemStackTest.Operator; +import org.bukkit.craftbukkit.inventory.ItemStackTest.StackProvider; import org.bukkit.enchantments.Enchantment; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.EnchantmentStorageMeta; diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackFireworkChargeTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackFireworkChargeTest.java index 1515ec200..989a67ed2 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackFireworkChargeTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackFireworkChargeTest.java @@ -7,6 +7,9 @@ import org.bukkit.Color; import org.bukkit.FireworkEffect; import org.bukkit.FireworkEffect.Type; import org.bukkit.Material; +import org.bukkit.craftbukkit.inventory.ItemStackTest.CompoundOperator; +import org.bukkit.craftbukkit.inventory.ItemStackTest.Operator; +import org.bukkit.craftbukkit.inventory.ItemStackTest.StackProvider; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.FireworkEffectMeta; import org.junit.runner.RunWith; diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackFireworkTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackFireworkTest.java index 31fc6046a..028b7e359 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackFireworkTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackFireworkTest.java @@ -7,6 +7,9 @@ import org.bukkit.Color; import org.bukkit.FireworkEffect; import org.bukkit.FireworkEffect.Type; import org.bukkit.Material; +import org.bukkit.craftbukkit.inventory.ItemStackTest.CompoundOperator; +import org.bukkit.craftbukkit.inventory.ItemStackTest.Operator; +import org.bukkit.craftbukkit.inventory.ItemStackTest.StackProvider; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.FireworkMeta; import org.junit.runner.RunWith; diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackLeatherTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackLeatherTest.java index 9dea89e75..99ec53dec 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackLeatherTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackLeatherTest.java @@ -5,6 +5,9 @@ import java.util.Arrays; import java.util.List; import org.bukkit.Color; import org.bukkit.Material; +import org.bukkit.craftbukkit.inventory.ItemStackTest.CompoundOperator; +import org.bukkit.craftbukkit.inventory.ItemStackTest.Operator; +import org.bukkit.craftbukkit.inventory.ItemStackTest.StackProvider; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.LeatherArmorMeta; import org.junit.runner.RunWith; diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackLoreEnchantmentTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackLoreEnchantmentTest.java index 339b45191..a9e3de37c 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackLoreEnchantmentTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackLoreEnchantmentTest.java @@ -3,6 +3,9 @@ package org.bukkit.craftbukkit.inventory; import com.google.common.base.Joiner; import java.util.Arrays; import java.util.List; +import org.bukkit.craftbukkit.inventory.ItemStackTest.CompoundOperator; +import org.bukkit.craftbukkit.inventory.ItemStackTest.Operator; +import org.bukkit.craftbukkit.inventory.ItemStackTest.StackProvider; import org.bukkit.enchantments.Enchantment; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackMapTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackMapTest.java index fb36575b0..70285d999 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackMapTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackMapTest.java @@ -4,6 +4,9 @@ import com.google.common.base.Joiner; import java.util.Arrays; import java.util.List; import org.bukkit.Material; +import org.bukkit.craftbukkit.inventory.ItemStackTest.CompoundOperator; +import org.bukkit.craftbukkit.inventory.ItemStackTest.Operator; +import org.bukkit.craftbukkit.inventory.ItemStackTest.StackProvider; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.MapMeta; import org.junit.runner.RunWith; diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackPotionsTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackPotionsTest.java index f7cf39fdd..cf2f3b5ab 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackPotionsTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackPotionsTest.java @@ -4,6 +4,9 @@ import com.google.common.base.Joiner; import java.util.Arrays; import java.util.List; import org.bukkit.Material; +import org.bukkit.craftbukkit.inventory.ItemStackTest.CompoundOperator; +import org.bukkit.craftbukkit.inventory.ItemStackTest.Operator; +import org.bukkit.craftbukkit.inventory.ItemStackTest.StackProvider; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.PotionMeta; import org.bukkit.potion.PotionEffectType; diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackSkullTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackSkullTest.java index 0ac5e8cb5..2040942bd 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackSkullTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackSkullTest.java @@ -4,6 +4,9 @@ import com.google.common.base.Joiner; import java.util.Arrays; import java.util.List; import org.bukkit.Material; +import org.bukkit.craftbukkit.inventory.ItemStackTest.CompoundOperator; +import org.bukkit.craftbukkit.inventory.ItemStackTest.Operator; +import org.bukkit.craftbukkit.inventory.ItemStackTest.StackProvider; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.SkullMeta; import org.junit.runner.RunWith; diff --git a/src/test/java/org/bukkit/craftbukkit/util/CraftChatMessageTest.java b/src/test/java/org/bukkit/craftbukkit/util/CraftChatMessageTest.java index 9169a2b4d..db11d48ab 100644 --- a/src/test/java/org/bukkit/craftbukkit/util/CraftChatMessageTest.java +++ b/src/test/java/org/bukkit/craftbukkit/util/CraftChatMessageTest.java @@ -1,7 +1,6 @@ package org.bukkit.craftbukkit.util; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.Assert.*; import net.minecraft.server.ChatComponentText; import net.minecraft.server.IChatBaseComponent; import net.minecraft.server.IChatMutableComponent; diff --git a/src/test/java/org/bukkit/map/MapTest.java b/src/test/java/org/bukkit/map/MapTest.java index 2dde26d3f..029834a1e 100644 --- a/src/test/java/org/bukkit/map/MapTest.java +++ b/src/test/java/org/bukkit/map/MapTest.java @@ -1,4 +1,3 @@ - package org.bukkit.map; import java.awt.Color;