From 90d6905b1587ac1c5c075e2da471f77d00e0f50d Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 16 Mar 2021 09:00:00 +1100 Subject: [PATCH] Repackage NMS --- applyPatches.sh | 16 +- checkstyle.xml | 2 +- makePatches.sh | 11 +- nms-patches/net/minecraft/CrashReport.patch | 4 +- .../minecraft/advancements/Advancement.patch | 8 +- .../minecraft/advancements/Advancements.patch | 6 +- .../commands/CommandDispatcher.patch | 16 +- .../commands/CommandListenerWrapper.patch | 18 +- .../minecraft/commands/ICommandListener.patch | 8 +- .../commands/arguments/ArgumentEntity.patch | 6 +- .../arguments/blocks/ArgumentBlock.patch | 12 +- .../selector/ArgumentParserSelector.patch | 12 +- .../arguments/selector/EntitySelector.patch | 6 +- .../core/dispenser/DispenseBehaviorBoat.patch | 11 +- .../core/dispenser/DispenseBehaviorItem.patch | 13 +- .../DispenseBehaviorProjectile.patch | 13 +- .../dispenser/DispenseBehaviorShears.patch | 16 +- .../DispenseBehaviorShulkerBox.patch | 11 +- .../core/dispenser/IDispenseBehavior.patch | 47 +-- .../minecraft/network/NetworkManager.patch | 8 +- .../network/PacketDataSerializer.patch | 18 +- .../minecraft/network/chat/ChatHexColor.patch | 8 +- .../minecraft/network/chat/ChatModifier.patch | 6 +- .../network/chat/IChatBaseComponent.patch | 10 +- .../protocol/PlayerConnectionUtils.patch | 20 +- .../game/PacketPlayInCloseWindow.patch | 6 +- .../game/PacketPlayOutMultiBlockChange.patch | 8 +- .../game/PacketPlayOutWorldBorder.patch | 6 +- .../network/syncher/DataWatcher.patch | 6 +- .../server/AdvancementDataPlayer.patch | 4 +- .../minecraft/server/CustomFunctionData.patch | 4 +- .../minecraft/server/DispenserRegistry.patch | 15 +- nms-patches/net/minecraft/server/Main.patch | 39 ++- .../minecraft/server/MinecraftServer.patch | 51 ++-- .../minecraft/server/ScoreboardServer.patch | 24 +- .../server/bossevents/BossBattleCustom.patch | 10 +- .../server/commands/CommandEffect.patch | 10 +- .../server/commands/CommandGamemode.patch | 8 +- .../server/commands/CommandGamerule.patch | 8 +- .../server/commands/CommandReload.patch | 10 +- .../commands/CommandSpreadPlayers.patch | 12 +- .../server/commands/CommandTeleport.patch | 14 +- .../server/commands/CommandTime.patch | 16 +- .../server/dedicated/DedicatedServer.patch | 31 +- .../dedicated/DedicatedServerProperties.patch | 24 +- .../dedicated/DedicatedServerSettings.patch | 16 +- .../server/dedicated/PropertyManager.patch | 32 +- .../net/minecraft/server/gui/ServerGUI.patch | 8 +- .../server/level/ChunkMapDistance.patch | 16 +- .../server/level/ChunkProviderServer.patch | 22 +- .../minecraft/server/level/EntityPlayer.patch | 101 ++++--- .../server/level/EntityTrackerEntry.patch | 26 +- .../minecraft/server/level/PlayerChunk.patch | 31 +- .../server/level/PlayerChunkMap.patch | 32 +- .../server/level/PlayerInteractManager.patch | 38 ++- .../level/RegionLimitedWorldAccess.patch | 6 +- .../minecraft/server/level/TicketType.patch | 6 +- .../minecraft/server/level/WorldServer.patch | 145 ++++++--- .../server/network/HandshakeListener.patch | 13 +- .../server/network/LegacyPingHandler.patch | 10 +- .../server/network/LoginListener.patch | 19 +- .../server/network/PacketStatusListener.patch | 14 +- .../server/network/PlayerConnection.patch | 115 ++++---- .../server/network/ServerConnection.patch | 6 +- .../server/players/ExpirableListEntry.patch | 8 +- .../minecraft/server/players/JsonList.patch | 16 +- .../NameReferencingFileConverter.patch | 26 +- .../minecraft/server/players/PlayerList.patch | 64 ++-- .../rcon/RemoteControlCommandListener.patch | 6 +- .../minecraft/stats/RecipeBookServer.patch | 10 +- .../minecraft/stats/StatisticManager.patch | 6 +- .../util/datafix/DataConverterRegistry.patch | 6 +- .../datafix/fixes/DataConverterFlatten.patch | 6 +- .../util/datafix/fixes/DataConverterMap.patch | 6 +- .../util/worldupdate/WorldUpgrader.patch | 26 +- .../net/minecraft/world/ChestLock.patch | 12 +- .../net/minecraft/world/IInventory.patch | 19 +- .../minecraft/world/InventoryLargeChest.patch | 11 +- .../world/InventorySubcontainer.patch | 10 +- .../world/damagesource/DamageSource.patch | 6 +- .../EntityDamageSourceIndirect.patch | 6 +- .../world/effect/MobEffectList.patch | 18 +- .../minecraft/world/effect/MobEffects.patch | 6 +- .../net/minecraft/world/entity/Entity.patch | 74 ++--- .../world/entity/EntityAgeable.patch | 12 +- .../world/entity/EntityAreaEffectCloud.patch | 15 +- .../world/entity/EntityCreature.patch | 13 +- .../world/entity/EntityExperienceOrb.patch | 18 +- .../world/entity/EntityInsentient.patch | 53 ++-- .../world/entity/EntityLightning.patch | 23 +- .../minecraft/world/entity/EntityLiving.patch | 93 +++--- .../minecraft/world/entity/EntityTypes.patch | 16 +- .../world/entity/IEntityAngerable.patch | 8 +- .../world/entity/IEntitySelector.patch | 6 +- .../world/entity/SaddleStorage.patch | 6 +- .../ai/attributes/AttributeRanged.patch | 6 +- .../behavior/BehaviorAttackTargetForget.patch | 12 +- .../ai/behavior/BehaviorAttackTargetSet.patch | 13 +- .../entity/ai/behavior/BehaviorCareer.patch | 14 +- .../entity/ai/behavior/BehaviorFarm.patch | 12 +- .../ai/behavior/BehaviorInteractDoor.patch | 12 +- .../entity/ai/behavior/BehaviorMakeLove.patch | 10 +- .../ai/behavior/BehaviorProfession.patch | 12 +- .../entity/ai/behavior/BehaviorUtil.patch | 10 +- .../ai/behavior/BehaviorWorkComposter.patch | 10 +- .../ai/goal/PathfinderGoalBreakDoor.patch | 6 +- .../ai/goal/PathfinderGoalEatTile.patch | 14 +- .../ai/goal/PathfinderGoalFollowOwner.patch | 12 +- .../entity/ai/goal/PathfinderGoalPanic.patch | 17 +- .../ai/goal/PathfinderGoalRemoveBlock.patch | 12 +- .../entity/ai/goal/PathfinderGoalSit.patch | 6 +- .../entity/ai/goal/PathfinderGoalTame.patch | 6 +- .../entity/ai/goal/PathfinderGoalTempt.patch | 14 +- .../target/PathfinderGoalDefendVillage.patch | 6 +- .../target/PathfinderGoalHurtByTarget.patch | 8 +- ...athfinderGoalNearestAttackableTarget.patch | 6 +- .../PathfinderGoalOwnerHurtByTarget.patch | 6 +- .../PathfinderGoalOwnerHurtTarget.patch | 6 +- .../ai/goal/target/PathfinderGoalTarget.patch | 14 +- .../entity/ai/village/VillageSiege.patch | 6 +- .../world/entity/ambient/EntityBat.patch | 16 +- .../world/entity/animal/EntityAnimal.patch | 21 +- .../world/entity/animal/EntityBee.patch | 24 +- .../world/entity/animal/EntityCat.patch | 14 +- .../world/entity/animal/EntityChicken.patch | 8 +- .../world/entity/animal/EntityCow.patch | 11 +- .../world/entity/animal/EntityDolphin.patch | 14 +- .../world/entity/animal/EntityFish.patch | 8 +- .../world/entity/animal/EntityFox.patch | 20 +- .../world/entity/animal/EntityIronGolem.patch | 6 +- .../entity/animal/EntityMushroomCow.patch | 14 +- .../world/entity/animal/EntityOcelot.patch | 10 +- .../world/entity/animal/EntityPanda.patch | 16 +- .../world/entity/animal/EntityParrot.patch | 14 +- .../world/entity/animal/EntityPig.patch | 12 +- .../entity/animal/EntityPufferFish.patch | 8 +- .../world/entity/animal/EntityRabbit.patch | 10 +- .../world/entity/animal/EntitySheep.patch | 22 +- .../world/entity/animal/EntitySnowman.patch | 16 +- .../world/entity/animal/EntityTurtle.patch | 12 +- .../world/entity/animal/EntityWolf.patch | 24 +- .../animal/horse/EntityHorseAbstract.patch | 26 +- .../animal/horse/EntityLlamaTrader.patch | 6 +- .../horse/PathfinderGoalHorseTrap.patch | 6 +- .../boss/enderdragon/EntityEnderCrystal.patch | 14 +- .../boss/enderdragon/EntityEnderDragon.patch | 23 +- .../phases/DragonControllerManager.patch | 10 +- .../entity/boss/wither/EntityWither.patch | 22 +- .../entity/decoration/EntityArmorStand.patch | 32 +- .../entity/decoration/EntityHanging.patch | 22 +- .../entity/decoration/EntityItemFrame.patch | 14 +- .../world/entity/decoration/EntityLeash.patch | 21 +- .../entity/decoration/EntityPainting.patch | 6 +- .../entity/item/EntityFallingBlock.patch | 16 +- .../world/entity/item/EntityItem.patch | 27 +- .../world/entity/item/EntityTNTPrimed.patch | 14 +- .../entity/monster/EntityCaveSpider.patch | 6 +- .../world/entity/monster/EntityCreeper.patch | 18 +- .../world/entity/monster/EntityEnderman.patch | 12 +- .../world/entity/monster/EntityGhast.patch | 6 +- .../entity/monster/EntityGuardianElder.patch | 6 +- .../monster/EntityIllagerIllusioner.patch | 10 +- .../entity/monster/EntityIllagerWizard.patch | 6 +- .../world/entity/monster/EntityPhantom.patch | 6 +- .../entity/monster/EntityPigZombie.patch | 12 +- .../world/entity/monster/EntityPillager.patch | 6 +- .../world/entity/monster/EntityRavager.patch | 10 +- .../world/entity/monster/EntityShulker.patch | 17 +- .../entity/monster/EntitySilverfish.patch | 12 +- .../monster/EntitySkeletonAbstract.patch | 8 +- .../entity/monster/EntitySkeletonWither.patch | 6 +- .../world/entity/monster/EntitySlime.patch | 16 +- .../world/entity/monster/EntitySpider.patch | 6 +- .../world/entity/monster/EntityStrider.patch | 6 +- .../world/entity/monster/EntityVex.patch | 8 +- .../world/entity/monster/EntityWitch.patch | 6 +- .../world/entity/monster/EntityZombie.patch | 29 +- .../entity/monster/EntityZombieHusk.patch | 6 +- .../entity/monster/EntityZombieVillager.patch | 21 +- .../monster/piglin/EntityPiglinAbstract.patch | 8 +- .../entity/monster/piglin/PiglinAI.patch | 22 +- .../world/entity/npc/EntityVillager.patch | 28 +- .../entity/npc/EntityVillagerAbstract.patch | 12 +- .../entity/npc/EntityVillagerTrader.patch | 14 +- .../world/entity/npc/MobSpawnerTrader.patch | 12 +- .../world/entity/player/EntityHuman.patch | 62 ++-- .../world/entity/player/PlayerInventory.patch | 20 +- .../world/entity/projectile/EntityArrow.patch | 15 +- .../world/entity/projectile/EntityEgg.patch | 13 +- .../entity/projectile/EntityEnderPearl.patch | 14 +- .../entity/projectile/EntityEnderSignal.patch | 8 +- .../entity/projectile/EntityEvokerFangs.patch | 6 +- .../entity/projectile/EntityFireball.patch | 15 +- .../projectile/EntityFireballFireball.patch | 8 +- .../entity/projectile/EntityFireworks.patch | 20 +- .../entity/projectile/EntityFishingHook.patch | 26 +- .../projectile/EntityLargeFireball.patch | 13 +- .../entity/projectile/EntityPotion.patch | 22 +- .../EntityProjectileThrowable.patch | 8 +- .../projectile/EntityShulkerBullet.patch | 10 +- .../projectile/EntitySmallFireball.patch | 15 +- .../projectile/EntitySpectralArrow.patch | 6 +- .../projectile/EntityThrownExpBottle.patch | 6 +- .../projectile/EntityThrownTrident.patch | 6 +- .../entity/projectile/EntityTippedArrow.patch | 12 +- .../entity/projectile/EntityWitherSkull.patch | 15 +- .../world/entity/projectile/IProjectile.patch | 14 +- .../world/entity/raid/EntityRaider.patch | 12 +- .../world/entity/raid/PersistentRaid.patch | 6 +- .../minecraft/world/entity/raid/Raid.patch | 30 +- .../world/entity/vehicle/EntityBoat.patch | 26 +- .../vehicle/EntityMinecartAbstract.patch | 38 +-- .../vehicle/EntityMinecartCommandBlock.patch | 6 +- .../vehicle/EntityMinecartContainer.patch | 12 +- .../minecraft/world/food/FoodMetaData.patch | 29 +- .../minecraft/world/inventory/Container.patch | 24 +- .../world/inventory/ContainerAccess.patch | 8 +- .../world/inventory/ContainerAnvil.patch | 20 +- .../inventory/ContainerAnvilAbstract.patch | 6 +- .../world/inventory/ContainerBeacon.patch | 20 +- .../inventory/ContainerBrewingStand.patch | 13 +- .../inventory/ContainerCartography.patch | 15 +- .../world/inventory/ContainerChest.patch | 14 +- .../world/inventory/ContainerDispenser.patch | 15 +- .../inventory/ContainerEnchantTable.patch | 29 +- .../world/inventory/ContainerFurnace.patch | 19 +- .../world/inventory/ContainerGrindstone.patch | 16 +- .../world/inventory/ContainerHopper.patch | 13 +- .../world/inventory/ContainerHorse.patch | 9 +- .../world/inventory/ContainerLectern.patch | 16 +- .../world/inventory/ContainerLoom.patch | 17 +- .../world/inventory/ContainerMerchant.patch | 13 +- .../world/inventory/ContainerPlayer.patch | 16 +- .../world/inventory/ContainerShulkerBox.patch | 11 +- .../world/inventory/ContainerSmithing.patch | 14 +- .../inventory/ContainerStonecutter.patch | 16 +- .../world/inventory/ContainerWorkbench.patch | 22 +- .../world/inventory/Containers.patch | 19 +- .../inventory/InventoryCraftResult.patch | 10 +- .../world/inventory/InventoryCrafting.patch | 14 +- .../world/inventory/InventoryEnderChest.patch | 9 +- .../world/inventory/InventoryMerchant.patch | 14 +- .../world/inventory/SlotFurnaceResult.patch | 6 +- .../net/minecraft/world/item/ItemArmor.patch | 12 +- .../minecraft/world/item/ItemArmorStand.patch | 6 +- .../net/minecraft/world/item/ItemBlock.patch | 23 +- .../net/minecraft/world/item/ItemBoat.patch | 12 +- .../minecraft/world/item/ItemBoneMeal.patch | 6 +- .../net/minecraft/world/item/ItemBow.patch | 12 +- .../net/minecraft/world/item/ItemBucket.patch | 22 +- .../world/item/ItemChorusFruit.patch | 12 +- .../minecraft/world/item/ItemCrossbow.patch | 8 +- .../net/minecraft/world/item/ItemDye.patch | 12 +- .../net/minecraft/world/item/ItemEgg.patch | 10 +- .../minecraft/world/item/ItemEndCrystal.patch | 6 +- .../minecraft/world/item/ItemEnderEye.patch | 6 +- .../minecraft/world/item/ItemEnderPearl.patch | 12 +- .../minecraft/world/item/ItemFireball.patch | 6 +- .../minecraft/world/item/ItemFishingRod.patch | 13 +- .../world/item/ItemFlintAndSteel.patch | 8 +- .../minecraft/world/item/ItemHanging.patch | 11 +- .../net/minecraft/world/item/ItemLeash.patch | 12 +- .../minecraft/world/item/ItemMilkBucket.patch | 6 +- .../minecraft/world/item/ItemMinecart.patch | 13 +- .../minecraft/world/item/ItemMonsterEgg.patch | 8 +- .../net/minecraft/world/item/ItemPotion.patch | 6 +- .../net/minecraft/world/item/ItemRecord.patch | 6 +- .../net/minecraft/world/item/ItemSign.patch | 8 +- .../world/item/ItemSkullPlayer.patch | 8 +- .../minecraft/world/item/ItemSnowball.patch | 10 +- .../net/minecraft/world/item/ItemStack.patch | 43 ++- .../minecraft/world/item/ItemTrident.patch | 12 +- .../minecraft/world/item/ItemWorldMap.patch | 14 +- .../world/item/crafting/CraftingManager.patch | 16 +- .../world/item/crafting/FurnaceRecipe.patch | 11 +- .../world/item/crafting/IRecipe.patch | 6 +- .../world/item/crafting/IRecipeComplex.patch | 6 +- .../world/item/crafting/RecipeBlasting.patch | 11 +- .../world/item/crafting/RecipeCampfire.patch | 11 +- .../world/item/crafting/RecipeItemStack.patch | 8 +- .../world/item/crafting/RecipeSmithing.patch | 12 +- .../world/item/crafting/RecipeSmoking.patch | 11 +- .../item/crafting/RecipeStonecutting.patch | 11 +- .../world/item/crafting/ShapedRecipes.patch | 12 +- .../item/crafting/ShapelessRecipes.patch | 12 +- .../enchantment/EnchantmentFrostWalker.patch | 6 +- .../enchantment/EnchantmentWeaponDamage.patch | 6 +- .../world/item/enchantment/Enchantments.patch | 6 +- .../world/item/trading/IMerchant.patch | 6 +- .../world/item/trading/MerchantRecipe.patch | 13 +- .../level/CommandBlockListenerAbstract.patch | 8 +- .../net/minecraft/world/level/Explosion.patch | 27 +- .../net/minecraft/world/level/GameRules.patch | 16 +- .../world/level/GeneratorAccess.patch | 8 +- .../minecraft/world/level/IBlockAccess.patch | 10 +- .../minecraft/world/level/IWorldWriter.patch | 6 +- .../world/level/MobSpawnerAbstract.patch | 8 +- .../net/minecraft/world/level/RayTrace.patch | 8 +- .../world/level/SpawnerCreature.patch | 17 +- .../world/level/TickListServer.patch | 8 +- .../net/minecraft/world/level/World.patch | 40 +-- .../minecraft/world/level/WorldAccess.patch | 6 +- .../minecraft/world/level/block/Block.patch | 10 +- .../world/level/block/BlockBamboo.patch | 8 +- .../level/block/BlockBambooSapling.patch | 6 +- .../world/level/block/BlockBed.patch | 10 +- .../world/level/block/BlockBeehive.patch | 6 +- .../level/block/BlockButtonAbstract.patch | 16 +- .../world/level/block/BlockCactus.patch | 14 +- .../world/level/block/BlockCake.patch | 8 +- .../world/level/block/BlockCampfire.patch | 6 +- .../world/level/block/BlockCauldron.patch | 29 +- .../world/level/block/BlockChest.patch | 10 +- .../world/level/block/BlockChorusFlower.patch | 14 +- .../world/level/block/BlockCocoa.patch | 14 +- .../world/level/block/BlockCommand.patch | 8 +- .../world/level/block/BlockComposter.patch | 25 +- .../level/block/BlockConcretePowder.patch | 15 +- .../world/level/block/BlockCoral.patch | 6 +- .../world/level/block/BlockCoralFan.patch | 6 +- .../world/level/block/BlockCoralFanWall.patch | 6 +- .../world/level/block/BlockCoralPlant.patch | 6 +- .../world/level/block/BlockCrops.patch | 16 +- .../level/block/BlockDaylightDetector.patch | 6 +- .../level/block/BlockDiodeAbstract.patch | 12 +- .../level/block/BlockDirtSnowSpreadable.patch | 8 +- .../world/level/block/BlockDispenser.patch | 8 +- .../world/level/block/BlockDoor.patch | 12 +- .../world/level/block/BlockDragonEgg.patch | 11 +- .../world/level/block/BlockDropper.patch | 12 +- .../world/level/block/BlockEnderPortal.patch | 13 +- .../world/level/block/BlockFenceGate.patch | 6 +- .../world/level/block/BlockFire.patch | 24 +- .../world/level/block/BlockFireAbstract.patch | 12 +- .../world/level/block/BlockFluids.patch | 6 +- .../world/level/block/BlockFungi.patch | 6 +- .../world/level/block/BlockGrass.patch | 6 +- .../world/level/block/BlockGrassPath.patch | 6 +- .../world/level/block/BlockGrowingTop.patch | 6 +- .../world/level/block/BlockIce.patch | 6 +- .../world/level/block/BlockJukeBox.patch | 6 +- .../world/level/block/BlockLeaves.patch | 12 +- .../world/level/block/BlockLectern.patch | 6 +- .../world/level/block/BlockLever.patch | 11 +- .../world/level/block/BlockMagma.patch | 6 +- .../level/block/BlockMinecartDetector.patch | 12 +- .../world/level/block/BlockMobSpawner.patch | 6 +- .../world/level/block/BlockMonsterEggs.patch | 12 +- .../world/level/block/BlockMushroom.patch | 16 +- .../world/level/block/BlockNetherWart.patch | 6 +- .../world/level/block/BlockNote.patch | 12 +- .../world/level/block/BlockObserver.patch | 12 +- .../world/level/block/BlockOre.patch | 8 +- .../world/level/block/BlockPlant.patch | 6 +- .../world/level/block/BlockPortal.patch | 14 +- .../world/level/block/BlockPoweredRail.patch | 11 +- .../block/BlockPressurePlateAbstract.patch | 12 +- .../block/BlockPressurePlateBinary.patch | 12 +- .../block/BlockPressurePlateWeighted.patch | 11 +- .../level/block/BlockPumpkinCarved.patch | 16 +- .../level/block/BlockRedstoneComparator.patch | 14 +- .../world/level/block/BlockRedstoneLamp.patch | 14 +- .../world/level/block/BlockRedstoneOre.patch | 20 +- .../level/block/BlockRedstoneTorch.patch | 14 +- .../world/level/block/BlockRedstoneWire.patch | 12 +- .../world/level/block/BlockReed.patch | 6 +- .../world/level/block/BlockSapling.patch | 12 +- .../world/level/block/BlockScaffolding.patch | 6 +- .../world/level/block/BlockSnow.patch | 6 +- .../world/level/block/BlockSoil.patch | 12 +- .../world/level/block/BlockSponge.patch | 16 +- .../world/level/block/BlockStem.patch | 14 +- .../level/block/BlockSweetBerryBush.patch | 16 +- .../world/level/block/BlockTNT.patch | 6 +- .../world/level/block/BlockTallPlant.patch | 6 +- .../world/level/block/BlockTrapdoor.patch | 12 +- .../world/level/block/BlockTripwire.patch | 12 +- .../world/level/block/BlockTripwireHook.patch | 12 +- .../world/level/block/BlockTurtleEgg.patch | 16 +- .../world/level/block/BlockVine.patch | 16 +- .../world/level/block/BlockWaterLily.patch | 6 +- .../world/level/block/BlockWitherRose.patch | 6 +- .../world/level/block/BlockWitherSkull.patch | 18 +- .../world/level/block/entity/TileEntity.patch | 14 +- .../level/block/entity/TileEntityBanner.patch | 6 +- .../level/block/entity/TileEntityBarrel.patch | 11 +- .../level/block/entity/TileEntityBeacon.patch | 16 +- .../block/entity/TileEntityBeehive.patch | 28 +- .../block/entity/TileEntityBrewingStand.patch | 19 +- .../block/entity/TileEntityCampfire.patch | 12 +- .../level/block/entity/TileEntityChest.patch | 23 +- .../block/entity/TileEntityCommand.patch | 6 +- .../block/entity/TileEntityConduit.patch | 18 +- .../block/entity/TileEntityContainer.patch | 6 +- .../block/entity/TileEntityDispenser.patch | 10 +- .../block/entity/TileEntityEndGateway.patch | 13 +- .../block/entity/TileEntityFurnace.patch | 24 +- .../level/block/entity/TileEntityHopper.patch | 18 +- .../block/entity/TileEntityLectern.patch | 20 +- .../block/entity/TileEntityShulkerBox.patch | 16 +- .../level/block/entity/TileEntitySign.patch | 18 +- .../grower/WorldGenMegaTreeProvider.patch | 6 +- .../block/grower/WorldGenTreeProvider.patch | 20 +- .../level/block/piston/BlockPiston.patch | 14 +- .../state/properties/BlockStateInteger.patch | 4 +- .../world/level/border/WorldBorder.patch | 10 +- .../world/level/chunk/BiomeStorage.patch | 6 +- .../minecraft/world/level/chunk/Chunk.patch | 38 +-- .../world/level/chunk/ChunkGenerator.patch | 8 +- .../world/level/chunk/ChunkStatus.patch | 8 +- .../chunk/storage/ChunkRegionLoader.patch | 16 +- .../level/chunk/storage/IChunkLoader.patch | 21 +- .../level/chunk/storage/RegionFileCache.patch | 12 +- .../levelgen/ChunkGeneratorAbstract.patch | 10 +- .../level/levelgen/MobSpawnerPatrol.patch | 6 +- .../level/levelgen/MobSpawnerPhantom.patch | 6 +- .../structure/PersistentStructureLegacy.patch | 16 +- .../levelgen/structure/WorldGenWitchHut.patch | 8 +- .../templatesystem/DefinedStructure.patch | 12 +- .../DefinedStructureManager.patch | 8 +- .../level/material/FluidTypeFlowing.patch | 16 +- .../world/level/material/FluidTypeLava.patch | 10 +- .../world/level/portal/BlockPortalShape.patch | 20 +- .../level/portal/PortalTravelAgent.patch | 20 +- .../level/portal/ShapeDetectorShape.patch | 14 +- .../world/level/saveddata/maps/WorldMap.patch | 14 +- .../world/level/storage/Convertable.patch | 36 ++- .../world/level/storage/WorldDataServer.patch | 25 +- .../world/level/storage/WorldNBTStorage.patch | 13 +- .../world/level/storage/loot/LootTable.patch | 8 +- .../storage/loot/LootTableRegistry.patch | 12 +- .../loot/entries/LootEntryAbstract.patch | 6 +- .../loot/functions/LootEnchantFunction.patch | 8 +- .../parameters/LootContextParameters.patch | 6 +- ...ItemConditionRandomChanceWithLooting.patch | 6 +- .../LootItemConditionSurvivesExplosion.patch | 6 +- pom.xml | 10 +- .../mojang/brigadier/tree/CommandNode.java | 2 +- .../java/org/bukkit/craftbukkit/CraftArt.java | 6 +- .../org/bukkit/craftbukkit/CraftChunk.java | 60 ++-- .../craftbukkit/CraftChunkSnapshot.java | 14 +- .../bukkit/craftbukkit/CraftCrashReport.java | 2 +- .../org/bukkit/craftbukkit/CraftEffect.java | 4 +- .../craftbukkit/CraftEquipmentSlot.java | 2 +- .../craftbukkit/CraftFluidCollisionMode.java | 2 +- .../bukkit/craftbukkit/CraftHeightMap.java | 18 +- .../bukkit/craftbukkit/CraftIpBanEntry.java | 4 +- .../bukkit/craftbukkit/CraftIpBanList.java | 4 +- .../bukkit/craftbukkit/CraftLootTable.java | 26 +- .../craftbukkit/CraftOfflinePlayer.java | 8 +- .../org/bukkit/craftbukkit/CraftParticle.java | 26 +- .../craftbukkit/CraftProfileBanEntry.java | 4 +- .../craftbukkit/CraftProfileBanList.java | 6 +- .../org/bukkit/craftbukkit/CraftRaid.java | 10 +- .../org/bukkit/craftbukkit/CraftServer.java | 134 ++++----- .../org/bukkit/craftbukkit/CraftSound.java | 6 +- .../bukkit/craftbukkit/CraftSoundGroup.java | 8 +- .../bukkit/craftbukkit/CraftStatistic.java | 42 +-- .../org/bukkit/craftbukkit/CraftWorld.java | 192 ++++++------ .../bukkit/craftbukkit/CraftWorldBorder.java | 4 +- .../advancement/CraftAdvancement.java | 2 +- .../advancement/CraftAdvancementProgress.java | 6 +- .../attribute/CraftAttributeInstance.java | 12 +- .../attribute/CraftAttributeMap.java | 8 +- .../craftbukkit/block/CapturedBlockState.java | 14 +- .../bukkit/craftbukkit/block/CraftBanner.java | 10 +- .../bukkit/craftbukkit/block/CraftBarrel.java | 8 +- .../bukkit/craftbukkit/block/CraftBeacon.java | 10 +- .../bukkit/craftbukkit/block/CraftBed.java | 2 +- .../craftbukkit/block/CraftBeehive.java | 8 +- .../bukkit/craftbukkit/block/CraftBell.java | 2 +- .../craftbukkit/block/CraftBlastFurnace.java | 2 +- .../bukkit/craftbukkit/block/CraftBlock.java | 70 ++--- .../block/CraftBlockEntityState.java | 6 +- .../craftbukkit/block/CraftBlockState.java | 10 +- .../craftbukkit/block/CraftBrewingStand.java | 2 +- .../craftbukkit/block/CraftCampfire.java | 4 +- .../bukkit/craftbukkit/block/CraftChest.java | 14 +- .../craftbukkit/block/CraftCommandBlock.java | 2 +- .../craftbukkit/block/CraftComparator.java | 2 +- .../craftbukkit/block/CraftConduit.java | 2 +- .../craftbukkit/block/CraftContainer.java | 4 +- .../block/CraftCreatureSpawner.java | 6 +- .../block/CraftDaylightDetector.java | 2 +- .../craftbukkit/block/CraftDispenser.java | 6 +- .../craftbukkit/block/CraftDropper.java | 6 +- .../block/CraftEnchantingTable.java | 2 +- .../craftbukkit/block/CraftEndGateway.java | 4 +- .../craftbukkit/block/CraftEnderChest.java | 2 +- .../craftbukkit/block/CraftFurnace.java | 4 +- .../block/CraftFurnaceFurnace.java | 2 +- .../bukkit/craftbukkit/block/CraftHopper.java | 2 +- .../bukkit/craftbukkit/block/CraftJigsaw.java | 2 +- .../craftbukkit/block/CraftJukebox.java | 10 +- .../craftbukkit/block/CraftLectern.java | 4 +- .../craftbukkit/block/CraftLootable.java | 4 +- .../craftbukkit/block/CraftShulkerBox.java | 12 +- .../bukkit/craftbukkit/block/CraftSign.java | 8 +- .../bukkit/craftbukkit/block/CraftSkull.java | 2 +- .../bukkit/craftbukkit/block/CraftSmoker.java | 2 +- .../block/CraftStructureBlock.java | 10 +- .../craftbukkit/block/data/CraftAgeable.java | 2 +- .../block/data/CraftAnaloguePowerable.java | 2 +- .../block/data/CraftAttachable.java | 2 +- .../craftbukkit/block/data/CraftBisected.java | 2 +- .../block/data/CraftBlockData.java | 278 +++++++++--------- .../block/data/CraftDirectional.java | 2 +- .../block/data/CraftFaceAttachable.java | 2 +- .../craftbukkit/block/data/CraftLevelled.java | 2 +- .../block/data/CraftLightable.java | 2 +- .../block/data/CraftMultipleFacing.java | 6 +- .../craftbukkit/block/data/CraftOpenable.java | 2 +- .../block/data/CraftOrientable.java | 2 +- .../block/data/CraftPowerable.java | 2 +- .../craftbukkit/block/data/CraftRail.java | 2 +- .../block/data/CraftRotatable.java | 2 +- .../craftbukkit/block/data/CraftSnowable.java | 2 +- .../block/data/CraftWaterlogged.java | 2 +- .../block/data/type/CraftBamboo.java | 2 +- .../craftbukkit/block/data/type/CraftBed.java | 4 +- .../block/data/type/CraftBeehive.java | 2 +- .../block/data/type/CraftBell.java | 2 +- .../block/data/type/CraftBrewingStand.java | 2 +- .../block/data/type/CraftBubbleColumn.java | 2 +- .../block/data/type/CraftCake.java | 2 +- .../block/data/type/CraftCampfire.java | 2 +- .../block/data/type/CraftChest.java | 2 +- .../block/data/type/CraftCommandBlock.java | 2 +- .../block/data/type/CraftComparator.java | 2 +- .../data/type/CraftDaylightDetector.java | 2 +- .../block/data/type/CraftDispenser.java | 2 +- .../block/data/type/CraftDoor.java | 2 +- .../block/data/type/CraftEndPortalFrame.java | 2 +- .../block/data/type/CraftFarmland.java | 2 +- .../block/data/type/CraftGate.java | 2 +- .../block/data/type/CraftHopper.java | 2 +- .../block/data/type/CraftJigsaw.java | 2 +- .../block/data/type/CraftJukebox.java | 2 +- .../block/data/type/CraftLantern.java | 2 +- .../block/data/type/CraftLeaves.java | 4 +- .../block/data/type/CraftLectern.java | 2 +- .../block/data/type/CraftNoteBlock.java | 4 +- .../block/data/type/CraftPiston.java | 2 +- .../block/data/type/CraftPistonHead.java | 2 +- .../block/data/type/CraftRedstoneWire.java | 8 +- .../block/data/type/CraftRepeater.java | 4 +- .../block/data/type/CraftRespawnAnchor.java | 2 +- .../block/data/type/CraftSapling.java | 2 +- .../block/data/type/CraftScaffolding.java | 4 +- .../block/data/type/CraftSeaPickle.java | 2 +- .../block/data/type/CraftSlab.java | 2 +- .../block/data/type/CraftSnow.java | 2 +- .../block/data/type/CraftStairs.java | 2 +- .../block/data/type/CraftStructureBlock.java | 2 +- .../block/data/type/CraftSwitch.java | 2 +- .../craftbukkit/block/data/type/CraftTNT.java | 2 +- .../block/data/type/CraftTechnicalPiston.java | 2 +- .../block/data/type/CraftTripwire.java | 2 +- .../block/data/type/CraftTurtleEgg.java | 4 +- .../block/data/type/CraftWall.java | 4 +- .../craftbukkit/block/impl/CraftAnvil.java | 4 +- .../craftbukkit/block/impl/CraftBamboo.java | 8 +- .../craftbukkit/block/impl/CraftBanner.java | 4 +- .../block/impl/CraftBannerWall.java | 4 +- .../craftbukkit/block/impl/CraftBarrel.java | 4 +- .../craftbukkit/block/impl/CraftBed.java | 8 +- .../craftbukkit/block/impl/CraftBeehive.java | 6 +- .../craftbukkit/block/impl/CraftBeetroot.java | 4 +- .../craftbukkit/block/impl/CraftBell.java | 8 +- .../block/impl/CraftBlastFurnace.java | 6 +- .../block/impl/CraftBrewingStand.java | 6 +- .../block/impl/CraftBubbleColumn.java | 4 +- .../craftbukkit/block/impl/CraftCactus.java | 4 +- .../craftbukkit/block/impl/CraftCake.java | 4 +- .../craftbukkit/block/impl/CraftCampfire.java | 10 +- .../craftbukkit/block/impl/CraftCarrots.java | 4 +- .../craftbukkit/block/impl/CraftCauldron.java | 4 +- .../craftbukkit/block/impl/CraftChain.java | 6 +- .../craftbukkit/block/impl/CraftChest.java | 8 +- .../block/impl/CraftChestTrapped.java | 8 +- .../block/impl/CraftChorusFlower.java | 4 +- .../block/impl/CraftChorusFruit.java | 10 +- .../block/impl/CraftCobbleWall.java | 10 +- .../craftbukkit/block/impl/CraftCocoa.java | 6 +- .../craftbukkit/block/impl/CraftCommand.java | 6 +- .../block/impl/CraftComposter.java | 4 +- .../craftbukkit/block/impl/CraftConduit.java | 4 +- .../block/impl/CraftCoralDead.java | 4 +- .../craftbukkit/block/impl/CraftCoralFan.java | 4 +- .../block/impl/CraftCoralFanAbstract.java | 4 +- .../block/impl/CraftCoralFanWall.java | 6 +- .../block/impl/CraftCoralFanWallAbstract.java | 6 +- .../block/impl/CraftCoralPlant.java | 4 +- .../craftbukkit/block/impl/CraftCrops.java | 4 +- .../block/impl/CraftDaylightDetector.java | 6 +- .../craftbukkit/block/impl/CraftDirtSnow.java | 4 +- .../block/impl/CraftDispenser.java | 6 +- .../craftbukkit/block/impl/CraftDoor.java | 12 +- .../craftbukkit/block/impl/CraftDropper.java | 6 +- .../craftbukkit/block/impl/CraftEndRod.java | 4 +- .../block/impl/CraftEnderChest.java | 6 +- .../block/impl/CraftEnderPortalFrame.java | 6 +- .../craftbukkit/block/impl/CraftFence.java | 12 +- .../block/impl/CraftFenceGate.java | 10 +- .../craftbukkit/block/impl/CraftFire.java | 12 +- .../block/impl/CraftFloorSign.java | 6 +- .../craftbukkit/block/impl/CraftFluids.java | 4 +- .../block/impl/CraftFurnaceFurace.java | 6 +- .../block/impl/CraftGlazedTerracotta.java | 4 +- .../craftbukkit/block/impl/CraftGrass.java | 4 +- .../block/impl/CraftGrindstone.java | 6 +- .../craftbukkit/block/impl/CraftHay.java | 4 +- .../craftbukkit/block/impl/CraftHopper.java | 6 +- .../block/impl/CraftHugeMushroom.java | 10 +- .../craftbukkit/block/impl/CraftIceFrost.java | 4 +- .../craftbukkit/block/impl/CraftIronBars.java | 12 +- .../craftbukkit/block/impl/CraftJigsaw.java | 4 +- .../craftbukkit/block/impl/CraftJukeBox.java | 4 +- .../craftbukkit/block/impl/CraftKelp.java | 4 +- .../craftbukkit/block/impl/CraftLadder.java | 6 +- .../craftbukkit/block/impl/CraftLantern.java | 6 +- .../craftbukkit/block/impl/CraftLeaves.java | 6 +- .../craftbukkit/block/impl/CraftLectern.java | 8 +- .../craftbukkit/block/impl/CraftLever.java | 10 +- .../craftbukkit/block/impl/CraftLoom.java | 4 +- .../block/impl/CraftMinecartDetector.java | 6 +- .../block/impl/CraftMinecartTrack.java | 4 +- .../craftbukkit/block/impl/CraftMycel.java | 4 +- .../block/impl/CraftNetherWart.java | 4 +- .../craftbukkit/block/impl/CraftNote.java | 8 +- .../craftbukkit/block/impl/CraftObserver.java | 6 +- .../craftbukkit/block/impl/CraftPiston.java | 6 +- .../block/impl/CraftPistonExtension.java | 8 +- .../block/impl/CraftPistonMoving.java | 6 +- .../craftbukkit/block/impl/CraftPortal.java | 4 +- .../craftbukkit/block/impl/CraftPotatoes.java | 4 +- .../block/impl/CraftPoweredRail.java | 6 +- .../block/impl/CraftPressurePlateBinary.java | 4 +- .../impl/CraftPressurePlateWeighted.java | 4 +- .../block/impl/CraftPumpkinCarved.java | 4 +- .../block/impl/CraftRedstoneComparator.java | 8 +- .../block/impl/CraftRedstoneLamp.java | 4 +- .../block/impl/CraftRedstoneOre.java | 4 +- .../block/impl/CraftRedstoneTorch.java | 4 +- .../block/impl/CraftRedstoneTorchWall.java | 6 +- .../block/impl/CraftRedstoneWire.java | 12 +- .../craftbukkit/block/impl/CraftReed.java | 4 +- .../craftbukkit/block/impl/CraftRepeater.java | 10 +- .../block/impl/CraftRespawnAnchor.java | 4 +- .../block/impl/CraftRotatable.java | 4 +- .../craftbukkit/block/impl/CraftSapling.java | 4 +- .../block/impl/CraftScaffolding.java | 8 +- .../block/impl/CraftSeaPickle.java | 6 +- .../block/impl/CraftShulkerBox.java | 4 +- .../craftbukkit/block/impl/CraftSkull.java | 4 +- .../block/impl/CraftSkullPlayer.java | 4 +- .../block/impl/CraftSkullPlayerWall.java | 4 +- .../block/impl/CraftSkullWall.java | 4 +- .../craftbukkit/block/impl/CraftSmoker.java | 6 +- .../craftbukkit/block/impl/CraftSnow.java | 4 +- .../craftbukkit/block/impl/CraftSoil.java | 4 +- .../block/impl/CraftStainedGlassPane.java | 12 +- .../craftbukkit/block/impl/CraftStairs.java | 10 +- .../craftbukkit/block/impl/CraftStem.java | 4 +- .../block/impl/CraftStemAttached.java | 4 +- .../block/impl/CraftStepAbstract.java | 6 +- .../block/impl/CraftStoneButton.java | 10 +- .../block/impl/CraftStonecutter.java | 4 +- .../block/impl/CraftStructure.java | 4 +- .../block/impl/CraftSweetBerryBush.java | 4 +- .../craftbukkit/block/impl/CraftTNT.java | 4 +- .../block/impl/CraftTallPlant.java | 4 +- .../block/impl/CraftTallPlantFlower.java | 4 +- .../block/impl/CraftTallSeaGrass.java | 4 +- .../craftbukkit/block/impl/CraftTarget.java | 4 +- .../block/impl/CraftTorchWall.java | 4 +- .../craftbukkit/block/impl/CraftTrapdoor.java | 12 +- .../craftbukkit/block/impl/CraftTripwire.java | 16 +- .../block/impl/CraftTripwireHook.java | 8 +- .../block/impl/CraftTurtleEgg.java | 6 +- .../block/impl/CraftTwistingVines.java | 4 +- .../craftbukkit/block/impl/CraftVine.java | 10 +- .../craftbukkit/block/impl/CraftWallSign.java | 6 +- .../block/impl/CraftWeepingVines.java | 4 +- .../block/impl/CraftWitherSkull.java | 4 +- .../block/impl/CraftWitherSkullWall.java | 4 +- .../block/impl/CraftWoodButton.java | 10 +- .../bukkit/craftbukkit/boss/CraftBossBar.java | 8 +- .../craftbukkit/boss/CraftDragonBattle.java | 6 +- .../craftbukkit/boss/CraftKeyedBossbar.java | 2 +- .../command/BukkitCommandWrapper.java | 2 +- .../command/CraftBlockCommandSender.java | 8 +- .../CraftRemoteConsoleCommandSender.java | 6 +- .../command/ProxiedNativeCommandSender.java | 2 +- .../command/VanillaCommandWrapper.java | 8 +- .../enchantments/CraftEnchantment.java | 14 +- .../entity/AbstractProjectile.java | 2 +- .../entity/CraftAbstractHorse.java | 4 +- .../entity/CraftAbstractVillager.java | 4 +- .../craftbukkit/entity/CraftAgeable.java | 2 +- .../craftbukkit/entity/CraftAmbient.java | 2 +- .../craftbukkit/entity/CraftAnimals.java | 2 +- .../entity/CraftAreaEffectCloud.java | 8 +- .../craftbukkit/entity/CraftArmorStand.java | 4 +- .../bukkit/craftbukkit/entity/CraftArrow.java | 4 +- .../bukkit/craftbukkit/entity/CraftBat.java | 2 +- .../bukkit/craftbukkit/entity/CraftBee.java | 4 +- .../bukkit/craftbukkit/entity/CraftBlaze.java | 2 +- .../bukkit/craftbukkit/entity/CraftBoat.java | 2 +- .../bukkit/craftbukkit/entity/CraftCat.java | 4 +- .../craftbukkit/entity/CraftCaveSpider.java | 2 +- .../craftbukkit/entity/CraftChestedHorse.java | 2 +- .../craftbukkit/entity/CraftChicken.java | 2 +- .../bukkit/craftbukkit/entity/CraftCod.java | 2 +- .../entity/CraftComplexLivingEntity.java | 2 +- .../craftbukkit/entity/CraftComplexPart.java | 4 +- .../bukkit/craftbukkit/entity/CraftCow.java | 2 +- .../craftbukkit/entity/CraftCreature.java | 2 +- .../craftbukkit/entity/CraftCreeper.java | 2 +- .../craftbukkit/entity/CraftDolphin.java | 2 +- .../craftbukkit/entity/CraftDonkey.java | 2 +- .../entity/CraftDragonFireball.java | 2 +- .../craftbukkit/entity/CraftDrowned.java | 2 +- .../bukkit/craftbukkit/entity/CraftEgg.java | 2 +- .../entity/CraftElderGuardian.java | 2 +- .../craftbukkit/entity/CraftEnderCrystal.java | 4 +- .../craftbukkit/entity/CraftEnderDragon.java | 6 +- .../entity/CraftEnderDragonPart.java | 2 +- .../craftbukkit/entity/CraftEnderPearl.java | 2 +- .../craftbukkit/entity/CraftEnderSignal.java | 6 +- .../craftbukkit/entity/CraftEnderman.java | 4 +- .../craftbukkit/entity/CraftEndermite.java | 2 +- .../craftbukkit/entity/CraftEntity.java | 276 ++++++++--------- .../craftbukkit/entity/CraftEvoker.java | 4 +- .../craftbukkit/entity/CraftEvokerFangs.java | 4 +- .../entity/CraftExperienceOrb.java | 2 +- .../craftbukkit/entity/CraftFallingBlock.java | 2 +- .../craftbukkit/entity/CraftFireball.java | 2 +- .../craftbukkit/entity/CraftFirework.java | 6 +- .../bukkit/craftbukkit/entity/CraftFish.java | 2 +- .../craftbukkit/entity/CraftFishHook.java | 8 +- .../craftbukkit/entity/CraftFlying.java | 2 +- .../bukkit/craftbukkit/entity/CraftFox.java | 2 +- .../bukkit/craftbukkit/entity/CraftGhast.java | 2 +- .../bukkit/craftbukkit/entity/CraftGiant.java | 2 +- .../bukkit/craftbukkit/entity/CraftGolem.java | 2 +- .../craftbukkit/entity/CraftGuardian.java | 2 +- .../craftbukkit/entity/CraftHanging.java | 4 +- .../craftbukkit/entity/CraftHoglin.java | 2 +- .../bukkit/craftbukkit/entity/CraftHorse.java | 6 +- .../craftbukkit/entity/CraftHumanEntity.java | 50 ++-- .../bukkit/craftbukkit/entity/CraftHusk.java | 2 +- .../craftbukkit/entity/CraftIllager.java | 2 +- .../craftbukkit/entity/CraftIllusioner.java | 2 +- .../craftbukkit/entity/CraftIronGolem.java | 2 +- .../bukkit/craftbukkit/entity/CraftItem.java | 4 +- .../craftbukkit/entity/CraftItemFrame.java | 12 +- .../entity/CraftLargeFireball.java | 2 +- .../bukkit/craftbukkit/entity/CraftLeash.java | 2 +- .../entity/CraftLightningStrike.java | 2 +- .../craftbukkit/entity/CraftLivingEntity.java | 70 ++--- .../bukkit/craftbukkit/entity/CraftLlama.java | 2 +- .../craftbukkit/entity/CraftLlamaSpit.java | 2 +- .../craftbukkit/entity/CraftMagmaCube.java | 2 +- .../craftbukkit/entity/CraftMinecart.java | 6 +- .../entity/CraftMinecartChest.java | 2 +- .../entity/CraftMinecartCommand.java | 2 +- .../entity/CraftMinecartContainer.java | 6 +- .../entity/CraftMinecartFurnace.java | 2 +- .../entity/CraftMinecartHopper.java | 2 +- .../entity/CraftMinecartMobSpawner.java | 2 +- .../entity/CraftMinecartRideable.java | 2 +- .../craftbukkit/entity/CraftMinecartTNT.java | 2 +- .../bukkit/craftbukkit/entity/CraftMob.java | 2 +- .../craftbukkit/entity/CraftMonster.java | 2 +- .../bukkit/craftbukkit/entity/CraftMule.java | 2 +- .../craftbukkit/entity/CraftMushroomCow.java | 2 +- .../craftbukkit/entity/CraftOcelot.java | 2 +- .../craftbukkit/entity/CraftPainting.java | 8 +- .../bukkit/craftbukkit/entity/CraftPanda.java | 2 +- .../craftbukkit/entity/CraftParrot.java | 2 +- .../craftbukkit/entity/CraftPhantom.java | 2 +- .../bukkit/craftbukkit/entity/CraftPig.java | 2 +- .../craftbukkit/entity/CraftPigZombie.java | 2 +- .../craftbukkit/entity/CraftPiglin.java | 2 +- .../entity/CraftPiglinAbstract.java | 2 +- .../craftbukkit/entity/CraftPiglinBrute.java | 2 +- .../craftbukkit/entity/CraftPillager.java | 2 +- .../craftbukkit/entity/CraftPlayer.java | 98 +++--- .../craftbukkit/entity/CraftPolarBear.java | 2 +- .../craftbukkit/entity/CraftProjectile.java | 6 +- .../craftbukkit/entity/CraftPufferFish.java | 2 +- .../craftbukkit/entity/CraftRabbit.java | 6 +- .../craftbukkit/entity/CraftRaider.java | 4 +- .../craftbukkit/entity/CraftRavager.java | 2 +- .../craftbukkit/entity/CraftSalmon.java | 2 +- .../bukkit/craftbukkit/entity/CraftSheep.java | 4 +- .../craftbukkit/entity/CraftShulker.java | 2 +- .../entity/CraftShulkerBullet.java | 2 +- .../craftbukkit/entity/CraftSilverfish.java | 2 +- .../entity/CraftSizedFireball.java | 2 +- .../craftbukkit/entity/CraftSkeleton.java | 2 +- .../entity/CraftSkeletonHorse.java | 2 +- .../bukkit/craftbukkit/entity/CraftSlime.java | 2 +- .../entity/CraftSmallFireball.java | 2 +- .../craftbukkit/entity/CraftSnowball.java | 2 +- .../craftbukkit/entity/CraftSnowman.java | 2 +- .../entity/CraftSpectralArrow.java | 2 +- .../craftbukkit/entity/CraftSpellcaster.java | 2 +- .../craftbukkit/entity/CraftSpider.java | 2 +- .../bukkit/craftbukkit/entity/CraftSquid.java | 2 +- .../bukkit/craftbukkit/entity/CraftStray.java | 2 +- .../craftbukkit/entity/CraftStrider.java | 2 +- .../craftbukkit/entity/CraftTNTPrimed.java | 4 +- .../entity/CraftTameableAnimal.java | 2 +- .../entity/CraftThrowableProjectile.java | 4 +- .../entity/CraftThrownExpBottle.java | 2 +- .../craftbukkit/entity/CraftThrownPotion.java | 6 +- .../craftbukkit/entity/CraftTippedArrow.java | 6 +- .../craftbukkit/entity/CraftTraderLlama.java | 2 +- .../craftbukkit/entity/CraftTrident.java | 2 +- .../craftbukkit/entity/CraftTropicalFish.java | 2 +- .../craftbukkit/entity/CraftTurtle.java | 2 +- .../craftbukkit/entity/CraftVehicle.java | 2 +- .../bukkit/craftbukkit/entity/CraftVex.java | 2 +- .../craftbukkit/entity/CraftVillager.java | 12 +- .../entity/CraftVillagerZombie.java | 8 +- .../craftbukkit/entity/CraftVindicator.java | 2 +- .../entity/CraftWanderingTrader.java | 6 +- .../craftbukkit/entity/CraftWaterMob.java | 2 +- .../bukkit/craftbukkit/entity/CraftWitch.java | 2 +- .../craftbukkit/entity/CraftWither.java | 2 +- .../entity/CraftWitherSkeleton.java | 2 +- .../craftbukkit/entity/CraftWitherSkull.java | 2 +- .../bukkit/craftbukkit/entity/CraftWolf.java | 4 +- .../craftbukkit/entity/CraftZoglin.java | 2 +- .../craftbukkit/entity/CraftZombie.java | 4 +- .../craftbukkit/entity/CraftZombieHorse.java | 2 +- .../entity/memory/CraftMemoryKey.java | 4 +- .../entity/memory/CraftMemoryMapper.java | 4 +- .../craftbukkit/event/CraftEventFactory.java | 116 ++++---- .../craftbukkit/generator/CraftChunkData.java | 8 +- .../generator/CustomChunkGenerator.java | 50 ++-- .../generator/InternalChunkGenerator.java | 6 +- .../inventory/CraftBlastingRecipe.java | 2 +- .../inventory/CraftBlockInventoryHolder.java | 6 +- .../inventory/CraftCampfireRecipe.java | 2 +- .../inventory/CraftComplexRecipe.java | 2 +- .../craftbukkit/inventory/CraftContainer.java | 58 ++-- .../inventory/CraftEntityEquipment.java | 4 +- .../inventory/CraftFurnaceRecipe.java | 2 +- .../craftbukkit/inventory/CraftInventory.java | 38 +-- .../CraftInventoryAbstractHorse.java | 2 +- .../inventory/CraftInventoryAnvil.java | 4 +- .../inventory/CraftInventoryBeacon.java | 2 +- .../inventory/CraftInventoryBrewer.java | 2 +- .../inventory/CraftInventoryCartography.java | 2 +- .../inventory/CraftInventoryCrafting.java | 20 +- .../inventory/CraftInventoryCustom.java | 8 +- .../inventory/CraftInventoryDoubleChest.java | 6 +- .../inventory/CraftInventoryEnchanting.java | 2 +- .../inventory/CraftInventoryFurnace.java | 2 +- .../inventory/CraftInventoryGrindstone.java | 2 +- .../inventory/CraftInventoryHorse.java | 2 +- .../inventory/CraftInventoryLectern.java | 2 +- .../inventory/CraftInventoryLlama.java | 2 +- .../inventory/CraftInventoryLoom.java | 2 +- .../inventory/CraftInventoryMerchant.java | 6 +- .../inventory/CraftInventoryPlayer.java | 10 +- .../inventory/CraftInventorySmithing.java | 2 +- .../inventory/CraftInventoryStonecutter.java | 2 +- .../inventory/CraftInventoryView.java | 4 +- .../craftbukkit/inventory/CraftItemStack.java | 46 +-- .../craftbukkit/inventory/CraftMerchant.java | 10 +- .../inventory/CraftMerchantCustom.java | 20 +- .../inventory/CraftMerchantRecipe.java | 12 +- .../inventory/CraftMetaArmorStand.java | 4 +- .../inventory/CraftMetaBanner.java | 4 +- .../inventory/CraftMetaBlockState.java | 64 ++-- .../craftbukkit/inventory/CraftMetaBook.java | 8 +- .../inventory/CraftMetaBookSigned.java | 2 +- .../inventory/CraftMetaCharge.java | 2 +- .../inventory/CraftMetaCompass.java | 18 +- .../inventory/CraftMetaCrossbow.java | 8 +- .../inventory/CraftMetaEnchantedBook.java | 2 +- .../inventory/CraftMetaEntityTag.java | 4 +- .../inventory/CraftMetaFirework.java | 4 +- .../craftbukkit/inventory/CraftMetaItem.java | 20 +- .../inventory/CraftMetaKnowledgeBook.java | 6 +- .../inventory/CraftMetaLeatherArmor.java | 4 +- .../craftbukkit/inventory/CraftMetaMap.java | 6 +- .../inventory/CraftMetaPotion.java | 4 +- .../craftbukkit/inventory/CraftMetaSkull.java | 8 +- .../inventory/CraftMetaSpawnEgg.java | 6 +- .../inventory/CraftMetaSuspiciousStew.java | 4 +- .../CraftMetaTropicalFishBucket.java | 4 +- .../craftbukkit/inventory/CraftRecipe.java | 10 +- .../inventory/CraftResultInventory.java | 6 +- .../inventory/CraftShapedRecipe.java | 6 +- .../inventory/CraftShapelessRecipe.java | 6 +- .../inventory/CraftSmithingRecipe.java | 2 +- .../inventory/CraftSmokingRecipe.java | 2 +- .../inventory/CraftStonecuttingRecipe.java | 2 +- .../craftbukkit/inventory/RecipeIterator.java | 6 +- .../util/CraftTileInventoryConverter.java | 26 +- .../craftbukkit/legacy/CraftLegacy.java | 32 +- .../craftbukkit/map/CraftMapRenderer.java | 4 +- .../bukkit/craftbukkit/map/CraftMapView.java | 8 +- .../CraftPersistentDataContainer.java | 4 +- .../CraftPersistentDataTypeRegistry.java | 26 +- .../craftbukkit/potion/CraftPotionBrewer.java | 4 +- .../potion/CraftPotionEffectType.java | 2 +- .../craftbukkit/potion/CraftPotionUtil.java | 4 +- .../CraftBlockProjectileSource.java | 44 +-- .../craftbukkit/scoreboard/CraftCriteria.java | 4 +- .../scoreboard/CraftObjective.java | 4 +- .../craftbukkit/scoreboard/CraftScore.java | 6 +- .../scoreboard/CraftScoreboard.java | 6 +- .../scoreboard/CraftScoreboardManager.java | 22 +- .../CraftScoreboardTranslations.java | 4 +- .../craftbukkit/scoreboard/CraftTeam.java | 6 +- .../bukkit/craftbukkit/tag/CraftBlockTag.java | 6 +- .../bukkit/craftbukkit/tag/CraftFluidTag.java | 6 +- .../bukkit/craftbukkit/tag/CraftItemTag.java | 6 +- .../org/bukkit/craftbukkit/tag/CraftTag.java | 10 +- .../util/BlockStateListPopulator.java | 8 +- .../craftbukkit/util/CraftChatMessage.java | 18 +- .../craftbukkit/util/CraftDamageSource.java | 2 +- .../craftbukkit/util/CraftMagicNumbers.java | 40 +-- .../util/CraftNBTTagConfigSerializer.java | 16 +- .../craftbukkit/util/CraftNamespacedKey.java | 2 +- .../craftbukkit/util/CraftRayTraceResult.java | 12 +- .../bukkit/craftbukkit/util/CraftVector.java | 6 +- .../util/DummyGeneratorAccess.java | 56 ++-- .../craftbukkit/util/LazyPlayerSet.java | 2 +- src/test/java/org/bukkit/ArtTest.java | 6 +- src/test/java/org/bukkit/BiomeTest.java | 4 +- .../org/bukkit/BlockDataConversionTest.java | 6 +- src/test/java/org/bukkit/BlockDataTest.java | 8 +- src/test/java/org/bukkit/ChatTest.java | 4 +- src/test/java/org/bukkit/DyeColorsTest.java | 2 +- src/test/java/org/bukkit/EnchantmentTest.java | 6 +- src/test/java/org/bukkit/GameRuleTest.java | 2 +- src/test/java/org/bukkit/LootTablesTest.java | 4 +- src/test/java/org/bukkit/MaterialTest.java | 6 +- src/test/java/org/bukkit/ParticleTest.java | 4 +- src/test/java/org/bukkit/PerMaterialTest.java | 32 +- src/test/java/org/bukkit/SoundTest.java | 8 +- .../bukkit/StatisticsAndAchievementsTest.java | 10 +- .../java/org/bukkit/StructureTypeTest.java | 4 +- .../bukkit/block/banner/PatternTypeTest.java | 2 +- .../org/bukkit/craftbukkit/HeightMapTest.java | 2 +- .../craftbukkit/attribute/AttributeTest.java | 6 +- .../DeprecatedItemMetaCustomValueTest.java | 2 +- .../craftbukkit/inventory/ItemMetaTest.java | 14 +- .../inventory/NMSCraftItemStackTest.java | 6 +- .../PersistentDataContainerTest.java | 2 +- .../inventory/PlayerInventoryTest.java | 6 +- .../util/CraftChatMessageTest.java | 6 +- .../enchantments/EnchantmentTargetTest.java | 6 +- .../bukkit/entity/EnderDragonPhaseTest.java | 2 +- .../org/bukkit/entity/EntityTypesTest.java | 6 +- .../java/org/bukkit/entity/PandaGeneTest.java | 2 +- .../entity/memory/CraftMemoryKeyTest.java | 6 +- src/test/java/org/bukkit/map/MapTest.java | 2 +- .../java/org/bukkit/potion/PotionTest.java | 10 +- .../bukkit/support/AbstractTestingBase.java | 14 +- .../org/bukkit/support/DummyEnchantments.java | 2 +- 968 files changed, 5448 insertions(+), 5050 deletions(-) diff --git a/applyPatches.sh b/applyPatches.sh index 1fb7e40fb..1c0424686 100755 --- a/applyPatches.sh +++ b/applyPatches.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -euo pipefail + if [ -z "$1" ] then echo "Please run this script again with the clean decompile sources as an argument. In most cases this will be ../work/decompile-XXXX" @@ -18,19 +20,19 @@ else } fi -nms=$1/net/minecraft/server -cb=src/main/java/net/minecraft/server +nms=$1 +cb=src/main/java #clean up and rebuild -rm -rf $cb -mkdir -p $cb -for file in $(/bin/ls nms-patches) +rm -rf $cb/net +for file in $(find nms-patches -type f -printf '%P\n') do - patchFile="nms-patches/$file" + patchFile="$file" file="$(echo $file | cut -d. -f1).java" echo "Patching $file < $patchFile" strip_cr "$nms/$file" > /dev/null + mkdir -p $(dirname $cb/$file) cp "$nms/$file" "$cb/$file" - patch -d src/main/java/ "net/minecraft/server/$file" < "$patchFile" + patch -d src/main/java -p 1 < "nms-patches/$patchFile" done diff --git a/checkstyle.xml b/checkstyle.xml index 63a6f624f..63914723e 100644 --- a/checkstyle.xml +++ b/checkstyle.xml @@ -58,7 +58,7 @@ - + diff --git a/makePatches.sh b/makePatches.sh index bb711353b..3760fa10c 100755 --- a/makePatches.sh +++ b/makePatches.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -euo pipefail + if [ -z "$1" ] then echo "Please run this script again with the clean decompile sources as an argument. In most cases this will be ../work/decompile-XXXX" @@ -18,8 +20,8 @@ else } fi -cb=src/main/java/net/minecraft/server -nms="$1/net/minecraft/server" +cb=src/main/java +nms="$1" show_diff_msg=true if [ $# -ge 2 ] @@ -31,7 +33,7 @@ then fi fi -for file in $(/bin/ls $cb) +for file in $(find src/main/java/net -type f -printf 'net/%P\n') do if [ "$show_diff_msg" = true ] then @@ -40,7 +42,7 @@ do strip_cr "$nms/$file" > /dev/null strip_cr "$cb/$file" > /dev/null outName=$(echo nms-patches/"$(echo $file | cut -d. -f1)".patch) - patchNew=$(diff -u --label a/net/minecraft/server/$file "$nms/$file" --label b/net/minecraft/server/$file "$cb/$file") + patchNew=$(diff -u --label a/$file "$nms/$file" --label b/$file "$cb/$file" || true) if [ -f "$outName" ] then patchCut=$(echo "$patchNew" | tail -n +3) @@ -51,6 +53,7 @@ do fi else echo "New patch $outName" + mkdir -p $(dirname $outName) echo "$patchNew" > "$outName" fi done \ No newline at end of file diff --git a/nms-patches/net/minecraft/CrashReport.patch b/nms-patches/net/minecraft/CrashReport.patch index 8ec21a5f9..ba2b8b921 100644 --- a/nms-patches/net/minecraft/CrashReport.patch +++ b/nms-patches/net/minecraft/CrashReport.patch @@ -1,5 +1,5 @@ ---- a/net/minecraft/server/CrashReport.java -+++ b/net/minecraft/server/CrashReport.java +--- a/net/minecraft/CrashReport.java ++++ b/net/minecraft/CrashReport.java @@ -68,6 +68,7 @@ return String.format("%d total; %s", list.size(), list.stream().collect(Collectors.joining(" "))); diff --git a/nms-patches/net/minecraft/advancements/Advancement.patch b/nms-patches/net/minecraft/advancements/Advancement.patch index 57f6fdfdf..9cdb7960f 100644 --- a/nms-patches/net/minecraft/advancements/Advancement.patch +++ b/nms-patches/net/minecraft/advancements/Advancement.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/Advancement.java -+++ b/net/minecraft/server/Advancement.java -@@ -26,6 +26,7 @@ +--- a/net/minecraft/advancements/Advancement.java ++++ b/net/minecraft/advancements/Advancement.java +@@ -39,6 +39,7 @@ private final String[][] requirements; private final Set children = Sets.newLinkedHashSet(); private final IChatBaseComponent chatComponent; @@ -8,7 +8,7 @@ public Advancement(MinecraftKey minecraftkey, @Nullable Advancement advancement, @Nullable AdvancementDisplay advancementdisplay, AdvancementRewards advancementrewards, Map map, String[][] astring) { this.key = minecraftkey; -@@ -209,7 +210,7 @@ +@@ -222,7 +223,7 @@ } public Advancement b(MinecraftKey minecraftkey) { diff --git a/nms-patches/net/minecraft/advancements/Advancements.patch b/nms-patches/net/minecraft/advancements/Advancements.patch index 53620f873..74e1b52fa 100644 --- a/nms-patches/net/minecraft/advancements/Advancements.patch +++ b/nms-patches/net/minecraft/advancements/Advancements.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/Advancements.java -+++ b/net/minecraft/server/Advancements.java -@@ -72,7 +72,7 @@ +--- a/net/minecraft/advancements/Advancements.java ++++ b/net/minecraft/advancements/Advancements.java +@@ -73,7 +73,7 @@ } } diff --git a/nms-patches/net/minecraft/commands/CommandDispatcher.patch b/nms-patches/net/minecraft/commands/CommandDispatcher.patch index 1dae2226a..ae67fca8a 100644 --- a/nms-patches/net/minecraft/commands/CommandDispatcher.patch +++ b/nms-patches/net/minecraft/commands/CommandDispatcher.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/CommandDispatcher.java -+++ b/net/minecraft/server/CommandDispatcher.java -@@ -19,12 +19,21 @@ +--- a/net/minecraft/commands/CommandDispatcher.java ++++ b/net/minecraft/commands/CommandDispatcher.java +@@ -102,12 +102,21 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -22,7 +22,7 @@ CommandAdvancement.a(this.b); CommandAttribute.a(this.b); CommandExecute.a(this.b); -@@ -105,14 +114,57 @@ +@@ -188,14 +197,57 @@ } this.b.findAmbiguities((commandnode, commandnode1, commandnode2, collection) -> { @@ -83,7 +83,7 @@ StringReader stringreader = new StringReader(s); if (stringreader.canRead() && stringreader.peek() == '/') { -@@ -139,7 +191,7 @@ +@@ -222,7 +274,7 @@ if (commandsyntaxexception.getInput() != null && commandsyntaxexception.getCursor() >= 0) { int j = Math.min(commandsyntaxexception.getInput().length(), commandsyntaxexception.getCursor()); IChatMutableComponent ichatmutablecomponent = (new ChatComponentText("")).a(EnumChatFormat.GRAY).format((chatmodifier) -> { @@ -92,7 +92,7 @@ }); if (j > 10) { -@@ -189,11 +241,36 @@ +@@ -272,11 +324,36 @@ } public void a(EntityPlayer entityplayer) { @@ -130,7 +130,7 @@ entityplayer.playerConnection.sendPacket(new PacketPlayOutCommands(rootcommandnode)); } -@@ -204,7 +281,7 @@ +@@ -287,7 +364,7 @@ CommandNode commandnode2 = (CommandNode) iterator.next(); if (commandnode2.canUse(commandlistenerwrapper)) { @@ -139,7 +139,7 @@ argumentbuilder.requires((icompletionprovider) -> { return true; -@@ -227,7 +304,7 @@ +@@ -310,7 +387,7 @@ argumentbuilder.redirect((CommandNode) map.get(argumentbuilder.getRedirect())); } diff --git a/nms-patches/net/minecraft/commands/CommandListenerWrapper.patch b/nms-patches/net/minecraft/commands/CommandListenerWrapper.patch index aae57b973..f7ead9df2 100644 --- a/nms-patches/net/minecraft/commands/CommandListenerWrapper.patch +++ b/nms-patches/net/minecraft/commands/CommandListenerWrapper.patch @@ -1,15 +1,15 @@ ---- a/net/minecraft/server/CommandListenerWrapper.java -+++ b/net/minecraft/server/CommandListenerWrapper.java -@@ -15,6 +15,8 @@ - import java.util.stream.Stream; - import javax.annotation.Nullable; +--- a/net/minecraft/commands/CommandListenerWrapper.java ++++ b/net/minecraft/commands/CommandListenerWrapper.java +@@ -36,6 +36,8 @@ + import net.minecraft.world.phys.Vec2F; + import net.minecraft.world.phys.Vec3D; +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 @@ +@@ -53,6 +55,7 @@ private final ResultConsumer l; private final ArgumentAnchor.Anchor m; private final Vec2F n; @@ -17,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 +131,23 @@ +@@ -149,9 +152,23 @@ @Override public boolean hasPermission(int i) { @@ -41,7 +41,7 @@ public Vec3D getPosition() { return this.d; } -@@ -192,7 +209,7 @@ +@@ -213,7 +230,7 @@ while (iterator.hasNext()) { EntityPlayer entityplayer = (EntityPlayer) iterator.next(); @@ -50,7 +50,7 @@ entityplayer.sendMessage(ichatmutablecomponent, SystemUtils.b); } } -@@ -252,4 +269,10 @@ +@@ -273,4 +290,10 @@ public IRegistryCustom q() { return this.i.getCustomRegistry(); } diff --git a/nms-patches/net/minecraft/commands/ICommandListener.patch b/nms-patches/net/minecraft/commands/ICommandListener.patch index d28dc9f20..f5c90c937 100644 --- a/nms-patches/net/minecraft/commands/ICommandListener.patch +++ b/nms-patches/net/minecraft/commands/ICommandListener.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/ICommandListener.java -+++ b/net/minecraft/server/ICommandListener.java -@@ -22,6 +22,13 @@ +--- a/net/minecraft/commands/ICommandListener.java ++++ b/net/minecraft/commands/ICommandListener.java +@@ -23,6 +23,13 @@ public boolean shouldBroadcastCommands() { return false; } @@ -14,7 +14,7 @@ }; void sendMessage(IChatBaseComponent ichatbasecomponent, UUID uuid); -@@ -31,4 +38,6 @@ +@@ -32,4 +39,6 @@ boolean shouldSendFailure(); boolean shouldBroadcastCommands(); diff --git a/nms-patches/net/minecraft/commands/arguments/ArgumentEntity.patch b/nms-patches/net/minecraft/commands/arguments/ArgumentEntity.patch index 4609ed35a..4e1b63cb8 100644 --- a/nms-patches/net/minecraft/commands/arguments/ArgumentEntity.patch +++ b/nms-patches/net/minecraft/commands/arguments/ArgumentEntity.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/ArgumentEntity.java -+++ b/net/minecraft/server/ArgumentEntity.java -@@ -84,9 +84,15 @@ +--- a/net/minecraft/commands/arguments/ArgumentEntity.java ++++ b/net/minecraft/commands/arguments/ArgumentEntity.java +@@ -93,9 +93,15 @@ } public EntitySelector parse(StringReader stringreader) throws CommandSyntaxException { diff --git a/nms-patches/net/minecraft/commands/arguments/blocks/ArgumentBlock.patch b/nms-patches/net/minecraft/commands/arguments/blocks/ArgumentBlock.patch index 8160fc9f9..2674169a9 100644 --- a/nms-patches/net/minecraft/commands/arguments/blocks/ArgumentBlock.patch +++ b/nms-patches/net/minecraft/commands/arguments/blocks/ArgumentBlock.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/ArgumentBlock.java -+++ b/net/minecraft/server/ArgumentBlock.java -@@ -43,7 +43,7 @@ +--- a/net/minecraft/commands/arguments/blocks/ArgumentBlock.java ++++ b/net/minecraft/commands/arguments/blocks/ArgumentBlock.java +@@ -55,7 +55,7 @@ }; private final StringReader i; private final boolean j; @@ -9,7 +9,7 @@ private final Map l = Maps.newHashMap(); private MinecraftKey m = new MinecraftKey(""); private BlockStateList n; -@@ -219,7 +219,7 @@ +@@ -231,7 +231,7 @@ Iterator iterator = iblockstate.getValues().iterator(); while (iterator.hasNext()) { @@ -18,7 +18,7 @@ if (t0 instanceof Integer) { suggestionsbuilder.suggest((Integer) t0); -@@ -488,7 +488,7 @@ +@@ -500,7 +500,7 @@ Optional optional = iblockstate.b(s); if (optional.isPresent()) { @@ -27,7 +27,7 @@ this.k.put(iblockstate, optional.get()); } else { this.i.setCursor(i); -@@ -522,7 +522,7 @@ +@@ -534,7 +534,7 @@ private static > void a(StringBuilder stringbuilder, IBlockState iblockstate, Comparable comparable) { stringbuilder.append(iblockstate.getName()); stringbuilder.append('='); diff --git a/nms-patches/net/minecraft/commands/arguments/selector/ArgumentParserSelector.patch b/nms-patches/net/minecraft/commands/arguments/selector/ArgumentParserSelector.patch index 91abf6dc5..a89f264fc 100644 --- a/nms-patches/net/minecraft/commands/arguments/selector/ArgumentParserSelector.patch +++ b/nms-patches/net/minecraft/commands/arguments/selector/ArgumentParserSelector.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/ArgumentParserSelector.java -+++ b/net/minecraft/server/ArgumentParserSelector.java -@@ -127,7 +127,7 @@ +--- a/net/minecraft/commands/arguments/selector/ArgumentParserSelector.java ++++ b/net/minecraft/commands/arguments/selector/ArgumentParserSelector.java +@@ -137,7 +137,7 @@ axisalignedbb = this.a(this.v == null ? 0.0D : this.v, this.w == null ? 0.0D : this.w, this.x == null ? 0.0D : this.x); } @@ -9,7 +9,7 @@ if (this.s == null && this.t == null && this.u == null) { function = (vec3d) -> { -@@ -188,8 +188,10 @@ +@@ -198,8 +198,10 @@ }; } @@ -22,7 +22,7 @@ this.G = this::d; if (!this.l.canRead()) { throw ArgumentParserSelector.d.createWithContext(this.l); -@@ -443,6 +445,12 @@ +@@ -453,6 +455,12 @@ } public EntitySelector parse() throws CommandSyntaxException { @@ -35,7 +35,7 @@ this.E = this.l.getCursor(); this.G = this::b; if (this.l.canRead() && this.l.peek() == '@') { -@@ -451,7 +459,7 @@ +@@ -461,7 +469,7 @@ } this.l.skip(); diff --git a/nms-patches/net/minecraft/commands/arguments/selector/EntitySelector.patch b/nms-patches/net/minecraft/commands/arguments/selector/EntitySelector.patch index 19c2c2c47..708581b9e 100644 --- a/nms-patches/net/minecraft/commands/arguments/selector/EntitySelector.patch +++ b/nms-patches/net/minecraft/commands/arguments/selector/EntitySelector.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntitySelector.java -+++ b/net/minecraft/server/EntitySelector.java -@@ -64,7 +64,7 @@ +--- a/net/minecraft/commands/arguments/selector/EntitySelector.java ++++ b/net/minecraft/commands/arguments/selector/EntitySelector.java +@@ -75,7 +75,7 @@ } private void e(CommandListenerWrapper commandlistenerwrapper) throws CommandSyntaxException { diff --git a/nms-patches/net/minecraft/core/dispenser/DispenseBehaviorBoat.patch b/nms-patches/net/minecraft/core/dispenser/DispenseBehaviorBoat.patch index 57296f220..ee8d1e2e0 100644 --- a/nms-patches/net/minecraft/core/dispenser/DispenseBehaviorBoat.patch +++ b/nms-patches/net/minecraft/core/dispenser/DispenseBehaviorBoat.patch @@ -1,7 +1,8 @@ ---- a/net/minecraft/server/DispenseBehaviorBoat.java -+++ b/net/minecraft/server/DispenseBehaviorBoat.java -@@ -1,5 +1,10 @@ - package net.minecraft.server; +--- a/net/minecraft/core/dispenser/DispenseBehaviorBoat.java ++++ b/net/minecraft/core/dispenser/DispenseBehaviorBoat.java +@@ -10,6 +10,11 @@ + import net.minecraft.world.item.ItemStack; + import net.minecraft.world.level.block.BlockDispenser; +// CraftBukkit start +import org.bukkit.craftbukkit.inventory.CraftItemStack; @@ -11,7 +12,7 @@ public class DispenseBehaviorBoat extends DispenseBehaviorItem { private final DispenseBehaviorItem b = new DispenseBehaviorItem(); -@@ -29,12 +34,40 @@ +@@ -39,12 +44,40 @@ d3 = 0.0D; } diff --git a/nms-patches/net/minecraft/core/dispenser/DispenseBehaviorItem.patch b/nms-patches/net/minecraft/core/dispenser/DispenseBehaviorItem.patch index cca2373de..decde82fa 100644 --- a/nms-patches/net/minecraft/core/dispenser/DispenseBehaviorItem.patch +++ b/nms-patches/net/minecraft/core/dispenser/DispenseBehaviorItem.patch @@ -1,7 +1,8 @@ ---- a/net/minecraft/server/DispenseBehaviorItem.java -+++ b/net/minecraft/server/DispenseBehaviorItem.java -@@ -1,5 +1,11 @@ - package net.minecraft.server; +--- a/net/minecraft/core/dispenser/DispenseBehaviorItem.java ++++ b/net/minecraft/core/dispenser/DispenseBehaviorItem.java +@@ -8,6 +8,12 @@ + import net.minecraft.world.level.World; + import net.minecraft.world.level.block.BlockDispenser; +// CraftBukkit start +import org.bukkit.craftbukkit.inventory.CraftItemStack; @@ -12,7 +13,7 @@ public class DispenseBehaviorItem implements IDispenseBehavior { public DispenseBehaviorItem() {} -@@ -18,11 +24,19 @@ +@@ -26,11 +32,19 @@ IPosition iposition = BlockDispenser.a(isourceblock); ItemStack itemstack1 = itemstack.cloneAndSubtract(1); @@ -34,7 +35,7 @@ double d0 = iposition.getX(); double d1 = iposition.getY(); double d2 = iposition.getZ(); -@@ -37,7 +51,39 @@ +@@ -45,7 +59,39 @@ double d3 = world.random.nextDouble() * 0.1D + 0.2D; entityitem.setMot(world.random.nextGaussian() * 0.007499999832361937D * (double) i + (double) enumdirection.getAdjacentX() * d3, world.random.nextGaussian() * 0.007499999832361937D * (double) i + 0.20000000298023224D, world.random.nextGaussian() * 0.007499999832361937D * (double) i + (double) enumdirection.getAdjacentZ() * d3); diff --git a/nms-patches/net/minecraft/core/dispenser/DispenseBehaviorProjectile.patch b/nms-patches/net/minecraft/core/dispenser/DispenseBehaviorProjectile.patch index bfcd57ec9..6fb0b8475 100644 --- a/nms-patches/net/minecraft/core/dispenser/DispenseBehaviorProjectile.patch +++ b/nms-patches/net/minecraft/core/dispenser/DispenseBehaviorProjectile.patch @@ -1,9 +1,12 @@ ---- a/net/minecraft/server/DispenseBehaviorProjectile.java -+++ b/net/minecraft/server/DispenseBehaviorProjectile.java -@@ -1,5 +1,10 @@ - package net.minecraft.server; +--- a/net/minecraft/core/dispenser/DispenseBehaviorProjectile.java ++++ b/net/minecraft/core/dispenser/DispenseBehaviorProjectile.java +@@ -9,6 +9,13 @@ + import net.minecraft.world.level.World; + import net.minecraft.world.level.block.BlockDispenser; +// CraftBukkit start ++import net.minecraft.world.entity.Entity; ++import net.minecraft.world.level.block.entity.TileEntityDispenser; +import org.bukkit.craftbukkit.inventory.CraftItemStack; +import org.bukkit.event.block.BlockDispenseEvent; +// CraftBukkit end @@ -11,7 +14,7 @@ public abstract class DispenseBehaviorProjectile extends DispenseBehaviorItem { public DispenseBehaviorProjectile() {} -@@ -11,9 +16,38 @@ +@@ -20,9 +27,38 @@ EnumDirection enumdirection = (EnumDirection) isourceblock.getBlockData().get(BlockDispenser.FACING); IProjectile iprojectile = this.a((World) worldserver, iposition, itemstack); diff --git a/nms-patches/net/minecraft/core/dispenser/DispenseBehaviorShears.patch b/nms-patches/net/minecraft/core/dispenser/DispenseBehaviorShears.patch index 4915ea060..4e0155872 100644 --- a/nms-patches/net/minecraft/core/dispenser/DispenseBehaviorShears.patch +++ b/nms-patches/net/minecraft/core/dispenser/DispenseBehaviorShears.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/DispenseBehaviorShears.java -+++ b/net/minecraft/server/DispenseBehaviorShears.java -@@ -3,6 +3,12 @@ - import java.util.Iterator; - import java.util.List; +--- a/net/minecraft/core/dispenser/DispenseBehaviorShears.java ++++ b/net/minecraft/core/dispenser/DispenseBehaviorShears.java +@@ -23,6 +23,12 @@ + import net.minecraft.world.level.block.state.IBlockData; + import net.minecraft.world.phys.AxisAlignedBB; +// CraftBukkit start +import org.bukkit.craftbukkit.event.CraftEventFactory; @@ -13,7 +13,7 @@ public class DispenseBehaviorShears extends DispenseBehaviorMaybe { public DispenseBehaviorShears() {} -@@ -10,11 +16,34 @@ +@@ -30,11 +36,34 @@ @Override protected ItemStack a(ISourceBlock isourceblock, ItemStack itemstack) { WorldServer worldserver = isourceblock.getWorld(); @@ -49,7 +49,7 @@ if (this.a() && itemstack.isDamaged(1, worldserver.getRandom(), (EntityPlayer) null)) { itemstack.setCount(0); } -@@ -40,7 +69,7 @@ +@@ -60,7 +89,7 @@ return false; } @@ -58,7 +58,7 @@ List list = worldserver.a(EntityLiving.class, new AxisAlignedBB(blockposition), IEntitySelector.g); Iterator iterator = list.iterator(); -@@ -51,6 +80,11 @@ +@@ -71,6 +100,11 @@ IShearable ishearable = (IShearable) entityliving; if (ishearable.canShear()) { diff --git a/nms-patches/net/minecraft/core/dispenser/DispenseBehaviorShulkerBox.patch b/nms-patches/net/minecraft/core/dispenser/DispenseBehaviorShulkerBox.patch index ea7d1be96..0ed0860b2 100644 --- a/nms-patches/net/minecraft/core/dispenser/DispenseBehaviorShulkerBox.patch +++ b/nms-patches/net/minecraft/core/dispenser/DispenseBehaviorShulkerBox.patch @@ -1,7 +1,8 @@ ---- a/net/minecraft/server/DispenseBehaviorShulkerBox.java -+++ b/net/minecraft/server/DispenseBehaviorShulkerBox.java -@@ -1,5 +1,10 @@ - package net.minecraft.server; +--- a/net/minecraft/core/dispenser/DispenseBehaviorShulkerBox.java ++++ b/net/minecraft/core/dispenser/DispenseBehaviorShulkerBox.java +@@ -10,6 +10,11 @@ + import net.minecraft.world.item.context.BlockActionContextDirectional; + import net.minecraft.world.level.block.BlockDispenser; +// CraftBukkit start +import org.bukkit.craftbukkit.inventory.CraftItemStack; @@ -11,7 +12,7 @@ public class DispenseBehaviorShulkerBox extends DispenseBehaviorMaybe { public DispenseBehaviorShulkerBox() {} -@@ -14,6 +19,30 @@ +@@ -24,6 +29,30 @@ BlockPosition blockposition = isourceblock.getBlockPosition().shift(enumdirection); EnumDirection enumdirection1 = isourceblock.getWorld().isEmpty(blockposition.down()) ? enumdirection : EnumDirection.UP; diff --git a/nms-patches/net/minecraft/core/dispenser/IDispenseBehavior.patch b/nms-patches/net/minecraft/core/dispenser/IDispenseBehavior.patch index 5de9d4309..f84e995e0 100644 --- a/nms-patches/net/minecraft/core/dispenser/IDispenseBehavior.patch +++ b/nms-patches/net/minecraft/core/dispenser/IDispenseBehavior.patch @@ -1,10 +1,13 @@ ---- a/net/minecraft/server/IDispenseBehavior.java -+++ b/net/minecraft/server/IDispenseBehavior.java -@@ -4,6 +4,15 @@ - import java.util.List; - import java.util.Random; +--- a/net/minecraft/core/dispenser/IDispenseBehavior.java ++++ b/net/minecraft/core/dispenser/IDispenseBehavior.java +@@ -74,6 +74,18 @@ + import net.minecraft.world.phys.AxisAlignedBB; + import net.minecraft.world.phys.MovingObjectPositionBlock; +// CraftBukkit start ++import net.minecraft.world.level.block.BlockSapling; ++import net.minecraft.world.level.block.IFluidContainer; ++import net.minecraft.world.level.material.Material; +import org.bukkit.Location; +import org.bukkit.TreeType; +import org.bukkit.craftbukkit.inventory.CraftItemStack; @@ -16,7 +19,7 @@ public interface IDispenseBehavior { IDispenseBehavior NONE = (isourceblock, itemstack) -> { -@@ -44,7 +53,7 @@ +@@ -114,7 +126,7 @@ BlockDispenser.a((IMaterial) Items.EGG, (IDispenseBehavior) (new DispenseBehaviorProjectile() { @Override protected IProjectile a(World world, IPosition iposition, ItemStack itemstack) { @@ -25,7 +28,7 @@ entityegg.setItem(itemstack); }); } -@@ -52,7 +61,7 @@ +@@ -122,7 +134,7 @@ BlockDispenser.a((IMaterial) Items.SNOWBALL, (IDispenseBehavior) (new DispenseBehaviorProjectile() { @Override protected IProjectile a(World world, IPosition iposition, ItemStack itemstack) { @@ -34,7 +37,7 @@ entitysnowball.setItem(itemstack); }); } -@@ -60,7 +69,7 @@ +@@ -130,7 +142,7 @@ BlockDispenser.a((IMaterial) Items.EXPERIENCE_BOTTLE, (IDispenseBehavior) (new DispenseBehaviorProjectile() { @Override protected IProjectile a(World world, IPosition iposition, ItemStack itemstack) { @@ -43,7 +46,7 @@ entitythrownexpbottle.setItem(itemstack); }); } -@@ -81,7 +90,7 @@ +@@ -151,7 +163,7 @@ return (new DispenseBehaviorProjectile() { @Override protected IProjectile a(World world, IPosition iposition, ItemStack itemstack1) { @@ -52,7 +55,7 @@ entitypotion.setItem(itemstack1); }); } -@@ -104,7 +113,7 @@ +@@ -174,7 +186,7 @@ return (new DispenseBehaviorProjectile() { @Override protected IProjectile a(World world, IPosition iposition, ItemStack itemstack1) { @@ -61,7 +64,7 @@ entitypotion.setItem(itemstack1); }); } -@@ -127,8 +136,36 @@ +@@ -197,8 +209,36 @@ EnumDirection enumdirection = (EnumDirection) isourceblock.getBlockData().get(BlockDispenser.FACING); EntityTypes entitytypes = ((ItemMonsterEgg) itemstack.getItem()).a(itemstack.getTag()); @@ -99,7 +102,7 @@ return itemstack; } }; -@@ -146,12 +183,40 @@ +@@ -216,12 +256,40 @@ EnumDirection enumdirection = (EnumDirection) isourceblock.getBlockData().get(BlockDispenser.FACING); BlockPosition blockposition = isourceblock.getBlockPosition().shift(enumdirection); WorldServer worldserver = isourceblock.getWorld(); @@ -141,7 +144,7 @@ return itemstack; } })); -@@ -252,12 +317,41 @@ +@@ -322,12 +390,41 @@ @Override public ItemStack a(ISourceBlock isourceblock, ItemStack itemstack) { EnumDirection enumdirection = (EnumDirection) isourceblock.getBlockData().get(BlockDispenser.FACING); @@ -184,7 +187,7 @@ return itemstack; } -@@ -280,10 +374,39 @@ +@@ -350,10 +447,39 @@ double d4 = random.nextGaussian() * 0.05D + (double) enumdirection.getAdjacentY(); double d5 = random.nextGaussian() * 0.05D + (double) enumdirection.getAdjacentZ(); @@ -228,7 +231,7 @@ return itemstack; } -@@ -307,9 +430,52 @@ +@@ -377,9 +503,52 @@ BlockPosition blockposition = isourceblock.getBlockPosition().shift((EnumDirection) isourceblock.getBlockData().get(BlockDispenser.FACING)); WorldServer worldserver = isourceblock.getWorld(); @@ -282,7 +285,7 @@ } else { return this.b.dispense(isourceblock, itemstack); } -@@ -333,13 +499,39 @@ +@@ -403,13 +572,39 @@ Block block = iblockdata.getBlock(); if (block instanceof IFluidSource) { @@ -323,7 +326,7 @@ itemstack.subtract(1); if (itemstack.isEmpty()) { return new ItemStack(item); -@@ -361,13 +553,41 @@ +@@ -431,13 +626,41 @@ protected ItemStack a(ISourceBlock isourceblock, ItemStack itemstack) { WorldServer worldserver = isourceblock.getWorld(); @@ -366,7 +369,7 @@ } else if (BlockCampfire.h(iblockdata)) { worldserver.setTypeUpdate(blockposition, (IBlockData) iblockdata.set(BlockProperties.r, true)); } else if (iblockdata.getBlock() instanceof BlockTNT) { -@@ -390,12 +610,57 @@ +@@ -460,12 +683,57 @@ this.a(true); WorldServer worldserver = isourceblock.getWorld(); BlockPosition blockposition = isourceblock.getBlockPosition().shift((EnumDirection) isourceblock.getBlockData().get(BlockDispenser.FACING)); @@ -424,7 +427,7 @@ return itemstack; } -@@ -405,11 +670,40 @@ +@@ -475,11 +743,40 @@ protected ItemStack a(ISourceBlock isourceblock, ItemStack itemstack) { WorldServer worldserver = isourceblock.getWorld(); BlockPosition blockposition = isourceblock.getBlockPosition().shift((EnumDirection) isourceblock.getBlockData().get(BlockDispenser.FACING)); @@ -467,7 +470,7 @@ return itemstack; } })); -@@ -433,6 +727,30 @@ +@@ -503,6 +800,30 @@ EnumDirection enumdirection = (EnumDirection) isourceblock.getBlockData().get(BlockDispenser.FACING); BlockPosition blockposition = isourceblock.getBlockPosition().shift(enumdirection); @@ -498,7 +501,7 @@ if (worldserver.isEmpty(blockposition) && BlockWitherSkull.b((World) worldserver, blockposition, itemstack)) { worldserver.setTypeAndData(blockposition, (IBlockData) Blocks.WITHER_SKELETON_SKULL.getBlockData().set(BlockSkull.a, enumdirection.n() == EnumDirection.EnumAxis.Y ? 0 : enumdirection.opposite().get2DRotationValue() * 4), 3); TileEntity tileentity = worldserver.getTileEntity(blockposition); -@@ -457,6 +775,30 @@ +@@ -527,6 +848,30 @@ BlockPosition blockposition = isourceblock.getBlockPosition().shift((EnumDirection) isourceblock.getBlockData().get(BlockDispenser.FACING)); BlockPumpkinCarved blockpumpkincarved = (BlockPumpkinCarved) Blocks.CARVED_PUMPKIN; @@ -529,7 +532,7 @@ if (worldserver.isEmpty(blockposition) && blockpumpkincarved.a((IWorldReader) worldserver, blockposition)) { if (!worldserver.isClientSide) { worldserver.setTypeAndData(blockposition, blockpumpkincarved.getBlockData(), 3); -@@ -504,6 +846,30 @@ +@@ -574,6 +919,30 @@ BlockPosition blockposition = isourceblock.getBlockPosition().shift((EnumDirection) isourceblock.getBlockData().get(BlockDispenser.FACING)); IBlockData iblockdata = worldserver.getType(blockposition); diff --git a/nms-patches/net/minecraft/network/NetworkManager.patch b/nms-patches/net/minecraft/network/NetworkManager.patch index 9f540d23c..8d747772b 100644 --- a/nms-patches/net/minecraft/network/NetworkManager.patch +++ b/nms-patches/net/minecraft/network/NetworkManager.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/NetworkManager.java -+++ b/net/minecraft/server/NetworkManager.java -@@ -127,7 +127,7 @@ +--- a/net/minecraft/network/NetworkManager.java ++++ b/net/minecraft/network/NetworkManager.java +@@ -137,7 +137,7 @@ } private static void a(Packet packet, PacketListener packetlistener) { @@ -9,7 +9,7 @@ } public void setPacketListener(PacketListener packetlistener) { -@@ -237,7 +237,7 @@ +@@ -247,7 +247,7 @@ public void close(IChatBaseComponent ichatbasecomponent) { if (this.channel.isOpen()) { diff --git a/nms-patches/net/minecraft/network/PacketDataSerializer.patch b/nms-patches/net/minecraft/network/PacketDataSerializer.patch index 2cf9923c0..94c816fe8 100644 --- a/nms-patches/net/minecraft/network/PacketDataSerializer.patch +++ b/nms-patches/net/minecraft/network/PacketDataSerializer.patch @@ -1,15 +1,15 @@ ---- a/net/minecraft/server/PacketDataSerializer.java -+++ b/net/minecraft/server/PacketDataSerializer.java -@@ -26,6 +26,8 @@ - import java.util.UUID; - import javax.annotation.Nullable; +--- a/net/minecraft/network/PacketDataSerializer.java ++++ b/net/minecraft/network/PacketDataSerializer.java +@@ -39,6 +39,8 @@ + import net.minecraft.world.phys.MovingObjectPositionBlock; + import net.minecraft.world.phys.Vec3D; +import org.bukkit.craftbukkit.inventory.CraftItemStack; // CraftBukkit + public class PacketDataSerializer extends ByteBuf { private final ByteBuf a; -@@ -154,7 +156,7 @@ +@@ -167,7 +169,7 @@ } public > T a(Class oclass) { @@ -18,7 +18,7 @@ } public PacketDataSerializer a(Enum oenum) { -@@ -231,7 +233,7 @@ +@@ -244,7 +246,7 @@ } else { try { NBTCompressedStreamTools.a(nbttagcompound, (DataOutput) (new ByteBufOutputStream(this))); @@ -27,7 +27,7 @@ throw new EncoderException(ioexception); } } -@@ -268,7 +270,7 @@ +@@ -281,7 +283,7 @@ } public PacketDataSerializer a(ItemStack itemstack) { @@ -36,7 +36,7 @@ this.writeBoolean(false); } else { this.writeBoolean(true); -@@ -297,6 +299,11 @@ +@@ -310,6 +312,11 @@ ItemStack itemstack = new ItemStack(Item.getById(i), b0); itemstack.setTag(this.l()); diff --git a/nms-patches/net/minecraft/network/chat/ChatHexColor.patch b/nms-patches/net/minecraft/network/chat/ChatHexColor.patch index fb88ca604..1b1fdc4ed 100644 --- a/nms-patches/net/minecraft/network/chat/ChatHexColor.patch +++ b/nms-patches/net/minecraft/network/chat/ChatHexColor.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/ChatHexColor.java -+++ b/net/minecraft/server/ChatHexColor.java -@@ -10,7 +10,7 @@ +--- a/net/minecraft/network/chat/ChatHexColor.java ++++ b/net/minecraft/network/chat/ChatHexColor.java +@@ -11,7 +11,7 @@ public final class ChatHexColor { private static final Map a = (Map) Stream.of(EnumChatFormat.values()).filter(EnumChatFormat::d).collect(ImmutableMap.toImmutableMap(Function.identity(), (enumchatformat) -> { @@ -9,7 +9,7 @@ })); private static final Map b = (Map) ChatHexColor.a.values().stream().collect(ImmutableMap.toImmutableMap((chathexcolor) -> { return chathexcolor.name; -@@ -18,16 +18,22 @@ +@@ -19,16 +19,22 @@ private final int rgb; @Nullable public final String name; diff --git a/nms-patches/net/minecraft/network/chat/ChatModifier.patch b/nms-patches/net/minecraft/network/chat/ChatModifier.patch index ad063eb02..09c2d6f88 100644 --- a/nms-patches/net/minecraft/network/chat/ChatModifier.patch +++ b/nms-patches/net/minecraft/network/chat/ChatModifier.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/ChatModifier.java -+++ b/net/minecraft/server/ChatModifier.java -@@ -114,6 +114,20 @@ +--- a/net/minecraft/network/chat/ChatModifier.java ++++ b/net/minecraft/network/chat/ChatModifier.java +@@ -118,6 +118,20 @@ return new ChatModifier(this.color, this.bold, obool, this.underlined, this.strikethrough, this.obfuscated, this.clickEvent, this.hoverEvent, this.insertion, this.font); } diff --git a/nms-patches/net/minecraft/network/chat/IChatBaseComponent.patch b/nms-patches/net/minecraft/network/chat/IChatBaseComponent.patch index 95b2fbcde..3f88e48f6 100644 --- a/nms-patches/net/minecraft/network/chat/IChatBaseComponent.patch +++ b/nms-patches/net/minecraft/network/chat/IChatBaseComponent.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/IChatBaseComponent.java -+++ b/net/minecraft/server/IChatBaseComponent.java -@@ -23,7 +23,23 @@ - import java.util.Optional; - import javax.annotation.Nullable; +--- a/net/minecraft/network/chat/IChatBaseComponent.java ++++ b/net/minecraft/network/chat/IChatBaseComponent.java +@@ -27,7 +27,23 @@ + import net.minecraft.util.ChatDeserializer; + import net.minecraft.util.ChatTypeAdapterFactory; -public interface IChatBaseComponent extends Message, IChatFormatted { +// CraftBukkit start diff --git a/nms-patches/net/minecraft/network/protocol/PlayerConnectionUtils.patch b/nms-patches/net/minecraft/network/protocol/PlayerConnectionUtils.patch index ca65b01e9..5736dc94d 100644 --- a/nms-patches/net/minecraft/network/protocol/PlayerConnectionUtils.patch +++ b/nms-patches/net/minecraft/network/protocol/PlayerConnectionUtils.patch @@ -1,6 +1,18 @@ ---- a/net/minecraft/server/PlayerConnectionUtils.java -+++ b/net/minecraft/server/PlayerConnectionUtils.java -@@ -14,6 +14,7 @@ +--- a/net/minecraft/network/protocol/PlayerConnectionUtils.java ++++ b/net/minecraft/network/protocol/PlayerConnectionUtils.java +@@ -7,6 +7,11 @@ + import org.apache.logging.log4j.LogManager; + import org.apache.logging.log4j.Logger; + ++// CraftBukkit start ++import net.minecraft.server.MinecraftServer; ++import net.minecraft.server.network.PlayerConnection; ++// CraftBukkit end ++ + public class PlayerConnectionUtils { + + private static final Logger LOGGER = LogManager.getLogger(); +@@ -18,6 +23,7 @@ public static void ensureMainThread(Packet packet, T t0, IAsyncTaskHandler iasynctaskhandler) throws CancelledPacketHandleException { if (!iasynctaskhandler.isMainThread()) { iasynctaskhandler.execute(() -> { @@ -8,7 +20,7 @@ if (t0.a().isConnected()) { packet.a(t0); } else { -@@ -22,6 +23,10 @@ +@@ -26,6 +32,10 @@ }); throw CancelledPacketHandleException.INSTANCE; diff --git a/nms-patches/net/minecraft/network/protocol/game/PacketPlayInCloseWindow.patch b/nms-patches/net/minecraft/network/protocol/game/PacketPlayInCloseWindow.patch index c17757e85..65269fb77 100644 --- a/nms-patches/net/minecraft/network/protocol/game/PacketPlayInCloseWindow.patch +++ b/nms-patches/net/minecraft/network/protocol/game/PacketPlayInCloseWindow.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/PacketPlayInCloseWindow.java -+++ b/net/minecraft/server/PacketPlayInCloseWindow.java -@@ -8,6 +8,12 @@ +--- a/net/minecraft/network/protocol/game/PacketPlayInCloseWindow.java ++++ b/net/minecraft/network/protocol/game/PacketPlayInCloseWindow.java +@@ -10,6 +10,12 @@ public PacketPlayInCloseWindow() {} diff --git a/nms-patches/net/minecraft/network/protocol/game/PacketPlayOutMultiBlockChange.patch b/nms-patches/net/minecraft/network/protocol/game/PacketPlayOutMultiBlockChange.patch index 01fa23df8..258e6468d 100644 --- a/nms-patches/net/minecraft/network/protocol/game/PacketPlayOutMultiBlockChange.patch +++ b/nms-patches/net/minecraft/network/protocol/game/PacketPlayOutMultiBlockChange.patch @@ -1,11 +1,11 @@ ---- a/net/minecraft/server/PacketPlayOutMultiBlockChange.java -+++ b/net/minecraft/server/PacketPlayOutMultiBlockChange.java -@@ -24,7 +24,7 @@ +--- a/net/minecraft/network/protocol/game/PacketPlayOutMultiBlockChange.java ++++ b/net/minecraft/network/protocol/game/PacketPlayOutMultiBlockChange.java +@@ -31,7 +31,7 @@ short short0 = (Short) shortiterator.next(); this.b[i] = short0; - this.c[i] = chunksection.getType(SectionPosition.a(short0), SectionPosition.b(short0), SectionPosition.c(short0)); -+ this.c[i] = (chunksection != null) ? chunksection.getType(SectionPosition.a(short0), SectionPosition.b(short0), SectionPosition.c(short0)) : Blocks.AIR.getBlockData(); // CraftBukkit - SPIGOT-6076, Mojang bug when empty chunk section notified ++ this.c[i] = (chunksection != null) ? chunksection.getType(SectionPosition.a(short0), SectionPosition.b(short0), SectionPosition.c(short0)) : net.minecraft.world.level.block.Blocks.AIR.getBlockData(); // CraftBukkit - SPIGOT-6076, Mojang bug when empty chunk section notified } } diff --git a/nms-patches/net/minecraft/network/protocol/game/PacketPlayOutWorldBorder.patch b/nms-patches/net/minecraft/network/protocol/game/PacketPlayOutWorldBorder.patch index 90fd6b81e..8c73743e1 100644 --- a/nms-patches/net/minecraft/network/protocol/game/PacketPlayOutWorldBorder.patch +++ b/nms-patches/net/minecraft/network/protocol/game/PacketPlayOutWorldBorder.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/PacketPlayOutWorldBorder.java -+++ b/net/minecraft/server/PacketPlayOutWorldBorder.java -@@ -18,8 +18,10 @@ +--- a/net/minecraft/network/protocol/game/PacketPlayOutWorldBorder.java ++++ b/net/minecraft/network/protocol/game/PacketPlayOutWorldBorder.java +@@ -21,8 +21,10 @@ public PacketPlayOutWorldBorder(WorldBorder worldborder, PacketPlayOutWorldBorder.EnumWorldBorderAction packetplayoutworldborder_enumworldborderaction) { this.a = packetplayoutworldborder_enumworldborderaction; diff --git a/nms-patches/net/minecraft/network/syncher/DataWatcher.patch b/nms-patches/net/minecraft/network/syncher/DataWatcher.patch index dcd9692a2..a588c366e 100644 --- a/nms-patches/net/minecraft/network/syncher/DataWatcher.patch +++ b/nms-patches/net/minecraft/network/syncher/DataWatcher.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/DataWatcher.java -+++ b/net/minecraft/server/DataWatcher.java -@@ -129,6 +129,13 @@ +--- a/net/minecraft/network/syncher/DataWatcher.java ++++ b/net/minecraft/network/syncher/DataWatcher.java +@@ -134,6 +134,13 @@ } diff --git a/nms-patches/net/minecraft/server/AdvancementDataPlayer.patch b/nms-patches/net/minecraft/server/AdvancementDataPlayer.patch index 82ceec033..0a582f0dd 100644 --- a/nms-patches/net/minecraft/server/AdvancementDataPlayer.patch +++ b/nms-patches/net/minecraft/server/AdvancementDataPlayer.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/server/AdvancementDataPlayer.java +++ b/net/minecraft/server/AdvancementDataPlayer.java -@@ -163,7 +163,11 @@ +@@ -181,7 +181,11 @@ Advancement advancement = advancementdataworld.a((MinecraftKey) entry.getKey()); if (advancement == null) { @@ -13,7 +13,7 @@ } else { this.a(advancement, (AdvancementProgress) entry.getValue()); } -@@ -278,6 +282,7 @@ +@@ -296,6 +300,7 @@ this.j.add(advancement); flag = true; if (!flag1 && advancementprogress.isDone()) { diff --git a/nms-patches/net/minecraft/server/CustomFunctionData.patch b/nms-patches/net/minecraft/server/CustomFunctionData.patch index 113934fe1..3011b3c60 100644 --- a/nms-patches/net/minecraft/server/CustomFunctionData.patch +++ b/nms-patches/net/minecraft/server/CustomFunctionData.patch @@ -1,9 +1,9 @@ --- a/net/minecraft/server/CustomFunctionData.java +++ b/net/minecraft/server/CustomFunctionData.java -@@ -30,7 +30,7 @@ +@@ -36,7 +36,7 @@ } - public com.mojang.brigadier.CommandDispatcher getCommandDispatcher() { + public CommandDispatcher getCommandDispatcher() { - return this.server.getCommandDispatcher().a(); + return this.server.vanillaCommandDispatcher.a(); // CraftBukkit } diff --git a/nms-patches/net/minecraft/server/DispenserRegistry.patch b/nms-patches/net/minecraft/server/DispenserRegistry.patch index 3a9628978..74bb56c6c 100644 --- a/nms-patches/net/minecraft/server/DispenserRegistry.patch +++ b/nms-patches/net/minecraft/server/DispenserRegistry.patch @@ -1,6 +1,19 @@ --- a/net/minecraft/server/DispenserRegistry.java +++ b/net/minecraft/server/DispenserRegistry.java -@@ -31,6 +31,69 @@ +@@ -26,6 +26,12 @@ + import org.apache.logging.log4j.LogManager; + import org.apache.logging.log4j.Logger; + ++// CraftBukkit start ++import net.minecraft.util.datafix.fixes.DataConverterFlattenData; ++import net.minecraft.util.datafix.fixes.DataConverterMaterialId; ++import net.minecraft.util.datafix.fixes.DataConverterSpawnEgg; ++// CraftBukkit end ++ + public class DispenserRegistry { + + public static final PrintStream a = System.out; +@@ -50,6 +56,69 @@ TagStatic.b(); d(); } diff --git a/nms-patches/net/minecraft/server/Main.patch b/nms-patches/net/minecraft/server/Main.patch index 4cad0c466..96c2a42d8 100644 --- a/nms-patches/net/minecraft/server/Main.patch +++ b/nms-patches/net/minecraft/server/Main.patch @@ -1,6 +1,18 @@ --- a/net/minecraft/server/Main.java +++ b/net/minecraft/server/Main.java -@@ -27,7 +27,8 @@ +@@ -54,13 +54,20 @@ + import org.apache.logging.log4j.LogManager; + import org.apache.logging.log4j.Logger; + ++// CraftBukkit start ++import net.minecraft.SharedConstants; ++import net.minecraft.world.level.dimension.DimensionManager; ++import net.minecraft.world.level.dimension.WorldDimension; ++// CraftBukkit end ++ + public class Main { + + private static final Logger LOGGER = LogManager.getLogger(); public Main() {} @@ -10,7 +22,7 @@ OptionParser optionparser = new OptionParser(); OptionSpec optionspec = optionparser.accepts("nogui"); OptionSpec optionspec1 = optionparser.accepts("initSettings", "Initializes 'server.properties' and 'eula.txt', then quits"); -@@ -51,20 +52,22 @@ +@@ -84,21 +91,23 @@ optionparser.printHelpOn(System.err); return; } @@ -22,20 +34,25 @@ DispenserRegistry.c(); SystemUtils.l(); IRegistryCustom.Dimension iregistrycustom_dimension = IRegistryCustom.b(); - java.nio.file.Path java_nio_file_path = Paths.get("server.properties"); -- DedicatedServerSettings dedicatedserversettings = new DedicatedServerSettings(iregistrycustom_dimension, java_nio_file_path); +- Path path = Paths.get("server.properties"); +- DedicatedServerSettings dedicatedserversettings = new DedicatedServerSettings(iregistrycustom_dimension, path); ++ java.nio.file.Path java_nio_file_path = Paths.get("server.properties"); + DedicatedServerSettings dedicatedserversettings = new DedicatedServerSettings(iregistrycustom_dimension, optionset); // CraftBukkit - CLI argument support dedicatedserversettings.save(); - java.nio.file.Path java_nio_file_path1 = Paths.get("eula.txt"); - EULA eula = new EULA(java_nio_file_path1); +- Path path1 = Paths.get("eula.txt"); +- EULA eula = new EULA(path1); ++ java.nio.file.Path java_nio_file_path1 = Paths.get("eula.txt"); ++ EULA eula = new EULA(java_nio_file_path1); - if (optionset.has(optionspec1)) { +- Main.LOGGER.info("Initialized '{}' and '{}'", path.toAbsolutePath(), path1.toAbsolutePath()); + if (optionset.has("initSettings")) { // CraftBukkit - Main.LOGGER.info("Initialized '{}' and '{}'", java_nio_file_path.toAbsolutePath(), java_nio_file_path1.toAbsolutePath()); ++ Main.LOGGER.info("Initialized '{}' and '{}'", java_nio_file_path.toAbsolutePath(), java_nio_file_path1.toAbsolutePath()); return; } -@@ -74,24 +77,42 @@ + +@@ -107,24 +116,42 @@ return; } @@ -82,7 +99,7 @@ DataPackConfiguration datapackconfiguration1 = MinecraftServer.a(resourcepackrepository, datapackconfiguration == null ? DataPackConfiguration.a : datapackconfiguration, flag); CompletableFuture completablefuture = DataPackResources.a(resourcepackrepository.f(), CommandDispatcher.ServerType.DEDICATED, dedicatedserversettings.getProperties().functionPermissionLevel, SystemUtils.f(), Runnable::run); -@@ -106,6 +127,7 @@ +@@ -139,6 +166,7 @@ } datapackresources.i(); @@ -90,7 +107,7 @@ RegistryReadOps registryreadops = RegistryReadOps.a((DynamicOps) DynamicOpsNBT.a, datapackresources.h(), iregistrycustom_dimension); Object object = convertable_conversionsession.a((DynamicOps) registryreadops, datapackconfiguration1); -@@ -133,21 +155,32 @@ +@@ -166,21 +194,32 @@ } convertable_conversionsession.a((IRegistryCustom) iregistrycustom_dimension, (SaveData) object); @@ -125,7 +142,7 @@ Thread thread = new Thread("Server Shutdown Thread") { public void run() { dedicatedserver.safeShutdown(true); -@@ -156,14 +189,15 @@ +@@ -189,14 +228,15 @@ thread.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(Main.LOGGER)); Runtime.getRuntime().addShutdownHook(thread); diff --git a/nms-patches/net/minecraft/server/MinecraftServer.patch b/nms-patches/net/minecraft/server/MinecraftServer.patch index 0022c7eab..431afd605 100644 --- a/nms-patches/net/minecraft/server/MinecraftServer.patch +++ b/nms-patches/net/minecraft/server/MinecraftServer.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java -@@ -55,6 +55,18 @@ +@@ -155,6 +155,25 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -10,6 +10,13 @@ +import com.google.common.collect.ImmutableSet; +import jline.console.ConsoleReader; +import joptsimple.OptionSet; ++import net.minecraft.nbt.DynamicOpsNBT; ++import net.minecraft.nbt.NBTBase; ++import net.minecraft.resources.RegistryReadOps; ++import net.minecraft.server.dedicated.DedicatedServer; ++import net.minecraft.server.dedicated.DedicatedServerProperties; ++import net.minecraft.util.datafix.DataConverterRegistry; ++import net.minecraft.world.level.storage.WorldDataServer; +import org.bukkit.Bukkit; +import org.bukkit.craftbukkit.CraftServer; +import org.bukkit.craftbukkit.Main; @@ -19,7 +26,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant implements IMojangStatistics, ICommandListener, AutoCloseable { public static final Logger LOGGER = LogManager.getLogger(); -@@ -124,6 +136,20 @@ +@@ -224,6 +243,20 @@ private final DefinedStructureManager ak; protected SaveData saveData; @@ -40,7 +47,7 @@ public static S a(Function function) { AtomicReference atomicreference = new AtomicReference(); Thread thread = new Thread(() -> { -@@ -133,21 +159,21 @@ +@@ -233,21 +266,21 @@ thread.setUncaughtExceptionHandler((thread1, throwable) -> { MinecraftServer.LOGGER.error(throwable); }); @@ -65,7 +72,7 @@ this.isRunning = true; this.h = new long[100]; this.K = ""; -@@ -173,7 +199,34 @@ +@@ -273,7 +306,34 @@ this.ak = new DefinedStructureManager(datapackresources.h(), convertable_conversionsession, datafixer); this.serverThread = thread; this.executorService = SystemUtils.f(); @@ -100,7 +107,7 @@ private void initializeScoreboards(WorldPersistentData worldpersistentdata) { PersistentScoreboard persistentscoreboard = (PersistentScoreboard) worldpersistentdata.a(PersistentScoreboard::new, "scoreboard"); -@@ -186,7 +239,7 @@ +@@ -286,7 +346,7 @@ public static void convertWorld(Convertable.ConversionSession convertable_conversionsession) { if (convertable_conversionsession.isConvertable()) { @@ -109,7 +116,7 @@ convertable_conversionsession.convert(new IProgressUpdate() { private long a = SystemUtils.getMonotonicMillis(); -@@ -209,45 +262,184 @@ +@@ -309,45 +369,184 @@ } @@ -325,7 +332,7 @@ WorldBorder worldborder = worldserver.getWorldBorder(); worldborder.a(iworlddataserver.r()); -@@ -272,31 +464,8 @@ +@@ -372,31 +571,8 @@ iworlddataserver.c(true); } @@ -358,7 +365,7 @@ private static void a(WorldServer worldserver, IWorldDataServer iworlddataserver, boolean flag, boolean flag1, boolean flag2) { ChunkGenerator chunkgenerator = worldserver.getChunkProvider().getChunkGenerator(); -@@ -312,6 +481,21 @@ +@@ -412,6 +588,21 @@ return biomebase.b().b(); }, random); ChunkCoordIntPair chunkcoordintpair = blockposition == null ? new ChunkCoordIntPair(0, 0) : new ChunkCoordIntPair(blockposition); @@ -380,7 +387,7 @@ if (blockposition == null) { MinecraftServer.LOGGER.warn("Unable to find spawn biome"); -@@ -378,8 +562,15 @@ +@@ -478,8 +669,15 @@ iworlddataserver.setGameType(EnumGamemode.SPECTATOR); } @@ -398,7 +405,7 @@ MinecraftServer.LOGGER.info("Preparing start region for dimension {}", worldserver.getDimensionKey().a()); BlockPosition blockposition = worldserver.getSpawn(); -@@ -392,17 +583,21 @@ +@@ -492,17 +690,21 @@ chunkproviderserver.addTicket(TicketType.START, new ChunkCoordIntPair(blockposition), 11, Unit.INSTANCE); while (chunkproviderserver.b() != 441) { @@ -429,7 +436,7 @@ if (forcedchunk != null) { LongIterator longiterator = forcedchunk.a().iterator(); -@@ -416,11 +611,18 @@ +@@ -516,11 +718,18 @@ } } @@ -451,7 +458,7 @@ } protected void loadResourcesZip() { -@@ -465,12 +667,16 @@ +@@ -565,12 +774,16 @@ worldserver.save((IProgressUpdate) null, flag1, worldserver.savingDisabled && !flag2); } @@ -468,7 +475,7 @@ return flag3; } -@@ -479,8 +685,29 @@ +@@ -579,8 +792,29 @@ this.stop(); } @@ -498,7 +505,7 @@ if (this.getServerConnection() != null) { this.getServerConnection().b(); } -@@ -489,6 +716,7 @@ +@@ -589,6 +823,7 @@ MinecraftServer.LOGGER.info("Saving players"); this.playerList.savePlayers(); this.playerList.shutdown(); @@ -506,7 +513,7 @@ } MinecraftServer.LOGGER.info("Saving worlds"); -@@ -566,14 +794,16 @@ +@@ -666,14 +901,16 @@ while (this.isRunning) { long i = SystemUtils.getMonotonicMillis() - this.nextTick; @@ -524,7 +531,7 @@ this.nextTick += 50L; GameProfilerTick gameprofilertick = GameProfilerTick.a("Server"); -@@ -619,6 +849,12 @@ +@@ -719,6 +956,12 @@ } catch (Throwable throwable1) { MinecraftServer.LOGGER.error("Exception stopping the server", throwable1); } finally { @@ -537,7 +544,7 @@ this.exit(); } -@@ -627,8 +863,15 @@ +@@ -727,8 +970,15 @@ } private boolean canSleepForTick() { @@ -554,7 +561,7 @@ protected void sleepForTick() { this.executeAll(); -@@ -734,7 +977,7 @@ +@@ -834,7 +1084,7 @@ this.serverPing.b().a(agameprofile); } @@ -563,7 +570,7 @@ MinecraftServer.LOGGER.debug("Autosave started"); this.methodProfiler.enter("save"); this.playerList.savePlayers(); -@@ -764,22 +1007,39 @@ +@@ -864,22 +1114,39 @@ } protected void b(BooleanSupplier booleansupplier) { @@ -603,7 +610,7 @@ this.methodProfiler.enter("tick"); -@@ -863,7 +1123,7 @@ +@@ -963,7 +1230,7 @@ } public String getServerModName() { @@ -612,7 +619,7 @@ } public CrashReport b(CrashReport crashreport) { -@@ -1220,16 +1480,17 @@ +@@ -1320,16 +1587,17 @@ public CompletableFuture a(Collection collection) { CompletableFuture completablefuture = CompletableFuture.supplyAsync(() -> { @@ -632,7 +639,7 @@ this.resourcePackRepository.a(collection); this.saveData.a(a(this.resourcePackRepository)); datapackresources.i(); -@@ -1595,6 +1856,22 @@ +@@ -1695,6 +1963,22 @@ } diff --git a/nms-patches/net/minecraft/server/ScoreboardServer.patch b/nms-patches/net/minecraft/server/ScoreboardServer.patch index aa58fe766..8de9c327c 100644 --- a/nms-patches/net/minecraft/server/ScoreboardServer.patch +++ b/nms-patches/net/minecraft/server/ScoreboardServer.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/server/ScoreboardServer.java +++ b/net/minecraft/server/ScoreboardServer.java -@@ -22,7 +22,7 @@ +@@ -32,7 +32,7 @@ public void handleScoreChanged(ScoreboardScore scoreboardscore) { super.handleScoreChanged(scoreboardscore); if (this.b.contains(scoreboardscore.getObjective())) { @@ -9,7 +9,7 @@ } this.b(); -@@ -31,7 +31,7 @@ +@@ -41,7 +41,7 @@ @Override public void handlePlayerRemoved(String s) { super.handlePlayerRemoved(s); @@ -18,7 +18,7 @@ this.b(); } -@@ -39,7 +39,7 @@ +@@ -49,7 +49,7 @@ public void a(String s, ScoreboardObjective scoreboardobjective) { super.a(s, scoreboardobjective); if (this.b.contains(scoreboardobjective)) { @@ -27,7 +27,7 @@ } this.b(); -@@ -52,7 +52,7 @@ +@@ -62,7 +62,7 @@ super.setDisplaySlot(i, scoreboardobjective); if (scoreboardobjective1 != scoreboardobjective && scoreboardobjective1 != null) { if (this.h(scoreboardobjective1) > 0) { @@ -36,7 +36,7 @@ } else { this.g(scoreboardobjective1); } -@@ -60,7 +60,7 @@ +@@ -70,7 +70,7 @@ if (scoreboardobjective != null) { if (this.b.contains(scoreboardobjective)) { @@ -45,7 +45,7 @@ } else { this.e(scoreboardobjective); } -@@ -72,7 +72,7 @@ +@@ -82,7 +82,7 @@ @Override public boolean addPlayerToTeam(String s, ScoreboardTeam scoreboardteam) { if (super.addPlayerToTeam(s, scoreboardteam)) { @@ -54,7 +54,7 @@ this.b(); return true; } else { -@@ -83,7 +83,7 @@ +@@ -93,7 +93,7 @@ @Override public void removePlayerFromTeam(String s, ScoreboardTeam scoreboardteam) { super.removePlayerFromTeam(s, scoreboardteam); @@ -63,7 +63,7 @@ this.b(); } -@@ -97,7 +97,7 @@ +@@ -107,7 +107,7 @@ public void handleObjectiveChanged(ScoreboardObjective scoreboardobjective) { super.handleObjectiveChanged(scoreboardobjective); if (this.b.contains(scoreboardobjective)) { @@ -72,7 +72,7 @@ } this.b(); -@@ -116,21 +116,21 @@ +@@ -126,21 +126,21 @@ @Override public void handleTeamAdded(ScoreboardTeam scoreboardteam) { super.handleTeamAdded(scoreboardteam); @@ -97,7 +97,7 @@ this.b(); } -@@ -179,6 +179,7 @@ +@@ -189,6 +189,7 @@ while (iterator.hasNext()) { EntityPlayer entityplayer = (EntityPlayer) iterator.next(); @@ -105,7 +105,7 @@ Iterator iterator1 = list.iterator(); while (iterator1.hasNext()) { -@@ -211,6 +212,7 @@ +@@ -221,6 +222,7 @@ while (iterator.hasNext()) { EntityPlayer entityplayer = (EntityPlayer) iterator.next(); @@ -113,7 +113,7 @@ Iterator iterator1 = list.iterator(); while (iterator1.hasNext()) { -@@ -235,6 +237,16 @@ +@@ -245,6 +247,16 @@ return i; } diff --git a/nms-patches/net/minecraft/server/bossevents/BossBattleCustom.patch b/nms-patches/net/minecraft/server/bossevents/BossBattleCustom.patch index ce2c0d372..e8a5292d5 100644 --- a/nms-patches/net/minecraft/server/bossevents/BossBattleCustom.patch +++ b/nms-patches/net/minecraft/server/bossevents/BossBattleCustom.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/BossBattleCustom.java -+++ b/net/minecraft/server/BossBattleCustom.java -@@ -6,12 +6,27 @@ - import java.util.Set; - import java.util.UUID; +--- a/net/minecraft/server/bossevents/BossBattleCustom.java ++++ b/net/minecraft/server/bossevents/BossBattleCustom.java +@@ -18,12 +18,27 @@ + import net.minecraft.util.MathHelper; + import net.minecraft.world.BossBattle; +// CraftBukkit start +import org.bukkit.boss.KeyedBossBar; diff --git a/nms-patches/net/minecraft/server/commands/CommandEffect.patch b/nms-patches/net/minecraft/server/commands/CommandEffect.patch index 42f552438..c7a2f22e4 100644 --- a/nms-patches/net/minecraft/server/commands/CommandEffect.patch +++ b/nms-patches/net/minecraft/server/commands/CommandEffect.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/CommandEffect.java -+++ b/net/minecraft/server/CommandEffect.java -@@ -62,7 +62,7 @@ +--- a/net/minecraft/server/commands/CommandEffect.java ++++ b/net/minecraft/server/commands/CommandEffect.java +@@ -71,7 +71,7 @@ if (entity instanceof EntityLiving) { MobEffect mobeffect = new MobEffect(mobeffectlist, k, i, false, flag); @@ -9,7 +9,7 @@ ++j; } } -@@ -88,7 +88,7 @@ +@@ -97,7 +97,7 @@ while (iterator.hasNext()) { Entity entity = (Entity) iterator.next(); @@ -18,7 +18,7 @@ ++i; } } -@@ -113,7 +113,7 @@ +@@ -122,7 +122,7 @@ while (iterator.hasNext()) { Entity entity = (Entity) iterator.next(); diff --git a/nms-patches/net/minecraft/server/commands/CommandGamemode.patch b/nms-patches/net/minecraft/server/commands/CommandGamemode.patch index b29b48284..a6e32badd 100644 --- a/nms-patches/net/minecraft/server/commands/CommandGamemode.patch +++ b/nms-patches/net/minecraft/server/commands/CommandGamemode.patch @@ -1,12 +1,12 @@ ---- a/net/minecraft/server/CommandGamemode.java -+++ b/net/minecraft/server/CommandGamemode.java -@@ -55,6 +55,12 @@ +--- a/net/minecraft/server/commands/CommandGamemode.java ++++ b/net/minecraft/server/commands/CommandGamemode.java +@@ -63,6 +63,12 @@ if (entityplayer.playerInteractManager.getGameMode() != enumgamemode) { entityplayer.a(enumgamemode); + // CraftBukkit start - handle event cancelling the change + if (entityplayer.playerInteractManager.getGameMode() != enumgamemode) { -+ commandcontext.getSource().sendFailureMessage(new ChatComponentText("Failed to set the gamemode of '" + entityplayer.getName() + "'")); ++ commandcontext.getSource().sendFailureMessage(new net.minecraft.network.chat.ChatComponentText("Failed to set the gamemode of '" + entityplayer.getName() + "'")); + continue; + } + // CraftBukkit end diff --git a/nms-patches/net/minecraft/server/commands/CommandGamerule.patch b/nms-patches/net/minecraft/server/commands/CommandGamerule.patch index ee5121aff..b15ef20f8 100644 --- a/nms-patches/net/minecraft/server/commands/CommandGamerule.patch +++ b/nms-patches/net/minecraft/server/commands/CommandGamerule.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/CommandGamerule.java -+++ b/net/minecraft/server/CommandGamerule.java -@@ -25,7 +25,7 @@ +--- a/net/minecraft/server/commands/CommandGamerule.java ++++ b/net/minecraft/server/commands/CommandGamerule.java +@@ -29,7 +29,7 @@ private static > int b(CommandContext commandcontext, GameRules.GameRuleKey gamerules_gamerulekey) { CommandListenerWrapper commandlistenerwrapper = (CommandListenerWrapper) commandcontext.getSource(); @@ -9,7 +9,7 @@ t0.b(commandcontext, "value"); commandlistenerwrapper.sendMessage(new ChatMessage("commands.gamerule.set", new Object[]{gamerules_gamerulekey.a(), t0.toString()}), true); -@@ -33,7 +33,7 @@ +@@ -37,7 +37,7 @@ } private static > int b(CommandListenerWrapper commandlistenerwrapper, GameRules.GameRuleKey gamerules_gamerulekey) { diff --git a/nms-patches/net/minecraft/server/commands/CommandReload.patch b/nms-patches/net/minecraft/server/commands/CommandReload.patch index 4257289f4..aa80246d7 100644 --- a/nms-patches/net/minecraft/server/commands/CommandReload.patch +++ b/nms-patches/net/minecraft/server/commands/CommandReload.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/CommandReload.java -+++ b/net/minecraft/server/CommandReload.java -@@ -36,6 +36,16 @@ +--- a/net/minecraft/server/commands/CommandReload.java ++++ b/net/minecraft/server/commands/CommandReload.java +@@ -42,6 +42,16 @@ return collection1; } @@ -14,6 +14,6 @@ + } + // CraftBukkit end + - public static void a(com.mojang.brigadier.CommandDispatcher com_mojang_brigadier_commanddispatcher) { - com_mojang_brigadier_commanddispatcher.register((LiteralArgumentBuilder) ((LiteralArgumentBuilder) CommandDispatcher.a("reload").requires((commandlistenerwrapper) -> { + public static void a(CommandDispatcher commanddispatcher) { + commanddispatcher.register((LiteralArgumentBuilder) ((LiteralArgumentBuilder) net.minecraft.commands.CommandDispatcher.a("reload").requires((commandlistenerwrapper) -> { return commandlistenerwrapper.hasPermission(2); diff --git a/nms-patches/net/minecraft/server/commands/CommandSpreadPlayers.patch b/nms-patches/net/minecraft/server/commands/CommandSpreadPlayers.patch index 928dadb88..908a245e6 100644 --- a/nms-patches/net/minecraft/server/commands/CommandSpreadPlayers.patch +++ b/nms-patches/net/minecraft/server/commands/CommandSpreadPlayers.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/CommandSpreadPlayers.java -+++ b/net/minecraft/server/CommandSpreadPlayers.java -@@ -61,7 +61,7 @@ +--- a/net/minecraft/server/commands/CommandSpreadPlayers.java ++++ b/net/minecraft/server/commands/CommandSpreadPlayers.java +@@ -77,7 +77,7 @@ if (entity instanceof EntityHuman) { set.add(entity.getScoreboardTeam()); } else { @@ -9,7 +9,7 @@ } } -@@ -270,7 +270,7 @@ +@@ -286,7 +286,7 @@ for (boolean flag2 = iblockaccess.getType(blockposition_mutableblockposition).isAir(); blockposition_mutableblockposition.getY() > 0; flag2 = flag1) { blockposition_mutableblockposition.c(EnumDirection.DOWN); @@ -18,7 +18,7 @@ if (!flag1 && flag2 && flag) { return blockposition_mutableblockposition.getY() + 1; } -@@ -283,7 +283,7 @@ +@@ -299,7 +299,7 @@ public boolean b(IBlockAccess iblockaccess, int i) { BlockPosition blockposition = new BlockPosition(this.a, (double) (this.a(iblockaccess, i) - 1), this.b); @@ -27,7 +27,7 @@ Material material = iblockdata.getMaterial(); return blockposition.getY() < i && !material.isLiquid() && material != Material.FIRE; -@@ -293,5 +293,12 @@ +@@ -309,5 +309,12 @@ this.a = MathHelper.a(random, d0, d2); this.b = MathHelper.a(random, d1, d3); } diff --git a/nms-patches/net/minecraft/server/commands/CommandTeleport.patch b/nms-patches/net/minecraft/server/commands/CommandTeleport.patch index d19b84e27..d00d4e10d 100644 --- a/nms-patches/net/minecraft/server/commands/CommandTeleport.patch +++ b/nms-patches/net/minecraft/server/commands/CommandTeleport.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/CommandTeleport.java -+++ b/net/minecraft/server/CommandTeleport.java -@@ -13,6 +13,12 @@ - import java.util.Set; - import javax.annotation.Nullable; +--- a/net/minecraft/server/commands/CommandTeleport.java ++++ b/net/minecraft/server/commands/CommandTeleport.java +@@ -35,6 +35,12 @@ + import net.minecraft.world.phys.Vec2F; + import net.minecraft.world.phys.Vec3D; +// CraftBukkit start +import org.bukkit.Location; @@ -13,7 +13,7 @@ public class CommandTeleport { private static final SimpleCommandExceptionType a = new SimpleCommandExceptionType(new ChatMessage("commands.teleport.invalidPosition")); -@@ -128,9 +134,9 @@ +@@ -150,9 +156,9 @@ } if (worldserver == entity.world) { @@ -25,7 +25,7 @@ } entity.setHeadRotation(f); -@@ -139,6 +145,21 @@ +@@ -161,6 +167,21 @@ float f3 = MathHelper.g(f1); f3 = MathHelper.a(f3, -90.0F, 90.0F); diff --git a/nms-patches/net/minecraft/server/commands/CommandTime.patch b/nms-patches/net/minecraft/server/commands/CommandTime.patch index 70526898e..328f5225f 100644 --- a/nms-patches/net/minecraft/server/commands/CommandTime.patch +++ b/nms-patches/net/minecraft/server/commands/CommandTime.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/CommandTime.java -+++ b/net/minecraft/server/CommandTime.java -@@ -5,6 +5,11 @@ - import com.mojang.brigadier.builder.LiteralArgumentBuilder; - import java.util.Iterator; +--- a/net/minecraft/server/commands/CommandTime.java ++++ b/net/minecraft/server/commands/CommandTime.java +@@ -10,6 +10,11 @@ + import net.minecraft.network.chat.ChatMessage; + import net.minecraft.server.level.WorldServer; +// CraftBukkit start +import org.bukkit.Bukkit; @@ -11,8 +11,8 @@ + public class CommandTime { - public static void a(com.mojang.brigadier.CommandDispatcher com_mojang_brigadier_commanddispatcher) { -@@ -46,7 +51,13 @@ + public static void a(CommandDispatcher commanddispatcher) { +@@ -51,7 +56,13 @@ while (iterator.hasNext()) { WorldServer worldserver = (WorldServer) iterator.next(); @@ -27,7 +27,7 @@ } commandlistenerwrapper.sendMessage(new ChatMessage("commands.time.set", new Object[]{i}), true); -@@ -59,7 +70,13 @@ +@@ -64,7 +75,13 @@ while (iterator.hasNext()) { WorldServer worldserver = (WorldServer) iterator.next(); diff --git a/nms-patches/net/minecraft/server/dedicated/DedicatedServer.patch b/nms-patches/net/minecraft/server/dedicated/DedicatedServer.patch index d5890e9a2..403bb661b 100644 --- a/nms-patches/net/minecraft/server/dedicated/DedicatedServer.patch +++ b/nms-patches/net/minecraft/server/dedicated/DedicatedServer.patch @@ -1,10 +1,11 @@ ---- a/net/minecraft/server/DedicatedServer.java -+++ b/net/minecraft/server/DedicatedServer.java -@@ -22,6 +22,14 @@ +--- a/net/minecraft/server/dedicated/DedicatedServer.java ++++ b/net/minecraft/server/dedicated/DedicatedServer.java +@@ -60,6 +60,15 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +// CraftBukkit start ++import net.minecraft.world.level.DataPackConfiguration; +import org.apache.logging.log4j.Level; +import org.apache.logging.log4j.io.IoBuilder; +import org.bukkit.command.CommandSender; @@ -15,7 +16,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer { private static final Logger LOGGER = LogManager.getLogger(); -@@ -36,8 +44,10 @@ +@@ -74,8 +83,10 @@ @Nullable private final TextFilter r; @@ -28,7 +29,7 @@ this.propertyManager = dedicatedserversettings; this.remoteControlCommandListener = new RemoteControlCommandListener(this); this.r = null; -@@ -47,13 +57,44 @@ +@@ -85,13 +96,44 @@ public boolean init() throws IOException { Thread thread = new Thread("Server console handler") { public void run() { @@ -76,7 +77,7 @@ } } catch (IOException ioexception) { DedicatedServer.LOGGER.error("Exception handling console input", ioexception); -@@ -62,6 +103,27 @@ +@@ -100,6 +142,27 @@ } }; @@ -104,7 +105,7 @@ thread.setDaemon(true); thread.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(DedicatedServer.LOGGER)); thread.start(); -@@ -88,7 +150,7 @@ +@@ -126,7 +189,7 @@ this.setForceGamemode(dedicatedserverproperties.forceGamemode); super.setIdleTimeout((Integer) dedicatedserverproperties.playerIdleTimeout.get()); this.i(dedicatedserverproperties.enforceWhitelist); @@ -113,7 +114,7 @@ DedicatedServer.LOGGER.info("Default game type: {}", dedicatedserverproperties.gamemode); InetAddress inetaddress = null; -@@ -112,6 +174,12 @@ +@@ -150,6 +213,12 @@ return false; } @@ -126,7 +127,7 @@ if (!this.getOnlineMode()) { DedicatedServer.LOGGER.warn("**** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!"); DedicatedServer.LOGGER.warn("The server will make no attempt to authenticate usernames. Beware."); -@@ -126,7 +194,7 @@ +@@ -164,7 +233,7 @@ if (!NameReferencingFileConverter.e(this)) { return false; } else { @@ -135,7 +136,7 @@ long i = SystemUtils.getMonotonicNanos(); this.c(dedicatedserverproperties.maxBuildHeight); -@@ -134,7 +202,7 @@ +@@ -172,7 +241,7 @@ TileEntitySkull.a(this.getMinecraftSessionService()); UserCache.a(this.getOnlineMode()); DedicatedServer.LOGGER.info("Preparing level \"{}\"", this.getWorld()); @@ -144,7 +145,7 @@ long j = SystemUtils.getMonotonicNanos() - i; String s = String.format(Locale.ROOT, "%.3fs", (double) j / 1.0E9D); -@@ -151,6 +219,7 @@ +@@ -189,6 +258,7 @@ if (dedicatedserverproperties.enableRcon) { DedicatedServer.LOGGER.info("Starting remote control listener"); this.remoteControlListener = RemoteControlListener.a((IMinecraftServer) this); @@ -152,7 +153,7 @@ } if (this.getMaxTickTime() > 0L) { -@@ -265,6 +334,7 @@ +@@ -303,6 +373,7 @@ this.remoteStatusListener.b(); } @@ -160,7 +161,7 @@ } @Override -@@ -293,7 +363,15 @@ +@@ -331,7 +402,15 @@ while (!this.serverCommandQueue.isEmpty()) { ServerCommand servercommand = (ServerCommand) this.serverCommandQueue.remove(0); @@ -177,7 +178,7 @@ } } -@@ -503,14 +581,45 @@ +@@ -541,14 +620,45 @@ @Override public String getPlugins() { @@ -225,7 +226,7 @@ }); return this.remoteControlCommandListener.getMessages(); } -@@ -552,4 +661,15 @@ +@@ -590,4 +700,15 @@ public ITextFilter a(EntityPlayer entityplayer) { return this.r != null ? this.r.a(entityplayer.getProfile()) : null; } diff --git a/nms-patches/net/minecraft/server/dedicated/DedicatedServerProperties.patch b/nms-patches/net/minecraft/server/dedicated/DedicatedServerProperties.patch index cf05169f0..dbf763a92 100644 --- a/nms-patches/net/minecraft/server/dedicated/DedicatedServerProperties.patch +++ b/nms-patches/net/minecraft/server/dedicated/DedicatedServerProperties.patch @@ -1,12 +1,12 @@ ---- a/net/minecraft/server/DedicatedServerProperties.java -+++ b/net/minecraft/server/DedicatedServerProperties.java -@@ -3,8 +3,14 @@ - import java.util.Properties; - import java.util.concurrent.TimeUnit; +--- a/net/minecraft/server/dedicated/DedicatedServerProperties.java ++++ b/net/minecraft/server/dedicated/DedicatedServerProperties.java +@@ -9,8 +9,14 @@ + import net.minecraft.world.level.EnumGamemode; + import net.minecraft.world.level.levelgen.GeneratorSettings; +// CraftBukkit start +import joptsimple.OptionSet; -+import net.minecraft.server.PropertyManager.EditableProperty; ++import net.minecraft.server.dedicated.PropertyManager.EditableProperty; +// CraftBukkit end + public class DedicatedServerProperties extends PropertyManager { @@ -15,7 +15,7 @@ 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 +61,10 @@ +@@ -61,8 +67,10 @@ public final PropertyManager.EditableProperty whiteList; public final GeneratorSettings generatorSettings; @@ -28,15 +28,15 @@ 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 +115,14 @@ +@@ -113,12 +121,14 @@ this.generatorSettings = GeneratorSettings.a(iregistrycustom, properties); } -- public static DedicatedServerProperties load(IRegistryCustom iregistrycustom, java.nio.file.Path java_nio_file_path) { -- return new DedicatedServerProperties(loadPropertiesFile(java_nio_file_path), iregistrycustom); +- public static DedicatedServerProperties load(IRegistryCustom iregistrycustom, Path path) { +- return new DedicatedServerProperties(loadPropertiesFile(path), iregistrycustom); + // CraftBukkit start -+ public static DedicatedServerProperties load(IRegistryCustom iregistrycustom, java.nio.file.Path java_nio_file_path, OptionSet optionset) { -+ return new DedicatedServerProperties(loadPropertiesFile(java_nio_file_path), iregistrycustom, optionset); ++ public static DedicatedServerProperties load(IRegistryCustom iregistrycustom, Path path, OptionSet optionset) { ++ return new DedicatedServerProperties(loadPropertiesFile(path), iregistrycustom, optionset); } @Override diff --git a/nms-patches/net/minecraft/server/dedicated/DedicatedServerSettings.patch b/nms-patches/net/minecraft/server/dedicated/DedicatedServerSettings.patch index 09600053c..c80d143f1 100644 --- a/nms-patches/net/minecraft/server/dedicated/DedicatedServerSettings.patch +++ b/nms-patches/net/minecraft/server/dedicated/DedicatedServerSettings.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/DedicatedServerSettings.java -+++ b/net/minecraft/server/DedicatedServerSettings.java -@@ -2,14 +2,21 @@ - +--- a/net/minecraft/server/dedicated/DedicatedServerSettings.java ++++ b/net/minecraft/server/dedicated/DedicatedServerSettings.java +@@ -4,14 +4,21 @@ import java.util.function.UnaryOperator; + import net.minecraft.core.IRegistryCustom; +// CraftBukkit start +import java.io.File; @@ -11,12 +11,12 @@ + public class DedicatedServerSettings { - private final java.nio.file.Path path; + private final Path path; private DedicatedServerProperties properties; -- public DedicatedServerSettings(IRegistryCustom iregistrycustom, java.nio.file.Path java_nio_file_path) { -- this.path = java_nio_file_path; -- this.properties = DedicatedServerProperties.load(iregistrycustom, java_nio_file_path); +- public DedicatedServerSettings(IRegistryCustom iregistrycustom, Path path) { +- this.path = path; +- this.properties = DedicatedServerProperties.load(iregistrycustom, path); + // CraftBukkit start + public DedicatedServerSettings(IRegistryCustom iregistrycustom, OptionSet optionset) { + this.path = ((File) optionset.valueOf("config")).toPath(); diff --git a/nms-patches/net/minecraft/server/dedicated/PropertyManager.patch b/nms-patches/net/minecraft/server/dedicated/PropertyManager.patch index ed74157a5..46cb5dac7 100644 --- a/nms-patches/net/minecraft/server/dedicated/PropertyManager.patch +++ b/nms-patches/net/minecraft/server/dedicated/PropertyManager.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/PropertyManager.java -+++ b/net/minecraft/server/PropertyManager.java -@@ -15,15 +15,30 @@ +--- a/net/minecraft/server/dedicated/PropertyManager.java ++++ b/net/minecraft/server/dedicated/PropertyManager.java +@@ -17,15 +17,30 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -29,22 +29,22 @@ + } + // CraftBukkit end + - public static Properties loadPropertiesFile(java.nio.file.Path java_nio_file_path) { + public static Properties loadPropertiesFile(Path path) { Properties properties = new Properties(); -@@ -59,6 +74,11 @@ +@@ -61,6 +76,11 @@ - public void savePropertiesFile(java.nio.file.Path java_nio_file_path) { + public void savePropertiesFile(Path path) { try { + // CraftBukkit start - Don't attempt writing to file if it's read only -+ if (java_nio_file_path.toFile().exists() && !java_nio_file_path.toFile().canWrite()) { ++ if (path.toFile().exists() && !path.toFile().canWrite()) { + return; + } + // CraftBukkit end - OutputStream outputstream = Files.newOutputStream(java_nio_file_path); + OutputStream outputstream = Files.newOutputStream(path); Throwable throwable = null; -@@ -90,7 +110,7 @@ +@@ -92,7 +112,7 @@ private static Function a(Function function) { return (s) -> { try { @@ -53,7 +53,7 @@ } catch (NumberFormatException numberformatexception) { return null; } -@@ -109,7 +129,7 @@ +@@ -111,7 +131,7 @@ @Nullable private String c(String s) { @@ -62,7 +62,7 @@ } @Nullable -@@ -137,7 +157,7 @@ +@@ -139,7 +159,7 @@ V v1 = MoreObjects.firstNonNull(s1 != null ? function.apply(s1) : null, v0); this.properties.put(s, function1.apply(v1)); @@ -71,7 +71,7 @@ } protected V a(String s, Function function, UnaryOperator unaryoperator, Function function1, V v0) { -@@ -166,7 +186,7 @@ +@@ -168,7 +188,7 @@ } protected int getInt(String s, int i) { @@ -80,7 +80,7 @@ } protected PropertyManager.EditableProperty b(String s, int i) { -@@ -178,7 +198,7 @@ +@@ -180,7 +200,7 @@ } protected long getLong(String s, long i) { @@ -89,7 +89,7 @@ } protected boolean getBoolean(String s, boolean flag) { -@@ -201,7 +221,7 @@ +@@ -203,7 +223,7 @@ return properties; } @@ -98,7 +98,7 @@ public class EditableProperty implements Supplier { -@@ -209,7 +229,7 @@ +@@ -211,7 +231,7 @@ private final V c; private final Function d; @@ -107,7 +107,7 @@ this.b = s; this.c = object; this.d = function; -@@ -223,7 +243,7 @@ +@@ -225,7 +245,7 @@ Properties properties = PropertyManager.this.a(); properties.put(this.b, this.d.apply(v0)); diff --git a/nms-patches/net/minecraft/server/gui/ServerGUI.patch b/nms-patches/net/minecraft/server/gui/ServerGUI.patch index 26d6d72fe..98919073f 100644 --- a/nms-patches/net/minecraft/server/gui/ServerGUI.patch +++ b/nms-patches/net/minecraft/server/gui/ServerGUI.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/ServerGUI.java -+++ b/net/minecraft/server/ServerGUI.java -@@ -158,6 +158,7 @@ +--- a/net/minecraft/server/gui/ServerGUI.java ++++ b/net/minecraft/server/gui/ServerGUI.java +@@ -160,6 +160,7 @@ this.e.forEach(Runnable::run); } @@ -8,7 +8,7 @@ public void a(JTextArea jtextarea, JScrollPane jscrollpane, String s) { if (!SwingUtilities.isEventDispatchThread()) { SwingUtilities.invokeLater(() -> { -@@ -173,7 +174,7 @@ +@@ -175,7 +176,7 @@ } try { diff --git a/nms-patches/net/minecraft/server/level/ChunkMapDistance.patch b/nms-patches/net/minecraft/server/level/ChunkMapDistance.patch index 294996698..a22bcbb1a 100644 --- a/nms-patches/net/minecraft/server/level/ChunkMapDistance.patch +++ b/nms-patches/net/minecraft/server/level/ChunkMapDistance.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/ChunkMapDistance.java -+++ b/net/minecraft/server/ChunkMapDistance.java -@@ -59,7 +59,7 @@ +--- a/net/minecraft/server/level/ChunkMapDistance.java ++++ b/net/minecraft/server/level/ChunkMapDistance.java +@@ -65,7 +65,7 @@ while (objectiterator.hasNext()) { Entry>> entry = (Entry) objectiterator.next(); @@ -9,7 +9,7 @@ return ticket.b(this.currentTick); })) { this.ticketLevelTracker.update(entry.getLongKey(), getLowestTicketLevel((ArraySetSorted) entry.getValue()), false); -@@ -95,10 +95,25 @@ +@@ -101,10 +101,25 @@ } if (!this.pendingChunkUpdates.isEmpty()) { @@ -38,7 +38,7 @@ return true; } else { if (!this.l.isEmpty()) { -@@ -134,23 +149,25 @@ +@@ -140,23 +155,25 @@ } } @@ -68,7 +68,7 @@ } if (arraysetsorted.isEmpty()) { -@@ -158,16 +175,29 @@ +@@ -164,16 +181,29 @@ } this.ticketLevelTracker.update(i, getLowestTicketLevel(arraysetsorted), false); @@ -101,7 +101,7 @@ } public void addTicket(TicketType tickettype, ChunkCoordIntPair chunkcoordintpair, int i, T t0) { -@@ -210,6 +240,7 @@ +@@ -216,6 +246,7 @@ public void b(SectionPosition sectionposition, EntityPlayer entityplayer) { long i = sectionposition.r().pair(); ObjectSet objectset = (ObjectSet) this.c.get(i); @@ -109,7 +109,7 @@ objectset.remove(entityplayer); if (objectset.isEmpty()) { -@@ -251,6 +282,26 @@ +@@ -257,6 +288,26 @@ return this.i.a(); } diff --git a/nms-patches/net/minecraft/server/level/ChunkProviderServer.patch b/nms-patches/net/minecraft/server/level/ChunkProviderServer.patch index b7f02ad87..9f436d3ca 100644 --- a/nms-patches/net/minecraft/server/level/ChunkProviderServer.patch +++ b/nms-patches/net/minecraft/server/level/ChunkProviderServer.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/ChunkProviderServer.java -+++ b/net/minecraft/server/ChunkProviderServer.java -@@ -54,6 +54,24 @@ +--- a/net/minecraft/server/level/ChunkProviderServer.java ++++ b/net/minecraft/server/level/ChunkProviderServer.java +@@ -79,6 +79,24 @@ this.clearCache(); } @@ -25,7 +25,7 @@ @Override public LightEngineThreaded getLightEngine() { return this.lightEngine; -@@ -98,7 +116,7 @@ +@@ -123,7 +141,7 @@ for (int l = 0; l < 4; ++l) { if (k == this.cachePos[l] && chunkstatus == this.cacheStatus[l]) { ichunkaccess = this.cacheChunk[l]; @@ -34,7 +34,7 @@ return ichunkaccess; } } -@@ -144,12 +162,12 @@ +@@ -169,12 +187,12 @@ if (playerchunk == null) { return null; } else { @@ -49,7 +49,7 @@ if (ichunkaccess1 != null) { this.a(k, ichunkaccess1, ChunkStatus.FULL); -@@ -176,7 +194,15 @@ +@@ -201,7 +219,15 @@ int l = 33 + ChunkStatus.a(chunkstatus); PlayerChunk playerchunk = this.getChunk(k); @@ -66,7 +66,7 @@ this.chunkMapDistance.a(TicketType.UNKNOWN, chunkcoordintpair, l, chunkcoordintpair); if (this.a(playerchunk, l)) { GameProfilerFiller gameprofilerfiller = this.world.getMethodProfiler(); -@@ -195,7 +221,7 @@ +@@ -220,7 +246,7 @@ } private boolean a(@Nullable PlayerChunk playerchunk, int i) { @@ -75,7 +75,7 @@ } public boolean isLoaded(int i, int j) { -@@ -257,19 +283,19 @@ +@@ -282,19 +308,19 @@ public boolean a(Entity entity) { long i = ChunkCoordIntPair.pair(MathHelper.floor(entity.locX()) >> 4, MathHelper.floor(entity.locZ()) >> 4); @@ -98,7 +98,7 @@ } private boolean a(long i, Function>> function) { -@@ -291,11 +317,31 @@ +@@ -316,11 +342,31 @@ @Override public void close() throws IOException { @@ -131,7 +131,7 @@ public void tick(BooleanSupplier booleansupplier) { this.world.getMethodProfiler().enter("purge"); this.chunkMapDistance.purgeTickets(); -@@ -315,12 +361,12 @@ +@@ -340,12 +386,12 @@ this.lastTickTime = i; WorldData worlddata = this.world.getWorldData(); boolean flag = this.world.isDebugWorld(); @@ -146,7 +146,7 @@ this.world.getMethodProfiler().enter("naturalSpawnCount"); int l = this.chunkMapDistance.b(); -@@ -507,12 +553,18 @@ +@@ -532,12 +578,18 @@ @Override protected boolean executeNext() { diff --git a/nms-patches/net/minecraft/server/level/EntityPlayer.patch b/nms-patches/net/minecraft/server/level/EntityPlayer.patch index b97c40d8e..a37fd60a0 100644 --- a/nms-patches/net/minecraft/server/level/EntityPlayer.patch +++ b/nms-patches/net/minecraft/server/level/EntityPlayer.patch @@ -1,10 +1,17 @@ ---- a/net/minecraft/server/EntityPlayer.java -+++ b/net/minecraft/server/EntityPlayer.java -@@ -15,6 +15,28 @@ +--- a/net/minecraft/server/level/EntityPlayer.java ++++ b/net/minecraft/server/level/EntityPlayer.java +@@ -135,6 +135,35 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +// CraftBukkit start ++import net.minecraft.nbt.NBTBase; ++import net.minecraft.world.damagesource.CombatTracker; ++import net.minecraft.world.food.FoodMetaData; ++import net.minecraft.world.item.enchantment.EnchantmentManager; ++import net.minecraft.world.level.block.BlockChest; ++import net.minecraft.world.level.dimension.DimensionManager; ++import net.minecraft.world.scores.Scoreboard; +import org.bukkit.Bukkit; +import org.bukkit.GameMode; +import org.bukkit.Location; @@ -29,7 +36,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { private static final Logger LOGGER = LogManager.getLogger(); -@@ -60,6 +82,20 @@ +@@ -180,6 +209,20 @@ public int ping; public boolean viewingCredits; @@ -50,7 +57,7 @@ public EntityPlayer(MinecraftServer minecraftserver, WorldServer worldserver, GameProfile gameprofile, PlayerInteractManager playerinteractmanager) { super(worldserver, worldserver.getSpawn(), worldserver.v(), gameprofile); this.spawnDimension = World.OVERWORLD; -@@ -71,12 +107,56 @@ +@@ -191,12 +234,56 @@ this.G = 1.0F; this.c(worldserver); this.co = minecraftserver.a(this); @@ -108,7 +115,7 @@ int i = Math.max(0, this.server.a(worldserver)); int j = MathHelper.floor(worldserver.getWorldBorder().b((double) blockposition.getX(), (double) blockposition.getZ())); -@@ -142,11 +222,20 @@ +@@ -262,11 +349,20 @@ if (nbttagcompound.hasKeyOfType("recipeBook", 10)) { this.recipeBook.a(nbttagcompound.getCompound("recipeBook"), this.server.getCraftingManager()); } @@ -129,7 +136,7 @@ if (nbttagcompound.hasKeyOfType("SpawnX", 99) && nbttagcompound.hasKeyOfType("SpawnY", 99) && nbttagcompound.hasKeyOfType("SpawnZ", 99)) { this.spawn = new BlockPosition(nbttagcompound.getInt("SpawnX"), nbttagcompound.getInt("SpawnY"), nbttagcompound.getInt("SpawnZ")); this.spawnForced = nbttagcompound.getBoolean("SpawnForced"); -@@ -180,7 +269,20 @@ +@@ -300,7 +396,20 @@ Entity entity = this.getRootVehicle(); Entity entity1 = this.getVehicle(); @@ -151,7 +158,7 @@ NBTTagCompound nbttagcompound2 = new NBTTagCompound(); NBTTagCompound nbttagcompound3 = new NBTTagCompound(); -@@ -198,7 +300,7 @@ +@@ -318,7 +427,7 @@ nbttagcompound.setInt("SpawnZ", this.spawn.getZ()); nbttagcompound.setBoolean("SpawnForced", this.spawnForced); nbttagcompound.setFloat("SpawnAngle", this.spawnAngle); @@ -160,7 +167,7 @@ Logger logger = EntityPlayer.LOGGER; logger.getClass(); -@@ -206,9 +308,33 @@ +@@ -326,9 +435,33 @@ nbttagcompound.set("SpawnDimension", nbtbase); }); } @@ -194,7 +201,7 @@ public void a(int i) { float f = (float) this.getExpToLevel(); float f1 = (f - 1.0F) / f; -@@ -262,6 +388,11 @@ +@@ -382,6 +515,11 @@ @Override public void tick() { @@ -206,7 +213,7 @@ this.playerInteractManager.a(); --this.invulnerableTicks; if (this.noDamageTicks > 0) { -@@ -329,7 +460,7 @@ +@@ -449,7 +587,7 @@ } if (this.getHealth() != this.lastHealthSent || this.lastFoodSent != this.foodData.getFoodLevel() || this.foodData.getSaturationLevel() == 0.0F != this.lastSentSaturationZero) { @@ -215,7 +222,7 @@ this.lastHealthSent = this.getHealth(); this.lastFoodSent = this.foodData.getFoodLevel(); this.lastSentSaturationZero = this.foodData.getSaturationLevel() == 0.0F; -@@ -360,6 +491,12 @@ +@@ -480,6 +618,12 @@ this.a(IScoreboardCriteria.XP, MathHelper.f((float) this.lastExpTotalScored)); } @@ -228,7 +235,7 @@ if (this.expLevel != this.lastExpLevelScored) { this.lastExpLevelScored = this.expLevel; this.a(IScoreboardCriteria.LEVEL, MathHelper.f((float) this.lastExpLevelScored)); -@@ -374,6 +511,16 @@ +@@ -494,6 +638,16 @@ CriterionTriggers.p.a(this); } @@ -245,7 +252,7 @@ } catch (Throwable throwable) { CrashReport crashreport = CrashReport.a(throwable, "Ticking player"); CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Player being ticked"); -@@ -384,7 +531,8 @@ +@@ -504,7 +658,8 @@ } private void a(IScoreboardCriteria iscoreboardcriteria, int i) { @@ -255,7 +262,7 @@ scoreboardscore.setScore(i); }); } -@@ -392,9 +540,46 @@ +@@ -512,9 +667,46 @@ @Override public void die(DamageSource damagesource) { boolean flag = this.world.getGameRules().getBoolean(GameRules.SHOW_DEATH_MESSAGES); @@ -304,7 +311,7 @@ this.playerConnection.a((Packet) (new PacketPlayOutCombatEvent(this.getCombatTracker(), PacketPlayOutCombatEvent.EnumCombatEventType.ENTITY_DIED, ichatbasecomponent)), (future) -> { if (!future.isSuccess()) { -@@ -428,12 +613,18 @@ +@@ -548,12 +740,18 @@ if (this.world.getGameRules().getBoolean(GameRules.FORGIVE_DEAD_PLAYERS)) { this.eW(); } @@ -327,7 +334,7 @@ EntityLiving entityliving = this.getKillingEntity(); if (entityliving != null) { -@@ -469,10 +660,12 @@ +@@ -589,10 +787,12 @@ String s = this.getName(); String s1 = entity.getName(); @@ -342,7 +349,7 @@ } else { this.a(StatisticList.MOB_KILLS); } -@@ -490,7 +683,8 @@ +@@ -610,7 +810,8 @@ int i = scoreboardteam.getColor().b(); if (i >= 0 && i < aiscoreboardcriteria.length) { @@ -352,7 +359,7 @@ } } -@@ -534,18 +728,20 @@ +@@ -654,18 +855,20 @@ } private boolean canPvP() { @@ -376,7 +383,7 @@ } else { return shapedetectorshape; } -@@ -554,11 +750,20 @@ +@@ -674,11 +877,20 @@ @Nullable @Override public Entity b(WorldServer worldserver) { @@ -400,7 +407,7 @@ this.decouple(); this.getWorldServer().removePlayer(this); if (!this.viewingCredits) { -@@ -569,6 +774,8 @@ +@@ -689,6 +901,8 @@ return this; } else { @@ -409,7 +416,7 @@ WorldData worlddata = worldserver.getWorldData(); this.playerConnection.sendPacket(new PacketPlayOutRespawn(worldserver.getDimensionManager(), worldserver.getDimensionKey(), BiomeManager.a(worldserver.getSeed()), this.playerInteractManager.getGameMode(), this.playerInteractManager.c(), worldserver.isDebugWorld(), worldserver.isFlatWorld(), true)); -@@ -578,22 +785,52 @@ +@@ -698,22 +912,52 @@ playerlist.d(this); worldserver1.removePlayer(this); this.dead = false; @@ -468,7 +475,7 @@ worldserver1.getMethodProfiler().exit(); this.triggerDimensionAdvancements(worldserver1); this.playerInteractManager.a(worldserver); -@@ -612,12 +849,31 @@ +@@ -732,12 +976,31 @@ this.lastSentExp = -1; this.lastHealthSent = -1.0F; this.lastFoodSent = -1; @@ -500,7 +507,7 @@ private void a(WorldServer worldserver, BlockPosition blockposition) { BlockPosition.MutableBlockPosition blockposition_mutableblockposition = blockposition.i(); -@@ -634,17 +890,17 @@ +@@ -754,17 +1017,17 @@ } @Override @@ -523,7 +530,7 @@ } return optional1; -@@ -688,10 +944,8 @@ +@@ -808,10 +1071,8 @@ this.activeContainer.c(); } @@ -536,7 +543,7 @@ if (!this.isSleeping() && this.isAlive()) { if (!this.world.getDimensionManager().isNatural()) { return Either.left(EntityHuman.EnumBedResult.NOT_POSSIBLE_HERE); -@@ -717,7 +971,36 @@ +@@ -837,7 +1098,36 @@ } } @@ -574,7 +581,7 @@ this.a(StatisticList.SLEEP_IN_BED); CriterionTriggers.q.a(this); }); -@@ -726,9 +1009,8 @@ +@@ -846,9 +1136,8 @@ return either; } } @@ -585,7 +592,7 @@ } @Override -@@ -755,6 +1037,24 @@ +@@ -875,6 +1164,24 @@ @Override public void wakeup(boolean flag, boolean flag1) { @@ -610,7 +617,7 @@ if (this.isSleeping()) { this.getWorldServer().getChunkProvider().broadcastIncludingSelf(this, new PacketPlayOutAnimation(this, 2)); } -@@ -826,8 +1126,9 @@ +@@ -946,8 +1253,9 @@ this.playerConnection.sendPacket(new PacketPlayOutOpenSignEditor(tileentitysign.getPosition())); } @@ -621,7 +628,7 @@ } @Override -@@ -842,6 +1143,24 @@ +@@ -962,6 +1270,24 @@ this.nextContainerCounter(); Container container = itileinventory.createMenu(this.containerCounter, this.inventory, this); @@ -646,7 +653,7 @@ if (container == null) { if (this.isSpectator()) { this.a((IChatBaseComponent) (new ChatMessage("container.spectatorCantOpen")).a(EnumChatFormat.RED), true); -@@ -849,9 +1168,11 @@ +@@ -969,9 +1295,11 @@ return OptionalInt.empty(); } else { @@ -660,7 +667,7 @@ return OptionalInt.of(this.containerCounter); } } -@@ -864,13 +1185,24 @@ +@@ -984,13 +1312,24 @@ @Override public void openHorseInventory(EntityHorseAbstract entityhorseabstract, IInventory iinventory) { @@ -687,7 +694,7 @@ this.activeContainer.addSlotListener(this); } -@@ -915,6 +1247,11 @@ +@@ -1035,6 +1374,11 @@ public void a(Container container, NonNullList nonnulllist) { this.playerConnection.sendPacket(new PacketPlayOutWindowItems(container.windowId, nonnulllist)); this.playerConnection.sendPacket(new PacketPlayOutSetSlot(-1, -1, this.inventory.getCarried())); @@ -699,7 +706,7 @@ } @Override -@@ -924,6 +1261,7 @@ +@@ -1044,6 +1388,7 @@ @Override public void closeInventory() { @@ -707,7 +714,7 @@ this.playerConnection.sendPacket(new PacketPlayOutCloseWindow(this.activeContainer.windowId)); this.o(); } -@@ -958,7 +1296,7 @@ +@@ -1078,7 +1423,7 @@ @Override public void a(Statistic statistic, int i) { this.serverStatisticManager.b(this, statistic, i); @@ -716,7 +723,7 @@ scoreboardscore.addScore(i); }); } -@@ -966,7 +1304,7 @@ +@@ -1086,7 +1431,7 @@ @Override public void a(Statistic statistic) { this.serverStatisticManager.setStatistic(this, statistic, 0); @@ -725,7 +732,7 @@ } @Override -@@ -1015,7 +1353,16 @@ +@@ -1135,7 +1480,16 @@ public void triggerHealthUpdate() { this.lastHealthSent = -1.0E8F; @@ -742,7 +749,7 @@ @Override public void a(IChatBaseComponent ichatbasecomponent, boolean flag) { -@@ -1068,12 +1415,13 @@ +@@ -1188,12 +1542,13 @@ this.lastSentExp = -1; this.lastHealthSent = -1.0F; this.lastFoodSent = -1; @@ -757,7 +764,7 @@ } @Override -@@ -1141,6 +1489,18 @@ +@@ -1261,6 +1616,18 @@ @Override public void a(EnumGamemode enumgamemode) { @@ -776,7 +783,7 @@ this.playerInteractManager.setGameMode(enumgamemode); this.playerConnection.sendPacket(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.d, (float) enumgamemode.getId())); if (enumgamemode == EnumGamemode.SPECTATOR) { -@@ -1190,7 +1550,20 @@ +@@ -1310,7 +1677,20 @@ return s; } @@ -797,7 +804,7 @@ this.bY = packetplayinsettings.d(); this.bZ = packetplayinsettings.e(); this.getDataWatcher().set(EntityPlayer.bi, (byte) packetplayinsettings.f()); -@@ -1226,13 +1599,13 @@ +@@ -1346,13 +1726,13 @@ if (entity instanceof EntityHuman) { this.playerConnection.sendPacket(new PacketPlayOutEntityDestroy(new int[]{entity.getId()})); } else { @@ -813,7 +820,7 @@ } @Override -@@ -1256,7 +1629,7 @@ +@@ -1376,7 +1756,7 @@ this.spectatedEntity = (Entity) (entity == null ? this : entity); if (entity1 != this.spectatedEntity) { this.playerConnection.sendPacket(new PacketPlayOutCamera(this.spectatedEntity)); @@ -822,7 +829,7 @@ } } -@@ -1285,7 +1658,7 @@ +@@ -1405,7 +1785,7 @@ @Nullable public IChatBaseComponent getPlayerListName() { @@ -831,7 +838,7 @@ } @Override -@@ -1306,9 +1679,16 @@ +@@ -1426,9 +1806,16 @@ return this.advancementDataPlayer; } @@ -848,7 +855,7 @@ if (worldserver == this.world) { this.playerConnection.a(d0, d1, d2, f, f1); } else { -@@ -1329,6 +1709,9 @@ +@@ -1449,6 +1836,9 @@ this.server.getPlayerList().a(this, worldserver); this.server.getPlayerList().updateClient(this); } @@ -858,7 +865,7 @@ } -@@ -1426,4 +1809,144 @@ +@@ -1546,4 +1936,144 @@ public ITextFilter Q() { return this.co; } @@ -954,7 +961,7 @@ + } + + @Override -+ protected boolean isFrozen() { ++ public boolean isFrozen() { + return super.isFrozen() || !getBukkitEntity().isOnline(); + } + diff --git a/nms-patches/net/minecraft/server/level/EntityTrackerEntry.patch b/nms-patches/net/minecraft/server/level/EntityTrackerEntry.patch index c867d70d2..4ba2344e4 100644 --- a/nms-patches/net/minecraft/server/level/EntityTrackerEntry.patch +++ b/nms-patches/net/minecraft/server/level/EntityTrackerEntry.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityTrackerEntry.java -+++ b/net/minecraft/server/EntityTrackerEntry.java -@@ -11,6 +11,11 @@ +--- a/net/minecraft/server/level/EntityTrackerEntry.java ++++ b/net/minecraft/server/level/EntityTrackerEntry.java +@@ -40,6 +40,11 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -12,7 +12,7 @@ public class EntityTrackerEntry { private static final Logger LOGGER = LogManager.getLogger(); -@@ -31,8 +36,12 @@ +@@ -60,8 +65,12 @@ private List p; private boolean q; private boolean r; @@ -26,7 +26,7 @@ this.m = Vec3D.ORIGIN; this.p = Collections.emptyList(); this.b = worldserver; -@@ -52,16 +61,17 @@ +@@ -81,16 +90,17 @@ if (!list.equals(this.p)) { this.p = list; @@ -48,7 +48,7 @@ while (iterator.hasNext()) { EntityPlayer entityplayer = (EntityPlayer) iterator.next(); -@@ -106,6 +116,17 @@ +@@ -135,6 +145,17 @@ boolean flag2 = flag1 || this.tickCounter % 60 == 0; boolean flag3 = Math.abs(i - this.yRot) >= 1 || Math.abs(j - this.xRot) >= 1; @@ -66,7 +66,7 @@ if (this.tickCounter > 0 || this.tracker instanceof EntityArrow) { long k = PacketPlayOutEntity.a(vec3d.x); long l = PacketPlayOutEntity.a(vec3d.y); -@@ -144,6 +165,7 @@ +@@ -173,6 +194,7 @@ } this.c(); @@ -74,7 +74,7 @@ if (flag2) { this.d(); } -@@ -152,6 +174,7 @@ +@@ -181,6 +203,7 @@ this.yRot = i; this.xRot = j; } @@ -82,7 +82,7 @@ this.q = false; } -@@ -167,7 +190,27 @@ +@@ -196,7 +219,27 @@ ++this.tickCounter; if (this.tracker.velocityChanged) { @@ -111,7 +111,7 @@ this.tracker.velocityChanged = false; } -@@ -182,14 +225,17 @@ +@@ -211,14 +254,17 @@ PlayerConnection playerconnection = entityplayer.playerConnection; entityplayer.playerConnection.getClass(); @@ -132,7 +132,7 @@ } Packet packet = this.tracker.P(); -@@ -205,6 +251,12 @@ +@@ -234,6 +280,12 @@ if (this.tracker instanceof EntityLiving) { Collection collection = ((EntityLiving) this.tracker).getAttributeMap().b(); @@ -145,7 +145,7 @@ if (!collection.isEmpty()) { consumer.accept(new PacketPlayOutUpdateAttributes(this.tracker.getId(), collection)); } -@@ -236,8 +288,14 @@ +@@ -265,8 +317,14 @@ if (!list.isEmpty()) { consumer.accept(new PacketPlayOutEntityEquipment(this.tracker.getId(), list)); } @@ -160,7 +160,7 @@ if (this.tracker instanceof EntityLiving) { EntityLiving entityliving = (EntityLiving) this.tracker; Iterator iterator = entityliving.getEffects().iterator(); -@@ -278,6 +336,11 @@ +@@ -307,6 +365,11 @@ Set set = ((EntityLiving) this.tracker).getAttributeMap().getAttributes(); if (!set.isEmpty()) { diff --git a/nms-patches/net/minecraft/server/level/PlayerChunk.patch b/nms-patches/net/minecraft/server/level/PlayerChunk.patch index 004473544..6877ff396 100644 --- a/nms-patches/net/minecraft/server/level/PlayerChunk.patch +++ b/nms-patches/net/minecraft/server/level/PlayerChunk.patch @@ -1,6 +1,17 @@ ---- a/net/minecraft/server/PlayerChunk.java -+++ b/net/minecraft/server/PlayerChunk.java -@@ -44,7 +44,7 @@ +--- a/net/minecraft/server/level/PlayerChunk.java ++++ b/net/minecraft/server/level/PlayerChunk.java +@@ -33,6 +33,10 @@ + import net.minecraft.world.level.chunk.ProtoChunkExtension; + import net.minecraft.world.level.lighting.LightEngine; + ++// CraftBukkit start ++import net.minecraft.server.MinecraftServer; ++// CraftBukkit end ++ + public class PlayerChunk { + + public static final Either UNLOADED_CHUNK_ACCESS = Either.right(PlayerChunk.Failure.b); +@@ -65,7 +69,7 @@ this.fullChunkFuture = PlayerChunk.UNLOADED_CHUNK_FUTURE; this.tickingFuture = PlayerChunk.UNLOADED_CHUNK_FUTURE; this.entityTickingFuture = PlayerChunk.UNLOADED_CHUNK_FUTURE; @@ -9,7 +20,7 @@ this.dirtyBlocks = new ShortSet[16]; this.location = chunkcoordintpair; this.lightEngine = lightengine; -@@ -56,6 +56,19 @@ +@@ -77,6 +81,19 @@ this.a(i); } @@ -29,7 +40,7 @@ public CompletableFuture> getStatusFutureUnchecked(ChunkStatus chunkstatus) { CompletableFuture> completablefuture = (CompletableFuture) this.statusFutures.get(chunkstatus.c()); -@@ -81,9 +94,9 @@ +@@ -102,9 +119,9 @@ @Nullable public Chunk getChunk() { CompletableFuture> completablefuture = this.a(); @@ -41,7 +52,7 @@ } @Nullable -@@ -114,6 +127,7 @@ +@@ -135,6 +152,7 @@ if (chunk != null) { byte b0 = (byte) SectionPosition.a(blockposition.getY()); @@ -49,7 +60,7 @@ if (this.dirtyBlocks[b0] == null) { this.p = true; this.dirtyBlocks[b0] = new ShortArraySet(); -@@ -216,7 +230,7 @@ +@@ -237,7 +255,7 @@ CompletableFuture> completablefuture = (CompletableFuture) this.statusFutures.get(i); if (completablefuture != null) { @@ -58,7 +69,7 @@ if (either == null || either.left().isPresent()) { return completablefuture; -@@ -271,6 +285,30 @@ +@@ -292,6 +310,30 @@ boolean flag1 = this.ticketLevel <= PlayerChunkMap.GOLDEN_TICKET; PlayerChunk.State playerchunk_state = getChunkState(this.oldTicketLevel); PlayerChunk.State playerchunk_state1 = getChunkState(this.ticketLevel); @@ -89,7 +100,7 @@ CompletableFuture completablefuture; if (flag) { -@@ -302,7 +340,7 @@ +@@ -323,7 +365,7 @@ if (flag2 && !flag3) { completablefuture = this.fullChunkFuture; this.fullChunkFuture = PlayerChunk.UNLOADED_CHUNK_FUTURE; @@ -98,7 +109,7 @@ playerchunkmap.getClass(); return either1.ifLeft(playerchunkmap::a); })); -@@ -340,6 +378,26 @@ +@@ -361,6 +403,26 @@ this.u.a(this.location, this::k, this.ticketLevel, this::d); this.oldTicketLevel = this.ticketLevel; diff --git a/nms-patches/net/minecraft/server/level/PlayerChunkMap.patch b/nms-patches/net/minecraft/server/level/PlayerChunkMap.patch index b24ce144f..789d0084a 100644 --- a/nms-patches/net/minecraft/server/level/PlayerChunkMap.patch +++ b/nms-patches/net/minecraft/server/level/PlayerChunkMap.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/PlayerChunkMap.java -+++ b/net/minecraft/server/PlayerChunkMap.java -@@ -45,6 +45,8 @@ +--- a/net/minecraft/server/level/PlayerChunkMap.java ++++ b/net/minecraft/server/level/PlayerChunkMap.java +@@ -89,6 +89,8 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -9,7 +9,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { private static final Logger LOGGER = LogManager.getLogger(); -@@ -75,6 +77,31 @@ +@@ -119,6 +121,31 @@ private final Queue A; private int viewDistance; @@ -41,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 +222,12 @@ +@@ -239,9 +266,12 @@ return completablefuture1.thenApply((list1) -> { List list2 = Lists.newArrayList(); @@ -56,7 +56,7 @@ final Either either = (Either) iterator.next(); Optional optional = either.left(); -@@ -300,7 +330,7 @@ +@@ -344,7 +374,7 @@ PlayerChunkMap.LOGGER.info("ThreadedAnvilChunkStorage ({}): All chunks are saved", this.w.getName()); } else { this.visibleChunks.values().stream().filter(PlayerChunk::hasBeenLoaded).forEach((playerchunk) -> { @@ -65,7 +65,7 @@ if (ichunkaccess instanceof ProtoChunkExtension || ichunkaccess instanceof Chunk) { this.saveChunk(ichunkaccess); -@@ -311,7 +341,6 @@ +@@ -355,7 +385,6 @@ } } @@ -73,7 +73,7 @@ protected void unloadChunks(BooleanSupplier booleansupplier) { GameProfilerFiller gameprofilerfiller = this.world.getMethodProfiler(); -@@ -350,7 +379,7 @@ +@@ -394,7 +423,7 @@ private void a(long i, PlayerChunk playerchunk) { CompletableFuture completablefuture = playerchunk.getChunkSave(); @@ -82,13 +82,13 @@ CompletableFuture completablefuture1 = playerchunk.getChunkSave(); if (completablefuture1 != completablefuture) { -@@ -572,8 +601,15 @@ +@@ -616,8 +645,15 @@ while (iterator.hasNext()) { Entity entity = (Entity) iterator.next(); + // CraftBukkit start - these are spawned serialized (DefinedStructure) and we don't call an add event below at the moment due to ordering complexities + boolean needsRemoval = false; -+ if (chunk.needsDecoration && !this.world.getServer().getServer().getSpawnNPCs() && entity instanceof NPC) { ++ if (chunk.needsDecoration && !this.world.getServer().getServer().getSpawnNPCs() && entity instanceof net.minecraft.world.entity.npc.NPC) { + entity.die(); + needsRemoval = true; + } @@ -99,7 +99,7 @@ if (list == null) { list = Lists.newArrayList(new Entity[]{entity}); } else { -@@ -784,7 +820,8 @@ +@@ -828,7 +864,8 @@ return ichunkaccess instanceof Chunk ? Optional.of((Chunk) ichunkaccess) : Optional.empty(); }); @@ -109,7 +109,7 @@ return Stream.of(chunk.getEntitySlices()).mapToInt(EntitySlice::size).sum(); }).orElse(0), optional1.map((chunk) -> { return chunk.getTileEntities().size(); -@@ -795,7 +832,7 @@ +@@ -839,7 +876,7 @@ private static String a(CompletableFuture> completablefuture) { try { @@ -118,7 +118,7 @@ return either != null ? (String) either.map((chunk) -> { return "done"; -@@ -813,7 +850,7 @@ +@@ -857,7 +894,7 @@ private NBTTagCompound readChunkData(ChunkCoordIntPair chunkcoordintpair) throws IOException { NBTTagCompound nbttagcompound = this.read(chunkcoordintpair); @@ -127,7 +127,7 @@ } boolean isOutsideOfRange(ChunkCoordIntPair chunkcoordintpair) { -@@ -1145,7 +1182,7 @@ +@@ -1189,7 +1226,7 @@ public final Set trackedPlayers = Sets.newHashSet(); public EntityTracker(Entity entity, int i, int j, boolean flag) { @@ -136,7 +136,7 @@ this.tracker = entity; this.trackingDistance = i; this.e = SectionPosition.a(entity); -@@ -1198,7 +1235,7 @@ +@@ -1242,7 +1279,7 @@ public void updatePlayer(EntityPlayer entityplayer) { if (entityplayer != this.tracker) { @@ -145,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 +1251,17 @@ +@@ -1258,6 +1295,17 @@ } } diff --git a/nms-patches/net/minecraft/server/level/PlayerInteractManager.patch b/nms-patches/net/minecraft/server/level/PlayerInteractManager.patch index 9f3df6c0c..07c48f581 100644 --- a/nms-patches/net/minecraft/server/level/PlayerInteractManager.patch +++ b/nms-patches/net/minecraft/server/level/PlayerInteractManager.patch @@ -1,11 +1,19 @@ ---- a/net/minecraft/server/PlayerInteractManager.java -+++ b/net/minecraft/server/PlayerInteractManager.java -@@ -4,6 +4,16 @@ +--- a/net/minecraft/server/level/PlayerInteractManager.java ++++ b/net/minecraft/server/level/PlayerInteractManager.java +@@ -26,6 +26,24 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +// CraftBukkit start +import java.util.ArrayList; ++import net.minecraft.network.protocol.game.PacketPlayOutBlockChange; ++import net.minecraft.server.MinecraftServer; ++import net.minecraft.world.entity.EnumItemSlot; ++import net.minecraft.world.level.block.BlockCake; ++import net.minecraft.world.level.block.BlockDoor; ++import net.minecraft.world.level.block.BlockTrapdoor; ++import net.minecraft.world.level.block.Blocks; ++import net.minecraft.world.level.block.state.properties.BlockPropertyDoubleBlockHalf; +import org.bukkit.craftbukkit.block.CraftBlock; +import org.bukkit.event.block.BlockBreakEvent; +import org.bukkit.craftbukkit.event.CraftEventFactory; @@ -17,7 +25,7 @@ public class PlayerInteractManager { private static final Logger LOGGER = LogManager.getLogger(); -@@ -38,7 +48,7 @@ +@@ -60,7 +78,7 @@ this.gamemode = enumgamemode; enumgamemode.a(this.player.abilities); this.player.updateAbilities(); @@ -26,7 +34,7 @@ this.world.everyoneSleeping(); } -@@ -67,7 +77,7 @@ +@@ -89,7 +107,7 @@ } public void a() { @@ -35,7 +43,7 @@ IBlockData iblockdata; if (this.j) { -@@ -123,9 +133,31 @@ +@@ -145,9 +163,31 @@ if (packetplayinblockdig_enumplayerdigtype == PacketPlayInBlockDig.EnumPlayerDigType.START_DESTROY_BLOCK) { if (!this.world.a((EntityHuman) this.player, blockposition)) { @@ -67,7 +75,7 @@ if (this.isCreative()) { this.a(blockposition, packetplayinblockdig_enumplayerdigtype, "creative destroy"); -@@ -141,11 +173,43 @@ +@@ -163,11 +203,43 @@ float f = 1.0F; iblockdata = this.world.getType(blockposition); @@ -112,7 +120,7 @@ if (!iblockdata.isAir() && f >= 1.0F) { this.a(blockposition, packetplayinblockdig_enumplayerdigtype, "insta mine"); } else { -@@ -189,7 +253,7 @@ +@@ -211,7 +283,7 @@ } else if (packetplayinblockdig_enumplayerdigtype == PacketPlayInBlockDig.EnumPlayerDigType.ABORT_DESTROY_BLOCK) { this.f = false; if (!Objects.equals(this.h, blockposition)) { @@ -121,7 +129,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 +269,73 @@ +@@ -227,17 +299,73 @@ if (this.breakBlock(blockposition)) { this.player.playerConnection.sendPacket(new PacketPlayOutBlockBreak(blockposition, this.world.getType(blockposition), packetplayinblockdig_enumplayerdigtype, true, s)); } else { @@ -197,7 +205,7 @@ TileEntity tileentity = this.world.getTileEntity(blockposition); Block block = iblockdata.getBlock(); -@@ -225,6 +345,10 @@ +@@ -247,6 +375,10 @@ } else if (this.player.a((World) this.world, blockposition, this.gamemode)) { return false; } else { @@ -208,7 +216,7 @@ block.a((World) this.world, blockposition, iblockdata, (EntityHuman) this.player); boolean flag = this.world.a(blockposition, false); -@@ -233,19 +357,32 @@ +@@ -255,19 +387,32 @@ } if (this.isCreative()) { @@ -244,7 +252,7 @@ } } } -@@ -287,12 +424,46 @@ +@@ -309,12 +454,46 @@ } } @@ -291,7 +299,7 @@ if (itileinventory != null) { entityplayer.openContainer(itileinventory); -@@ -306,7 +477,7 @@ +@@ -328,7 +507,7 @@ ItemStack itemstack1 = itemstack.cloneItemStack(); if (!flag1) { @@ -300,7 +308,7 @@ if (enuminteractionresult.a()) { CriterionTriggers.M.a(entityplayer, blockposition, itemstack1); -@@ -314,17 +485,17 @@ +@@ -336,17 +515,17 @@ } } @@ -321,7 +329,7 @@ } if (enuminteractionresult1.a()) { -@@ -332,10 +503,10 @@ +@@ -354,10 +533,10 @@ } return enuminteractionresult1; diff --git a/nms-patches/net/minecraft/server/level/RegionLimitedWorldAccess.patch b/nms-patches/net/minecraft/server/level/RegionLimitedWorldAccess.patch index 27a411c78..165d4e0b8 100644 --- a/nms-patches/net/minecraft/server/level/RegionLimitedWorldAccess.patch +++ b/nms-patches/net/minecraft/server/level/RegionLimitedWorldAccess.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/RegionLimitedWorldAccess.java -+++ b/net/minecraft/server/RegionLimitedWorldAccess.java -@@ -236,6 +236,13 @@ +--- a/net/minecraft/server/level/RegionLimitedWorldAccess.java ++++ b/net/minecraft/server/level/RegionLimitedWorldAccess.java +@@ -273,6 +273,13 @@ @Override public boolean addEntity(Entity entity) { diff --git a/nms-patches/net/minecraft/server/level/TicketType.patch b/nms-patches/net/minecraft/server/level/TicketType.patch index 16efb14d3..9a4be5c15 100644 --- a/nms-patches/net/minecraft/server/level/TicketType.patch +++ b/nms-patches/net/minecraft/server/level/TicketType.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/TicketType.java -+++ b/net/minecraft/server/TicketType.java -@@ -19,6 +19,8 @@ +--- a/net/minecraft/server/level/TicketType.java ++++ b/net/minecraft/server/level/TicketType.java +@@ -23,6 +23,8 @@ public static final TicketType PORTAL = a("portal", BaseBlockPosition::compareTo, 300); public static final TicketType POST_TELEPORT = a("post_teleport", Integer::compareTo, 5); public static final TicketType UNKNOWN = a("unknown", Comparator.comparingLong(ChunkCoordIntPair::pair), 1); diff --git a/nms-patches/net/minecraft/server/level/WorldServer.patch b/nms-patches/net/minecraft/server/level/WorldServer.patch index b1baf9aec..d6259ef0b 100644 --- a/nms-patches/net/minecraft/server/level/WorldServer.patch +++ b/nms-patches/net/minecraft/server/level/WorldServer.patch @@ -1,11 +1,14 @@ ---- a/net/minecraft/server/WorldServer.java -+++ b/net/minecraft/server/WorldServer.java -@@ -39,6 +39,18 @@ +--- a/net/minecraft/server/level/WorldServer.java ++++ b/net/minecraft/server/level/WorldServer.java +@@ -145,6 +145,21 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +// CraftBukkit start +import java.util.logging.Level; ++import net.minecraft.world.entity.monster.EntityDrowned; ++import net.minecraft.world.level.block.ITileEntity; ++import net.minecraft.world.level.storage.WorldDataServer; +import org.bukkit.Bukkit; +import org.bukkit.WeatherType; +import org.bukkit.craftbukkit.event.CraftEventFactory; @@ -19,7 +22,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { public static final BlockPosition a = new BlockPosition(100, 50, 0); -@@ -50,7 +62,7 @@ +@@ -156,7 +171,7 @@ private final ChunkProviderServer chunkProvider; boolean tickingEntities; private final MinecraftServer server; @@ -28,7 +31,7 @@ public boolean savingDisabled; private boolean everyoneSleeping; private int emptyTime; -@@ -67,8 +79,23 @@ +@@ -173,8 +188,23 @@ private final StructureManager structureManager; private final boolean Q; @@ -54,7 +57,7 @@ this.nextTickListBlock = new TickListServer<>(this, (block) -> { return block == null || block.getBlockData().isAir(); }, IRegistry.BLOCK::getKey, this::b); -@@ -80,10 +107,17 @@ +@@ -186,10 +216,17 @@ this.Q = flag1; this.server = minecraftserver; this.mobSpawners = list; @@ -73,7 +76,7 @@ this.portalTravelAgent = new PortalTravelAgent(this); this.Q(); this.R(); -@@ -95,14 +129,48 @@ +@@ -201,14 +238,48 @@ iworlddataserver.setGameType(minecraftserver.getGamemode()); } @@ -90,7 +93,7 @@ + + // CraftBukkit start + @Override -+ protected TileEntity getTileEntity(BlockPosition pos, boolean validate) { ++ public TileEntity getTileEntity(BlockPosition pos, boolean validate) { + TileEntity result = super.getTileEntity(pos, validate); + if (!validate || Thread.currentThread() != this.serverThread) { + // SPIGOT-5378: avoid deadlock, this can be called in loading logic (i.e lighting) but getType() will block on chunk load @@ -113,7 +116,7 @@ + + if (type instanceof ITileEntity) { + TileEntity replacement = ((ITileEntity) type).createTile(this); -+ replacement.world = this; ++ replacement.setLocation(this, pos); + this.setTileEntity(pos, replacement); + return replacement; + } else { @@ -124,7 +127,7 @@ public void a(int i, int j, boolean flag, boolean flag1) { this.worldDataServer.setClearWeatherTime(i); -@@ -193,6 +261,7 @@ +@@ -299,6 +370,7 @@ this.rainLevel = MathHelper.a(this.rainLevel, 0.0F, 1.0F); } @@ -132,7 +135,7 @@ if (this.lastRainLevel != this.rainLevel) { this.server.getPlayerList().a((Packet) (new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.h, this.rainLevel)), this.getDimensionKey()); } -@@ -211,18 +280,47 @@ +@@ -317,18 +389,47 @@ this.server.getPlayerList().sendAll(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.h, this.rainLevel)); this.server.getPlayerList().sendAll(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.i, this.thunderLevel)); } @@ -185,7 +188,7 @@ if (this.getGameRules().getBoolean(GameRules.DO_WEATHER_CYCLE)) { this.clearWeather(); } -@@ -244,7 +342,7 @@ +@@ -350,7 +451,7 @@ this.ak(); this.ticking = false; gameprofilerfiller.exitEnter("entities"); @@ -194,7 +197,7 @@ if (flag3) { this.resetEmptyTime(); -@@ -263,6 +361,7 @@ +@@ -369,6 +470,7 @@ Entity entity = (Entity) entry.getValue(); Entity entity1 = entity.getVehicle(); @@ -202,7 +205,7 @@ if (!this.server.getSpawnAnimals() && (entity instanceof EntityAnimal || entity instanceof EntityWaterAnimal)) { entity.die(); } -@@ -270,6 +369,7 @@ +@@ -376,6 +478,7 @@ if (!this.server.getSpawnNPCs() && entity instanceof NPC) { entity.die(); } @@ -210,7 +213,7 @@ gameprofilerfiller.enter("checkDespawn"); if (!entity.dead) { -@@ -344,7 +444,7 @@ +@@ -450,7 +553,7 @@ } private void wakeupPlayers() { @@ -219,7 +222,7 @@ entityplayer.wakeup(false, false); }); } -@@ -371,14 +471,14 @@ +@@ -477,14 +580,14 @@ entityhorseskeleton.t(true); entityhorseskeleton.setAgeRaw(0); entityhorseskeleton.setPosition((double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ()); @@ -236,7 +239,7 @@ } } -@@ -389,11 +489,11 @@ +@@ -495,11 +598,11 @@ BiomeBase biomebase = this.getBiome(blockposition); if (biomebase.a(this, blockposition1)) { @@ -250,7 +253,7 @@ } if (flag && this.getBiome(blockposition1).c() == BiomeBase.Precipitation.RAIN) { -@@ -440,7 +540,7 @@ +@@ -546,7 +649,7 @@ protected BlockPosition a(BlockPosition blockposition) { BlockPosition blockposition1 = this.getHighestBlockYAt(HeightMap.Type.MOTION_BLOCKING, blockposition); AxisAlignedBB axisalignedbb = (new AxisAlignedBB(blockposition1, new BlockPosition(blockposition1.getX(), this.getBuildHeight(), blockposition1.getZ()))).g(3.0D); @@ -259,7 +262,7 @@ return entityliving != null && entityliving.isAlive() && this.e(entityliving.getChunkCoordinates()); }); -@@ -469,7 +569,7 @@ +@@ -575,7 +678,7 @@ while (iterator.hasNext()) { EntityPlayer entityplayer = (EntityPlayer) iterator.next(); @@ -268,7 +271,7 @@ ++i; } else if (entityplayer.isSleeping()) { ++j; -@@ -487,10 +587,22 @@ +@@ -593,10 +696,22 @@ } private void clearWeather() { @@ -293,7 +296,7 @@ } public void resetEmptyTime() { -@@ -531,6 +643,7 @@ +@@ -637,6 +752,7 @@ }); gameprofilerfiller.c("tickNonPassenger"); entity.tick(); @@ -301,7 +304,7 @@ gameprofilerfiller.exit(); } -@@ -563,6 +676,7 @@ +@@ -669,6 +785,7 @@ }); gameprofilerfiller.c("tickPassenger"); entity1.passengerTick(); @@ -309,7 +312,7 @@ gameprofilerfiller.exit(); } -@@ -619,6 +733,7 @@ +@@ -725,6 +842,7 @@ ChunkProviderServer chunkproviderserver = this.getChunkProvider(); if (!flag1) { @@ -317,7 +320,7 @@ if (iprogressupdate != null) { iprogressupdate.a(new ChatMessage("menu.savingLevel")); } -@@ -630,11 +745,19 @@ +@@ -736,11 +854,19 @@ chunkproviderserver.save(flag); } @@ -338,7 +341,7 @@ } this.getChunkProvider().getWorldPersistentData().a(); -@@ -695,11 +818,24 @@ +@@ -801,11 +927,24 @@ @Override public boolean addEntity(Entity entity) { @@ -365,7 +368,7 @@ } public void addEntityTeleport(Entity entity) { -@@ -749,13 +885,18 @@ +@@ -855,13 +994,18 @@ this.registerEntity(entityplayer); } @@ -386,7 +389,7 @@ IChunkAccess ichunkaccess = this.getChunkAt(MathHelper.floor(entity.locX() / 16.0D), MathHelper.floor(entity.locZ() / 16.0D), ChunkStatus.FULL, entity.attachedToPlayer); if (!(ichunkaccess instanceof Chunk)) { -@@ -784,7 +925,7 @@ +@@ -890,7 +1034,7 @@ if (entity1 == null) { return false; } else { @@ -395,7 +398,7 @@ return true; } } -@@ -813,10 +954,16 @@ +@@ -919,10 +1063,16 @@ } public boolean addAllEntitiesSafely(Entity entity) { @@ -413,7 +416,7 @@ return true; } } -@@ -867,10 +1014,17 @@ +@@ -973,10 +1123,17 @@ } this.getScoreboard().a(entity); @@ -431,7 +434,7 @@ } private void registerEntity(Entity entity) { -@@ -891,9 +1045,16 @@ +@@ -997,9 +1154,16 @@ this.entitiesByUUID.put(entity.getUniqueID(), entity); this.getChunkProvider().addEntity(entity); @@ -448,7 +451,7 @@ } } -@@ -909,7 +1070,7 @@ +@@ -1015,7 +1179,7 @@ } private void removeEntityFromChunk(Entity entity) { @@ -457,7 +460,7 @@ if (ichunkaccess instanceof Chunk) { ((Chunk) ichunkaccess).b(entity); -@@ -923,10 +1084,33 @@ +@@ -1029,10 +1193,33 @@ this.everyoneSleeping(); } @@ -491,7 +494,7 @@ while (iterator.hasNext()) { EntityPlayer entityplayer = (EntityPlayer) iterator.next(); -@@ -935,6 +1119,12 @@ +@@ -1041,6 +1228,12 @@ double d1 = (double) blockposition.getY() - entityplayer.locY(); double d2 = (double) blockposition.getZ() - entityplayer.locZ(); @@ -504,7 +507,7 @@ if (d0 * d0 + d1 * d1 + d2 * d2 < 1024.0D) { entityplayer.playerConnection.sendPacket(new PacketPlayOutBlockBreakAnimation(i, blockposition, j)); } -@@ -973,7 +1163,18 @@ +@@ -1079,7 +1272,18 @@ Iterator iterator = this.navigators.iterator(); while (iterator.hasNext()) { @@ -524,7 +527,7 @@ if (!navigationabstract.i()) { navigationabstract.b(blockposition); -@@ -995,10 +1196,20 @@ +@@ -1101,10 +1305,20 @@ @Override public Explosion createExplosion(@Nullable Entity entity, @Nullable DamageSource damagesource, @Nullable ExplosionDamageCalculator explosiondamagecalculator, double d0, double d1, double d2, float f, boolean flag, Explosion.Effect explosion_effect) { @@ -545,7 +548,7 @@ if (explosion_effect == Explosion.Effect.NONE) { explosion.clearBlocks(); } -@@ -1063,13 +1274,20 @@ +@@ -1169,13 +1383,20 @@ } public int a(T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6) { @@ -568,7 +571,7 @@ ++j; } } -@@ -1111,7 +1329,7 @@ +@@ -1217,7 +1438,7 @@ @Nullable public BlockPosition a(StructureGenerator structuregenerator, BlockPosition blockposition, int i, boolean flag) { @@ -577,7 +580,7 @@ } @Nullable -@@ -1149,7 +1367,13 @@ +@@ -1255,7 +1476,13 @@ @Override public WorldMap a(String s) { return (WorldMap) this.getMinecraftServer().E().getWorldPersistentData().b(() -> { @@ -592,7 +595,61 @@ }, s); } -@@ -1460,6 +1684,11 @@ +@@ -1386,9 +1613,9 @@ + reputationhandler.a(reputationevent, entity); + } + +- public void a(Path path) throws IOException { ++ public void a(java.nio.file.Path java_nio_file_path) throws IOException { + PlayerChunkMap playerchunkmap = this.getChunkProvider().playerChunkMap; +- BufferedWriter bufferedwriter = Files.newBufferedWriter(path.resolve("stats.txt")); ++ BufferedWriter bufferedwriter = Files.newBufferedWriter(java_nio_file_path.resolve("stats.txt")); + Throwable throwable = null; + + try { +@@ -1432,7 +1659,7 @@ + CrashReport crashreport = new CrashReport("Level dump", new Exception("dummy")); + + this.a(crashreport); +- BufferedWriter bufferedwriter1 = Files.newBufferedWriter(path.resolve("example_crash.txt")); ++ BufferedWriter bufferedwriter1 = Files.newBufferedWriter(java_nio_file_path.resolve("example_crash.txt")); + Throwable throwable3 = null; + + try { +@@ -1455,8 +1682,8 @@ + + } + +- Path path1 = path.resolve("chunks.csv"); +- BufferedWriter bufferedwriter2 = Files.newBufferedWriter(path1); ++ java.nio.file.Path java_nio_file_path1 = java_nio_file_path.resolve("chunks.csv"); ++ BufferedWriter bufferedwriter2 = Files.newBufferedWriter(java_nio_file_path1); + Throwable throwable6 = null; + + try { +@@ -1479,8 +1706,8 @@ + + } + +- Path path2 = path.resolve("entities.csv"); +- BufferedWriter bufferedwriter3 = Files.newBufferedWriter(path2); ++ java.nio.file.Path java_nio_file_path2 = java_nio_file_path.resolve("entities.csv"); ++ BufferedWriter bufferedwriter3 = Files.newBufferedWriter(java_nio_file_path2); + Throwable throwable9 = null; + + try { +@@ -1503,8 +1730,8 @@ + + } + +- Path path3 = path.resolve("block_entities.csv"); +- BufferedWriter bufferedwriter4 = Files.newBufferedWriter(path3); ++ java.nio.file.Path java_nio_file_path3 = java_nio_file_path.resolve("block_entities.csv"); ++ BufferedWriter bufferedwriter4 = Files.newBufferedWriter(java_nio_file_path3); + Throwable throwable12 = null; + + try { +@@ -1566,6 +1793,11 @@ @Override public void update(BlockPosition blockposition, Block block) { if (!this.isDebugWorld()) { @@ -604,7 +661,7 @@ this.applyPhysics(blockposition, block); } -@@ -1474,12 +1703,12 @@ +@@ -1580,12 +1812,12 @@ } public boolean isFlatWorld() { @@ -619,7 +676,7 @@ } @Nullable -@@ -1499,9 +1728,9 @@ +@@ -1605,9 +1837,9 @@ @VisibleForTesting public String F() { @@ -631,7 +688,7 @@ return IRegistry.BLOCK_ENTITY_TYPE.getKey(tileentity.getTileType()); }), this.getBlockTickList().a(), this.getFluidTickList().a(), this.P()); } -@@ -1509,7 +1738,7 @@ +@@ -1615,7 +1847,7 @@ private static String a(Collection collection, Function function) { try { Object2IntOpenHashMap object2intopenhashmap = new Object2IntOpenHashMap(); @@ -640,7 +697,7 @@ while (iterator.hasNext()) { T t0 = iterator.next(); -@@ -1518,7 +1747,8 @@ +@@ -1624,7 +1856,8 @@ object2intopenhashmap.addTo(minecraftkey, 1); } @@ -650,7 +707,7 @@ return it_unimi_dsi_fastutil_objects_object2intmap_entry.getKey() + ":" + it_unimi_dsi_fastutil_objects_object2intmap_entry.getIntValue(); }).collect(Collectors.joining(",")); } catch (Exception exception) { -@@ -1527,16 +1757,32 @@ +@@ -1633,16 +1866,32 @@ } public static void a(WorldServer worldserver) { diff --git a/nms-patches/net/minecraft/server/network/HandshakeListener.patch b/nms-patches/net/minecraft/server/network/HandshakeListener.patch index f05d80a5a..4aa5a4bf7 100644 --- a/nms-patches/net/minecraft/server/network/HandshakeListener.patch +++ b/nms-patches/net/minecraft/server/network/HandshakeListener.patch @@ -1,7 +1,8 @@ ---- a/net/minecraft/server/HandshakeListener.java -+++ b/net/minecraft/server/HandshakeListener.java -@@ -1,7 +1,16 @@ - package net.minecraft.server; +--- a/net/minecraft/server/network/HandshakeListener.java ++++ b/net/minecraft/server/network/HandshakeListener.java +@@ -11,8 +11,17 @@ + import net.minecraft.network.protocol.login.PacketLoginOutDisconnect; + import net.minecraft.server.MinecraftServer; +// CraftBukkit start +import java.net.InetAddress; @@ -17,7 +18,7 @@ private static final IChatBaseComponent a = new ChatComponentText("Ignoring status request"); private final MinecraftServer b; private final NetworkManager c; -@@ -16,6 +25,40 @@ +@@ -27,6 +36,40 @@ switch (packethandshakinginsetprotocol.b()) { case LOGIN: this.c.setProtocol(EnumProtocol.LOGIN); @@ -58,7 +59,7 @@ if (packethandshakinginsetprotocol.c() != SharedConstants.getGameVersion().getProtocolVersion()) { ChatMessage chatmessage; -@@ -29,6 +72,7 @@ +@@ -40,6 +83,7 @@ this.c.close(chatmessage); } else { this.c.setPacketListener(new LoginListener(this.b, this.c)); diff --git a/nms-patches/net/minecraft/server/network/LegacyPingHandler.patch b/nms-patches/net/minecraft/server/network/LegacyPingHandler.patch index b56969813..e611d0c98 100644 --- a/nms-patches/net/minecraft/server/network/LegacyPingHandler.patch +++ b/nms-patches/net/minecraft/server/network/LegacyPingHandler.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/LegacyPingHandler.java -+++ b/net/minecraft/server/LegacyPingHandler.java -@@ -34,11 +34,12 @@ +--- a/net/minecraft/server/network/LegacyPingHandler.java ++++ b/net/minecraft/server/network/LegacyPingHandler.java +@@ -35,11 +35,12 @@ MinecraftServer minecraftserver = this.b.d(); int i = bytebuf.readableBytes(); String s; @@ -14,7 +14,7 @@ this.a(channelhandlercontext, this.a(s)); break; case 1: -@@ -47,7 +48,7 @@ +@@ -48,7 +49,7 @@ } LegacyPingHandler.LOGGER.debug("Ping: (1.4-1.5.x) from {}:{}", inetsocketaddress.getAddress(), inetsocketaddress.getPort()); @@ -23,7 +23,7 @@ this.a(channelhandlercontext, this.a(s)); break; default: -@@ -66,7 +67,7 @@ +@@ -67,7 +68,7 @@ } LegacyPingHandler.LOGGER.debug("Ping: (1.6) from {}:{}", inetsocketaddress.getAddress(), inetsocketaddress.getPort()); diff --git a/nms-patches/net/minecraft/server/network/LoginListener.patch b/nms-patches/net/minecraft/server/network/LoginListener.patch index 5fa8454f9..ee14ed5ea 100644 --- a/nms-patches/net/minecraft/server/network/LoginListener.patch +++ b/nms-patches/net/minecraft/server/network/LoginListener.patch @@ -1,10 +1,11 @@ ---- a/net/minecraft/server/LoginListener.java -+++ b/net/minecraft/server/LoginListener.java -@@ -18,6 +18,12 @@ +--- a/net/minecraft/server/network/LoginListener.java ++++ b/net/minecraft/server/network/LoginListener.java +@@ -35,6 +35,13 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +// CraftBukkit start ++import net.minecraft.network.chat.ChatComponentText; +import org.bukkit.craftbukkit.util.Waitable; +import org.bukkit.event.player.AsyncPlayerPreLoginEvent; +import org.bukkit.event.player.PlayerPreLoginEvent; @@ -13,7 +14,7 @@ public class LoginListener implements PacketLoginInListener { private static final AtomicInteger b = new AtomicInteger(0); -@@ -32,6 +38,7 @@ +@@ -49,6 +56,7 @@ private final String j; private SecretKey loginKey; private EntityPlayer l; @@ -21,7 +22,7 @@ public LoginListener(MinecraftServer minecraftserver, NetworkManager networkmanager) { this.g = LoginListener.EnumProtocolState.HELLO; -@@ -60,6 +67,20 @@ +@@ -77,6 +85,20 @@ } @@ -42,7 +43,7 @@ @Override public NetworkManager a() { return this.networkManager; -@@ -81,10 +102,12 @@ +@@ -98,10 +120,12 @@ this.i = this.a(this.i); } @@ -58,7 +59,7 @@ } else { this.g = LoginListener.EnumProtocolState.ACCEPTED; if (this.server.ax() >= 0 && !this.networkManager.isLocal()) { -@@ -98,9 +121,9 @@ +@@ -115,9 +139,9 @@ if (entityplayer != null) { this.g = LoginListener.EnumProtocolState.DELAY_ACCEPT; @@ -70,7 +71,7 @@ } } -@@ -158,6 +181,43 @@ +@@ -175,6 +199,43 @@ try { LoginListener.this.i = LoginListener.this.server.getMinecraftSessionService().hasJoinedServer(new GameProfile((UUID) null, gameprofile.getName()), s, this.a()); if (LoginListener.this.i != null) { @@ -114,7 +115,7 @@ LoginListener.LOGGER.info("UUID of player {} is {}", LoginListener.this.i.getName(), LoginListener.this.i.getId()); LoginListener.this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT; } else if (LoginListener.this.server.isEmbeddedServer()) { -@@ -177,6 +237,11 @@ +@@ -194,6 +255,11 @@ LoginListener.this.disconnect(new ChatMessage("multiplayer.disconnect.authservers_down")); LoginListener.LOGGER.error("Couldn't verify username because servers are unavailable"); } diff --git a/nms-patches/net/minecraft/server/network/PacketStatusListener.patch b/nms-patches/net/minecraft/server/network/PacketStatusListener.patch index d93eee81f..eee161284 100644 --- a/nms-patches/net/minecraft/server/network/PacketStatusListener.patch +++ b/nms-patches/net/minecraft/server/network/PacketStatusListener.patch @@ -1,12 +1,16 @@ ---- a/net/minecraft/server/PacketStatusListener.java -+++ b/net/minecraft/server/PacketStatusListener.java -@@ -1,5 +1,14 @@ - package net.minecraft.server; +--- a/net/minecraft/server/network/PacketStatusListener.java ++++ b/net/minecraft/server/network/PacketStatusListener.java +@@ -10,6 +10,18 @@ + import net.minecraft.network.protocol.status.PacketStatusOutServerInfo; + import net.minecraft.server.MinecraftServer; +// CraftBukkit start +import com.mojang.authlib.GameProfile; +import java.net.InetSocketAddress; +import java.util.Iterator; ++import net.minecraft.SharedConstants; ++import net.minecraft.network.protocol.status.ServerPing; ++import net.minecraft.server.level.EntityPlayer; +import org.bukkit.craftbukkit.util.CraftChatMessage; +import org.bukkit.craftbukkit.util.CraftIconCache; +import org.bukkit.entity.Player; @@ -15,7 +19,7 @@ public class PacketStatusListener implements PacketStatusInListener { private static final IChatBaseComponent a = new ChatMessage("multiplayer.status.request_handled"); -@@ -26,8 +35,96 @@ +@@ -36,8 +48,96 @@ this.networkManager.close(PacketStatusListener.a); } else { this.d = true; diff --git a/nms-patches/net/minecraft/server/network/PlayerConnection.patch b/nms-patches/net/minecraft/server/network/PlayerConnection.patch index 3a27fa503..51cfdc427 100644 --- a/nms-patches/net/minecraft/server/network/PlayerConnection.patch +++ b/nms-patches/net/minecraft/server/network/PlayerConnection.patch @@ -1,12 +1,23 @@ ---- a/net/minecraft/server/PlayerConnection.java -+++ b/net/minecraft/server/PlayerConnection.java -@@ -24,6 +24,48 @@ +--- a/net/minecraft/server/network/PlayerConnection.java ++++ b/net/minecraft/server/network/PlayerConnection.java +@@ -158,6 +158,59 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +// CraftBukkit start +import java.util.concurrent.ExecutionException; +import java.util.concurrent.atomic.AtomicIntegerFieldUpdater; ++import net.minecraft.network.protocol.game.PacketPlayOutAttachEntity; ++import net.minecraft.network.protocol.game.PacketPlayOutEntityMetadata; ++import net.minecraft.network.protocol.game.PacketPlayOutSpawnEntityLiving; ++import net.minecraft.network.protocol.game.PacketPlayOutSpawnPosition; ++import net.minecraft.util.MathHelper; ++import net.minecraft.world.entity.EntityInsentient; ++import net.minecraft.world.entity.animal.EntityFish; ++import net.minecraft.world.inventory.InventoryClickType; ++import net.minecraft.world.item.crafting.IRecipe; ++import net.minecraft.world.level.RayTrace; ++import net.minecraft.world.phys.MovingObjectPosition; +import org.bukkit.Location; +import org.bukkit.craftbukkit.entity.CraftPlayer; +import org.bukkit.craftbukkit.event.CraftEventFactory; @@ -49,7 +60,7 @@ public class PlayerConnection implements PacketListenerPlayIn { private static final Logger LOGGER = LogManager.getLogger(); -@@ -34,7 +76,10 @@ +@@ -168,7 +221,10 @@ private long lastKeepAlive; private boolean awaitingKeepAlive; private long h; @@ -61,7 +72,7 @@ private int j; private final Int2ShortMap k = new Int2ShortOpenHashMap(); private double l; -@@ -72,8 +117,33 @@ +@@ -206,8 +262,33 @@ itextfilter.a(); } @@ -95,7 +106,7 @@ public void tick() { this.syncPosition(); this.player.lastX = this.player.locX(); -@@ -121,7 +191,7 @@ +@@ -255,7 +336,7 @@ this.minecraftServer.getMethodProfiler().enter("keepAlive"); long i = SystemUtils.getMonotonicMillis(); @@ -104,7 +115,7 @@ if (this.awaitingKeepAlive) { this.disconnect(new ChatMessage("disconnect.timeout")); } else { -@@ -133,15 +203,21 @@ +@@ -267,15 +348,21 @@ } this.minecraftServer.getMethodProfiler().exit(); @@ -126,7 +137,7 @@ this.disconnect(new ChatMessage("multiplayer.disconnect.idling")); } -@@ -165,16 +241,46 @@ +@@ -299,16 +386,46 @@ return this.minecraftServer.a(this.player.getProfile()); } @@ -174,7 +185,7 @@ } private void a(T t0, Consumer consumer, BiFunction>> bifunction) { -@@ -190,7 +296,7 @@ +@@ -324,7 +441,7 @@ ITextFilter itextfilter = this.player.Q(); if (itextfilter != null) { @@ -183,7 +194,7 @@ optional.ifPresent(consumer1); }, iasynctaskhandler); } else { -@@ -247,7 +353,34 @@ +@@ -381,7 +498,34 @@ double d9 = entity.getMot().g(); double d10 = d6 * d6 + d7 * d7 + d8 * d8; @@ -219,7 +230,7 @@ PlayerConnection.LOGGER.warn("{} (vehicle of {}) moved too quickly! {},{},{}", entity.getDisplayName().getString(), this.player.getDisplayName().getString(), d6, d7, d8); this.networkManager.sendPacket(new PacketPlayOutVehicleMove(entity)); return; -@@ -277,14 +410,72 @@ +@@ -411,14 +555,72 @@ } entity.setLocation(d3, d4, d5, f, f1); @@ -292,7 +303,7 @@ this.player.getWorldServer().getChunkProvider().movePlayer(this.player); this.player.checkMovement(this.player.locX() - d0, this.player.locY() - d1, this.player.locZ() - d2); this.D = d11 >= -0.03125D && !this.minecraftServer.getAllowFlight() && this.a(entity); -@@ -303,7 +494,7 @@ +@@ -437,7 +639,7 @@ @Override public void a(PacketPlayInTeleportAccept packetplayinteleportaccept) { PlayerConnectionUtils.ensureMainThread(packetplayinteleportaccept, this, this.player.getWorldServer()); @@ -301,7 +312,7 @@ this.player.setLocation(this.teleportPos.x, this.teleportPos.y, this.teleportPos.z, this.player.yaw, this.player.pitch); this.o = this.teleportPos.x; this.p = this.teleportPos.y; -@@ -313,6 +504,7 @@ +@@ -447,6 +649,7 @@ } this.teleportPos = null; @@ -309,7 +320,7 @@ } } -@@ -320,7 +512,7 @@ +@@ -454,7 +657,7 @@ @Override public void a(PacketPlayInRecipeDisplayed packetplayinrecipedisplayed) { PlayerConnectionUtils.ensureMainThread(packetplayinrecipedisplayed, this, this.player.getWorldServer()); @@ -318,7 +329,7 @@ RecipeBookServer recipebookserver = this.player.getRecipeBook(); optional.ifPresent(recipebookserver::e); -@@ -349,6 +541,12 @@ +@@ -483,6 +686,12 @@ @Override public void a(PacketPlayInTabComplete packetplayintabcomplete) { PlayerConnectionUtils.ensureMainThread(packetplayintabcomplete, this, this.player.getWorldServer()); @@ -331,7 +342,7 @@ StringReader stringreader = new StringReader(packetplayintabcomplete.c()); if (stringreader.canRead() && stringreader.peek() == '/') { -@@ -358,6 +556,7 @@ +@@ -492,6 +701,7 @@ ParseResults parseresults = this.minecraftServer.getCommandDispatcher().a().parse(stringreader, this.player.getCommandListener()); this.minecraftServer.getCommandDispatcher().a().getCompletionSuggestions(parseresults).thenAccept((suggestions) -> { @@ -339,7 +350,7 @@ this.networkManager.sendPacket(new PacketPlayOutTabComplete(packetplayintabcomplete.b(), suggestions)); }); } -@@ -586,6 +785,7 @@ +@@ -720,6 +930,7 @@ if (container instanceof ContainerMerchant) { ContainerMerchant containermerchant = (ContainerMerchant) container; @@ -347,7 +358,7 @@ containermerchant.d(i); containermerchant.g(i); -@@ -595,6 +795,13 @@ +@@ -729,6 +940,13 @@ @Override public void a(PacketPlayInBEdit packetplayinbedit) { @@ -361,7 +372,7 @@ ItemStack itemstack = packetplayinbedit.b(); if (itemstack.getItem() == Items.WRITABLE_BOOK) { -@@ -610,13 +817,15 @@ +@@ -744,13 +962,15 @@ NBTTagList nbttaglist = nbttagcompound.getList("pages", 8); @@ -380,7 +391,7 @@ if (PlayerInventory.d(i) || i == 40) { this.a((List) list, flag ? (list1) -> { this.a((String) list1.get(0), list1.subList(1, list1.size()), i); -@@ -635,7 +844,9 @@ +@@ -769,7 +989,9 @@ NBTTagList nbttaglist = new NBTTagList(); list.stream().map(NBTTagString::a).forEach(nbttaglist::add); @@ -390,7 +401,7 @@ } } -@@ -664,7 +875,7 @@ +@@ -798,7 +1020,7 @@ } itemstack1.a("pages", (NBTBase) nbttaglist); @@ -399,7 +410,7 @@ } } -@@ -702,7 +913,7 @@ +@@ -836,7 +1058,7 @@ } else { WorldServer worldserver = this.player.getWorldServer(); @@ -408,7 +419,7 @@ if (this.e == 0) { this.syncPosition(); } -@@ -712,13 +923,21 @@ +@@ -846,13 +1068,21 @@ this.A = this.e; this.a(this.teleportPos.x, this.teleportPos.y, this.teleportPos.z, this.player.yaw, this.player.pitch); } @@ -431,7 +442,7 @@ double d0 = this.player.locX(); double d1 = this.player.locY(); double d2 = this.player.locZ(); -@@ -743,15 +962,33 @@ +@@ -877,15 +1107,33 @@ ++this.receivedMovePackets; int i = this.receivedMovePackets - this.processedMovePackets; @@ -467,7 +478,7 @@ PlayerConnection.LOGGER.warn("{} moved too quickly! {},{},{}", this.player.getDisplayName().getString(), d7, d8, d9); this.a(this.player.locX(), this.player.locY(), this.player.locZ(), this.player.yaw, this.player.pitch); return; -@@ -770,6 +1007,7 @@ +@@ -904,6 +1152,7 @@ } this.player.move(EnumMoveType.PLAYER, new Vec3D(d7, d8, d9)); @@ -475,7 +486,7 @@ double d12 = d8; d7 = d4 - this.player.locX(); -@@ -791,10 +1029,74 @@ +@@ -925,10 +1174,74 @@ if (!this.player.noclip && !this.player.isSleeping() && (flag1 && worldserver.getCubes(this.player, axisalignedbb) || this.a((IWorldReader) worldserver, axisalignedbb))) { this.a(d0, d1, d2, f, f1); } else { @@ -552,7 +563,7 @@ if (flag) { this.player.fallDistance = 0.0F; } -@@ -823,10 +1125,66 @@ +@@ -957,10 +1270,66 @@ } public void a(double d0, double d1, double d2, float f, float f1) { @@ -620,7 +631,7 @@ double d3 = set.contains(PacketPlayOutPosition.EnumPlayerTeleportFlags.X) ? this.player.locX() : 0.0D; double d4 = set.contains(PacketPlayOutPosition.EnumPlayerTeleportFlags.Y) ? this.player.locY() : 0.0D; double d5 = set.contains(PacketPlayOutPosition.EnumPlayerTeleportFlags.Z) ? this.player.locZ() : 0.0D; -@@ -838,6 +1196,14 @@ +@@ -972,6 +1341,14 @@ this.teleportAwait = 0; } @@ -635,7 +646,7 @@ this.A = this.e; this.player.setLocation(d0, d1, d2, f, f1); this.player.playerConnection.sendPacket(new PacketPlayOutPosition(d0 - d3, d1 - d4, d2 - d5, f - f2, f1 - f3, set, this.teleportAwait)); -@@ -846,6 +1212,7 @@ +@@ -980,6 +1357,7 @@ @Override public void a(PacketPlayInBlockDig packetplayinblockdig) { PlayerConnectionUtils.ensureMainThread(packetplayinblockdig, this, this.player.getWorldServer()); @@ -643,7 +654,7 @@ BlockPosition blockposition = packetplayinblockdig.b(); this.player.resetIdleTimer(); -@@ -856,14 +1223,46 @@ +@@ -990,14 +1368,46 @@ if (!this.player.isSpectator()) { ItemStack itemstack = this.player.b(EnumHand.OFF_HAND); @@ -692,7 +703,7 @@ this.player.dropItem(false); } -@@ -900,6 +1299,7 @@ +@@ -1034,6 +1444,7 @@ @Override public void a(PacketPlayInUseItem packetplayinuseitem) { PlayerConnectionUtils.ensureMainThread(packetplayinuseitem, this, this.player.getWorldServer()); @@ -700,7 +711,7 @@ WorldServer worldserver = this.player.getWorldServer(); EnumHand enumhand = packetplayinuseitem.b(); ItemStack itemstack = this.player.b(enumhand); -@@ -910,6 +1310,14 @@ +@@ -1044,6 +1455,14 @@ this.player.resetIdleTimer(); if (blockposition.getY() < this.minecraftServer.getMaxBuildHeight()) { if (this.teleportPos == null && this.player.h((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D) < 64.0D && worldserver.a((EntityHuman) this.player, blockposition)) { @@ -715,7 +726,7 @@ EnumInteractionResult enuminteractionresult = this.player.playerInteractManager.a(this.player, worldserver, itemstack, enumhand, movingobjectpositionblock); if (enumdirection == EnumDirection.UP && !enuminteractionresult.a() && blockposition.getY() >= this.minecraftServer.getMaxBuildHeight() - 1 && a(this.player, itemstack)) { -@@ -933,12 +1341,51 @@ +@@ -1067,12 +1486,51 @@ @Override public void a(PacketPlayInBlockPlace packetplayinblockplace) { PlayerConnectionUtils.ensureMainThread(packetplayinblockplace, this, this.player.getWorldServer()); @@ -767,7 +778,7 @@ EnumInteractionResult enuminteractionresult = this.player.playerInteractManager.a(this.player, worldserver, itemstack, enumhand); if (enuminteractionresult.b()) { -@@ -959,7 +1406,7 @@ +@@ -1093,7 +1551,7 @@ Entity entity = packetplayinspectate.a(worldserver); if (entity != null) { @@ -776,7 +787,7 @@ return; } } -@@ -968,7 +1415,12 @@ +@@ -1102,7 +1560,12 @@ } @Override @@ -790,7 +801,7 @@ @Override public void a(PacketPlayInBoatMove packetplayinboatmove) { -@@ -983,11 +1435,26 @@ +@@ -1117,11 +1580,26 @@ @Override public void a(IChatBaseComponent ichatbasecomponent) { @@ -818,7 +829,7 @@ ITextFilter itextfilter = this.player.Q(); if (itextfilter != null) { -@@ -1019,6 +1486,15 @@ +@@ -1153,6 +1631,15 @@ } } @@ -834,7 +845,7 @@ try { this.networkManager.sendPacket(packet, genericfuturelistener); } catch (Throwable throwable) { -@@ -1035,7 +1511,16 @@ +@@ -1169,7 +1656,16 @@ @Override public void a(PacketPlayInHeldItemSlot packetplayinhelditemslot) { PlayerConnectionUtils.ensureMainThread(packetplayinhelditemslot, this, this.player.getWorldServer()); @@ -851,7 +862,7 @@ if (this.player.inventory.itemInHandIndex != packetplayinhelditemslot.b() && this.player.getRaisedHand() == EnumHand.MAIN_HAND) { this.player.clearActiveItem(); } -@@ -1044,65 +1529,286 @@ +@@ -1178,65 +1674,286 @@ this.player.resetIdleTimer(); } else { PlayerConnection.LOGGER.warn("{} tried to set an invalid carried item", this.player.getDisplayName().getString()); @@ -1147,7 +1158,7 @@ this.player.resetIdleTimer(); IJumpable ijumpable; -@@ -1160,6 +1866,7 @@ +@@ -1294,6 +2011,7 @@ @Override public void a(PacketPlayInUseEntity packetplayinuseentity) { PlayerConnectionUtils.ensureMainThread(packetplayinuseentity, this, this.player.getWorldServer()); @@ -1155,7 +1166,7 @@ WorldServer worldserver = this.player.getWorldServer(); Entity entity = packetplayinuseentity.a((World) worldserver); -@@ -1173,18 +1880,72 @@ +@@ -1307,18 +2025,72 @@ ItemStack itemstack = enumhand != null ? this.player.b(enumhand).cloneItemStack() : ItemStack.b; Optional optional = Optional.empty(); @@ -1188,7 +1199,7 @@ + + if (event.isCancelled() || this.player.inventory.getItemInHand() == null || this.player.inventory.getItemInHand().getItem() != origItem) { + // Refresh the current entity metadata -+ this.sendPacket(new PacketPlayOutEntityMetadata(entity.getId(), entity.datawatcher, true)); ++ this.sendPacket(new PacketPlayOutEntityMetadata(entity.getId(), entity.getDataWatcher(), true)); + } + + if (event.isCancelled()) { @@ -1229,7 +1240,7 @@ } if (optional.isPresent() && ((EnumInteractionResult) optional.get()).a()) { -@@ -1231,15 +1992,21 @@ +@@ -1365,15 +2137,21 @@ @Override public void a(PacketPlayInCloseWindow packetplayinclosewindow) { PlayerConnectionUtils.ensureMainThread(packetplayinclosewindow, this, this.player.getWorldServer()); @@ -1253,7 +1264,7 @@ NonNullList nonnulllist = NonNullList.a(); for (int i = 0; i < this.player.activeContainer.slots.size(); ++i) { -@@ -1248,8 +2015,274 @@ +@@ -1382,8 +2160,274 @@ this.player.a(this.player.activeContainer, nonnulllist); } else { @@ -1529,7 +1540,7 @@ if (ItemStack.matches(packetplayinwindowclick.f(), itemstack)) { this.player.playerConnection.sendPacket(new PacketPlayOutTransaction(packetplayinwindowclick.b(), packetplayinwindowclick.e(), true)); this.player.e = true; -@@ -1289,6 +2322,7 @@ +@@ -1423,6 +2467,7 @@ @Override public void a(PacketPlayInEnchantItem packetplayinenchantitem) { PlayerConnectionUtils.ensureMainThread(packetplayinenchantitem, this, this.player.getWorldServer()); @@ -1537,7 +1548,7 @@ this.player.resetIdleTimer(); if (this.player.activeContainer.windowId == packetplayinenchantitem.b() && this.player.activeContainer.c(this.player) && !this.player.isSpectator()) { this.player.activeContainer.a((EntityHuman) this.player, packetplayinenchantitem.c()); -@@ -1321,6 +2355,43 @@ +@@ -1455,6 +2500,43 @@ boolean flag1 = packetplayinsetcreativeslot.b() >= 1 && packetplayinsetcreativeslot.b() <= 45; boolean flag2 = itemstack.isEmpty() || itemstack.getDamage() >= 0 && itemstack.getCount() <= 64 && !itemstack.isEmpty(); @@ -1581,7 +1592,7 @@ if (flag1 && flag2) { if (itemstack.isEmpty()) { -@@ -1342,6 +2413,7 @@ +@@ -1476,6 +2558,7 @@ @Override public void a(PacketPlayInTransaction packetplayintransaction) { PlayerConnectionUtils.ensureMainThread(packetplayintransaction, this, this.player.getWorldServer()); @@ -1589,7 +1600,7 @@ int i = this.player.activeContainer.windowId; if (i == packetplayintransaction.b() && this.k.getOrDefault(i, (short) (packetplayintransaction.c() + 1)) == packetplayintransaction.c() && !this.player.activeContainer.c(this.player) && !this.player.isSpectator()) { -@@ -1360,6 +2432,7 @@ +@@ -1494,6 +2577,7 @@ } private void a(PacketPlayInUpdateSign packetplayinupdatesign, List list) { @@ -1597,7 +1608,7 @@ this.player.resetIdleTimer(); WorldServer worldserver = this.player.getWorldServer(); BlockPosition blockposition = packetplayinupdatesign.b(); -@@ -1376,12 +2449,28 @@ +@@ -1510,12 +2594,28 @@ if (!tileentitysign.d() || tileentitysign.f() != this.player) { PlayerConnection.LOGGER.warn("Player {} just tried to change non-editable sign", this.player.getDisplayName().getString()); @@ -1627,7 +1638,7 @@ tileentitysign.update(); worldserver.notify(blockposition, iblockdata, iblockdata, 3); -@@ -1391,6 +2480,7 @@ +@@ -1525,6 +2625,7 @@ @Override public void a(PacketPlayInKeepAlive packetplayinkeepalive) { @@ -1635,7 +1646,7 @@ if (this.awaitingKeepAlive && packetplayinkeepalive.b() == this.h) { int i = (int) (SystemUtils.getMonotonicMillis() - this.lastKeepAlive); -@@ -1405,7 +2495,17 @@ +@@ -1539,7 +2640,17 @@ @Override public void a(PacketPlayInAbilities packetplayinabilities) { PlayerConnectionUtils.ensureMainThread(packetplayinabilities, this, this.player.getWorldServer()); @@ -1654,7 +1665,7 @@ } @Override -@@ -1414,8 +2514,50 @@ +@@ -1548,8 +2659,50 @@ this.player.a(packetplayinsettings); } diff --git a/nms-patches/net/minecraft/server/network/ServerConnection.patch b/nms-patches/net/minecraft/server/network/ServerConnection.patch index 5d6f91bea..0aeabee45 100644 --- a/nms-patches/net/minecraft/server/network/ServerConnection.patch +++ b/nms-patches/net/minecraft/server/network/ServerConnection.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/ServerConnection.java -+++ b/net/minecraft/server/ServerConnection.java -@@ -74,14 +74,24 @@ +--- a/net/minecraft/server/network/ServerConnection.java ++++ b/net/minecraft/server/network/ServerConnection.java +@@ -87,14 +87,24 @@ int j = ServerConnection.this.e.k(); Object object = j > 0 ? new NetworkManagerServer(j) : new NetworkManager(EnumProtocolDirection.SERVERBOUND); diff --git a/nms-patches/net/minecraft/server/players/ExpirableListEntry.patch b/nms-patches/net/minecraft/server/players/ExpirableListEntry.patch index 55b535098..49d534a97 100644 --- a/nms-patches/net/minecraft/server/players/ExpirableListEntry.patch +++ b/nms-patches/net/minecraft/server/players/ExpirableListEntry.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/ExpirableListEntry.java -+++ b/net/minecraft/server/ExpirableListEntry.java -@@ -23,7 +23,7 @@ +--- a/net/minecraft/server/players/ExpirableListEntry.java ++++ b/net/minecraft/server/players/ExpirableListEntry.java +@@ -24,7 +24,7 @@ } protected ExpirableListEntry(T t0, JsonObject jsonobject) { @@ -9,7 +9,7 @@ Date date; -@@ -74,4 +74,26 @@ +@@ -75,4 +75,26 @@ jsonobject.addProperty("expires", this.d == null ? "forever" : ExpirableListEntry.a.format(this.d)); jsonobject.addProperty("reason", this.e); } diff --git a/nms-patches/net/minecraft/server/players/JsonList.patch b/nms-patches/net/minecraft/server/players/JsonList.patch index 03e2c1e44..410490c85 100644 --- a/nms-patches/net/minecraft/server/players/JsonList.patch +++ b/nms-patches/net/minecraft/server/players/JsonList.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/JsonList.java -+++ b/net/minecraft/server/JsonList.java -@@ -50,7 +50,7 @@ +--- a/net/minecraft/server/players/JsonList.java ++++ b/net/minecraft/server/players/JsonList.java +@@ -52,7 +52,7 @@ @Nullable public V get(K k0) { this.g(); @@ -9,7 +9,7 @@ } public void remove(K k0) { -@@ -72,6 +72,12 @@ +@@ -74,6 +74,12 @@ return (String[]) this.d.keySet().toArray(new String[this.d.size()]); } @@ -22,7 +22,7 @@ public boolean isEmpty() { return this.d.size() < 1; } -@@ -89,7 +95,7 @@ +@@ -91,7 +97,7 @@ Iterator iterator = this.d.values().iterator(); while (iterator.hasNext()) { @@ -31,7 +31,7 @@ if (v0.hasExpired()) { list.add(v0.getKey()); -@@ -99,7 +105,7 @@ +@@ -101,7 +107,7 @@ iterator = list.iterator(); while (iterator.hasNext()) { @@ -40,7 +40,7 @@ this.d.remove(this.a(k0)); } -@@ -119,7 +125,7 @@ +@@ -121,7 +127,7 @@ JsonObject jsonobject = new JsonObject(); jsonlistentry.getClass(); @@ -49,7 +49,7 @@ }).forEach(jsonarray::add); BufferedWriter bufferedwriter = Files.newWriter(this.c, StandardCharsets.UTF_8); Throwable throwable = null; -@@ -163,7 +169,7 @@ +@@ -165,7 +171,7 @@ JsonListEntry jsonlistentry = this.a(jsonobject); if (jsonlistentry.getKey() != null) { diff --git a/nms-patches/net/minecraft/server/players/NameReferencingFileConverter.patch b/nms-patches/net/minecraft/server/players/NameReferencingFileConverter.patch index 4778daf1b..2455a849b 100644 --- a/nms-patches/net/minecraft/server/players/NameReferencingFileConverter.patch +++ b/nms-patches/net/minecraft/server/players/NameReferencingFileConverter.patch @@ -1,6 +1,18 @@ ---- a/net/minecraft/server/NameReferencingFileConverter.java -+++ b/net/minecraft/server/NameReferencingFileConverter.java -@@ -80,7 +80,7 @@ +--- a/net/minecraft/server/players/NameReferencingFileConverter.java ++++ b/net/minecraft/server/players/NameReferencingFileConverter.java +@@ -27,6 +27,11 @@ + import org.apache.logging.log4j.LogManager; + import org.apache.logging.log4j.Logger; + ++// CraftBukkit start ++import net.minecraft.nbt.NBTCompressedStreamTools; ++import net.minecraft.nbt.NBTTagCompound; ++// CraftBukkit end ++ + public class NameReferencingFileConverter { + + private static final Logger LOGGER = LogManager.getLogger(); +@@ -85,7 +90,7 @@ try { gameprofilebanlist.load(); } catch (IOException ioexception) { @@ -9,7 +21,7 @@ } } -@@ -138,7 +138,7 @@ +@@ -143,7 +148,7 @@ try { ipbanlist.load(); } catch (IOException ioexception) { @@ -18,7 +30,7 @@ } } -@@ -179,7 +179,7 @@ +@@ -184,7 +189,7 @@ try { oplist.load(); } catch (IOException ioexception) { @@ -27,7 +39,7 @@ } } -@@ -223,7 +223,7 @@ +@@ -228,7 +233,7 @@ try { whitelist.load(); } catch (IOException ioexception) { @@ -36,7 +48,7 @@ } } -@@ -346,6 +346,30 @@ +@@ -351,6 +356,30 @@ File file5 = new File(file, s2 + ".dat"); File file6 = new File(file4, s3 + ".dat"); diff --git a/nms-patches/net/minecraft/server/players/PlayerList.patch b/nms-patches/net/minecraft/server/players/PlayerList.patch index f0d4dc5e4..123b47d15 100644 --- a/nms-patches/net/minecraft/server/players/PlayerList.patch +++ b/nms-patches/net/minecraft/server/players/PlayerList.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/PlayerList.java -+++ b/net/minecraft/server/PlayerList.java -@@ -21,6 +21,23 @@ +--- a/net/minecraft/server/players/PlayerList.java ++++ b/net/minecraft/server/players/PlayerList.java +@@ -90,6 +90,27 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -8,6 +8,10 @@ +import com.google.common.base.Predicate; +import com.google.common.collect.Iterables; + ++import net.minecraft.network.protocol.game.PacketPlayOutEntityMetadata; ++import net.minecraft.server.dedicated.DedicatedServer; ++import net.minecraft.server.network.LoginListener; ++ +import org.bukkit.craftbukkit.CraftServer; +import org.bukkit.craftbukkit.CraftWorld; + @@ -24,7 +28,7 @@ public abstract class PlayerList { public static final File b = new File("banned-players.json"); -@@ -30,14 +47,16 @@ +@@ -99,14 +120,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; @@ -44,7 +48,7 @@ public final WorldNBTStorage playerFileData; private boolean hasWhitelist; private final IRegistryCustom.Dimension s; -@@ -47,13 +66,23 @@ +@@ -116,13 +139,23 @@ private boolean v; private int w; @@ -70,7 +74,7 @@ this.server = minecraftserver; this.s = iregistrycustom_dimension; this.maxPlayers = i; -@@ -69,6 +98,12 @@ +@@ -138,6 +171,12 @@ usercache.a(gameprofile); NBTTagCompound nbttagcompound = this.a(entityplayer); ResourceKey resourcekey; @@ -83,7 +87,7 @@ if (nbttagcompound != null) { DataResult dataresult = DimensionManager.a(new Dynamic(DynamicOpsNBT.a, nbttagcompound.get("Dimension"))); -@@ -99,7 +134,8 @@ +@@ -168,7 +207,8 @@ s1 = networkmanager.getSocketAddress().toString(); } @@ -93,7 +97,7 @@ WorldData worlddata = worldserver1.getWorldData(); this.a(entityplayer, (EntityPlayer) null, worldserver1); -@@ -109,6 +145,7 @@ +@@ -178,6 +218,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())); @@ -101,7 +105,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 +164,61 @@ +@@ -196,19 +237,61 @@ } else { chatmessage = new ChatMessage("multiplayer.player.joined.renamed", new Object[]{entityplayer.getScoreboardDisplayName(), s}); } @@ -153,7 +157,7 @@ + entityplayer.sentListPacket = true; + // CraftBukkit end + -+ entityplayer.playerConnection.sendPacket(new PacketPlayOutEntityMetadata(entityplayer.getId(), entityplayer.datawatcher, true)); // CraftBukkit - BungeeCord#2321, send complete data to self on spawn ++ entityplayer.playerConnection.sendPacket(new PacketPlayOutEntityMetadata(entityplayer.getId(), entityplayer.getDataWatcher(), true)); // CraftBukkit - BungeeCord#2321, send complete data to self on spawn + + // CraftBukkit start - Only add if the player wasn't moved in the event + if (entityplayer.world == worldserver1 && !worldserver1.getPlayers().contains(entityplayer)) { @@ -168,7 +172,7 @@ this.a(entityplayer, worldserver1); if (!this.server.getResourcePack().isEmpty()) { entityplayer.setResourcePack(this.server.getResourcePack(), this.server.getResourcePackHash()); -@@ -155,8 +234,11 @@ +@@ -224,8 +307,11 @@ if (nbttagcompound != null && nbttagcompound.hasKeyOfType("RootVehicle", 10)) { NBTTagCompound nbttagcompound1 = nbttagcompound.getCompound("RootVehicle"); @@ -182,7 +186,7 @@ }); if (entity != null) { -@@ -199,6 +281,8 @@ +@@ -268,6 +354,8 @@ } entityplayer.syncInventory(); @@ -191,7 +195,7 @@ } public void sendScoreboard(ScoreboardServer scoreboardserver, EntityPlayer entityplayer) { -@@ -231,30 +315,31 @@ +@@ -300,30 +388,31 @@ } public void setPlayerFileData(WorldServer worldserver) { @@ -228,7 +232,7 @@ } @Override -@@ -282,14 +367,15 @@ +@@ -351,14 +440,15 @@ } protected void savePlayerFile(EntityPlayer entityplayer) { @@ -246,7 +250,7 @@ if (advancementdataplayer != null) { advancementdataplayer.b(); -@@ -297,10 +383,24 @@ +@@ -366,10 +456,24 @@ } @@ -272,7 +276,7 @@ this.savePlayerFile(entityplayer); if (entityplayer.isPassenger()) { Entity entity = entityplayer.getRootVehicle(); -@@ -332,18 +432,66 @@ +@@ -401,18 +505,66 @@ if (entityplayer1 == entityplayer) { this.j.remove(uuid); @@ -345,7 +349,7 @@ GameProfileBanEntry gameprofilebanentry = (GameProfileBanEntry) this.k.get(gameprofile); chatmessage = new ChatMessage("multiplayer.disconnect.banned.reason", new Object[]{gameprofilebanentry.getReason()}); -@@ -351,10 +499,12 @@ +@@ -420,10 +572,12 @@ chatmessage.addSibling(new ChatMessage("multiplayer.disconnect.banned.expiration", new Object[]{PlayerList.g.format(gameprofilebanentry.getExpires())})); } @@ -361,7 +365,7 @@ IpBanEntry ipbanentry = this.l.get(socketaddress); chatmessage = new ChatMessage("multiplayer.disconnect.banned_ip.reason", new Object[]{ipbanentry.getReason()}); -@@ -362,13 +512,25 @@ +@@ -431,13 +585,25 @@ chatmessage.addSibling(new ChatMessage("multiplayer.disconnect.banned_ip.expiration", new Object[]{PlayerList.g.format(ipbanentry.getExpires())})); } @@ -390,7 +394,7 @@ UUID uuid = EntityHuman.a(gameprofile); List list = Lists.newArrayList(); -@@ -404,14 +566,24 @@ +@@ -473,14 +639,24 @@ } return new EntityPlayer(this.server, worldserver, gameprofile, (PlayerInteractManager) object); @@ -415,7 +419,7 @@ WorldServer worldserver = this.server.getWorldServer(entityplayer.getSpawnDimension()); Optional optional; -@@ -431,6 +603,11 @@ +@@ -500,6 +676,11 @@ } EntityPlayer entityplayer1 = new EntityPlayer(this.server, worldserver1, entityplayer.getProfile(), (PlayerInteractManager) object); @@ -427,7 +431,7 @@ entityplayer1.playerConnection = entityplayer.playerConnection; entityplayer1.copyFrom(entityplayer, flag); -@@ -444,52 +621,113 @@ +@@ -513,52 +694,113 @@ entityplayer1.addScoreboardTag(s); } @@ -566,7 +570,7 @@ return entityplayer1; } -@@ -502,7 +740,18 @@ +@@ -571,7 +813,18 @@ public void tick() { if (++this.w > 600) { @@ -586,7 +590,7 @@ this.w = 0; } -@@ -515,6 +764,25 @@ +@@ -584,6 +837,25 @@ } @@ -612,7 +616,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 +883,7 @@ +@@ -684,6 +956,7 @@ entityplayer.playerConnection.sendPacket(new PacketPlayOutEntityStatus(entityplayer, b0)); } @@ -620,7 +624,7 @@ this.server.getCommandDispatcher().a(entityplayer); } -@@ -647,6 +916,12 @@ +@@ -716,6 +989,12 @@ for (int i = 0; i < this.players.size(); ++i) { EntityPlayer entityplayer = (EntityPlayer) this.players.get(i); @@ -633,7 +637,7 @@ if (entityplayer != entityhuman && entityplayer.world.getDimensionKey() == resourcekey) { double d4 = d0 - entityplayer.locX(); double d5 = d1 - entityplayer.locY(); -@@ -686,23 +961,34 @@ +@@ -755,23 +1034,34 @@ public void reloadWhitelist() {} public void a(EntityPlayer entityplayer, WorldServer worldserver) { @@ -673,7 +677,7 @@ } public int getPlayerCount() { -@@ -755,31 +1041,54 @@ +@@ -824,31 +1114,54 @@ entityplayer.playerInteractManager.a(this.u, EnumGamemode.NOT_SET); } @@ -736,7 +740,7 @@ if (file2.exists() && file2.isFile()) { file2.renameTo(file1); -@@ -787,7 +1096,7 @@ +@@ -856,7 +1169,7 @@ } serverstatisticmanager = new ServerStatisticManager(this.server, file1); @@ -745,7 +749,7 @@ } return serverstatisticmanager; -@@ -795,14 +1104,14 @@ +@@ -864,14 +1177,14 @@ public AdvancementDataPlayer f(EntityPlayer entityplayer) { UUID uuid = entityplayer.getUniqueID(); @@ -762,7 +766,7 @@ } advancementdataplayer.a(entityplayer); -@@ -838,13 +1147,20 @@ +@@ -907,13 +1220,20 @@ } public void reload() { diff --git a/nms-patches/net/minecraft/server/rcon/RemoteControlCommandListener.patch b/nms-patches/net/minecraft/server/rcon/RemoteControlCommandListener.patch index d5188f568..9b6277bfd 100644 --- a/nms-patches/net/minecraft/server/rcon/RemoteControlCommandListener.patch +++ b/nms-patches/net/minecraft/server/rcon/RemoteControlCommandListener.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/RemoteControlCommandListener.java -+++ b/net/minecraft/server/RemoteControlCommandListener.java -@@ -26,6 +26,17 @@ +--- a/net/minecraft/server/rcon/RemoteControlCommandListener.java ++++ b/net/minecraft/server/rcon/RemoteControlCommandListener.java +@@ -36,6 +36,17 @@ return new CommandListenerWrapper(this, Vec3D.b((BaseBlockPosition) worldserver.getSpawn()), Vec2F.a, worldserver, 4, "Rcon", RemoteControlCommandListener.b, this.server, (Entity) null); } diff --git a/nms-patches/net/minecraft/stats/RecipeBookServer.patch b/nms-patches/net/minecraft/stats/RecipeBookServer.patch index 1f5cd10e3..15ef87acf 100644 --- a/nms-patches/net/minecraft/stats/RecipeBookServer.patch +++ b/nms-patches/net/minecraft/stats/RecipeBookServer.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/RecipeBookServer.java -+++ b/net/minecraft/server/RecipeBookServer.java -@@ -10,6 +10,8 @@ +--- a/net/minecraft/stats/RecipeBookServer.java ++++ b/net/minecraft/stats/RecipeBookServer.java +@@ -20,6 +20,8 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -9,7 +9,7 @@ public class RecipeBookServer extends RecipeBook { private static final Logger LOGGER = LogManager.getLogger(); -@@ -25,7 +27,7 @@ +@@ -35,7 +37,7 @@ IRecipe irecipe = (IRecipe) iterator.next(); MinecraftKey minecraftkey = irecipe.getKey(); @@ -18,7 +18,7 @@ this.a(minecraftkey); this.d(minecraftkey); list.add(minecraftkey); -@@ -59,6 +61,7 @@ +@@ -69,6 +71,7 @@ } private void a(PacketPlayOutRecipes.Action packetplayoutrecipes_action, EntityPlayer entityplayer, List list) { diff --git a/nms-patches/net/minecraft/stats/StatisticManager.patch b/nms-patches/net/minecraft/stats/StatisticManager.patch index 3666efb64..e2ba82193 100644 --- a/nms-patches/net/minecraft/stats/StatisticManager.patch +++ b/nms-patches/net/minecraft/stats/StatisticManager.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/StatisticManager.java -+++ b/net/minecraft/server/StatisticManager.java -@@ -15,6 +15,12 @@ +--- a/net/minecraft/stats/StatisticManager.java ++++ b/net/minecraft/stats/StatisticManager.java +@@ -16,6 +16,12 @@ public void b(EntityHuman entityhuman, Statistic statistic, int i) { int j = (int) Math.min((long) this.getStatisticValue(statistic) + (long) i, 2147483647L); diff --git a/nms-patches/net/minecraft/util/datafix/DataConverterRegistry.patch b/nms-patches/net/minecraft/util/datafix/DataConverterRegistry.patch index 69813c026..9b839bf65 100644 --- a/nms-patches/net/minecraft/util/datafix/DataConverterRegistry.patch +++ b/nms-patches/net/minecraft/util/datafix/DataConverterRegistry.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/DataConverterRegistry.java -+++ b/net/minecraft/server/DataConverterRegistry.java -@@ -183,6 +183,18 @@ +--- a/net/minecraft/util/datafix/DataConverterRegistry.java ++++ b/net/minecraft/util/datafix/DataConverterRegistry.java +@@ -367,6 +367,18 @@ datafixerbuilder.addFixer(new DataConverterItemFrame(schema46, false)); Schema schema47 = datafixerbuilder.addSchema(1458, DataConverterRegistry.b); diff --git a/nms-patches/net/minecraft/util/datafix/fixes/DataConverterFlatten.patch b/nms-patches/net/minecraft/util/datafix/fixes/DataConverterFlatten.patch index 44d8f67ef..6916dff54 100644 --- a/nms-patches/net/minecraft/util/datafix/fixes/DataConverterFlatten.patch +++ b/nms-patches/net/minecraft/util/datafix/fixes/DataConverterFlatten.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/DataConverterFlatten.java -+++ b/net/minecraft/server/DataConverterFlatten.java -@@ -375,7 +375,7 @@ +--- a/net/minecraft/util/datafix/fixes/DataConverterFlatten.java ++++ b/net/minecraft/util/datafix/fixes/DataConverterFlatten.java +@@ -376,7 +376,7 @@ Typed typed2 = typed.getOrCreateTyped(opticfinder1); Dynamic dynamic1 = (Dynamic) typed2.get(DSL.remainderFinder()); diff --git a/nms-patches/net/minecraft/util/datafix/fixes/DataConverterMap.patch b/nms-patches/net/minecraft/util/datafix/fixes/DataConverterMap.patch index 8b09d7540..41b8ab111 100644 --- a/nms-patches/net/minecraft/util/datafix/fixes/DataConverterMap.patch +++ b/nms-patches/net/minecraft/util/datafix/fixes/DataConverterMap.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/DataConverterMap.java -+++ b/net/minecraft/server/DataConverterMap.java -@@ -31,7 +31,7 @@ +--- a/net/minecraft/util/datafix/fixes/DataConverterMap.java ++++ b/net/minecraft/util/datafix/fixes/DataConverterMap.java +@@ -32,7 +32,7 @@ Typed typed1 = typed.getOrCreateTyped(opticfinder1); Dynamic dynamic1 = (Dynamic) typed1.get(DSL.remainderFinder()); diff --git a/nms-patches/net/minecraft/util/worldupdate/WorldUpgrader.patch b/nms-patches/net/minecraft/util/worldupdate/WorldUpgrader.patch index 6094c2487..bfa4037d4 100644 --- a/nms-patches/net/minecraft/util/worldupdate/WorldUpgrader.patch +++ b/nms-patches/net/minecraft/util/worldupdate/WorldUpgrader.patch @@ -1,6 +1,14 @@ ---- a/net/minecraft/server/WorldUpgrader.java -+++ b/net/minecraft/server/WorldUpgrader.java -@@ -25,7 +25,7 @@ +--- a/net/minecraft/util/worldupdate/WorldUpgrader.java ++++ b/net/minecraft/util/worldupdate/WorldUpgrader.java +@@ -34,11 +34,15 @@ + import org.apache.logging.log4j.LogManager; + import org.apache.logging.log4j.Logger; + ++// CraftBukkit start ++import net.minecraft.world.level.dimension.DimensionManager; ++// CraftBukkit end ++ + public class WorldUpgrader { private static final Logger LOGGER = LogManager.getLogger(); private static final ThreadFactory b = (new ThreadFactoryBuilder()).setDaemon(true).build(); @@ -9,7 +17,7 @@ private final boolean d; private final Convertable.ConversionSession e; private final Thread f; -@@ -36,12 +36,12 @@ +@@ -49,12 +53,12 @@ private volatile int k; private volatile int l; private volatile int m; @@ -24,7 +32,7 @@ this.c = immutableset; this.d = flag; this.g = datafixer; -@@ -69,12 +69,12 @@ +@@ -82,12 +86,12 @@ private void i() { this.k = 0; @@ -39,7 +47,7 @@ list = this.b(resourcekey); builder.put(resourcekey, list.listIterator()); -@@ -84,18 +84,18 @@ +@@ -97,18 +101,18 @@ this.i = true; } else { float f = (float) this.k; @@ -63,7 +71,7 @@ long i = SystemUtils.getMonotonicMillis(); this.o = new ChatMessage("optimizeWorld.stage.upgrading"); -@@ -107,7 +107,7 @@ +@@ -120,7 +124,7 @@ float f2; for (UnmodifiableIterator unmodifiableiterator2 = this.c.iterator(); unmodifiableiterator2.hasNext(); f1 += f2) { @@ -72,7 +80,7 @@ ListIterator listiterator = (ListIterator) immutablemap.get(resourcekey2); IChunkLoader ichunkloader = (IChunkLoader) immutablemap1.get(resourcekey2); -@@ -122,7 +122,7 @@ +@@ -135,7 +139,7 @@ int j = IChunkLoader.a(nbttagcompound); NBTTagCompound nbttagcompound1 = ichunkloader.getChunkData(resourcekey2, () -> { return this.q; @@ -81,7 +89,7 @@ NBTTagCompound nbttagcompound2 = nbttagcompound1.getCompound("Level"); ChunkCoordIntPair chunkcoordintpair1 = new ChunkCoordIntPair(nbttagcompound2.getInt("xPos"), nbttagcompound2.getInt("zPos")); -@@ -195,8 +195,8 @@ +@@ -208,8 +212,8 @@ } } diff --git a/nms-patches/net/minecraft/world/ChestLock.patch b/nms-patches/net/minecraft/world/ChestLock.patch index cbb12f07c..dd59b51d8 100644 --- a/nms-patches/net/minecraft/world/ChestLock.patch +++ b/nms-patches/net/minecraft/world/ChestLock.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/ChestLock.java -+++ b/net/minecraft/server/ChestLock.java -@@ -2,6 +2,11 @@ - - import javax.annotation.concurrent.Immutable; +--- a/net/minecraft/world/ChestLock.java ++++ b/net/minecraft/world/ChestLock.java +@@ -4,6 +4,11 @@ + import net.minecraft.nbt.NBTTagCompound; + import net.minecraft.world.item.ItemStack; +// CraftBukkit start +import org.bukkit.ChatColor; @@ -12,7 +12,7 @@ @Immutable public class ChestLock { -@@ -13,7 +18,19 @@ +@@ -15,7 +20,19 @@ } public boolean a(ItemStack itemstack) { diff --git a/nms-patches/net/minecraft/world/IInventory.patch b/nms-patches/net/minecraft/world/IInventory.patch index b4afe81b8..f5dca44e3 100644 --- a/nms-patches/net/minecraft/world/IInventory.patch +++ b/nms-patches/net/minecraft/world/IInventory.patch @@ -1,15 +1,18 @@ ---- a/net/minecraft/server/IInventory.java -+++ b/net/minecraft/server/IInventory.java -@@ -2,6 +2,8 @@ +--- a/net/minecraft/world/IInventory.java ++++ b/net/minecraft/world/IInventory.java +@@ -5,6 +5,11 @@ + import net.minecraft.world.item.Item; + import net.minecraft.world.item.ItemStack; - import java.util.Set; - -+import org.bukkit.craftbukkit.entity.CraftHumanEntity; // CraftBukkit ++// CraftBukkit start ++import net.minecraft.world.item.crafting.IRecipe; ++import org.bukkit.craftbukkit.entity.CraftHumanEntity; ++// CraftBukkit end + public interface IInventory extends Clearable { int getSize(); -@@ -16,9 +18,7 @@ +@@ -19,9 +24,7 @@ void setItem(int i, ItemStack itemstack); @@ -20,7 +23,7 @@ void update(); -@@ -57,4 +57,29 @@ +@@ -60,4 +63,29 @@ return false; } diff --git a/nms-patches/net/minecraft/world/InventoryLargeChest.patch b/nms-patches/net/minecraft/world/InventoryLargeChest.patch index 4422854d3..4ac952fe1 100644 --- a/nms-patches/net/minecraft/world/InventoryLargeChest.patch +++ b/nms-patches/net/minecraft/world/InventoryLargeChest.patch @@ -1,7 +1,8 @@ ---- a/net/minecraft/server/InventoryLargeChest.java -+++ b/net/minecraft/server/InventoryLargeChest.java -@@ -1,10 +1,61 @@ - package net.minecraft.server; +--- a/net/minecraft/world/InventoryLargeChest.java ++++ b/net/minecraft/world/InventoryLargeChest.java +@@ -3,11 +3,62 @@ + import net.minecraft.world.entity.player.EntityHuman; + import net.minecraft.world.item.ItemStack; +// CraftBukkit start +import java.util.ArrayList; @@ -62,7 +63,7 @@ public InventoryLargeChest(IInventory iinventory, IInventory iinventory1) { if (iinventory == null) { iinventory = iinventory1; -@@ -59,7 +110,7 @@ +@@ -62,7 +113,7 @@ @Override public int getMaxStackSize() { diff --git a/nms-patches/net/minecraft/world/InventorySubcontainer.patch b/nms-patches/net/minecraft/world/InventorySubcontainer.patch index 2f197fe4a..12d058b04 100644 --- a/nms-patches/net/minecraft/world/InventorySubcontainer.patch +++ b/nms-patches/net/minecraft/world/InventorySubcontainer.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/InventorySubcontainer.java -+++ b/net/minecraft/server/InventorySubcontainer.java -@@ -5,13 +5,64 @@ - import java.util.List; - import java.util.stream.Collectors; +--- a/net/minecraft/world/InventorySubcontainer.java ++++ b/net/minecraft/world/InventorySubcontainer.java +@@ -13,13 +13,64 @@ + import net.minecraft.world.item.Item; + import net.minecraft.world.item.ItemStack; +// CraftBukkit start +import org.bukkit.Location; diff --git a/nms-patches/net/minecraft/world/damagesource/DamageSource.patch b/nms-patches/net/minecraft/world/damagesource/DamageSource.patch index aff8bdec0..3e2879a3f 100644 --- a/nms-patches/net/minecraft/world/damagesource/DamageSource.patch +++ b/nms-patches/net/minecraft/world/damagesource/DamageSource.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/DamageSource.java -+++ b/net/minecraft/server/DamageSource.java -@@ -35,6 +35,18 @@ +--- a/net/minecraft/world/damagesource/DamageSource.java ++++ b/net/minecraft/world/damagesource/DamageSource.java +@@ -46,6 +46,18 @@ private boolean D; private boolean E; public final String translationIndex; diff --git a/nms-patches/net/minecraft/world/damagesource/EntityDamageSourceIndirect.patch b/nms-patches/net/minecraft/world/damagesource/EntityDamageSourceIndirect.patch index 7fd01bf44..57169c2a4 100644 --- a/nms-patches/net/minecraft/world/damagesource/EntityDamageSourceIndirect.patch +++ b/nms-patches/net/minecraft/world/damagesource/EntityDamageSourceIndirect.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityDamageSourceIndirect.java -+++ b/net/minecraft/server/EntityDamageSourceIndirect.java -@@ -32,4 +32,10 @@ +--- a/net/minecraft/world/damagesource/EntityDamageSourceIndirect.java ++++ b/net/minecraft/world/damagesource/EntityDamageSourceIndirect.java +@@ -37,4 +37,10 @@ return !itemstack.isEmpty() && itemstack.hasName() ? new ChatMessage(s1, new Object[]{entityliving.getScoreboardDisplayName(), ichatbasecomponent, itemstack.C()}) : new ChatMessage(s, new Object[]{entityliving.getScoreboardDisplayName(), ichatbasecomponent}); } diff --git a/nms-patches/net/minecraft/world/effect/MobEffectList.patch b/nms-patches/net/minecraft/world/effect/MobEffectList.patch index 463f69834..3cd7a6f46 100644 --- a/nms-patches/net/minecraft/world/effect/MobEffectList.patch +++ b/nms-patches/net/minecraft/world/effect/MobEffectList.patch @@ -1,10 +1,12 @@ ---- a/net/minecraft/server/MobEffectList.java -+++ b/net/minecraft/server/MobEffectList.java -@@ -7,6 +7,11 @@ - import java.util.UUID; - import javax.annotation.Nullable; +--- a/net/minecraft/world/effect/MobEffectList.java ++++ b/net/minecraft/world/effect/MobEffectList.java +@@ -19,6 +19,13 @@ + import net.minecraft.world.entity.ai.attributes.AttributeModifier; + import net.minecraft.world.entity.player.EntityHuman; +// CraftBukkit start ++import net.minecraft.network.protocol.game.PacketPlayOutUpdateHealth; ++import net.minecraft.server.level.EntityPlayer; +import org.bukkit.craftbukkit.event.CraftEventFactory; +import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason; +// CraftBukkit end @@ -12,7 +14,7 @@ public class MobEffectList { private final Map a = Maps.newHashMap(); -@@ -21,7 +26,7 @@ +@@ -33,7 +40,7 @@ } public static int getId(MobEffectList mobeffectlist) { @@ -21,7 +23,7 @@ } protected MobEffectList(MobEffectInfo mobeffectinfo, int i) { -@@ -32,26 +37,37 @@ +@@ -44,26 +51,37 @@ public void tick(EntityLiving entityliving, int i) { if (this == MobEffects.REGENERATION) { if (entityliving.getHealth() < entityliving.getMaxHealth()) { @@ -64,7 +66,7 @@ } } -@@ -72,7 +88,7 @@ +@@ -84,7 +102,7 @@ } } else { j = (int) (d0 * (double) (4 << i) + 0.5D); diff --git a/nms-patches/net/minecraft/world/effect/MobEffects.patch b/nms-patches/net/minecraft/world/effect/MobEffects.patch index 07c74ad01..5b4ce3a14 100644 --- a/nms-patches/net/minecraft/world/effect/MobEffects.patch +++ b/nms-patches/net/minecraft/world/effect/MobEffects.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/MobEffects.java -+++ b/net/minecraft/server/MobEffects.java -@@ -57,6 +57,14 @@ +--- a/net/minecraft/world/effect/MobEffects.java ++++ b/net/minecraft/world/effect/MobEffects.java +@@ -65,6 +65,14 @@ }); public static final MobEffectList HERO_OF_THE_VILLAGE = a(32, "hero_of_the_village", new MobEffectList(MobEffectInfo.BENEFICIAL, 4521796)); diff --git a/nms-patches/net/minecraft/world/entity/Entity.patch b/nms-patches/net/minecraft/world/entity/Entity.patch index 5619bd4aa..3b20012ef 100644 --- a/nms-patches/net/minecraft/world/entity/Entity.patch +++ b/nms-patches/net/minecraft/world/entity/Entity.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/Entity.java -+++ b/net/minecraft/server/Entity.java -@@ -21,8 +21,58 @@ +--- a/net/minecraft/world/entity/Entity.java ++++ b/net/minecraft/world/entity/Entity.java +@@ -106,8 +106,58 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -59,7 +59,7 @@ protected static final Logger LOGGER = LogManager.getLogger(); private static final AtomicInteger entityCount = new AtomicInteger(); private static final List c = Collections.emptyList(); -@@ -106,6 +156,21 @@ +@@ -191,6 +241,21 @@ private long aB; private EntitySize size; private float headHeight; @@ -81,7 +81,7 @@ public Entity(EntityTypes entitytypes, World world) { this.id = Entity.entityCount.incrementAndGet(); -@@ -212,6 +277,12 @@ +@@ -297,6 +362,12 @@ } public void setPose(EntityPose entitypose) { @@ -94,7 +94,7 @@ this.datawatcher.set(Entity.POSE, entitypose); } -@@ -228,6 +299,33 @@ +@@ -313,6 +384,33 @@ } protected void setYawPitch(float f, float f1) { @@ -128,7 +128,7 @@ this.yaw = f % 360.0F; this.pitch = f1 % 360.0F; } -@@ -235,6 +333,7 @@ +@@ -320,6 +418,7 @@ public void setPosition(double d0, double d1, double d2) { this.setPositionRaw(d0, d1, d2); this.a(this.size.a(d0, d1, d2)); @@ -136,7 +136,7 @@ } protected void af() { -@@ -249,6 +348,15 @@ +@@ -334,6 +433,15 @@ this.entityBaseTick(); } @@ -152,7 +152,7 @@ public void entityBaseTick() { this.world.getMethodProfiler().enter("entityBaseTick"); if (this.isPassenger() && this.getVehicle().dead) { -@@ -262,7 +370,7 @@ +@@ -347,7 +455,7 @@ this.z = this.A; this.lastPitch = this.pitch; this.lastYaw = this.yaw; @@ -161,7 +161,7 @@ if (this.aO()) { this.aP(); } -@@ -325,12 +433,44 @@ +@@ -410,12 +518,44 @@ protected void burnFromLava() { if (!this.isFireProof()) { @@ -207,7 +207,7 @@ int j = i * 20; if (this instanceof EntityLiving) { -@@ -427,6 +567,28 @@ +@@ -512,6 +652,28 @@ block.a((IBlockAccess) this.world, this); } @@ -236,7 +236,7 @@ if (this.onGround && !this.bv()) { block.stepOn(this.world, blockposition, this); } -@@ -700,6 +862,7 @@ +@@ -785,6 +947,7 @@ AxisAlignedBB axisalignedbb = this.getBoundingBox(); this.setPositionRaw((axisalignedbb.minX + axisalignedbb.maxX) / 2.0D, axisalignedbb.minY, (axisalignedbb.minZ + axisalignedbb.maxZ) / 2.0D); @@ -244,7 +244,7 @@ } protected SoundEffect getSoundSwim() { -@@ -1025,6 +1188,13 @@ +@@ -1110,6 +1273,13 @@ } public void spawnIn(World world) { @@ -258,7 +258,7 @@ this.world = world; } -@@ -1044,6 +1214,7 @@ +@@ -1129,6 +1299,7 @@ this.lastY = d1; this.lastZ = d4; this.setPosition(d3, d1, d4); @@ -266,7 +266,7 @@ } public void d(Vec3D vec3d) { -@@ -1218,6 +1389,12 @@ +@@ -1303,6 +1474,12 @@ return false; } @@ -279,7 +279,7 @@ public void a(Entity entity, int i, DamageSource damagesource) { if (entity instanceof EntityPlayer) { CriterionTriggers.c.a((EntityPlayer) entity, this, damagesource); -@@ -1228,7 +1405,7 @@ +@@ -1313,7 +1490,7 @@ public boolean a_(NBTTagCompound nbttagcompound) { String s = this.getSaveID(); @@ -288,7 +288,7 @@ nbttagcompound.setString("id", s); this.save(nbttagcompound); return true; -@@ -1252,6 +1429,18 @@ +@@ -1337,6 +1514,18 @@ Vec3D vec3d = this.getMot(); nbttagcompound.set("Motion", this.a(vec3d.x, vec3d.y, vec3d.z)); @@ -307,7 +307,7 @@ nbttagcompound.set("Rotation", this.a(this.yaw, this.pitch)); nbttagcompound.setFloat("FallDistance", this.fallDistance); nbttagcompound.setShort("Fire", (short) this.fireTicks); -@@ -1260,6 +1449,18 @@ +@@ -1345,6 +1534,18 @@ nbttagcompound.setBoolean("Invulnerable", this.invulnerable); nbttagcompound.setInt("PortalCooldown", this.portalCooldown); nbttagcompound.a("UUID", this.getUniqueID()); @@ -326,7 +326,7 @@ IChatBaseComponent ichatbasecomponent = this.getCustomName(); if (ichatbasecomponent != null) { -@@ -1317,6 +1518,11 @@ +@@ -1402,6 +1603,11 @@ } } @@ -338,7 +338,7 @@ return nbttagcompound; } catch (Throwable throwable) { CrashReport crashreport = CrashReport.a(throwable, "Saving entity NBT"); -@@ -1394,6 +1600,49 @@ +@@ -1479,6 +1685,49 @@ } else { throw new IllegalStateException("Entity has invalid position"); } @@ -388,7 +388,7 @@ } catch (Throwable throwable) { CrashReport crashreport = CrashReport.a(throwable, "Loading entity NBT"); CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being loaded"); -@@ -1469,9 +1718,22 @@ +@@ -1554,9 +1803,22 @@ } else if (this.world.isClientSide) { return null; } else { @@ -411,7 +411,7 @@ this.world.addEntity(entityitem); return entityitem; } -@@ -1555,7 +1817,7 @@ +@@ -1640,7 +1902,7 @@ this.setPose(EntityPose.STANDING); this.vehicle = entity; @@ -420,7 +420,7 @@ return true; } } -@@ -1580,7 +1842,7 @@ +@@ -1665,7 +1927,7 @@ Entity entity = this.vehicle; this.vehicle = null; @@ -429,7 +429,7 @@ } } -@@ -1589,10 +1851,31 @@ +@@ -1674,10 +1936,31 @@ this.bf(); } @@ -462,7 +462,7 @@ if (!this.world.isClientSide && entity instanceof EntityHuman && !(this.getRidingPassenger() instanceof EntityHuman)) { this.passengers.add(0, entity); } else { -@@ -1600,15 +1883,36 @@ +@@ -1685,15 +1968,36 @@ } } @@ -500,7 +500,7 @@ } protected boolean q(Entity entity) { -@@ -1646,14 +1950,20 @@ +@@ -1731,14 +2035,20 @@ if (this.inPortal) { MinecraftServer minecraftserver = worldserver.getMinecraftServer(); @@ -524,7 +524,7 @@ this.world.getMethodProfiler().exit(); } -@@ -1753,6 +2063,13 @@ +@@ -1838,6 +2148,13 @@ } public void setSwimming(boolean flag) { @@ -538,7 +538,7 @@ this.setFlag(4, flag); } -@@ -1785,8 +2102,12 @@ +@@ -1870,8 +2187,12 @@ return this.getScoreboardTeam() != null ? this.getScoreboardTeam().isAlly(scoreboardteambase) : false; } @@ -552,7 +552,7 @@ } public boolean getFlag(int i) { -@@ -1813,16 +2134,56 @@ +@@ -1898,16 +2219,56 @@ } public void setAirTicks(int i) { @@ -612,7 +612,7 @@ } public void k(boolean flag) { -@@ -1972,15 +2333,32 @@ +@@ -2057,15 +2418,32 @@ @Nullable public Entity b(WorldServer worldserver) { @@ -647,7 +647,7 @@ this.world.getMethodProfiler().exitEnter("reloading"); Entity entity = this.getEntityType().a((World) worldserver); -@@ -1989,9 +2367,17 @@ +@@ -2074,9 +2452,17 @@ entity.setPositionRotation(shapedetectorshape.position.x, shapedetectorshape.position.y, shapedetectorshape.position.z, shapedetectorshape.yaw, entity.pitch); entity.setMot(shapedetectorshape.velocity); worldserver.addEntityTeleport(entity); @@ -667,7 +667,7 @@ } this.bN(); -@@ -2012,13 +2398,18 @@ +@@ -2097,13 +2483,18 @@ @Nullable protected ShapeDetectorShape a(WorldServer worldserver) { @@ -690,7 +690,7 @@ return null; } else { WorldBorder worldborder = worldserver.getWorldBorder(); -@@ -2028,8 +2419,16 @@ +@@ -2113,8 +2504,16 @@ double d3 = Math.min(2.9999872E7D, worldborder.h() - 16.0D); double d4 = DimensionManager.a(this.world.getDimensionManager(), worldserver.getDimensionManager()); BlockPosition blockposition = new BlockPosition(MathHelper.a(this.locX() * d4, d0, d2), this.locY(), MathHelper.a(this.locZ() * d4, d1, d3)); @@ -708,7 +708,7 @@ IBlockData iblockdata = this.world.getType(this.ac); EnumDirection.EnumAxis enumdirection_enumaxis; Vec3D vec3d; -@@ -2046,8 +2445,8 @@ +@@ -2131,8 +2530,8 @@ vec3d = new Vec3D(0.5D, 0.0D, 0.0D); } @@ -719,7 +719,7 @@ } } else { BlockPosition blockposition1; -@@ -2057,8 +2456,15 @@ +@@ -2142,8 +2541,15 @@ } else { blockposition1 = worldserver.getHighestBlockYAt(HeightMap.Type.MOTION_BLOCKING_NO_LEAVES, worldserver.getSpawn()); } @@ -736,7 +736,7 @@ } } -@@ -2066,8 +2472,23 @@ +@@ -2151,8 +2557,23 @@ return BlockPortalShape.a(blockutil_rectangle, enumdirection_enumaxis, this.getPositionVector(), this.a(this.getPose())); } @@ -762,7 +762,7 @@ } public boolean canPortal() { -@@ -2253,7 +2674,26 @@ +@@ -2338,7 +2759,26 @@ } public void a(AxisAlignedBB axisalignedbb) { diff --git a/nms-patches/net/minecraft/world/entity/EntityAgeable.patch b/nms-patches/net/minecraft/world/entity/EntityAgeable.patch index 2c947c9cf..273e44c70 100644 --- a/nms-patches/net/minecraft/world/entity/EntityAgeable.patch +++ b/nms-patches/net/minecraft/world/entity/EntityAgeable.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityAgeable.java -+++ b/net/minecraft/server/EntityAgeable.java -@@ -8,6 +8,7 @@ +--- a/net/minecraft/world/entity/EntityAgeable.java ++++ b/net/minecraft/world/entity/EntityAgeable.java +@@ -17,6 +17,7 @@ protected int b; protected int c; protected int d; @@ -8,7 +8,7 @@ protected EntityAgeable(EntityTypes entitytypes, World world) { super(entitytypes, world); -@@ -91,6 +92,7 @@ +@@ -100,6 +101,7 @@ super.saveData(nbttagcompound); nbttagcompound.setInt("Age", this.getAge()); nbttagcompound.setInt("ForcedAge", this.c); @@ -16,7 +16,7 @@ } @Override -@@ -98,6 +100,7 @@ +@@ -107,6 +109,7 @@ super.loadData(nbttagcompound); this.setAgeRaw(nbttagcompound.getInt("Age")); this.c = nbttagcompound.getInt("ForcedAge"); @@ -24,7 +24,7 @@ } @Override -@@ -112,7 +115,7 @@ +@@ -121,7 +124,7 @@ @Override public void movementTick() { super.movementTick(); diff --git a/nms-patches/net/minecraft/world/entity/EntityAreaEffectCloud.patch b/nms-patches/net/minecraft/world/entity/EntityAreaEffectCloud.patch index 5f08c6c1b..aaf445ea4 100644 --- a/nms-patches/net/minecraft/world/entity/EntityAreaEffectCloud.patch +++ b/nms-patches/net/minecraft/world/entity/EntityAreaEffectCloud.patch @@ -1,10 +1,11 @@ ---- a/net/minecraft/server/EntityAreaEffectCloud.java -+++ b/net/minecraft/server/EntityAreaEffectCloud.java -@@ -14,6 +14,11 @@ +--- a/net/minecraft/world/entity/EntityAreaEffectCloud.java ++++ b/net/minecraft/world/entity/EntityAreaEffectCloud.java +@@ -33,6 +33,12 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +// CraftBukkit start ++import net.minecraft.resources.MinecraftKey; +import org.bukkit.craftbukkit.entity.CraftLivingEntity; +import org.bukkit.entity.LivingEntity; +// CraftBukkit end @@ -12,7 +13,7 @@ public class EntityAreaEffectCloud extends Entity { private static final Logger LOGGER = LogManager.getLogger(); -@@ -105,6 +110,22 @@ +@@ -124,6 +130,22 @@ } @@ -35,7 +36,7 @@ public int getColor() { return (Integer) this.getDataWatcher().get(EntityAreaEffectCloud.COLOR); } -@@ -249,6 +270,7 @@ +@@ -268,6 +290,7 @@ if (!list1.isEmpty()) { Iterator iterator2 = list1.iterator(); @@ -43,7 +44,7 @@ while (iterator2.hasNext()) { EntityLiving entityliving = (EntityLiving) iterator2.next(); -@@ -258,6 +280,17 @@ +@@ -277,6 +300,17 @@ double d2 = d0 * d0 + d1 * d1; if (d2 <= (double) (f * f)) { @@ -61,7 +62,7 @@ this.affectedEntities.put(entityliving, this.ticksLived + this.reapplicationDelay); Iterator iterator3 = list.iterator(); -@@ -267,7 +300,7 @@ +@@ -286,7 +320,7 @@ if (mobeffect1.getMobEffect().isInstant()) { mobeffect1.getMobEffect().applyInstantEffect(this, this.getSource(), entityliving, mobeffect1.getAmplifier(), 0.5D); } else { diff --git a/nms-patches/net/minecraft/world/entity/EntityCreature.patch b/nms-patches/net/minecraft/world/entity/EntityCreature.patch index e6700d638..d6d31f295 100644 --- a/nms-patches/net/minecraft/world/entity/EntityCreature.patch +++ b/nms-patches/net/minecraft/world/entity/EntityCreature.patch @@ -1,7 +1,8 @@ ---- a/net/minecraft/server/EntityCreature.java -+++ b/net/minecraft/server/EntityCreature.java -@@ -1,5 +1,9 @@ - package net.minecraft.server; +--- a/net/minecraft/world/entity/EntityCreature.java ++++ b/net/minecraft/world/entity/EntityCreature.java +@@ -7,6 +7,10 @@ + import net.minecraft.world.level.World; + import net.minecraft.world.phys.Vec3D; +// CraftBukkit start +import org.bukkit.event.entity.EntityUnleashEvent; @@ -10,7 +11,7 @@ public abstract class EntityCreature extends EntityInsentient { protected EntityCreature(EntityTypes entitytypes, World world) { -@@ -34,6 +38,7 @@ +@@ -41,6 +45,7 @@ if (this instanceof EntityTameableAnimal && ((EntityTameableAnimal) this).isSitting()) { if (f > 10.0F) { @@ -18,7 +19,7 @@ this.unleash(true, true); } -@@ -42,6 +47,7 @@ +@@ -49,6 +54,7 @@ this.x(f); if (f > 10.0F) { diff --git a/nms-patches/net/minecraft/world/entity/EntityExperienceOrb.patch b/nms-patches/net/minecraft/world/entity/EntityExperienceOrb.patch index d6d7153d5..591e7c1d8 100644 --- a/nms-patches/net/minecraft/world/entity/EntityExperienceOrb.patch +++ b/nms-patches/net/minecraft/world/entity/EntityExperienceOrb.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/EntityExperienceOrb.java -+++ b/net/minecraft/server/EntityExperienceOrb.java -@@ -2,6 +2,12 @@ - - import java.util.Map.Entry; +--- a/net/minecraft/world/entity/EntityExperienceOrb.java ++++ b/net/minecraft/world/entity/EntityExperienceOrb.java +@@ -16,6 +16,12 @@ + import net.minecraft.world.level.World; + import net.minecraft.world.phys.Vec3D; +// CraftBukkit start +import org.bukkit.craftbukkit.event.CraftEventFactory; @@ -13,7 +13,7 @@ public class EntityExperienceOrb extends Entity { public int b; -@@ -36,6 +42,7 @@ +@@ -50,6 +56,7 @@ @Override public void tick() { super.tick(); @@ -21,7 +21,7 @@ if (this.d > 0) { --this.d; } -@@ -72,7 +79,22 @@ +@@ -86,7 +93,22 @@ this.targetPlayer = null; } @@ -45,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 +177,19 @@ +@@ -169,13 +191,19 @@ if (!itemstack.isEmpty() && itemstack.f()) { int i = Math.min(this.c(this.value), itemstack.getDamage()); @@ -68,7 +68,7 @@ } this.die(); -@@ -183,6 +211,24 @@ +@@ -197,6 +225,24 @@ } public static int getOrbValue(int i) { diff --git a/nms-patches/net/minecraft/world/entity/EntityInsentient.patch b/nms-patches/net/minecraft/world/entity/EntityInsentient.patch index ee6ceedaf..a4e3629e4 100644 --- a/nms-patches/net/minecraft/world/entity/EntityInsentient.patch +++ b/nms-patches/net/minecraft/world/entity/EntityInsentient.patch @@ -1,10 +1,11 @@ ---- a/net/minecraft/server/EntityInsentient.java -+++ b/net/minecraft/server/EntityInsentient.java -@@ -10,6 +10,18 @@ - import java.util.UUID; - import javax.annotation.Nullable; +--- a/net/minecraft/world/entity/EntityInsentient.java ++++ b/net/minecraft/world/entity/EntityInsentient.java +@@ -74,6 +74,19 @@ + import net.minecraft.world.level.pathfinder.PathType; + import net.minecraft.world.level.storage.loot.LootTableInfo; +// CraftBukkit start ++import net.minecraft.server.level.EntityPlayer; +import org.bukkit.craftbukkit.event.CraftEventFactory; +import org.bukkit.craftbukkit.entity.CraftLivingEntity; +import org.bukkit.event.entity.CreatureSpawnEvent; @@ -19,7 +20,7 @@ public abstract class EntityInsentient extends EntityLiving { private static final DataWatcherObject b = DataWatcher.a(EntityInsentient.class, DataWatcherRegistry.a); -@@ -28,7 +40,7 @@ +@@ -92,7 +105,7 @@ public final float[] dropChanceHand; private final NonNullList bq; public final float[] dropChanceArmor; @@ -28,7 +29,7 @@ public boolean persistent; private final Map bt; public MinecraftKey lootTableKey; -@@ -41,6 +53,8 @@ +@@ -105,6 +118,8 @@ private BlockPosition bz; private float bA; @@ -37,7 +38,7 @@ protected EntityInsentient(EntityTypes entitytypes, World world) { super(entitytypes, world); this.bp = NonNullList.a(2, ItemStack.b); -@@ -64,6 +78,9 @@ +@@ -128,6 +143,9 @@ this.initPathfinder(); } @@ -47,7 +48,7 @@ } protected void initPathfinder() {} -@@ -144,7 +161,38 @@ +@@ -208,7 +226,38 @@ } public void setGoalTarget(@Nullable EntityLiving entityliving) { @@ -86,7 +87,7 @@ } @Override -@@ -361,16 +409,26 @@ +@@ -425,16 +474,26 @@ nbttagcompound.setBoolean("NoAI", this.isNoAI()); } @@ -115,7 +116,7 @@ NBTTagList nbttaglist; int i; -@@ -417,6 +475,11 @@ +@@ -481,6 +540,11 @@ } this.setNoAI(nbttagcompound.getBoolean("NoAI")); @@ -127,7 +128,7 @@ } @Override -@@ -424,6 +487,11 @@ +@@ -488,6 +552,11 @@ super.a(damagesource, flag); this.lootTableKey = null; } @@ -139,7 +140,7 @@ @Override protected LootTableInfo.Builder a(boolean flag, DamageSource damagesource) { -@@ -480,7 +548,7 @@ +@@ -544,7 +613,7 @@ protected void b(EntityItem entityitem) { ItemStack itemstack = entityitem.getItemStack(); @@ -148,7 +149,7 @@ this.a(entityitem); this.receive(entityitem, itemstack.getCount()); entityitem.die(); -@@ -489,15 +557,29 @@ +@@ -553,15 +622,29 @@ } public boolean g(ItemStack itemstack) { @@ -179,7 +180,7 @@ } this.b(enumitemslot, itemstack); -@@ -610,18 +692,18 @@ +@@ -674,18 +757,18 @@ EntityHuman entityhuman = this.world.findNearbyPlayer(this, -1.0D); if (entityhuman != null) { @@ -201,7 +202,7 @@ this.die(); } else if (d0 < (double) l) { this.ticksFarFromPlayer = 0; -@@ -636,6 +718,7 @@ +@@ -700,6 +783,7 @@ @Override protected final void doTick() { ++this.ticksFarFromPlayer; @@ -209,7 +210,7 @@ this.world.getMethodProfiler().enter("sensing"); this.bo.a(); this.world.getMethodProfiler().exit(); -@@ -1024,6 +1107,12 @@ +@@ -1088,6 +1172,12 @@ if (!this.isAlive()) { return EnumInteractionResult.PASS; } else if (this.getLeashHolder() == entityhuman) { @@ -222,7 +223,7 @@ this.unleash(true, !entityhuman.abilities.canInstantlyBuild); return EnumInteractionResult.a(this.world.isClientSide); } else { -@@ -1042,6 +1131,12 @@ +@@ -1106,6 +1196,12 @@ ItemStack itemstack = entityhuman.b(enumhand); if (itemstack.getItem() == Items.LEAD && this.a(entityhuman)) { @@ -235,7 +236,7 @@ this.setLeashHolder(entityhuman, true); itemstack.subtract(1); return EnumInteractionResult.a(this.world.isClientSide); -@@ -1057,7 +1152,7 @@ +@@ -1121,7 +1217,7 @@ if (itemstack.getItem() instanceof ItemMonsterEgg) { if (this.world instanceof WorldServer) { ItemMonsterEgg itemmonsteregg = (ItemMonsterEgg) itemstack.getItem(); @@ -244,7 +245,7 @@ optional.ifPresent((entityinsentient) -> { this.a(entityhuman, entityinsentient); -@@ -1103,12 +1198,19 @@ +@@ -1167,12 +1263,19 @@ return this.bA != -1.0F; } @@ -265,7 +266,7 @@ t0.u(this); t0.setBaby(this.isBaby()); -@@ -1140,7 +1242,12 @@ +@@ -1204,7 +1307,12 @@ } } @@ -279,7 +280,7 @@ if (this.isPassenger()) { Entity entity = this.getVehicle(); -@@ -1160,6 +1267,7 @@ +@@ -1224,6 +1332,7 @@ if (this.leashHolder != null) { if (!this.isAlive() || !this.leashHolder.isAlive()) { @@ -287,7 +288,7 @@ this.unleash(true, true); } -@@ -1176,7 +1284,9 @@ +@@ -1240,7 +1349,9 @@ this.leashHolder = null; this.by = null; if (!this.world.isClientSide && flag1) { @@ -297,7 +298,7 @@ } if (!this.world.isClientSide && flag && this.world instanceof WorldServer) { -@@ -1226,6 +1336,7 @@ +@@ -1290,6 +1401,7 @@ boolean flag1 = super.a(entity, flag); if (flag1 && this.isLeashed()) { @@ -305,7 +306,7 @@ this.unleash(true, true); } -@@ -1358,7 +1469,14 @@ +@@ -1422,7 +1534,14 @@ int i = EnchantmentManager.getFireAspectEnchantmentLevel(this); if (i > 0) { @@ -321,7 +322,7 @@ } boolean flag = entity.damageEntity(DamageSource.mobAttack(this), f); -@@ -1420,6 +1538,7 @@ +@@ -1484,6 +1603,7 @@ @Override protected void bN() { super.bN(); diff --git a/nms-patches/net/minecraft/world/entity/EntityLightning.patch b/nms-patches/net/minecraft/world/entity/EntityLightning.patch index e9e38bbe1..e99c97b8b 100644 --- a/nms-patches/net/minecraft/world/entity/EntityLightning.patch +++ b/nms-patches/net/minecraft/world/entity/EntityLightning.patch @@ -1,15 +1,18 @@ ---- a/net/minecraft/server/EntityLightning.java -+++ b/net/minecraft/server/EntityLightning.java -@@ -5,6 +5,8 @@ - import java.util.List; - import javax.annotation.Nullable; +--- a/net/minecraft/world/entity/EntityLightning.java ++++ b/net/minecraft/world/entity/EntityLightning.java +@@ -22,6 +22,11 @@ + import net.minecraft.world.level.block.state.IBlockData; + import net.minecraft.world.phys.AxisAlignedBB; -+import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit ++// CraftBukkit start ++import net.minecraft.network.protocol.game.PacketPlayOutNamedSoundEffect; ++import org.bukkit.craftbukkit.event.CraftEventFactory; ++// CraftBukkit end + public class EntityLightning extends Entity { private int lifeTicks; -@@ -45,7 +47,24 @@ +@@ -62,7 +67,24 @@ this.a(4); } @@ -35,7 +38,7 @@ this.world.playSound((EntityHuman) null, this.locX(), this.locY(), this.locZ(), SoundEffects.ENTITY_LIGHTNING_BOLT_IMPACT, SoundCategory.WEATHER, 2.0F, 0.5F + this.random.nextFloat() * 0.2F); } -@@ -61,7 +80,7 @@ +@@ -78,7 +100,7 @@ } } @@ -44,7 +47,7 @@ if (!(this.world instanceof WorldServer)) { this.world.c(2); } else if (!this.isEffect) { -@@ -89,7 +108,11 @@ +@@ -106,7 +128,11 @@ IBlockData iblockdata = BlockFireAbstract.a((IBlockAccess) this.world, blockposition); if (this.world.getType(blockposition).isAir() && iblockdata.canPlace(this.world, blockposition)) { @@ -57,7 +60,7 @@ } for (int j = 0; j < i; ++j) { -@@ -97,7 +120,11 @@ +@@ -114,7 +140,11 @@ iblockdata = BlockFireAbstract.a((IBlockAccess) this.world, blockposition1); if (this.world.getType(blockposition1).isAir() && iblockdata.canPlace(this.world, blockposition1)) { diff --git a/nms-patches/net/minecraft/world/entity/EntityLiving.patch b/nms-patches/net/minecraft/world/entity/EntityLiving.patch index a8f6aad8a..7f93c25fb 100644 --- a/nms-patches/net/minecraft/world/entity/EntityLiving.patch +++ b/nms-patches/net/minecraft/world/entity/EntityLiving.patch @@ -1,7 +1,7 @@ ---- a/net/minecraft/server/EntityLiving.java -+++ b/net/minecraft/server/EntityLiving.java -@@ -21,6 +21,27 @@ - import javax.annotation.Nullable; +--- a/net/minecraft/world/entity/EntityLiving.java ++++ b/net/minecraft/world/entity/EntityLiving.java +@@ -111,6 +111,30 @@ + import net.minecraft.world.scores.ScoreboardTeam; import org.apache.logging.log4j.Logger; +// CraftBukkit start @@ -9,6 +9,9 @@ +import java.util.HashSet; +import java.util.Set; +import com.google.common.base.Function; ++import net.minecraft.nbt.NBTTagFloat; ++import net.minecraft.nbt.NBTTagInt; ++import net.minecraft.world.entity.animal.EntityAnimal; +import org.bukkit.Location; +import org.bukkit.craftbukkit.attribute.CraftAttributeMap; +import org.bukkit.craftbukkit.event.CraftEventFactory; @@ -28,15 +31,15 @@ public abstract class EntityLiving extends Entity { private static final UUID b = UUID.fromString("662A6B8D-DA3E-4C1C-8813-96EA6097278D"); -@@ -106,6 +127,21 @@ +@@ -196,6 +220,21 @@ private float bB; private float bC; protected BehaviorController bg; + // CraftBukkit start + public int expToDrop; + public int maxAirTicks = 300; -+ boolean forceDrops; -+ ArrayList drops = new ArrayList(); ++ public boolean forceDrops; ++ public ArrayList drops = new ArrayList(); + public final org.bukkit.craftbukkit.attribute.CraftAttributeMap craftAttributes; + public boolean collides = true; + public Set collidableExemptions = new HashSet<>(); @@ -50,7 +53,7 @@ protected EntityLiving(EntityTypes entitytypes, World world) { super(entitytypes, world); -@@ -117,7 +153,9 @@ +@@ -207,7 +246,9 @@ this.activeItem = ItemStack.b; this.by = Optional.empty(); this.attributeMap = new AttributeMapBase(AttributeDefaults.a(entitytypes)); @@ -61,7 +64,7 @@ this.i = true; this.az = (float) ((Math.random() + 1.0D) * 0.009999999776482582D); this.af(); -@@ -184,7 +222,13 @@ +@@ -274,7 +315,13 @@ double d1 = Math.min((double) (0.2F + f / 15.0F), 2.5D); int i = (int) (150.0D * d1); @@ -76,7 +79,7 @@ } } -@@ -406,7 +450,7 @@ +@@ -496,7 +543,7 @@ protected void cU() { ++this.deathTicks; @@ -85,7 +88,7 @@ this.die(); for (int i = 0; i < 20; ++i) { -@@ -497,7 +541,13 @@ +@@ -587,7 +634,13 @@ } protected void playEquipSound(ItemStack itemstack) { @@ -100,7 +103,7 @@ SoundEffect soundeffect = SoundEffects.ITEM_ARMOR_EQUIP_GENERIC; Item item = itemstack.getItem(); -@@ -567,6 +617,17 @@ +@@ -657,6 +710,17 @@ } } @@ -118,7 +121,7 @@ if (nbttagcompound.hasKeyOfType("Health", 99)) { this.setHealth(nbttagcompound.getFloat("Health")); } -@@ -604,9 +665,32 @@ +@@ -694,9 +758,32 @@ } @@ -151,7 +154,7 @@ try { while (iterator.hasNext()) { MobEffectList mobeffectlist = (MobEffectList) iterator.next(); -@@ -616,6 +700,12 @@ +@@ -706,6 +793,12 @@ this.a(mobeffect, true); })) { if (!this.world.isClientSide) { @@ -164,7 +167,7 @@ iterator.remove(); this.b(mobeffect); } -@@ -626,6 +716,17 @@ +@@ -716,6 +809,17 @@ } catch (ConcurrentModificationException concurrentmodificationexception) { ; } @@ -182,7 +185,7 @@ if (this.updateEffects) { if (!this.world.isClientSide) { -@@ -735,7 +836,13 @@ +@@ -825,7 +929,13 @@ this.datawatcher.set(EntityLiving.f, 0); } @@ -196,7 +199,7 @@ if (this.world.isClientSide) { return false; } else { -@@ -744,7 +851,14 @@ +@@ -834,7 +944,14 @@ boolean flag; for (flag = false; iterator.hasNext(); flag = true) { @@ -212,7 +215,7 @@ iterator.remove(); } -@@ -769,18 +883,44 @@ +@@ -859,18 +976,44 @@ return (MobEffect) this.effects.get(mobeffectlist); } @@ -258,7 +261,7 @@ return true; } else { return false; -@@ -804,13 +944,39 @@ +@@ -894,13 +1037,39 @@ return this.getMonsterType() == EnumMonsterType.UNDEAD; } @@ -299,7 +302,7 @@ if (mobeffect != null) { this.b(mobeffect); -@@ -847,20 +1013,55 @@ +@@ -937,20 +1106,55 @@ } @@ -356,7 +359,7 @@ this.datawatcher.set(EntityLiving.HEALTH, MathHelper.a(f, 0.0F, this.getMaxHealth())); } -@@ -874,7 +1075,7 @@ +@@ -964,7 +1168,7 @@ return false; } else if (this.world.isClientSide) { return false; @@ -365,7 +368,7 @@ return false; } else if (damagesource.isFire() && this.hasEffect(MobEffects.FIRE_RESISTANCE)) { return false; -@@ -886,17 +1087,19 @@ +@@ -976,17 +1180,19 @@ this.ticksFarFromPlayer = 0; float f1 = f; @@ -388,7 +391,7 @@ this.damageShield(f); f2 = f; f = 0.0F; -@@ -914,22 +1117,41 @@ +@@ -1004,22 +1210,41 @@ this.av = 1.5F; boolean flag1 = true; @@ -434,7 +437,7 @@ this.ap = 0.0F; Entity entity1 = damagesource.getEntity(); -@@ -1050,19 +1272,29 @@ +@@ -1140,19 +1365,29 @@ EnumHand[] aenumhand = EnumHand.values(); int i = aenumhand.length; @@ -468,7 +471,7 @@ EntityPlayer entityplayer = (EntityPlayer) this; entityplayer.b(StatisticList.ITEM_USED.b(Items.TOTEM_OF_UNDYING)); -@@ -1070,14 +1302,16 @@ +@@ -1160,14 +1395,16 @@ } this.setHealth(1.0F); @@ -490,7 +493,7 @@ } } -@@ -1175,6 +1409,13 @@ +@@ -1265,6 +1502,13 @@ if (!flag) { EntityItem entityitem = new EntityItem(this.world, this.locX(), this.locY(), this.locZ(), new ItemStack(Items.bt)); @@ -504,7 +507,7 @@ this.world.addEntity(entityitem); } } -@@ -1194,28 +1435,46 @@ +@@ -1284,28 +1528,46 @@ boolean flag = this.lastDamageByPlayerTime > 0; @@ -553,7 +556,7 @@ } -@@ -1336,9 +1595,14 @@ +@@ -1426,9 +1688,14 @@ int i = this.e(f, f1); if (i > 0) { @@ -569,7 +572,7 @@ return true; } else { return flag; -@@ -1378,7 +1642,7 @@ +@@ -1468,7 +1735,7 @@ protected float applyArmorModifier(DamageSource damagesource, float f) { if (!damagesource.ignoresArmor()) { @@ -578,7 +581,7 @@ f = CombatMath.a(f, (float) this.getArmorStrength(), (float) this.b(GenericAttributes.ARMOR_TOUGHNESS)); } -@@ -1391,7 +1655,8 @@ +@@ -1481,7 +1748,8 @@ } else { int i; @@ -588,7 +591,7 @@ i = (this.getEffect(MobEffects.RESISTANCE).getAmplifier() + 1) * 5; int j = 25 - i; float f1 = f * (float) j; -@@ -1422,28 +1687,173 @@ +@@ -1512,28 +1780,173 @@ } } @@ -772,7 +775,7 @@ } public CombatTracker getCombatTracker() { -@@ -1464,9 +1874,19 @@ +@@ -1554,9 +1967,19 @@ } public final void setArrowCount(int i) { @@ -793,7 +796,7 @@ public final int dz() { return (Integer) this.datawatcher.get(EntityLiving.bi); } -@@ -1594,6 +2014,12 @@ +@@ -1684,6 +2107,12 @@ public abstract ItemStack getEquipment(EnumItemSlot enumitemslot); @@ -806,7 +809,7 @@ @Override public abstract void setSlot(EnumItemSlot enumitemslot, ItemStack itemstack); -@@ -1816,6 +2242,7 @@ +@@ -1906,6 +2335,7 @@ } if (this.onGround && !this.world.isClientSide) { @@ -814,25 +817,25 @@ this.setFlag(7, false); } } else { -@@ -1957,7 +2384,7 @@ +@@ -2047,7 +2477,7 @@ } } -- this.p(); +- this.updateEquipment(); + this.updateEquipment(); // PAIL rename if (this.ticksLived % 20 == 0) { this.getCombatTracker().g(); } -@@ -2058,7 +2485,7 @@ +@@ -2148,7 +2578,7 @@ } -- private void p() { +- public void updateEquipment() { + public void updateEquipment() { // PAIL private->public; updateEquipment Map map = this.q(); if (map != null) { -@@ -2321,6 +2748,7 @@ +@@ -2411,6 +2841,7 @@ } if (!this.world.isClientSide) { @@ -840,7 +843,7 @@ this.setFlag(7, flag); } -@@ -2441,6 +2869,7 @@ +@@ -2531,6 +2962,7 @@ } public boolean hasLineOfSight(Entity entity) { @@ -848,7 +851,7 @@ Vec3D vec3d = new Vec3D(this.locX(), this.getHeadY(), this.locZ()); Vec3D vec3d1 = new Vec3D(entity.locX(), entity.getHeadY(), entity.locZ()); -@@ -2458,14 +2887,21 @@ +@@ -2548,14 +2980,21 @@ @Override public boolean isInteractable() { @@ -872,7 +875,7 @@ @Override protected void velocityChanged() { this.velocityChanged = this.random.nextDouble() >= this.b(GenericAttributes.KNOCKBACK_RESISTANCE); -@@ -2658,7 +3094,25 @@ +@@ -2748,7 +3187,25 @@ } else { if (!this.activeItem.isEmpty() && this.isHandRaised()) { this.b(this.activeItem, 16); @@ -899,7 +902,7 @@ if (itemstack != this.activeItem) { this.a(enumhand, itemstack); -@@ -2750,10 +3204,18 @@ +@@ -2840,10 +3297,18 @@ } if (flag2) { @@ -921,7 +924,7 @@ } } -@@ -2850,7 +3312,7 @@ +@@ -2940,7 +3405,7 @@ } public void entityWakeup() { @@ -930,7 +933,7 @@ World world = this.world; this.world.getClass(); -@@ -2921,7 +3383,7 @@ +@@ -3011,7 +3476,7 @@ Pair pair = (Pair) iterator.next(); if (!world.isClientSide && pair.getFirst() != null && world.random.nextFloat() < (Float) pair.getSecond()) { diff --git a/nms-patches/net/minecraft/world/entity/EntityTypes.patch b/nms-patches/net/minecraft/world/entity/EntityTypes.patch index d949b8025..b7734c10e 100644 --- a/nms-patches/net/minecraft/world/entity/EntityTypes.patch +++ b/nms-patches/net/minecraft/world/entity/EntityTypes.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityTypes.java -+++ b/net/minecraft/server/EntityTypes.java -@@ -12,7 +12,7 @@ +--- a/net/minecraft/world/entity/EntityTypes.java ++++ b/net/minecraft/world/entity/EntityTypes.java +@@ -142,7 +142,7 @@ public class EntityTypes { private static final Logger LOGGER = LogManager.getLogger(); @@ -9,7 +9,7 @@ public static final EntityTypes ARMOR_STAND = a("armor_stand", EntityTypes.Builder.a(EntityArmorStand::new, EnumCreatureType.MISC).a(0.5F, 1.975F).trackingRange(10)); public static final EntityTypes ARROW = a("arrow", EntityTypes.Builder.a(EntityTippedArrow::new, EnumCreatureType.MISC).a(0.5F, 0.5F).trackingRange(4).updateInterval(20)); public static final EntityTypes BAT = a("bat", EntityTypes.Builder.a(EntityBat::new, EnumCreatureType.AMBIENT).a(0.5F, 0.9F).trackingRange(5)); -@@ -137,7 +137,7 @@ +@@ -267,7 +267,7 @@ private MinecraftKey bq; private final EntitySize br; @@ -18,7 +18,7 @@ return (EntityTypes) IRegistry.a((IRegistry) IRegistry.ENTITY_TYPE, s, (Object) entitytypes_builder.a(s)); } -@@ -169,10 +169,18 @@ +@@ -299,10 +299,18 @@ @Nullable public T spawnCreature(WorldServer worldserver, @Nullable NBTTagCompound nbttagcompound, @Nullable IChatBaseComponent ichatbasecomponent, @Nullable EntityHuman entityhuman, BlockPosition blockposition, EnumMobSpawn enummobspawn, boolean flag, boolean flag1) { @@ -38,7 +38,7 @@ } return t0; -@@ -208,7 +216,7 @@ +@@ -338,7 +346,7 @@ t0.setCustomName(ichatbasecomponent); } @@ -47,7 +47,7 @@ return t0; } } -@@ -351,7 +359,7 @@ +@@ -481,7 +489,7 @@ } return entity; @@ -56,7 +56,7 @@ } private static Optional b(NBTTagCompound nbttagcompound, World world) { -@@ -403,7 +411,7 @@ +@@ -533,7 +541,7 @@ this.g = enumcreaturetype == EnumCreatureType.CREATURE || enumcreaturetype == EnumCreatureType.MISC; } diff --git a/nms-patches/net/minecraft/world/entity/IEntityAngerable.patch b/nms-patches/net/minecraft/world/entity/IEntityAngerable.patch index dbb196ef2..d2dd6ec88 100644 --- a/nms-patches/net/minecraft/world/entity/IEntityAngerable.patch +++ b/nms-patches/net/minecraft/world/entity/IEntityAngerable.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/IEntityAngerable.java -+++ b/net/minecraft/server/IEntityAngerable.java -@@ -98,7 +98,7 @@ +--- a/net/minecraft/world/entity/IEntityAngerable.java ++++ b/net/minecraft/world/entity/IEntityAngerable.java +@@ -103,7 +103,7 @@ default void pacify() { this.setLastDamager((EntityLiving) null); this.setAngerTarget((UUID) null); @@ -9,7 +9,7 @@ this.setAnger(0); } -@@ -108,6 +108,8 @@ +@@ -113,6 +113,8 @@ void setGoalTarget(@Nullable EntityLiving entityliving); diff --git a/nms-patches/net/minecraft/world/entity/IEntitySelector.patch b/nms-patches/net/minecraft/world/entity/IEntitySelector.patch index e1ca0f263..f755c3452 100644 --- a/nms-patches/net/minecraft/world/entity/IEntitySelector.patch +++ b/nms-patches/net/minecraft/world/entity/IEntitySelector.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/IEntitySelector.java -+++ b/net/minecraft/server/IEntitySelector.java -@@ -37,7 +37,7 @@ +--- a/net/minecraft/world/entity/IEntitySelector.java ++++ b/net/minecraft/world/entity/IEntitySelector.java +@@ -42,7 +42,7 @@ ScoreboardTeamBase.EnumTeamPush scoreboardteambase_enumteampush = scoreboardteambase == null ? ScoreboardTeamBase.EnumTeamPush.ALWAYS : scoreboardteambase.getCollisionRule(); return (Predicate) (scoreboardteambase_enumteampush == ScoreboardTeamBase.EnumTeamPush.NEVER ? Predicates.alwaysFalse() : IEntitySelector.g.and((entity1) -> { diff --git a/nms-patches/net/minecraft/world/entity/SaddleStorage.patch b/nms-patches/net/minecraft/world/entity/SaddleStorage.patch index 5e0a2003a..7f7468574 100644 --- a/nms-patches/net/minecraft/world/entity/SaddleStorage.patch +++ b/nms-patches/net/minecraft/world/entity/SaddleStorage.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/SaddleStorage.java -+++ b/net/minecraft/server/SaddleStorage.java -@@ -35,6 +35,15 @@ +--- a/net/minecraft/world/entity/SaddleStorage.java ++++ b/net/minecraft/world/entity/SaddleStorage.java +@@ -38,6 +38,15 @@ } } diff --git a/nms-patches/net/minecraft/world/entity/ai/attributes/AttributeRanged.patch b/nms-patches/net/minecraft/world/entity/ai/attributes/AttributeRanged.patch index 98be834de..e513acad6 100644 --- a/nms-patches/net/minecraft/world/entity/ai/attributes/AttributeRanged.patch +++ b/nms-patches/net/minecraft/world/entity/ai/attributes/AttributeRanged.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/AttributeRanged.java -+++ b/net/minecraft/server/AttributeRanged.java -@@ -20,6 +20,8 @@ +--- a/net/minecraft/world/entity/ai/attributes/AttributeRanged.java ++++ b/net/minecraft/world/entity/ai/attributes/AttributeRanged.java +@@ -22,6 +22,8 @@ @Override public double a(double d0) { diff --git a/nms-patches/net/minecraft/world/entity/ai/behavior/BehaviorAttackTargetForget.patch b/nms-patches/net/minecraft/world/entity/ai/behavior/BehaviorAttackTargetForget.patch index 31f7edc9f..9143810ac 100644 --- a/nms-patches/net/minecraft/world/entity/ai/behavior/BehaviorAttackTargetForget.patch +++ b/nms-patches/net/minecraft/world/entity/ai/behavior/BehaviorAttackTargetForget.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/BehaviorAttackTargetForget.java -+++ b/net/minecraft/server/BehaviorAttackTargetForget.java -@@ -4,6 +4,12 @@ - import java.util.Optional; - import java.util.function.Predicate; +--- a/net/minecraft/world/entity/ai/behavior/BehaviorAttackTargetForget.java ++++ b/net/minecraft/world/entity/ai/behavior/BehaviorAttackTargetForget.java +@@ -10,6 +10,12 @@ + import net.minecraft.world.entity.ai.memory.MemoryModuleType; + import net.minecraft.world.entity.ai.memory.MemoryStatus; +// CraftBukkit start +import org.bukkit.craftbukkit.entity.CraftLivingEntity; @@ -13,7 +13,7 @@ public class BehaviorAttackTargetForget extends Behavior { private final Predicate b; -@@ -54,6 +60,17 @@ +@@ -60,6 +66,17 @@ } private void d(E e0) { diff --git a/nms-patches/net/minecraft/world/entity/ai/behavior/BehaviorAttackTargetSet.patch b/nms-patches/net/minecraft/world/entity/ai/behavior/BehaviorAttackTargetSet.patch index 8950ac6f0..c5689ca8a 100644 --- a/nms-patches/net/minecraft/world/entity/ai/behavior/BehaviorAttackTargetSet.patch +++ b/nms-patches/net/minecraft/world/entity/ai/behavior/BehaviorAttackTargetSet.patch @@ -1,10 +1,11 @@ ---- a/net/minecraft/server/BehaviorAttackTargetSet.java -+++ b/net/minecraft/server/BehaviorAttackTargetSet.java -@@ -5,6 +5,12 @@ - import java.util.function.Function; - import java.util.function.Predicate; +--- a/net/minecraft/world/entity/ai/behavior/BehaviorAttackTargetSet.java ++++ b/net/minecraft/world/entity/ai/behavior/BehaviorAttackTargetSet.java +@@ -10,6 +10,13 @@ + import net.minecraft.world.entity.ai.memory.MemoryModuleType; + import net.minecraft.world.entity.ai.memory.MemoryStatus; +// CraftBukkit start ++import net.minecraft.server.level.EntityPlayer; +import org.bukkit.craftbukkit.entity.CraftLivingEntity; +import org.bukkit.craftbukkit.event.CraftEventFactory; +import org.bukkit.event.entity.EntityTargetEvent; @@ -13,7 +14,7 @@ public class BehaviorAttackTargetSet extends Behavior { private final Predicate b; -@@ -33,13 +39,21 @@ +@@ -38,13 +45,21 @@ } protected void a(WorldServer worldserver, E e0, long i) { diff --git a/nms-patches/net/minecraft/world/entity/ai/behavior/BehaviorCareer.patch b/nms-patches/net/minecraft/world/entity/ai/behavior/BehaviorCareer.patch index 88f8bc27a..fc6da0113 100644 --- a/nms-patches/net/minecraft/world/entity/ai/behavior/BehaviorCareer.patch +++ b/nms-patches/net/minecraft/world/entity/ai/behavior/BehaviorCareer.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/BehaviorCareer.java -+++ b/net/minecraft/server/BehaviorCareer.java -@@ -3,6 +3,12 @@ - import com.google.common.collect.ImmutableMap; - import java.util.Optional; +--- a/net/minecraft/world/entity/ai/behavior/BehaviorCareer.java ++++ b/net/minecraft/world/entity/ai/behavior/BehaviorCareer.java +@@ -13,6 +13,12 @@ + import net.minecraft.world.entity.npc.EntityVillager; + import net.minecraft.world.entity.npc.VillagerProfession; +// CraftBukkit start +import org.bukkit.craftbukkit.entity.CraftVillager; @@ -13,7 +13,7 @@ public class BehaviorCareer extends Behavior { public BehaviorCareer() { -@@ -19,7 +25,7 @@ +@@ -29,7 +35,7 @@ GlobalPos globalpos = (GlobalPos) entityvillager.getBehaviorController().getMemory(MemoryModuleType.POTENTIAL_JOB_SITE).get(); entityvillager.getBehaviorController().removeMemory(MemoryModuleType.POTENTIAL_JOB_SITE); @@ -22,7 +22,7 @@ worldserver.broadcastEntityEffect(entityvillager, (byte) 14); if (entityvillager.getVillagerData().getProfession() == VillagerProfession.NONE) { MinecraftServer minecraftserver = worldserver.getMinecraftServer(); -@@ -31,7 +37,14 @@ +@@ -41,7 +47,14 @@ return villagerprofession.b() == villageplacetype; }).findFirst(); }).ifPresent((villagerprofession) -> { diff --git a/nms-patches/net/minecraft/world/entity/ai/behavior/BehaviorFarm.patch b/nms-patches/net/minecraft/world/entity/ai/behavior/BehaviorFarm.patch index 1e19d663f..dcd65c856 100644 --- a/nms-patches/net/minecraft/world/entity/ai/behavior/BehaviorFarm.patch +++ b/nms-patches/net/minecraft/world/entity/ai/behavior/BehaviorFarm.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BehaviorFarm.java -+++ b/net/minecraft/server/BehaviorFarm.java -@@ -58,8 +58,8 @@ +--- a/net/minecraft/world/entity/ai/behavior/BehaviorFarm.java ++++ b/net/minecraft/world/entity/ai/behavior/BehaviorFarm.java +@@ -78,8 +78,8 @@ protected void a(WorldServer worldserver, EntityVillager entityvillager, long i) { if (i > this.c && this.farmBlock != null) { @@ -11,7 +11,7 @@ } } -@@ -79,7 +79,11 @@ +@@ -99,7 +99,11 @@ Block block1 = worldserver.getType(this.farmBlock.down()).getBlock(); if (block instanceof BlockCrops && ((BlockCrops) block).isRipe(iblockdata)) { @@ -24,7 +24,7 @@ } if (iblockdata.isAir() && block1 instanceof BlockSoil && entityvillager.canPlant()) { -@@ -90,19 +94,28 @@ +@@ -110,19 +114,28 @@ boolean flag = false; if (!itemstack.isEmpty()) { @@ -57,7 +57,7 @@ } if (flag) { -@@ -121,8 +134,8 @@ +@@ -141,8 +154,8 @@ this.farmBlock = this.a(worldserver); if (this.farmBlock != null) { this.c = i + 20L; diff --git a/nms-patches/net/minecraft/world/entity/ai/behavior/BehaviorInteractDoor.patch b/nms-patches/net/minecraft/world/entity/ai/behavior/BehaviorInteractDoor.patch index 7d4df2a0d..a7193e45e 100644 --- a/nms-patches/net/minecraft/world/entity/ai/behavior/BehaviorInteractDoor.patch +++ b/nms-patches/net/minecraft/world/entity/ai/behavior/BehaviorInteractDoor.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BehaviorInteractDoor.java -+++ b/net/minecraft/server/BehaviorInteractDoor.java -@@ -52,6 +52,13 @@ +--- a/net/minecraft/world/entity/ai/behavior/BehaviorInteractDoor.java ++++ b/net/minecraft/world/entity/ai/behavior/BehaviorInteractDoor.java +@@ -66,6 +66,13 @@ BlockDoor blockdoor = (BlockDoor) iblockdata.getBlock(); if (!blockdoor.h(iblockdata)) { @@ -14,7 +14,7 @@ blockdoor.setDoor(worldserver, iblockdata, blockposition, true); } -@@ -65,6 +72,13 @@ +@@ -79,6 +86,13 @@ BlockDoor blockdoor1 = (BlockDoor) iblockdata1.getBlock(); if (!blockdoor1.h(iblockdata1)) { @@ -28,7 +28,7 @@ blockdoor1.setDoor(worldserver, iblockdata1, blockposition1, true); this.c(worldserver, entityliving, blockposition1); } -@@ -113,7 +127,7 @@ +@@ -127,7 +141,7 @@ private static boolean a(WorldServer worldserver, EntityLiving entityliving, BlockPosition blockposition) { BehaviorController behaviorcontroller = entityliving.getBehaviorController(); @@ -37,7 +37,7 @@ return entityliving1.getEntityType() == entityliving.getEntityType(); }).filter((entityliving1) -> { return blockposition.a((IPosition) entityliving1.getPositionVector(), 2.0D); -@@ -155,7 +169,7 @@ +@@ -169,7 +183,7 @@ if (behaviorcontroller.getMemory(MemoryModuleType.DOORS_TO_CLOSE).isPresent()) { ((Set) behaviorcontroller.getMemory(MemoryModuleType.DOORS_TO_CLOSE).get()).add(globalpos); } else { diff --git a/nms-patches/net/minecraft/world/entity/ai/behavior/BehaviorMakeLove.patch b/nms-patches/net/minecraft/world/entity/ai/behavior/BehaviorMakeLove.patch index 935ea5590..8cd6dfda6 100644 --- a/nms-patches/net/minecraft/world/entity/ai/behavior/BehaviorMakeLove.patch +++ b/nms-patches/net/minecraft/world/entity/ai/behavior/BehaviorMakeLove.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BehaviorMakeLove.java -+++ b/net/minecraft/server/BehaviorMakeLove.java -@@ -93,6 +93,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/BehaviorMakeLove.java ++++ b/net/minecraft/world/entity/ai/behavior/BehaviorMakeLove.java +@@ -106,6 +106,11 @@ private Optional b(WorldServer worldserver, EntityVillager entityvillager, EntityVillager entityvillager1) { EntityVillager entityvillager2 = entityvillager.createChild(worldserver, entityvillager1); @@ -12,7 +12,7 @@ if (entityvillager2 == null) { return Optional.empty(); -@@ -101,7 +106,7 @@ +@@ -114,7 +119,7 @@ entityvillager1.setAgeRaw(6000); entityvillager2.setAgeRaw(-24000); entityvillager2.setPositionRotation(entityvillager.locX(), entityvillager.locY(), entityvillager.locZ(), 0.0F, 0.0F); @@ -21,7 +21,7 @@ worldserver.broadcastEntityEffect(entityvillager2, (byte) 12); return Optional.of(entityvillager2); } -@@ -110,6 +115,6 @@ +@@ -123,6 +128,6 @@ private void a(WorldServer worldserver, EntityVillager entityvillager, BlockPosition blockposition) { GlobalPos globalpos = GlobalPos.create(worldserver.getDimensionKey(), blockposition); diff --git a/nms-patches/net/minecraft/world/entity/ai/behavior/BehaviorProfession.patch b/nms-patches/net/minecraft/world/entity/ai/behavior/BehaviorProfession.patch index f183f8356..eecf2cbc8 100644 --- a/nms-patches/net/minecraft/world/entity/ai/behavior/BehaviorProfession.patch +++ b/nms-patches/net/minecraft/world/entity/ai/behavior/BehaviorProfession.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/BehaviorProfession.java -+++ b/net/minecraft/server/BehaviorProfession.java -@@ -2,6 +2,12 @@ - - import com.google.common.collect.ImmutableMap; +--- a/net/minecraft/world/entity/ai/behavior/BehaviorProfession.java ++++ b/net/minecraft/world/entity/ai/behavior/BehaviorProfession.java +@@ -8,6 +8,12 @@ + import net.minecraft.world.entity.npc.VillagerData; + import net.minecraft.world.entity.npc.VillagerProfession; +// CraftBukkit start +import org.bukkit.craftbukkit.entity.CraftVillager; @@ -13,7 +13,7 @@ public class BehaviorProfession extends Behavior { public BehaviorProfession() { -@@ -15,7 +21,14 @@ +@@ -21,7 +27,14 @@ } protected void a(WorldServer worldserver, EntityVillager entityvillager, long i) { diff --git a/nms-patches/net/minecraft/world/entity/ai/behavior/BehaviorUtil.patch b/nms-patches/net/minecraft/world/entity/ai/behavior/BehaviorUtil.patch index d9efdc658..e8601ed1b 100644 --- a/nms-patches/net/minecraft/world/entity/ai/behavior/BehaviorUtil.patch +++ b/nms-patches/net/minecraft/world/entity/ai/behavior/BehaviorUtil.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BehaviorUtil.java -+++ b/net/minecraft/server/BehaviorUtil.java -@@ -38,7 +38,7 @@ +--- a/net/minecraft/world/entity/ai/behavior/BehaviorUtil.java ++++ b/net/minecraft/world/entity/ai/behavior/BehaviorUtil.java +@@ -54,7 +54,7 @@ } public static void a(EntityLiving entityliving, EntityLiving entityliving1) { @@ -9,7 +9,7 @@ } private static void b(EntityLiving entityliving, EntityLiving entityliving1, float f) { -@@ -51,18 +51,19 @@ +@@ -67,18 +67,19 @@ public static void a(EntityLiving entityliving, Entity entity, float f, int i) { MemoryTarget memorytarget = new MemoryTarget(new BehaviorPositionEntity(entity, false), f, i); @@ -33,7 +33,7 @@ double d0 = entityliving.getHeadY() - 0.30000001192092896D; EntityItem entityitem = new EntityItem(entityliving.world, entityliving.locX(), d0, entityliving.locZ(), itemstack); float f = 0.3F; -@@ -71,12 +72,19 @@ +@@ -87,12 +88,19 @@ vec3d1 = vec3d1.d().a(0.30000001192092896D); entityitem.setMot(vec3d1); entityitem.defaultPickupDelay(); diff --git a/nms-patches/net/minecraft/world/entity/ai/behavior/BehaviorWorkComposter.patch b/nms-patches/net/minecraft/world/entity/ai/behavior/BehaviorWorkComposter.patch index e13157e0e..714e9292a 100644 --- a/nms-patches/net/minecraft/world/entity/ai/behavior/BehaviorWorkComposter.patch +++ b/nms-patches/net/minecraft/world/entity/ai/behavior/BehaviorWorkComposter.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BehaviorWorkComposter.java -+++ b/net/minecraft/server/BehaviorWorkComposter.java -@@ -11,7 +11,7 @@ +--- a/net/minecraft/world/entity/ai/behavior/BehaviorWorkComposter.java ++++ b/net/minecraft/world/entity/ai/behavior/BehaviorWorkComposter.java +@@ -24,7 +24,7 @@ public BehaviorWorkComposter() {} @Override @@ -9,7 +9,7 @@ Optional optional = entityvillager.getBehaviorController().getMemory(MemoryModuleType.JOB_SITE); if (optional.isPresent()) { -@@ -30,7 +30,7 @@ +@@ -43,7 +43,7 @@ BlockPosition blockposition = globalpos.getBlockPosition(); if ((Integer) iblockdata.get(BlockComposter.a) == 8) { @@ -18,7 +18,7 @@ } int i = 20; -@@ -55,7 +55,7 @@ +@@ -68,7 +68,7 @@ i -= k1; for (int l1 = 0; l1 < k1; ++l1) { diff --git a/nms-patches/net/minecraft/world/entity/ai/goal/PathfinderGoalBreakDoor.patch b/nms-patches/net/minecraft/world/entity/ai/goal/PathfinderGoalBreakDoor.patch index 062e703fa..723798083 100644 --- a/nms-patches/net/minecraft/world/entity/ai/goal/PathfinderGoalBreakDoor.patch +++ b/nms-patches/net/minecraft/world/entity/ai/goal/PathfinderGoalBreakDoor.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/PathfinderGoalBreakDoor.java -+++ b/net/minecraft/server/PathfinderGoalBreakDoor.java -@@ -66,6 +66,12 @@ +--- a/net/minecraft/world/entity/ai/goal/PathfinderGoalBreakDoor.java ++++ b/net/minecraft/world/entity/ai/goal/PathfinderGoalBreakDoor.java +@@ -71,6 +71,12 @@ } if (this.a == this.f() && this.a(this.entity.world.getDifficulty())) { diff --git a/nms-patches/net/minecraft/world/entity/ai/goal/PathfinderGoalEatTile.patch b/nms-patches/net/minecraft/world/entity/ai/goal/PathfinderGoalEatTile.patch index d6d75318a..1cb7f76af 100644 --- a/nms-patches/net/minecraft/world/entity/ai/goal/PathfinderGoalEatTile.patch +++ b/nms-patches/net/minecraft/world/entity/ai/goal/PathfinderGoalEatTile.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/PathfinderGoalEatTile.java -+++ b/net/minecraft/server/PathfinderGoalEatTile.java -@@ -3,6 +3,10 @@ - import java.util.EnumSet; - import java.util.function.Predicate; +--- a/net/minecraft/world/entity/ai/goal/PathfinderGoalEatTile.java ++++ b/net/minecraft/world/entity/ai/goal/PathfinderGoalEatTile.java +@@ -11,6 +11,10 @@ + import net.minecraft.world.level.block.state.IBlockData; + import net.minecraft.world.level.block.state.predicate.BlockStatePredicate; +// CraftBukkit start +import org.bukkit.craftbukkit.event.CraftEventFactory; @@ -11,7 +11,7 @@ public class PathfinderGoalEatTile extends PathfinderGoal { private static final Predicate a = BlockStatePredicate.a(Blocks.GRASS); -@@ -55,7 +59,8 @@ +@@ -63,7 +67,8 @@ BlockPosition blockposition = this.b.getChunkCoordinates(); if (PathfinderGoalEatTile.a.test(this.c.getType(blockposition))) { @@ -21,7 +21,7 @@ this.c.b(blockposition, false); } -@@ -64,7 +69,8 @@ +@@ -72,7 +77,8 @@ BlockPosition blockposition1 = blockposition.down(); if (this.c.getType(blockposition1).a(Blocks.GRASS_BLOCK)) { diff --git a/nms-patches/net/minecraft/world/entity/ai/goal/PathfinderGoalFollowOwner.patch b/nms-patches/net/minecraft/world/entity/ai/goal/PathfinderGoalFollowOwner.patch index 257d1bc3a..d6a3a5c3e 100644 --- a/nms-patches/net/minecraft/world/entity/ai/goal/PathfinderGoalFollowOwner.patch +++ b/nms-patches/net/minecraft/world/entity/ai/goal/PathfinderGoalFollowOwner.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/PathfinderGoalFollowOwner.java -+++ b/net/minecraft/server/PathfinderGoalFollowOwner.java -@@ -2,6 +2,12 @@ - - import java.util.EnumSet; +--- a/net/minecraft/world/entity/ai/goal/PathfinderGoalFollowOwner.java ++++ b/net/minecraft/world/entity/ai/goal/PathfinderGoalFollowOwner.java +@@ -15,6 +15,12 @@ + import net.minecraft.world.level.pathfinder.PathType; + import net.minecraft.world.level.pathfinder.PathfinderNormal; +// CraftBukkit start +import org.bukkit.Location; @@ -13,7 +13,7 @@ public class PathfinderGoalFollowOwner extends PathfinderGoal { private final EntityTameableAnimal a; -@@ -104,7 +110,18 @@ +@@ -117,7 +123,18 @@ } else if (!this.a(new BlockPosition(i, j, k))) { return false; } else { diff --git a/nms-patches/net/minecraft/world/entity/ai/goal/PathfinderGoalPanic.patch b/nms-patches/net/minecraft/world/entity/ai/goal/PathfinderGoalPanic.patch index 3f8e380e7..5bb265fcb 100644 --- a/nms-patches/net/minecraft/world/entity/ai/goal/PathfinderGoalPanic.patch +++ b/nms-patches/net/minecraft/world/entity/ai/goal/PathfinderGoalPanic.patch @@ -1,6 +1,17 @@ ---- a/net/minecraft/server/PathfinderGoalPanic.java -+++ b/net/minecraft/server/PathfinderGoalPanic.java -@@ -68,6 +68,12 @@ +--- a/net/minecraft/world/entity/ai/goal/PathfinderGoalPanic.java ++++ b/net/minecraft/world/entity/ai/goal/PathfinderGoalPanic.java +@@ -11,6 +11,10 @@ + import net.minecraft.world.level.IBlockAccess; + import net.minecraft.world.phys.Vec3D; + ++// CraftBukkit start ++import net.minecraft.world.entity.EntityLiving; ++// CraftBukkit end ++ + public class PathfinderGoalPanic extends PathfinderGoal { + + protected final EntityCreature a; +@@ -76,6 +80,12 @@ @Override public boolean b() { diff --git a/nms-patches/net/minecraft/world/entity/ai/goal/PathfinderGoalRemoveBlock.patch b/nms-patches/net/minecraft/world/entity/ai/goal/PathfinderGoalRemoveBlock.patch index c9c97266e..238ac6b18 100644 --- a/nms-patches/net/minecraft/world/entity/ai/goal/PathfinderGoalRemoveBlock.patch +++ b/nms-patches/net/minecraft/world/entity/ai/goal/PathfinderGoalRemoveBlock.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/PathfinderGoalRemoveBlock.java -+++ b/net/minecraft/server/PathfinderGoalRemoveBlock.java -@@ -3,6 +3,11 @@ - import java.util.Random; - import javax.annotation.Nullable; +--- a/net/minecraft/world/entity/ai/goal/PathfinderGoalRemoveBlock.java ++++ b/net/minecraft/world/entity/ai/goal/PathfinderGoalRemoveBlock.java +@@ -20,6 +20,11 @@ + import net.minecraft.world.level.chunk.IChunkAccess; + import net.minecraft.world.phys.Vec3D; +// CraftBukkit start +import org.bukkit.craftbukkit.block.CraftBlock; @@ -12,7 +12,7 @@ public class PathfinderGoalRemoveBlock extends PathfinderGoalGotoTarget { private final Block g; -@@ -81,6 +86,14 @@ +@@ -98,6 +103,14 @@ } if (this.i > 60) { diff --git a/nms-patches/net/minecraft/world/entity/ai/goal/PathfinderGoalSit.patch b/nms-patches/net/minecraft/world/entity/ai/goal/PathfinderGoalSit.patch index 047feacc8..8b9122470 100644 --- a/nms-patches/net/minecraft/world/entity/ai/goal/PathfinderGoalSit.patch +++ b/nms-patches/net/minecraft/world/entity/ai/goal/PathfinderGoalSit.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/PathfinderGoalSit.java -+++ b/net/minecraft/server/PathfinderGoalSit.java -@@ -19,7 +19,7 @@ +--- a/net/minecraft/world/entity/ai/goal/PathfinderGoalSit.java ++++ b/net/minecraft/world/entity/ai/goal/PathfinderGoalSit.java +@@ -22,7 +22,7 @@ @Override public boolean a() { if (!this.entity.isTamed()) { diff --git a/nms-patches/net/minecraft/world/entity/ai/goal/PathfinderGoalTame.patch b/nms-patches/net/minecraft/world/entity/ai/goal/PathfinderGoalTame.patch index e7d57703b..90e4cc423 100644 --- a/nms-patches/net/minecraft/world/entity/ai/goal/PathfinderGoalTame.patch +++ b/nms-patches/net/minecraft/world/entity/ai/goal/PathfinderGoalTame.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/PathfinderGoalTame.java -+++ b/net/minecraft/server/PathfinderGoalTame.java -@@ -57,7 +57,8 @@ +--- a/net/minecraft/world/entity/ai/goal/PathfinderGoalTame.java ++++ b/net/minecraft/world/entity/ai/goal/PathfinderGoalTame.java +@@ -62,7 +62,8 @@ int i = this.entity.getTemper(); int j = this.entity.getMaxDomestication(); diff --git a/nms-patches/net/minecraft/world/entity/ai/goal/PathfinderGoalTempt.patch b/nms-patches/net/minecraft/world/entity/ai/goal/PathfinderGoalTempt.patch index 475a5030e..649ab5abb 100644 --- a/nms-patches/net/minecraft/world/entity/ai/goal/PathfinderGoalTempt.patch +++ b/nms-patches/net/minecraft/world/entity/ai/goal/PathfinderGoalTempt.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/PathfinderGoalTempt.java -+++ b/net/minecraft/server/PathfinderGoalTempt.java -@@ -2,6 +2,13 @@ - - import java.util.EnumSet; +--- a/net/minecraft/world/entity/ai/goal/PathfinderGoalTempt.java ++++ b/net/minecraft/world/entity/ai/goal/PathfinderGoalTempt.java +@@ -11,6 +11,13 @@ + import net.minecraft.world.item.ItemStack; + import net.minecraft.world.item.crafting.RecipeItemStack; +// CraftBukkit start +import org.bukkit.craftbukkit.entity.CraftLivingEntity; @@ -14,7 +14,7 @@ public class PathfinderGoalTempt extends PathfinderGoal { private static final PathfinderTargetCondition c = (new PathfinderTargetCondition()).a(10.0D).a().b().d().c(); -@@ -12,7 +19,7 @@ +@@ -21,7 +28,7 @@ private double g; private double h; private double i; @@ -23,7 +23,7 @@ private int j; private boolean k; private final RecipeItemStack l; -@@ -40,7 +47,17 @@ +@@ -49,7 +56,17 @@ return false; } else { this.target = this.a.world.a(PathfinderGoalTempt.c, (EntityLiving) this.a); diff --git a/nms-patches/net/minecraft/world/entity/ai/goal/target/PathfinderGoalDefendVillage.patch b/nms-patches/net/minecraft/world/entity/ai/goal/target/PathfinderGoalDefendVillage.patch index e27bce567..e3745bc56 100644 --- a/nms-patches/net/minecraft/world/entity/ai/goal/target/PathfinderGoalDefendVillage.patch +++ b/nms-patches/net/minecraft/world/entity/ai/goal/target/PathfinderGoalDefendVillage.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/PathfinderGoalDefendVillage.java -+++ b/net/minecraft/server/PathfinderGoalDefendVillage.java -@@ -49,7 +49,7 @@ +--- a/net/minecraft/world/entity/ai/goal/target/PathfinderGoalDefendVillage.java ++++ b/net/minecraft/world/entity/ai/goal/target/PathfinderGoalDefendVillage.java +@@ -56,7 +56,7 @@ @Override public void c() { diff --git a/nms-patches/net/minecraft/world/entity/ai/goal/target/PathfinderGoalHurtByTarget.patch b/nms-patches/net/minecraft/world/entity/ai/goal/target/PathfinderGoalHurtByTarget.patch index 097e86ac9..fd8d35117 100644 --- a/nms-patches/net/minecraft/world/entity/ai/goal/target/PathfinderGoalHurtByTarget.patch +++ b/nms-patches/net/minecraft/world/entity/ai/goal/target/PathfinderGoalHurtByTarget.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/PathfinderGoalHurtByTarget.java -+++ b/net/minecraft/server/PathfinderGoalHurtByTarget.java -@@ -53,7 +53,7 @@ +--- a/net/minecraft/world/entity/ai/goal/target/PathfinderGoalHurtByTarget.java ++++ b/net/minecraft/world/entity/ai/goal/target/PathfinderGoalHurtByTarget.java +@@ -62,7 +62,7 @@ @Override public void c() { @@ -9,7 +9,7 @@ this.g = this.e.getGoalTarget(); this.c = this.e.da(); this.h = 300; -@@ -100,6 +100,6 @@ +@@ -109,6 +109,6 @@ } protected void a(EntityInsentient entityinsentient, EntityLiving entityliving) { diff --git a/nms-patches/net/minecraft/world/entity/ai/goal/target/PathfinderGoalNearestAttackableTarget.patch b/nms-patches/net/minecraft/world/entity/ai/goal/target/PathfinderGoalNearestAttackableTarget.patch index 2ef0b8eee..b16ca00c1 100644 --- a/nms-patches/net/minecraft/world/entity/ai/goal/target/PathfinderGoalNearestAttackableTarget.patch +++ b/nms-patches/net/minecraft/world/entity/ai/goal/target/PathfinderGoalNearestAttackableTarget.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/PathfinderGoalNearestAttackableTarget.java -+++ b/net/minecraft/server/PathfinderGoalNearestAttackableTarget.java -@@ -52,7 +52,7 @@ +--- a/net/minecraft/world/entity/ai/goal/target/PathfinderGoalNearestAttackableTarget.java ++++ b/net/minecraft/world/entity/ai/goal/target/PathfinderGoalNearestAttackableTarget.java +@@ -59,7 +59,7 @@ @Override public void c() { diff --git a/nms-patches/net/minecraft/world/entity/ai/goal/target/PathfinderGoalOwnerHurtByTarget.patch b/nms-patches/net/minecraft/world/entity/ai/goal/target/PathfinderGoalOwnerHurtByTarget.patch index 3190ada96..6376cea8a 100644 --- a/nms-patches/net/minecraft/world/entity/ai/goal/target/PathfinderGoalOwnerHurtByTarget.patch +++ b/nms-patches/net/minecraft/world/entity/ai/goal/target/PathfinderGoalOwnerHurtByTarget.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/PathfinderGoalOwnerHurtByTarget.java -+++ b/net/minecraft/server/PathfinderGoalOwnerHurtByTarget.java -@@ -34,7 +34,7 @@ +--- a/net/minecraft/world/entity/ai/goal/target/PathfinderGoalOwnerHurtByTarget.java ++++ b/net/minecraft/world/entity/ai/goal/target/PathfinderGoalOwnerHurtByTarget.java +@@ -38,7 +38,7 @@ @Override public void c() { diff --git a/nms-patches/net/minecraft/world/entity/ai/goal/target/PathfinderGoalOwnerHurtTarget.patch b/nms-patches/net/minecraft/world/entity/ai/goal/target/PathfinderGoalOwnerHurtTarget.patch index 8da1a8c20..039eba83b 100644 --- a/nms-patches/net/minecraft/world/entity/ai/goal/target/PathfinderGoalOwnerHurtTarget.patch +++ b/nms-patches/net/minecraft/world/entity/ai/goal/target/PathfinderGoalOwnerHurtTarget.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/PathfinderGoalOwnerHurtTarget.java -+++ b/net/minecraft/server/PathfinderGoalOwnerHurtTarget.java -@@ -34,7 +34,7 @@ +--- a/net/minecraft/world/entity/ai/goal/target/PathfinderGoalOwnerHurtTarget.java ++++ b/net/minecraft/world/entity/ai/goal/target/PathfinderGoalOwnerHurtTarget.java +@@ -38,7 +38,7 @@ @Override public void c() { diff --git a/nms-patches/net/minecraft/world/entity/ai/goal/target/PathfinderGoalTarget.patch b/nms-patches/net/minecraft/world/entity/ai/goal/target/PathfinderGoalTarget.patch index 69f8439ab..6453b6cf9 100644 --- a/nms-patches/net/minecraft/world/entity/ai/goal/target/PathfinderGoalTarget.patch +++ b/nms-patches/net/minecraft/world/entity/ai/goal/target/PathfinderGoalTarget.patch @@ -1,15 +1,15 @@ ---- a/net/minecraft/server/PathfinderGoalTarget.java -+++ b/net/minecraft/server/PathfinderGoalTarget.java -@@ -2,6 +2,8 @@ - - import javax.annotation.Nullable; +--- a/net/minecraft/world/entity/ai/goal/target/PathfinderGoalTarget.java ++++ b/net/minecraft/world/entity/ai/goal/target/PathfinderGoalTarget.java +@@ -13,6 +13,8 @@ + import net.minecraft.world.level.pathfinder.PathPoint; + import net.minecraft.world.scores.ScoreboardTeamBase; +import org.bukkit.event.entity.EntityTargetEvent; // CraftBukkit + public abstract class PathfinderGoalTarget extends PathfinderGoal { protected final EntityInsentient e; -@@ -59,7 +61,7 @@ +@@ -70,7 +72,7 @@ if (entityliving instanceof EntityHuman && ((EntityHuman) entityliving).abilities.isInvulnerable) { return false; } else { @@ -18,7 +18,7 @@ return true; } } -@@ -80,7 +82,7 @@ +@@ -91,7 +93,7 @@ @Override public void d() { diff --git a/nms-patches/net/minecraft/world/entity/ai/village/VillageSiege.patch b/nms-patches/net/minecraft/world/entity/ai/village/VillageSiege.patch index 7c6f8e201..56b6b9b8b 100644 --- a/nms-patches/net/minecraft/world/entity/ai/village/VillageSiege.patch +++ b/nms-patches/net/minecraft/world/entity/ai/village/VillageSiege.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/VillageSiege.java -+++ b/net/minecraft/server/VillageSiege.java -@@ -108,7 +108,7 @@ +--- a/net/minecraft/world/entity/ai/village/VillageSiege.java ++++ b/net/minecraft/world/entity/ai/village/VillageSiege.java +@@ -123,7 +123,7 @@ } entityzombie.setPositionRotation(vec3d.x, vec3d.y, vec3d.z, worldserver.random.nextFloat() * 360.0F, 0.0F); diff --git a/nms-patches/net/minecraft/world/entity/ambient/EntityBat.patch b/nms-patches/net/minecraft/world/entity/ambient/EntityBat.patch index 6983e56e8..9652a85cc 100644 --- a/nms-patches/net/minecraft/world/entity/ambient/EntityBat.patch +++ b/nms-patches/net/minecraft/world/entity/ambient/EntityBat.patch @@ -1,15 +1,15 @@ ---- a/net/minecraft/server/EntityBat.java -+++ b/net/minecraft/server/EntityBat.java -@@ -5,6 +5,8 @@ - import java.util.Random; - import javax.annotation.Nullable; +--- a/net/minecraft/world/entity/ambient/EntityBat.java ++++ b/net/minecraft/world/entity/ambient/EntityBat.java +@@ -30,6 +30,8 @@ + import net.minecraft.world.level.block.state.IBlockData; + import net.minecraft.world.phys.Vec3D; +import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit + public class EntityBat extends EntityAmbient { private static final DataWatcherObject b = DataWatcher.a(EntityBat.class, DataWatcherRegistry.a); -@@ -105,16 +107,24 @@ +@@ -130,16 +132,24 @@ } if (this.world.a(EntityBat.c, (EntityLiving) this) != null) { @@ -39,7 +39,7 @@ } } else { if (this.d != null && (!this.world.isEmpty(this.d) || this.d.getY() < 1)) { -@@ -138,7 +148,11 @@ +@@ -163,7 +173,11 @@ this.aT = 0.5F; this.yaw += f1; if (this.random.nextInt(100) == 0 && this.world.getType(blockposition1).isOccluding(this.world, blockposition1)) { @@ -52,7 +52,7 @@ } } -@@ -168,7 +182,11 @@ +@@ -193,7 +207,11 @@ return false; } else { if (!this.world.isClientSide && this.isAsleep()) { diff --git a/nms-patches/net/minecraft/world/entity/animal/EntityAnimal.patch b/nms-patches/net/minecraft/world/entity/animal/EntityAnimal.patch index 83652a239..420e983ac 100644 --- a/nms-patches/net/minecraft/world/entity/animal/EntityAnimal.patch +++ b/nms-patches/net/minecraft/world/entity/animal/EntityAnimal.patch @@ -1,10 +1,11 @@ ---- a/net/minecraft/server/EntityAnimal.java -+++ b/net/minecraft/server/EntityAnimal.java -@@ -4,10 +4,16 @@ - import java.util.UUID; - import javax.annotation.Nullable; +--- a/net/minecraft/world/entity/animal/EntityAnimal.java ++++ b/net/minecraft/world/entity/animal/EntityAnimal.java +@@ -27,10 +27,17 @@ + import net.minecraft.world.level.block.Blocks; + import net.minecraft.world.level.pathfinder.PathType; +// CraftBukkit start ++import net.minecraft.world.entity.EntityTameableAnimal; +import org.bukkit.craftbukkit.event.CraftEventFactory; +import org.bukkit.event.entity.EntityEnterLoveModeEvent; +// CraftBukkit end @@ -17,7 +18,7 @@ protected EntityAnimal(EntityTypes entitytypes, World world) { super(entitytypes, world); -@@ -44,6 +50,9 @@ +@@ -67,6 +74,9 @@ } @@ -27,7 +28,7 @@ @Override public boolean damageEntity(DamageSource damagesource, float f) { if (this.isInvulnerable(damagesource)) { -@@ -53,6 +62,7 @@ +@@ -76,6 +86,7 @@ return super.damageEntity(damagesource, f); } } @@ -35,7 +36,7 @@ @Override public float a(BlockPosition blockposition, IWorldReader iworldreader) { -@@ -143,10 +153,17 @@ +@@ -166,10 +177,17 @@ } public void g(@Nullable EntityHuman entityhuman) { @@ -54,7 +55,7 @@ this.world.broadcastEntityEffect(this, (byte) 18); } -@@ -186,11 +203,24 @@ +@@ -209,11 +227,24 @@ EntityAgeable entityageable = this.createChild(worldserver, entityanimal); if (entityageable != null) { @@ -79,7 +80,7 @@ if (entityplayer != null) { entityplayer.a(StatisticList.ANIMALS_BRED); -@@ -203,10 +233,14 @@ +@@ -226,10 +257,14 @@ entityanimal.resetLove(); entityageable.setBaby(true); entityageable.setPositionRotation(this.locX(), this.locY(), this.locZ(), 0.0F, 0.0F); diff --git a/nms-patches/net/minecraft/world/entity/animal/EntityBee.patch b/nms-patches/net/minecraft/world/entity/animal/EntityBee.patch index 16f797688..bb209df88 100644 --- a/nms-patches/net/minecraft/world/entity/animal/EntityBee.patch +++ b/nms-patches/net/minecraft/world/entity/animal/EntityBee.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityBee.java -+++ b/net/minecraft/server/EntityBee.java -@@ -137,7 +137,7 @@ +--- a/net/minecraft/world/entity/animal/EntityBee.java ++++ b/net/minecraft/world/entity/animal/EntityBee.java +@@ -211,7 +211,7 @@ } if (b0 > 0) { @@ -9,7 +9,7 @@ } } -@@ -512,11 +512,15 @@ +@@ -586,11 +586,15 @@ } else { Entity entity = damagesource.getEntity(); @@ -27,7 +27,7 @@ } } -@@ -537,7 +541,7 @@ +@@ -611,7 +615,7 @@ class d extends EntityBee.a { private d() { @@ -36,7 +36,7 @@ } @Override -@@ -597,7 +601,7 @@ +@@ -671,7 +675,7 @@ class g extends EntityBee.a { private g() { @@ -45,7 +45,7 @@ } @Override -@@ -646,7 +650,7 @@ +@@ -720,7 +724,7 @@ } } @@ -54,7 +54,7 @@ EntityBee.this.world.triggerEffect(2005, blockposition, 0); EntityBee.this.world.setTypeUpdate(blockposition, (IBlockData) iblockdata.set(blockstateinteger, (Integer) iblockdata.get(blockstateinteger) + 1)); EntityBee.this.fi(); -@@ -661,7 +665,7 @@ +@@ -735,7 +739,7 @@ class i extends EntityBee.a { private i() { @@ -63,7 +63,7 @@ } @Override -@@ -725,7 +729,7 @@ +@@ -799,7 +803,7 @@ private int h = 0; k() { @@ -72,7 +72,7 @@ this.a(EnumSet.of(PathfinderGoal.Type.MOVE)); } -@@ -909,7 +913,7 @@ +@@ -983,7 +987,7 @@ private int c; f() { @@ -81,7 +81,7 @@ this.c = EntityBee.this.world.random.nextInt(10); this.a(EnumSet.of(PathfinderGoal.Type.MOVE)); } -@@ -967,7 +971,7 @@ +@@ -1041,7 +1045,7 @@ private int f; e() { @@ -90,7 +90,7 @@ this.c = EntityBee.this.world.random.nextInt(10); this.d = Lists.newArrayList(); this.e = null; -@@ -1187,7 +1191,7 @@ +@@ -1261,7 +1265,7 @@ @Override protected void a(EntityInsentient entityinsentient, EntityLiving entityliving) { if (entityinsentient instanceof EntityBee && this.e.hasLineOfSight(entityliving)) { diff --git a/nms-patches/net/minecraft/world/entity/animal/EntityCat.patch b/nms-patches/net/minecraft/world/entity/animal/EntityCat.patch index c44a0e4da..5d2fb5c3f 100644 --- a/nms-patches/net/minecraft/world/entity/animal/EntityCat.patch +++ b/nms-patches/net/minecraft/world/entity/animal/EntityCat.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityCat.java -+++ b/net/minecraft/server/EntityCat.java -@@ -15,7 +15,7 @@ +--- a/net/minecraft/world/entity/animal/EntityCat.java ++++ b/net/minecraft/world/entity/animal/EntityCat.java +@@ -78,7 +78,7 @@ private static final DataWatcherObject bt = DataWatcher.a(EntityCat.class, DataWatcherRegistry.i); private static final DataWatcherObject bu = DataWatcher.a(EntityCat.class, DataWatcherRegistry.i); private static final DataWatcherObject bv = DataWatcher.a(EntityCat.class, DataWatcherRegistry.b); @@ -9,7 +9,7 @@ hashmap.put(0, new MinecraftKey("textures/entity/cat/tabby.png")); hashmap.put(1, new MinecraftKey("textures/entity/cat/black.png")); hashmap.put(2, new MinecraftKey("textures/entity/cat/red.png")); -@@ -341,7 +341,7 @@ +@@ -404,7 +404,7 @@ } } else if (this.k(itemstack)) { this.a(entityhuman, itemstack); @@ -18,7 +18,7 @@ this.tame(entityhuman); this.setWillSit(true); this.world.broadcastEntityEffect(this, (byte) 7); -@@ -499,7 +499,15 @@ +@@ -562,7 +562,15 @@ while (iterator.hasNext()) { ItemStack itemstack = (ItemStack) iterator.next(); @@ -35,7 +35,7 @@ } } -@@ -529,7 +537,7 @@ +@@ -592,7 +600,7 @@ static class PathfinderGoalTemptChance extends PathfinderGoalTempt { @Nullable @@ -44,7 +44,7 @@ private final EntityCat d; public PathfinderGoalTemptChance(EntityCat entitycat, double d0, RecipeItemStack recipeitemstack, boolean flag) { -@@ -564,9 +572,9 @@ +@@ -627,9 +635,9 @@ private final EntityCat i; public a(EntityCat entitycat, Class oclass, float f, double d0, double d1) { diff --git a/nms-patches/net/minecraft/world/entity/animal/EntityChicken.patch b/nms-patches/net/minecraft/world/entity/animal/EntityChicken.patch index 3f5b53854..5a56e046b 100644 --- a/nms-patches/net/minecraft/world/entity/animal/EntityChicken.patch +++ b/nms-patches/net/minecraft/world/entity/animal/EntityChicken.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityChicken.java -+++ b/net/minecraft/server/EntityChicken.java -@@ -40,6 +40,11 @@ +--- a/net/minecraft/world/entity/animal/EntityChicken.java ++++ b/net/minecraft/world/entity/animal/EntityChicken.java +@@ -74,6 +74,11 @@ @Override public void movementTick() { @@ -12,7 +12,7 @@ super.movementTick(); this.br = this.bo; this.bq = this.bp; -@@ -59,7 +64,9 @@ +@@ -93,7 +98,9 @@ this.bo += this.bs * 2.0F; if (!this.world.isClientSide && this.isAlive() && !this.isBaby() && !this.isChickenJockey() && --this.eggLayTime <= 0) { this.playSound(SoundEffects.ENTITY_CHICKEN_EGG, 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F); diff --git a/nms-patches/net/minecraft/world/entity/animal/EntityCow.patch b/nms-patches/net/minecraft/world/entity/animal/EntityCow.patch index b65637538..872078adb 100644 --- a/nms-patches/net/minecraft/world/entity/animal/EntityCow.patch +++ b/nms-patches/net/minecraft/world/entity/animal/EntityCow.patch @@ -1,7 +1,8 @@ ---- a/net/minecraft/server/EntityCow.java -+++ b/net/minecraft/server/EntityCow.java -@@ -1,5 +1,10 @@ - package net.minecraft.server; +--- a/net/minecraft/world/entity/animal/EntityCow.java ++++ b/net/minecraft/world/entity/animal/EntityCow.java +@@ -30,6 +30,11 @@ + import net.minecraft.world.level.World; + import net.minecraft.world.level.block.state.IBlockData; +// CraftBukkit start +import org.bukkit.craftbukkit.event.CraftEventFactory; @@ -11,7 +12,7 @@ public class EntityCow extends EntityAnimal { public EntityCow(EntityTypes entitytypes, World world) { -@@ -52,8 +57,16 @@ +@@ -82,8 +87,16 @@ ItemStack itemstack = entityhuman.b(enumhand); if (itemstack.getItem() == Items.BUCKET && !this.isBaby()) { diff --git a/nms-patches/net/minecraft/world/entity/animal/EntityDolphin.patch b/nms-patches/net/minecraft/world/entity/animal/EntityDolphin.patch index 5d27eed5c..dfe01360f 100644 --- a/nms-patches/net/minecraft/world/entity/animal/EntityDolphin.patch +++ b/nms-patches/net/minecraft/world/entity/animal/EntityDolphin.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityDolphin.java -+++ b/net/minecraft/server/EntityDolphin.java -@@ -109,7 +109,7 @@ +--- a/net/minecraft/world/entity/animal/EntityDolphin.java ++++ b/net/minecraft/world/entity/animal/EntityDolphin.java +@@ -173,7 +173,7 @@ this.goalSelector.a(8, new EntityDolphin.d()); this.goalSelector.a(8, new PathfinderGoalFollowBoat(this)); this.goalSelector.a(9, new PathfinderGoalAvoidTarget<>(this, EntityGuardian.class, 8.0F, 1.0D, 1.0D)); @@ -9,7 +9,7 @@ } public static AttributeProvider.Builder eM() { -@@ -176,6 +176,12 @@ +@@ -240,6 +240,12 @@ ItemStack itemstack = entityitem.getItemStack(); if (this.canPickup(itemstack)) { @@ -22,7 +22,7 @@ this.a(entityitem); this.setSlot(EnumItemSlot.MAINHAND, itemstack); this.dropChanceHand[EnumItemSlot.MAINHAND.b()] = 2.0F; -@@ -323,7 +329,7 @@ +@@ -387,7 +393,7 @@ @Override public boolean a() { @@ -31,7 +31,7 @@ } @Override -@@ -432,7 +438,7 @@ +@@ -496,7 +502,7 @@ @Override public void c() { @@ -40,7 +40,7 @@ } @Override -@@ -451,7 +457,7 @@ +@@ -515,7 +521,7 @@ } if (this.c.isSwimming() && this.c.world.random.nextInt(6) == 0) { diff --git a/nms-patches/net/minecraft/world/entity/animal/EntityFish.patch b/nms-patches/net/minecraft/world/entity/animal/EntityFish.patch index bd9ca4850..42a81048f 100644 --- a/nms-patches/net/minecraft/world/entity/animal/EntityFish.patch +++ b/nms-patches/net/minecraft/world/entity/animal/EntityFish.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityFish.java -+++ b/net/minecraft/server/EntityFish.java -@@ -32,7 +32,7 @@ +--- a/net/minecraft/world/entity/animal/EntityFish.java ++++ b/net/minecraft/world/entity/animal/EntityFish.java +@@ -70,7 +70,7 @@ @Override public boolean isTypeNotPersistent(double d0) { @@ -9,7 +9,7 @@ } @Override -@@ -52,6 +52,7 @@ +@@ -90,6 +90,7 @@ public void setFromBucket(boolean flag) { this.datawatcher.set(EntityFish.FROM_BUCKET, flag); diff --git a/nms-patches/net/minecraft/world/entity/animal/EntityFox.patch b/nms-patches/net/minecraft/world/entity/animal/EntityFox.patch index 63a201962..b3d471346 100644 --- a/nms-patches/net/minecraft/world/entity/animal/EntityFox.patch +++ b/nms-patches/net/minecraft/world/entity/animal/EntityFox.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityFox.java -+++ b/net/minecraft/server/EntityFox.java -@@ -264,8 +264,8 @@ +--- a/net/minecraft/world/entity/animal/EntityFox.java ++++ b/net/minecraft/world/entity/animal/EntityFox.java +@@ -334,8 +334,8 @@ private List fa() { List list = Lists.newArrayList(); @@ -11,7 +11,7 @@ return list; } -@@ -401,7 +401,8 @@ +@@ -471,7 +471,8 @@ protected void b(EntityItem entityitem) { ItemStack itemstack = entityitem.getItemStack(); @@ -21,7 +21,7 @@ int i = itemstack.getCount(); if (i > 1) { -@@ -923,6 +924,11 @@ +@@ -993,6 +994,11 @@ int i = (Integer) iblockdata.get(BlockSweetBerryBush.a); iblockdata.set(BlockSweetBerryBush.a, 1); @@ -33,7 +33,7 @@ int j = 1 + EntityFox.this.world.random.nextInt(2) + (i == 3 ? 1 : 0); ItemStack itemstack = EntityFox.this.getEquipment(EnumItemSlot.MAINHAND); -@@ -962,7 +968,7 @@ +@@ -1032,7 +1038,7 @@ private int f; public r() { @@ -42,7 +42,7 @@ this.a(EnumSet.of(PathfinderGoal.Type.MOVE, PathfinderGoal.Type.LOOK)); } -@@ -1014,7 +1020,7 @@ +@@ -1084,7 +1090,7 @@ private int c; public t() { @@ -51,7 +51,7 @@ this.c = EntityFox.this.random.nextInt(140); this.a(EnumSet.of(PathfinderGoal.Type.MOVE, PathfinderGoal.Type.LOOK, PathfinderGoal.Type.JUMP)); } -@@ -1125,7 +1131,7 @@ +@@ -1195,7 +1201,7 @@ private EntityLiving k; private int l; @@ -60,7 +60,7 @@ super(EntityFox.this, oclass, 10, flag, flag1, predicate); } -@@ -1205,6 +1211,14 @@ +@@ -1275,6 +1281,14 @@ if (entityplayer1 != null && entityplayer != entityplayer1) { entityfox.b(entityplayer1.getUniqueID()); } @@ -75,7 +75,7 @@ if (entityplayer2 != null) { entityplayer2.a(StatisticList.ANIMALS_BRED); -@@ -1217,10 +1231,14 @@ +@@ -1287,10 +1301,14 @@ this.partner.resetLove(); entityfox.setAgeRaw(-24000); entityfox.setPositionRotation(this.animal.locX(), this.animal.locY(), this.animal.locZ(), 0.0F, 0.0F); diff --git a/nms-patches/net/minecraft/world/entity/animal/EntityIronGolem.patch b/nms-patches/net/minecraft/world/entity/animal/EntityIronGolem.patch index d8e31ccac..81e54c4d9 100644 --- a/nms-patches/net/minecraft/world/entity/animal/EntityIronGolem.patch +++ b/nms-patches/net/minecraft/world/entity/animal/EntityIronGolem.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityIronGolem.java -+++ b/net/minecraft/server/EntityIronGolem.java -@@ -58,7 +58,7 @@ +--- a/net/minecraft/world/entity/animal/EntityIronGolem.java ++++ b/net/minecraft/world/entity/animal/EntityIronGolem.java +@@ -104,7 +104,7 @@ @Override protected void C(Entity entity) { if (entity instanceof IMonster && !(entity instanceof EntityCreeper) && this.getRandom().nextInt(20) == 0) { diff --git a/nms-patches/net/minecraft/world/entity/animal/EntityMushroomCow.patch b/nms-patches/net/minecraft/world/entity/animal/EntityMushroomCow.patch index 01309b8ac..58b572d7e 100644 --- a/nms-patches/net/minecraft/world/entity/animal/EntityMushroomCow.patch +++ b/nms-patches/net/minecraft/world/entity/animal/EntityMushroomCow.patch @@ -1,7 +1,7 @@ ---- a/net/minecraft/server/EntityMushroomCow.java -+++ b/net/minecraft/server/EntityMushroomCow.java -@@ -5,6 +5,11 @@ - import java.util.UUID; +--- a/net/minecraft/world/entity/animal/EntityMushroomCow.java ++++ b/net/minecraft/world/entity/animal/EntityMushroomCow.java +@@ -41,6 +41,11 @@ + import net.minecraft.world.level.block.state.IBlockData; import org.apache.commons.lang3.tuple.Pair; +// CraftBukkit start @@ -12,7 +12,7 @@ public class EntityMushroomCow extends EntityCow implements IShearable { private static final DataWatcherObject bo = DataWatcher.a(EntityMushroomCow.class, DataWatcherRegistry.d); -@@ -75,6 +80,11 @@ +@@ -111,6 +116,11 @@ this.playSound(soundeffect, 1.0F, 1.0F); return EnumInteractionResult.a(this.world.isClientSide); } else if (itemstack.getItem() == Items.SHEARS && this.canShear()) { @@ -24,7 +24,7 @@ this.shear(SoundCategory.PLAYERS); if (!this.world.isClientSide) { itemstack.damage(1, entityhuman, (entityhuman1) -> { -@@ -121,7 +131,7 @@ +@@ -157,7 +167,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); @@ -33,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 +147,14 @@ +@@ -173,7 +183,14 @@ } entitycow.setInvulnerable(this.isInvulnerable()); diff --git a/nms-patches/net/minecraft/world/entity/animal/EntityOcelot.patch b/nms-patches/net/minecraft/world/entity/animal/EntityOcelot.patch index 959492a64..9a12983df 100644 --- a/nms-patches/net/minecraft/world/entity/animal/EntityOcelot.patch +++ b/nms-patches/net/minecraft/world/entity/animal/EntityOcelot.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityOcelot.java -+++ b/net/minecraft/server/EntityOcelot.java -@@ -81,7 +81,7 @@ +--- a/net/minecraft/world/entity/animal/EntityOcelot.java ++++ b/net/minecraft/world/entity/animal/EntityOcelot.java +@@ -128,7 +128,7 @@ @Override public boolean isTypeNotPersistent(double d0) { @@ -9,7 +9,7 @@ } public static AttributeProvider.Builder eK() { -@@ -135,7 +135,8 @@ +@@ -182,7 +182,8 @@ if ((this.br == null || this.br.h()) && !this.isTrusting() && this.k(itemstack) && entityhuman.h((Entity) this) < 9.0D) { this.a(entityhuman, itemstack); if (!this.world.isClientSide) { @@ -19,7 +19,7 @@ this.setTrusting(true); this.u(true); this.world.broadcastEntityEffect(this, (byte) 41); -@@ -243,9 +244,9 @@ +@@ -290,9 +291,9 @@ private final EntityOcelot i; public a(EntityOcelot entityocelot, Class oclass, float f, double d0, double d1) { diff --git a/nms-patches/net/minecraft/world/entity/animal/EntityPanda.patch b/nms-patches/net/minecraft/world/entity/animal/EntityPanda.patch index 66dda224b..be5ca253a 100644 --- a/nms-patches/net/minecraft/world/entity/animal/EntityPanda.patch +++ b/nms-patches/net/minecraft/world/entity/animal/EntityPanda.patch @@ -1,15 +1,15 @@ ---- a/net/minecraft/server/EntityPanda.java -+++ b/net/minecraft/server/EntityPanda.java -@@ -9,6 +9,8 @@ - import java.util.function.Predicate; - import javax.annotation.Nullable; +--- a/net/minecraft/world/entity/animal/EntityPanda.java ++++ b/net/minecraft/world/entity/animal/EntityPanda.java +@@ -64,6 +64,8 @@ + import net.minecraft.world.level.block.state.IBlockData; + import net.minecraft.world.phys.Vec3D; +import org.bukkit.event.entity.EntityTargetEvent; // CraftBukkit + public class EntityPanda extends EntityAnimal { private static final DataWatcherObject bp = DataWatcher.a(EntityPanda.class, DataWatcherRegistry.b); -@@ -445,7 +447,7 @@ +@@ -500,7 +502,7 @@ @Override protected void b(EntityItem entityitem) { @@ -18,7 +18,7 @@ this.a(entityitem); ItemStack itemstack = entityitem.getItemStack(); -@@ -666,7 +668,7 @@ +@@ -721,7 +723,7 @@ @Override protected void a(EntityInsentient entityinsentient, EntityLiving entityliving) { if (entityinsentient instanceof EntityPanda && ((EntityPanda) entityinsentient).isAggressive()) { @@ -27,7 +27,7 @@ } } -@@ -770,9 +772,9 @@ +@@ -825,9 +827,9 @@ private final EntityPanda i; public c(EntityPanda entitypanda, Class oclass, float f, double d0, double d1) { diff --git a/nms-patches/net/minecraft/world/entity/animal/EntityParrot.patch b/nms-patches/net/minecraft/world/entity/animal/EntityParrot.patch index cdd56d662..f23b6af94 100644 --- a/nms-patches/net/minecraft/world/entity/animal/EntityParrot.patch +++ b/nms-patches/net/minecraft/world/entity/animal/EntityParrot.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityParrot.java -+++ b/net/minecraft/server/EntityParrot.java -@@ -20,7 +20,7 @@ +--- a/net/minecraft/world/entity/animal/EntityParrot.java ++++ b/net/minecraft/world/entity/animal/EntityParrot.java +@@ -74,7 +74,7 @@ }; private static final Item bw = Items.COOKIE; private static final Set bx = Sets.newHashSet(new Item[]{Items.WHEAT_SEEDS, Items.MELON_SEEDS, Items.PUMPKIN_SEEDS, Items.BEETROOT_SEEDS}); @@ -9,7 +9,7 @@ hashmap.put(EntityTypes.BLAZE, SoundEffects.ENTITY_PARROT_IMITATE_BLAZE); hashmap.put(EntityTypes.CAVE_SPIDER, SoundEffects.ENTITY_PARROT_IMITATE_SPIDER); hashmap.put(EntityTypes.CREEPER, SoundEffects.ENTITY_PARROT_IMITATE_CREEPER); -@@ -187,7 +187,7 @@ +@@ -241,7 +241,7 @@ } if (!this.world.isClientSide) { @@ -18,7 +18,7 @@ this.tame(entityhuman); this.world.broadcastEntityEffect(this, (byte) 7); } else { -@@ -201,7 +201,7 @@ +@@ -255,7 +255,7 @@ itemstack.subtract(1); } @@ -27,7 +27,7 @@ if (entityhuman.isCreative() || !this.isInvulnerable()) { this.damageEntity(DamageSource.playerAttack(entityhuman), Float.MAX_VALUE); } -@@ -315,7 +315,7 @@ +@@ -369,7 +369,7 @@ @Override public boolean isCollidable() { @@ -36,7 +36,7 @@ } @Override -@@ -330,7 +330,7 @@ +@@ -384,7 +384,7 @@ if (this.isInvulnerable(damagesource)) { return false; } else { diff --git a/nms-patches/net/minecraft/world/entity/animal/EntityPig.patch b/nms-patches/net/minecraft/world/entity/animal/EntityPig.patch index 6081ea393..d2a89e790 100644 --- a/nms-patches/net/minecraft/world/entity/animal/EntityPig.patch +++ b/nms-patches/net/minecraft/world/entity/animal/EntityPig.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/EntityPig.java -+++ b/net/minecraft/server/EntityPig.java -@@ -3,6 +3,10 @@ - import com.google.common.collect.UnmodifiableIterator; - import javax.annotation.Nullable; +--- a/net/minecraft/world/entity/animal/EntityPig.java ++++ b/net/minecraft/world/entity/animal/EntityPig.java +@@ -50,6 +50,10 @@ + import net.minecraft.world.phys.AxisAlignedBB; + import net.minecraft.world.phys.Vec3D; +// CraftBukkit start +import org.bukkit.craftbukkit.event.CraftEventFactory; @@ -11,7 +11,7 @@ public class EntityPig extends EntityAnimal implements ISteerable, ISaddleable { private static final DataWatcherObject bo = DataWatcher.a(EntityPig.class, DataWatcherRegistry.i); -@@ -204,7 +208,13 @@ +@@ -251,7 +255,13 @@ } entitypigzombie.setPersistent(); diff --git a/nms-patches/net/minecraft/world/entity/animal/EntityPufferFish.patch b/nms-patches/net/minecraft/world/entity/animal/EntityPufferFish.patch index 10c8f55b7..57abdca9f 100644 --- a/nms-patches/net/minecraft/world/entity/animal/EntityPufferFish.patch +++ b/nms-patches/net/minecraft/world/entity/animal/EntityPufferFish.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityPufferFish.java -+++ b/net/minecraft/server/EntityPufferFish.java -@@ -114,7 +114,7 @@ +--- a/net/minecraft/world/entity/animal/EntityPufferFish.java ++++ b/net/minecraft/world/entity/animal/EntityPufferFish.java +@@ -136,7 +136,7 @@ int i = this.getPuffState(); if (entityinsentient.damageEntity(DamageSource.mobAttack(this), (float) (1 + i))) { @@ -9,7 +9,7 @@ this.playSound(SoundEffects.ENTITY_PUFFER_FISH_STING, 1.0F, 1.0F); } -@@ -129,7 +129,7 @@ +@@ -151,7 +151,7 @@ ((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.j, 0.0F)); } diff --git a/nms-patches/net/minecraft/world/entity/animal/EntityRabbit.patch b/nms-patches/net/minecraft/world/entity/animal/EntityRabbit.patch index d6441f14e..b3c1d5a0f 100644 --- a/nms-patches/net/minecraft/world/entity/animal/EntityRabbit.patch +++ b/nms-patches/net/minecraft/world/entity/animal/EntityRabbit.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityRabbit.java -+++ b/net/minecraft/server/EntityRabbit.java -@@ -17,8 +17,14 @@ +--- a/net/minecraft/world/entity/animal/EntityRabbit.java ++++ b/net/minecraft/world/entity/animal/EntityRabbit.java +@@ -72,8 +72,14 @@ super(entitytypes, world); this.bi = new EntityRabbit.ControllerJumpRabbit(this); this.moveController = new EntityRabbit.ControllerMoveRabbit(this); @@ -15,7 +15,7 @@ @Override public void initPathfinder() { -@@ -285,7 +291,7 @@ +@@ -340,7 +346,7 @@ if (i == 99) { this.getAttributeInstance(GenericAttributes.ARMOR).setValue(8.0D); this.goalSelector.a(4, new EntityRabbit.PathfinderGoalKillerRabbitMeleeAttack(this)); @@ -24,7 +24,7 @@ this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true)); this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityWolf.class, true)); if (!this.hasCustomName()) { -@@ -401,9 +407,23 @@ +@@ -456,9 +462,23 @@ Integer integer = (Integer) iblockdata.get(BlockCarrots.AGE); if (integer == 0) { diff --git a/nms-patches/net/minecraft/world/entity/animal/EntitySheep.patch b/nms-patches/net/minecraft/world/entity/animal/EntitySheep.patch index 7d5a18fbd..bf5167deb 100644 --- a/nms-patches/net/minecraft/world/entity/animal/EntitySheep.patch +++ b/nms-patches/net/minecraft/world/entity/animal/EntitySheep.patch @@ -1,10 +1,12 @@ ---- a/net/minecraft/server/EntitySheep.java -+++ b/net/minecraft/server/EntitySheep.java -@@ -8,10 +8,16 @@ - import java.util.stream.Collectors; - import javax.annotation.Nullable; +--- a/net/minecraft/world/entity/animal/EntitySheep.java ++++ b/net/minecraft/world/entity/animal/EntitySheep.java +@@ -60,10 +60,18 @@ + import net.minecraft.world.level.block.state.IBlockData; + import net.minecraft.world.level.storage.loot.LootTables; +// CraftBukkit start ++import net.minecraft.world.inventory.InventoryCraftResult; ++import net.minecraft.world.item.Item; +import org.bukkit.craftbukkit.event.CraftEventFactory; +import org.bukkit.event.entity.SheepRegrowWoolEvent; +import org.bukkit.inventory.InventoryView; @@ -18,7 +20,7 @@ enummap.put(EnumColor.WHITE, Blocks.WHITE_WOOL); enummap.put(EnumColor.ORANGE, Blocks.ORANGE_WOOL); enummap.put(EnumColor.MAGENTA, Blocks.MAGENTA_WOOL); -@@ -138,6 +144,11 @@ +@@ -190,6 +198,11 @@ if (itemstack.getItem() == Items.SHEARS) { if (!this.world.isClientSide && this.canShear()) { @@ -30,7 +32,7 @@ this.shear(SoundCategory.PLAYERS); itemstack.damage(1, entityhuman, (entityhuman1) -> { entityhuman1.broadcastItemBreak(enumhand); -@@ -158,7 +169,9 @@ +@@ -210,7 +223,9 @@ int i = 1 + this.random.nextInt(3); for (int j = 0; j < i; ++j) { @@ -40,7 +42,7 @@ if (entityitem != null) { entityitem.setMot(entityitem.getMot().add((double) ((this.random.nextFloat() - this.random.nextFloat()) * 0.1F), (double) (this.random.nextFloat() * 0.05F), (double) ((this.random.nextFloat() - this.random.nextFloat()) * 0.1F))); -@@ -248,6 +261,12 @@ +@@ -300,6 +315,12 @@ @Override public void blockEaten() { @@ -53,7 +55,7 @@ this.setSheared(false); if (this.isBaby()) { this.setAge(60); -@@ -266,7 +285,7 @@ +@@ -318,7 +339,7 @@ EnumColor enumcolor = ((EntitySheep) entityanimal).getColor(); EnumColor enumcolor1 = ((EntitySheep) entityanimal1).getColor(); InventoryCrafting inventorycrafting = a(enumcolor, enumcolor1); @@ -62,7 +64,7 @@ return recipecrafting.a(inventorycrafting); }).map(ItemStack::getItem); -@@ -284,10 +303,18 @@ +@@ -336,10 +357,18 @@ public boolean canUse(EntityHuman entityhuman) { return false; } diff --git a/nms-patches/net/minecraft/world/entity/animal/EntitySnowman.patch b/nms-patches/net/minecraft/world/entity/animal/EntitySnowman.patch index cad2f2154..b5a55af16 100644 --- a/nms-patches/net/minecraft/world/entity/animal/EntitySnowman.patch +++ b/nms-patches/net/minecraft/world/entity/animal/EntitySnowman.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/EntitySnowman.java -+++ b/net/minecraft/server/EntitySnowman.java -@@ -2,6 +2,10 @@ - - import javax.annotation.Nullable; +--- a/net/minecraft/world/entity/animal/EntitySnowman.java ++++ b/net/minecraft/world/entity/animal/EntitySnowman.java +@@ -38,6 +38,10 @@ + import net.minecraft.world.level.block.Blocks; + import net.minecraft.world.level.block.state.IBlockData; +// CraftBukkit start +import org.bukkit.craftbukkit.event.CraftEventFactory; @@ -11,7 +11,7 @@ public class EntitySnowman extends EntityGolem implements IShearable, IRangedEntity { private static final DataWatcherObject b = DataWatcher.a(EntitySnowman.class, DataWatcherRegistry.a); -@@ -60,7 +64,7 @@ +@@ -96,7 +100,7 @@ int k = MathHelper.floor(this.locZ()); if (this.world.getBiome(new BlockPosition(i, 0, k)).getAdjustedTemperature(new BlockPosition(i, j, k)) > 1.0F) { @@ -20,7 +20,7 @@ } if (!this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) { -@@ -76,7 +80,7 @@ +@@ -112,7 +116,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)) { @@ -29,7 +29,7 @@ } } } -@@ -107,6 +111,11 @@ +@@ -143,6 +147,11 @@ ItemStack itemstack = entityhuman.b(enumhand); if (itemstack.getItem() == Items.SHEARS && this.canShear()) { diff --git a/nms-patches/net/minecraft/world/entity/animal/EntityTurtle.patch b/nms-patches/net/minecraft/world/entity/animal/EntityTurtle.patch index 1a6b70b44..dcf9afedc 100644 --- a/nms-patches/net/minecraft/world/entity/animal/EntityTurtle.patch +++ b/nms-patches/net/minecraft/world/entity/animal/EntityTurtle.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityTurtle.java -+++ b/net/minecraft/server/EntityTurtle.java -@@ -252,7 +252,9 @@ +--- a/net/minecraft/world/entity/animal/EntityTurtle.java ++++ b/net/minecraft/world/entity/animal/EntityTurtle.java +@@ -314,7 +314,9 @@ protected void m() { super.m(); if (!this.isBaby() && this.world.getGameRules().getBoolean(GameRules.DO_MOB_LOOT)) { @@ -10,7 +10,7 @@ } } -@@ -279,7 +281,9 @@ +@@ -341,7 +343,9 @@ @Override public void onLightningStrike(WorldServer worldserver, EntityLightning entitylightning) { @@ -20,7 +20,7 @@ } static class g extends NavigationGuardian { -@@ -438,8 +442,12 @@ +@@ -500,8 +504,12 @@ } else if (this.g.bv > 200) { World world = this.g.world; @@ -33,7 +33,7 @@ this.g.setHasEgg(false); this.g.u(false); this.g.setLoveTicks(600); -@@ -519,7 +527,7 @@ +@@ -581,7 +589,7 @@ --this.e; return false; } else { diff --git a/nms-patches/net/minecraft/world/entity/animal/EntityWolf.patch b/nms-patches/net/minecraft/world/entity/animal/EntityWolf.patch index 6ed6ffad3..33445ac29 100644 --- a/nms-patches/net/minecraft/world/entity/animal/EntityWolf.patch +++ b/nms-patches/net/minecraft/world/entity/animal/EntityWolf.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/EntityWolf.java -+++ b/net/minecraft/server/EntityWolf.java -@@ -4,6 +4,11 @@ - import java.util.function.Predicate; - import javax.annotation.Nullable; +--- a/net/minecraft/world/entity/animal/EntityWolf.java ++++ b/net/minecraft/world/entity/animal/EntityWolf.java +@@ -62,6 +62,11 @@ + import net.minecraft.world.level.block.state.IBlockData; + import net.minecraft.world.phys.Vec3D; +// CraftBukkit start +import org.bukkit.craftbukkit.event.CraftEventFactory; @@ -12,7 +12,7 @@ public class EntityWolf extends EntityTameableAnimal implements IEntityAngerable { private static final DataWatcherObject br = DataWatcher.a(EntityWolf.class, DataWatcherRegistry.i); -@@ -43,7 +48,7 @@ +@@ -101,7 +106,7 @@ this.goalSelector.a(10, new PathfinderGoalRandomLookaround(this)); this.targetSelector.a(1, new PathfinderGoalOwnerHurtByTarget(this)); this.targetSelector.a(2, new PathfinderGoalOwnerHurtTarget(this)); @@ -21,7 +21,7 @@ this.targetSelector.a(4, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, 10, true, false, this::a_)); this.targetSelector.a(5, new PathfinderGoalRandomTargetNonTamed<>(this, EntityAnimal.class, false, EntityWolf.bq)); this.targetSelector.a(6, new PathfinderGoalRandomTargetNonTamed<>(this, EntityTurtle.class, false, EntityTurtle.bo)); -@@ -55,6 +60,24 @@ +@@ -113,6 +118,24 @@ return EntityInsentient.p().a(GenericAttributes.MOVEMENT_SPEED, 0.30000001192092896D).a(GenericAttributes.MAX_HEALTH, 8.0D).a(GenericAttributes.ATTACK_DAMAGE, 2.0D); } @@ -46,7 +46,7 @@ @Override protected void initDatawatcher() { super.initDatawatcher(); -@@ -201,7 +224,7 @@ +@@ -259,7 +282,7 @@ } else { Entity entity = damagesource.getEntity(); @@ -55,7 +55,7 @@ if (entity != null && !(entity instanceof EntityHuman) && !(entity instanceof EntityArrow)) { f = (f + 1.0F) / 2.0F; } -@@ -226,7 +249,7 @@ +@@ -284,7 +307,7 @@ super.setTamed(flag); if (flag) { this.getAttributeInstance(GenericAttributes.MAX_HEALTH).setValue(20.0D); @@ -64,7 +64,7 @@ } else { this.getAttributeInstance(GenericAttributes.MAX_HEALTH).setValue(8.0D); } -@@ -250,7 +273,7 @@ +@@ -308,7 +331,7 @@ itemstack.subtract(1); } @@ -73,7 +73,7 @@ return EnumInteractionResult.SUCCESS; } -@@ -261,7 +284,7 @@ +@@ -319,7 +342,7 @@ this.setWillSit(!this.isWillSit()); this.jumping = false; this.navigation.o(); @@ -82,7 +82,7 @@ return EnumInteractionResult.SUCCESS; } -@@ -283,7 +306,8 @@ +@@ -341,7 +364,8 @@ itemstack.subtract(1); } diff --git a/nms-patches/net/minecraft/world/entity/animal/horse/EntityHorseAbstract.patch b/nms-patches/net/minecraft/world/entity/animal/horse/EntityHorseAbstract.patch index ab96211ec..089a1a05b 100644 --- a/nms-patches/net/minecraft/world/entity/animal/horse/EntityHorseAbstract.patch +++ b/nms-patches/net/minecraft/world/entity/animal/horse/EntityHorseAbstract.patch @@ -1,15 +1,15 @@ ---- a/net/minecraft/server/EntityHorseAbstract.java -+++ b/net/minecraft/server/EntityHorseAbstract.java -@@ -7,6 +7,8 @@ - import java.util.function.Predicate; - import javax.annotation.Nullable; +--- a/net/minecraft/world/entity/animal/horse/EntityHorseAbstract.java ++++ b/net/minecraft/world/entity/animal/horse/EntityHorseAbstract.java +@@ -68,6 +68,8 @@ + import net.minecraft.world.phys.AxisAlignedBB; + import net.minecraft.world.phys.Vec3D; +import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason; // CraftBukkit + public abstract class EntityHorseAbstract extends EntityAnimal implements IInventoryListener, IJumpable, ISaddleable { private static final Predicate bw = (entityliving) -> { -@@ -34,6 +36,7 @@ +@@ -95,6 +97,7 @@ private float bK; protected boolean bu = true; protected int bv; @@ -17,7 +17,7 @@ protected EntityHorseAbstract(EntityTypes entitytypes, World world) { super(entitytypes, world); -@@ -218,7 +221,7 @@ +@@ -279,7 +282,7 @@ public void loadChest() { InventorySubcontainer inventorysubcontainer = this.inventoryChest; @@ -26,7 +26,7 @@ if (inventorysubcontainer != null) { inventorysubcontainer.b((IInventoryListener) this); int i = Math.min(inventorysubcontainer.getSize(), this.inventoryChest.getSize()); -@@ -334,7 +337,7 @@ +@@ -395,7 +398,7 @@ } public int getMaxDomestication() { @@ -35,7 +35,7 @@ } @Override -@@ -405,7 +408,7 @@ +@@ -466,7 +469,7 @@ } if (this.getHealth() < this.getMaxHealth() && f > 0.0F) { @@ -44,7 +44,7 @@ flag = true; } -@@ -481,7 +484,7 @@ +@@ -542,7 +545,7 @@ super.movementTick(); if (!this.world.isClientSide && this.isAlive()) { if (this.random.nextInt(900) == 0 && this.deathTicks == 0) { @@ -53,7 +53,7 @@ } if (this.fl()) { -@@ -718,6 +721,7 @@ +@@ -779,6 +782,7 @@ if (this.getOwnerUUID() != null) { nbttagcompound.a("Owner", this.getOwnerUUID()); } @@ -61,7 +61,7 @@ if (!this.inventoryChest.getItem(0).isEmpty()) { nbttagcompound.set("SaddleItem", this.inventoryChest.getItem(0).save(new NBTTagCompound())); -@@ -745,6 +749,11 @@ +@@ -806,6 +810,11 @@ if (uuid != null) { this.setOwnerUUID(uuid); } @@ -73,7 +73,7 @@ if (nbttagcompound.hasKeyOfType("SaddleItem", 10)) { ItemStack itemstack = ItemStack.a(nbttagcompound.getCompound("SaddleItem")); -@@ -796,6 +805,18 @@ +@@ -857,6 +866,18 @@ @Override public void b(int i) { diff --git a/nms-patches/net/minecraft/world/entity/animal/horse/EntityLlamaTrader.patch b/nms-patches/net/minecraft/world/entity/animal/horse/EntityLlamaTrader.patch index 17901f95a..80fcec46d 100644 --- a/nms-patches/net/minecraft/world/entity/animal/horse/EntityLlamaTrader.patch +++ b/nms-patches/net/minecraft/world/entity/animal/horse/EntityLlamaTrader.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityLlamaTrader.java -+++ b/net/minecraft/server/EntityLlamaTrader.java -@@ -127,7 +127,7 @@ +--- a/net/minecraft/world/entity/animal/horse/EntityLlamaTrader.java ++++ b/net/minecraft/world/entity/animal/horse/EntityLlamaTrader.java +@@ -143,7 +143,7 @@ @Override public void c() { diff --git a/nms-patches/net/minecraft/world/entity/animal/horse/PathfinderGoalHorseTrap.patch b/nms-patches/net/minecraft/world/entity/animal/horse/PathfinderGoalHorseTrap.patch index 85c0858fb..d991c6e88 100644 --- a/nms-patches/net/minecraft/world/entity/animal/horse/PathfinderGoalHorseTrap.patch +++ b/nms-patches/net/minecraft/world/entity/animal/horse/PathfinderGoalHorseTrap.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/PathfinderGoalHorseTrap.java -+++ b/net/minecraft/server/PathfinderGoalHorseTrap.java -@@ -25,19 +25,20 @@ +--- a/net/minecraft/world/entity/animal/horse/PathfinderGoalHorseTrap.java ++++ b/net/minecraft/world/entity/animal/horse/PathfinderGoalHorseTrap.java +@@ -40,19 +40,20 @@ entitylightning.teleportAndSync(this.a.locX(), this.a.locY(), this.a.locZ()); entitylightning.setEffect(true); diff --git a/nms-patches/net/minecraft/world/entity/boss/enderdragon/EntityEnderCrystal.patch b/nms-patches/net/minecraft/world/entity/boss/enderdragon/EntityEnderCrystal.patch index a8997bc4e..36322cd68 100644 --- a/nms-patches/net/minecraft/world/entity/boss/enderdragon/EntityEnderCrystal.patch +++ b/nms-patches/net/minecraft/world/entity/boss/enderdragon/EntityEnderCrystal.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/EntityEnderCrystal.java -+++ b/net/minecraft/server/EntityEnderCrystal.java -@@ -3,6 +3,11 @@ - import java.util.Optional; - import javax.annotation.Nullable; +--- a/net/minecraft/world/entity/boss/enderdragon/EntityEnderCrystal.java ++++ b/net/minecraft/world/entity/boss/enderdragon/EntityEnderCrystal.java +@@ -20,6 +20,11 @@ + import net.minecraft.world.level.block.BlockFireAbstract; + import net.minecraft.world.level.dimension.end.EnderDragonBattle; +// CraftBukkit start +import org.bukkit.craftbukkit.event.CraftEventFactory; @@ -12,7 +12,7 @@ public class EntityEnderCrystal extends Entity { private static final DataWatcherObject> c = DataWatcher.a(EntityEnderCrystal.class, DataWatcherRegistry.m); -@@ -38,7 +43,11 @@ +@@ -55,7 +60,11 @@ BlockPosition blockposition = this.getChunkCoordinates(); if (((WorldServer) this.world).getDragonBattle() != null && this.world.getType(blockposition).isAir()) { @@ -25,7 +25,7 @@ } } -@@ -78,9 +87,22 @@ +@@ -95,9 +104,22 @@ return false; } else { if (!this.dead && !this.world.isClientSide) { diff --git a/nms-patches/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.patch b/nms-patches/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.patch index 534f75c06..971b00436 100644 --- a/nms-patches/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.patch +++ b/nms-patches/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.patch @@ -1,10 +1,15 @@ ---- a/net/minecraft/server/EntityEnderDragon.java -+++ b/net/minecraft/server/EntityEnderDragon.java -@@ -7,6 +7,12 @@ +--- a/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.java ++++ b/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.java +@@ -51,6 +51,17 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +// CraftBukkit start ++import net.minecraft.world.item.ItemStack; ++import net.minecraft.world.level.Explosion; ++import net.minecraft.world.level.block.entity.TileEntity; ++import net.minecraft.world.level.storage.loot.LootTableInfo; ++import net.minecraft.world.level.storage.loot.parameters.LootContextParameters; +import org.bukkit.craftbukkit.block.CraftBlock; +import org.bukkit.event.entity.EntityExplodeEvent; +import org.bukkit.event.entity.EntityRegainHealthEvent; @@ -13,7 +18,7 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster { private static final Logger LOGGER = LogManager.getLogger(); -@@ -38,6 +44,7 @@ +@@ -82,6 +93,7 @@ private final PathPoint[] bJ = new PathPoint[24]; private final int[] bK = new int[24]; private final Path bL = new Path(); @@ -21,7 +26,7 @@ public EntityEnderDragon(EntityTypes entitytypes, World world) { super(EntityTypes.ENDER_DRAGON, world); -@@ -175,7 +182,7 @@ +@@ -219,7 +231,7 @@ Vec3D vec3d1 = idragoncontroller.g(); @@ -30,7 +35,7 @@ d0 = vec3d1.x - this.locX(); d1 = vec3d1.y - this.locY(); d2 = vec3d1.z - this.locZ(); -@@ -313,7 +320,14 @@ +@@ -357,7 +369,14 @@ if (this.currentEnderCrystal.dead) { this.currentEnderCrystal = null; } else if (this.ticksLived % 10 == 0 && this.getHealth() < this.getMaxHealth()) { @@ -46,7 +51,7 @@ } } -@@ -388,6 +402,9 @@ +@@ -432,6 +451,9 @@ int j1 = MathHelper.floor(axisalignedbb.maxZ); boolean flag = false; boolean flag1 = false; @@ -56,7 +61,7 @@ for (int k1 = i; k1 <= l; ++k1) { for (int l1 = j; l1 <= i1; ++l1) { -@@ -398,7 +415,11 @@ +@@ -442,7 +464,11 @@ if (!iblockdata.isAir() && iblockdata.getMaterial() != Material.FIRE) { if (this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING) && !TagsBlock.DRAGON_IMMUNE.isTagged(block)) { @@ -69,7 +74,7 @@ } else { flag = true; } -@@ -407,6 +428,51 @@ +@@ -451,6 +477,51 @@ } } diff --git a/nms-patches/net/minecraft/world/entity/boss/enderdragon/phases/DragonControllerManager.patch b/nms-patches/net/minecraft/world/entity/boss/enderdragon/phases/DragonControllerManager.patch index 3ea1dc2c0..934df4683 100644 --- a/nms-patches/net/minecraft/world/entity/boss/enderdragon/phases/DragonControllerManager.patch +++ b/nms-patches/net/minecraft/world/entity/boss/enderdragon/phases/DragonControllerManager.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/DragonControllerManager.java -+++ b/net/minecraft/server/DragonControllerManager.java -@@ -3,6 +3,11 @@ +--- a/net/minecraft/world/entity/boss/enderdragon/phases/DragonControllerManager.java ++++ b/net/minecraft/world/entity/boss/enderdragon/phases/DragonControllerManager.java +@@ -4,6 +4,11 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -12,7 +12,7 @@ public class DragonControllerManager { private static final Logger LOGGER = LogManager.getLogger(); -@@ -21,6 +26,19 @@ +@@ -22,6 +27,19 @@ this.currentDragonController.e(); } @@ -32,7 +32,7 @@ this.currentDragonController = this.b(dragoncontrollerphase); if (!this.enderDragon.world.isClientSide) { this.enderDragon.getDataWatcher().set(EntityEnderDragon.PHASE, dragoncontrollerphase.b()); -@@ -42,6 +60,6 @@ +@@ -43,6 +61,6 @@ this.dragonControllers[i] = dragoncontrollerphase.a(this.enderDragon); } diff --git a/nms-patches/net/minecraft/world/entity/boss/wither/EntityWither.patch b/nms-patches/net/minecraft/world/entity/boss/wither/EntityWither.patch index 5e1db61a8..d1b222dc1 100644 --- a/nms-patches/net/minecraft/world/entity/boss/wither/EntityWither.patch +++ b/nms-patches/net/minecraft/world/entity/boss/wither/EntityWither.patch @@ -1,10 +1,14 @@ ---- a/net/minecraft/server/EntityWither.java -+++ b/net/minecraft/server/EntityWither.java -@@ -6,6 +6,13 @@ - import java.util.function.Predicate; - import javax.annotation.Nullable; +--- a/net/minecraft/world/entity/boss/wither/EntityWither.java ++++ b/net/minecraft/world/entity/boss/wither/EntityWither.java +@@ -52,6 +52,17 @@ + import net.minecraft.world.level.block.state.IBlockData; + import net.minecraft.world.phys.Vec3D; +// CraftBukkit start ++import net.minecraft.network.protocol.game.PacketPlayOutWorldEvent; ++import net.minecraft.server.MinecraftServer; ++import net.minecraft.server.level.WorldServer; ++import net.minecraft.world.level.block.Blocks; +import org.bukkit.craftbukkit.event.CraftEventFactory; +import org.bukkit.event.entity.EntityRegainHealthEvent; +import org.bukkit.event.entity.EntityTargetEvent; @@ -14,7 +18,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity { private static final DataWatcherObject b = DataWatcher.a(EntityWither.class, DataWatcherRegistry.b); -@@ -188,16 +195,40 @@ +@@ -234,16 +245,40 @@ i = this.getInvul() - 1; if (i <= 0) { Explosion.Effect explosion_effect = this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING) ? Explosion.Effect.DESTROY : Explosion.Effect.NONE; @@ -58,7 +62,7 @@ } } else { -@@ -249,9 +280,11 @@ +@@ -295,9 +330,11 @@ if (entityliving != this && entityliving.isAlive() && this.hasLineOfSight(entityliving)) { if (entityliving instanceof EntityHuman) { if (!((EntityHuman) entityliving).abilities.isInvulnerable) { @@ -70,7 +74,7 @@ this.setHeadTarget(i, entityliving.getId()); } break; -@@ -287,6 +320,11 @@ +@@ -333,6 +370,11 @@ IBlockData iblockdata = this.world.getType(blockposition); if (c(iblockdata)) { @@ -82,7 +86,7 @@ flag = this.world.a(blockposition, true, this) || flag; } } -@@ -300,7 +338,7 @@ +@@ -346,7 +388,7 @@ } if (this.ticksLived % 20 == 0) { diff --git a/nms-patches/net/minecraft/world/entity/decoration/EntityArmorStand.patch b/nms-patches/net/minecraft/world/entity/decoration/EntityArmorStand.patch index 4351c5c4e..5dfc25bcc 100644 --- a/nms-patches/net/minecraft/world/entity/decoration/EntityArmorStand.patch +++ b/nms-patches/net/minecraft/world/entity/decoration/EntityArmorStand.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/EntityArmorStand.java -+++ b/net/minecraft/server/EntityArmorStand.java -@@ -5,6 +5,15 @@ - import java.util.function.Predicate; - import javax.annotation.Nullable; +--- a/net/minecraft/world/entity/decoration/EntityArmorStand.java ++++ b/net/minecraft/world/entity/decoration/EntityArmorStand.java +@@ -39,6 +39,15 @@ + import net.minecraft.world.level.material.EnumPistonReaction; + import net.minecraft.world.phys.Vec3D; +// CraftBukkit start +import org.bukkit.inventory.EquipmentSlot; @@ -16,7 +16,7 @@ public class EntityArmorStand extends EntityLiving { private static final Vector3f bj = new Vector3f(0.0F, 0.0F, 0.0F); -@@ -55,6 +64,13 @@ +@@ -89,6 +98,13 @@ this.setPosition(d0, d1, d2); } @@ -30,7 +30,7 @@ @Override public void updateSize() { double d0 = this.locX(); -@@ -110,13 +126,20 @@ +@@ -144,13 +160,20 @@ @Override public void setSlot(EnumItemSlot enumitemslot, ItemStack itemstack) { @@ -53,7 +53,7 @@ this.armorItems.set(enumitemslot.b(), itemstack); } -@@ -383,6 +406,21 @@ +@@ -417,6 +440,21 @@ return false; } else { ItemStack itemstack2; @@ -75,7 +75,7 @@ if (entityhuman.abilities.canInstantlyBuild && itemstack1.isEmpty() && !itemstack.isEmpty()) { itemstack2 = itemstack.cloneItemStack(); -@@ -411,12 +449,22 @@ +@@ -445,12 +483,22 @@ public boolean damageEntity(DamageSource damagesource, float f) { if (!this.world.isClientSide && !this.dead) { if (DamageSource.OUT_OF_WORLD.equals(damagesource)) { @@ -101,7 +101,7 @@ return false; } else if (DamageSource.FIRE.equals(damagesource)) { if (this.isBurning()) { -@@ -441,7 +489,7 @@ +@@ -475,7 +523,7 @@ } else if (damagesource.v()) { this.F(); this.D(); @@ -110,7 +110,7 @@ return flag1; } else { long i = this.world.getTime(); -@@ -452,7 +500,7 @@ +@@ -486,7 +534,7 @@ } else { this.f(damagesource); this.D(); @@ -119,7 +119,7 @@ } return true; -@@ -479,7 +527,7 @@ +@@ -513,7 +561,7 @@ f1 -= f; if (f1 <= 0.5F) { this.g(damagesource); @@ -128,7 +128,7 @@ } else { this.setHealth(f1); } -@@ -487,13 +535,13 @@ +@@ -521,13 +569,13 @@ } private void f(DamageSource damagesource) { @@ -144,7 +144,7 @@ ItemStack itemstack; int i; -@@ -501,7 +549,7 @@ +@@ -535,7 +583,7 @@ for (i = 0; i < this.handItems.size(); ++i) { itemstack = (ItemStack) this.handItems.get(i); if (!itemstack.isEmpty()) { @@ -153,7 +153,7 @@ this.handItems.set(i, ItemStack.b); } } -@@ -509,10 +557,11 @@ +@@ -543,10 +591,11 @@ for (i = 0; i < this.armorItems.size(); ++i) { itemstack = (ItemStack) this.armorItems.get(i); if (!itemstack.isEmpty()) { @@ -166,7 +166,7 @@ } -@@ -613,8 +662,16 @@ +@@ -647,8 +696,16 @@ return this.isSmall(); } diff --git a/nms-patches/net/minecraft/world/entity/decoration/EntityHanging.patch b/nms-patches/net/minecraft/world/entity/decoration/EntityHanging.patch index fdb1b7227..b4fe187b9 100644 --- a/nms-patches/net/minecraft/world/entity/decoration/EntityHanging.patch +++ b/nms-patches/net/minecraft/world/entity/decoration/EntityHanging.patch @@ -1,10 +1,12 @@ ---- a/net/minecraft/server/EntityHanging.java -+++ b/net/minecraft/server/EntityHanging.java -@@ -4,6 +4,12 @@ - import javax.annotation.Nullable; +--- a/net/minecraft/world/entity/decoration/EntityHanging.java ++++ b/net/minecraft/world/entity/decoration/EntityHanging.java +@@ -24,6 +24,14 @@ + import net.minecraft.world.phys.Vec3D; import org.apache.commons.lang3.Validate; +// CraftBukkit start ++import net.minecraft.world.damagesource.EntityDamageSourceIndirect; ++import net.minecraft.world.level.material.Material; +import org.bukkit.entity.Hanging; +import org.bukkit.event.hanging.HangingBreakByEntityEvent; +import org.bukkit.event.hanging.HangingBreakEvent; @@ -13,7 +15,7 @@ public abstract class EntityHanging extends Entity { protected static final Predicate b = (entity) -> { -@@ -37,26 +43,37 @@ +@@ -57,26 +65,37 @@ protected void updateBoundingBox() { if (this.direction != null) { @@ -64,7 +66,7 @@ d8 = 1.0D; } else { d6 = 1.0D; -@@ -65,11 +82,12 @@ +@@ -85,11 +104,12 @@ d6 /= 32.0D; d7 /= 32.0D; d8 /= 32.0D; @@ -79,7 +81,7 @@ return i % 32 == 0 ? 0.5D : 0.0D; } -@@ -83,6 +101,24 @@ +@@ -103,6 +123,24 @@ if (this.e++ == 100) { this.e = 0; if (!this.dead && !this.survives()) { @@ -104,7 +106,7 @@ this.die(); this.a((Entity) null); } -@@ -146,6 +182,22 @@ +@@ -166,6 +204,22 @@ return false; } else { if (!this.dead && !this.world.isClientSide) { @@ -127,7 +129,7 @@ this.die(); this.velocityChanged(); this.a(damagesource.getEntity()); -@@ -158,6 +210,18 @@ +@@ -178,6 +232,18 @@ @Override public void move(EnumMoveType enummovetype, Vec3D vec3d) { if (!this.world.isClientSide && !this.dead && vec3d.g() > 0.0D) { @@ -146,7 +148,7 @@ this.die(); this.a((Entity) null); } -@@ -166,7 +230,7 @@ +@@ -186,7 +252,7 @@ @Override public void i(double d0, double d1, double d2) { diff --git a/nms-patches/net/minecraft/world/entity/decoration/EntityItemFrame.patch b/nms-patches/net/minecraft/world/entity/decoration/EntityItemFrame.patch index 13cff21e3..e299ef2ee 100644 --- a/nms-patches/net/minecraft/world/entity/decoration/EntityItemFrame.patch +++ b/nms-patches/net/minecraft/world/entity/decoration/EntityItemFrame.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityItemFrame.java -+++ b/net/minecraft/server/EntityItemFrame.java -@@ -53,16 +53,27 @@ +--- a/net/minecraft/world/entity/decoration/EntityItemFrame.java ++++ b/net/minecraft/world/entity/decoration/EntityItemFrame.java +@@ -83,16 +83,27 @@ @Override protected void updateBoundingBox() { if (this.direction != null) { @@ -37,7 +37,7 @@ switch (enumdirection_enumaxis) { case X: -@@ -78,9 +89,10 @@ +@@ -108,9 +119,10 @@ d4 /= 32.0D; d5 /= 32.0D; d6 /= 32.0D; @@ -49,7 +49,7 @@ @Override public boolean survives() { -@@ -130,6 +142,11 @@ +@@ -160,6 +172,11 @@ return false; } else if (!damagesource.isExplosion() && !this.getItem().isEmpty()) { if (!this.world.isClientSide) { @@ -61,7 +61,7 @@ this.b(damagesource.getEntity(), false); this.playSound(SoundEffects.ENTITY_ITEM_FRAME_REMOVE_ITEM, 1.0F, 1.0F); } -@@ -217,6 +234,12 @@ +@@ -247,6 +264,12 @@ } public void setItem(ItemStack itemstack, boolean flag) { @@ -74,7 +74,7 @@ if (!itemstack.isEmpty()) { itemstack = itemstack.cloneItemStack(); itemstack.setCount(1); -@@ -224,7 +247,7 @@ +@@ -254,7 +277,7 @@ } this.getDataWatcher().set(EntityItemFrame.ITEM, itemstack); diff --git a/nms-patches/net/minecraft/world/entity/decoration/EntityLeash.patch b/nms-patches/net/minecraft/world/entity/decoration/EntityLeash.patch index a6ef65309..e1e7fb8e1 100644 --- a/nms-patches/net/minecraft/world/entity/decoration/EntityLeash.patch +++ b/nms-patches/net/minecraft/world/entity/decoration/EntityLeash.patch @@ -1,15 +1,20 @@ ---- a/net/minecraft/server/EntityLeash.java -+++ b/net/minecraft/server/EntityLeash.java -@@ -4,6 +4,8 @@ - import java.util.List; - import javax.annotation.Nullable; +--- a/net/minecraft/world/entity/decoration/EntityLeash.java ++++ b/net/minecraft/world/entity/decoration/EntityLeash.java +@@ -23,6 +23,13 @@ + import net.minecraft.world.level.World; + import net.minecraft.world.phys.AxisAlignedBB; -+import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit ++// CraftBukkit start ++import net.minecraft.network.protocol.game.PacketPlayOutAttachEntity; ++import net.minecraft.server.level.EntityPlayer; ++import net.minecraft.server.level.WorldServer; ++import org.bukkit.craftbukkit.event.CraftEventFactory; ++// CraftBukkit end + public class EntityLeash extends EntityHanging { public EntityLeash(EntityTypes entitytypes, World world) { -@@ -29,6 +31,7 @@ +@@ -48,6 +55,7 @@ @Override protected void updateBoundingBox() { this.setPositionRaw((double) this.blockPosition.getX() + 0.5D, (double) this.blockPosition.getY() + 0.5D, (double) this.blockPosition.getZ() + 0.5D); @@ -17,7 +22,7 @@ } @Override -@@ -75,22 +78,42 @@ +@@ -94,22 +102,42 @@ while (iterator.hasNext()) { entityinsentient = (EntityInsentient) iterator.next(); if (entityinsentient.getLeashHolder() == entityhuman) { diff --git a/nms-patches/net/minecraft/world/entity/decoration/EntityPainting.patch b/nms-patches/net/minecraft/world/entity/decoration/EntityPainting.patch index db5b520be..23de005ae 100644 --- a/nms-patches/net/minecraft/world/entity/decoration/EntityPainting.patch +++ b/nms-patches/net/minecraft/world/entity/decoration/EntityPainting.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityPainting.java -+++ b/net/minecraft/server/EntityPainting.java -@@ -11,6 +11,10 @@ +--- a/net/minecraft/world/entity/decoration/EntityPainting.java ++++ b/net/minecraft/world/entity/decoration/EntityPainting.java +@@ -26,6 +26,10 @@ public EntityPainting(EntityTypes entitytypes, World world) { super(entitytypes, world); diff --git a/nms-patches/net/minecraft/world/entity/item/EntityFallingBlock.patch b/nms-patches/net/minecraft/world/entity/item/EntityFallingBlock.patch index 3de850e79..af437d19f 100644 --- a/nms-patches/net/minecraft/world/entity/item/EntityFallingBlock.patch +++ b/nms-patches/net/minecraft/world/entity/item/EntityFallingBlock.patch @@ -1,15 +1,15 @@ ---- a/net/minecraft/server/EntityFallingBlock.java -+++ b/net/minecraft/server/EntityFallingBlock.java -@@ -4,6 +4,8 @@ - import java.util.Iterator; - import java.util.List; +--- a/net/minecraft/world/entity/item/EntityFallingBlock.java ++++ b/net/minecraft/world/entity/item/EntityFallingBlock.java +@@ -43,6 +43,8 @@ + import net.minecraft.world.phys.MovingObjectPositionBlock; + import net.minecraft.world.phys.Vec3D; +import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit + public class EntityFallingBlock extends Entity { private IBlockData block; -@@ -70,7 +72,7 @@ +@@ -109,7 +111,7 @@ if (this.ticksLived++ == 0) { blockposition = this.getChunkCoordinates(); @@ -18,7 +18,7 @@ this.world.a(blockposition, false); } else if (!this.world.isClientSide) { this.die(); -@@ -122,6 +124,11 @@ +@@ -161,6 +163,11 @@ this.block = (IBlockData) this.block.set(BlockProperties.C, true); } @@ -30,7 +30,7 @@ if (this.world.setTypeAndData(blockposition, this.block, 3)) { if (block instanceof BlockFalling) { ((BlockFalling) block).a(this.world, blockposition, this.block, iblockdata, this); -@@ -178,7 +185,9 @@ +@@ -217,7 +224,9 @@ while (iterator.hasNext()) { Entity entity = (Entity) iterator.next(); diff --git a/nms-patches/net/minecraft/world/entity/item/EntityItem.patch b/nms-patches/net/minecraft/world/entity/item/EntityItem.patch index fb3057ad1..2ac6f4bec 100644 --- a/nms-patches/net/minecraft/world/entity/item/EntityItem.patch +++ b/nms-patches/net/minecraft/world/entity/item/EntityItem.patch @@ -1,10 +1,11 @@ ---- a/net/minecraft/server/EntityItem.java -+++ b/net/minecraft/server/EntityItem.java -@@ -6,6 +6,11 @@ - import java.util.UUID; - import javax.annotation.Nullable; +--- a/net/minecraft/world/entity/item/EntityItem.java ++++ b/net/minecraft/world/entity/item/EntityItem.java +@@ -31,6 +31,12 @@ + import net.minecraft.world.level.World; + import net.minecraft.world.phys.Vec3D; +// CraftBukkit start ++import net.minecraft.server.MinecraftServer; +import org.bukkit.event.entity.EntityPickupItemEvent; +import org.bukkit.event.player.PlayerPickupItemEvent; +// CraftBukkit end @@ -12,7 +13,7 @@ public class EntityItem extends Entity { private static final DataWatcherObject ITEM = DataWatcher.a(EntityItem.class, DataWatcherRegistry.g); -@@ -15,6 +20,7 @@ +@@ -40,6 +46,7 @@ private UUID thrower; private UUID owner; public final float b; @@ -20,7 +21,7 @@ public EntityItem(EntityTypes entitytypes, World world) { super(entitytypes, world); -@@ -50,9 +56,12 @@ +@@ -75,9 +82,12 @@ this.die(); } else { super.tick(); @@ -36,7 +37,7 @@ this.lastX = this.locX(); this.lastY = this.locY(); -@@ -108,9 +117,11 @@ +@@ -133,9 +143,11 @@ } } @@ -48,7 +49,7 @@ this.impulse |= this.aK(); if (!this.world.isClientSide) { -@@ -122,6 +133,12 @@ +@@ -147,6 +159,12 @@ } if (!this.world.isClientSide && this.age >= 6000) { @@ -61,7 +62,7 @@ this.die(); } -@@ -197,10 +214,11 @@ +@@ -222,10 +240,11 @@ private static void a(EntityItem entityitem, ItemStack itemstack, ItemStack itemstack1) { ItemStack itemstack2 = a(itemstack, itemstack1, 64); @@ -74,7 +75,7 @@ a(entityitem, itemstack, itemstack1); entityitem.pickupDelay = Math.max(entityitem.pickupDelay, entityitem1.pickupDelay); entityitem.age = Math.min(entityitem.age, entityitem1.age); -@@ -224,6 +242,11 @@ +@@ -249,6 +268,11 @@ } else if (!this.getItemStack().getItem().a(damagesource)) { return false; } else { @@ -86,7 +87,7 @@ this.velocityChanged(); this.f = (int) ((float) this.f - f); if (this.f <= 0) { -@@ -285,6 +308,46 @@ +@@ -310,6 +334,46 @@ Item item = itemstack.getItem(); int i = itemstack.getCount(); @@ -133,7 +134,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 +391,9 @@ +@@ -353,7 +417,9 @@ } public void setItemStack(ItemStack itemstack) { diff --git a/nms-patches/net/minecraft/world/entity/item/EntityTNTPrimed.patch b/nms-patches/net/minecraft/world/entity/item/EntityTNTPrimed.patch index e30d8ca03..395b4f603 100644 --- a/nms-patches/net/minecraft/world/entity/item/EntityTNTPrimed.patch +++ b/nms-patches/net/minecraft/world/entity/item/EntityTNTPrimed.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/EntityTNTPrimed.java -+++ b/net/minecraft/server/EntityTNTPrimed.java -@@ -2,12 +2,16 @@ - - import javax.annotation.Nullable; +--- a/net/minecraft/world/entity/item/EntityTNTPrimed.java ++++ b/net/minecraft/world/entity/item/EntityTNTPrimed.java +@@ -17,12 +17,16 @@ + import net.minecraft.world.level.Explosion; + import net.minecraft.world.level.World; +import org.bukkit.event.entity.ExplosionPrimeEvent; // CraftBukkit + @@ -17,7 +17,7 @@ public EntityTNTPrimed(EntityTypes entitytypes, World world) { super(entitytypes, world); -@@ -57,10 +61,13 @@ +@@ -72,10 +76,13 @@ --this.fuseTicks; if (this.fuseTicks <= 0) { @@ -32,7 +32,7 @@ } else { this.aK(); if (this.world.isClientSide) { -@@ -71,9 +78,16 @@ +@@ -86,9 +93,16 @@ } private void explode() { diff --git a/nms-patches/net/minecraft/world/entity/monster/EntityCaveSpider.patch b/nms-patches/net/minecraft/world/entity/monster/EntityCaveSpider.patch index 5bffc53bb..aef0d4e31 100644 --- a/nms-patches/net/minecraft/world/entity/monster/EntityCaveSpider.patch +++ b/nms-patches/net/minecraft/world/entity/monster/EntityCaveSpider.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityCaveSpider.java -+++ b/net/minecraft/server/EntityCaveSpider.java -@@ -25,7 +25,7 @@ +--- a/net/minecraft/world/entity/monster/EntityCaveSpider.java ++++ b/net/minecraft/world/entity/monster/EntityCaveSpider.java +@@ -41,7 +41,7 @@ } if (b0 > 0) { diff --git a/nms-patches/net/minecraft/world/entity/monster/EntityCreeper.patch b/nms-patches/net/minecraft/world/entity/monster/EntityCreeper.patch index ed6fe58a7..58d67c548 100644 --- a/nms-patches/net/minecraft/world/entity/monster/EntityCreeper.patch +++ b/nms-patches/net/minecraft/world/entity/monster/EntityCreeper.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/EntityCreeper.java -+++ b/net/minecraft/server/EntityCreeper.java -@@ -3,6 +3,12 @@ - import java.util.Collection; - import java.util.Iterator; +--- a/net/minecraft/world/entity/monster/EntityCreeper.java ++++ b/net/minecraft/world/entity/monster/EntityCreeper.java +@@ -38,6 +38,12 @@ + import net.minecraft.world.level.IMaterial; + import net.minecraft.world.level.World; +// CraftBukkit start +import org.bukkit.craftbukkit.event.CraftEventFactory; @@ -13,7 +13,7 @@ public class EntityCreeper extends EntityMonster { private static final DataWatcherObject b = DataWatcher.a(EntityCreeper.class, DataWatcherRegistry.b); -@@ -165,9 +171,19 @@ +@@ -200,9 +206,19 @@ @Override public void onLightningStrike(WorldServer worldserver, EntityLightning entitylightning) { super.onLightningStrike(worldserver, entitylightning); @@ -34,7 +34,7 @@ @Override protected EnumInteractionResult b(EntityHuman entityhuman, EnumHand enumhand) { ItemStack itemstack = entityhuman.b(enumhand); -@@ -192,10 +208,18 @@ +@@ -227,10 +243,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; @@ -57,7 +57,7 @@ } } -@@ -206,6 +230,7 @@ +@@ -241,6 +265,7 @@ if (!collection.isEmpty()) { EntityAreaEffectCloud entityareaeffectcloud = new EntityAreaEffectCloud(this.world, this.locX(), this.locY(), this.locZ()); @@ -65,7 +65,7 @@ entityareaeffectcloud.setRadius(2.5F); entityareaeffectcloud.setRadiusOnUse(-0.5F); entityareaeffectcloud.setWaitTime(10); -@@ -219,7 +244,7 @@ +@@ -254,7 +279,7 @@ entityareaeffectcloud.addEffect(new MobEffect(mobeffect)); } diff --git a/nms-patches/net/minecraft/world/entity/monster/EntityEnderman.patch b/nms-patches/net/minecraft/world/entity/monster/EntityEnderman.patch index 5dbd84058..d6ce5ff37 100644 --- a/nms-patches/net/minecraft/world/entity/monster/EntityEnderman.patch +++ b/nms-patches/net/minecraft/world/entity/monster/EntityEnderman.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityEnderman.java -+++ b/net/minecraft/server/EntityEnderman.java -@@ -51,7 +51,17 @@ +--- a/net/minecraft/world/entity/monster/EntityEnderman.java ++++ b/net/minecraft/world/entity/monster/EntityEnderman.java +@@ -105,7 +105,17 @@ @Override public void setGoalTarget(@Nullable EntityLiving entityliving) { @@ -19,7 +19,7 @@ AttributeModifiable attributemodifiable = this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED); if (entityliving == null) { -@@ -66,6 +76,7 @@ +@@ -120,6 +130,7 @@ attributemodifiable.b(EntityEnderman.c); } } @@ -27,7 +27,7 @@ } -@@ -359,8 +370,12 @@ +@@ -413,8 +424,12 @@ boolean flag = movingobjectpositionblock.getBlockPosition().equals(blockposition); if (block.a((Tag) TagsBlock.ENDERMAN_HOLDABLE) && flag) { @@ -42,7 +42,7 @@ } } -@@ -395,8 +410,12 @@ +@@ -449,8 +464,12 @@ if (iblockdata2 != null) { iblockdata2 = Block.b(iblockdata2, (GeneratorAccess) this.a.world, blockposition); if (this.a(world, blockposition, iblockdata2, iblockdata, iblockdata1, blockposition1)) { diff --git a/nms-patches/net/minecraft/world/entity/monster/EntityGhast.patch b/nms-patches/net/minecraft/world/entity/monster/EntityGhast.patch index 07b2616fb..449e83901 100644 --- a/nms-patches/net/minecraft/world/entity/monster/EntityGhast.patch +++ b/nms-patches/net/minecraft/world/entity/monster/EntityGhast.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityGhast.java -+++ b/net/minecraft/server/EntityGhast.java -@@ -163,7 +163,8 @@ +--- a/net/minecraft/world/entity/monster/EntityGhast.java ++++ b/net/minecraft/world/entity/monster/EntityGhast.java +@@ -193,7 +193,8 @@ EntityLargeFireball entitylargefireball = new EntityLargeFireball(world, this.ghast, d2, d3, d4); diff --git a/nms-patches/net/minecraft/world/entity/monster/EntityGuardianElder.patch b/nms-patches/net/minecraft/world/entity/monster/EntityGuardianElder.patch index 9dcb957bd..fc6007b1a 100644 --- a/nms-patches/net/minecraft/world/entity/monster/EntityGuardianElder.patch +++ b/nms-patches/net/minecraft/world/entity/monster/EntityGuardianElder.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityGuardianElder.java -+++ b/net/minecraft/server/EntityGuardianElder.java -@@ -65,7 +65,7 @@ +--- a/net/minecraft/world/entity/monster/EntityGuardianElder.java ++++ b/net/minecraft/world/entity/monster/EntityGuardianElder.java +@@ -79,7 +79,7 @@ if (!entityplayer.hasEffect(mobeffectlist) || entityplayer.getEffect(mobeffectlist).getAmplifier() < 2 || entityplayer.getEffect(mobeffectlist).getDuration() < 1200) { entityplayer.playerConnection.sendPacket(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.k, this.isSilent() ? 0.0F : 1.0F)); diff --git a/nms-patches/net/minecraft/world/entity/monster/EntityIllagerIllusioner.patch b/nms-patches/net/minecraft/world/entity/monster/EntityIllagerIllusioner.patch index 88c538872..32b229536 100644 --- a/nms-patches/net/minecraft/world/entity/monster/EntityIllagerIllusioner.patch +++ b/nms-patches/net/minecraft/world/entity/monster/EntityIllagerIllusioner.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityIllagerIllusioner.java -+++ b/net/minecraft/server/EntityIllagerIllusioner.java -@@ -30,7 +30,7 @@ +--- a/net/minecraft/world/entity/monster/EntityIllagerIllusioner.java ++++ b/net/minecraft/world/entity/monster/EntityIllagerIllusioner.java +@@ -67,7 +67,7 @@ this.goalSelector.a(8, new PathfinderGoalRandomStroll(this, 0.6D)); this.goalSelector.a(9, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 3.0F, 1.0F)); this.goalSelector.a(10, new PathfinderGoalLookAtPlayer(this, EntityInsentient.class, 8.0F)); @@ -9,7 +9,7 @@ this.targetSelector.a(2, (new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true)).a(300)); this.targetSelector.a(3, (new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, false)).a(300)); this.targetSelector.a(3, (new PathfinderGoalNearestAttackableTarget<>(this, EntityIronGolem.class, false)).a(300)); -@@ -169,7 +169,7 @@ +@@ -206,7 +206,7 @@ @Override protected void j() { @@ -18,7 +18,7 @@ } @Override -@@ -206,7 +206,7 @@ +@@ -243,7 +243,7 @@ @Override protected void j() { diff --git a/nms-patches/net/minecraft/world/entity/monster/EntityIllagerWizard.patch b/nms-patches/net/minecraft/world/entity/monster/EntityIllagerWizard.patch index 403b29719..cbbc280b3 100644 --- a/nms-patches/net/minecraft/world/entity/monster/EntityIllagerWizard.patch +++ b/nms-patches/net/minecraft/world/entity/monster/EntityIllagerWizard.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityIllagerWizard.java -+++ b/net/minecraft/server/EntityIllagerWizard.java -@@ -145,6 +145,11 @@ +--- a/net/minecraft/world/entity/monster/EntityIllagerWizard.java ++++ b/net/minecraft/world/entity/monster/EntityIllagerWizard.java +@@ -156,6 +156,11 @@ public void e() { --this.b; if (this.b == 0) { diff --git a/nms-patches/net/minecraft/world/entity/monster/EntityPhantom.patch b/nms-patches/net/minecraft/world/entity/monster/EntityPhantom.patch index 960e8aebd..7a1b47698 100644 --- a/nms-patches/net/minecraft/world/entity/monster/EntityPhantom.patch +++ b/nms-patches/net/minecraft/world/entity/monster/EntityPhantom.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityPhantom.java -+++ b/net/minecraft/server/EntityPhantom.java -@@ -207,7 +207,7 @@ +--- a/net/minecraft/world/entity/monster/EntityPhantom.java ++++ b/net/minecraft/world/entity/monster/EntityPhantom.java +@@ -243,7 +243,7 @@ EntityHuman entityhuman = (EntityHuman) iterator.next(); if (EntityPhantom.this.a((EntityLiving) entityhuman, PathfinderTargetCondition.a)) { diff --git a/nms-patches/net/minecraft/world/entity/monster/EntityPigZombie.patch b/nms-patches/net/minecraft/world/entity/monster/EntityPigZombie.patch index 3c466b47b..f5a8b728a 100644 --- a/nms-patches/net/minecraft/world/entity/monster/EntityPigZombie.patch +++ b/nms-patches/net/minecraft/world/entity/monster/EntityPigZombie.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityPigZombie.java -+++ b/net/minecraft/server/EntityPigZombie.java -@@ -35,7 +35,7 @@ +--- a/net/minecraft/world/entity/monster/EntityPigZombie.java ++++ b/net/minecraft/world/entity/monster/EntityPigZombie.java +@@ -69,7 +69,7 @@ protected void m() { this.goalSelector.a(2, new PathfinderGoalZombieAttack(this, 1.0D, false)); this.goalSelector.a(7, new PathfinderGoalRandomStrollLand(this, 1.0D)); @@ -9,7 +9,7 @@ this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, 10, true, false, this::a_)); this.targetSelector.a(3, new PathfinderGoalUniversalAngerReset<>(this, true)); } -@@ -108,7 +108,7 @@ +@@ -142,7 +142,7 @@ }).filter((entitypigzombie) -> { return !entitypigzombie.r(this.getGoalTarget()); }).forEach((entitypigzombie) -> { @@ -18,7 +18,7 @@ }); } -@@ -117,7 +117,7 @@ +@@ -151,7 +151,7 @@ } @Override @@ -27,7 +27,7 @@ if (this.getGoalTarget() == null && entityliving != null) { this.bo = EntityPigZombie.d.a(this.random); this.bt = EntityPigZombie.bs.a(this.random); -@@ -127,12 +127,21 @@ +@@ -161,12 +161,21 @@ this.e((EntityHuman) entityliving); } diff --git a/nms-patches/net/minecraft/world/entity/monster/EntityPillager.patch b/nms-patches/net/minecraft/world/entity/monster/EntityPillager.patch index ddc035e5a..32c928ab1 100644 --- a/nms-patches/net/minecraft/world/entity/monster/EntityPillager.patch +++ b/nms-patches/net/minecraft/world/entity/monster/EntityPillager.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityPillager.java -+++ b/net/minecraft/server/EntityPillager.java -@@ -22,7 +22,7 @@ +--- a/net/minecraft/world/entity/monster/EntityPillager.java ++++ b/net/minecraft/world/entity/monster/EntityPillager.java +@@ -70,7 +70,7 @@ this.goalSelector.a(8, new PathfinderGoalRandomStroll(this, 0.6D)); this.goalSelector.a(9, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 15.0F, 1.0F)); this.goalSelector.a(10, new PathfinderGoalLookAtPlayer(this, EntityInsentient.class, 15.0F)); diff --git a/nms-patches/net/minecraft/world/entity/monster/EntityRavager.patch b/nms-patches/net/minecraft/world/entity/monster/EntityRavager.patch index 3cb559e0d..752105942 100644 --- a/nms-patches/net/minecraft/world/entity/monster/EntityRavager.patch +++ b/nms-patches/net/minecraft/world/entity/monster/EntityRavager.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityRavager.java -+++ b/net/minecraft/server/EntityRavager.java -@@ -28,7 +28,7 @@ +--- a/net/minecraft/world/entity/monster/EntityRavager.java ++++ b/net/minecraft/world/entity/monster/EntityRavager.java +@@ -69,7 +69,7 @@ this.goalSelector.a(5, new PathfinderGoalRandomStrollLand(this, 0.4D)); this.goalSelector.a(6, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 6.0F)); this.goalSelector.a(10, new PathfinderGoalLookAtPlayer(this, EntityInsentient.class, 8.0F)); @@ -9,12 +9,12 @@ this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true)); this.targetSelector.a(4, new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, true)); this.targetSelector.a(4, new PathfinderGoalNearestAttackableTarget<>(this, EntityIronGolem.class, true)); -@@ -119,7 +119,7 @@ +@@ -160,7 +160,7 @@ IBlockData iblockdata = this.world.getType(blockposition); Block block = iblockdata.getBlock(); - if (block instanceof BlockLeaves) { -+ if (block instanceof BlockLeaves && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this, blockposition, Blocks.AIR.getBlockData()).isCancelled()) { // CraftBukkit ++ if (block instanceof BlockLeaves && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this, blockposition, net.minecraft.world.level.block.Blocks.AIR.getBlockData()).isCancelled()) { // CraftBukkit flag = this.world.a(blockposition, true, this) || flag; } } diff --git a/nms-patches/net/minecraft/world/entity/monster/EntityShulker.patch b/nms-patches/net/minecraft/world/entity/monster/EntityShulker.patch index 024591f07..7be5a2bfe 100644 --- a/nms-patches/net/minecraft/world/entity/monster/EntityShulker.patch +++ b/nms-patches/net/minecraft/world/entity/monster/EntityShulker.patch @@ -1,10 +1,11 @@ ---- a/net/minecraft/server/EntityShulker.java -+++ b/net/minecraft/server/EntityShulker.java -@@ -7,6 +7,11 @@ - import java.util.UUID; - import javax.annotation.Nullable; +--- a/net/minecraft/world/entity/monster/EntityShulker.java ++++ b/net/minecraft/world/entity/monster/EntityShulker.java +@@ -47,6 +47,12 @@ + import net.minecraft.world.phys.AxisAlignedBB; + import net.minecraft.world.phys.Vec3D; +// CraftBukkit start ++import net.minecraft.server.level.WorldServer; +import org.bukkit.Location; +import org.bukkit.event.entity.EntityTeleportEvent; +// CraftBukkit end @@ -12,7 +13,7 @@ public class EntityShulker extends EntityGolem implements IMonster { private static final UUID bp = UUID.fromString("7E0292F2-9434-48D5-A29F-9583AF7DF27F"); -@@ -31,7 +36,7 @@ +@@ -71,7 +77,7 @@ this.goalSelector.a(4, new EntityShulker.a()); this.goalSelector.a(7, new EntityShulker.e()); this.goalSelector.a(8, new PathfinderGoalRandomLookaround(this)); @@ -21,7 +22,7 @@ this.targetSelector.a(2, new EntityShulker.d(this)); this.targetSelector.a(3, new EntityShulker.c(this)); } -@@ -279,6 +284,16 @@ +@@ -319,6 +325,16 @@ EnumDirection enumdirection = this.g(blockposition1); if (enumdirection != null) { @@ -38,7 +39,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 +334,7 @@ +@@ -359,6 +375,7 @@ } this.g((double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D); diff --git a/nms-patches/net/minecraft/world/entity/monster/EntitySilverfish.patch b/nms-patches/net/minecraft/world/entity/monster/EntitySilverfish.patch index 87febd563..2c79d7445 100644 --- a/nms-patches/net/minecraft/world/entity/monster/EntitySilverfish.patch +++ b/nms-patches/net/minecraft/world/entity/monster/EntitySilverfish.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntitySilverfish.java -+++ b/net/minecraft/server/EntitySilverfish.java -@@ -18,7 +18,7 @@ +--- a/net/minecraft/world/entity/monster/EntitySilverfish.java ++++ b/net/minecraft/world/entity/monster/EntitySilverfish.java +@@ -45,7 +45,7 @@ this.goalSelector.a(3, this.b); this.goalSelector.a(4, new PathfinderGoalMeleeAttack(this, 1.0D, false)); this.goalSelector.a(5, new EntitySilverfish.PathfinderGoalSilverfishHideInBlock(this)); @@ -9,7 +9,7 @@ this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true)); } -@@ -156,6 +156,11 @@ +@@ -183,6 +183,11 @@ IBlockData iblockdata = world.getType(blockposition); if (BlockMonsterEggs.h(iblockdata)) { @@ -21,12 +21,12 @@ world.setTypeAndData(blockposition, BlockMonsterEggs.c(iblockdata.getBlock()), 3); this.a.doSpawnEffect(); this.a.die(); -@@ -202,6 +207,11 @@ +@@ -229,6 +234,11 @@ Block block = iblockdata.getBlock(); if (block instanceof BlockMonsterEggs) { + // CraftBukkit start -+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.silverfish, blockposition1, Blocks.AIR.getBlockData()).isCancelled()) { ++ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.silverfish, blockposition1, net.minecraft.world.level.block.Blocks.AIR.getBlockData()).isCancelled()) { + continue; + } + // CraftBukkit end diff --git a/nms-patches/net/minecraft/world/entity/monster/EntitySkeletonAbstract.patch b/nms-patches/net/minecraft/world/entity/monster/EntitySkeletonAbstract.patch index e9b8e8d48..1249d5184 100644 --- a/nms-patches/net/minecraft/world/entity/monster/EntitySkeletonAbstract.patch +++ b/nms-patches/net/minecraft/world/entity/monster/EntitySkeletonAbstract.patch @@ -1,11 +1,11 @@ ---- a/net/minecraft/server/EntitySkeletonAbstract.java -+++ b/net/minecraft/server/EntitySkeletonAbstract.java -@@ -154,8 +154,19 @@ +--- a/net/minecraft/world/entity/monster/EntitySkeletonAbstract.java ++++ b/net/minecraft/world/entity/monster/EntitySkeletonAbstract.java +@@ -196,8 +196,19 @@ double d3 = (double) MathHelper.sqrt(d0 * d0 + d2 * d2); entityarrow.shoot(d0, d1 + d3 * 0.20000000298023224D, d2, 1.6F, (float) (14 - this.world.getDifficulty().a() * 4)); + // CraftBukkit start -+ org.bukkit.event.entity.EntityShootBowEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityShootBowEvent(this, this.getItemInMainHand(), null, entityarrow, EnumHand.MAIN_HAND, 0.8F, true); ++ org.bukkit.event.entity.EntityShootBowEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityShootBowEvent(this, this.getItemInMainHand(), null, entityarrow, net.minecraft.world.EnumHand.MAIN_HAND, 0.8F, true); + if (event.isCancelled()) { + event.getProjectile().remove(); + return; diff --git a/nms-patches/net/minecraft/world/entity/monster/EntitySkeletonWither.patch b/nms-patches/net/minecraft/world/entity/monster/EntitySkeletonWither.patch index a907a477d..229ac1266 100644 --- a/nms-patches/net/minecraft/world/entity/monster/EntitySkeletonWither.patch +++ b/nms-patches/net/minecraft/world/entity/monster/EntitySkeletonWither.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntitySkeletonWither.java -+++ b/net/minecraft/server/EntitySkeletonWither.java -@@ -80,7 +80,7 @@ +--- a/net/minecraft/world/entity/monster/EntitySkeletonWither.java ++++ b/net/minecraft/world/entity/monster/EntitySkeletonWither.java +@@ -105,7 +105,7 @@ return false; } else { if (entity instanceof EntityLiving) { diff --git a/nms-patches/net/minecraft/world/entity/monster/EntitySlime.patch b/nms-patches/net/minecraft/world/entity/monster/EntitySlime.patch index 060ca1702..48c398eb2 100644 --- a/nms-patches/net/minecraft/world/entity/monster/EntitySlime.patch +++ b/nms-patches/net/minecraft/world/entity/monster/EntitySlime.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/EntitySlime.java -+++ b/net/minecraft/server/EntitySlime.java -@@ -6,6 +6,14 @@ - import java.util.Random; - import javax.annotation.Nullable; +--- a/net/minecraft/world/entity/monster/EntitySlime.java ++++ b/net/minecraft/world/entity/monster/EntitySlime.java +@@ -45,6 +45,14 @@ + import net.minecraft.world.level.storage.loot.LootTables; + import net.minecraft.world.phys.Vec3D; +// CraftBukkit start +import java.util.ArrayList; @@ -15,7 +15,7 @@ public class EntitySlime extends EntityInsentient implements IMonster { private static final DataWatcherObject bo = DataWatcher.a(EntitySlime.class, DataWatcherRegistry.b); -@@ -149,7 +157,7 @@ +@@ -188,7 +196,7 @@ @Override public EntityTypes getEntityType() { @@ -24,7 +24,7 @@ } @Override -@@ -163,6 +171,19 @@ +@@ -202,6 +210,19 @@ int j = i / 2; int k = 2 + this.random.nextInt(3); @@ -44,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 +198,17 @@ +@@ -216,8 +237,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/net/minecraft/world/entity/monster/EntitySpider.patch b/nms-patches/net/minecraft/world/entity/monster/EntitySpider.patch index 989b28108..81e3f5883 100644 --- a/nms-patches/net/minecraft/world/entity/monster/EntitySpider.patch +++ b/nms-patches/net/minecraft/world/entity/monster/EntitySpider.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntitySpider.java -+++ b/net/minecraft/server/EntitySpider.java -@@ -136,7 +136,7 @@ +--- a/net/minecraft/world/entity/monster/EntitySpider.java ++++ b/net/minecraft/world/entity/monster/EntitySpider.java +@@ -175,7 +175,7 @@ MobEffectList mobeffectlist = ((EntitySpider.GroupDataSpider) object).a; if (mobeffectlist != null) { diff --git a/nms-patches/net/minecraft/world/entity/monster/EntityStrider.patch b/nms-patches/net/minecraft/world/entity/monster/EntityStrider.patch index 317050363..664ad7b99 100644 --- a/nms-patches/net/minecraft/world/entity/monster/EntityStrider.patch +++ b/nms-patches/net/minecraft/world/entity/monster/EntityStrider.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityStrider.java -+++ b/net/minecraft/server/EntityStrider.java -@@ -252,7 +252,12 @@ +--- a/net/minecraft/world/entity/monster/EntityStrider.java ++++ b/net/minecraft/world/entity/monster/EntityStrider.java +@@ -318,7 +318,12 @@ IBlockData iblockdata1 = this.aN(); boolean flag = iblockdata.a((Tag) TagsBlock.STRIDER_WARM_BLOCKS) || iblockdata1.a((Tag) TagsBlock.STRIDER_WARM_BLOCKS) || this.b((Tag) TagsFluid.LAVA) > 0.0D; diff --git a/nms-patches/net/minecraft/world/entity/monster/EntityVex.patch b/nms-patches/net/minecraft/world/entity/monster/EntityVex.patch index 4fa8ccde3..7cc8927b6 100644 --- a/nms-patches/net/minecraft/world/entity/monster/EntityVex.patch +++ b/nms-patches/net/minecraft/world/entity/monster/EntityVex.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityVex.java -+++ b/net/minecraft/server/EntityVex.java -@@ -45,7 +45,7 @@ +--- a/net/minecraft/world/entity/monster/EntityVex.java ++++ b/net/minecraft/world/entity/monster/EntityVex.java +@@ -81,7 +81,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)); @@ -9,7 +9,7 @@ this.targetSelector.a(2, new EntityVex.b(this)); this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true)); } -@@ -186,7 +186,7 @@ +@@ -222,7 +222,7 @@ @Override public void c() { diff --git a/nms-patches/net/minecraft/world/entity/monster/EntityWitch.patch b/nms-patches/net/minecraft/world/entity/monster/EntityWitch.patch index fa3659afd..e1ca8f1a9 100644 --- a/nms-patches/net/minecraft/world/entity/monster/EntityWitch.patch +++ b/nms-patches/net/minecraft/world/entity/monster/EntityWitch.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityWitch.java -+++ b/net/minecraft/server/EntityWitch.java -@@ -93,7 +93,7 @@ +--- a/net/minecraft/world/entity/monster/EntityWitch.java ++++ b/net/minecraft/world/entity/monster/EntityWitch.java +@@ -132,7 +132,7 @@ while (iterator.hasNext()) { MobEffect mobeffect = (MobEffect) iterator.next(); diff --git a/nms-patches/net/minecraft/world/entity/monster/EntityZombie.patch b/nms-patches/net/minecraft/world/entity/monster/EntityZombie.patch index 9b58dd5b2..3cb65e5cf 100644 --- a/nms-patches/net/minecraft/world/entity/monster/EntityZombie.patch +++ b/nms-patches/net/minecraft/world/entity/monster/EntityZombie.patch @@ -1,10 +1,11 @@ ---- a/net/minecraft/server/EntityZombie.java -+++ b/net/minecraft/server/EntityZombie.java -@@ -9,6 +9,14 @@ - import java.util.function.Predicate; - import javax.annotation.Nullable; +--- a/net/minecraft/world/entity/monster/EntityZombie.java ++++ b/net/minecraft/world/entity/monster/EntityZombie.java +@@ -70,6 +70,15 @@ + import net.minecraft.world.level.block.Blocks; + import net.minecraft.world.level.block.state.IBlockData; +// CraftBukkit start ++import net.minecraft.server.MinecraftServer; +import org.bukkit.entity.Zombie; +import org.bukkit.event.entity.CreatureSpawnEvent; +import org.bukkit.event.entity.EntityCombustByEntityEvent; @@ -15,7 +16,7 @@ public class EntityZombie extends EntityMonster { private static final UUID b = UUID.fromString("B9766B59-9566-4402-BC1F-2EE2A276D836"); -@@ -23,6 +31,7 @@ +@@ -84,6 +93,7 @@ private boolean bs; private int bt; public int drownedConversionTime; @@ -23,7 +24,7 @@ public EntityZombie(EntityTypes entitytypes, World world) { super(entitytypes, world); -@@ -139,7 +148,10 @@ +@@ -200,7 +210,10 @@ public void tick() { if (!this.world.isClientSide && this.isAlive() && !this.isNoAI()) { if (this.isDrownConverting()) { @@ -35,7 +36,7 @@ if (this.drownedConversionTime < 0) { this.eP(); } -@@ -156,6 +168,7 @@ +@@ -217,6 +230,7 @@ } super.tick(); @@ -43,7 +44,7 @@ } @Override -@@ -188,6 +201,7 @@ +@@ -249,6 +263,7 @@ } public void startDrownedConversion(int i) { @@ -51,7 +52,7 @@ this.drownedConversionTime = i; this.getDataWatcher().set(EntityZombie.DROWN_CONVERTING, true); } -@@ -201,11 +215,15 @@ +@@ -262,11 +277,15 @@ } protected void b(EntityTypes entitytypes) { @@ -68,7 +69,7 @@ } } -@@ -245,9 +263,9 @@ +@@ -306,9 +325,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())) { @@ -80,7 +81,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 +286,14 @@ +@@ -329,7 +348,14 @@ float f = this.world.getDamageScaler(this.getChunkCoordinates()).b(); if (this.getItemInMainHand().isEmpty() && this.isBurning() && this.random.nextFloat() < f * 0.3F) { @@ -96,7 +97,7 @@ } } -@@ -349,7 +374,12 @@ +@@ -410,7 +436,12 @@ } EntityVillager entityvillager = (EntityVillager) entityliving; @@ -110,7 +111,7 @@ entityzombievillager.prepare(worldserver, worldserver.getDamageScaler(entityzombievillager.getChunkCoordinates()), EnumMobSpawn.CONVERSION, new EntityZombie.GroupDataZombie(false, true), (NBTTagCompound) null); entityzombievillager.setVillagerData(entityvillager.getVillagerData()); -@@ -406,7 +436,7 @@ +@@ -467,7 +498,7 @@ entitychicken1.prepare(worldaccess, difficultydamagescaler, EnumMobSpawn.JOCKEY, (GroupDataEntity) null, (NBTTagCompound) null); entitychicken1.setChickenJockey(true); this.startRiding(entitychicken1); diff --git a/nms-patches/net/minecraft/world/entity/monster/EntityZombieHusk.patch b/nms-patches/net/minecraft/world/entity/monster/EntityZombieHusk.patch index b4349ec3b..681e99a4e 100644 --- a/nms-patches/net/minecraft/world/entity/monster/EntityZombieHusk.patch +++ b/nms-patches/net/minecraft/world/entity/monster/EntityZombieHusk.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityZombieHusk.java -+++ b/net/minecraft/server/EntityZombieHusk.java -@@ -44,7 +44,7 @@ +--- a/net/minecraft/world/entity/monster/EntityZombieHusk.java ++++ b/net/minecraft/world/entity/monster/EntityZombieHusk.java +@@ -58,7 +58,7 @@ if (flag && this.getItemInMainHand().isEmpty() && entity instanceof EntityLiving) { float f = this.world.getDamageScaler(this.getChunkCoordinates()).b(); diff --git a/nms-patches/net/minecraft/world/entity/monster/EntityZombieVillager.patch b/nms-patches/net/minecraft/world/entity/monster/EntityZombieVillager.patch index d8a3e11ec..a53380c61 100644 --- a/nms-patches/net/minecraft/world/entity/monster/EntityZombieVillager.patch +++ b/nms-patches/net/minecraft/world/entity/monster/EntityZombieVillager.patch @@ -1,10 +1,11 @@ ---- a/net/minecraft/server/EntityZombieVillager.java -+++ b/net/minecraft/server/EntityZombieVillager.java -@@ -6,6 +6,12 @@ - import javax.annotation.Nullable; +--- a/net/minecraft/world/entity/monster/EntityZombieVillager.java ++++ b/net/minecraft/world/entity/monster/EntityZombieVillager.java +@@ -47,6 +47,13 @@ + import net.minecraft.world.level.block.Blocks; import org.apache.logging.log4j.Logger; +// CraftBukkit start ++import net.minecraft.server.MinecraftServer; +import org.bukkit.entity.ZombieVillager; +import org.bukkit.event.entity.CreatureSpawnEvent; +import org.bukkit.event.entity.EntityTransformEvent; @@ -13,7 +14,7 @@ public class EntityZombieVillager extends EntityZombie implements VillagerDataHolder { public static final DataWatcherObject CONVERTING = DataWatcher.a(EntityZombieVillager.class, DataWatcherRegistry.i); -@@ -15,6 +21,7 @@ +@@ -56,6 +63,7 @@ private NBTBase bp; private NBTTagCompound bq; private int br; @@ -21,7 +22,7 @@ public EntityZombieVillager(EntityTypes entitytypes, World world) { super(entitytypes, world); -@@ -31,7 +38,7 @@ +@@ -72,7 +80,7 @@ @Override public void saveData(NBTTagCompound nbttagcompound) { super.saveData(nbttagcompound); @@ -30,7 +31,7 @@ Logger logger = EntityZombieVillager.LOGGER; logger.getClass(); -@@ -87,6 +94,10 @@ +@@ -128,6 +136,10 @@ public void tick() { if (!this.world.isClientSide && this.isAlive() && this.isConverting()) { int i = this.getConversionProgress(); @@ -41,7 +42,7 @@ this.conversionTime -= i; if (this.conversionTime <= 0) { -@@ -95,6 +106,7 @@ +@@ -136,6 +148,7 @@ } super.tick(); @@ -49,7 +50,7 @@ } @Override -@@ -138,13 +150,22 @@ +@@ -179,13 +192,22 @@ this.conversionPlayer = uuid; this.conversionTime = i; this.getDataWatcher().set(EntityZombieVillager.CONVERTING, true); @@ -75,7 +76,7 @@ EnumItemSlot[] aenumitemslot = EnumItemSlot.values(); int i = aenumitemslot.length; -@@ -185,7 +206,7 @@ +@@ -226,7 +248,7 @@ } } diff --git a/nms-patches/net/minecraft/world/entity/monster/piglin/EntityPiglinAbstract.patch b/nms-patches/net/minecraft/world/entity/monster/piglin/EntityPiglinAbstract.patch index 6df74c90c..0646697ce 100644 --- a/nms-patches/net/minecraft/world/entity/monster/piglin/EntityPiglinAbstract.patch +++ b/nms-patches/net/minecraft/world/entity/monster/piglin/EntityPiglinAbstract.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityPiglinAbstract.java -+++ b/net/minecraft/server/EntityPiglinAbstract.java -@@ -81,7 +81,7 @@ +--- a/net/minecraft/world/entity/monster/piglin/EntityPiglinAbstract.java ++++ b/net/minecraft/world/entity/monster/piglin/EntityPiglinAbstract.java +@@ -99,7 +99,7 @@ } protected void c(WorldServer worldserver) { @@ -9,7 +9,7 @@ if (entitypigzombie != null) { entitypigzombie.addEffect(new MobEffect(MobEffects.CONFUSION, 200, 0)); -@@ -96,7 +96,7 @@ +@@ -114,7 +114,7 @@ @Nullable @Override public EntityLiving getGoalTarget() { diff --git a/nms-patches/net/minecraft/world/entity/monster/piglin/PiglinAI.patch b/nms-patches/net/minecraft/world/entity/monster/piglin/PiglinAI.patch index 1e1657bcf..6a040e2db 100644 --- a/nms-patches/net/minecraft/world/entity/monster/piglin/PiglinAI.patch +++ b/nms-patches/net/minecraft/world/entity/monster/piglin/PiglinAI.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/PiglinAI.java -+++ b/net/minecraft/server/PiglinAI.java -@@ -52,7 +52,8 @@ +--- a/net/minecraft/world/entity/monster/piglin/PiglinAI.java ++++ b/net/minecraft/world/entity/monster/piglin/PiglinAI.java +@@ -114,7 +114,8 @@ private static void b(EntityPiglin entitypiglin, BehaviorController behaviorcontroller) { behaviorcontroller.a(Activity.FLIGHT, 10, ImmutableList.of(new BehaviorAttackTargetForget<>((entityliving) -> { return !b(entitypiglin, entityliving); @@ -10,7 +10,7 @@ } private static void c(BehaviorController behaviorcontroller) { -@@ -70,7 +71,8 @@ +@@ -132,7 +133,8 @@ } private static void f(BehaviorController behaviorcontroller) { @@ -20,7 +20,7 @@ } private static BehaviorGateSingle a() { -@@ -78,7 +80,8 @@ +@@ -140,7 +142,8 @@ } private static BehaviorGateSingle b() { @@ -30,7 +30,7 @@ } private static BehaviorWalkAway c() { -@@ -95,10 +98,10 @@ +@@ -157,10 +160,10 @@ protected static void b(EntityPiglin entitypiglin) { BehaviorController behaviorcontroller = entitypiglin.getBehaviorController(); @@ -43,7 +43,7 @@ if (activity != activity1) { d(entitypiglin).ifPresent(entitypiglin::a); -@@ -130,14 +133,18 @@ +@@ -192,14 +195,18 @@ n(entitypiglin); ItemStack itemstack; @@ -64,7 +64,7 @@ Item item = itemstack.getItem(); -@@ -148,7 +155,7 @@ +@@ -210,7 +217,7 @@ } else if (c(item) && !u(entitypiglin)) { s(entitypiglin); } else { @@ -73,7 +73,7 @@ if (!flag) { d(entitypiglin, itemstack); -@@ -350,7 +357,7 @@ +@@ -412,7 +419,7 @@ } public static void a(EntityHuman entityhuman, boolean flag) { @@ -82,7 +82,7 @@ list.stream().filter(PiglinAI::d).filter((entitypiglin) -> { return !flag || BehaviorUtil.c(entitypiglin, entityhuman); -@@ -586,7 +593,7 @@ +@@ -648,7 +655,7 @@ EntityLiving entityliving = (EntityLiving) behaviorcontroller.getMemory(MemoryModuleType.AVOID_TARGET).get(); EntityTypes entitytypes = entityliving.getEntityType(); @@ -91,7 +91,7 @@ } } -@@ -668,7 +675,7 @@ +@@ -730,7 +737,7 @@ } public static boolean b(EntityLiving entityliving) { diff --git a/nms-patches/net/minecraft/world/entity/npc/EntityVillager.patch b/nms-patches/net/minecraft/world/entity/npc/EntityVillager.patch index 6e5123bec..a214d54c8 100644 --- a/nms-patches/net/minecraft/world/entity/npc/EntityVillager.patch +++ b/nms-patches/net/minecraft/world/entity/npc/EntityVillager.patch @@ -1,7 +1,7 @@ ---- a/net/minecraft/server/EntityVillager.java -+++ b/net/minecraft/server/EntityVillager.java -@@ -19,6 +19,14 @@ - import javax.annotation.Nullable; +--- a/net/minecraft/world/entity/npc/EntityVillager.java ++++ b/net/minecraft/world/entity/npc/EntityVillager.java +@@ -89,6 +89,14 @@ + import net.minecraft.world.phys.AxisAlignedBB; import org.apache.logging.log4j.Logger; +// CraftBukkit start @@ -15,7 +15,7 @@ public class EntityVillager extends EntityVillagerAbstract implements ReputationHandler, VillagerDataHolder { private static final DataWatcherObject br = DataWatcher.a(EntityVillager.class, DataWatcherRegistry.q); -@@ -64,7 +72,7 @@ +@@ -134,7 +142,7 @@ @Override public BehaviorController getBehaviorController() { @@ -24,7 +24,7 @@ } @Override -@@ -83,7 +91,7 @@ +@@ -153,7 +161,7 @@ public void c(WorldServer worldserver) { BehaviorController behaviorcontroller = this.getBehaviorController(); @@ -33,7 +33,7 @@ this.bg = behaviorcontroller.h(); this.a(this.getBehaviorController()); } -@@ -133,7 +141,7 @@ +@@ -203,7 +211,7 @@ @Override protected void mobTick() { this.world.getMethodProfiler().enter("villagerBrain"); @@ -42,7 +42,7 @@ this.world.getMethodProfiler().exit(); if (this.bF) { this.bF = false; -@@ -147,7 +155,7 @@ +@@ -217,7 +225,7 @@ this.bu = false; } @@ -51,7 +51,7 @@ } } -@@ -358,7 +366,14 @@ +@@ -428,7 +436,14 @@ while (iterator.hasNext()) { MerchantRecipe merchantrecipe = (MerchantRecipe) iterator.next(); @@ -67,7 +67,7 @@ } } -@@ -387,7 +402,7 @@ +@@ -457,7 +472,7 @@ @Override public void saveData(NBTTagCompound nbttagcompound) { super.saveData(nbttagcompound); @@ -76,7 +76,7 @@ Logger logger = EntityVillager.LOGGER; logger.getClass(); -@@ -700,7 +715,12 @@ +@@ -770,7 +785,12 @@ } entitywitch.setPersistent(); @@ -90,7 +90,7 @@ this.fq(); this.die(); } else { -@@ -833,7 +853,7 @@ +@@ -903,7 +923,7 @@ if (entityirongolem != null) { if (entityirongolem.a((GeneratorAccess) worldserver, EnumMobSpawn.MOB_SUMMONED) && entityirongolem.a((IWorldReader) worldserver)) { @@ -99,7 +99,7 @@ return entityirongolem; } -@@ -911,7 +931,7 @@ +@@ -981,7 +1001,7 @@ @Override public void entitySleep(BlockPosition blockposition) { super.entitySleep(blockposition); @@ -108,7 +108,7 @@ this.bg.removeMemory(MemoryModuleType.WALK_TARGET); this.bg.removeMemory(MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE); } -@@ -919,7 +939,7 @@ +@@ -989,7 +1009,7 @@ @Override public void entityWakeup() { super.entityWakeup(); diff --git a/nms-patches/net/minecraft/world/entity/npc/EntityVillagerAbstract.patch b/nms-patches/net/minecraft/world/entity/npc/EntityVillagerAbstract.patch index 47919b889..bc89499db 100644 --- a/nms-patches/net/minecraft/world/entity/npc/EntityVillagerAbstract.patch +++ b/nms-patches/net/minecraft/world/entity/npc/EntityVillagerAbstract.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/EntityVillagerAbstract.java -+++ b/net/minecraft/server/EntityVillagerAbstract.java -@@ -5,14 +5,30 @@ - import java.util.Set; - import javax.annotation.Nullable; +--- a/net/minecraft/world/entity/npc/EntityVillagerAbstract.java ++++ b/net/minecraft/world/entity/npc/EntityVillagerAbstract.java +@@ -32,14 +32,30 @@ + import net.minecraft.world.level.WorldAccess; + import net.minecraft.world.level.pathfinder.PathType; +// CraftBukkit start +import org.bukkit.Bukkit; @@ -32,7 +32,7 @@ public EntityVillagerAbstract(EntityTypes entitytypes, World world) { super(entitytypes, world); -@@ -213,7 +229,16 @@ +@@ -240,7 +256,16 @@ MerchantRecipe merchantrecipe = villagertrades_imerchantrecipeoption.a(this, this.random); if (merchantrecipe != null) { diff --git a/nms-patches/net/minecraft/world/entity/npc/EntityVillagerTrader.patch b/nms-patches/net/minecraft/world/entity/npc/EntityVillagerTrader.patch index e0ede8543..e1bdb7215 100644 --- a/nms-patches/net/minecraft/world/entity/npc/EntityVillagerTrader.patch +++ b/nms-patches/net/minecraft/world/entity/npc/EntityVillagerTrader.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/EntityVillagerTrader.java -+++ b/net/minecraft/server/EntityVillagerTrader.java -@@ -3,6 +3,13 @@ - import java.util.EnumSet; - import javax.annotation.Nullable; +--- a/net/minecraft/world/entity/npc/EntityVillagerTrader.java ++++ b/net/minecraft/world/entity/npc/EntityVillagerTrader.java +@@ -46,6 +46,13 @@ + import net.minecraft.world.level.World; + import net.minecraft.world.phys.Vec3D; +// CraftBukkit start +import org.bukkit.Bukkit; @@ -14,7 +14,7 @@ public class EntityVillagerTrader extends EntityVillagerAbstract { @Nullable -@@ -12,6 +19,7 @@ +@@ -55,6 +62,7 @@ public EntityVillagerTrader(EntityTypes entitytypes, World world) { super(entitytypes, world); this.attachedToPlayer = true; @@ -22,7 +22,7 @@ } @Override -@@ -89,7 +97,16 @@ +@@ -132,7 +140,16 @@ MerchantRecipe merchantrecipe = villagertrades_imerchantrecipeoption.a(this, this.random); if (merchantrecipe != null) { diff --git a/nms-patches/net/minecraft/world/entity/npc/MobSpawnerTrader.patch b/nms-patches/net/minecraft/world/entity/npc/MobSpawnerTrader.patch index f7d580deb..7bd0390c9 100644 --- a/nms-patches/net/minecraft/world/entity/npc/MobSpawnerTrader.patch +++ b/nms-patches/net/minecraft/world/entity/npc/MobSpawnerTrader.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/MobSpawnerTrader.java -+++ b/net/minecraft/server/MobSpawnerTrader.java -@@ -83,7 +83,7 @@ +--- a/net/minecraft/world/entity/npc/MobSpawnerTrader.java ++++ b/net/minecraft/world/entity/npc/MobSpawnerTrader.java +@@ -104,7 +104,7 @@ return false; } @@ -9,16 +9,16 @@ if (entityvillagertrader != null) { for (int i = 0; i < 2; ++i) { -@@ -91,7 +91,7 @@ +@@ -112,7 +112,7 @@ } this.b.a(entityvillagertrader.getUniqueID()); -- entityvillagertrader.u(48000); +- entityvillagertrader.setDespawnDelay(48000); + // entityvillagertrader.u(48000); // CraftBukkit - moved to EntityVillagerTrader constructor. This lets the value be modified by plugins on CreatureSpawnEvent entityvillagertrader.g(blockposition1); entityvillagertrader.a(blockposition1, 16); return true; -@@ -106,7 +106,7 @@ +@@ -127,7 +127,7 @@ BlockPosition blockposition = this.a((IWorldReader) worldserver, entityvillagertrader.getChunkCoordinates(), i); if (blockposition != null) { diff --git a/nms-patches/net/minecraft/world/entity/player/EntityHuman.patch b/nms-patches/net/minecraft/world/entity/player/EntityHuman.patch index 0e63dad0c..9446fff5a 100644 --- a/nms-patches/net/minecraft/world/entity/player/EntityHuman.patch +++ b/nms-patches/net/minecraft/world/entity/player/EntityHuman.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/EntityHuman.java -+++ b/net/minecraft/server/EntityHuman.java -@@ -16,10 +16,24 @@ - import java.util.function.Predicate; - import javax.annotation.Nullable; +--- a/net/minecraft/world/entity/player/EntityHuman.java ++++ b/net/minecraft/world/entity/player/EntityHuman.java +@@ -110,10 +110,24 @@ + import net.minecraft.world.scores.ScoreboardTeam; + import net.minecraft.world.scores.ScoreboardTeamBase; +// CraftBukkit start +import org.bukkit.craftbukkit.entity.CraftHumanEntity; @@ -26,7 +26,7 @@ private static final DataWatcherObject c = DataWatcher.a(EntityHuman.class, DataWatcherRegistry.c); private static final DataWatcherObject d = DataWatcher.a(EntityHuman.class, DataWatcherRegistry.b); protected static final DataWatcherObject bi = DataWatcher.a(EntityHuman.class, DataWatcherRegistry.a); -@@ -28,10 +42,10 @@ +@@ -122,10 +136,10 @@ protected static final DataWatcherObject bl = DataWatcher.a(EntityHuman.class, DataWatcherRegistry.p); private long e; public final PlayerInventory inventory = new PlayerInventory(this); @@ -39,7 +39,7 @@ protected int br; public float bs; public float bt; -@@ -57,6 +71,16 @@ +@@ -151,6 +165,16 @@ @Nullable public EntityFishingHook hookedFish; @@ -56,7 +56,7 @@ public EntityHuman(World world, BlockPosition blockposition, float f, GameProfile gameprofile) { super(EntityTypes.PLAYER, world); this.bL = ItemStack.b; -@@ -194,7 +218,7 @@ +@@ -288,7 +312,7 @@ ItemStack itemstack = this.getEquipment(EnumItemSlot.HEAD); if (itemstack.getItem() == Items.TURTLE_HELMET && !this.a((Tag) TagsFluid.WATER)) { @@ -65,7 +65,7 @@ } } -@@ -359,7 +383,8 @@ +@@ -453,7 +477,8 @@ if (this.world.getDifficulty() == EnumDifficulty.PEACEFUL && this.world.getGameRules().getBoolean(GameRules.NATURAL_REGENERATION)) { if (this.getHealth() < this.getMaxHealth() && this.ticksLived % 20 == 0) { @@ -75,7 +75,7 @@ } if (this.foodData.c() && this.ticksLived % 10 == 0) { -@@ -544,6 +569,30 @@ +@@ -638,6 +663,30 @@ entityitem.setMot((double) (-f3 * f2 * 0.3F) + Math.cos((double) f5) * (double) f6, (double) (-f1 * 0.3F + 0.1F + (this.random.nextFloat() - this.random.nextFloat()) * 0.1F), (double) (f4 * f2 * 0.3F) + Math.sin((double) f5) * (double) f6); } @@ -106,7 +106,7 @@ return entityitem; } } -@@ -670,16 +719,17 @@ +@@ -764,16 +813,17 @@ if (this.isInvulnerable(damagesource)) { return false; } else if (this.abilities.isInvulnerable && !damagesource.ignoresInvulnerability()) { @@ -126,7 +126,7 @@ } if (this.world.getDifficulty() == EnumDifficulty.EASY) { -@@ -691,7 +741,13 @@ +@@ -785,7 +835,13 @@ } } @@ -141,7 +141,7 @@ } } } -@@ -706,10 +762,29 @@ +@@ -800,10 +856,29 @@ } public boolean a(EntityHuman entityhuman) { @@ -174,7 +174,7 @@ } @Override -@@ -746,8 +821,13 @@ +@@ -840,8 +915,13 @@ } } @@ -189,7 +189,7 @@ if (!this.isInvulnerable(damagesource)) { f = this.applyArmorModifier(damagesource, f); f = this.applyMagicModifier(damagesource, f); -@@ -762,7 +842,7 @@ +@@ -856,7 +936,7 @@ } if (f != 0.0F) { @@ -198,7 +198,7 @@ float f3 = this.getHealth(); this.setHealth(this.getHealth() - f); -@@ -773,6 +853,7 @@ +@@ -867,6 +947,7 @@ } } @@ -206,7 +206,7 @@ } @Override -@@ -932,7 +1013,7 @@ +@@ -1026,7 +1107,7 @@ f *= 0.2F + f2 * f2 * 0.8F; f1 *= f2; @@ -215,7 +215,7 @@ if (f > 0.0F || f1 > 0.0F) { boolean flag = f2 > 0.9F; boolean flag1 = false; -@@ -971,8 +1052,15 @@ +@@ -1065,8 +1146,15 @@ if (entity instanceof EntityLiving) { f3 = ((EntityLiving) entity).getHealth(); if (j > 0 && !entity.isBurning()) { @@ -233,7 +233,7 @@ } } -@@ -1000,8 +1088,11 @@ +@@ -1094,8 +1182,11 @@ EntityLiving entityliving = (EntityLiving) iterator.next(); if (entityliving != this && entityliving != entity && !this.r(entityliving) && (!(entityliving instanceof EntityArmorStand) || !((EntityArmorStand) entityliving).isMarker()) && this.h((Entity) entityliving) < 9.0D) { @@ -246,7 +246,7 @@ } } -@@ -1010,9 +1101,26 @@ +@@ -1104,9 +1195,26 @@ } if (entity instanceof EntityPlayer && entity.velocityChanged) { @@ -273,7 +273,7 @@ } if (flag2) { -@@ -1057,7 +1165,14 @@ +@@ -1151,7 +1259,14 @@ this.a(StatisticList.DAMAGE_DEALT, Math.round(f5 * 10.0F)); if (j > 0) { @@ -289,7 +289,7 @@ } if (this.world instanceof WorldServer && f5 > 2.0F) { -@@ -1067,12 +1182,17 @@ +@@ -1161,12 +1276,17 @@ } } @@ -308,7 +308,7 @@ } } -@@ -1133,6 +1253,12 @@ +@@ -1227,6 +1347,12 @@ } public Either sleep(BlockPosition blockposition) { @@ -321,7 +321,7 @@ this.entitySleep(blockposition); this.sleepTicks = 0; return Either.right(Unit.INSTANCE); -@@ -1217,9 +1343,9 @@ +@@ -1311,9 +1437,9 @@ super.jump(); this.a(StatisticList.JUMP); if (this.isSprinting()) { @@ -333,7 +333,7 @@ } } -@@ -1253,7 +1379,11 @@ +@@ -1347,7 +1473,11 @@ this.setMot(vec3d2.x, d3 * 0.6D, vec3d2.z); this.aE = f; this.fallDistance = 0.0F; @@ -346,7 +346,7 @@ } else { super.g(vec3d); } -@@ -1288,19 +1418,19 @@ +@@ -1382,19 +1512,19 @@ i = Math.round(MathHelper.sqrt(d0 * d0 + d1 * d1 + d2 * d2) * 100.0F); if (i > 0) { this.a(StatisticList.SWIM_ONE_CM, i); @@ -369,7 +369,7 @@ } } else if (this.isClimbing()) { if (d1 > 0.0D) { -@@ -1311,13 +1441,13 @@ +@@ -1405,13 +1535,13 @@ if (i > 0) { if (this.isSprinting()) { this.a(StatisticList.SPRINT_ONE_CM, i); @@ -386,7 +386,7 @@ } } } else if (this.isGliding()) { -@@ -1383,12 +1513,24 @@ +@@ -1477,12 +1607,24 @@ } public void startGliding() { @@ -412,7 +412,7 @@ } @Override -@@ -1478,10 +1620,21 @@ +@@ -1572,10 +1714,21 @@ return this.expLevel >= 30 ? 112 + (this.expLevel - 30) * 9 : (this.expLevel >= 15 ? 37 + (this.expLevel - 15) * 5 : 7 + this.expLevel * 2); } @@ -435,7 +435,7 @@ } } -@@ -1555,14 +1708,21 @@ +@@ -1649,14 +1802,21 @@ @Override public void setSlot(EnumItemSlot enumitemslot, ItemStack itemstack) { @@ -460,7 +460,7 @@ this.inventory.armor.set(enumitemslot.b(), itemstack); } -@@ -1603,26 +1763,31 @@ +@@ -1697,26 +1857,31 @@ protected void releaseShoulderEntities() { if (this.e + 20L < this.world.getTime()) { diff --git a/nms-patches/net/minecraft/world/entity/player/PlayerInventory.patch b/nms-patches/net/minecraft/world/entity/player/PlayerInventory.patch index 11b455074..a9424210a 100644 --- a/nms-patches/net/minecraft/world/entity/player/PlayerInventory.patch +++ b/nms-patches/net/minecraft/world/entity/player/PlayerInventory.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/PlayerInventory.java -+++ b/net/minecraft/server/PlayerInventory.java -@@ -5,6 +5,13 @@ - import java.util.List; - import java.util.function.Predicate; +--- a/net/minecraft/world/entity/player/PlayerInventory.java ++++ b/net/minecraft/world/entity/player/PlayerInventory.java +@@ -26,6 +26,13 @@ + import net.minecraft.world.level.World; + import net.minecraft.world.level.block.state.IBlockData; +// CraftBukkit start +import java.util.ArrayList; @@ -14,7 +14,7 @@ public class PlayerInventory implements IInventory, INamableTileEntity { public final NonNullList items; -@@ -16,6 +23,54 @@ +@@ -37,6 +44,54 @@ private ItemStack carried; private int h; @@ -24,7 +24,7 @@ + + public List getContents() { + List combined = new ArrayList(items.size() + armor.size() + extraSlots.size()); -+ for (List sub : this.f) { ++ for (List sub : this.f) { + combined.addAll(sub); + } + @@ -69,7 +69,7 @@ public PlayerInventory(EntityHuman entityhuman) { this.items = NonNullList.a(36, ItemStack.b); this.armor = NonNullList.a(4, ItemStack.b); -@@ -41,6 +96,28 @@ +@@ -62,6 +117,28 @@ return itemstack.getItem() == itemstack1.getItem() && ItemStack.equals(itemstack, itemstack1); } @@ -98,7 +98,7 @@ public int getFirstEmptySlotIndex() { for (int i = 0; i < this.items.size(); ++i) { if (((ItemStack) this.items.get(i)).isEmpty()) { -@@ -480,8 +557,9 @@ +@@ -501,8 +578,9 @@ ItemStack itemstack = (ItemStack) this.armor.get(i); if ((!damagesource.isFire() || !itemstack.getItem().u()) && itemstack.getItem() instanceof ItemArmor) { @@ -109,7 +109,7 @@ }); } } -@@ -517,6 +595,11 @@ +@@ -538,6 +616,11 @@ } public ItemStack getCarried() { diff --git a/nms-patches/net/minecraft/world/entity/projectile/EntityArrow.patch b/nms-patches/net/minecraft/world/entity/projectile/EntityArrow.patch index 5e6950c4f..54ab62371 100644 --- a/nms-patches/net/minecraft/world/entity/projectile/EntityArrow.patch +++ b/nms-patches/net/minecraft/world/entity/projectile/EntityArrow.patch @@ -1,10 +1,11 @@ ---- a/net/minecraft/server/EntityArrow.java -+++ b/net/minecraft/server/EntityArrow.java -@@ -8,6 +8,11 @@ - import java.util.List; - import javax.annotation.Nullable; +--- a/net/minecraft/world/entity/projectile/EntityArrow.java ++++ b/net/minecraft/world/entity/projectile/EntityArrow.java +@@ -45,6 +45,12 @@ + import net.minecraft.world.phys.Vec3D; + import net.minecraft.world.phys.shapes.VoxelShape; +// CraftBukkit start ++import net.minecraft.world.entity.item.EntityItem; +import org.bukkit.event.entity.EntityCombustByEntityEvent; +import org.bukkit.event.player.PlayerPickupArrowEvent; +// CraftBukkit end @@ -12,7 +13,7 @@ public abstract class EntityArrow extends IProjectile { private static final DataWatcherObject f = DataWatcher.a(EntityArrow.class, DataWatcherRegistry.a); -@@ -291,7 +296,13 @@ +@@ -328,7 +334,13 @@ int k = entity.getFireTicks(); if (this.isBurning() && !flag) { @@ -27,7 +28,7 @@ } if (entity.damageEntity(damagesource, (float) i)) { -@@ -458,9 +469,23 @@ +@@ -495,9 +507,23 @@ @Override public void pickup(EntityHuman entityhuman) { if (!this.world.isClientSide && (this.inGround || this.t()) && this.shake <= 0) { diff --git a/nms-patches/net/minecraft/world/entity/projectile/EntityEgg.patch b/nms-patches/net/minecraft/world/entity/projectile/EntityEgg.patch index c7cf9cf76..6acfa817f 100644 --- a/nms-patches/net/minecraft/world/entity/projectile/EntityEgg.patch +++ b/nms-patches/net/minecraft/world/entity/projectile/EntityEgg.patch @@ -1,9 +1,12 @@ ---- a/net/minecraft/server/EntityEgg.java -+++ b/net/minecraft/server/EntityEgg.java -@@ -1,5 +1,12 @@ - package net.minecraft.server; +--- a/net/minecraft/world/entity/projectile/EntityEgg.java ++++ b/net/minecraft/world/entity/projectile/EntityEgg.java +@@ -10,6 +10,15 @@ + import net.minecraft.world.phys.MovingObjectPosition; + import net.minecraft.world.phys.MovingObjectPositionEntity; +// CraftBukkit start ++import net.minecraft.server.level.EntityPlayer; ++import net.minecraft.world.entity.Entity; +import org.bukkit.entity.Ageable; +import org.bukkit.entity.EntityType; +import org.bukkit.entity.Player; @@ -13,7 +16,7 @@ public class EntityEgg extends EntityProjectileThrowable { public EntityEgg(EntityTypes entitytypes, World world) { -@@ -24,20 +31,40 @@ +@@ -34,20 +43,40 @@ protected void a(MovingObjectPosition movingobjectposition) { super.a(movingobjectposition); if (!this.world.isClientSide) { diff --git a/nms-patches/net/minecraft/world/entity/projectile/EntityEnderPearl.patch b/nms-patches/net/minecraft/world/entity/projectile/EntityEnderPearl.patch index 36ff72776..ff439cf93 100644 --- a/nms-patches/net/minecraft/world/entity/projectile/EntityEnderPearl.patch +++ b/nms-patches/net/minecraft/world/entity/projectile/EntityEnderPearl.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/EntityEnderPearl.java -+++ b/net/minecraft/server/EntityEnderPearl.java -@@ -2,6 +2,13 @@ - - import javax.annotation.Nullable; +--- a/net/minecraft/world/entity/projectile/EntityEnderPearl.java ++++ b/net/minecraft/world/entity/projectile/EntityEnderPearl.java +@@ -17,6 +17,13 @@ + import net.minecraft.world.phys.MovingObjectPosition; + import net.minecraft.world.phys.MovingObjectPositionEntity; +// CraftBukkit start +import org.bukkit.Bukkit; @@ -14,7 +14,7 @@ public class EntityEnderPearl extends EntityProjectileThrowable { public EntityEnderPearl(EntityTypes entitytypes, World world) { -@@ -37,21 +44,35 @@ +@@ -52,21 +59,35 @@ EntityPlayer entityplayer = (EntityPlayer) entity; if (entityplayer.playerConnection.a().isConnected() && entityplayer.world == this.world && !entityplayer.isSleeping()) { @@ -61,7 +61,7 @@ } } else if (entity != null) { entity.enderTeleportTo(this.locX(), this.locY(), this.locZ()); -@@ -80,7 +101,7 @@ +@@ -95,7 +116,7 @@ public Entity b(WorldServer worldserver) { Entity entity = this.getShooter(); diff --git a/nms-patches/net/minecraft/world/entity/projectile/EntityEnderSignal.patch b/nms-patches/net/minecraft/world/entity/projectile/EntityEnderSignal.patch index 68577115e..bb20422cc 100644 --- a/nms-patches/net/minecraft/world/entity/projectile/EntityEnderSignal.patch +++ b/nms-patches/net/minecraft/world/entity/projectile/EntityEnderSignal.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityEnderSignal.java -+++ b/net/minecraft/server/EntityEnderSignal.java -@@ -20,8 +20,8 @@ +--- a/net/minecraft/world/entity/projectile/EntityEnderSignal.java ++++ b/net/minecraft/world/entity/projectile/EntityEnderSignal.java +@@ -39,8 +39,8 @@ } public void setItem(ItemStack itemstack) { @@ -11,7 +11,7 @@ itemstack1.setCount(1); })); } -@@ -137,7 +137,7 @@ +@@ -156,7 +156,7 @@ public void loadData(NBTTagCompound nbttagcompound) { ItemStack itemstack = ItemStack.a(nbttagcompound.getCompound("Item")); diff --git a/nms-patches/net/minecraft/world/entity/projectile/EntityEvokerFangs.patch b/nms-patches/net/minecraft/world/entity/projectile/EntityEvokerFangs.patch index 30081d729..b3670e319 100644 --- a/nms-patches/net/minecraft/world/entity/projectile/EntityEvokerFangs.patch +++ b/nms-patches/net/minecraft/world/entity/projectile/EntityEvokerFangs.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityEvokerFangs.java -+++ b/net/minecraft/server/EntityEvokerFangs.java -@@ -114,7 +114,9 @@ +--- a/net/minecraft/world/entity/projectile/EntityEvokerFangs.java ++++ b/net/minecraft/world/entity/projectile/EntityEvokerFangs.java +@@ -124,7 +124,9 @@ if (entityliving.isAlive() && !entityliving.isInvulnerable() && entityliving != entityliving1) { if (entityliving1 == null) { diff --git a/nms-patches/net/minecraft/world/entity/projectile/EntityFireball.patch b/nms-patches/net/minecraft/world/entity/projectile/EntityFireball.patch index a1a36789e..91aaba3b8 100644 --- a/nms-patches/net/minecraft/world/entity/projectile/EntityFireball.patch +++ b/nms-patches/net/minecraft/world/entity/projectile/EntityFireball.patch @@ -1,7 +1,8 @@ ---- a/net/minecraft/server/EntityFireball.java -+++ b/net/minecraft/server/EntityFireball.java -@@ -1,10 +1,14 @@ - package net.minecraft.server; +--- a/net/minecraft/world/entity/projectile/EntityFireball.java ++++ b/net/minecraft/world/entity/projectile/EntityFireball.java +@@ -15,11 +15,15 @@ + import net.minecraft.world.phys.MovingObjectPosition; + import net.minecraft.world.phys.Vec3D; +import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit + @@ -15,7 +16,7 @@ protected EntityFireball(EntityTypes entitytypes, World world) { super(entitytypes, world); -@@ -14,6 +18,12 @@ +@@ -29,6 +33,12 @@ this(entitytypes, world); this.setPositionRotation(d0, d1, d2, this.yaw, this.pitch); this.af(); @@ -28,7 +29,7 @@ double d6 = (double) MathHelper.sqrt(d3 * d3 + d4 * d4 + d5 * d5); if (d6 != 0.0D) { -@@ -49,6 +59,12 @@ +@@ -64,6 +74,12 @@ if (movingobjectposition.getType() != MovingObjectPosition.EnumMovingObjectType.MISS) { this.a(movingobjectposition); @@ -41,7 +42,7 @@ } this.checkBlockCollisions(); -@@ -133,6 +149,11 @@ +@@ -148,6 +164,11 @@ Entity entity = damagesource.getEntity(); if (entity != null) { diff --git a/nms-patches/net/minecraft/world/entity/projectile/EntityFireballFireball.patch b/nms-patches/net/minecraft/world/entity/projectile/EntityFireballFireball.patch index 69a2fc05a..49fad3371 100644 --- a/nms-patches/net/minecraft/world/entity/projectile/EntityFireballFireball.patch +++ b/nms-patches/net/minecraft/world/entity/projectile/EntityFireballFireball.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityFireballFireball.java -+++ b/net/minecraft/server/EntityFireballFireball.java -@@ -18,7 +18,7 @@ +--- a/net/minecraft/world/entity/projectile/EntityFireballFireball.java ++++ b/net/minecraft/world/entity/projectile/EntityFireballFireball.java +@@ -29,7 +29,7 @@ public void setItem(ItemStack itemstack) { if (itemstack.getItem() != Items.FIRE_CHARGE || itemstack.hasTag()) { @@ -9,7 +9,7 @@ itemstack1.setCount(1); })); } -@@ -50,6 +50,6 @@ +@@ -61,6 +61,6 @@ super.loadData(nbttagcompound); ItemStack itemstack = ItemStack.a(nbttagcompound.getCompound("Item")); diff --git a/nms-patches/net/minecraft/world/entity/projectile/EntityFireworks.patch b/nms-patches/net/minecraft/world/entity/projectile/EntityFireworks.patch index 2a6c512df..872f22c6f 100644 --- a/nms-patches/net/minecraft/world/entity/projectile/EntityFireworks.patch +++ b/nms-patches/net/minecraft/world/entity/projectile/EntityFireworks.patch @@ -1,15 +1,15 @@ ---- a/net/minecraft/server/EntityFireworks.java -+++ b/net/minecraft/server/EntityFireworks.java -@@ -5,6 +5,8 @@ - import java.util.OptionalInt; - import javax.annotation.Nullable; +--- a/net/minecraft/world/entity/projectile/EntityFireworks.java ++++ b/net/minecraft/world/entity/projectile/EntityFireworks.java +@@ -29,6 +29,8 @@ + import net.minecraft.world.phys.MovingObjectPositionEntity; + import net.minecraft.world.phys.Vec3D; +import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit + public class EntityFireworks extends IProjectile { public static final DataWatcherObject FIREWORK_ITEM = DataWatcher.a(EntityFireworks.class, DataWatcherRegistry.g); -@@ -121,7 +123,11 @@ +@@ -145,7 +147,11 @@ } if (!this.world.isClientSide && this.ticksFlown > this.expectedLifespan) { @@ -22,7 +22,7 @@ } } -@@ -136,7 +142,11 @@ +@@ -160,7 +166,11 @@ protected void a(MovingObjectPositionEntity movingobjectpositionentity) { super.a(movingobjectpositionentity); if (!this.world.isClientSide) { @@ -35,7 +35,7 @@ } } -@@ -146,7 +156,11 @@ +@@ -170,7 +180,11 @@ this.world.getType(blockposition).a(this.world, blockposition, (Entity) this); if (!this.world.s_() && this.hasExplosions()) { @@ -48,7 +48,7 @@ } super.a(movingobjectpositionblock); -@@ -172,7 +186,9 @@ +@@ -196,7 +210,9 @@ if (f > 0.0F) { if (this.ridingEntity != null) { @@ -58,7 +58,7 @@ } double d0 = 5.0D; -@@ -199,7 +215,9 @@ +@@ -223,7 +239,9 @@ if (flag) { float f1 = f * (float) Math.sqrt((5.0D - (double) this.g((Entity) entityliving)) / 5.0D); diff --git a/nms-patches/net/minecraft/world/entity/projectile/EntityFishingHook.patch b/nms-patches/net/minecraft/world/entity/projectile/EntityFishingHook.patch index 977e401d5..fa548f118 100644 --- a/nms-patches/net/minecraft/world/entity/projectile/EntityFishingHook.patch +++ b/nms-patches/net/minecraft/world/entity/projectile/EntityFishingHook.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/EntityFishingHook.java -+++ b/net/minecraft/server/EntityFishingHook.java -@@ -7,6 +7,12 @@ - import java.util.Random; - import javax.annotation.Nullable; +--- a/net/minecraft/world/entity/projectile/EntityFishingHook.java ++++ b/net/minecraft/world/entity/projectile/EntityFishingHook.java +@@ -45,6 +45,12 @@ + import net.minecraft.world.phys.MovingObjectPositionEntity; + import net.minecraft.world.phys.Vec3D; +// CraftBukkit start +import org.bukkit.entity.Player; @@ -13,7 +13,7 @@ public class EntityFishingHook extends IProjectile { private final Random b; -@@ -25,6 +31,12 @@ +@@ -63,6 +69,12 @@ private final int an; private final int lureLevel; @@ -26,7 +26,7 @@ private EntityFishingHook(World world, EntityHuman entityhuman, int i, int j) { super(EntityTypes.FISHING_BOBBER, world); this.b = new Random(); -@@ -253,6 +265,10 @@ +@@ -291,6 +303,10 @@ this.waitTime = 0; this.ai = 0; this.getDataWatcher().set(EntityFishingHook.f, false); @@ -37,7 +37,7 @@ } } else { float f; -@@ -286,6 +302,13 @@ +@@ -324,6 +340,13 @@ worldserver.a(Particles.FISHING, d0, d1, d2, 0, (double) (-f4), 0.01D, (double) f3, 1.0D); } } else { @@ -51,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 +345,10 @@ +@@ -360,8 +383,10 @@ this.ai = MathHelper.nextInt(this.random, 20, 80); } } else { @@ -64,7 +64,7 @@ } } -@@ -390,6 +415,14 @@ +@@ -428,6 +453,14 @@ int i = 0; if (this.hooked != null) { @@ -79,7 +79,7 @@ this.reel(); CriterionTriggers.D.a((EntityPlayer) entityhuman, itemstack, this, (Collection) Collections.emptyList()); this.world.broadcastEntityEffect(this, (byte) 31); -@@ -405,6 +438,15 @@ +@@ -443,6 +476,15 @@ while (iterator.hasNext()) { ItemStack itemstack1 = (ItemStack) iterator.next(); EntityItem entityitem = new EntityItem(this.world, this.locX(), this.locY(), this.locZ(), itemstack1); @@ -95,7 +95,7 @@ double d0 = entityhuman.locX() - this.locX(); double d1 = entityhuman.locY() - this.locY(); double d2 = entityhuman.locZ() - this.locZ(); -@@ -412,7 +454,11 @@ +@@ -450,7 +492,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); @@ -108,7 +108,7 @@ if (itemstack1.getItem().a((Tag) TagsItem.FISHES)) { entityhuman.a(StatisticList.FISH_CAUGHT, 1); } -@@ -422,8 +468,25 @@ +@@ -460,8 +506,25 @@ } if (this.onGround) { diff --git a/nms-patches/net/minecraft/world/entity/projectile/EntityLargeFireball.patch b/nms-patches/net/minecraft/world/entity/projectile/EntityLargeFireball.patch index 31b75323a..81d9934cc 100644 --- a/nms-patches/net/minecraft/world/entity/projectile/EntityLargeFireball.patch +++ b/nms-patches/net/minecraft/world/entity/projectile/EntityLargeFireball.patch @@ -1,7 +1,8 @@ ---- a/net/minecraft/server/EntityLargeFireball.java -+++ b/net/minecraft/server/EntityLargeFireball.java -@@ -1,15 +1,19 @@ - package net.minecraft.server; +--- a/net/minecraft/world/entity/projectile/EntityLargeFireball.java ++++ b/net/minecraft/world/entity/projectile/EntityLargeFireball.java +@@ -11,16 +11,20 @@ + import net.minecraft.world.phys.MovingObjectPosition; + import net.minecraft.world.phys.MovingObjectPositionEntity; +import org.bukkit.event.entity.ExplosionPrimeEvent; // CraftBukkit + @@ -20,7 +21,7 @@ } @Override -@@ -18,7 +22,15 @@ +@@ -29,7 +33,15 @@ if (!this.world.isClientSide) { boolean flag = this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING); @@ -37,7 +38,7 @@ this.die(); } -@@ -49,7 +61,8 @@ +@@ -60,7 +72,8 @@ public void loadData(NBTTagCompound nbttagcompound) { super.loadData(nbttagcompound); if (nbttagcompound.hasKeyOfType("ExplosionPower", 99)) { diff --git a/nms-patches/net/minecraft/world/entity/projectile/EntityPotion.patch b/nms-patches/net/minecraft/world/entity/projectile/EntityPotion.patch index 2af85dd28..856247591 100644 --- a/nms-patches/net/minecraft/world/entity/projectile/EntityPotion.patch +++ b/nms-patches/net/minecraft/world/entity/projectile/EntityPotion.patch @@ -1,12 +1,14 @@ ---- a/net/minecraft/server/EntityPotion.java -+++ b/net/minecraft/server/EntityPotion.java -@@ -5,6 +5,14 @@ - import java.util.function.Predicate; - import javax.annotation.Nullable; +--- a/net/minecraft/world/entity/projectile/EntityPotion.java ++++ b/net/minecraft/world/entity/projectile/EntityPotion.java +@@ -32,6 +32,16 @@ + import net.minecraft.world.phys.MovingObjectPositionBlock; + import net.minecraft.world.phys.MovingObjectPositionEntity; +// CraftBukkit start +import java.util.HashMap; +import java.util.Map; ++import net.minecraft.server.level.EntityPlayer; ++import net.minecraft.world.level.block.Blocks; +import org.bukkit.craftbukkit.entity.CraftLivingEntity; +import org.bukkit.craftbukkit.event.CraftEventFactory; +import org.bukkit.entity.LivingEntity; @@ -15,7 +17,7 @@ public class EntityPotion extends EntityProjectileThrowable { public static final Predicate b = EntityLiving::dO; -@@ -69,7 +77,7 @@ +@@ -96,7 +106,7 @@ if (flag) { this.splash(); @@ -24,7 +26,7 @@ if (this.isLingering()) { this.a(itemstack, potionregistry); } else { -@@ -106,6 +114,7 @@ +@@ -133,6 +143,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); @@ -32,7 +34,7 @@ if (!list1.isEmpty()) { Iterator iterator = list1.iterator(); -@@ -123,21 +132,46 @@ +@@ -150,21 +161,46 @@ d1 = 1.0D; } @@ -93,7 +95,7 @@ } } } -@@ -173,7 +207,14 @@ +@@ -200,7 +236,14 @@ entityareaeffectcloud.setColor(nbttagcompound.getInt("CustomPotionColor")); } @@ -109,7 +111,7 @@ } public boolean isLingering() { -@@ -184,11 +225,19 @@ +@@ -211,11 +254,19 @@ IBlockData iblockdata = this.world.getType(blockposition); if (iblockdata.a((Tag) TagsBlock.FIRE)) { diff --git a/nms-patches/net/minecraft/world/entity/projectile/EntityProjectileThrowable.patch b/nms-patches/net/minecraft/world/entity/projectile/EntityProjectileThrowable.patch index f6e0b5cbc..ab7f980e9 100644 --- a/nms-patches/net/minecraft/world/entity/projectile/EntityProjectileThrowable.patch +++ b/nms-patches/net/minecraft/world/entity/projectile/EntityProjectileThrowable.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityProjectileThrowable.java -+++ b/net/minecraft/server/EntityProjectileThrowable.java -@@ -18,8 +18,8 @@ +--- a/net/minecraft/world/entity/projectile/EntityProjectileThrowable.java ++++ b/net/minecraft/world/entity/projectile/EntityProjectileThrowable.java +@@ -29,8 +29,8 @@ public void setItem(ItemStack itemstack) { if (itemstack.getItem() != this.getDefaultItem() || itemstack.hasTag()) { @@ -11,7 +11,7 @@ })); } -@@ -27,6 +27,12 @@ +@@ -38,6 +38,12 @@ protected abstract Item getDefaultItem(); diff --git a/nms-patches/net/minecraft/world/entity/projectile/EntityShulkerBullet.patch b/nms-patches/net/minecraft/world/entity/projectile/EntityShulkerBullet.patch index 798f84a05..618d82e93 100644 --- a/nms-patches/net/minecraft/world/entity/projectile/EntityShulkerBullet.patch +++ b/nms-patches/net/minecraft/world/entity/projectile/EntityShulkerBullet.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityShulkerBullet.java -+++ b/net/minecraft/server/EntityShulkerBullet.java -@@ -34,8 +34,21 @@ +--- a/net/minecraft/world/entity/projectile/EntityShulkerBullet.java ++++ b/net/minecraft/world/entity/projectile/EntityShulkerBullet.java +@@ -58,8 +58,21 @@ this.target = entity; this.dir = EnumDirection.UP; this.a(enumdirection_enumaxis); @@ -22,7 +22,7 @@ @Override public SoundCategory getSoundCategory() { return SoundCategory.HOSTILE; -@@ -256,7 +269,7 @@ +@@ -280,7 +293,7 @@ if (flag) { this.a(entityliving, entity); if (entity instanceof EntityLiving) { @@ -31,7 +31,7 @@ } } -@@ -282,6 +295,11 @@ +@@ -306,6 +319,11 @@ @Override public boolean damageEntity(DamageSource damagesource, float f) { diff --git a/nms-patches/net/minecraft/world/entity/projectile/EntitySmallFireball.patch b/nms-patches/net/minecraft/world/entity/projectile/EntitySmallFireball.patch index 30c995082..0ed936798 100644 --- a/nms-patches/net/minecraft/world/entity/projectile/EntitySmallFireball.patch +++ b/nms-patches/net/minecraft/world/entity/projectile/EntitySmallFireball.patch @@ -1,14 +1,15 @@ ---- a/net/minecraft/server/EntitySmallFireball.java -+++ b/net/minecraft/server/EntitySmallFireball.java -@@ -1,5 +1,7 @@ - package net.minecraft.server; +--- a/net/minecraft/world/entity/projectile/EntitySmallFireball.java ++++ b/net/minecraft/world/entity/projectile/EntitySmallFireball.java +@@ -14,6 +14,8 @@ + import net.minecraft.world.phys.MovingObjectPositionBlock; + import net.minecraft.world.phys.MovingObjectPositionEntity; +import org.bukkit.event.entity.EntityCombustByEntityEvent; // CraftBukkit + public class EntitySmallFireball extends EntityFireballFireball { public EntitySmallFireball(EntityTypes entitytypes, World world) { -@@ -8,6 +10,11 @@ +@@ -22,6 +24,11 @@ public EntitySmallFireball(World world, EntityLiving entityliving, double d0, double d1, double d2) { super(EntityTypes.SMALL_FIREBALL, entityliving, d0, d1, d2, world); @@ -20,7 +21,7 @@ } public EntitySmallFireball(World world, double d0, double d1, double d2, double d3, double d4, double d5) { -@@ -24,7 +31,14 @@ +@@ -38,7 +45,14 @@ Entity entity1 = this.getShooter(); int i = entity.getFireTicks(); @@ -36,7 +37,7 @@ boolean flag = entity.damageEntity(DamageSource.fireball(this, entity1), 5.0F); if (!flag) { -@@ -43,10 +57,10 @@ +@@ -57,10 +71,10 @@ if (!this.world.isClientSide) { Entity entity = this.getShooter(); diff --git a/nms-patches/net/minecraft/world/entity/projectile/EntitySpectralArrow.patch b/nms-patches/net/minecraft/world/entity/projectile/EntitySpectralArrow.patch index 1e7688aff..eea9216eb 100644 --- a/nms-patches/net/minecraft/world/entity/projectile/EntitySpectralArrow.patch +++ b/nms-patches/net/minecraft/world/entity/projectile/EntitySpectralArrow.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntitySpectralArrow.java -+++ b/net/minecraft/server/EntitySpectralArrow.java -@@ -35,7 +35,7 @@ +--- a/net/minecraft/world/entity/projectile/EntitySpectralArrow.java ++++ b/net/minecraft/world/entity/projectile/EntitySpectralArrow.java +@@ -45,7 +45,7 @@ super.a(entityliving); MobEffect mobeffect = new MobEffect(MobEffects.GLOWING, this.duration, 0); diff --git a/nms-patches/net/minecraft/world/entity/projectile/EntityThrownExpBottle.patch b/nms-patches/net/minecraft/world/entity/projectile/EntityThrownExpBottle.patch index c942cc9e2..5331b3f23 100644 --- a/nms-patches/net/minecraft/world/entity/projectile/EntityThrownExpBottle.patch +++ b/nms-patches/net/minecraft/world/entity/projectile/EntityThrownExpBottle.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityThrownExpBottle.java -+++ b/net/minecraft/server/EntityThrownExpBottle.java -@@ -28,9 +28,18 @@ +--- a/net/minecraft/world/entity/projectile/EntityThrownExpBottle.java ++++ b/net/minecraft/world/entity/projectile/EntityThrownExpBottle.java +@@ -38,9 +38,18 @@ protected void a(MovingObjectPosition movingobjectposition) { super.a(movingobjectposition); if (!this.world.isClientSide) { diff --git a/nms-patches/net/minecraft/world/entity/projectile/EntityThrownTrident.patch b/nms-patches/net/minecraft/world/entity/projectile/EntityThrownTrident.patch index 69da22e8e..3d6cf786a 100644 --- a/nms-patches/net/minecraft/world/entity/projectile/EntityThrownTrident.patch +++ b/nms-patches/net/minecraft/world/entity/projectile/EntityThrownTrident.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityThrownTrident.java -+++ b/net/minecraft/server/EntityThrownTrident.java -@@ -132,7 +132,7 @@ +--- a/net/minecraft/world/entity/projectile/EntityThrownTrident.java ++++ b/net/minecraft/world/entity/projectile/EntityThrownTrident.java +@@ -154,7 +154,7 @@ entitylightning.d(Vec3D.c((BaseBlockPosition) blockposition)); entitylightning.d(entity1 instanceof EntityPlayer ? (EntityPlayer) entity1 : null); diff --git a/nms-patches/net/minecraft/world/entity/projectile/EntityTippedArrow.patch b/nms-patches/net/minecraft/world/entity/projectile/EntityTippedArrow.patch index 6e9ecd854..6fd53b380 100644 --- a/nms-patches/net/minecraft/world/entity/projectile/EntityTippedArrow.patch +++ b/nms-patches/net/minecraft/world/entity/projectile/EntityTippedArrow.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityTippedArrow.java -+++ b/net/minecraft/server/EntityTippedArrow.java -@@ -122,6 +122,25 @@ +--- a/net/minecraft/world/entity/projectile/EntityTippedArrow.java ++++ b/net/minecraft/world/entity/projectile/EntityTippedArrow.java +@@ -138,6 +138,25 @@ } } @@ -14,7 +14,7 @@ + } + + public void setType(String string) { -+ this.potionRegistry = IRegistry.POTION.get(new MinecraftKey(string)); ++ this.potionRegistry = IRegistry.POTION.get(new net.minecraft.resources.MinecraftKey(string)); + this.getDataWatcher().set(EntityTippedArrow.COLOR, PotionUtil.a((Collection) PotionUtil.a(this.potionRegistry, (Collection) this.effects))); + } + @@ -26,7 +26,7 @@ public int getColor() { return (Integer) this.datawatcher.get(EntityTippedArrow.COLOR); } -@@ -189,7 +208,7 @@ +@@ -205,7 +224,7 @@ while (iterator.hasNext()) { mobeffect = (MobEffect) iterator.next(); @@ -35,7 +35,7 @@ } if (!this.effects.isEmpty()) { -@@ -197,7 +216,7 @@ +@@ -213,7 +232,7 @@ while (iterator.hasNext()) { mobeffect = (MobEffect) iterator.next(); diff --git a/nms-patches/net/minecraft/world/entity/projectile/EntityWitherSkull.patch b/nms-patches/net/minecraft/world/entity/projectile/EntityWitherSkull.patch index a9a2c4d6c..f2cc99589 100644 --- a/nms-patches/net/minecraft/world/entity/projectile/EntityWitherSkull.patch +++ b/nms-patches/net/minecraft/world/entity/projectile/EntityWitherSkull.patch @@ -1,14 +1,15 @@ ---- a/net/minecraft/server/EntityWitherSkull.java -+++ b/net/minecraft/server/EntityWitherSkull.java -@@ -1,5 +1,7 @@ - package net.minecraft.server; +--- a/net/minecraft/world/entity/projectile/EntityWitherSkull.java ++++ b/net/minecraft/world/entity/projectile/EntityWitherSkull.java +@@ -21,6 +21,8 @@ + import net.minecraft.world.phys.MovingObjectPosition; + import net.minecraft.world.phys.MovingObjectPositionEntity; +import org.bukkit.event.entity.ExplosionPrimeEvent; // CraftBukkit + public class EntityWitherSkull extends EntityFireball { private static final DataWatcherObject e = DataWatcher.a(EntityWitherSkull.class, DataWatcherRegistry.i); -@@ -43,7 +45,7 @@ +@@ -64,7 +66,7 @@ if (entity.isAlive()) { this.a(entityliving, entity); } else { @@ -17,7 +18,7 @@ } } } else { -@@ -60,7 +62,7 @@ +@@ -81,7 +83,7 @@ } if (b0 > 0) { @@ -26,7 +27,7 @@ } } -@@ -73,7 +75,15 @@ +@@ -94,7 +96,15 @@ if (!this.world.isClientSide) { Explosion.Effect explosion_effect = this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING) ? Explosion.Effect.DESTROY : Explosion.Effect.NONE; diff --git a/nms-patches/net/minecraft/world/entity/projectile/IProjectile.patch b/nms-patches/net/minecraft/world/entity/projectile/IProjectile.patch index 5351564e4..7e46f4c45 100644 --- a/nms-patches/net/minecraft/world/entity/projectile/IProjectile.patch +++ b/nms-patches/net/minecraft/world/entity/projectile/IProjectile.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/IProjectile.java -+++ b/net/minecraft/server/IProjectile.java -@@ -4,6 +4,10 @@ - import java.util.UUID; - import javax.annotation.Nullable; +--- a/net/minecraft/world/entity/projectile/IProjectile.java ++++ b/net/minecraft/world/entity/projectile/IProjectile.java +@@ -15,6 +15,10 @@ + import net.minecraft.world.phys.MovingObjectPositionEntity; + import net.minecraft.world.phys.Vec3D; +// CraftBukkit start +import org.bukkit.projectiles.ProjectileSource; @@ -11,7 +11,7 @@ public abstract class IProjectile extends Entity { private UUID shooter; -@@ -19,6 +23,7 @@ +@@ -30,6 +34,7 @@ this.shooter = entity.getUniqueID(); this.c = entity.getId(); } @@ -19,7 +19,7 @@ } -@@ -101,6 +106,7 @@ +@@ -112,6 +117,7 @@ } protected void a(MovingObjectPosition movingobjectposition) { diff --git a/nms-patches/net/minecraft/world/entity/raid/EntityRaider.patch b/nms-patches/net/minecraft/world/entity/raid/EntityRaider.patch index 47e3e224f..b3fb21897 100644 --- a/nms-patches/net/minecraft/world/entity/raid/EntityRaider.patch +++ b/nms-patches/net/minecraft/world/entity/raid/EntityRaider.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityRaider.java -+++ b/net/minecraft/server/EntityRaider.java -@@ -131,7 +131,7 @@ +--- a/net/minecraft/world/entity/raid/EntityRaider.java ++++ b/net/minecraft/world/entity/raid/EntityRaider.java +@@ -167,7 +167,7 @@ MobEffect mobeffect1 = new MobEffect(MobEffects.BAD_OMEN, 120000, i, false, false, true); if (!this.world.getGameRules().getBoolean(GameRules.DISABLE_RAIDS)) { @@ -9,7 +9,7 @@ } } } -@@ -398,7 +398,7 @@ +@@ -434,7 +434,7 @@ while (iterator.hasNext()) { EntityRaider entityraider = (EntityRaider) iterator.next(); @@ -18,7 +18,7 @@ } } -@@ -415,7 +415,7 @@ +@@ -451,7 +451,7 @@ while (iterator.hasNext()) { EntityRaider entityraider = (EntityRaider) iterator.next(); @@ -27,7 +27,7 @@ entityraider.setAggressive(true); } -@@ -489,7 +489,7 @@ +@@ -525,7 +525,7 @@ private final T b; diff --git a/nms-patches/net/minecraft/world/entity/raid/PersistentRaid.patch b/nms-patches/net/minecraft/world/entity/raid/PersistentRaid.patch index c7c258aca..7376ab31e 100644 --- a/nms-patches/net/minecraft/world/entity/raid/PersistentRaid.patch +++ b/nms-patches/net/minecraft/world/entity/raid/PersistentRaid.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/PersistentRaid.java -+++ b/net/minecraft/server/PersistentRaid.java -@@ -92,19 +92,33 @@ +--- a/net/minecraft/world/entity/raid/PersistentRaid.java ++++ b/net/minecraft/world/entity/raid/PersistentRaid.java +@@ -110,19 +110,33 @@ boolean flag = false; if (!raid.isStarted()) { diff --git a/nms-patches/net/minecraft/world/entity/raid/Raid.patch b/nms-patches/net/minecraft/world/entity/raid/Raid.patch index 8412ec4e8..8e963ea25 100644 --- a/nms-patches/net/minecraft/world/entity/raid/Raid.patch +++ b/nms-patches/net/minecraft/world/entity/raid/Raid.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/Raid.java -+++ b/net/minecraft/server/Raid.java -@@ -111,6 +111,12 @@ +--- a/net/minecraft/world/entity/raid/Raid.java ++++ b/net/minecraft/world/entity/raid/Raid.java +@@ -153,6 +153,12 @@ return this.status == Raid.Status.LOSS; } @@ -13,7 +13,7 @@ public World getWorld() { return this.world; } -@@ -186,6 +192,7 @@ +@@ -228,6 +234,7 @@ this.active = this.world.isLoaded(this.center); if (this.world.getDifficulty() == EnumDifficulty.PEACEFUL) { @@ -21,7 +21,7 @@ this.stop(); return; } -@@ -205,13 +212,16 @@ +@@ -247,13 +254,16 @@ if (!this.world.a_(this.center)) { if (this.groupsSpawned > 0) { this.status = Raid.Status.LOSS; @@ -38,7 +38,7 @@ this.stop(); return; } -@@ -285,6 +295,7 @@ +@@ -327,6 +337,7 @@ } if (j > 3) { @@ -46,7 +46,7 @@ this.stop(); break; } -@@ -297,6 +308,7 @@ +@@ -339,6 +350,7 @@ this.status = Raid.Status.VICTORY; Iterator iterator = this.heroes.iterator(); @@ -54,7 +54,7 @@ while (iterator.hasNext()) { UUID uuid = (UUID) iterator.next(); Entity entity = this.world.getEntity(uuid); -@@ -310,9 +322,11 @@ +@@ -352,9 +364,11 @@ entityplayer.a(StatisticList.RAID_WIN); CriterionTriggers.H.a(entityplayer); @@ -66,7 +66,7 @@ } } -@@ -320,6 +334,7 @@ +@@ -362,6 +376,7 @@ } else if (this.a()) { ++this.x; if (this.x >= 600) { @@ -74,7 +74,7 @@ this.stop(); return; } -@@ -454,6 +469,10 @@ +@@ -496,6 +511,10 @@ Raid.Wave[] araid_wave = Raid.Wave.f; int j = araid_wave.length; @@ -85,7 +85,7 @@ for (int k = 0; k < j; ++k) { Raid.Wave raid_wave = araid_wave[k]; int l = this.a(raid_wave, i, flag1) + this.a(raid_wave, this.random, i, difficultydamagescaler, flag1); -@@ -466,9 +485,11 @@ +@@ -508,9 +527,11 @@ entityraider.setPatrolLeader(true); this.a(i, entityraider); flag = true; @@ -97,7 +97,7 @@ if (raid_wave.g == EntityTypes.RAVAGER) { EntityRaider entityraider1 = null; -@@ -487,6 +508,7 @@ +@@ -529,6 +550,7 @@ this.a(i, entityraider1, blockposition, false); entityraider1.setPositionRotation(blockposition, 0.0F, 0.0F); entityraider1.startRiding(entityraider); @@ -105,7 +105,7 @@ } } } -@@ -496,6 +518,7 @@ +@@ -538,6 +560,7 @@ ++this.groupsSpawned; this.updateProgress(); this.H(); @@ -113,7 +113,7 @@ } public void a(int i, EntityRaider entityraider, @Nullable BlockPosition blockposition, boolean flag) { -@@ -511,7 +534,7 @@ +@@ -553,7 +576,7 @@ entityraider.prepare(this.world, this.world.getDamageScaler(blockposition), EnumMobSpawn.EVENT, (GroupDataEntity) null, (NBTTagCompound) null); entityraider.a(i, false); entityraider.setOnGround(true); @@ -122,7 +122,7 @@ } } -@@ -756,6 +779,12 @@ +@@ -798,6 +821,12 @@ this.heroes.add(entity.getUniqueID()); } diff --git a/nms-patches/net/minecraft/world/entity/vehicle/EntityBoat.patch b/nms-patches/net/minecraft/world/entity/vehicle/EntityBoat.patch index ce60e757a..d500f4f2b 100644 --- a/nms-patches/net/minecraft/world/entity/vehicle/EntityBoat.patch +++ b/nms-patches/net/minecraft/world/entity/vehicle/EntityBoat.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/EntityBoat.java -+++ b/net/minecraft/server/EntityBoat.java -@@ -4,6 +4,15 @@ - import java.util.List; - import javax.annotation.Nullable; +--- a/net/minecraft/world/entity/vehicle/EntityBoat.java ++++ b/net/minecraft/world/entity/vehicle/EntityBoat.java +@@ -48,6 +48,15 @@ + import net.minecraft.world.phys.shapes.VoxelShape; + import net.minecraft.world.phys.shapes.VoxelShapes; +// CraftBukkit start +import org.bukkit.Location; @@ -16,7 +16,7 @@ public class EntityBoat extends Entity { private static final DataWatcherObject b = DataWatcher.a(EntityBoat.class, DataWatcherRegistry.b); -@@ -38,6 +47,14 @@ +@@ -82,6 +91,14 @@ private float aD; private float aE; @@ -31,7 +31,7 @@ public EntityBoat(EntityTypes entitytypes, World world) { super(entitytypes, world); this.ah = new float[2]; -@@ -108,6 +125,19 @@ +@@ -152,6 +169,19 @@ if (this.isInvulnerable(damagesource)) { return false; } else if (!this.world.isClientSide && !this.dead) { @@ -51,7 +51,7 @@ this.c(-this.o()); this.b(10); this.setDamage(this.getDamage() + f * 10.0F); -@@ -115,6 +145,15 @@ +@@ -159,6 +189,15 @@ boolean flag = damagesource.getEntity() instanceof EntityHuman && ((EntityHuman) damagesource.getEntity()).abilities.canInstantlyBuild; if (flag || this.getDamage() > 40.0F) { @@ -67,7 +67,7 @@ if (!flag && this.world.getGameRules().getBoolean(GameRules.DO_ENTITY_DROPS)) { this.a((IMaterial) this.g()); } -@@ -149,9 +188,29 @@ +@@ -193,9 +232,29 @@ public void collide(Entity entity) { if (entity instanceof EntityBoat) { if (entity.getBoundingBox().minY < this.getBoundingBox().maxY) { @@ -97,7 +97,7 @@ super.collide(entity); } -@@ -185,6 +244,7 @@ +@@ -229,6 +288,7 @@ return this.getDirection().g(); } @@ -105,7 +105,7 @@ @Override public void tick() { this.ay = this.ax; -@@ -225,6 +285,22 @@ +@@ -269,6 +329,22 @@ this.setMot(Vec3D.ORIGIN); } @@ -128,7 +128,7 @@ this.q(); for (int i = 0; i <= 1; ++i) { -@@ -709,6 +785,11 @@ +@@ -753,6 +829,11 @@ this.b(this.fallDistance, 1.0F); if (!this.world.isClientSide && !this.dead) { @@ -140,7 +140,7 @@ this.die(); if (this.world.getGameRules().getBoolean(GameRules.DO_ENTITY_DROPS)) { int i; -@@ -722,6 +803,7 @@ +@@ -766,6 +847,7 @@ } } } diff --git a/nms-patches/net/minecraft/world/entity/vehicle/EntityMinecartAbstract.patch b/nms-patches/net/minecraft/world/entity/vehicle/EntityMinecartAbstract.patch index 6e6a88a0f..d4de38ff2 100644 --- a/nms-patches/net/minecraft/world/entity/vehicle/EntityMinecartAbstract.patch +++ b/nms-patches/net/minecraft/world/entity/vehicle/EntityMinecartAbstract.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/EntityMinecartAbstract.java -+++ b/net/minecraft/server/EntityMinecartAbstract.java -@@ -10,6 +10,15 @@ - import java.util.Map; - import javax.annotation.Nullable; +--- a/net/minecraft/world/entity/vehicle/EntityMinecartAbstract.java ++++ b/net/minecraft/world/entity/vehicle/EntityMinecartAbstract.java +@@ -48,6 +48,15 @@ + import net.minecraft.world.phys.AxisAlignedBB; + import net.minecraft.world.phys.Vec3D; +// CraftBukkit start +import org.bukkit.Location; @@ -16,7 +16,7 @@ public abstract class EntityMinecartAbstract extends Entity { private static final DataWatcherObject b = DataWatcher.a(EntityMinecartAbstract.class, DataWatcherRegistry.b); -@@ -20,7 +29,7 @@ +@@ -58,7 +67,7 @@ private static final DataWatcherObject g = DataWatcher.a(EntityMinecartAbstract.class, DataWatcherRegistry.i); private static final ImmutableMap> ag = ImmutableMap.of(EntityPose.STANDING, ImmutableList.of(0, 1, -1), EntityPose.CROUCHING, ImmutableList.of(0, 1, -1), EntityPose.SWIMMING, ImmutableList.of(0, 1)); private boolean ah; @@ -25,7 +25,7 @@ BaseBlockPosition baseblockposition = EnumDirection.WEST.p(); BaseBlockPosition baseblockposition1 = EnumDirection.EAST.p(); BaseBlockPosition baseblockposition2 = EnumDirection.NORTH.p(); -@@ -48,6 +57,17 @@ +@@ -86,6 +95,17 @@ private double an; private double ao; @@ -43,7 +43,7 @@ protected EntityMinecartAbstract(EntityTypes entitytypes, World world) { super(entitytypes, world); this.i = true; -@@ -175,6 +195,19 @@ +@@ -213,6 +233,19 @@ if (this.isInvulnerable(damagesource)) { return false; } else { @@ -63,7 +63,7 @@ this.d(-this.n()); this.c(10); this.velocityChanged(); -@@ -182,6 +215,15 @@ +@@ -220,6 +253,15 @@ boolean flag = damagesource.getEntity() instanceof EntityHuman && ((EntityHuman) damagesource.getEntity()).abilities.canInstantlyBuild; if (flag || this.getDamage() > 40.0F) { @@ -79,7 +79,7 @@ this.ejectPassengers(); if (flag && !this.hasCustomName()) { this.die(); -@@ -234,6 +276,14 @@ +@@ -272,6 +314,14 @@ @Override public void tick() { @@ -94,7 +94,7 @@ if (this.getType() > 0) { this.c(this.getType() - 1); } -@@ -246,7 +296,7 @@ +@@ -284,7 +334,7 @@ this.an(); } @@ -103,7 +103,7 @@ if (this.world.isClientSide) { if (this.aj > 0) { double d0 = this.locX() + (this.ak - this.locX()) / (double) this.aj; -@@ -309,6 +359,18 @@ +@@ -347,6 +397,18 @@ } this.setYawPitch(this.yaw, this.pitch); @@ -122,7 +122,7 @@ if (this.getMinecartType() == EntityMinecartAbstract.EnumMinecartType.RIDEABLE && c(this.getMot()) > 0.01D) { List list = this.world.getEntities(this, this.getBoundingBox().grow(0.20000000298023224D, 0.0D, 0.20000000298023224D), IEntitySelector.a(this)); -@@ -317,8 +379,26 @@ +@@ -355,8 +417,26 @@ Entity entity = (Entity) list.get(l); if (!(entity instanceof EntityHuman) && !(entity instanceof EntityIronGolem) && !(entity instanceof EntityMinecartAbstract) && !this.isVehicle() && !entity.isPassenger()) { @@ -149,7 +149,7 @@ entity.collide(this); } } -@@ -330,6 +410,14 @@ +@@ -368,6 +448,14 @@ Entity entity1 = (Entity) iterator.next(); if (!this.w(entity1) && entity1.isCollidable() && entity1 instanceof EntityMinecartAbstract) { @@ -164,7 +164,7 @@ entity1.collide(this); } } -@@ -346,7 +434,7 @@ +@@ -384,7 +472,7 @@ } protected double getMaxSpeed() { @@ -173,7 +173,7 @@ } public void a(int i, int j, int k, boolean flag) {} -@@ -357,12 +445,16 @@ +@@ -395,12 +483,16 @@ this.setMot(MathHelper.a(vec3d.x, -d0, d0), vec3d.y, MathHelper.a(vec3d.z, -d0, d0)); if (this.onGround) { @@ -192,7 +192,7 @@ } } -@@ -549,7 +641,7 @@ +@@ -587,7 +679,7 @@ } protected void decelerate() { @@ -201,7 +201,7 @@ this.setMot(this.getMot().d(d0, 0.0D, d0)); } -@@ -632,6 +724,14 @@ +@@ -670,6 +762,14 @@ if (!this.world.isClientSide) { if (!entity.noclip && !this.noclip) { if (!this.w(entity)) { @@ -216,7 +216,7 @@ double d0 = entity.locX() - this.locX(); double d1 = entity.locZ() - this.locZ(); double d2 = d0 * d0 + d1 * d1; -@@ -767,4 +867,26 @@ +@@ -805,4 +905,26 @@ private EnumMinecartType() {} } diff --git a/nms-patches/net/minecraft/world/entity/vehicle/EntityMinecartCommandBlock.patch b/nms-patches/net/minecraft/world/entity/vehicle/EntityMinecartCommandBlock.patch index b9590a622..c1ac735e0 100644 --- a/nms-patches/net/minecraft/world/entity/vehicle/EntityMinecartCommandBlock.patch +++ b/nms-patches/net/minecraft/world/entity/vehicle/EntityMinecartCommandBlock.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EntityMinecartCommandBlock.java -+++ b/net/minecraft/server/EntityMinecartCommandBlock.java -@@ -103,5 +103,12 @@ +--- a/net/minecraft/world/entity/vehicle/EntityMinecartCommandBlock.java ++++ b/net/minecraft/world/entity/vehicle/EntityMinecartCommandBlock.java +@@ -120,5 +120,12 @@ public CommandListenerWrapper getWrapper() { return new CommandListenerWrapper(this, EntityMinecartCommandBlock.this.getPositionVector(), EntityMinecartCommandBlock.this.bi(), this.d(), 2, this.getName().getString(), EntityMinecartCommandBlock.this.getScoreboardDisplayName(), this.d().getMinecraftServer(), EntityMinecartCommandBlock.this); } diff --git a/nms-patches/net/minecraft/world/entity/vehicle/EntityMinecartContainer.patch b/nms-patches/net/minecraft/world/entity/vehicle/EntityMinecartContainer.patch index de105add0..3955811ea 100644 --- a/nms-patches/net/minecraft/world/entity/vehicle/EntityMinecartContainer.patch +++ b/nms-patches/net/minecraft/world/entity/vehicle/EntityMinecartContainer.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/EntityMinecartContainer.java -+++ b/net/minecraft/server/EntityMinecartContainer.java -@@ -3,6 +3,14 @@ - import java.util.Iterator; - import javax.annotation.Nullable; +--- a/net/minecraft/world/entity/vehicle/EntityMinecartContainer.java ++++ b/net/minecraft/world/entity/vehicle/EntityMinecartContainer.java +@@ -29,6 +29,14 @@ + import net.minecraft.world.level.storage.loot.parameters.LootContextParameterSets; + import net.minecraft.world.level.storage.loot.parameters.LootContextParameters; +// CraftBukkit start +import java.util.List; @@ -15,7 +15,7 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract implements IInventory, ITileInventory { private NonNullList items; -@@ -11,15 +19,56 @@ +@@ -37,15 +45,56 @@ public MinecraftKey lootTable; public long lootTableSeed; diff --git a/nms-patches/net/minecraft/world/food/FoodMetaData.patch b/nms-patches/net/minecraft/world/food/FoodMetaData.patch index 178068a8e..4b174f7aa 100644 --- a/nms-patches/net/minecraft/world/food/FoodMetaData.patch +++ b/nms-patches/net/minecraft/world/food/FoodMetaData.patch @@ -1,6 +1,17 @@ ---- a/net/minecraft/server/FoodMetaData.java -+++ b/net/minecraft/server/FoodMetaData.java -@@ -6,9 +6,22 @@ +--- a/net/minecraft/world/food/FoodMetaData.java ++++ b/net/minecraft/world/food/FoodMetaData.java +@@ -8,15 +8,33 @@ + import net.minecraft.world.item.ItemStack; + import net.minecraft.world.level.GameRules; + ++// CraftBukkit start ++import net.minecraft.network.protocol.game.PacketPlayOutUpdateHealth; ++import net.minecraft.server.level.EntityPlayer; ++// CraftBukkit end ++ + public class FoodMetaData { + + public int foodLevel = 20; public float saturationLevel = 5.0F; public float exhaustionLevel; private int foodTickTimer; @@ -24,26 +35,26 @@ public void eat(int i, float f) { this.foodLevel = Math.min(i + this.foodLevel, 20); -@@ -18,8 +31,17 @@ +@@ -26,8 +44,17 @@ public void a(Item item, ItemStack itemstack) { if (item.isFood()) { FoodInfo foodinfo = item.getFoodInfo(); + // CraftBukkit start + int oldFoodLevel = foodLevel; -+ + +- this.eat(foodinfo.getNutrition(), foodinfo.getSaturationModifier()); + org.bukkit.event.entity.FoodLevelChangeEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callFoodLevelChangeEvent(entityhuman, foodinfo.getNutrition() + oldFoodLevel, itemstack); + + if (!event.isCancelled()) { + this.eat(event.getFoodLevel() - oldFoodLevel, foodinfo.getSaturationModifier()); + } - -- this.eat(foodinfo.getNutrition(), foodinfo.getSaturationModifier()); ++ + ((EntityPlayer) entityhuman).getBukkitEntity().sendHealthUpdate(); + // CraftBukkit end } } -@@ -33,7 +55,15 @@ +@@ -41,7 +68,15 @@ if (this.saturationLevel > 0.0F) { this.saturationLevel = Math.max(this.saturationLevel - 1.0F, 0.0F); } else if (enumdifficulty != EnumDifficulty.PEACEFUL) { @@ -60,7 +71,7 @@ } } -@@ -41,23 +71,25 @@ +@@ -49,23 +84,25 @@ if (flag && this.saturationLevel > 0.0F && entityhuman.eJ() && this.foodLevel >= 20) { ++this.foodTickTimer; diff --git a/nms-patches/net/minecraft/world/inventory/Container.patch b/nms-patches/net/minecraft/world/inventory/Container.patch index e422011b5..25cf789a5 100644 --- a/nms-patches/net/minecraft/world/inventory/Container.patch +++ b/nms-patches/net/minecraft/world/inventory/Container.patch @@ -1,13 +1,15 @@ ---- a/net/minecraft/server/Container.java -+++ b/net/minecraft/server/Container.java -@@ -7,6 +7,18 @@ - import java.util.Set; - import javax.annotation.Nullable; +--- a/net/minecraft/world/inventory/Container.java ++++ b/net/minecraft/world/inventory/Container.java +@@ -21,6 +21,20 @@ + import net.minecraft.world.level.block.Block; + import net.minecraft.world.level.block.entity.TileEntity; +// CraftBukkit start +import com.google.common.base.Preconditions; +import java.util.HashMap; +import java.util.Map; ++import net.minecraft.network.chat.IChatBaseComponent; ++import net.minecraft.network.protocol.game.PacketPlayOutSetSlot; +import org.bukkit.craftbukkit.inventory.CraftInventory; +import org.bukkit.craftbukkit.inventory.CraftItemStack; +import org.bukkit.event.Event.Result; @@ -19,7 +21,7 @@ public abstract class Container { public NonNullList items = NonNullList.a(); -@@ -21,6 +33,27 @@ +@@ -35,6 +49,27 @@ private final List listeners = Lists.newArrayList(); private final Set k = Sets.newHashSet(); @@ -47,7 +49,7 @@ protected Container(@Nullable Containers containers, int i) { this.e = containers; this.windowId = i; -@@ -202,6 +235,7 @@ +@@ -216,6 +251,7 @@ k = playerinventory.getCarried().getCount(); Iterator iterator = this.i.iterator(); @@ -55,7 +57,7 @@ while (iterator.hasNext()) { Slot slot1 = (Slot) iterator.next(); ItemStack itemstack3 = playerinventory.getCarried(); -@@ -217,12 +251,48 @@ +@@ -231,12 +267,48 @@ } k -= itemstack4.getCount() - j1; @@ -107,7 +109,7 @@ } this.d(); -@@ -239,8 +309,11 @@ +@@ -253,8 +325,11 @@ if (i == -999) { if (!playerinventory.getCarried().isEmpty()) { if (j == 0) { @@ -120,7 +122,7 @@ } if (j == 1) { -@@ -328,6 +401,15 @@ +@@ -342,6 +417,15 @@ } slot2.d(); @@ -136,7 +138,7 @@ } } } else if (inventoryclicktype == InventoryClickType.SWAP) { -@@ -430,8 +512,11 @@ +@@ -444,8 +528,11 @@ PlayerInventory playerinventory = entityhuman.inventory; if (!playerinventory.getCarried().isEmpty()) { diff --git a/nms-patches/net/minecraft/world/inventory/ContainerAccess.patch b/nms-patches/net/minecraft/world/inventory/ContainerAccess.patch index a07ee3132..08dcb2564 100644 --- a/nms-patches/net/minecraft/world/inventory/ContainerAccess.patch +++ b/nms-patches/net/minecraft/world/inventory/ContainerAccess.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/ContainerAccess.java -+++ b/net/minecraft/server/ContainerAccess.java -@@ -6,6 +6,20 @@ +--- a/net/minecraft/world/inventory/ContainerAccess.java ++++ b/net/minecraft/world/inventory/ContainerAccess.java +@@ -8,6 +8,20 @@ public interface ContainerAccess { @@ -21,7 +21,7 @@ ContainerAccess a = new ContainerAccess() { @Override public Optional a(BiFunction bifunction) { -@@ -15,6 +29,18 @@ +@@ -17,6 +31,18 @@ static ContainerAccess at(final World world, final BlockPosition blockposition) { return new ContainerAccess() { diff --git a/nms-patches/net/minecraft/world/inventory/ContainerAnvil.patch b/nms-patches/net/minecraft/world/inventory/ContainerAnvil.patch index e6dea0437..779aa7ff0 100644 --- a/nms-patches/net/minecraft/world/inventory/ContainerAnvil.patch +++ b/nms-patches/net/minecraft/world/inventory/ContainerAnvil.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/ContainerAnvil.java -+++ b/net/minecraft/server/ContainerAnvil.java -@@ -6,12 +6,20 @@ +--- a/net/minecraft/world/inventory/ContainerAnvil.java ++++ b/net/minecraft/world/inventory/ContainerAnvil.java +@@ -19,12 +19,20 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -21,7 +21,7 @@ public ContainerAnvil(int i, PlayerInventory playerinventory) { this(i, playerinventory, ContainerAccess.a); -@@ -85,7 +93,7 @@ +@@ -98,7 +106,7 @@ byte b1 = 0; if (itemstack.isEmpty()) { @@ -30,7 +30,7 @@ this.levelCost.set(0); } else { ItemStack itemstack1 = itemstack.cloneItemStack(); -@@ -103,7 +111,7 @@ +@@ -116,7 +124,7 @@ if (itemstack1.e() && itemstack1.getItem().a(itemstack, itemstack2)) { k = Math.min(itemstack1.getDamage(), itemstack1.h() / 4); if (k <= 0) { @@ -39,7 +39,7 @@ this.levelCost.set(0); return; } -@@ -118,7 +126,7 @@ +@@ -131,7 +139,7 @@ this.h = i1; } else { if (!flag && (itemstack1.getItem() != itemstack2.getItem() || !itemstack1.e())) { @@ -48,7 +48,7 @@ this.levelCost.set(0); return; } -@@ -208,7 +216,7 @@ +@@ -221,7 +229,7 @@ } if (flag2 && !flag1) { @@ -57,7 +57,7 @@ this.levelCost.set(0); return; } -@@ -232,11 +240,11 @@ +@@ -245,11 +253,11 @@ itemstack1 = ItemStack.b; } @@ -72,7 +72,7 @@ itemstack1 = ItemStack.b; } -@@ -255,7 +263,7 @@ +@@ -268,7 +276,7 @@ EnchantmentManager.a(map, itemstack1); } @@ -81,7 +81,7 @@ this.c(); } } -@@ -278,4 +286,18 @@ +@@ -291,4 +299,18 @@ this.e(); } diff --git a/nms-patches/net/minecraft/world/inventory/ContainerAnvilAbstract.patch b/nms-patches/net/minecraft/world/inventory/ContainerAnvilAbstract.patch index eadec44f6..422886eaf 100644 --- a/nms-patches/net/minecraft/world/inventory/ContainerAnvilAbstract.patch +++ b/nms-patches/net/minecraft/world/inventory/ContainerAnvilAbstract.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/ContainerAnvilAbstract.java -+++ b/net/minecraft/server/ContainerAnvilAbstract.java -@@ -79,6 +79,7 @@ +--- a/net/minecraft/world/inventory/ContainerAnvilAbstract.java ++++ b/net/minecraft/world/inventory/ContainerAnvilAbstract.java +@@ -85,6 +85,7 @@ @Override public boolean canUse(EntityHuman entityhuman) { diff --git a/nms-patches/net/minecraft/world/inventory/ContainerBeacon.patch b/nms-patches/net/minecraft/world/inventory/ContainerBeacon.patch index 2e0b86f2b..96c61a448 100644 --- a/nms-patches/net/minecraft/world/inventory/ContainerBeacon.patch +++ b/nms-patches/net/minecraft/world/inventory/ContainerBeacon.patch @@ -1,9 +1,13 @@ ---- a/net/minecraft/server/ContainerBeacon.java -+++ b/net/minecraft/server/ContainerBeacon.java -@@ -1,11 +1,17 @@ - package net.minecraft.server; +--- a/net/minecraft/world/inventory/ContainerBeacon.java ++++ b/net/minecraft/world/inventory/ContainerBeacon.java +@@ -8,12 +8,21 @@ + import net.minecraft.world.item.ItemStack; + import net.minecraft.world.level.block.Blocks; -+import org.bukkit.craftbukkit.inventory.CraftInventoryView; // CraftBukkit ++// CraftBukkit start ++import net.minecraft.world.entity.player.PlayerInventory; ++import org.bukkit.craftbukkit.inventory.CraftInventoryView; ++// CraftBukkit end + public class ContainerBeacon extends Container { @@ -18,7 +22,7 @@ public ContainerBeacon(int i, IInventory iinventory) { this(i, iinventory, new ContainerProperties(3), ContainerAccess.a); -@@ -13,6 +19,7 @@ +@@ -21,6 +30,7 @@ public ContainerBeacon(int i, IInventory iinventory, IContainerProperties icontainerproperties, ContainerAccess containeraccess) { super(Containers.BEACON, i); @@ -26,7 +30,7 @@ this.beacon = new InventorySubcontainer(1) { @Override public boolean b(int j, ItemStack itemstack) { -@@ -62,6 +69,7 @@ +@@ -70,6 +80,7 @@ @Override public boolean canUse(EntityHuman entityhuman) { @@ -34,7 +38,7 @@ return a(this.containerAccess, entityhuman, Blocks.BEACON); } -@@ -143,4 +151,17 @@ +@@ -151,4 +162,17 @@ return 1; } } diff --git a/nms-patches/net/minecraft/world/inventory/ContainerBrewingStand.patch b/nms-patches/net/minecraft/world/inventory/ContainerBrewingStand.patch index a10f4faa2..d51714d29 100644 --- a/nms-patches/net/minecraft/world/inventory/ContainerBrewingStand.patch +++ b/nms-patches/net/minecraft/world/inventory/ContainerBrewingStand.patch @@ -1,7 +1,8 @@ ---- a/net/minecraft/server/ContainerBrewingStand.java -+++ b/net/minecraft/server/ContainerBrewingStand.java -@@ -1,17 +1,28 @@ - package net.minecraft.server; +--- a/net/minecraft/world/inventory/ContainerBrewingStand.java ++++ b/net/minecraft/world/inventory/ContainerBrewingStand.java +@@ -13,18 +13,29 @@ + import net.minecraft.world.item.alchemy.PotionRegistry; + import net.minecraft.world.item.alchemy.PotionUtil; +// CraftBukkit start +import org.bukkit.craftbukkit.inventory.CraftInventoryBrewer; @@ -29,7 +30,7 @@ a(iinventory, 5); a(icontainerproperties, 2); this.brewingStand = iinventory; -@@ -39,6 +50,7 @@ +@@ -52,6 +63,7 @@ @Override public boolean canUse(EntityHuman entityhuman) { @@ -37,7 +38,7 @@ return this.brewingStand.a(entityhuman); } -@@ -171,4 +183,17 @@ +@@ -184,4 +196,17 @@ return item == Items.POTION || item == Items.SPLASH_POTION || item == Items.LINGERING_POTION || item == Items.GLASS_BOTTLE; } } diff --git a/nms-patches/net/minecraft/world/inventory/ContainerCartography.patch b/nms-patches/net/minecraft/world/inventory/ContainerCartography.patch index 86b965eb9..a3553e1fa 100644 --- a/nms-patches/net/minecraft/world/inventory/ContainerCartography.patch +++ b/nms-patches/net/minecraft/world/inventory/ContainerCartography.patch @@ -1,7 +1,8 @@ ---- a/net/minecraft/server/ContainerCartography.java -+++ b/net/minecraft/server/ContainerCartography.java -@@ -1,7 +1,29 @@ - package net.minecraft.server; +--- a/net/minecraft/world/inventory/ContainerCartography.java ++++ b/net/minecraft/world/inventory/ContainerCartography.java +@@ -13,8 +13,30 @@ + import net.minecraft.world.level.block.Blocks; + import net.minecraft.world.level.saveddata.maps.WorldMap; +// CraftBukkit start +import org.bukkit.Location; @@ -30,7 +31,7 @@ private final ContainerAccess containerAccess; private long e; public final IInventory inventory; -@@ -19,6 +41,13 @@ +@@ -32,6 +54,13 @@ ContainerCartography.this.a((IInventory) this); super.update(); } @@ -44,7 +45,7 @@ }; this.resultInventory = new InventoryCraftResult() { @Override -@@ -26,6 +55,13 @@ +@@ -39,6 +68,13 @@ ContainerCartography.this.a((IInventory) this); super.update(); } @@ -58,7 +59,7 @@ }; this.containerAccess = containeraccess; this.a(new Slot(this.inventory, 0, 15, 15) { -@@ -78,10 +114,12 @@ +@@ -91,10 +127,12 @@ this.a(new Slot(playerinventory, j, 8 + j * 18, 142)); } diff --git a/nms-patches/net/minecraft/world/inventory/ContainerChest.patch b/nms-patches/net/minecraft/world/inventory/ContainerChest.patch index 0387d3c5f..9e7c02ef4 100644 --- a/nms-patches/net/minecraft/world/inventory/ContainerChest.patch +++ b/nms-patches/net/minecraft/world/inventory/ContainerChest.patch @@ -1,9 +1,11 @@ ---- a/net/minecraft/server/ContainerChest.java -+++ b/net/minecraft/server/ContainerChest.java -@@ -1,9 +1,37 @@ - package net.minecraft.server; +--- a/net/minecraft/world/inventory/ContainerChest.java ++++ b/net/minecraft/world/inventory/ContainerChest.java +@@ -6,10 +6,39 @@ + import net.minecraft.world.entity.player.PlayerInventory; + import net.minecraft.world.item.ItemStack; +// CraftBukkit start ++import net.minecraft.world.InventoryLargeChest; +import org.bukkit.craftbukkit.inventory.CraftInventory; +import org.bukkit.craftbukkit.inventory.CraftInventoryView; +// CraftBukkit end @@ -38,7 +40,7 @@ private ContainerChest(Containers containers, int i, PlayerInventory playerinventory, int j) { this(containers, i, playerinventory, new InventorySubcontainer(9 * j), j); -@@ -49,6 +77,10 @@ +@@ -55,6 +84,10 @@ iinventory.startOpen(playerinventory.player); int k = (this.d - 4) * 18; @@ -49,7 +51,7 @@ int l; int i1; -@@ -72,6 +104,7 @@ +@@ -78,6 +111,7 @@ @Override public boolean canUse(EntityHuman entityhuman) { diff --git a/nms-patches/net/minecraft/world/inventory/ContainerDispenser.patch b/nms-patches/net/minecraft/world/inventory/ContainerDispenser.patch index 5c5283c83..7d2faa60a 100644 --- a/nms-patches/net/minecraft/world/inventory/ContainerDispenser.patch +++ b/nms-patches/net/minecraft/world/inventory/ContainerDispenser.patch @@ -1,7 +1,8 @@ ---- a/net/minecraft/server/ContainerDispenser.java -+++ b/net/minecraft/server/ContainerDispenser.java -@@ -1,8 +1,17 @@ - package net.minecraft.server; +--- a/net/minecraft/world/inventory/ContainerDispenser.java ++++ b/net/minecraft/world/inventory/ContainerDispenser.java +@@ -6,9 +6,18 @@ + import net.minecraft.world.entity.player.PlayerInventory; + import net.minecraft.world.item.ItemStack; +// CraftBukkit start +import org.bukkit.craftbukkit.inventory.CraftInventory; @@ -18,7 +19,7 @@ public ContainerDispenser(int i, PlayerInventory playerinventory) { this(i, playerinventory, new InventorySubcontainer(9)); -@@ -10,6 +19,10 @@ +@@ -16,6 +25,10 @@ public ContainerDispenser(int i, PlayerInventory playerinventory, IInventory iinventory) { super(Containers.GENERIC_3X3, i); @@ -29,7 +30,7 @@ a(iinventory, 9); this.items = iinventory; iinventory.startOpen(playerinventory.player); -@@ -37,6 +50,7 @@ +@@ -43,6 +56,7 @@ @Override public boolean canUse(EntityHuman entityhuman) { @@ -37,7 +38,7 @@ return this.items.a(entityhuman); } -@@ -78,4 +92,17 @@ +@@ -84,4 +98,17 @@ super.b(entityhuman); this.items.closeContainer(entityhuman); } diff --git a/nms-patches/net/minecraft/world/inventory/ContainerEnchantTable.patch b/nms-patches/net/minecraft/world/inventory/ContainerEnchantTable.patch index c5710cede..c2e6b5ead 100644 --- a/nms-patches/net/minecraft/world/inventory/ContainerEnchantTable.patch +++ b/nms-patches/net/minecraft/world/inventory/ContainerEnchantTable.patch @@ -1,11 +1,12 @@ ---- a/net/minecraft/server/ContainerEnchantTable.java -+++ b/net/minecraft/server/ContainerEnchantTable.java -@@ -3,6 +3,20 @@ - import java.util.List; - import java.util.Random; +--- a/net/minecraft/world/inventory/ContainerEnchantTable.java ++++ b/net/minecraft/world/inventory/ContainerEnchantTable.java +@@ -20,6 +20,21 @@ + import net.minecraft.world.item.enchantment.WeightedRandomEnchant; + import net.minecraft.world.level.block.Blocks; +// CraftBukkit start +import java.util.Map; ++import net.minecraft.world.item.enchantment.Enchantment; +import org.bukkit.Location; +import org.bukkit.NamespacedKey; +import org.bukkit.craftbukkit.inventory.CraftInventoryEnchanting; @@ -21,7 +22,7 @@ public class ContainerEnchantTable extends Container { private final IInventory enchantSlots; -@@ -12,6 +26,10 @@ +@@ -29,6 +44,10 @@ public final int[] costs; public final int[] enchantments; public final int[] levels; @@ -32,7 +33,7 @@ public ContainerEnchantTable(int i, PlayerInventory playerinventory) { this(i, playerinventory, ContainerAccess.a); -@@ -25,6 +43,13 @@ +@@ -42,6 +61,13 @@ super.update(); ContainerEnchantTable.this.a((IInventory) this); } @@ -46,7 +47,7 @@ }; this.h = new Random(); this.i = ContainerProperty.a(); -@@ -72,6 +97,9 @@ +@@ -89,6 +115,9 @@ this.a(ContainerProperty.a(this.levels, 0)); this.a(ContainerProperty.a(this.levels, 1)); this.a(ContainerProperty.a(this.levels, 2)); @@ -56,7 +57,7 @@ } @Override -@@ -79,7 +107,7 @@ +@@ -96,7 +125,7 @@ if (iinventory == this.enchantSlots) { ItemStack itemstack = iinventory.getItem(0); @@ -65,7 +66,7 @@ this.containerAccess.a((world, blockposition) -> { int i = 0; -@@ -135,12 +163,47 @@ +@@ -152,12 +181,47 @@ if (list != null && !list.isEmpty()) { WeightedRandomEnchant weightedrandomenchant = (WeightedRandomEnchant) list.get(this.h.nextInt(list.size())); @@ -114,7 +115,7 @@ this.c(); }); } else { -@@ -167,9 +230,24 @@ +@@ -184,9 +248,24 @@ ItemStack itemstack2 = itemstack; List list = this.a(itemstack, i, this.costs[i]); @@ -141,7 +142,7 @@ if (flag) { itemstack2 = new ItemStack(Items.ENCHANTED_BOOK); -@@ -182,16 +260,29 @@ +@@ -199,16 +278,29 @@ this.enchantSlots.setItem(0, itemstack2); } @@ -177,7 +178,7 @@ if (!entityhuman.abilities.canInstantlyBuild) { itemstack1.subtract(j); if (itemstack1.isEmpty()) { -@@ -238,6 +329,7 @@ +@@ -255,6 +347,7 @@ @Override public boolean canUse(EntityHuman entityhuman) { @@ -185,7 +186,7 @@ return a(this.containerAccess, entityhuman, Blocks.ENCHANTING_TABLE); } -@@ -289,4 +381,17 @@ +@@ -306,4 +399,17 @@ return itemstack; } diff --git a/nms-patches/net/minecraft/world/inventory/ContainerFurnace.patch b/nms-patches/net/minecraft/world/inventory/ContainerFurnace.patch index 5c6c8c83a..23ad45e6b 100644 --- a/nms-patches/net/minecraft/world/inventory/ContainerFurnace.patch +++ b/nms-patches/net/minecraft/world/inventory/ContainerFurnace.patch @@ -1,7 +1,8 @@ ---- a/net/minecraft/server/ContainerFurnace.java -+++ b/net/minecraft/server/ContainerFurnace.java -@@ -1,5 +1,10 @@ - package net.minecraft.server; +--- a/net/minecraft/world/inventory/ContainerFurnace.java ++++ b/net/minecraft/world/inventory/ContainerFurnace.java +@@ -14,6 +14,11 @@ + import net.minecraft.world.level.World; + import net.minecraft.world.level.block.entity.TileEntityFurnace; +// CraftBukkit start +import org.bukkit.craftbukkit.inventory.CraftInventoryFurnace; @@ -11,7 +12,7 @@ public abstract class ContainerFurnace extends ContainerRecipeBook { private final IInventory furnace; -@@ -8,6 +13,22 @@ +@@ -22,6 +27,22 @@ private final Recipes f; private final RecipeBookType g; @@ -34,7 +35,7 @@ protected ContainerFurnace(Containers containers, Recipes recipes, RecipeBookType recipebooktype, int i, PlayerInventory playerinventory) { this(containers, recipes, recipebooktype, i, playerinventory, new InventorySubcontainer(3), new ContainerProperties(4)); } -@@ -24,6 +45,7 @@ +@@ -38,6 +59,7 @@ this.a(new Slot(iinventory, 0, 56, 17)); this.a((Slot) (new SlotFurnaceFuel(this, iinventory, 1, 56, 53))); this.a((Slot) (new SlotFurnaceResult(playerinventory.player, iinventory, 2, 116, 35))); @@ -42,7 +43,7 @@ int j; -@@ -55,7 +77,7 @@ +@@ -69,7 +91,7 @@ @Override public void a(boolean flag, IRecipe irecipe, EntityPlayer entityplayer) { @@ -51,7 +52,7 @@ } @Override -@@ -80,6 +102,7 @@ +@@ -94,6 +116,7 @@ @Override public boolean canUse(EntityHuman entityhuman) { @@ -59,7 +60,7 @@ return this.furnace.a(entityhuman); } -@@ -135,7 +158,7 @@ +@@ -149,7 +172,7 @@ } protected boolean a(ItemStack itemstack) { diff --git a/nms-patches/net/minecraft/world/inventory/ContainerGrindstone.patch b/nms-patches/net/minecraft/world/inventory/ContainerGrindstone.patch index 69f9a45a5..d0a8ff735 100644 --- a/nms-patches/net/minecraft/world/inventory/ContainerGrindstone.patch +++ b/nms-patches/net/minecraft/world/inventory/ContainerGrindstone.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/ContainerGrindstone.java -+++ b/net/minecraft/server/ContainerGrindstone.java -@@ -5,8 +5,30 @@ - import java.util.Map.Entry; - import java.util.stream.Collectors; +--- a/net/minecraft/world/inventory/ContainerGrindstone.java ++++ b/net/minecraft/world/inventory/ContainerGrindstone.java +@@ -17,8 +17,30 @@ + import net.minecraft.world.level.World; + import net.minecraft.world.level.block.Blocks; +// CraftBukkit start +import org.bukkit.Location; @@ -31,7 +31,7 @@ private final IInventory resultInventory; private final IInventory craftInventory; private final ContainerAccess containerAccess; -@@ -24,6 +46,13 @@ +@@ -36,6 +58,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 +137,7 @@ +@@ -120,6 +149,7 @@ this.a(new Slot(playerinventory, j, 8 + j * 18, 142)); } @@ -53,7 +53,7 @@ } @Override -@@ -235,6 +265,7 @@ +@@ -247,6 +277,7 @@ @Override public boolean canUse(EntityHuman entityhuman) { diff --git a/nms-patches/net/minecraft/world/inventory/ContainerHopper.patch b/nms-patches/net/minecraft/world/inventory/ContainerHopper.patch index f125e0ec5..614add7d6 100644 --- a/nms-patches/net/minecraft/world/inventory/ContainerHopper.patch +++ b/nms-patches/net/minecraft/world/inventory/ContainerHopper.patch @@ -1,7 +1,8 @@ ---- a/net/minecraft/server/ContainerHopper.java -+++ b/net/minecraft/server/ContainerHopper.java -@@ -1,9 +1,30 @@ - package net.minecraft.server; +--- a/net/minecraft/world/inventory/ContainerHopper.java ++++ b/net/minecraft/world/inventory/ContainerHopper.java +@@ -6,10 +6,31 @@ + import net.minecraft.world.entity.player.PlayerInventory; + import net.minecraft.world.item.ItemStack; +// CraftBukkit start +import org.bukkit.craftbukkit.inventory.CraftInventory; @@ -31,7 +32,7 @@ public ContainerHopper(int i, PlayerInventory playerinventory) { this(i, playerinventory, new InventorySubcontainer(5)); } -@@ -11,6 +32,7 @@ +@@ -17,6 +38,7 @@ public ContainerHopper(int i, PlayerInventory playerinventory, IInventory iinventory) { super(Containers.HOPPER, i); this.hopper = iinventory; @@ -39,7 +40,7 @@ a(iinventory, 5); iinventory.startOpen(playerinventory.player); boolean flag = true; -@@ -35,6 +57,7 @@ +@@ -41,6 +63,7 @@ @Override public boolean canUse(EntityHuman entityhuman) { diff --git a/nms-patches/net/minecraft/world/inventory/ContainerHorse.patch b/nms-patches/net/minecraft/world/inventory/ContainerHorse.patch index 9294487a2..5b8a1202a 100644 --- a/nms-patches/net/minecraft/world/inventory/ContainerHorse.patch +++ b/nms-patches/net/minecraft/world/inventory/ContainerHorse.patch @@ -1,7 +1,8 @@ ---- a/net/minecraft/server/ContainerHorse.java -+++ b/net/minecraft/server/ContainerHorse.java -@@ -1,12 +1,32 @@ - package net.minecraft.server; +--- a/net/minecraft/world/inventory/ContainerHorse.java ++++ b/net/minecraft/world/inventory/ContainerHorse.java +@@ -9,13 +9,33 @@ + import net.minecraft.world.item.ItemStack; + import net.minecraft.world.item.Items; +// CraftBukkit start +import org.bukkit.craftbukkit.inventory.CraftInventoryView; diff --git a/nms-patches/net/minecraft/world/inventory/ContainerLectern.patch b/nms-patches/net/minecraft/world/inventory/ContainerLectern.patch index c0468cf79..40fbba3d6 100644 --- a/nms-patches/net/minecraft/world/inventory/ContainerLectern.patch +++ b/nms-patches/net/minecraft/world/inventory/ContainerLectern.patch @@ -1,9 +1,11 @@ ---- a/net/minecraft/server/ContainerLectern.java -+++ b/net/minecraft/server/ContainerLectern.java -@@ -1,15 +1,40 @@ - package net.minecraft.server; +--- a/net/minecraft/world/inventory/ContainerLectern.java ++++ b/net/minecraft/world/inventory/ContainerLectern.java +@@ -5,16 +5,42 @@ + import net.minecraft.world.entity.player.EntityHuman; + import net.minecraft.world.item.ItemStack; +// CraftBukkit start ++import net.minecraft.world.entity.player.PlayerInventory; +import org.bukkit.Bukkit; +import org.bukkit.craftbukkit.inventory.CraftInventoryLectern; +import org.bukkit.craftbukkit.inventory.CraftInventoryView; @@ -44,7 +46,7 @@ super(Containers.LECTERN, i); a(iinventory, 1); a(icontainerproperties, 1); -@@ -23,6 +48,7 @@ +@@ -28,6 +54,7 @@ } }); this.a(icontainerproperties); @@ -52,7 +54,7 @@ } @Override -@@ -48,6 +74,13 @@ +@@ -53,6 +80,13 @@ return false; } @@ -66,7 +68,7 @@ ItemStack itemstack = this.inventory.splitWithoutUpdate(0); this.inventory.update(); -@@ -70,6 +103,7 @@ +@@ -75,6 +109,7 @@ @Override public boolean canUse(EntityHuman entityhuman) { diff --git a/nms-patches/net/minecraft/world/inventory/ContainerLoom.patch b/nms-patches/net/minecraft/world/inventory/ContainerLoom.patch index 0b0f1f1f2..1c6fb8761 100644 --- a/nms-patches/net/minecraft/world/inventory/ContainerLoom.patch +++ b/nms-patches/net/minecraft/world/inventory/ContainerLoom.patch @@ -1,7 +1,8 @@ ---- a/net/minecraft/server/ContainerLoom.java -+++ b/net/minecraft/server/ContainerLoom.java -@@ -1,7 +1,29 @@ - package net.minecraft.server; +--- a/net/minecraft/world/inventory/ContainerLoom.java ++++ b/net/minecraft/world/inventory/ContainerLoom.java +@@ -16,8 +16,30 @@ + import net.minecraft.world.level.block.Blocks; + import net.minecraft.world.level.block.entity.EnumBannerPatternType; +// CraftBukkit start +import org.bukkit.Location; @@ -30,7 +31,7 @@ private final ContainerAccess containerAccess; private final ContainerProperty d; private Runnable e; -@@ -29,6 +51,13 @@ +@@ -45,6 +67,13 @@ ContainerLoom.this.a((IInventory) this); ContainerLoom.this.e.run(); } @@ -44,7 +45,7 @@ }; this.resultInventory = new InventorySubcontainer(1) { @Override -@@ -36,6 +65,13 @@ +@@ -52,6 +81,13 @@ super.update(); ContainerLoom.this.e.run(); } @@ -58,7 +59,7 @@ }; this.containerAccess = containeraccess; this.f = this.a(new Slot(this.craftInventory, 0, 13, 26) { -@@ -96,10 +132,12 @@ +@@ -112,10 +148,12 @@ } this.a(this.d); @@ -71,7 +72,7 @@ return a(this.containerAccess, entityhuman, Blocks.LOOM); } -@@ -218,6 +256,11 @@ +@@ -234,6 +272,11 @@ if (nbttagcompound.hasKeyOfType("Patterns", 9)) { nbttaglist = nbttagcompound.getList("Patterns", 10); diff --git a/nms-patches/net/minecraft/world/inventory/ContainerMerchant.patch b/nms-patches/net/minecraft/world/inventory/ContainerMerchant.patch index 1d4f7f529..7aacac9a8 100644 --- a/nms-patches/net/minecraft/world/inventory/ContainerMerchant.patch +++ b/nms-patches/net/minecraft/world/inventory/ContainerMerchant.patch @@ -1,7 +1,8 @@ ---- a/net/minecraft/server/ContainerMerchant.java -+++ b/net/minecraft/server/ContainerMerchant.java -@@ -1,10 +1,25 @@ - package net.minecraft.server; +--- a/net/minecraft/world/inventory/ContainerMerchant.java ++++ b/net/minecraft/world/inventory/ContainerMerchant.java +@@ -12,11 +12,26 @@ + import net.minecraft.world.item.trading.MerchantRecipe; + import net.minecraft.world.item.trading.MerchantRecipeList; +import org.bukkit.craftbukkit.inventory.CraftInventoryView; // CraftBukkit + @@ -26,7 +27,7 @@ public ContainerMerchant(int i, PlayerInventory playerinventory) { this(i, playerinventory, new MerchantWrapper(playerinventory.player)); } -@@ -16,6 +31,7 @@ +@@ -28,6 +43,7 @@ this.a(new Slot(this.inventoryMerchant, 0, 136, 37)); this.a(new Slot(this.inventoryMerchant, 1, 162, 37)); this.a((Slot) (new SlotMerchantResult(playerinventory.player, imerchant, this.inventoryMerchant, 2, 220, 37))); @@ -34,7 +35,7 @@ int j; -@@ -96,7 +112,7 @@ +@@ -108,7 +124,7 @@ } private void k() { diff --git a/nms-patches/net/minecraft/world/inventory/ContainerPlayer.patch b/nms-patches/net/minecraft/world/inventory/ContainerPlayer.patch index e24a97afc..5b38fc924 100644 --- a/nms-patches/net/minecraft/world/inventory/ContainerPlayer.patch +++ b/nms-patches/net/minecraft/world/inventory/ContainerPlayer.patch @@ -1,9 +1,11 @@ ---- a/net/minecraft/server/ContainerPlayer.java -+++ b/net/minecraft/server/ContainerPlayer.java -@@ -1,5 +1,10 @@ - package net.minecraft.server; +--- a/net/minecraft/world/inventory/ContainerPlayer.java ++++ b/net/minecraft/world/inventory/ContainerPlayer.java +@@ -11,6 +11,12 @@ + import net.minecraft.world.item.crafting.IRecipe; + import net.minecraft.world.item.enchantment.EnchantmentManager; +// CraftBukkit start ++import net.minecraft.network.chat.ChatMessage; +import org.bukkit.craftbukkit.inventory.CraftInventoryCrafting; +import org.bukkit.craftbukkit.inventory.CraftInventoryView; +// CraftBukkit end @@ -11,7 +13,7 @@ public class ContainerPlayer extends ContainerRecipeBook { public static final MinecraftKey c = new MinecraftKey("textures/atlas/blocks.png"); -@@ -10,15 +15,28 @@ +@@ -21,15 +27,28 @@ public static final MinecraftKey h = new MinecraftKey("item/empty_armor_slot_shield"); private static final MinecraftKey[] j = new MinecraftKey[]{ContainerPlayer.g, ContainerPlayer.f, ContainerPlayer.e, ContainerPlayer.d}; private static final EnumItemSlot[] k = new EnumItemSlot[]{EnumItemSlot.HEAD, EnumItemSlot.CHEST, EnumItemSlot.LEGS, EnumItemSlot.FEET}; @@ -42,7 +44,7 @@ this.a((Slot) (new SlotResult(playerinventory.player, this.craftInventory, this.resultInventory, 0, 154, 28))); int i; -@@ -85,7 +103,7 @@ +@@ -96,7 +115,7 @@ @Override public void a(IInventory iinventory) { @@ -51,7 +53,7 @@ } @Override -@@ -192,4 +210,17 @@ +@@ -203,4 +222,17 @@ public InventoryCrafting j() { return this.craftInventory; } diff --git a/nms-patches/net/minecraft/world/inventory/ContainerShulkerBox.patch b/nms-patches/net/minecraft/world/inventory/ContainerShulkerBox.patch index 1c59f08b2..da36899a1 100644 --- a/nms-patches/net/minecraft/world/inventory/ContainerShulkerBox.patch +++ b/nms-patches/net/minecraft/world/inventory/ContainerShulkerBox.patch @@ -1,7 +1,8 @@ ---- a/net/minecraft/server/ContainerShulkerBox.java -+++ b/net/minecraft/server/ContainerShulkerBox.java -@@ -1,8 +1,27 @@ - package net.minecraft.server; +--- a/net/minecraft/world/inventory/ContainerShulkerBox.java ++++ b/net/minecraft/world/inventory/ContainerShulkerBox.java +@@ -6,9 +6,28 @@ + import net.minecraft.world.entity.player.PlayerInventory; + import net.minecraft.world.item.ItemStack; +// CraftBukkit start +import org.bukkit.craftbukkit.inventory.CraftInventory; @@ -28,7 +29,7 @@ public ContainerShulkerBox(int i, PlayerInventory playerinventory) { this(i, playerinventory, new InventorySubcontainer(27)); -@@ -12,6 +31,7 @@ +@@ -18,6 +37,7 @@ super(Containers.SHULKER_BOX, i); a(iinventory, 27); this.c = iinventory; diff --git a/nms-patches/net/minecraft/world/inventory/ContainerSmithing.patch b/nms-patches/net/minecraft/world/inventory/ContainerSmithing.patch index d9dd6db03..92550150f 100644 --- a/nms-patches/net/minecraft/world/inventory/ContainerSmithing.patch +++ b/nms-patches/net/minecraft/world/inventory/ContainerSmithing.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/ContainerSmithing.java -+++ b/net/minecraft/server/ContainerSmithing.java -@@ -3,12 +3,17 @@ - import java.util.List; - import javax.annotation.Nullable; +--- a/net/minecraft/world/inventory/ContainerSmithing.java ++++ b/net/minecraft/world/inventory/ContainerSmithing.java +@@ -12,12 +12,17 @@ + import net.minecraft.world.level.block.Blocks; + import net.minecraft.world.level.block.state.IBlockData; +import org.bukkit.craftbukkit.inventory.CraftInventoryView; // CraftBukkit + @@ -18,7 +18,7 @@ public ContainerSmithing(int i, PlayerInventory playerinventory) { this(i, playerinventory, ContainerAccess.a); -@@ -54,13 +59,13 @@ +@@ -63,13 +68,13 @@ List list = this.g.getCraftingManager().b(Recipes.SMITHING, this.repairInventory, this.g); if (list.isEmpty()) { @@ -34,7 +34,7 @@ } } -@@ -76,4 +81,18 @@ +@@ -85,4 +90,18 @@ public boolean a(ItemStack itemstack, Slot slot) { return slot.inventory != this.resultInventory && super.a(itemstack, slot); } diff --git a/nms-patches/net/minecraft/world/inventory/ContainerStonecutter.patch b/nms-patches/net/minecraft/world/inventory/ContainerStonecutter.patch index 8897fd625..1a577f672 100644 --- a/nms-patches/net/minecraft/world/inventory/ContainerStonecutter.patch +++ b/nms-patches/net/minecraft/world/inventory/ContainerStonecutter.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/ContainerStonecutter.java -+++ b/net/minecraft/server/ContainerStonecutter.java -@@ -3,6 +3,13 @@ - import com.google.common.collect.Lists; - import java.util.List; +--- a/net/minecraft/world/inventory/ContainerStonecutter.java ++++ b/net/minecraft/world/inventory/ContainerStonecutter.java +@@ -16,6 +16,13 @@ + import net.minecraft.world.level.World; + import net.minecraft.world.level.block.Blocks; +// CraftBukkit start +import org.bukkit.Location; @@ -14,7 +14,7 @@ public class ContainerStonecutter extends Container { private final ContainerAccess containerAccess; -@@ -16,6 +23,21 @@ +@@ -29,6 +36,21 @@ private Runnable l; public final IInventory inventory; private final InventoryCraftResult resultInventory; @@ -36,7 +36,7 @@ public ContainerStonecutter(int i, PlayerInventory playerinventory) { this(i, playerinventory, ContainerAccess.a); -@@ -35,6 +57,13 @@ +@@ -48,6 +70,13 @@ ContainerStonecutter.this.a((IInventory) this); ContainerStonecutter.this.l.run(); } @@ -50,7 +50,7 @@ }; this.resultInventory = new InventoryCraftResult(); this.containerAccess = containeraccess; -@@ -82,10 +111,12 @@ +@@ -95,10 +124,12 @@ } this.a(this.containerProperty); diff --git a/nms-patches/net/minecraft/world/inventory/ContainerWorkbench.patch b/nms-patches/net/minecraft/world/inventory/ContainerWorkbench.patch index a338ab568..655755765 100644 --- a/nms-patches/net/minecraft/world/inventory/ContainerWorkbench.patch +++ b/nms-patches/net/minecraft/world/inventory/ContainerWorkbench.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/ContainerWorkbench.java -+++ b/net/minecraft/server/ContainerWorkbench.java -@@ -2,12 +2,21 @@ - - import java.util.Optional; +--- a/net/minecraft/world/inventory/ContainerWorkbench.java ++++ b/net/minecraft/world/inventory/ContainerWorkbench.java +@@ -14,12 +14,21 @@ + import net.minecraft.world.level.World; + import net.minecraft.world.level.block.Blocks; +// CraftBukkit start +import org.bukkit.craftbukkit.inventory.CraftInventoryCrafting; @@ -22,7 +22,7 @@ public ContainerWorkbench(int i, PlayerInventory playerinventory) { this(i, playerinventory, ContainerAccess.a); -@@ -15,8 +24,12 @@ +@@ -27,8 +36,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 +55,7 @@ +@@ -54,7 +67,7 @@ } @@ -45,7 +45,7 @@ if (!world.isClientSide) { EntityPlayer entityplayer = (EntityPlayer) entityhuman; ItemStack itemstack = ItemStack.b; -@@ -55,6 +68,7 @@ +@@ -67,6 +80,7 @@ itemstack = recipecrafting.a(inventorycrafting); } } @@ -53,7 +53,7 @@ inventorycraftresult.setItem(0, itemstack); entityplayer.playerConnection.sendPacket(new PacketPlayOutSetSlot(i, 0, itemstack)); -@@ -64,7 +78,7 @@ +@@ -76,7 +90,7 @@ @Override public void a(IInventory iinventory) { this.containerAccess.a((world, blockposition) -> { @@ -62,7 +62,7 @@ }); } -@@ -94,6 +108,7 @@ +@@ -106,6 +120,7 @@ @Override public boolean canUse(EntityHuman entityhuman) { @@ -70,7 +70,7 @@ return a(this.containerAccess, entityhuman, Blocks.CRAFTING_TABLE); } -@@ -168,4 +183,17 @@ +@@ -180,4 +195,17 @@ public int h() { return this.craftInventory.f(); } diff --git a/nms-patches/net/minecraft/world/inventory/Containers.patch b/nms-patches/net/minecraft/world/inventory/Containers.patch index 60a5b5b4b..2e6d88167 100644 --- a/nms-patches/net/minecraft/world/inventory/Containers.patch +++ b/nms-patches/net/minecraft/world/inventory/Containers.patch @@ -1,6 +1,17 @@ ---- a/net/minecraft/server/Containers.java -+++ b/net/minecraft/server/Containers.java -@@ -19,7 +19,7 @@ +--- a/net/minecraft/world/inventory/Containers.java ++++ b/net/minecraft/world/inventory/Containers.java +@@ -2,6 +2,10 @@ + + import net.minecraft.core.IRegistry; + ++// CraftBukkit start ++import net.minecraft.world.entity.player.PlayerInventory; ++// CraftBukkit end ++ + public class Containers { + + public static final Containers GENERIC_9X1 = a("generic_9x1", ContainerChest::a); +@@ -21,7 +25,7 @@ public static final Containers GRINDSTONE = a("grindstone", ContainerGrindstone::new); public static final Containers HOPPER = a("hopper", ContainerHopper::new); public static final Containers LECTERN = a("lectern", (i, playerinventory) -> { @@ -9,7 +20,7 @@ }); public static final Containers LOOM = a("loom", ContainerLoom::new); public static final Containers MERCHANT = a("merchant", ContainerMerchant::new); -@@ -31,12 +31,17 @@ +@@ -33,12 +37,17 @@ private final Containers.Supplier y; private static Containers a(String s, Containers.Supplier containers_supplier) { diff --git a/nms-patches/net/minecraft/world/inventory/InventoryCraftResult.patch b/nms-patches/net/minecraft/world/inventory/InventoryCraftResult.patch index b2a2198b9..5deafc65f 100644 --- a/nms-patches/net/minecraft/world/inventory/InventoryCraftResult.patch +++ b/nms-patches/net/minecraft/world/inventory/InventoryCraftResult.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/InventoryCraftResult.java -+++ b/net/minecraft/server/InventoryCraftResult.java -@@ -3,12 +3,51 @@ - import java.util.Iterator; - import javax.annotation.Nullable; +--- a/net/minecraft/world/inventory/InventoryCraftResult.java ++++ b/net/minecraft/world/inventory/InventoryCraftResult.java +@@ -9,12 +9,51 @@ + import net.minecraft.world.item.ItemStack; + import net.minecraft.world.item.crafting.IRecipe; +// CraftBukkit start +import org.bukkit.Location; diff --git a/nms-patches/net/minecraft/world/inventory/InventoryCrafting.patch b/nms-patches/net/minecraft/world/inventory/InventoryCrafting.patch index 3d8ece0c4..a772db826 100644 --- a/nms-patches/net/minecraft/world/inventory/InventoryCrafting.patch +++ b/nms-patches/net/minecraft/world/inventory/InventoryCrafting.patch @@ -1,13 +1,13 @@ ---- a/net/minecraft/server/InventoryCrafting.java -+++ b/net/minecraft/server/InventoryCrafting.java -@@ -2,6 +2,15 @@ - - import java.util.Iterator; +--- a/net/minecraft/world/inventory/InventoryCrafting.java ++++ b/net/minecraft/world/inventory/InventoryCrafting.java +@@ -8,6 +8,15 @@ + import net.minecraft.world.entity.player.EntityHuman; + import net.minecraft.world.item.ItemStack; +// CraftBukkit start +import java.util.List; ++import net.minecraft.world.item.crafting.IRecipe; +import org.bukkit.Location; -+ +import org.bukkit.craftbukkit.entity.CraftHumanEntity; +import org.bukkit.entity.HumanEntity; +import org.bukkit.event.inventory.InventoryType; @@ -16,7 +16,7 @@ public class InventoryCrafting implements IInventory, AutoRecipeOutput { private final NonNullList items; -@@ -9,6 +18,68 @@ +@@ -15,6 +24,68 @@ private final int c; public final Container container; diff --git a/nms-patches/net/minecraft/world/inventory/InventoryEnderChest.patch b/nms-patches/net/minecraft/world/inventory/InventoryEnderChest.patch index 753c934b5..3ff6e1883 100644 --- a/nms-patches/net/minecraft/world/inventory/InventoryEnderChest.patch +++ b/nms-patches/net/minecraft/world/inventory/InventoryEnderChest.patch @@ -1,7 +1,8 @@ ---- a/net/minecraft/server/InventoryEnderChest.java -+++ b/net/minecraft/server/InventoryEnderChest.java -@@ -1,11 +1,29 @@ - package net.minecraft.server; +--- a/net/minecraft/world/inventory/InventoryEnderChest.java ++++ b/net/minecraft/world/inventory/InventoryEnderChest.java +@@ -7,12 +7,30 @@ + import net.minecraft.world.item.ItemStack; + import net.minecraft.world.level.block.entity.TileEntityEnderChest; +// CraftBukkit start +import org.bukkit.Location; diff --git a/nms-patches/net/minecraft/world/inventory/InventoryMerchant.patch b/nms-patches/net/minecraft/world/inventory/InventoryMerchant.patch index 0319be933..d362b99ce 100644 --- a/nms-patches/net/minecraft/world/inventory/InventoryMerchant.patch +++ b/nms-patches/net/minecraft/world/inventory/InventoryMerchant.patch @@ -1,11 +1,13 @@ ---- a/net/minecraft/server/InventoryMerchant.java -+++ b/net/minecraft/server/InventoryMerchant.java -@@ -3,6 +3,14 @@ - import java.util.Iterator; - import javax.annotation.Nullable; +--- a/net/minecraft/world/inventory/InventoryMerchant.java ++++ b/net/minecraft/world/inventory/InventoryMerchant.java +@@ -11,6 +11,16 @@ + import net.minecraft.world.item.trading.MerchantRecipe; + import net.minecraft.world.item.trading.MerchantRecipeList; +// CraftBukkit start +import java.util.List; ++import net.minecraft.world.entity.npc.EntityVillager; ++import net.minecraft.world.entity.npc.EntityVillagerAbstract; +import org.bukkit.Location; +import org.bukkit.craftbukkit.entity.CraftHumanEntity; +import org.bukkit.craftbukkit.entity.CraftAbstractVillager; @@ -15,7 +17,7 @@ public class InventoryMerchant implements IInventory { private final IMerchant merchant; -@@ -12,6 +20,46 @@ +@@ -20,6 +30,46 @@ public int selectedIndex; private int e; diff --git a/nms-patches/net/minecraft/world/inventory/SlotFurnaceResult.patch b/nms-patches/net/minecraft/world/inventory/SlotFurnaceResult.patch index 59777958c..08d3badc3 100644 --- a/nms-patches/net/minecraft/world/inventory/SlotFurnaceResult.patch +++ b/nms-patches/net/minecraft/world/inventory/SlotFurnaceResult.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/SlotFurnaceResult.java -+++ b/net/minecraft/server/SlotFurnaceResult.java -@@ -41,7 +41,7 @@ +--- a/net/minecraft/world/inventory/SlotFurnaceResult.java ++++ b/net/minecraft/world/inventory/SlotFurnaceResult.java +@@ -46,7 +46,7 @@ protected void c(ItemStack itemstack) { itemstack.a(this.a.world, this.a, this.b); if (!this.a.world.isClientSide && this.inventory instanceof TileEntityFurnace) { diff --git a/nms-patches/net/minecraft/world/item/ItemArmor.patch b/nms-patches/net/minecraft/world/item/ItemArmor.patch index ea82db9e7..cc0ce2b7d 100644 --- a/nms-patches/net/minecraft/world/item/ItemArmor.patch +++ b/nms-patches/net/minecraft/world/item/ItemArmor.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/ItemArmor.java -+++ b/net/minecraft/server/ItemArmor.java -@@ -6,6 +6,11 @@ - import java.util.List; - import java.util.UUID; +--- a/net/minecraft/world/item/ItemArmor.java ++++ b/net/minecraft/world/item/ItemArmor.java +@@ -25,6 +25,11 @@ + import net.minecraft.world.level.block.BlockDispenser; + import net.minecraft.world.phys.AxisAlignedBB; +// CraftBukkit start +import org.bukkit.craftbukkit.inventory.CraftItemStack; @@ -12,7 +12,7 @@ public class ItemArmor extends Item implements ItemWearable { private static final UUID[] j = new UUID[]{UUID.fromString("845DB27C-C624-495F-8C9F-6020A9A58B6B"), UUID.fromString("D8499B04-0E66-4726-AB29-64469D734E0D"), UUID.fromString("9F3D476D-C118-4544-8365-64846904B48E"), UUID.fromString("2AD3F246-FEE1-4E67-B886-69FD380BB150")}; -@@ -32,6 +37,32 @@ +@@ -51,6 +56,32 @@ EntityLiving entityliving = (EntityLiving) list.get(0); EnumItemSlot enumitemslot = EntityInsentient.j(itemstack); ItemStack itemstack1 = itemstack.cloneAndSubtract(1); diff --git a/nms-patches/net/minecraft/world/item/ItemArmorStand.patch b/nms-patches/net/minecraft/world/item/ItemArmorStand.patch index 08a1a16f6..8dd2db508 100644 --- a/nms-patches/net/minecraft/world/item/ItemArmorStand.patch +++ b/nms-patches/net/minecraft/world/item/ItemArmorStand.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/ItemArmorStand.java -+++ b/net/minecraft/server/ItemArmorStand.java -@@ -38,6 +38,11 @@ +--- a/net/minecraft/world/item/ItemArmorStand.java ++++ b/net/minecraft/world/item/ItemArmorStand.java +@@ -58,6 +58,11 @@ entityarmorstand.setPositionRotation(entityarmorstand.locX(), entityarmorstand.locY(), entityarmorstand.locZ(), f, 0.0F); this.a(entityarmorstand, world.random); diff --git a/nms-patches/net/minecraft/world/item/ItemBlock.patch b/nms-patches/net/minecraft/world/item/ItemBlock.patch index 5cd83d6f7..9dca71cec 100644 --- a/nms-patches/net/minecraft/world/item/ItemBlock.patch +++ b/nms-patches/net/minecraft/world/item/ItemBlock.patch @@ -1,10 +1,11 @@ ---- a/net/minecraft/server/ItemBlock.java -+++ b/net/minecraft/server/ItemBlock.java -@@ -4,6 +4,12 @@ - import java.util.Map; - import javax.annotation.Nullable; +--- a/net/minecraft/world/item/ItemBlock.java ++++ b/net/minecraft/world/item/ItemBlock.java +@@ -25,6 +25,13 @@ + import net.minecraft.world.level.block.state.properties.IBlockState; + import net.minecraft.world.phys.shapes.VoxelShapeCollision; +// CraftBukkit start ++import net.minecraft.server.level.WorldServer; +import org.bukkit.craftbukkit.block.CraftBlock; +import org.bukkit.craftbukkit.block.data.CraftBlockData; +import org.bukkit.event.block.BlockCanBuildEvent; @@ -13,7 +14,7 @@ public class ItemBlock extends Item { @Deprecated -@@ -31,6 +37,12 @@ +@@ -52,6 +59,12 @@ return EnumInteractionResult.FAIL; } else { IBlockData iblockdata = this.c(blockactioncontext1); @@ -26,7 +27,7 @@ if (iblockdata == null) { return EnumInteractionResult.FAIL; -@@ -48,6 +60,15 @@ +@@ -69,6 +82,15 @@ iblockdata1 = this.a(blockposition, world, itemstack, iblockdata1); this.a(blockposition, world, entityhuman, itemstack, iblockdata1); block.postPlace(world, blockposition, iblockdata1, entityhuman, itemstack); @@ -42,7 +43,7 @@ if (entityhuman instanceof EntityPlayer) { CriterionTriggers.y.a((EntityPlayer) entityhuman, blockposition, itemstack); } -@@ -55,8 +76,8 @@ +@@ -76,8 +98,8 @@ SoundEffectType soundeffecttype = iblockdata1.getStepSound(); @@ -53,7 +54,7 @@ itemstack.subtract(1); } -@@ -92,6 +113,21 @@ +@@ -113,6 +135,21 @@ if (nbttagcompound != null) { NBTTagCompound nbttagcompound1 = nbttagcompound.getCompound("BlockStateTag"); @@ -75,7 +76,7 @@ BlockStateList blockstatelist = iblockdata.getBlock().getStates(); Iterator iterator = nbttagcompound1.getKeys().iterator(); -@@ -106,11 +142,6 @@ +@@ -127,11 +164,6 @@ } } } @@ -87,7 +88,7 @@ return iblockdata1; } -@@ -123,8 +154,15 @@ +@@ -144,8 +176,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/net/minecraft/world/item/ItemBoat.patch b/nms-patches/net/minecraft/world/item/ItemBoat.patch index c8556d1bf..374169f7b 100644 --- a/nms-patches/net/minecraft/world/item/ItemBoat.patch +++ b/nms-patches/net/minecraft/world/item/ItemBoat.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/ItemBoat.java -+++ b/net/minecraft/server/ItemBoat.java -@@ -41,6 +41,13 @@ +--- a/net/minecraft/world/item/ItemBoat.java ++++ b/net/minecraft/world/item/ItemBoat.java +@@ -54,6 +54,13 @@ } if (movingobjectpositionblock.getType() == MovingObjectPosition.EnumMovingObjectType.BLOCK) { @@ -8,13 +8,13 @@ + org.bukkit.event.player.PlayerInteractEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(entityhuman, org.bukkit.event.block.Action.RIGHT_CLICK_BLOCK, movingobjectpositionblock.getBlockPosition(), movingobjectpositionblock.getDirection(), itemstack, enumhand); + + if (event.isCancelled()) { -+ return new InteractionResultWrapper(EnumInteractionResult.PASS, itemstack); ++ return InteractionResultWrapper.pass(itemstack); + } + // CraftBukkit end EntityBoat entityboat = new EntityBoat(world, movingobjectpositionblock.getPos().x, movingobjectpositionblock.getPos().y, movingobjectpositionblock.getPos().z); entityboat.setType(this.b); -@@ -49,7 +56,15 @@ +@@ -62,7 +69,15 @@ return InteractionResultWrapper.fail(itemstack); } else { if (!world.isClientSide) { @@ -25,7 +25,7 @@ + } + + if (!world.addEntity(entityboat)) { -+ return new InteractionResultWrapper(EnumInteractionResult.PASS, itemstack); ++ return InteractionResultWrapper.pass(itemstack); + } + // CraftBukkit end if (!entityhuman.abilities.canInstantlyBuild) { diff --git a/nms-patches/net/minecraft/world/item/ItemBoneMeal.patch b/nms-patches/net/minecraft/world/item/ItemBoneMeal.patch index cae44479a..c53009f8f 100644 --- a/nms-patches/net/minecraft/world/item/ItemBoneMeal.patch +++ b/nms-patches/net/minecraft/world/item/ItemBoneMeal.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/ItemBoneMeal.java -+++ b/net/minecraft/server/ItemBoneMeal.java -@@ -12,6 +12,12 @@ +--- a/net/minecraft/world/item/ItemBoneMeal.java ++++ b/net/minecraft/world/item/ItemBoneMeal.java +@@ -28,6 +28,12 @@ @Override public EnumInteractionResult a(ItemActionContext itemactioncontext) { diff --git a/nms-patches/net/minecraft/world/item/ItemBow.patch b/nms-patches/net/minecraft/world/item/ItemBow.patch index 4589cf710..74780fa95 100644 --- a/nms-patches/net/minecraft/world/item/ItemBow.patch +++ b/nms-patches/net/minecraft/world/item/ItemBow.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/ItemBow.java -+++ b/net/minecraft/server/ItemBow.java -@@ -50,6 +50,14 @@ +--- a/net/minecraft/world/item/ItemBow.java ++++ b/net/minecraft/world/item/ItemBow.java +@@ -61,6 +61,14 @@ if (EnchantmentManager.getEnchantmentLevel(Enchantments.ARROW_FIRE, itemstack) > 0) { entityarrow.setOnFire(100); } @@ -15,7 +15,7 @@ itemstack.damage(1, entityhuman, (entityhuman1) -> { entityhuman1.broadcastItemBreak(entityhuman.getRaisedHand()); -@@ -58,7 +66,16 @@ +@@ -69,7 +77,16 @@ entityarrow.fromPlayer = EntityArrow.PickupStatus.CREATIVE_ONLY; } @@ -23,8 +23,8 @@ + // CraftBukkit start + if (event.getProjectile() == entityarrow.getBukkitEntity()) { + if (!world.addEntity(entityarrow)) { -+ if (entityhuman instanceof EntityPlayer) { -+ ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); ++ if (entityhuman instanceof net.minecraft.server.level.EntityPlayer) { ++ ((net.minecraft.server.level.EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); + } + return; + } diff --git a/nms-patches/net/minecraft/world/item/ItemBucket.patch b/nms-patches/net/minecraft/world/item/ItemBucket.patch index 9a4a1a9fb..48ddfaeb4 100644 --- a/nms-patches/net/minecraft/world/item/ItemBucket.patch +++ b/nms-patches/net/minecraft/world/item/ItemBucket.patch @@ -1,10 +1,12 @@ ---- a/net/minecraft/server/ItemBucket.java -+++ b/net/minecraft/server/ItemBucket.java -@@ -2,6 +2,14 @@ - - import javax.annotation.Nullable; +--- a/net/minecraft/world/item/ItemBucket.java ++++ b/net/minecraft/world/item/ItemBucket.java +@@ -29,6 +29,16 @@ + import net.minecraft.world.phys.MovingObjectPosition; + import net.minecraft.world.phys.MovingObjectPositionBlock; +// CraftBukkit start ++import net.minecraft.network.protocol.game.PacketPlayOutBlockChange; ++import net.minecraft.server.level.WorldServer; +import org.bukkit.craftbukkit.event.CraftEventFactory; +import org.bukkit.craftbukkit.inventory.CraftItemStack; +import org.bukkit.craftbukkit.util.DummyGeneratorAccess; @@ -15,7 +17,7 @@ public class ItemBucket extends Item { public final FluidType fluidType; -@@ -32,12 +40,22 @@ +@@ -59,12 +69,22 @@ if (this.fluidType == FluidTypes.EMPTY) { iblockdata = world.getType(blockposition); if (iblockdata.getBlock() instanceof IFluidSource) { @@ -26,7 +28,7 @@ + if (event.isCancelled()) { + ((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutBlockChange(world, blockposition)); // SPIGOT-5163 (see PlayerInteractManager) + ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); // SPIGOT-4541 -+ return new InteractionResultWrapper(EnumInteractionResult.FAIL, itemstack); ++ return InteractionResultWrapper.fail(itemstack); + } + // CraftBukkit end FluidType fluidtype = ((IFluidSource) iblockdata.getBlock()).removeFluid(world, blockposition, iblockdata); @@ -39,7 +41,7 @@ if (!world.isClientSide) { CriterionTriggers.j.a((EntityPlayer) entityhuman, new ItemStack(fluidtype.a())); -@@ -52,7 +70,7 @@ +@@ -79,7 +99,7 @@ iblockdata = world.getType(blockposition); BlockPosition blockposition2 = iblockdata.getBlock() instanceof IFluidContainer && this.fluidType == FluidTypes.WATER ? blockposition : blockposition1; @@ -48,7 +50,7 @@ this.a(world, itemstack, blockposition2); if (entityhuman instanceof EntityPlayer) { CriterionTriggers.y.a((EntityPlayer) entityhuman, blockposition2, itemstack); -@@ -77,6 +95,11 @@ +@@ -104,6 +124,11 @@ public void a(World world, ItemStack itemstack, BlockPosition blockposition) {} public boolean a(@Nullable EntityHuman entityhuman, World world, BlockPosition blockposition, @Nullable MovingObjectPositionBlock movingobjectpositionblock) { @@ -60,7 +62,7 @@ if (!(this.fluidType instanceof FluidTypeFlowing)) { return false; } else { -@@ -86,8 +109,18 @@ +@@ -113,8 +138,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/net/minecraft/world/item/ItemChorusFruit.patch b/nms-patches/net/minecraft/world/item/ItemChorusFruit.patch index 5991670c6..1a296a4db 100644 --- a/nms-patches/net/minecraft/world/item/ItemChorusFruit.patch +++ b/nms-patches/net/minecraft/world/item/ItemChorusFruit.patch @@ -1,9 +1,11 @@ ---- a/net/minecraft/server/ItemChorusFruit.java -+++ b/net/minecraft/server/ItemChorusFruit.java -@@ -1,5 +1,11 @@ - package net.minecraft.server; +--- a/net/minecraft/world/item/ItemChorusFruit.java ++++ b/net/minecraft/world/item/ItemChorusFruit.java +@@ -9,6 +9,13 @@ + import net.minecraft.world.entity.player.EntityHuman; + import net.minecraft.world.level.World; +// CraftBukkit start ++import net.minecraft.server.level.EntityPlayer; +import org.bukkit.Location; +import org.bukkit.entity.Player; +import org.bukkit.event.player.PlayerTeleportEvent; @@ -12,7 +14,7 @@ public class ItemChorusFruit extends Item { public ItemChorusFruit(Item.Info item_info) { -@@ -20,6 +26,20 @@ +@@ -29,6 +36,20 @@ double d4 = MathHelper.a(entityliving.locY() + (double) (entityliving.getRandom().nextInt(16) - 8), 0.0D, (double) (world.getHeight() - 1)); double d5 = entityliving.locZ() + (entityliving.getRandom().nextDouble() - 0.5D) * 16.0D; diff --git a/nms-patches/net/minecraft/world/item/ItemCrossbow.patch b/nms-patches/net/minecraft/world/item/ItemCrossbow.patch index a5e932b4e..09dc5d865 100644 --- a/nms-patches/net/minecraft/world/item/ItemCrossbow.patch +++ b/nms-patches/net/minecraft/world/item/ItemCrossbow.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/ItemCrossbow.java -+++ b/net/minecraft/server/ItemCrossbow.java -@@ -74,6 +74,10 @@ +--- a/net/minecraft/world/item/ItemCrossbow.java ++++ b/net/minecraft/world/item/ItemCrossbow.java +@@ -97,6 +97,10 @@ if (itemstack1.isEmpty() && flag) { itemstack1 = new ItemStack(Items.ARROW); itemstack2 = itemstack1.cloneItemStack(); @@ -11,7 +11,7 @@ } if (!a(entityliving, itemstack, itemstack1, k > 0, flag)) { -@@ -198,11 +202,27 @@ +@@ -221,11 +225,27 @@ vector3fa.a(quaternion); ((IProjectile) object).shoot((double) vector3fa.a(), (double) vector3fa.b(), (double) vector3fa.c(), f1, f2); } diff --git a/nms-patches/net/minecraft/world/item/ItemDye.patch b/nms-patches/net/minecraft/world/item/ItemDye.patch index cf5da62a5..dea43b22f 100644 --- a/nms-patches/net/minecraft/world/item/ItemDye.patch +++ b/nms-patches/net/minecraft/world/item/ItemDye.patch @@ -1,15 +1,15 @@ ---- a/net/minecraft/server/ItemDye.java -+++ b/net/minecraft/server/ItemDye.java -@@ -3,6 +3,8 @@ - import com.google.common.collect.Maps; - import java.util.Map; +--- a/net/minecraft/world/item/ItemDye.java ++++ b/net/minecraft/world/item/ItemDye.java +@@ -8,6 +8,8 @@ + import net.minecraft.world.entity.animal.EntitySheep; + import net.minecraft.world.entity.player.EntityHuman; +import org.bukkit.event.entity.SheepDyeWoolEvent; // CraftBukkit + public class ItemDye extends Item { private static final Map a = Maps.newEnumMap(EnumColor.class); -@@ -21,7 +23,17 @@ +@@ -26,7 +28,17 @@ if (entitysheep.isAlive() && !entitysheep.isSheared() && entitysheep.getColor() != this.b) { if (!entityhuman.world.isClientSide) { diff --git a/nms-patches/net/minecraft/world/item/ItemEgg.patch b/nms-patches/net/minecraft/world/item/ItemEgg.patch index f72b75a5e..722779baa 100644 --- a/nms-patches/net/minecraft/world/item/ItemEgg.patch +++ b/nms-patches/net/minecraft/world/item/ItemEgg.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/ItemEgg.java -+++ b/net/minecraft/server/ItemEgg.java -@@ -10,14 +10,22 @@ +--- a/net/minecraft/world/item/ItemEgg.java ++++ b/net/minecraft/world/item/ItemEgg.java +@@ -19,14 +19,22 @@ public InteractionResultWrapper a(World world, EntityHuman entityhuman, EnumHand enumhand) { ItemStack itemstack = entityhuman.b(enumhand); @@ -14,8 +14,8 @@ - world.addEntity(entityegg); + // CraftBukkit start + if (!world.addEntity(entityegg)) { -+ if (entityhuman instanceof EntityPlayer) { -+ ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); ++ if (entityhuman instanceof net.minecraft.server.level.EntityPlayer) { ++ ((net.minecraft.server.level.EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); + } + return InteractionResultWrapper.fail(itemstack); + } diff --git a/nms-patches/net/minecraft/world/item/ItemEndCrystal.patch b/nms-patches/net/minecraft/world/item/ItemEndCrystal.patch index 7007204f4..d2ebf7402 100644 --- a/nms-patches/net/minecraft/world/item/ItemEndCrystal.patch +++ b/nms-patches/net/minecraft/world/item/ItemEndCrystal.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/ItemEndCrystal.java -+++ b/net/minecraft/server/ItemEndCrystal.java -@@ -34,6 +34,11 @@ +--- a/net/minecraft/world/item/ItemEndCrystal.java ++++ b/net/minecraft/world/item/ItemEndCrystal.java +@@ -45,6 +45,11 @@ EntityEnderCrystal entityendercrystal = new EntityEnderCrystal(world, d0 + 0.5D, d1, d2 + 0.5D); entityendercrystal.setShowingBottom(false); diff --git a/nms-patches/net/minecraft/world/item/ItemEnderEye.patch b/nms-patches/net/minecraft/world/item/ItemEnderEye.patch index 70a234cc1..cbe435bc1 100644 --- a/nms-patches/net/minecraft/world/item/ItemEnderEye.patch +++ b/nms-patches/net/minecraft/world/item/ItemEnderEye.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/ItemEnderEye.java -+++ b/net/minecraft/server/ItemEnderEye.java -@@ -61,7 +61,11 @@ +--- a/net/minecraft/world/item/ItemEnderEye.java ++++ b/net/minecraft/world/item/ItemEnderEye.java +@@ -85,7 +85,11 @@ entityendersignal.setItem(itemstack); entityendersignal.a(blockposition); diff --git a/nms-patches/net/minecraft/world/item/ItemEnderPearl.patch b/nms-patches/net/minecraft/world/item/ItemEnderPearl.patch index 7bac2c2e3..63c7e2387 100644 --- a/nms-patches/net/minecraft/world/item/ItemEnderPearl.patch +++ b/nms-patches/net/minecraft/world/item/ItemEnderPearl.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/ItemEnderPearl.java -+++ b/net/minecraft/server/ItemEnderPearl.java -@@ -10,16 +10,24 @@ +--- a/net/minecraft/world/item/ItemEnderPearl.java ++++ b/net/minecraft/world/item/ItemEnderPearl.java +@@ -19,16 +19,24 @@ public InteractionResultWrapper a(World world, EntityHuman entityhuman, EnumHand enumhand) { ItemStack itemstack = entityhuman.b(enumhand); @@ -14,10 +14,10 @@ entityenderpearl.a(entityhuman, entityhuman.pitch, entityhuman.yaw, 0.0F, 1.5F, 1.0F); - world.addEntity(entityenderpearl); + if (!world.addEntity(entityenderpearl)) { -+ if (entityhuman instanceof EntityPlayer) { -+ ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); ++ if (entityhuman instanceof net.minecraft.server.level.EntityPlayer) { ++ ((net.minecraft.server.level.EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); + } -+ return new InteractionResultWrapper(EnumInteractionResult.FAIL, itemstack); ++ return InteractionResultWrapper.fail(itemstack); + } } diff --git a/nms-patches/net/minecraft/world/item/ItemFireball.patch b/nms-patches/net/minecraft/world/item/ItemFireball.patch index c25dce95d..b4a3e5083 100644 --- a/nms-patches/net/minecraft/world/item/ItemFireball.patch +++ b/nms-patches/net/minecraft/world/item/ItemFireball.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/ItemFireball.java -+++ b/net/minecraft/server/ItemFireball.java -@@ -14,12 +14,28 @@ +--- a/net/minecraft/world/item/ItemFireball.java ++++ b/net/minecraft/world/item/ItemFireball.java +@@ -26,12 +26,28 @@ boolean flag = false; if (BlockCampfire.h(iblockdata)) { diff --git a/nms-patches/net/minecraft/world/item/ItemFishingRod.patch b/nms-patches/net/minecraft/world/item/ItemFishingRod.patch index 99bf8f9f2..e2e63aa8d 100644 --- a/nms-patches/net/minecraft/world/item/ItemFishingRod.patch +++ b/nms-patches/net/minecraft/world/item/ItemFishingRod.patch @@ -1,14 +1,15 @@ ---- a/net/minecraft/server/ItemFishingRod.java -+++ b/net/minecraft/server/ItemFishingRod.java -@@ -1,5 +1,7 @@ - package net.minecraft.server; +--- a/net/minecraft/world/item/ItemFishingRod.java ++++ b/net/minecraft/world/item/ItemFishingRod.java +@@ -10,6 +10,8 @@ + import net.minecraft.world.item.enchantment.EnchantmentManager; + import net.minecraft.world.level.World; +import org.bukkit.event.player.PlayerFishEvent; // CraftBukkit + public class ItemFishingRod extends Item implements ItemVanishable { public ItemFishingRod(Item.Info item_info) { -@@ -21,12 +23,23 @@ +@@ -31,12 +33,23 @@ world.playSound((EntityHuman) null, entityhuman.locX(), entityhuman.locY(), entityhuman.locZ(), SoundEffects.ENTITY_FISHING_BOBBER_RETRIEVE, SoundCategory.NEUTRAL, 1.0F, 0.4F / (ItemFishingRod.RANDOM.nextFloat() * 0.4F + 0.8F)); } else { @@ -26,7 +27,7 @@ + + if (playerFishEvent.isCancelled()) { + entityhuman.hookedFish = null; -+ return new InteractionResultWrapper(EnumInteractionResult.PASS, itemstack); ++ return InteractionResultWrapper.pass(itemstack); + } + world.playSound((EntityHuman) null, entityhuman.locX(), entityhuman.locY(), entityhuman.locZ(), SoundEffects.ENTITY_FISHING_BOBBER_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemFishingRod.RANDOM.nextFloat() * 0.4F + 0.8F)); + world.addEntity(entityfishinghook); diff --git a/nms-patches/net/minecraft/world/item/ItemFlintAndSteel.patch b/nms-patches/net/minecraft/world/item/ItemFlintAndSteel.patch index 967252e11..597328422 100644 --- a/nms-patches/net/minecraft/world/item/ItemFlintAndSteel.patch +++ b/nms-patches/net/minecraft/world/item/ItemFlintAndSteel.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/ItemFlintAndSteel.java -+++ b/net/minecraft/server/ItemFlintAndSteel.java -@@ -13,7 +13,7 @@ +--- a/net/minecraft/world/item/ItemFlintAndSteel.java ++++ b/net/minecraft/world/item/ItemFlintAndSteel.java +@@ -28,7 +28,7 @@ BlockPosition blockposition = itemactioncontext.getClickPosition(); IBlockData iblockdata = world.getType(blockposition); @@ -9,7 +9,7 @@ world.playSound(entityhuman, blockposition, SoundEffects.ITEM_FLINTANDSTEEL_USE, SoundCategory.BLOCKS, 1.0F, ItemFlintAndSteel.RANDOM.nextFloat() * 0.4F + 0.8F); world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockProperties.r, true), 11); if (entityhuman != null) { -@@ -27,6 +27,14 @@ +@@ -42,6 +42,14 @@ BlockPosition blockposition1 = blockposition.shift(itemactioncontext.getClickedFace()); if (BlockFireAbstract.a(world, blockposition1, itemactioncontext.f())) { diff --git a/nms-patches/net/minecraft/world/item/ItemHanging.patch b/nms-patches/net/minecraft/world/item/ItemHanging.patch index 82cc9e758..596a13bed 100644 --- a/nms-patches/net/minecraft/world/item/ItemHanging.patch +++ b/nms-patches/net/minecraft/world/item/ItemHanging.patch @@ -1,7 +1,8 @@ ---- a/net/minecraft/server/ItemHanging.java -+++ b/net/minecraft/server/ItemHanging.java -@@ -1,5 +1,10 @@ - package net.minecraft.server; +--- a/net/minecraft/world/item/ItemHanging.java ++++ b/net/minecraft/world/item/ItemHanging.java +@@ -13,6 +13,11 @@ + import net.minecraft.world.item.context.ItemActionContext; + import net.minecraft.world.level.World; +// CraftBukkit start +import org.bukkit.entity.Player; @@ -11,7 +12,7 @@ public class ItemHanging extends Item { private final EntityTypes a; -@@ -41,6 +46,18 @@ +@@ -54,6 +59,18 @@ if (((EntityHanging) object).survives()) { if (!world.isClientSide) { diff --git a/nms-patches/net/minecraft/world/item/ItemLeash.patch b/nms-patches/net/minecraft/world/item/ItemLeash.patch index 0f7293f52..c1920256e 100644 --- a/nms-patches/net/minecraft/world/item/ItemLeash.patch +++ b/nms-patches/net/minecraft/world/item/ItemLeash.patch @@ -1,15 +1,15 @@ ---- a/net/minecraft/server/ItemLeash.java -+++ b/net/minecraft/server/ItemLeash.java -@@ -3,6 +3,8 @@ - import java.util.Iterator; - import java.util.List; +--- a/net/minecraft/world/item/ItemLeash.java ++++ b/net/minecraft/world/item/ItemLeash.java +@@ -14,6 +14,8 @@ + import net.minecraft.world.level.block.Block; + import net.minecraft.world.phys.AxisAlignedBB; +import org.bukkit.event.hanging.HangingPlaceEvent; // CraftBukkit + public class ItemLeash extends Item { public ItemLeash(Item.Info item_info) { -@@ -44,7 +46,23 @@ +@@ -55,7 +57,23 @@ if (entityinsentient.getLeashHolder() == entityhuman) { if (entityleash == null) { entityleash = EntityLeash.a(world, blockposition); diff --git a/nms-patches/net/minecraft/world/item/ItemMilkBucket.patch b/nms-patches/net/minecraft/world/item/ItemMilkBucket.patch index ee96e15bc..b3a9cca20 100644 --- a/nms-patches/net/minecraft/world/item/ItemMilkBucket.patch +++ b/nms-patches/net/minecraft/world/item/ItemMilkBucket.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/ItemMilkBucket.java -+++ b/net/minecraft/server/ItemMilkBucket.java -@@ -20,7 +20,7 @@ +--- a/net/minecraft/world/item/ItemMilkBucket.java ++++ b/net/minecraft/world/item/ItemMilkBucket.java +@@ -29,7 +29,7 @@ } if (!world.isClientSide) { diff --git a/nms-patches/net/minecraft/world/item/ItemMinecart.patch b/nms-patches/net/minecraft/world/item/ItemMinecart.patch index 8d59fb0f7..c22672a62 100644 --- a/nms-patches/net/minecraft/world/item/ItemMinecart.patch +++ b/nms-patches/net/minecraft/world/item/ItemMinecart.patch @@ -1,7 +1,8 @@ ---- a/net/minecraft/server/ItemMinecart.java -+++ b/net/minecraft/server/ItemMinecart.java -@@ -1,5 +1,10 @@ - package net.minecraft.server; +--- a/net/minecraft/world/item/ItemMinecart.java ++++ b/net/minecraft/world/item/ItemMinecart.java +@@ -18,6 +18,11 @@ + import net.minecraft.world.level.block.state.IBlockData; + import net.minecraft.world.level.block.state.properties.BlockPropertyTrackPosition; +// CraftBukkit start +import org.bukkit.craftbukkit.inventory.CraftItemStack; @@ -11,7 +12,7 @@ public class ItemMinecart extends Item { private static final IDispenseBehavior a = new DispenseBehaviorItem() { -@@ -38,14 +43,43 @@ +@@ -56,14 +61,43 @@ } } @@ -58,7 +59,7 @@ return itemstack; } -@@ -87,7 +121,12 @@ +@@ -105,7 +139,12 @@ entityminecartabstract.setCustomName(itemstack.getName()); } diff --git a/nms-patches/net/minecraft/world/item/ItemMonsterEgg.patch b/nms-patches/net/minecraft/world/item/ItemMonsterEgg.patch index 7bec16728..274272aa6 100644 --- a/nms-patches/net/minecraft/world/item/ItemMonsterEgg.patch +++ b/nms-patches/net/minecraft/world/item/ItemMonsterEgg.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/ItemMonsterEgg.java -+++ b/net/minecraft/server/ItemMonsterEgg.java -@@ -141,7 +141,7 @@ +--- a/net/minecraft/world/item/ItemMonsterEgg.java ++++ b/net/minecraft/world/item/ItemMonsterEgg.java +@@ -167,7 +167,7 @@ return Optional.empty(); } else { ((EntityInsentient) object).setPositionRotation(vec3d.getX(), vec3d.getY(), vec3d.getZ(), 0.0F, 0.0F); @@ -9,7 +9,7 @@ if (itemstack.hasName()) { ((EntityInsentient) object).setCustomName(itemstack.getName()); } -@@ -150,7 +150,7 @@ +@@ -176,7 +176,7 @@ itemstack.subtract(1); } diff --git a/nms-patches/net/minecraft/world/item/ItemPotion.patch b/nms-patches/net/minecraft/world/item/ItemPotion.patch index aba701ca9..4039a8c57 100644 --- a/nms-patches/net/minecraft/world/item/ItemPotion.patch +++ b/nms-patches/net/minecraft/world/item/ItemPotion.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/ItemPotion.java -+++ b/net/minecraft/server/ItemPotion.java -@@ -32,7 +32,7 @@ +--- a/net/minecraft/world/item/ItemPotion.java ++++ b/net/minecraft/world/item/ItemPotion.java +@@ -46,7 +46,7 @@ if (mobeffect.getMobEffect().isInstant()) { mobeffect.getMobEffect().applyInstantEffect(entityhuman, entityhuman, entityliving, mobeffect.getAmplifier(), 1.0D); } else { diff --git a/nms-patches/net/minecraft/world/item/ItemRecord.patch b/nms-patches/net/minecraft/world/item/ItemRecord.patch index 692fdf0eb..fac390b5a 100644 --- a/nms-patches/net/minecraft/world/item/ItemRecord.patch +++ b/nms-patches/net/minecraft/world/item/ItemRecord.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/ItemRecord.java -+++ b/net/minecraft/server/ItemRecord.java -@@ -26,6 +26,7 @@ +--- a/net/minecraft/world/item/ItemRecord.java ++++ b/net/minecraft/world/item/ItemRecord.java +@@ -37,6 +37,7 @@ ItemStack itemstack = itemactioncontext.getItemStack(); if (!world.isClientSide) { diff --git a/nms-patches/net/minecraft/world/item/ItemSign.patch b/nms-patches/net/minecraft/world/item/ItemSign.patch index ea5b6ece5..77bbfd61f 100644 --- a/nms-patches/net/minecraft/world/item/ItemSign.patch +++ b/nms-patches/net/minecraft/world/item/ItemSign.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/ItemSign.java -+++ b/net/minecraft/server/ItemSign.java -@@ -4,6 +4,8 @@ +--- a/net/minecraft/world/item/ItemSign.java ++++ b/net/minecraft/world/item/ItemSign.java +@@ -10,6 +10,8 @@ public class ItemSign extends ItemBlockWallable { @@ -9,7 +9,7 @@ public ItemSign(Item.Info item_info, Block block, Block block1) { super(block, block1, item_info); } -@@ -13,7 +15,10 @@ +@@ -19,7 +21,10 @@ boolean flag = super.a(blockposition, world, entityhuman, itemstack, iblockdata); if (!world.isClientSide && !flag && entityhuman != null) { diff --git a/nms-patches/net/minecraft/world/item/ItemSkullPlayer.patch b/nms-patches/net/minecraft/world/item/ItemSkullPlayer.patch index 292509cbe..706caa4df 100644 --- a/nms-patches/net/minecraft/world/item/ItemSkullPlayer.patch +++ b/nms-patches/net/minecraft/world/item/ItemSkullPlayer.patch @@ -1,11 +1,11 @@ ---- a/net/minecraft/server/ItemSkullPlayer.java -+++ b/net/minecraft/server/ItemSkullPlayer.java -@@ -44,6 +44,15 @@ +--- a/net/minecraft/world/item/ItemSkullPlayer.java ++++ b/net/minecraft/world/item/ItemSkullPlayer.java +@@ -50,6 +50,15 @@ nbttagcompound.set("SkullOwner", GameProfileSerializer.serialize(new NBTTagCompound(), gameprofile)); return true; } else { + // CraftBukkit start -+ NBTTagList textures = nbttagcompound.getCompound("SkullOwner").getCompound("Properties").getList("textures", 10); // Safe due to method contracts ++ net.minecraft.nbt.NBTTagList textures = nbttagcompound.getCompound("SkullOwner").getCompound("Properties").getList("textures", 10); // Safe due to method contracts + for (int i = 0; i < textures.size(); i++) { + if (textures.get(i) instanceof NBTTagCompound && !((NBTTagCompound) textures.get(i)).hasKeyOfType("Signature", 8) && ((NBTTagCompound) textures.get(i)).getString("Value").trim().isEmpty()) { + nbttagcompound.remove("SkullOwner"); diff --git a/nms-patches/net/minecraft/world/item/ItemSnowball.patch b/nms-patches/net/minecraft/world/item/ItemSnowball.patch index f8e1d4a11..96a1ac206 100644 --- a/nms-patches/net/minecraft/world/item/ItemSnowball.patch +++ b/nms-patches/net/minecraft/world/item/ItemSnowball.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/ItemSnowball.java -+++ b/net/minecraft/server/ItemSnowball.java -@@ -10,19 +10,32 @@ +--- a/net/minecraft/world/item/ItemSnowball.java ++++ b/net/minecraft/world/item/ItemSnowball.java +@@ -19,19 +19,32 @@ public InteractionResultWrapper a(World world, EntityHuman entityhuman, EnumHand enumhand) { ItemStack itemstack = entityhuman.b(enumhand); @@ -19,8 +19,8 @@ + } + + world.playSound((EntityHuman) null, entityhuman.locX(), entityhuman.locY(), entityhuman.locZ(), SoundEffects.ENTITY_SNOWBALL_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemSnowball.RANDOM.nextFloat() * 0.4F + 0.8F)); -+ } else if (entityhuman instanceof EntityPlayer) { -+ ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); ++ } else if (entityhuman instanceof net.minecraft.server.level.EntityPlayer) { ++ ((net.minecraft.server.level.EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); + } } + // CraftBukkit end diff --git a/nms-patches/net/minecraft/world/item/ItemStack.patch b/nms-patches/net/minecraft/world/item/ItemStack.patch index 52f41aa5e..d8177dd8a 100644 --- a/nms-patches/net/minecraft/world/item/ItemStack.patch +++ b/nms-patches/net/minecraft/world/item/ItemStack.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/ItemStack.java -+++ b/net/minecraft/server/ItemStack.java -@@ -19,6 +19,24 @@ +--- a/net/minecraft/world/item/ItemStack.java ++++ b/net/minecraft/world/item/ItemStack.java +@@ -58,6 +58,39 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -8,7 +8,22 @@ +import com.mojang.serialization.Dynamic; +import java.util.List; +import java.util.Map; -+ ++import net.minecraft.core.EnumDirection; ++import net.minecraft.nbt.DynamicOpsNBT; ++import net.minecraft.network.protocol.game.PacketPlayOutBlockChange; ++import net.minecraft.server.MinecraftServer; ++import net.minecraft.server.level.WorldServer; ++import net.minecraft.sounds.SoundCategory; ++import net.minecraft.util.datafix.fixes.DataConverterTypes; ++import net.minecraft.world.level.block.BlockJukeBox; ++import net.minecraft.world.level.block.BlockSapling; ++import net.minecraft.world.level.block.BlockTileEntity; ++import net.minecraft.world.level.block.BlockWitherSkull; ++import net.minecraft.world.level.block.Blocks; ++import net.minecraft.world.level.block.SoundEffectType; ++import net.minecraft.world.level.block.entity.TileEntity; ++import net.minecraft.world.level.block.entity.TileEntitySign; ++import net.minecraft.world.level.block.entity.TileEntitySkull; +import org.bukkit.Location; +import org.bukkit.TreeType; +import org.bukkit.block.BlockState; @@ -25,7 +40,7 @@ public final class ItemStack { public static final Codec a = RecordCodecBuilder.create((instance) -> { -@@ -32,7 +50,7 @@ +@@ -71,7 +104,7 @@ }); private static final Logger LOGGER = LogManager.getLogger(); public static final ItemStack b = new ItemStack((Item) null); @@ -34,7 +49,7 @@ decimalformat.setDecimalFormatSymbols(DecimalFormatSymbols.getInstance(Locale.ROOT)); }); private static final ChatModifier e = ChatModifier.a.setColor(EnumChatFormat.DARK_PURPLE).setItalic(true); -@@ -67,23 +85,42 @@ +@@ -106,23 +139,42 @@ this.checkEmpty(); } @@ -80,7 +95,7 @@ this.checkEmpty(); } -@@ -113,7 +150,7 @@ +@@ -152,7 +204,7 @@ return this.j ? Items.AIR : this.item; } @@ -89,7 +104,7 @@ EntityHuman entityhuman = itemactioncontext.getEntity(); BlockPosition blockposition = itemactioncontext.getClickPosition(); ShapeDetectorBlock shapedetectorblock = new ShapeDetectorBlock(itemactioncontext.getWorld(), blockposition, false); -@@ -121,12 +158,153 @@ +@@ -160,12 +212,153 @@ if (entityhuman != null && !entityhuman.abilities.mayBuild && !this.b(itemactioncontext.getWorld().p(), shapedetectorblock)) { return EnumInteractionResult.PASS; } else { @@ -231,7 +246,7 @@ + + // SPIGOT-1288 - play sound stripped from ItemBlock + if (this.item instanceof ItemBlock) { -+ SoundEffectType soundeffecttype = ((ItemBlock) this.item).getBlock().stepSound; ++ SoundEffectType soundeffecttype = ((ItemBlock) this.item).getBlock().getStepSound(null); + world.playSound(entityhuman, blockposition, soundeffecttype.getPlaceSound(), SoundCategory.BLOCKS, (soundeffecttype.getVolume() + 1.0F) / 2.0F, soundeffecttype.getPitch() * 0.8F); + } + @@ -244,7 +259,7 @@ return enuminteractionresult; } -@@ -207,6 +385,21 @@ +@@ -246,6 +439,21 @@ } i -= k; @@ -266,7 +281,7 @@ if (i <= 0) { return false; } -@@ -228,6 +421,11 @@ +@@ -267,6 +475,11 @@ if (this.isDamaged(i, t0.getRandom(), t0 instanceof EntityPlayer ? (EntityPlayer) t0 : null)) { consumer.accept(t0); Item item = this.getItem(); @@ -278,7 +293,7 @@ this.subtract(1); if (t0 instanceof EntityHuman) { -@@ -359,6 +557,17 @@ +@@ -398,6 +611,17 @@ return this.tag; } @@ -296,7 +311,7 @@ public NBTTagCompound getOrCreateTag() { if (this.tag == null) { this.setTag(new NBTTagCompound()); -@@ -522,6 +731,12 @@ +@@ -561,6 +785,12 @@ } public void setRepairCost(int i) { @@ -309,7 +324,7 @@ this.getOrCreateTag().setInt("RepairCost", i); } -@@ -571,6 +786,13 @@ +@@ -610,6 +840,13 @@ nbttaglist.add(nbttagcompound); } diff --git a/nms-patches/net/minecraft/world/item/ItemTrident.patch b/nms-patches/net/minecraft/world/item/ItemTrident.patch index 1620a9751..f094ea688 100644 --- a/nms-patches/net/minecraft/world/item/ItemTrident.patch +++ b/nms-patches/net/minecraft/world/item/ItemTrident.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/ItemTrident.java -+++ b/net/minecraft/server/ItemTrident.java -@@ -43,9 +43,12 @@ +--- a/net/minecraft/world/item/ItemTrident.java ++++ b/net/minecraft/world/item/ItemTrident.java +@@ -65,9 +65,12 @@ if (k <= 0 || entityhuman.isInWaterOrRain()) { if (!world.isClientSide) { @@ -13,15 +13,15 @@ if (k == 0) { EntityThrownTrident entitythrowntrident = new EntityThrownTrident(world, entityhuman, itemstack); -@@ -54,16 +57,39 @@ +@@ -76,16 +79,39 @@ entitythrowntrident.fromPlayer = EntityArrow.PickupStatus.CREATIVE_ONLY; } - world.addEntity(entitythrowntrident); + // CraftBukkit start + if (!world.addEntity(entitythrowntrident)) { -+ if (entityhuman instanceof EntityPlayer) { -+ ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); ++ if (entityhuman instanceof net.minecraft.server.level.EntityPlayer) { ++ ((net.minecraft.server.level.EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); + } + return; + } diff --git a/nms-patches/net/minecraft/world/item/ItemWorldMap.patch b/nms-patches/net/minecraft/world/item/ItemWorldMap.patch index 290a65e5f..b796d7087 100644 --- a/nms-patches/net/minecraft/world/item/ItemWorldMap.patch +++ b/nms-patches/net/minecraft/world/item/ItemWorldMap.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/ItemWorldMap.java -+++ b/net/minecraft/server/ItemWorldMap.java -@@ -6,6 +6,11 @@ - import com.google.common.collect.Multisets; - import javax.annotation.Nullable; +--- a/net/minecraft/world/item/ItemWorldMap.java ++++ b/net/minecraft/world/item/ItemWorldMap.java +@@ -30,6 +30,11 @@ + import net.minecraft.world.level.material.MaterialMapColor; + import net.minecraft.world.level.saveddata.maps.WorldMap; +// CraftBukkit start +import org.bukkit.Bukkit; @@ -12,7 +12,7 @@ public class ItemWorldMap extends ItemWorldMapBase { public ItemWorldMap(Item.Info item_info) { -@@ -38,7 +43,7 @@ +@@ -62,7 +67,7 @@ public static int d(ItemStack itemstack) { NBTTagCompound nbttagcompound = itemstack.getTag(); @@ -21,7 +21,7 @@ } private static WorldMap a(ItemStack itemstack, World world, int i, int j, int k, boolean flag, boolean flag1, ResourceKey resourcekey) { -@@ -48,6 +53,11 @@ +@@ -72,6 +77,11 @@ worldmap.a(i, j, k, flag, flag1, resourcekey); world.a(worldmap); itemstack.getOrCreateTag().setInt("map", l); diff --git a/nms-patches/net/minecraft/world/item/crafting/CraftingManager.patch b/nms-patches/net/minecraft/world/item/crafting/CraftingManager.patch index 73dc06120..7dafb9148 100644 --- a/nms-patches/net/minecraft/world/item/crafting/CraftingManager.patch +++ b/nms-patches/net/minecraft/world/item/crafting/CraftingManager.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/CraftingManager.java -+++ b/net/minecraft/server/CraftingManager.java -@@ -23,11 +23,13 @@ +--- a/net/minecraft/world/item/crafting/CraftingManager.java ++++ b/net/minecraft/world/item/crafting/CraftingManager.java +@@ -34,11 +34,13 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -15,7 +15,7 @@ private boolean d; public CraftingManager() { -@@ -36,7 +38,12 @@ +@@ -47,7 +49,12 @@ protected void a(Map map, IResourceManager iresourcemanager, GameProfilerFiller gameprofilerfiller) { this.d = false; @@ -29,7 +29,7 @@ Iterator iterator = map.entrySet().iterator(); while (iterator.hasNext()) { -@@ -46,24 +53,42 @@ +@@ -57,24 +64,42 @@ try { IRecipe irecipe = a(minecraftkey, ChatDeserializer.m((JsonElement) entry.getValue(), "top element")); @@ -77,7 +77,7 @@ } public > List a(Recipes recipes) { -@@ -81,7 +106,7 @@ +@@ -92,7 +117,7 @@ } private > Map> b(Recipes recipes) { @@ -86,7 +86,7 @@ } public > NonNullList c(Recipes recipes, C c0, World world) { -@@ -102,7 +127,7 @@ +@@ -113,7 +138,7 @@ public Optional> getRecipe(MinecraftKey minecraftkey) { return this.recipes.values().stream().map((map) -> { @@ -95,7 +95,7 @@ }).filter(Objects::nonNull).findFirst(); } -@@ -125,4 +150,14 @@ +@@ -136,4 +161,14 @@ return new JsonSyntaxException("Invalid or unsupported recipe type '" + s + "'"); })).a(minecraftkey, jsonobject); } diff --git a/nms-patches/net/minecraft/world/item/crafting/FurnaceRecipe.patch b/nms-patches/net/minecraft/world/item/crafting/FurnaceRecipe.patch index 3f1a15ae4..af5b89606 100644 --- a/nms-patches/net/minecraft/world/item/crafting/FurnaceRecipe.patch +++ b/nms-patches/net/minecraft/world/item/crafting/FurnaceRecipe.patch @@ -1,7 +1,8 @@ ---- a/net/minecraft/server/FurnaceRecipe.java -+++ b/net/minecraft/server/FurnaceRecipe.java -@@ -1,5 +1,13 @@ - package net.minecraft.server; +--- a/net/minecraft/world/item/crafting/FurnaceRecipe.java ++++ b/net/minecraft/world/item/crafting/FurnaceRecipe.java +@@ -3,6 +3,14 @@ + import net.minecraft.resources.MinecraftKey; + import net.minecraft.world.item.ItemStack; +// CraftBukkit start +import org.bukkit.craftbukkit.inventory.CraftFurnaceRecipe; @@ -14,7 +15,7 @@ public class FurnaceRecipe extends RecipeCooking { public FurnaceRecipe(MinecraftKey minecraftkey, String s, RecipeItemStack recipeitemstack, ItemStack itemstack, float f, int i) { -@@ -10,4 +18,14 @@ +@@ -13,4 +21,14 @@ public RecipeSerializer getRecipeSerializer() { return RecipeSerializer.p; } diff --git a/nms-patches/net/minecraft/world/item/crafting/IRecipe.patch b/nms-patches/net/minecraft/world/item/crafting/IRecipe.patch index 7dc7ba4bd..c9f4d01a8 100644 --- a/nms-patches/net/minecraft/world/item/crafting/IRecipe.patch +++ b/nms-patches/net/minecraft/world/item/crafting/IRecipe.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/IRecipe.java -+++ b/net/minecraft/server/IRecipe.java -@@ -35,4 +35,6 @@ +--- a/net/minecraft/world/item/crafting/IRecipe.java ++++ b/net/minecraft/world/item/crafting/IRecipe.java +@@ -42,4 +42,6 @@ RecipeSerializer getRecipeSerializer(); Recipes g(); diff --git a/nms-patches/net/minecraft/world/item/crafting/IRecipeComplex.patch b/nms-patches/net/minecraft/world/item/crafting/IRecipeComplex.patch index 87925e273..560745f40 100644 --- a/nms-patches/net/minecraft/world/item/crafting/IRecipeComplex.patch +++ b/nms-patches/net/minecraft/world/item/crafting/IRecipeComplex.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/IRecipeComplex.java -+++ b/net/minecraft/server/IRecipeComplex.java -@@ -22,4 +22,11 @@ +--- a/net/minecraft/world/item/crafting/IRecipeComplex.java ++++ b/net/minecraft/world/item/crafting/IRecipeComplex.java +@@ -25,4 +25,11 @@ public ItemStack getResult() { return ItemStack.b; } diff --git a/nms-patches/net/minecraft/world/item/crafting/RecipeBlasting.patch b/nms-patches/net/minecraft/world/item/crafting/RecipeBlasting.patch index 396c1111b..f8d6acfcb 100644 --- a/nms-patches/net/minecraft/world/item/crafting/RecipeBlasting.patch +++ b/nms-patches/net/minecraft/world/item/crafting/RecipeBlasting.patch @@ -1,7 +1,8 @@ ---- a/net/minecraft/server/RecipeBlasting.java -+++ b/net/minecraft/server/RecipeBlasting.java -@@ -1,5 +1,13 @@ - package net.minecraft.server; +--- a/net/minecraft/world/item/crafting/RecipeBlasting.java ++++ b/net/minecraft/world/item/crafting/RecipeBlasting.java +@@ -3,6 +3,14 @@ + import net.minecraft.resources.MinecraftKey; + import net.minecraft.world.item.ItemStack; +// CraftBukkit start +import org.bukkit.craftbukkit.inventory.CraftBlastingRecipe; @@ -14,7 +15,7 @@ public class RecipeBlasting extends RecipeCooking { public RecipeBlasting(MinecraftKey minecraftkey, String s, RecipeItemStack recipeitemstack, ItemStack itemstack, float f, int i) { -@@ -10,4 +18,16 @@ +@@ -13,4 +21,16 @@ public RecipeSerializer getRecipeSerializer() { return RecipeSerializer.q; } diff --git a/nms-patches/net/minecraft/world/item/crafting/RecipeCampfire.patch b/nms-patches/net/minecraft/world/item/crafting/RecipeCampfire.patch index 3339152ef..10010627b 100644 --- a/nms-patches/net/minecraft/world/item/crafting/RecipeCampfire.patch +++ b/nms-patches/net/minecraft/world/item/crafting/RecipeCampfire.patch @@ -1,7 +1,8 @@ ---- a/net/minecraft/server/RecipeCampfire.java -+++ b/net/minecraft/server/RecipeCampfire.java -@@ -1,5 +1,13 @@ - package net.minecraft.server; +--- a/net/minecraft/world/item/crafting/RecipeCampfire.java ++++ b/net/minecraft/world/item/crafting/RecipeCampfire.java +@@ -3,6 +3,14 @@ + import net.minecraft.resources.MinecraftKey; + import net.minecraft.world.item.ItemStack; +// CraftBukkit start +import org.bukkit.craftbukkit.inventory.CraftCampfireRecipe; @@ -14,7 +15,7 @@ public class RecipeCampfire extends RecipeCooking { public RecipeCampfire(MinecraftKey minecraftkey, String s, RecipeItemStack recipeitemstack, ItemStack itemstack, float f, int i) { -@@ -10,4 +18,16 @@ +@@ -13,4 +21,16 @@ public RecipeSerializer getRecipeSerializer() { return RecipeSerializer.s; } diff --git a/nms-patches/net/minecraft/world/item/crafting/RecipeItemStack.patch b/nms-patches/net/minecraft/world/item/crafting/RecipeItemStack.patch index c1857a0f9..2d4edf4b5 100644 --- a/nms-patches/net/minecraft/world/item/crafting/RecipeItemStack.patch +++ b/nms-patches/net/minecraft/world/item/crafting/RecipeItemStack.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/RecipeItemStack.java -+++ b/net/minecraft/server/RecipeItemStack.java -@@ -25,6 +25,7 @@ +--- a/net/minecraft/world/item/crafting/RecipeItemStack.java ++++ b/net/minecraft/world/item/crafting/RecipeItemStack.java +@@ -35,6 +35,7 @@ private final RecipeItemStack.Provider[] b; public ItemStack[] choices; private IntList d; @@ -8,7 +8,7 @@ public RecipeItemStack(Stream stream) { this.b = (RecipeItemStack.Provider[]) stream.toArray((i) -> { -@@ -57,6 +58,15 @@ +@@ -67,6 +68,15 @@ for (int j = 0; j < i; ++j) { ItemStack itemstack1 = aitemstack[j]; diff --git a/nms-patches/net/minecraft/world/item/crafting/RecipeSmithing.patch b/nms-patches/net/minecraft/world/item/crafting/RecipeSmithing.patch index 09955e723..3bc533f53 100644 --- a/nms-patches/net/minecraft/world/item/crafting/RecipeSmithing.patch +++ b/nms-patches/net/minecraft/world/item/crafting/RecipeSmithing.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/RecipeSmithing.java -+++ b/net/minecraft/server/RecipeSmithing.java -@@ -3,6 +3,14 @@ - import com.google.gson.JsonElement; - import com.google.gson.JsonObject; +--- a/net/minecraft/world/item/crafting/RecipeSmithing.java ++++ b/net/minecraft/world/item/crafting/RecipeSmithing.java +@@ -10,6 +10,14 @@ + import net.minecraft.world.item.ItemStack; + import net.minecraft.world.level.World; +// CraftBukkit start +import org.bukkit.craftbukkit.inventory.CraftItemStack; @@ -15,7 +15,7 @@ public class RecipeSmithing implements IRecipe { private final RecipeItemStack a; -@@ -58,6 +66,17 @@ +@@ -65,6 +73,17 @@ return Recipes.SMITHING; } diff --git a/nms-patches/net/minecraft/world/item/crafting/RecipeSmoking.patch b/nms-patches/net/minecraft/world/item/crafting/RecipeSmoking.patch index 7cb2caf77..4debf4927 100644 --- a/nms-patches/net/minecraft/world/item/crafting/RecipeSmoking.patch +++ b/nms-patches/net/minecraft/world/item/crafting/RecipeSmoking.patch @@ -1,7 +1,8 @@ ---- a/net/minecraft/server/RecipeSmoking.java -+++ b/net/minecraft/server/RecipeSmoking.java -@@ -1,5 +1,13 @@ - package net.minecraft.server; +--- a/net/minecraft/world/item/crafting/RecipeSmoking.java ++++ b/net/minecraft/world/item/crafting/RecipeSmoking.java +@@ -3,6 +3,14 @@ + import net.minecraft.resources.MinecraftKey; + import net.minecraft.world.item.ItemStack; +// CraftBukkit start +import org.bukkit.craftbukkit.inventory.CraftItemStack; @@ -14,7 +15,7 @@ public class RecipeSmoking extends RecipeCooking { public RecipeSmoking(MinecraftKey minecraftkey, String s, RecipeItemStack recipeitemstack, ItemStack itemstack, float f, int i) { -@@ -10,4 +18,16 @@ +@@ -13,4 +21,16 @@ public RecipeSerializer getRecipeSerializer() { return RecipeSerializer.r; } diff --git a/nms-patches/net/minecraft/world/item/crafting/RecipeStonecutting.patch b/nms-patches/net/minecraft/world/item/crafting/RecipeStonecutting.patch index 02bbcb157..bb994f7c0 100644 --- a/nms-patches/net/minecraft/world/item/crafting/RecipeStonecutting.patch +++ b/nms-patches/net/minecraft/world/item/crafting/RecipeStonecutting.patch @@ -1,7 +1,8 @@ ---- a/net/minecraft/server/RecipeStonecutting.java -+++ b/net/minecraft/server/RecipeStonecutting.java -@@ -1,5 +1,13 @@ - package net.minecraft.server; +--- a/net/minecraft/world/item/crafting/RecipeStonecutting.java ++++ b/net/minecraft/world/item/crafting/RecipeStonecutting.java +@@ -5,6 +5,14 @@ + import net.minecraft.world.item.ItemStack; + import net.minecraft.world.level.World; +// CraftBukkit start +import org.bukkit.craftbukkit.inventory.CraftItemStack; @@ -14,7 +15,7 @@ public class RecipeStonecutting extends RecipeSingleItem { public RecipeStonecutting(MinecraftKey minecraftkey, String s, RecipeItemStack recipeitemstack, ItemStack itemstack) { -@@ -10,4 +18,16 @@ +@@ -15,4 +23,16 @@ public boolean a(IInventory iinventory, World world) { return this.ingredient.test(iinventory.getItem(0)); } diff --git a/nms-patches/net/minecraft/world/item/crafting/ShapedRecipes.patch b/nms-patches/net/minecraft/world/item/crafting/ShapedRecipes.patch index e7c698880..cc580fa99 100644 --- a/nms-patches/net/minecraft/world/item/crafting/ShapedRecipes.patch +++ b/nms-patches/net/minecraft/world/item/crafting/ShapedRecipes.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/ShapedRecipes.java -+++ b/net/minecraft/server/ShapedRecipes.java -@@ -13,6 +13,13 @@ - import java.util.Map.Entry; - import java.util.Set; +--- a/net/minecraft/world/item/crafting/ShapedRecipes.java ++++ b/net/minecraft/world/item/crafting/ShapedRecipes.java +@@ -22,6 +22,13 @@ + import net.minecraft.world.item.ItemStack; + import net.minecraft.world.level.World; +// CraftBukkit start +import org.bukkit.craftbukkit.inventory.CraftItemStack; @@ -14,7 +14,7 @@ public class ShapedRecipes implements RecipeCrafting { private final int width; -@@ -31,6 +38,66 @@ +@@ -40,6 +47,66 @@ this.result = itemstack; } diff --git a/nms-patches/net/minecraft/world/item/crafting/ShapelessRecipes.patch b/nms-patches/net/minecraft/world/item/crafting/ShapelessRecipes.patch index 7d59fd42c..1de17e0cd 100644 --- a/nms-patches/net/minecraft/world/item/crafting/ShapelessRecipes.patch +++ b/nms-patches/net/minecraft/world/item/crafting/ShapelessRecipes.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/ShapelessRecipes.java -+++ b/net/minecraft/server/ShapelessRecipes.java -@@ -6,6 +6,12 @@ - import it.unimi.dsi.fastutil.ints.IntList; - import java.util.Iterator; +--- a/net/minecraft/world/item/crafting/ShapelessRecipes.java ++++ b/net/minecraft/world/item/crafting/ShapelessRecipes.java +@@ -14,6 +14,12 @@ + import net.minecraft.world.item.ItemStack; + import net.minecraft.world.level.World; +// CraftBukkit start +import org.bukkit.craftbukkit.inventory.CraftItemStack; @@ -13,7 +13,7 @@ public class ShapelessRecipes implements RecipeCrafting { private final MinecraftKey key; -@@ -20,6 +26,20 @@ +@@ -28,6 +34,20 @@ this.ingredients = nonnulllist; } diff --git a/nms-patches/net/minecraft/world/item/enchantment/EnchantmentFrostWalker.patch b/nms-patches/net/minecraft/world/item/enchantment/EnchantmentFrostWalker.patch index 635d3443c..8d5271751 100644 --- a/nms-patches/net/minecraft/world/item/enchantment/EnchantmentFrostWalker.patch +++ b/nms-patches/net/minecraft/world/item/enchantment/EnchantmentFrostWalker.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EnchantmentFrostWalker.java -+++ b/net/minecraft/server/EnchantmentFrostWalker.java -@@ -46,8 +46,11 @@ +--- a/net/minecraft/world/item/enchantment/EnchantmentFrostWalker.java ++++ b/net/minecraft/world/item/enchantment/EnchantmentFrostWalker.java +@@ -57,8 +57,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/net/minecraft/world/item/enchantment/EnchantmentWeaponDamage.patch b/nms-patches/net/minecraft/world/item/enchantment/EnchantmentWeaponDamage.patch index c0e2bfca0..397d05ec4 100644 --- a/nms-patches/net/minecraft/world/item/enchantment/EnchantmentWeaponDamage.patch +++ b/nms-patches/net/minecraft/world/item/enchantment/EnchantmentWeaponDamage.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/EnchantmentWeaponDamage.java -+++ b/net/minecraft/server/EnchantmentWeaponDamage.java -@@ -51,7 +51,7 @@ +--- a/net/minecraft/world/item/enchantment/EnchantmentWeaponDamage.java ++++ b/net/minecraft/world/item/enchantment/EnchantmentWeaponDamage.java +@@ -60,7 +60,7 @@ if (this.a == 2 && entityliving1.getMonsterType() == EnumMonsterType.ARTHROPOD) { int j = 20 + entityliving.getRandom().nextInt(10 * i); diff --git a/nms-patches/net/minecraft/world/item/enchantment/Enchantments.patch b/nms-patches/net/minecraft/world/item/enchantment/Enchantments.patch index db3493ea0..84cff388e 100644 --- a/nms-patches/net/minecraft/world/item/enchantment/Enchantments.patch +++ b/nms-patches/net/minecraft/world/item/enchantment/Enchantments.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/Enchantments.java -+++ b/net/minecraft/server/Enchantments.java -@@ -42,7 +42,15 @@ +--- a/net/minecraft/world/item/enchantment/Enchantments.java ++++ b/net/minecraft/world/item/enchantment/Enchantments.java +@@ -45,7 +45,15 @@ public static final Enchantment MENDING = a("mending", new EnchantmentMending(Enchantment.Rarity.RARE, EnumItemSlot.values())); public static final Enchantment VANISHING_CURSE = a("vanishing_curse", new EnchantmentVanishing(Enchantment.Rarity.VERY_RARE, EnumItemSlot.values())); diff --git a/nms-patches/net/minecraft/world/item/trading/IMerchant.patch b/nms-patches/net/minecraft/world/item/trading/IMerchant.patch index 60513a4c1..869aef8f6 100644 --- a/nms-patches/net/minecraft/world/item/trading/IMerchant.patch +++ b/nms-patches/net/minecraft/world/item/trading/IMerchant.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/IMerchant.java -+++ b/net/minecraft/server/IMerchant.java -@@ -44,4 +44,6 @@ +--- a/net/minecraft/world/item/trading/IMerchant.java ++++ b/net/minecraft/world/item/trading/IMerchant.java +@@ -51,4 +51,6 @@ } } diff --git a/nms-patches/net/minecraft/world/item/trading/MerchantRecipe.patch b/nms-patches/net/minecraft/world/item/trading/MerchantRecipe.patch index cc3d1256e..7223cdc7b 100644 --- a/nms-patches/net/minecraft/world/item/trading/MerchantRecipe.patch +++ b/nms-patches/net/minecraft/world/item/trading/MerchantRecipe.patch @@ -1,14 +1,15 @@ ---- a/net/minecraft/server/MerchantRecipe.java -+++ b/net/minecraft/server/MerchantRecipe.java -@@ -1,5 +1,7 @@ - package net.minecraft.server; +--- a/net/minecraft/world/item/trading/MerchantRecipe.java ++++ b/net/minecraft/world/item/trading/MerchantRecipe.java +@@ -5,6 +5,8 @@ + import net.minecraft.util.MathHelper; + import net.minecraft.world.item.ItemStack; +import org.bukkit.craftbukkit.inventory.CraftMerchantRecipe; // CraftBukkit + public class MerchantRecipe { public ItemStack buyingItem1; -@@ -12,6 +14,18 @@ +@@ -17,6 +19,18 @@ private int demand; public float priceMultiplier; public int xp; @@ -27,7 +28,7 @@ public MerchantRecipe(NBTTagCompound nbttagcompound) { this.rewardExp = true; -@@ -73,6 +87,7 @@ +@@ -78,6 +92,7 @@ public ItemStack getBuyItem1() { int i = this.buyingItem1.getCount(); diff --git a/nms-patches/net/minecraft/world/level/CommandBlockListenerAbstract.patch b/nms-patches/net/minecraft/world/level/CommandBlockListenerAbstract.patch index 9c9947619..5d492152f 100644 --- a/nms-patches/net/minecraft/world/level/CommandBlockListenerAbstract.patch +++ b/nms-patches/net/minecraft/world/level/CommandBlockListenerAbstract.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/CommandBlockListenerAbstract.java -+++ b/net/minecraft/server/CommandBlockListenerAbstract.java -@@ -17,6 +17,10 @@ +--- a/net/minecraft/world/level/CommandBlockListenerAbstract.java ++++ b/net/minecraft/world/level/CommandBlockListenerAbstract.java +@@ -30,6 +30,10 @@ private IChatBaseComponent lastOutput; private String command = ""; private IChatBaseComponent customName; @@ -11,7 +11,7 @@ public CommandBlockListenerAbstract() { this.customName = CommandBlockListenerAbstract.c; -@@ -113,7 +117,7 @@ +@@ -126,7 +130,7 @@ }); diff --git a/nms-patches/net/minecraft/world/level/Explosion.patch b/nms-patches/net/minecraft/world/level/Explosion.patch index dda314e9a..eec5ebbc1 100644 --- a/nms-patches/net/minecraft/world/level/Explosion.patch +++ b/nms-patches/net/minecraft/world/level/Explosion.patch @@ -1,10 +1,11 @@ ---- a/net/minecraft/server/Explosion.java -+++ b/net/minecraft/server/Explosion.java -@@ -15,6 +15,13 @@ - import java.util.Set; - import javax.annotation.Nullable; +--- a/net/minecraft/world/level/Explosion.java ++++ b/net/minecraft/world/level/Explosion.java +@@ -42,6 +42,14 @@ + import net.minecraft.world.phys.MovingObjectPosition; + import net.minecraft.world.phys.Vec3D; +// CraftBukkit start ++import net.minecraft.world.entity.item.EntityFallingBlock; +import org.bukkit.craftbukkit.event.CraftEventFactory; +import org.bukkit.event.entity.EntityExplodeEvent; +import org.bukkit.Location; @@ -14,7 +15,7 @@ public class Explosion { private static final ExplosionDamageCalculator a = new ExplosionDamageCalculator(); -@@ -32,11 +39,12 @@ +@@ -59,11 +67,12 @@ private final ExplosionDamageCalculator l; private final List blocks = Lists.newArrayList(); private final Map n = Maps.newHashMap(); @@ -28,7 +29,7 @@ this.posX = d0; this.posY = d1; this.posZ = d2; -@@ -86,6 +94,11 @@ +@@ -113,6 +122,11 @@ } public void a() { @@ -40,7 +41,7 @@ Set set = Sets.newHashSet(); boolean flag = true; -@@ -119,7 +132,7 @@ +@@ -146,7 +160,7 @@ f -= ((Float) optional.get() + 0.3F) * 0.3F; } @@ -49,7 +50,7 @@ set.add(blockposition); } -@@ -163,7 +176,16 @@ +@@ -190,7 +204,16 @@ double d12 = (double) a(vec3d, entity); double d13 = (1.0D - d7) * d12; @@ -67,7 +68,7 @@ double d14 = d13; if (entity instanceof EntityLiving) { -@@ -205,6 +227,51 @@ +@@ -232,6 +255,51 @@ Collections.shuffle(this.blocks, this.world.random); Iterator iterator = this.blocks.iterator(); @@ -119,7 +120,7 @@ while (iterator.hasNext()) { BlockPosition blockposition = (BlockPosition) iterator.next(); -@@ -219,8 +286,8 @@ +@@ -246,8 +314,8 @@ TileEntity tileentity = block.isTileEntity() ? this.world.getTileEntity(blockposition) : null; LootTableInfo.Builder loottableinfo_builder = (new LootTableInfo.Builder((WorldServer) this.world)).a(this.world.random).set(LootContextParameters.ORIGIN, Vec3D.a((BaseBlockPosition) blockposition)).set(LootContextParameters.TOOL, ItemStack.b).setOptional(LootContextParameters.BLOCK_ENTITY, tileentity).setOptional(LootContextParameters.THIS_ENTITY, this.source); @@ -130,7 +131,7 @@ } iblockdata.a(loottableinfo_builder).forEach((itemstack) -> { -@@ -250,7 +317,11 @@ +@@ -277,7 +345,11 @@ BlockPosition blockposition2 = (BlockPosition) iterator1.next(); if (this.d.nextInt(3) == 0 && this.world.getType(blockposition2).isAir() && this.world.getType(blockposition2.down()).i(this.world, blockposition2.down())) { @@ -143,7 +144,7 @@ } } } -@@ -258,6 +329,7 @@ +@@ -285,6 +357,7 @@ } private static void a(ObjectArrayList> objectarraylist, ItemStack itemstack, BlockPosition blockposition) { diff --git a/nms-patches/net/minecraft/world/level/GameRules.patch b/nms-patches/net/minecraft/world/level/GameRules.patch index 4a345e0de..bfb8f210b 100644 --- a/nms-patches/net/minecraft/world/level/GameRules.patch +++ b/nms-patches/net/minecraft/world/level/GameRules.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/GameRules.java -+++ b/net/minecraft/server/GameRules.java -@@ -106,7 +106,7 @@ +--- a/net/minecraft/world/level/GameRules.java ++++ b/net/minecraft/world/level/GameRules.java +@@ -113,7 +113,7 @@ } public > T get(GameRules.GameRuleKey gamerules_gamerulekey) { @@ -9,7 +9,7 @@ } public NBTTagCompound a() { -@@ -137,8 +137,8 @@ +@@ -144,8 +144,8 @@ } private static > void a(GameRules.GameRuleVisitor gamerules_gamerulevisitor, GameRules.GameRuleKey gamerules_gamerulekey, GameRules.GameRuleDefinition gamerules_gameruledefinition) { @@ -20,7 +20,7 @@ } public boolean getBoolean(GameRules.GameRuleKey gamerules_gamerulekey) { -@@ -189,7 +189,7 @@ +@@ -196,7 +196,7 @@ } @Override @@ -29,7 +29,7 @@ this.b = Boolean.parseBoolean(s); } -@@ -244,7 +244,7 @@ +@@ -251,7 +251,7 @@ } @Override @@ -38,7 +38,7 @@ this.b = c(s); } -@@ -298,7 +298,7 @@ +@@ -305,7 +305,7 @@ } @@ -47,7 +47,7 @@ public abstract String getValue(); -@@ -332,7 +332,7 @@ +@@ -339,7 +339,7 @@ } public T getValue() { diff --git a/nms-patches/net/minecraft/world/level/GeneratorAccess.patch b/nms-patches/net/minecraft/world/level/GeneratorAccess.patch index 4b64d5166..5373af994 100644 --- a/nms-patches/net/minecraft/world/level/GeneratorAccess.patch +++ b/nms-patches/net/minecraft/world/level/GeneratorAccess.patch @@ -1,9 +1,9 @@ ---- a/net/minecraft/server/GeneratorAccess.java -+++ b/net/minecraft/server/GeneratorAccess.java -@@ -46,4 +46,6 @@ +--- a/net/minecraft/world/level/GeneratorAccess.java ++++ b/net/minecraft/world/level/GeneratorAccess.java +@@ -57,4 +57,6 @@ default void triggerEffect(int i, BlockPosition blockposition, int j) { this.a((EntityHuman) null, i, blockposition, j); } + -+ WorldServer getMinecraftWorld(); // CraftBukkit ++ net.minecraft.server.level.WorldServer getMinecraftWorld(); // CraftBukkit } diff --git a/nms-patches/net/minecraft/world/level/IBlockAccess.patch b/nms-patches/net/minecraft/world/level/IBlockAccess.patch index bb7470bb8..e430a7b02 100644 --- a/nms-patches/net/minecraft/world/level/IBlockAccess.patch +++ b/nms-patches/net/minecraft/world/level/IBlockAccess.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/IBlockAccess.java -+++ b/net/minecraft/server/IBlockAccess.java -@@ -31,8 +31,8 @@ +--- a/net/minecraft/world/level/IBlockAccess.java ++++ b/net/minecraft/world/level/IBlockAccess.java +@@ -41,8 +41,8 @@ return BlockPosition.a(axisalignedbb).map(this::getType); } @@ -11,7 +11,7 @@ IBlockData iblockdata = this.getType(blockposition); Fluid fluid = this.getFluid(blockposition); Vec3D vec3d = raytrace1.b(); -@@ -45,6 +45,12 @@ +@@ -55,6 +55,12 @@ double d1 = movingobjectpositionblock1 == null ? Double.MAX_VALUE : raytrace1.b().distanceSquared(movingobjectpositionblock1.getPos()); return d0 <= d1 ? movingobjectpositionblock : movingobjectpositionblock1; @@ -24,7 +24,7 @@ }, (raytrace1) -> { Vec3D vec3d = raytrace1.b().d(raytrace1.a()); -@@ -120,7 +126,7 @@ +@@ -130,7 +136,7 @@ double d13 = d10 * (i1 > 0 ? 1.0D - MathHelper.h(d4) : MathHelper.h(d4)); double d14 = d11 * (j1 > 0 ? 1.0D - MathHelper.h(d5) : MathHelper.h(d5)); diff --git a/nms-patches/net/minecraft/world/level/IWorldWriter.patch b/nms-patches/net/minecraft/world/level/IWorldWriter.patch index af2348e0f..dbd5bdf32 100644 --- a/nms-patches/net/minecraft/world/level/IWorldWriter.patch +++ b/nms-patches/net/minecraft/world/level/IWorldWriter.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/IWorldWriter.java -+++ b/net/minecraft/server/IWorldWriter.java -@@ -25,4 +25,10 @@ +--- a/net/minecraft/world/level/IWorldWriter.java ++++ b/net/minecraft/world/level/IWorldWriter.java +@@ -28,4 +28,10 @@ default boolean addEntity(Entity entity) { return false; } diff --git a/nms-patches/net/minecraft/world/level/MobSpawnerAbstract.patch b/nms-patches/net/minecraft/world/level/MobSpawnerAbstract.patch index 7f76c8bab..019f49758 100644 --- a/nms-patches/net/minecraft/world/level/MobSpawnerAbstract.patch +++ b/nms-patches/net/minecraft/world/level/MobSpawnerAbstract.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/MobSpawnerAbstract.java -+++ b/net/minecraft/server/MobSpawnerAbstract.java -@@ -43,6 +43,7 @@ +--- a/net/minecraft/world/level/MobSpawnerAbstract.java ++++ b/net/minecraft/world/level/MobSpawnerAbstract.java +@@ -60,6 +60,7 @@ public void setMobName(EntityTypes entitytypes) { this.spawnData.getEntity().setString("id", IRegistry.ENTITY_TYPE.getKey(entitytypes).toString()); @@ -8,7 +8,7 @@ } private boolean h() { -@@ -132,7 +133,7 @@ +@@ -149,7 +150,7 @@ } } diff --git a/nms-patches/net/minecraft/world/level/RayTrace.patch b/nms-patches/net/minecraft/world/level/RayTrace.patch index 3afeb800c..81b83b7c7 100644 --- a/nms-patches/net/minecraft/world/level/RayTrace.patch +++ b/nms-patches/net/minecraft/world/level/RayTrace.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/RayTrace.java -+++ b/net/minecraft/server/RayTrace.java -@@ -15,7 +15,7 @@ +--- a/net/minecraft/world/level/RayTrace.java ++++ b/net/minecraft/world/level/RayTrace.java +@@ -24,7 +24,7 @@ this.b = vec3d1; this.c = raytrace_blockcollisionoption; this.d = raytrace_fluidcollisionoption; @@ -9,7 +9,7 @@ } public Vec3D a() { -@@ -44,7 +44,7 @@ +@@ -53,7 +53,7 @@ private final Predicate predicate; diff --git a/nms-patches/net/minecraft/world/level/SpawnerCreature.patch b/nms-patches/net/minecraft/world/level/SpawnerCreature.patch index 6d9d50e0f..ff1af9c53 100644 --- a/nms-patches/net/minecraft/world/level/SpawnerCreature.patch +++ b/nms-patches/net/minecraft/world/level/SpawnerCreature.patch @@ -1,17 +1,18 @@ ---- a/net/minecraft/server/SpawnerCreature.java -+++ b/net/minecraft/server/SpawnerCreature.java -@@ -13,6 +13,10 @@ +--- a/net/minecraft/world/level/SpawnerCreature.java ++++ b/net/minecraft/world/level/SpawnerCreature.java +@@ -45,6 +45,11 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +// CraftBukkit start ++import net.minecraft.world.level.storage.WorldData; +import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason; +// CraftBukkit end + public final class SpawnerCreature { private static final Logger LOGGER = LogManager.getLogger(); -@@ -34,7 +38,8 @@ +@@ -66,7 +71,8 @@ if (entity instanceof EntityInsentient) { EntityInsentient entityinsentient = (EntityInsentient) entity; @@ -21,7 +22,7 @@ continue; } } -@@ -69,10 +74,49 @@ +@@ -101,10 +107,49 @@ EnumCreatureType[] aenumcreaturetype = SpawnerCreature.c; int i = aenumcreaturetype.length; @@ -72,7 +73,7 @@ a(enumcreaturetype, worldserver, chunk, (entitytypes, blockposition, ichunkaccess) -> { return spawnercreature_d.a(entitytypes, blockposition, ichunkaccess); }, (entityinsentient, ichunkaccess) -> { -@@ -147,10 +191,14 @@ +@@ -179,10 +224,14 @@ entityinsentient.setPositionRotation(d0, (double) i, d1, worldserver.random.nextFloat() * 360.0F, 0.0F); if (a(worldserver, entityinsentient, d2)) { groupdataentity = entityinsentient.prepare(worldserver, worldserver.getDamageScaler(entityinsentient.getChunkCoordinates()), EnumMobSpawn.NATURAL, groupdataentity, (NBTTagCompound) null); @@ -91,7 +92,7 @@ if (j >= entityinsentient.getMaxSpawnGroup()) { return; } -@@ -333,7 +381,7 @@ +@@ -365,7 +414,7 @@ if (entityinsentient.a((GeneratorAccess) worldaccess, EnumMobSpawn.CHUNK_GENERATION) && entityinsentient.a((IWorldReader) worldaccess)) { groupdataentity = entityinsentient.prepare(worldaccess, worldaccess.getDamageScaler(entityinsentient.getChunkCoordinates()), EnumMobSpawn.CHUNK_GENERATION, groupdataentity, (NBTTagCompound) null); @@ -100,7 +101,7 @@ flag = true; } } -@@ -456,8 +504,10 @@ +@@ -488,8 +537,10 @@ return this.d; } diff --git a/nms-patches/net/minecraft/world/level/TickListServer.patch b/nms-patches/net/minecraft/world/level/TickListServer.patch index 782c66465..3c4f08acd 100644 --- a/nms-patches/net/minecraft/world/level/TickListServer.patch +++ b/nms-patches/net/minecraft/world/level/TickListServer.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/TickListServer.java -+++ b/net/minecraft/server/TickListServer.java -@@ -36,11 +36,17 @@ +--- a/net/minecraft/world/level/TickListServer.java ++++ b/net/minecraft/world/level/TickListServer.java +@@ -48,11 +48,17 @@ public void b() { int i = this.nextTickList.size(); @@ -20,7 +20,7 @@ } ChunkProviderServer chunkproviderserver = this.e.getChunkProvider(); -@@ -79,7 +85,7 @@ +@@ -91,7 +97,7 @@ throw new ReportedException(crashreport); } } else { diff --git a/nms-patches/net/minecraft/world/level/World.patch b/nms-patches/net/minecraft/world/level/World.patch index 0553b4cd0..08f06d7d0 100644 --- a/nms-patches/net/minecraft/world/level/World.patch +++ b/nms-patches/net/minecraft/world/level/World.patch @@ -1,12 +1,16 @@ ---- a/net/minecraft/server/World.java -+++ b/net/minecraft/server/World.java -@@ -14,6 +14,17 @@ +--- a/net/minecraft/world/level/World.java ++++ b/net/minecraft/world/level/World.java +@@ -62,6 +62,21 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +// CraftBukkit start +import java.util.HashMap; +import java.util.Map; ++import net.minecraft.network.protocol.game.PacketPlayOutWorldBorder; ++import net.minecraft.server.level.WorldServer; ++import net.minecraft.world.entity.item.EntityItem; ++import net.minecraft.world.level.border.IWorldBorderListener; +import org.bukkit.Bukkit; +import org.bukkit.craftbukkit.CraftServer; +import org.bukkit.craftbukkit.CraftWorld; @@ -18,7 +22,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { protected static final Logger LOGGER = LogManager.getLogger(); -@@ -45,7 +56,49 @@ +@@ -93,7 +108,49 @@ private final BiomeManager biomeManager; private final ResourceKey dimensionKey; @@ -69,7 +73,7 @@ this.methodProfiler = supplier; this.worldData = worlddatamutable; this.x = dimensionmanager; -@@ -55,12 +108,12 @@ +@@ -103,12 +160,12 @@ this.worldBorder = new WorldBorder() { @Override public double getCenterX() { @@ -84,7 +88,7 @@ } }; } else { -@@ -70,6 +123,35 @@ +@@ -118,6 +175,35 @@ this.serverThread = Thread.currentThread(); this.biomeManager = new BiomeManager(this, i, dimensionmanager.getGenLayerZoomer()); this.debugWorld = flag1; @@ -120,7 +124,7 @@ } @Override -@@ -133,6 +215,17 @@ +@@ -181,6 +267,17 @@ @Override public boolean a(BlockPosition blockposition, IBlockData iblockdata, int i, int j) { @@ -138,7 +142,7 @@ if (isOutsideWorld(blockposition)) { return false; } else if (!this.isClientSide && this.isDebugWorld()) { -@@ -140,9 +233,24 @@ +@@ -188,9 +285,24 @@ } else { Chunk chunk = this.getChunkAtWorldCoords(blockposition); Block block = iblockdata.getBlock(); @@ -164,7 +168,7 @@ return false; } else { IBlockData iblockdata2 = this.getType(blockposition); -@@ -153,6 +261,7 @@ +@@ -201,6 +313,7 @@ this.getMethodProfiler().exit(); } @@ -172,7 +176,7 @@ if (iblockdata2 == iblockdata) { if (iblockdata1 != iblockdata2) { this.b(blockposition, iblockdata1, iblockdata2); -@@ -179,12 +288,65 @@ +@@ -227,12 +340,65 @@ this.a(blockposition, iblockdata1, iblockdata2); } @@ -238,7 +242,7 @@ public void a(BlockPosition blockposition, IBlockData iblockdata, IBlockData iblockdata1) {} @Override -@@ -266,6 +428,17 @@ +@@ -314,6 +480,17 @@ IBlockData iblockdata = this.getType(blockposition); try { @@ -256,7 +260,7 @@ iblockdata.doPhysics(this, blockposition, block, blockposition1, false); } catch (Throwable throwable) { CrashReport crashreport = CrashReport.a(throwable, "Exception while updating neighbours"); -@@ -308,6 +481,14 @@ +@@ -356,6 +533,14 @@ @Override public IBlockData getType(BlockPosition blockposition) { @@ -271,7 +275,7 @@ if (isOutsideWorld(blockposition)) { return Blocks.VOID_AIR.getBlockData(); } else { -@@ -455,9 +636,11 @@ +@@ -503,9 +688,11 @@ TileEntity tileentity1 = (TileEntity) this.tileEntityListPending.get(i); if (!tileentity1.isRemoved()) { @@ -283,7 +287,7 @@ if (this.isLoaded(tileentity1.getPosition())) { Chunk chunk = this.getChunkAtWorldCoords(tileentity1.getPosition()); -@@ -465,6 +648,12 @@ +@@ -513,6 +700,12 @@ chunk.setTileEntity(tileentity1.getPosition(), tileentity1); this.notify(tileentity1.getPosition(), iblockdata, iblockdata, 3); @@ -296,7 +300,7 @@ } } } -@@ -509,12 +698,25 @@ +@@ -557,12 +750,25 @@ @Nullable @Override @@ -306,7 +310,7 @@ + } + + @Nullable -+ protected TileEntity getTileEntity(BlockPosition blockposition, boolean validate) { ++ public TileEntity getTileEntity(BlockPosition blockposition, boolean validate) { + // CraftBukkit end if (isOutsideWorld(blockposition)) { return null; @@ -322,7 +326,7 @@ TileEntity tileentity = null; if (this.tickingTileEntities) { -@@ -549,6 +751,13 @@ +@@ -597,6 +803,13 @@ public void setTileEntity(BlockPosition blockposition, @Nullable TileEntity tileentity) { if (!isOutsideWorld(blockposition)) { if (tileentity != null && !tileentity.isRemoved()) { @@ -336,7 +340,7 @@ if (this.tickingTileEntities) { tileentity.setLocation(this, blockposition); Iterator iterator = this.tileEntityListPending.iterator(); -@@ -573,7 +782,7 @@ +@@ -621,7 +834,7 @@ } public void removeTileEntity(BlockPosition blockposition) { diff --git a/nms-patches/net/minecraft/world/level/WorldAccess.patch b/nms-patches/net/minecraft/world/level/WorldAccess.patch index b3f75a9a5..aadedfa99 100644 --- a/nms-patches/net/minecraft/world/level/WorldAccess.patch +++ b/nms-patches/net/minecraft/world/level/WorldAccess.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/WorldAccess.java -+++ b/net/minecraft/server/WorldAccess.java -@@ -5,6 +5,12 @@ +--- a/net/minecraft/world/level/WorldAccess.java ++++ b/net/minecraft/world/level/WorldAccess.java +@@ -8,6 +8,12 @@ WorldServer getMinecraftWorld(); default void addAllEntities(Entity entity) { diff --git a/nms-patches/net/minecraft/world/level/block/Block.patch b/nms-patches/net/minecraft/world/level/block/Block.patch index 9c455095d..fbe12a0f6 100644 --- a/nms-patches/net/minecraft/world/level/block/Block.patch +++ b/nms-patches/net/minecraft/world/level/block/Block.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/Block.java -+++ b/net/minecraft/server/Block.java -@@ -209,7 +209,13 @@ +--- a/net/minecraft/world/level/block/Block.java ++++ b/net/minecraft/world/level/block/Block.java +@@ -248,7 +248,13 @@ EntityItem entityitem = new EntityItem(world, (double) blockposition.getX() + d0, (double) blockposition.getY() + d1, (double) blockposition.getZ() + d2, itemstack); entityitem.defaultPickupDelay(); @@ -15,7 +15,7 @@ } } -@@ -240,7 +246,7 @@ +@@ -279,7 +285,7 @@ public void a(World world, EntityHuman entityhuman, BlockPosition blockposition, IBlockData iblockdata, @Nullable TileEntity tileentity, ItemStack itemstack) { entityhuman.b(StatisticList.BLOCK_MINED.b(this)); @@ -24,7 +24,7 @@ dropItems(iblockdata, world, blockposition, tileentity, entityhuman, itemstack); } -@@ -336,6 +342,12 @@ +@@ -375,6 +381,12 @@ return this; } diff --git a/nms-patches/net/minecraft/world/level/block/BlockBamboo.patch b/nms-patches/net/minecraft/world/level/block/BlockBamboo.patch index af220d3a5..8df53fccd 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockBamboo.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockBamboo.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BlockBamboo.java -+++ b/net/minecraft/server/BlockBamboo.java -@@ -170,14 +170,18 @@ +--- a/net/minecraft/world/level/block/BlockBamboo.java ++++ b/net/minecraft/world/level/block/BlockBamboo.java +@@ -195,14 +195,18 @@ BlockPosition blockposition1 = blockposition.down(2); IBlockData iblockdata2 = world.getType(blockposition1); BlockPropertyBambooSize blockpropertybamboosize = BlockPropertyBambooSize.NONE; @@ -21,7 +21,7 @@ } } } else { -@@ -188,7 +192,14 @@ +@@ -213,7 +217,14 @@ int j = (Integer) iblockdata.get(BlockBamboo.d) != 1 && !iblockdata2.a(Blocks.BAMBOO) ? 0 : 1; int k = (i < 11 || random.nextFloat() >= 0.25F) && i != 15 ? 0 : 1; diff --git a/nms-patches/net/minecraft/world/level/block/BlockBambooSapling.patch b/nms-patches/net/minecraft/world/level/block/BlockBambooSapling.patch index 675272f11..6b36c0b07 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockBambooSapling.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockBambooSapling.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BlockBambooSapling.java -+++ b/net/minecraft/server/BlockBambooSapling.java -@@ -69,6 +69,6 @@ +--- a/net/minecraft/world/level/block/BlockBambooSapling.java ++++ b/net/minecraft/world/level/block/BlockBambooSapling.java +@@ -86,6 +86,6 @@ } protected void a(World world, BlockPosition blockposition) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockBed.patch b/nms-patches/net/minecraft/world/level/block/BlockBed.patch index 9b349be8b..37b882839 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockBed.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockBed.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BlockBed.java -+++ b/net/minecraft/server/BlockBed.java -@@ -39,7 +39,8 @@ +--- a/net/minecraft/world/level/block/BlockBed.java ++++ b/net/minecraft/world/level/block/BlockBed.java +@@ -78,7 +78,8 @@ } } @@ -10,7 +10,7 @@ world.a(blockposition, false); BlockPosition blockposition1 = blockposition.shift(((EnumDirection) iblockdata.get(BlockBed.FACING)).opposite()); -@@ -56,7 +57,16 @@ +@@ -95,7 +96,16 @@ return EnumInteractionResult.SUCCESS; } else { @@ -27,7 +27,7 @@ if (entityhuman_enumbedresult != null) { entityhuman.a(entityhuman_enumbedresult.a(), true); } -@@ -67,8 +77,27 @@ +@@ -106,8 +116,27 @@ } } diff --git a/nms-patches/net/minecraft/world/level/block/BlockBeehive.patch b/nms-patches/net/minecraft/world/level/block/BlockBeehive.patch index 63532d638..ef95ba6ea 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockBeehive.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockBeehive.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BlockBeehive.java -+++ b/net/minecraft/server/BlockBeehive.java -@@ -55,7 +55,7 @@ +--- a/net/minecraft/world/level/block/BlockBeehive.java ++++ b/net/minecraft/world/level/block/BlockBeehive.java +@@ -97,7 +97,7 @@ EntityBee entitybee = (EntityBee) iterator.next(); if (entitybee.getGoalTarget() == null) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockButtonAbstract.patch b/nms-patches/net/minecraft/world/level/block/BlockButtonAbstract.patch index 4a5c6abd6..0ef1b4f20 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockButtonAbstract.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockButtonAbstract.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/BlockButtonAbstract.java -+++ b/net/minecraft/server/BlockButtonAbstract.java -@@ -4,6 +4,11 @@ - import java.util.Random; - import javax.annotation.Nullable; +--- a/net/minecraft/world/level/block/BlockButtonAbstract.java ++++ b/net/minecraft/world/level/block/BlockButtonAbstract.java +@@ -26,6 +26,11 @@ + import net.minecraft.world.phys.shapes.VoxelShape; + import net.minecraft.world.phys.shapes.VoxelShapeCollision; +// CraftBukkit start +import org.bukkit.event.block.BlockRedstoneEvent; @@ -12,7 +12,7 @@ public abstract class BlockButtonAbstract extends BlockAttachable { public static final BlockStateBoolean POWERED = BlockProperties.w; -@@ -70,6 +75,19 @@ +@@ -92,6 +97,19 @@ if ((Boolean) iblockdata.get(BlockButtonAbstract.POWERED)) { return EnumInteractionResult.CONSUME; } else { @@ -32,7 +32,7 @@ this.d(iblockdata, world, blockposition); this.a(entityhuman, world, blockposition, true); return EnumInteractionResult.a(world.isClientSide); -@@ -120,6 +138,16 @@ +@@ -142,6 +160,16 @@ if (this.v) { this.e(iblockdata, (World) worldserver, blockposition); } else { @@ -49,7 +49,7 @@ worldserver.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockButtonAbstract.POWERED, false), 3); this.f(iblockdata, (World) worldserver, blockposition); this.a((EntityHuman) null, worldserver, blockposition, false); -@@ -140,7 +168,44 @@ +@@ -162,7 +190,44 @@ boolean flag = !list.isEmpty(); boolean flag1 = (Boolean) iblockdata.get(BlockButtonAbstract.POWERED); diff --git a/nms-patches/net/minecraft/world/level/block/BlockCactus.patch b/nms-patches/net/minecraft/world/level/block/BlockCactus.patch index 462566bbd..d1cae0e5a 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockCactus.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockCactus.patch @@ -1,15 +1,15 @@ ---- a/net/minecraft/server/BlockCactus.java -+++ b/net/minecraft/server/BlockCactus.java -@@ -3,6 +3,8 @@ - import java.util.Iterator; - import java.util.Random; +--- a/net/minecraft/world/level/block/BlockCactus.java ++++ b/net/minecraft/world/level/block/BlockCactus.java +@@ -23,6 +23,8 @@ + import net.minecraft.world.phys.shapes.VoxelShape; + import net.minecraft.world.phys.shapes.VoxelShapeCollision; +import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit + public class BlockCactus extends Block { public static final BlockStateInteger AGE = BlockProperties.aj; -@@ -37,7 +39,7 @@ +@@ -57,7 +59,7 @@ int j = (Integer) iblockdata.get(BlockCactus.AGE); if (j == 15) { @@ -18,7 +18,7 @@ IBlockData iblockdata1 = (IBlockData) iblockdata.set(BlockCactus.AGE, 0); worldserver.setTypeAndData(blockposition, iblockdata1, 4); -@@ -94,7 +96,9 @@ +@@ -114,7 +116,9 @@ @Override public void a(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockCake.patch b/nms-patches/net/minecraft/world/level/block/BlockCake.patch index 3241a6ba9..9fdae4f3d 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockCake.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockCake.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BlockCake.java -+++ b/net/minecraft/server/BlockCake.java -@@ -37,7 +37,18 @@ +--- a/net/minecraft/world/level/block/BlockCake.java ++++ b/net/minecraft/world/level/block/BlockCake.java +@@ -58,7 +58,18 @@ return EnumInteractionResult.PASS; } else { entityhuman.a(StatisticList.EAT_CAKE_SLICE); @@ -15,7 +15,7 @@ + entityhuman.getFoodData().eat(event.getFoodLevel() - oldFoodLevel, 0.1F); + } + -+ ((EntityPlayer) entityhuman).getBukkitEntity().sendHealthUpdate(); ++ ((net.minecraft.server.level.EntityPlayer) entityhuman).getBukkitEntity().sendHealthUpdate(); + // CraftBukkit end int i = (Integer) iblockdata.get(BlockCake.BITES); diff --git a/nms-patches/net/minecraft/world/level/block/BlockCampfire.patch b/nms-patches/net/minecraft/world/level/block/BlockCampfire.patch index eaf134b9f..d643964cf 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockCampfire.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockCampfire.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BlockCampfire.java -+++ b/net/minecraft/server/BlockCampfire.java -@@ -144,6 +144,11 @@ +--- a/net/minecraft/world/level/block/BlockCampfire.java ++++ b/net/minecraft/world/level/block/BlockCampfire.java +@@ -186,6 +186,11 @@ if (flag && !(Boolean) iblockdata.get(BlockCampfire.LIT) && !(Boolean) iblockdata.get(BlockCampfire.d)) { BlockPosition blockposition = movingobjectpositionblock.getBlockPosition(); diff --git a/nms-patches/net/minecraft/world/level/block/BlockCauldron.patch b/nms-patches/net/minecraft/world/level/block/BlockCauldron.patch index 5753283a5..32e66f3f0 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockCauldron.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockCauldron.patch @@ -1,14 +1,15 @@ ---- a/net/minecraft/server/BlockCauldron.java -+++ b/net/minecraft/server/BlockCauldron.java -@@ -1,5 +1,7 @@ - package net.minecraft.server; +--- a/net/minecraft/world/level/block/BlockCauldron.java ++++ b/net/minecraft/world/level/block/BlockCauldron.java +@@ -34,6 +34,8 @@ + import net.minecraft.world.phys.shapes.VoxelShapeCollision; + import net.minecraft.world.phys.shapes.VoxelShapes; +import org.bukkit.event.block.CauldronLevelChangeEvent; // CraftBukkit + public class BlockCauldron extends Block { public static final BlockStateInteger LEVEL = BlockProperties.ar; -@@ -27,8 +29,13 @@ +@@ -61,8 +63,13 @@ float f = (float) blockposition.getY() + (6.0F + (float) (3 * i)) / 16.0F; if (!world.isClientSide && entity.isBurning() && i > 0 && entity.locY() <= (double) f) { @@ -23,7 +24,7 @@ } } -@@ -45,18 +52,27 @@ +@@ -79,18 +86,27 @@ if (item == Items.WATER_BUCKET) { if (i < 3 && !world.isClientSide) { @@ -52,7 +53,7 @@ if (!entityhuman.abilities.canInstantlyBuild) { itemstack.subtract(1); if (itemstack.isEmpty()) { -@@ -67,7 +83,8 @@ +@@ -101,7 +117,8 @@ } entityhuman.a(StatisticList.USE_CAULDRON); @@ -62,7 +63,7 @@ world.playSound((EntityHuman) null, blockposition, SoundEffects.ITEM_BUCKET_FILL, SoundCategory.BLOCKS, 1.0F, 1.0F); } -@@ -77,6 +94,10 @@ +@@ -111,6 +128,10 @@ if (item == Items.GLASS_BOTTLE) { if (i > 0 && !world.isClientSide) { @@ -73,7 +74,7 @@ if (!entityhuman.abilities.canInstantlyBuild) { itemstack1 = PotionUtil.a(new ItemStack(Items.POTION), Potions.WATER); entityhuman.a(StatisticList.USE_CAULDRON); -@@ -91,12 +112,17 @@ +@@ -125,12 +146,17 @@ } world.playSound((EntityHuman) null, blockposition, SoundEffects.ITEM_BOTTLE_FILL, SoundCategory.BLOCKS, 1.0F, 1.0F); @@ -92,7 +93,7 @@ if (!entityhuman.abilities.canInstantlyBuild) { itemstack1 = new ItemStack(Items.GLASS_BOTTLE); entityhuman.a(StatisticList.USE_CAULDRON); -@@ -107,7 +133,8 @@ +@@ -141,7 +167,8 @@ } world.playSound((EntityHuman) null, blockposition, SoundEffects.ITEM_BOTTLE_EMPTY, SoundCategory.BLOCKS, 1.0F, 1.0F); @@ -102,7 +103,7 @@ } return EnumInteractionResult.a(world.isClientSide); -@@ -116,8 +143,13 @@ +@@ -150,8 +177,13 @@ IDyeable idyeable = (IDyeable) item; if (idyeable.a(itemstack) && !world.isClientSide) { @@ -117,7 +118,7 @@ entityhuman.a(StatisticList.CLEAN_ARMOR); return EnumInteractionResult.SUCCESS; } -@@ -125,13 +157,18 @@ +@@ -159,13 +191,18 @@ if (i > 0 && item instanceof ItemBanner) { if (TileEntityBanner.b(itemstack) > 0 && !world.isClientSide) { @@ -137,7 +138,7 @@ } if (itemstack.isEmpty()) { -@@ -169,9 +206,25 @@ +@@ -203,9 +240,25 @@ } } @@ -164,7 +165,7 @@ } @Override -@@ -183,7 +236,7 @@ +@@ -217,7 +270,7 @@ IBlockData iblockdata = world.getType(blockposition); if ((Integer) iblockdata.get(BlockCauldron.LEVEL) < 3) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockChest.patch b/nms-patches/net/minecraft/world/level/block/BlockChest.patch index cb10e7948..52364050e 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockChest.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockChest.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BlockChest.java -+++ b/net/minecraft/server/BlockChest.java -@@ -35,24 +35,7 @@ +--- a/net/minecraft/world/level/block/BlockChest.java ++++ b/net/minecraft/world/level/block/BlockChest.java +@@ -79,24 +79,7 @@ public Optional a(final TileEntityChest tileentitychest, final TileEntityChest tileentitychest1) { final InventoryLargeChest inventorylargechest = new InventoryLargeChest(tileentitychest, tileentitychest1); @@ -26,7 +26,7 @@ } public Optional a(TileEntityChest tileentitychest) { -@@ -65,6 +48,38 @@ +@@ -109,6 +92,38 @@ } }; @@ -65,7 +65,7 @@ protected BlockChest(BlockBase.Info blockbase_info, Supplier> supplier) { super(blockbase_info, supplier); this.j((IBlockData) ((IBlockData) ((IBlockData) ((IBlockData) this.blockStateList.getBlockData()).set(BlockChest.FACING, EnumDirection.NORTH)).set(BlockChest.c, BlockPropertyChestType.SINGLE)).set(BlockChest.d, false)); -@@ -218,7 +233,7 @@ +@@ -262,7 +277,7 @@ } public DoubleBlockFinder.Result a(IBlockData iblockdata, World world, BlockPosition blockposition, boolean flag) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockChorusFlower.patch b/nms-patches/net/minecraft/world/level/block/BlockChorusFlower.patch index 4ca36ec16..2064a4547 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockChorusFlower.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockChorusFlower.patch @@ -1,15 +1,15 @@ ---- a/net/minecraft/server/BlockChorusFlower.java -+++ b/net/minecraft/server/BlockChorusFlower.java -@@ -4,6 +4,8 @@ - import java.util.Random; - import javax.annotation.Nullable; +--- a/net/minecraft/world/level/block/BlockChorusFlower.java ++++ b/net/minecraft/world/level/block/BlockChorusFlower.java +@@ -20,6 +20,8 @@ + import net.minecraft.world.level.block.state.properties.BlockStateInteger; + import net.minecraft.world.phys.MovingObjectPositionBlock; +import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit + public class BlockChorusFlower extends Block { public static final BlockStateInteger AGE = BlockProperties.ah; -@@ -68,8 +70,12 @@ +@@ -84,8 +86,12 @@ } if (flag && b((IWorldReader) worldserver, blockposition1, (EnumDirection) null) && worldserver.isEmpty(blockposition.up(2))) { @@ -24,7 +24,7 @@ } else if (i < 4) { j = random.nextInt(4); if (flag1) { -@@ -83,18 +89,30 @@ +@@ -99,18 +105,30 @@ BlockPosition blockposition2 = blockposition.shift(enumdirection); if (worldserver.isEmpty(blockposition2) && worldserver.isEmpty(blockposition2.down()) && b((IWorldReader) worldserver, blockposition2, enumdirection.opposite())) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockCocoa.patch b/nms-patches/net/minecraft/world/level/block/BlockCocoa.patch index e6c02c1d3..eeeebbf89 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockCocoa.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockCocoa.patch @@ -1,15 +1,15 @@ ---- a/net/minecraft/server/BlockCocoa.java -+++ b/net/minecraft/server/BlockCocoa.java -@@ -3,6 +3,8 @@ - import java.util.Random; - import javax.annotation.Nullable; +--- a/net/minecraft/world/level/block/BlockCocoa.java ++++ b/net/minecraft/world/level/block/BlockCocoa.java +@@ -21,6 +21,8 @@ + import net.minecraft.world.phys.shapes.VoxelShape; + import net.minecraft.world.phys.shapes.VoxelShapeCollision; +import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit + public class BlockCocoa extends BlockFacingHorizontal implements IBlockFragilePlantElement { public static final BlockStateInteger AGE = BlockProperties.af; -@@ -27,7 +29,7 @@ +@@ -45,7 +47,7 @@ int i = (Integer) iblockdata.get(BlockCocoa.AGE); if (i < 2) { @@ -18,7 +18,7 @@ } } -@@ -97,7 +99,7 @@ +@@ -115,7 +117,7 @@ @Override public void a(WorldServer worldserver, Random random, BlockPosition blockposition, IBlockData iblockdata) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockCommand.patch b/nms-patches/net/minecraft/world/level/block/BlockCommand.patch index 1f53b56bb..c3ce8f364 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockCommand.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockCommand.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BlockCommand.java -+++ b/net/minecraft/server/BlockCommand.java -@@ -4,6 +4,8 @@ +--- a/net/minecraft/world/level/block/BlockCommand.java ++++ b/net/minecraft/world/level/block/BlockCommand.java +@@ -27,6 +27,8 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -9,7 +9,7 @@ public class BlockCommand extends BlockTileEntity { private static final Logger LOGGER = LogManager.getLogger(); -@@ -32,6 +34,15 @@ +@@ -55,6 +57,15 @@ TileEntityCommand tileentitycommand = (TileEntityCommand) tileentity; boolean flag1 = world.isBlockIndirectlyPowered(blockposition); boolean flag2 = tileentitycommand.f(); diff --git a/nms-patches/net/minecraft/world/level/block/BlockComposter.patch b/nms-patches/net/minecraft/world/level/block/BlockComposter.patch index be3e31a1e..f9f6c311f 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockComposter.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockComposter.patch @@ -1,10 +1,11 @@ ---- a/net/minecraft/server/BlockComposter.java -+++ b/net/minecraft/server/BlockComposter.java -@@ -5,12 +5,17 @@ - import java.util.Random; - import javax.annotation.Nullable; +--- a/net/minecraft/world/level/block/BlockComposter.java ++++ b/net/minecraft/world/level/block/BlockComposter.java +@@ -36,12 +36,18 @@ + import net.minecraft.world.phys.shapes.VoxelShapeCollision; + import net.minecraft.world.phys.shapes.VoxelShapes; +// CraftBukkit start ++import net.minecraft.world.entity.Entity; +import org.bukkit.craftbukkit.inventory.CraftBlockInventoryHolder; +import org.bukkit.craftbukkit.util.DummyGeneratorAccess; +// CraftBukkit end @@ -19,7 +20,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 +161,25 @@ +@@ -187,18 +193,25 @@ return EnumInteractionResult.a(world.isClientSide); } else if (i == 8) { @@ -48,7 +49,7 @@ itemstack.subtract(1); return iblockdata1; -@@ -176,7 +188,15 @@ +@@ -207,7 +220,15 @@ } } @@ -65,7 +66,7 @@ if (!world.isClientSide) { float f = 0.7F; double d0 = (double) (world.random.nextFloat() * 0.7F) + 0.15000000596046448D; -@@ -202,10 +222,16 @@ +@@ -233,10 +254,16 @@ } private static IBlockData b(IBlockData iblockdata, GeneratorAccess generatoraccess, BlockPosition blockposition, ItemStack itemstack) { @@ -83,7 +84,7 @@ return iblockdata; } else { int j = i + 1; -@@ -253,7 +279,8 @@ +@@ -284,7 +311,8 @@ public IWorldInventory a(IBlockData iblockdata, GeneratorAccess generatoraccess, BlockPosition blockposition) { int i = (Integer) iblockdata.get(BlockComposter.a); @@ -93,7 +94,7 @@ } static class ContainerInput extends InventorySubcontainer implements IWorldInventory { -@@ -265,6 +292,7 @@ +@@ -296,6 +324,7 @@ public ContainerInput(IBlockData iblockdata, GeneratorAccess generatoraccess, BlockPosition blockposition) { super(1); @@ -101,7 +102,7 @@ this.a = iblockdata; this.b = generatoraccess; this.c = blockposition; -@@ -317,6 +345,7 @@ +@@ -348,6 +377,7 @@ this.blockData = iblockdata; this.generatorAccess = generatoraccess; this.blockPosition = blockposition; @@ -109,7 +110,7 @@ } @Override -@@ -341,15 +370,23 @@ +@@ -372,15 +402,23 @@ @Override public void update() { diff --git a/nms-patches/net/minecraft/world/level/block/BlockConcretePowder.patch b/nms-patches/net/minecraft/world/level/block/BlockConcretePowder.patch index 802db9bdd..1da36e4f4 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockConcretePowder.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockConcretePowder.patch @@ -1,7 +1,8 @@ ---- a/net/minecraft/server/BlockConcretePowder.java -+++ b/net/minecraft/server/BlockConcretePowder.java -@@ -1,5 +1,10 @@ - package net.minecraft.server; +--- a/net/minecraft/world/level/block/BlockConcretePowder.java ++++ b/net/minecraft/world/level/block/BlockConcretePowder.java +@@ -13,6 +13,11 @@ + import net.minecraft.world.level.block.state.BlockBase; + import net.minecraft.world.level.block.state.IBlockData; +// CraftBukkit start +import org.bukkit.craftbukkit.block.CraftBlockState; @@ -11,7 +12,7 @@ public class BlockConcretePowder extends BlockFalling { private final IBlockData a; -@@ -12,7 +17,7 @@ +@@ -25,7 +30,7 @@ @Override public void a(World world, BlockPosition blockposition, IBlockData iblockdata, IBlockData iblockdata1, EntityFallingBlock entityfallingblock) { if (canHarden(world, blockposition, iblockdata1)) { @@ -20,7 +21,7 @@ } } -@@ -23,7 +28,24 @@ +@@ -36,7 +41,24 @@ BlockPosition blockposition = blockactioncontext.getClickPosition(); IBlockData iblockdata = world.getType(blockposition); @@ -46,7 +47,7 @@ } private static boolean canHarden(IBlockAccess iblockaccess, BlockPosition blockposition, IBlockData iblockdata) { -@@ -59,6 +81,24 @@ +@@ -72,6 +94,24 @@ @Override public IBlockData updateState(IBlockData iblockdata, EnumDirection enumdirection, IBlockData iblockdata1, GeneratorAccess generatoraccess, BlockPosition blockposition, BlockPosition blockposition1) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockCoral.patch b/nms-patches/net/minecraft/world/level/block/BlockCoral.patch index b9e4ae958..6a1a5843f 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockCoral.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockCoral.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BlockCoral.java -+++ b/net/minecraft/server/BlockCoral.java -@@ -15,6 +15,11 @@ +--- a/net/minecraft/world/level/block/BlockCoral.java ++++ b/net/minecraft/world/level/block/BlockCoral.java +@@ -26,6 +26,11 @@ @Override public void tickAlways(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) { if (!this.a((IBlockAccess) worldserver, blockposition)) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockCoralFan.patch b/nms-patches/net/minecraft/world/level/block/BlockCoralFan.patch index 882f91fa3..61a602827 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockCoralFan.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockCoralFan.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BlockCoralFan.java -+++ b/net/minecraft/server/BlockCoralFan.java -@@ -19,6 +19,11 @@ +--- a/net/minecraft/world/level/block/BlockCoralFan.java ++++ b/net/minecraft/world/level/block/BlockCoralFan.java +@@ -29,6 +29,11 @@ @Override public void tickAlways(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) { if (!c(iblockdata, (IBlockAccess) worldserver, blockposition)) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockCoralFanWall.patch b/nms-patches/net/minecraft/world/level/block/BlockCoralFanWall.patch index b751a4e46..fe8f568e4 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockCoralFanWall.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockCoralFanWall.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BlockCoralFanWall.java -+++ b/net/minecraft/server/BlockCoralFanWall.java -@@ -19,6 +19,11 @@ +--- a/net/minecraft/world/level/block/BlockCoralFanWall.java ++++ b/net/minecraft/world/level/block/BlockCoralFanWall.java +@@ -29,6 +29,11 @@ @Override public void tickAlways(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) { if (!c(iblockdata, (IBlockAccess) worldserver, blockposition)) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockCoralPlant.patch b/nms-patches/net/minecraft/world/level/block/BlockCoralPlant.patch index 2845853b5..f5c84b508 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockCoralPlant.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockCoralPlant.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BlockCoralPlant.java -+++ b/net/minecraft/server/BlockCoralPlant.java -@@ -20,6 +20,11 @@ +--- a/net/minecraft/world/level/block/BlockCoralPlant.java ++++ b/net/minecraft/world/level/block/BlockCoralPlant.java +@@ -32,6 +32,11 @@ @Override public void tickAlways(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) { if (!c(iblockdata, (IBlockAccess) worldserver, blockposition)) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockCrops.patch b/nms-patches/net/minecraft/world/level/block/BlockCrops.patch index 5e8e9eb62..1cc918121 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockCrops.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockCrops.patch @@ -1,15 +1,15 @@ ---- a/net/minecraft/server/BlockCrops.java -+++ b/net/minecraft/server/BlockCrops.java -@@ -2,6 +2,8 @@ - - import java.util.Random; +--- a/net/minecraft/world/level/block/BlockCrops.java ++++ b/net/minecraft/world/level/block/BlockCrops.java +@@ -18,6 +18,8 @@ + import net.minecraft.world.phys.shapes.VoxelShape; + import net.minecraft.world.phys.shapes.VoxelShapeCollision; +import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit + public class BlockCrops extends BlockPlant implements IBlockFragilePlantElement { public static final BlockStateInteger AGE = BlockProperties.ai; -@@ -56,7 +58,7 @@ +@@ -72,7 +74,7 @@ float f = a((Block) this, (IBlockAccess) worldserver, blockposition); if (random.nextInt((int) (25.0F / f) + 1) == 0) { @@ -18,7 +18,7 @@ } } } -@@ -71,7 +73,7 @@ +@@ -87,7 +89,7 @@ i = j; } @@ -27,7 +27,7 @@ } protected int a(World world) { -@@ -129,7 +131,7 @@ +@@ -145,7 +147,7 @@ @Override public void a(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockDaylightDetector.patch b/nms-patches/net/minecraft/world/level/block/BlockDaylightDetector.patch index a1263c21d..32e5a8226 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockDaylightDetector.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockDaylightDetector.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BlockDaylightDetector.java -+++ b/net/minecraft/server/BlockDaylightDetector.java -@@ -43,6 +43,7 @@ +--- a/net/minecraft/world/level/block/BlockDaylightDetector.java ++++ b/net/minecraft/world/level/block/BlockDaylightDetector.java +@@ -65,6 +65,7 @@ i = MathHelper.clamp(i, 0, 15); if ((Integer) iblockdata.get(BlockDaylightDetector.POWER) != i) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockDiodeAbstract.patch b/nms-patches/net/minecraft/world/level/block/BlockDiodeAbstract.patch index 7be1c166b..5296f6030 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockDiodeAbstract.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockDiodeAbstract.patch @@ -1,15 +1,15 @@ ---- a/net/minecraft/server/BlockDiodeAbstract.java -+++ b/net/minecraft/server/BlockDiodeAbstract.java -@@ -2,6 +2,8 @@ - - import java.util.Random; +--- a/net/minecraft/world/level/block/BlockDiodeAbstract.java ++++ b/net/minecraft/world/level/block/BlockDiodeAbstract.java +@@ -20,6 +20,8 @@ + import net.minecraft.world.phys.shapes.VoxelShape; + import net.minecraft.world.phys.shapes.VoxelShapeCollision; +import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit + public abstract class BlockDiodeAbstract extends BlockFacingHorizontal { protected static final VoxelShape b = Block.a(0.0D, 0.0D, 0.0D, 16.0D, 2.0D, 16.0D); -@@ -28,8 +30,18 @@ +@@ -46,8 +48,18 @@ boolean flag1 = this.a((World) worldserver, blockposition, iblockdata); if (flag && !flag1) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockDirtSnowSpreadable.patch b/nms-patches/net/minecraft/world/level/block/BlockDirtSnowSpreadable.patch index 38dd7143d..1d6fc7b17 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockDirtSnowSpreadable.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockDirtSnowSpreadable.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BlockDirtSnowSpreadable.java -+++ b/net/minecraft/server/BlockDirtSnowSpreadable.java -@@ -32,6 +32,11 @@ +--- a/net/minecraft/world/level/block/BlockDirtSnowSpreadable.java ++++ b/net/minecraft/world/level/block/BlockDirtSnowSpreadable.java +@@ -42,6 +42,11 @@ @Override public void tick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) { if (!b(iblockdata, (IWorldReader) worldserver, blockposition)) { @@ -12,7 +12,7 @@ worldserver.setTypeUpdate(blockposition, Blocks.DIRT.getBlockData()); } else { if (worldserver.getLightLevel(blockposition.up()) >= 9) { -@@ -41,7 +46,7 @@ +@@ -51,7 +56,7 @@ BlockPosition blockposition1 = blockposition.b(random.nextInt(3) - 1, random.nextInt(5) - 3, random.nextInt(3) - 1); if (worldserver.getType(blockposition1).a(Blocks.DIRT) && c(iblockdata1, (IWorldReader) worldserver, blockposition1)) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockDispenser.patch b/nms-patches/net/minecraft/world/level/block/BlockDispenser.patch index 196408b0e..db9105998 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockDispenser.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockDispenser.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BlockDispenser.java -+++ b/net/minecraft/server/BlockDispenser.java -@@ -8,9 +8,10 @@ +--- a/net/minecraft/world/level/block/BlockDispenser.java ++++ b/net/minecraft/world/level/block/BlockDispenser.java +@@ -41,9 +41,10 @@ public static final BlockStateDirection FACING = BlockDirectional.FACING; public static final BlockStateBoolean TRIGGERED = BlockProperties.A; @@ -12,7 +12,7 @@ public static void a(IMaterial imaterial, IDispenseBehavior idispensebehavior) { BlockDispenser.REGISTRY.put(imaterial.getItem(), idispensebehavior); -@@ -53,6 +54,7 @@ +@@ -86,6 +87,7 @@ IDispenseBehavior idispensebehavior = this.a(itemstack); if (idispensebehavior != IDispenseBehavior.NONE) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockDoor.patch b/nms-patches/net/minecraft/world/level/block/BlockDoor.patch index 7e29c5cff..183d8b275 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockDoor.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockDoor.patch @@ -1,15 +1,15 @@ ---- a/net/minecraft/server/BlockDoor.java -+++ b/net/minecraft/server/BlockDoor.java -@@ -2,6 +2,8 @@ - - import javax.annotation.Nullable; +--- a/net/minecraft/world/level/block/BlockDoor.java ++++ b/net/minecraft/world/level/block/BlockDoor.java +@@ -31,6 +31,8 @@ + import net.minecraft.world.phys.shapes.VoxelShape; + import net.minecraft.world.phys.shapes.VoxelShapeCollision; +import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit + public class BlockDoor extends Block { public static final BlockStateDirection FACING = BlockFacingHorizontal.FACING; -@@ -157,9 +159,24 @@ +@@ -186,9 +188,24 @@ @Override public void doPhysics(IBlockData iblockdata, World world, BlockPosition blockposition, Block block, BlockPosition blockposition1, boolean flag) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockDragonEgg.patch b/nms-patches/net/minecraft/world/level/block/BlockDragonEgg.patch index 5cfda88ff..ed2fb2ce0 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockDragonEgg.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockDragonEgg.patch @@ -1,14 +1,15 @@ ---- a/net/minecraft/server/BlockDragonEgg.java -+++ b/net/minecraft/server/BlockDragonEgg.java -@@ -1,5 +1,7 @@ - package net.minecraft.server; +--- a/net/minecraft/world/level/block/BlockDragonEgg.java ++++ b/net/minecraft/world/level/block/BlockDragonEgg.java +@@ -15,6 +15,8 @@ + import net.minecraft.world.phys.shapes.VoxelShape; + import net.minecraft.world.phys.shapes.VoxelShapeCollision; +import org.bukkit.event.block.BlockFromToEvent; // CraftBukkit + public class BlockDragonEgg extends BlockFalling { protected static final VoxelShape a = Block.a(1.0D, 0.0D, 1.0D, 15.0D, 16.0D, 15.0D); -@@ -29,6 +31,18 @@ +@@ -44,6 +46,18 @@ BlockPosition blockposition1 = blockposition.b(world.random.nextInt(16) - world.random.nextInt(16), world.random.nextInt(8) - world.random.nextInt(8), world.random.nextInt(16) - world.random.nextInt(16)); if (world.getType(blockposition1).isAir()) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockDropper.patch b/nms-patches/net/minecraft/world/level/block/BlockDropper.patch index b29190759..d0bb1f438 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockDropper.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockDropper.patch @@ -1,9 +1,11 @@ ---- a/net/minecraft/server/BlockDropper.java -+++ b/net/minecraft/server/BlockDropper.java -@@ -1,5 +1,10 @@ - package net.minecraft.server; +--- a/net/minecraft/world/level/block/BlockDropper.java ++++ b/net/minecraft/world/level/block/BlockDropper.java +@@ -16,6 +16,12 @@ + import net.minecraft.world.level.block.entity.TileEntityHopper; + import net.minecraft.world.level.block.state.BlockBase; +// CraftBukkit start ++import net.minecraft.world.InventoryLargeChest; +import org.bukkit.craftbukkit.inventory.CraftItemStack; +import org.bukkit.event.inventory.InventoryMoveItemEvent; +// CraftBukkit end @@ -11,7 +13,7 @@ public class BlockDropper extends BlockDispenser { private static final IDispenseBehavior c = new DispenseBehaviorItem(); -@@ -37,8 +42,25 @@ +@@ -53,8 +59,25 @@ if (iinventory == null) { itemstack1 = BlockDropper.c.dispense(sourceblock, itemstack); } else { diff --git a/nms-patches/net/minecraft/world/level/block/BlockEnderPortal.patch b/nms-patches/net/minecraft/world/level/block/BlockEnderPortal.patch index 3ec8cf18c..8856533be 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockEnderPortal.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockEnderPortal.patch @@ -1,9 +1,12 @@ ---- a/net/minecraft/server/BlockEnderPortal.java -+++ b/net/minecraft/server/BlockEnderPortal.java -@@ -1,5 +1,10 @@ - package net.minecraft.server; +--- a/net/minecraft/world/level/block/BlockEnderPortal.java ++++ b/net/minecraft/world/level/block/BlockEnderPortal.java +@@ -16,6 +16,13 @@ + import net.minecraft.world.phys.shapes.VoxelShapeCollision; + import net.minecraft.world.phys.shapes.VoxelShapes; +// CraftBukkit start ++import net.minecraft.server.level.EntityPlayer; ++import net.minecraft.world.level.dimension.DimensionManager; +import org.bukkit.event.entity.EntityPortalEnterEvent; +import org.bukkit.event.player.PlayerTeleportEvent; +// CraftBukkit end @@ -11,7 +14,7 @@ public class BlockEnderPortal extends BlockTileEntity { protected static final VoxelShape a = Block.a(0.0D, 0.0D, 0.0D, 16.0D, 12.0D, 16.0D); -@@ -21,13 +26,22 @@ +@@ -37,13 +44,22 @@ @Override public void a(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) { if (world instanceof WorldServer && !entity.isPassenger() && !entity.isVehicle() && entity.canPortal() && VoxelShapes.c(VoxelShapes.a(entity.getBoundingBox().d((double) (-blockposition.getX()), (double) (-blockposition.getY()), (double) (-blockposition.getZ()))), iblockdata.getShape(world, blockposition), OperatorBoolean.AND)) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockFenceGate.patch b/nms-patches/net/minecraft/world/level/block/BlockFenceGate.patch index d29e021dd..1f6dccae6 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockFenceGate.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockFenceGate.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BlockFenceGate.java -+++ b/net/minecraft/server/BlockFenceGate.java -@@ -103,6 +103,17 @@ +--- a/net/minecraft/world/level/block/BlockFenceGate.java ++++ b/net/minecraft/world/level/block/BlockFenceGate.java +@@ -125,6 +125,17 @@ public void doPhysics(IBlockData iblockdata, World world, BlockPosition blockposition, Block block, BlockPosition blockposition1, boolean flag) { if (!world.isClientSide) { boolean flag1 = world.isBlockIndirectlyPowered(blockposition); diff --git a/nms-patches/net/minecraft/world/level/block/BlockFire.patch b/nms-patches/net/minecraft/world/level/block/BlockFire.patch index 2788f4cd4..cd886028c 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockFire.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockFire.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/BlockFire.java -+++ b/net/minecraft/server/BlockFire.java -@@ -8,6 +8,13 @@ - import java.util.function.Function; - import java.util.stream.Collectors; +--- a/net/minecraft/world/level/block/BlockFire.java ++++ b/net/minecraft/world/level/block/BlockFire.java +@@ -28,6 +28,13 @@ + import net.minecraft.world.phys.shapes.VoxelShapeCollision; + import net.minecraft.world.phys.shapes.VoxelShapes; +// CraftBukkit start +import org.bukkit.craftbukkit.block.CraftBlockState; @@ -14,7 +14,7 @@ public class BlockFire extends BlockFireAbstract { public static final BlockStateInteger AGE = BlockProperties.aj; -@@ -64,7 +71,24 @@ +@@ -84,7 +91,24 @@ @Override public IBlockData updateState(IBlockData iblockdata, EnumDirection enumdirection, IBlockData iblockdata1, GeneratorAccess generatoraccess, BlockPosition blockposition, BlockPosition blockposition1) { @@ -40,7 +40,7 @@ } @Override -@@ -113,7 +137,7 @@ +@@ -133,7 +157,7 @@ worldserver.getBlockTickList().a(blockposition, this, a(worldserver.random)); if (worldserver.getGameRules().getBoolean(GameRules.DO_FIRE_TICK)) { if (!iblockdata.canPlace(worldserver, blockposition)) { @@ -49,7 +49,7 @@ } IBlockData iblockdata1 = worldserver.getType(blockposition.down()); -@@ -121,7 +145,7 @@ +@@ -141,7 +165,7 @@ int i = (Integer) iblockdata.get(BlockFire.AGE); if (!flag && worldserver.isRaining() && this.a((World) worldserver, blockposition) && random.nextFloat() < 0.2F + (float) i * 0.03F) { @@ -58,7 +58,7 @@ } else { int j = Math.min(15, i + random.nextInt(3) / 2); -@@ -135,14 +159,14 @@ +@@ -155,14 +179,14 @@ BlockPosition blockposition1 = blockposition.down(); if (!worldserver.getType(blockposition1).d(worldserver, blockposition1, EnumDirection.UP) || i > 3) { @@ -75,7 +75,7 @@ return; } } -@@ -150,12 +174,14 @@ +@@ -170,12 +194,14 @@ boolean flag1 = worldserver.u(blockposition); int k = flag1 ? -50 : 0; @@ -96,7 +96,7 @@ BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition(); for (int l = -1; l <= 1; ++l) { -@@ -181,7 +207,15 @@ +@@ -201,7 +227,15 @@ if (i2 > 0 && random.nextInt(k1) <= i2 && (!worldserver.isRaining() || !this.a((World) worldserver, (BlockPosition) blockposition_mutableblockposition))) { int j2 = Math.min(15, i + random.nextInt(5) / 4); @@ -113,7 +113,7 @@ } } } -@@ -205,12 +239,24 @@ +@@ -225,12 +259,24 @@ return iblockdata.b(BlockProperties.C) && (Boolean) iblockdata.get(BlockProperties.C) ? 0 : this.flameChances.getInt(iblockdata.getBlock()); } diff --git a/nms-patches/net/minecraft/world/level/block/BlockFireAbstract.patch b/nms-patches/net/minecraft/world/level/block/BlockFireAbstract.patch index 5e4f7014c..e532aee98 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockFireAbstract.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockFireAbstract.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BlockFireAbstract.java -+++ b/net/minecraft/server/BlockFireAbstract.java -@@ -36,7 +36,14 @@ +--- a/net/minecraft/world/level/block/BlockFireAbstract.java ++++ b/net/minecraft/world/level/block/BlockFireAbstract.java +@@ -50,7 +50,14 @@ if (!entity.isFireProof()) { entity.setFireTicks(entity.getFireTicks() + 1); if (entity.getFireTicks() == 0) { @@ -16,7 +16,7 @@ } entity.damageEntity(DamageSource.FIRE, this.b); -@@ -58,14 +65,14 @@ +@@ -72,14 +79,14 @@ } if (!iblockdata.canPlace(world, blockposition)) { @@ -29,11 +29,11 @@ private static boolean a(World world) { - return world.getDimensionKey() == World.OVERWORLD || world.getDimensionKey() == World.THE_NETHER; -+ return world.getTypeKey() == DimensionManager.OVERWORLD || world.getTypeKey() == DimensionManager.THE_NETHER; // CraftBukkit - getTypeKey() ++ return world.getTypeKey() == net.minecraft.world.level.dimension.DimensionManager.OVERWORLD || world.getTypeKey() == net.minecraft.world.level.dimension.DimensionManager.THE_NETHER; // CraftBukkit - getTypeKey() } @Override -@@ -109,4 +116,12 @@ +@@ -123,4 +130,12 @@ } } } diff --git a/nms-patches/net/minecraft/world/level/block/BlockFluids.patch b/nms-patches/net/minecraft/world/level/block/BlockFluids.patch index 68bbc251e..c6a739a81 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockFluids.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockFluids.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BlockFluids.java -+++ b/net/minecraft/server/BlockFluids.java -@@ -113,14 +113,20 @@ +--- a/net/minecraft/world/level/block/BlockFluids.java ++++ b/net/minecraft/world/level/block/BlockFluids.java +@@ -137,14 +137,20 @@ if (world.getFluid(blockposition1).a((Tag) TagsFluid.WATER)) { Block block = world.getFluid(blockposition).isSource() ? Blocks.OBSIDIAN : Blocks.COBBLESTONE; diff --git a/nms-patches/net/minecraft/world/level/block/BlockFungi.patch b/nms-patches/net/minecraft/world/level/block/BlockFungi.patch index b10cddf1b..fdfbb6d4a 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockFungi.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockFungi.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BlockFungi.java -+++ b/net/minecraft/server/BlockFungi.java -@@ -38,6 +38,13 @@ +--- a/net/minecraft/world/level/block/BlockFungi.java ++++ b/net/minecraft/world/level/block/BlockFungi.java +@@ -50,6 +50,13 @@ @Override public void a(WorldServer worldserver, Random random, BlockPosition blockposition, IBlockData iblockdata) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockGrass.patch b/nms-patches/net/minecraft/world/level/block/BlockGrass.patch index f5eb144de..fb9bc0117 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockGrass.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockGrass.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BlockGrass.java -+++ b/net/minecraft/server/BlockGrass.java -@@ -64,7 +64,7 @@ +--- a/net/minecraft/world/level/block/BlockGrass.java ++++ b/net/minecraft/world/level/block/BlockGrass.java +@@ -72,7 +72,7 @@ } if (iblockdata3.canPlace(worldserver, blockposition2)) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockGrassPath.patch b/nms-patches/net/minecraft/world/level/block/BlockGrassPath.patch index 94bb08c88..d2b8f8292 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockGrassPath.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockGrassPath.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BlockGrassPath.java -+++ b/net/minecraft/server/BlockGrassPath.java -@@ -31,6 +31,11 @@ +--- a/net/minecraft/world/level/block/BlockGrassPath.java ++++ b/net/minecraft/world/level/block/BlockGrassPath.java +@@ -43,6 +43,11 @@ @Override public void tickAlways(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockGrowingTop.patch b/nms-patches/net/minecraft/world/level/block/BlockGrowingTop.patch index 4c565c223..75e697a55 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockGrowingTop.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockGrowingTop.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BlockGrowingTop.java -+++ b/net/minecraft/server/BlockGrowingTop.java -@@ -29,7 +29,7 @@ +--- a/net/minecraft/world/level/block/BlockGrowingTop.java ++++ b/net/minecraft/world/level/block/BlockGrowingTop.java +@@ -44,7 +44,7 @@ BlockPosition blockposition1 = blockposition.shift(this.a); if (this.h(worldserver.getType(blockposition1))) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockIce.patch b/nms-patches/net/minecraft/world/level/block/BlockIce.patch index c4dc62bda..325d1e9ba 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockIce.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockIce.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BlockIce.java -+++ b/net/minecraft/server/BlockIce.java -@@ -36,6 +36,11 @@ +--- a/net/minecraft/world/level/block/BlockIce.java ++++ b/net/minecraft/world/level/block/BlockIce.java +@@ -50,6 +50,11 @@ } protected void melt(IBlockData iblockdata, World world, BlockPosition blockposition) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockJukeBox.patch b/nms-patches/net/minecraft/world/level/block/BlockJukeBox.patch index 5cd550ed1..9f7002ce6 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockJukeBox.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockJukeBox.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BlockJukeBox.java -+++ b/net/minecraft/server/BlockJukeBox.java -@@ -42,7 +42,13 @@ +--- a/net/minecraft/world/level/block/BlockJukeBox.java ++++ b/net/minecraft/world/level/block/BlockJukeBox.java +@@ -63,7 +63,13 @@ TileEntity tileentity = generatoraccess.getTileEntity(blockposition); if (tileentity instanceof TileEntityJukeBox) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockLeaves.patch b/nms-patches/net/minecraft/world/level/block/BlockLeaves.patch index 34c9f2fa5..2d51051cf 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockLeaves.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockLeaves.patch @@ -1,15 +1,15 @@ ---- a/net/minecraft/server/BlockLeaves.java -+++ b/net/minecraft/server/BlockLeaves.java -@@ -2,6 +2,8 @@ - - import java.util.Random; +--- a/net/minecraft/world/level/block/BlockLeaves.java ++++ b/net/minecraft/world/level/block/BlockLeaves.java +@@ -19,6 +19,8 @@ + import net.minecraft.world.phys.shapes.VoxelShape; + import net.minecraft.world.phys.shapes.VoxelShapes; +import org.bukkit.event.block.LeavesDecayEvent; // CraftBukkit + public class BlockLeaves extends Block { public static final BlockStateInteger DISTANCE = BlockProperties.an; -@@ -25,6 +27,14 @@ +@@ -42,6 +44,14 @@ @Override public void tick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) { if (!(Boolean) iblockdata.get(BlockLeaves.PERSISTENT) && (Integer) iblockdata.get(BlockLeaves.DISTANCE) == 7) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockLectern.patch b/nms-patches/net/minecraft/world/level/block/BlockLectern.patch index 5c6e10f31..182db2ec5 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockLectern.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockLectern.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BlockLectern.java -+++ b/net/minecraft/server/BlockLectern.java -@@ -165,12 +165,13 @@ +--- a/net/minecraft/world/level/block/BlockLectern.java ++++ b/net/minecraft/world/level/block/BlockLectern.java +@@ -196,12 +196,13 @@ } private void d(IBlockData iblockdata, World world, BlockPosition blockposition) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockLever.patch b/nms-patches/net/minecraft/world/level/block/BlockLever.patch index e507caebb..96472a754 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockLever.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockLever.patch @@ -1,14 +1,15 @@ ---- a/net/minecraft/server/BlockLever.java -+++ b/net/minecraft/server/BlockLever.java -@@ -1,5 +1,7 @@ - package net.minecraft.server; +--- a/net/minecraft/world/level/block/BlockLever.java ++++ b/net/minecraft/world/level/block/BlockLever.java +@@ -22,6 +22,8 @@ + import net.minecraft.world.phys.shapes.VoxelShape; + import net.minecraft.world.phys.shapes.VoxelShapeCollision; +import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit + public class BlockLever extends BlockAttachable { public static final BlockStateBoolean POWERED = BlockProperties.w; -@@ -64,6 +66,20 @@ +@@ -86,6 +88,20 @@ return EnumInteractionResult.SUCCESS; } else { diff --git a/nms-patches/net/minecraft/world/level/block/BlockMagma.patch b/nms-patches/net/minecraft/world/level/block/BlockMagma.patch index dae5fe4c5..57ee64aaf 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockMagma.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockMagma.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BlockMagma.java -+++ b/net/minecraft/server/BlockMagma.java -@@ -11,7 +11,9 @@ +--- a/net/minecraft/world/level/block/BlockMagma.java ++++ b/net/minecraft/world/level/block/BlockMagma.java +@@ -28,7 +28,9 @@ @Override public void stepOn(World world, BlockPosition blockposition, Entity entity) { if (!entity.isFireProof() && entity instanceof EntityLiving && !EnchantmentManager.i((EntityLiving) entity)) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockMinecartDetector.patch b/nms-patches/net/minecraft/world/level/block/BlockMinecartDetector.patch index 4a0f051af..ae590673b 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockMinecartDetector.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockMinecartDetector.patch @@ -1,15 +1,15 @@ ---- a/net/minecraft/server/BlockMinecartDetector.java -+++ b/net/minecraft/server/BlockMinecartDetector.java -@@ -6,6 +6,8 @@ - import java.util.function.Predicate; - import javax.annotation.Nullable; +--- a/net/minecraft/world/level/block/BlockMinecartDetector.java ++++ b/net/minecraft/world/level/block/BlockMinecartDetector.java +@@ -26,6 +26,8 @@ + import net.minecraft.world.level.block.state.properties.IBlockState; + import net.minecraft.world.phys.AxisAlignedBB; +import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit + public class BlockMinecartDetector extends BlockMinecartTrackAbstract { public static final BlockStateEnum SHAPE = BlockProperties.ad; -@@ -58,6 +60,16 @@ +@@ -78,6 +80,16 @@ } IBlockData iblockdata1; diff --git a/nms-patches/net/minecraft/world/level/block/BlockMobSpawner.patch b/nms-patches/net/minecraft/world/level/block/BlockMobSpawner.patch index d93b2c558..7f4ede58d 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockMobSpawner.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockMobSpawner.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BlockMobSpawner.java -+++ b/net/minecraft/server/BlockMobSpawner.java -@@ -14,9 +14,19 @@ +--- a/net/minecraft/world/level/block/BlockMobSpawner.java ++++ b/net/minecraft/world/level/block/BlockMobSpawner.java +@@ -23,9 +23,19 @@ @Override public void dropNaturally(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, ItemStack itemstack) { super.dropNaturally(iblockdata, worldserver, blockposition, itemstack); diff --git a/nms-patches/net/minecraft/world/level/block/BlockMonsterEggs.patch b/nms-patches/net/minecraft/world/level/block/BlockMonsterEggs.patch index 74a153063..9ec317fc8 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockMonsterEggs.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockMonsterEggs.patch @@ -1,15 +1,15 @@ ---- a/net/minecraft/server/BlockMonsterEggs.java -+++ b/net/minecraft/server/BlockMonsterEggs.java -@@ -3,6 +3,8 @@ - import com.google.common.collect.Maps; - import java.util.Map; +--- a/net/minecraft/world/level/block/BlockMonsterEggs.java ++++ b/net/minecraft/world/level/block/BlockMonsterEggs.java +@@ -15,6 +15,8 @@ + import net.minecraft.world.level.block.state.BlockBase; + import net.minecraft.world.level.block.state.IBlockData; +import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason; // CraftBukkit + public class BlockMonsterEggs extends Block { private final Block a; -@@ -26,7 +28,7 @@ +@@ -38,7 +40,7 @@ EntitySilverfish entitysilverfish = (EntitySilverfish) EntityTypes.SILVERFISH.a((World) worldserver); entitysilverfish.setPositionRotation((double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D, 0.0F, 0.0F); diff --git a/nms-patches/net/minecraft/world/level/block/BlockMushroom.patch b/nms-patches/net/minecraft/world/level/block/BlockMushroom.patch index 671f3734a..a50bea1fc 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockMushroom.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockMushroom.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/BlockMushroom.java -+++ b/net/minecraft/server/BlockMushroom.java -@@ -3,6 +3,10 @@ - import java.util.Iterator; - import java.util.Random; +--- a/net/minecraft/world/level/block/BlockMushroom.java ++++ b/net/minecraft/world/level/block/BlockMushroom.java +@@ -16,6 +16,10 @@ + import net.minecraft.world.phys.shapes.VoxelShape; + import net.minecraft.world.phys.shapes.VoxelShapeCollision; +// CraftBukkit start +import org.bukkit.TreeType; @@ -11,7 +11,7 @@ public class BlockMushroom extends BlockPlant implements IBlockFragilePlantElement { protected static final VoxelShape a = Block.a(5.0D, 0.0D, 5.0D, 11.0D, 6.0D, 11.0D); -@@ -45,7 +49,7 @@ +@@ -58,7 +62,7 @@ } if (worldserver.isEmpty(blockposition2) && iblockdata.canPlace(worldserver, blockposition2)) { @@ -20,7 +20,7 @@ } } -@@ -69,6 +73,7 @@ +@@ -82,6 +86,7 @@ WorldGenFeatureConfigured worldgenfeatureconfigured; if (this == Blocks.BROWN_MUSHROOM) { @@ -28,7 +28,7 @@ worldgenfeatureconfigured = BiomeDecoratorGroups.HUGE_BROWN_MUSHROOM; } else { if (this != Blocks.RED_MUSHROOM) { -@@ -76,6 +81,7 @@ +@@ -89,6 +94,7 @@ return false; } diff --git a/nms-patches/net/minecraft/world/level/block/BlockNetherWart.patch b/nms-patches/net/minecraft/world/level/block/BlockNetherWart.patch index 65cf73689..be21279b5 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockNetherWart.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockNetherWart.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BlockNetherWart.java -+++ b/net/minecraft/server/BlockNetherWart.java -@@ -33,7 +33,7 @@ +--- a/net/minecraft/world/level/block/BlockNetherWart.java ++++ b/net/minecraft/world/level/block/BlockNetherWart.java +@@ -43,7 +43,7 @@ if (i < 3 && random.nextInt(10) == 0) { iblockdata = (IBlockData) iblockdata.set(BlockNetherWart.AGE, i + 1); diff --git a/nms-patches/net/minecraft/world/level/block/BlockNote.patch b/nms-patches/net/minecraft/world/level/block/BlockNote.patch index 9a4a1ebcb..c30ddc655 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockNote.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockNote.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BlockNote.java -+++ b/net/minecraft/server/BlockNote.java -@@ -27,7 +27,8 @@ +--- a/net/minecraft/world/level/block/BlockNote.java ++++ b/net/minecraft/world/level/block/BlockNote.java +@@ -49,7 +49,8 @@ if (flag1 != (Boolean) iblockdata.get(BlockNote.POWERED)) { if (flag1) { @@ -10,7 +10,7 @@ } world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockNote.POWERED, flag1), 3); -@@ -35,9 +36,14 @@ +@@ -57,9 +58,14 @@ } @@ -27,7 +27,7 @@ } } -@@ -49,7 +55,7 @@ +@@ -71,7 +77,7 @@ } else { iblockdata = (IBlockData) iblockdata.a((IBlockState) BlockNote.NOTE); world.setTypeAndData(blockposition, iblockdata, 3); @@ -36,7 +36,7 @@ entityhuman.a(StatisticList.TUNE_NOTEBLOCK); return EnumInteractionResult.CONSUME; } -@@ -58,7 +64,7 @@ +@@ -80,7 +86,7 @@ @Override public void attack(IBlockData iblockdata, World world, BlockPosition blockposition, EntityHuman entityhuman) { if (!world.isClientSide) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockObserver.patch b/nms-patches/net/minecraft/world/level/block/BlockObserver.patch index 187a322b6..ab8938468 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockObserver.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockObserver.patch @@ -1,15 +1,15 @@ ---- a/net/minecraft/server/BlockObserver.java -+++ b/net/minecraft/server/BlockObserver.java -@@ -2,6 +2,8 @@ - - import java.util.Random; +--- a/net/minecraft/world/level/block/BlockObserver.java ++++ b/net/minecraft/world/level/block/BlockObserver.java +@@ -14,6 +14,8 @@ + import net.minecraft.world.level.block.state.properties.BlockProperties; + import net.minecraft.world.level.block.state.properties.BlockStateBoolean; +import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit + public class BlockObserver extends BlockDirectional { public static final BlockStateBoolean b = BlockProperties.w; -@@ -29,8 +31,18 @@ +@@ -41,8 +43,18 @@ @Override public void tickAlways(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) { if ((Boolean) iblockdata.get(BlockObserver.b)) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockOre.patch b/nms-patches/net/minecraft/world/level/block/BlockOre.patch index 597134ad5..48a495484 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockOre.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockOre.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BlockOre.java -+++ b/net/minecraft/server/BlockOre.java -@@ -15,6 +15,7 @@ +--- a/net/minecraft/world/level/block/BlockOre.java ++++ b/net/minecraft/world/level/block/BlockOre.java +@@ -23,6 +23,7 @@ @Override public void dropNaturally(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, ItemStack itemstack) { super.dropNaturally(iblockdata, worldserver, blockposition, itemstack); @@ -8,7 +8,7 @@ if (EnchantmentManager.getEnchantmentLevel(Enchantments.SILK_TOUCH, itemstack) == 0) { int i = this.a(worldserver.random); -@@ -22,6 +23,21 @@ +@@ -30,6 +31,21 @@ this.dropExperience(worldserver, blockposition, i); } } diff --git a/nms-patches/net/minecraft/world/level/block/BlockPlant.patch b/nms-patches/net/minecraft/world/level/block/BlockPlant.patch index 98cafaef1..1a21f2e0f 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockPlant.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockPlant.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BlockPlant.java -+++ b/net/minecraft/server/BlockPlant.java -@@ -12,7 +12,14 @@ +--- a/net/minecraft/world/level/block/BlockPlant.java ++++ b/net/minecraft/world/level/block/BlockPlant.java +@@ -21,7 +21,14 @@ @Override public IBlockData updateState(IBlockData iblockdata, EnumDirection enumdirection, IBlockData iblockdata1, GeneratorAccess generatoraccess, BlockPosition blockposition, BlockPosition blockposition1) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockPortal.patch b/nms-patches/net/minecraft/world/level/block/BlockPortal.patch index b625ad30b..c3e8cdd1f 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockPortal.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockPortal.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/BlockPortal.java -+++ b/net/minecraft/server/BlockPortal.java -@@ -2,6 +2,10 @@ - - import java.util.Random; +--- a/net/minecraft/world/level/block/BlockPortal.java ++++ b/net/minecraft/world/level/block/BlockPortal.java +@@ -23,6 +23,10 @@ + import net.minecraft.world.phys.shapes.VoxelShape; + import net.minecraft.world.phys.shapes.VoxelShapeCollision; +// CraftBukkit start +import org.bukkit.event.entity.EntityPortalEnterEvent; @@ -11,7 +11,7 @@ public class BlockPortal extends Block { public static final BlockStateEnum AXIS = BlockProperties.E; -@@ -32,7 +36,8 @@ +@@ -53,7 +57,8 @@ } if (worldserver.getType(blockposition).a((IBlockAccess) worldserver, blockposition, EntityTypes.ZOMBIFIED_PIGLIN)) { @@ -21,7 +21,7 @@ if (entity != null) { entity.resetPortalCooldown(); -@@ -54,6 +59,10 @@ +@@ -75,6 +80,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/net/minecraft/world/level/block/BlockPoweredRail.patch b/nms-patches/net/minecraft/world/level/block/BlockPoweredRail.patch index 0767f6985..36fb21512 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockPoweredRail.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockPoweredRail.patch @@ -1,14 +1,15 @@ ---- a/net/minecraft/server/BlockPoweredRail.java -+++ b/net/minecraft/server/BlockPoweredRail.java -@@ -1,5 +1,7 @@ - package net.minecraft.server; +--- a/net/minecraft/world/level/block/BlockPoweredRail.java ++++ b/net/minecraft/world/level/block/BlockPoweredRail.java +@@ -11,6 +11,8 @@ + import net.minecraft.world.level.block.state.properties.BlockStateEnum; + import net.minecraft.world.level.block.state.properties.IBlockState; +import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit + public class BlockPoweredRail extends BlockMinecartTrackAbstract { public static final BlockStateEnum SHAPE = BlockProperties.ad; -@@ -102,6 +104,13 @@ +@@ -113,6 +115,13 @@ boolean flag1 = world.isBlockIndirectlyPowered(blockposition) || this.a(world, blockposition, iblockdata, true, 0) || this.a(world, blockposition, iblockdata, false, 0); if (flag1 != flag) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockPressurePlateAbstract.patch b/nms-patches/net/minecraft/world/level/block/BlockPressurePlateAbstract.patch index bc1c7cc89..72fc98ef5 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockPressurePlateAbstract.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockPressurePlateAbstract.patch @@ -1,15 +1,15 @@ ---- a/net/minecraft/server/BlockPressurePlateAbstract.java -+++ b/net/minecraft/server/BlockPressurePlateAbstract.java -@@ -2,6 +2,8 @@ - - import java.util.Random; +--- a/net/minecraft/world/level/block/BlockPressurePlateAbstract.java ++++ b/net/minecraft/world/level/block/BlockPressurePlateAbstract.java +@@ -16,6 +16,8 @@ + import net.minecraft.world.phys.shapes.VoxelShape; + import net.minecraft.world.phys.shapes.VoxelShapeCollision; +import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit + public abstract class BlockPressurePlateAbstract extends Block { protected static final VoxelShape a = Block.a(1.0D, 0.0D, 1.0D, 15.0D, 0.5D, 15.0D); -@@ -65,6 +67,19 @@ +@@ -79,6 +81,19 @@ boolean flag = i > 0; boolean flag1 = j > 0; diff --git a/nms-patches/net/minecraft/world/level/block/BlockPressurePlateBinary.patch b/nms-patches/net/minecraft/world/level/block/BlockPressurePlateBinary.patch index 0d2fc3eef..2e99fd6c1 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockPressurePlateBinary.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockPressurePlateBinary.patch @@ -1,15 +1,15 @@ ---- a/net/minecraft/server/BlockPressurePlateBinary.java -+++ b/net/minecraft/server/BlockPressurePlateBinary.java -@@ -3,6 +3,8 @@ - import java.util.Iterator; - import java.util.List; +--- a/net/minecraft/world/level/block/BlockPressurePlateBinary.java ++++ b/net/minecraft/world/level/block/BlockPressurePlateBinary.java +@@ -18,6 +18,8 @@ + import net.minecraft.world.level.material.Material; + import net.minecraft.world.phys.AxisAlignedBB; +import org.bukkit.event.entity.EntityInteractEvent; // CraftBukkit + public class BlockPressurePlateBinary extends BlockPressurePlateAbstract { public static final BlockStateBoolean POWERED = BlockProperties.w; -@@ -66,6 +68,26 @@ +@@ -81,6 +83,26 @@ while (iterator.hasNext()) { Entity entity = (Entity) iterator.next(); diff --git a/nms-patches/net/minecraft/world/level/block/BlockPressurePlateWeighted.patch b/nms-patches/net/minecraft/world/level/block/BlockPressurePlateWeighted.patch index 18afba2eb..3a36239cd 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockPressurePlateWeighted.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockPressurePlateWeighted.patch @@ -1,14 +1,15 @@ ---- a/net/minecraft/server/BlockPressurePlateWeighted.java -+++ b/net/minecraft/server/BlockPressurePlateWeighted.java -@@ -1,5 +1,7 @@ - package net.minecraft.server; +--- a/net/minecraft/world/level/block/BlockPressurePlateWeighted.java ++++ b/net/minecraft/world/level/block/BlockPressurePlateWeighted.java +@@ -14,6 +14,8 @@ + import net.minecraft.world.level.block.state.properties.BlockProperties; + import net.minecraft.world.level.block.state.properties.BlockStateInteger; +import org.bukkit.event.entity.EntityInteractEvent; // CraftBukkit + public class BlockPressurePlateWeighted extends BlockPressurePlateAbstract { public static final BlockStateInteger POWER = BlockProperties.az; -@@ -13,7 +15,31 @@ +@@ -27,7 +29,31 @@ @Override protected int b(World world, BlockPosition blockposition) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockPumpkinCarved.patch b/nms-patches/net/minecraft/world/level/block/BlockPumpkinCarved.patch index 43e888daa..ca3b643f0 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockPumpkinCarved.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockPumpkinCarved.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/BlockPumpkinCarved.java -+++ b/net/minecraft/server/BlockPumpkinCarved.java -@@ -4,6 +4,11 @@ - import java.util.function.Predicate; - import javax.annotation.Nullable; +--- a/net/minecraft/world/level/block/BlockPumpkinCarved.java ++++ b/net/minecraft/world/level/block/BlockPumpkinCarved.java +@@ -26,6 +26,11 @@ + import net.minecraft.world.level.block.state.properties.BlockStateDirection; + import net.minecraft.world.level.material.Material; +// CraftBukkit start +import org.bukkit.craftbukkit.util.BlockStateListPopulator; @@ -12,7 +12,7 @@ public class BlockPumpkinCarved extends BlockFacingHorizontal implements ItemWearable { public static final BlockStateDirection a = BlockFacingHorizontal.FACING; -@@ -42,19 +47,28 @@ +@@ -64,19 +69,28 @@ EntityPlayer entityplayer; int j; @@ -44,7 +44,7 @@ iterator = world.a(EntityPlayer.class, entitysnowman.getBoundingBox().g(5.0D)).iterator(); while (iterator.hasNext()) { -@@ -74,8 +88,8 @@ +@@ -96,8 +110,8 @@ for (int k = 0; k < this.getIronGolemShape().b(); ++k) { ShapeDetectorBlock shapedetectorblock2 = shapedetector_shapedetectorcollection.a(i, k, 0); @@ -55,7 +55,7 @@ } } -@@ -84,7 +98,15 @@ +@@ -106,7 +120,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/net/minecraft/world/level/block/BlockRedstoneComparator.patch b/nms-patches/net/minecraft/world/level/block/BlockRedstoneComparator.patch index f4baf5e46..72bd60127 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockRedstoneComparator.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockRedstoneComparator.patch @@ -1,15 +1,15 @@ ---- a/net/minecraft/server/BlockRedstoneComparator.java -+++ b/net/minecraft/server/BlockRedstoneComparator.java -@@ -4,6 +4,8 @@ - import java.util.Random; - import javax.annotation.Nullable; +--- a/net/minecraft/world/level/block/BlockRedstoneComparator.java ++++ b/net/minecraft/world/level/block/BlockRedstoneComparator.java +@@ -28,6 +28,8 @@ + import net.minecraft.world.phys.AxisAlignedBB; + import net.minecraft.world.phys.MovingObjectPositionBlock; +import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit + public class BlockRedstoneComparator extends BlockDiodeAbstract implements ITileEntity { public static final BlockStateEnum MODE = BlockProperties.aG; -@@ -67,7 +69,8 @@ +@@ -91,7 +93,8 @@ @Nullable private EntityItemFrame a(World world, EnumDirection enumdirection, BlockPosition blockposition) { @@ -19,7 +19,7 @@ return entityitemframe != null && entityitemframe.getDirection() == enumdirection; }); -@@ -122,8 +125,18 @@ +@@ -146,8 +149,18 @@ boolean flag1 = (Boolean) iblockdata.get(BlockRedstoneComparator.c); if (flag1 && !flag) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockRedstoneLamp.patch b/nms-patches/net/minecraft/world/level/block/BlockRedstoneLamp.patch index c11918254..778838990 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockRedstoneLamp.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockRedstoneLamp.patch @@ -1,15 +1,15 @@ ---- a/net/minecraft/server/BlockRedstoneLamp.java -+++ b/net/minecraft/server/BlockRedstoneLamp.java -@@ -3,6 +3,8 @@ - import java.util.Random; - import javax.annotation.Nullable; +--- a/net/minecraft/world/level/block/BlockRedstoneLamp.java ++++ b/net/minecraft/world/level/block/BlockRedstoneLamp.java +@@ -12,6 +12,8 @@ + import net.minecraft.world.level.block.state.properties.BlockStateBoolean; + import net.minecraft.world.level.block.state.properties.IBlockState; +import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit + public class BlockRedstoneLamp extends Block { public static final BlockStateBoolean a = BlockRedstoneTorch.LIT; -@@ -27,6 +29,11 @@ +@@ -36,6 +38,11 @@ if (flag1) { world.getBlockTickList().a(blockposition, this, 4); } else { @@ -21,7 +21,7 @@ world.setTypeAndData(blockposition, (IBlockData) iblockdata.a((IBlockState) BlockRedstoneLamp.a), 2); } } -@@ -37,6 +44,11 @@ +@@ -46,6 +53,11 @@ @Override public void tickAlways(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) { if ((Boolean) iblockdata.get(BlockRedstoneLamp.a) && !worldserver.isBlockIndirectlyPowered(blockposition)) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockRedstoneOre.patch b/nms-patches/net/minecraft/world/level/block/BlockRedstoneOre.patch index e7740d32d..628ebf4c1 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockRedstoneOre.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockRedstoneOre.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/BlockRedstoneOre.java -+++ b/net/minecraft/server/BlockRedstoneOre.java -@@ -2,6 +2,11 @@ - - import java.util.Random; +--- a/net/minecraft/world/level/block/BlockRedstoneOre.java ++++ b/net/minecraft/world/level/block/BlockRedstoneOre.java +@@ -21,6 +21,11 @@ + import net.minecraft.world.level.block.state.properties.BlockStateBoolean; + import net.minecraft.world.phys.MovingObjectPositionBlock; +// CraftBukkit start +import org.bukkit.craftbukkit.event.CraftEventFactory; @@ -12,7 +12,7 @@ public class BlockRedstoneOre extends Block { public static final BlockStateBoolean a = BlockRedstoneTorch.LIT; -@@ -13,14 +18,30 @@ +@@ -32,14 +37,30 @@ @Override public void attack(IBlockData iblockdata, World world, BlockPosition blockposition, EntityHuman entityhuman) { @@ -46,7 +46,7 @@ } @Override -@@ -28,7 +49,7 @@ +@@ -47,7 +68,7 @@ if (world.isClientSide) { playEffect(world, blockposition); } else { @@ -55,7 +55,7 @@ } ItemStack itemstack = entityhuman.b(enumhand); -@@ -36,9 +57,14 @@ +@@ -55,9 +76,14 @@ return itemstack.getItem() instanceof ItemBlock && (new BlockActionContext(entityhuman, enumhand, itemstack, movingobjectpositionblock)).b() ? EnumInteractionResult.PASS : EnumInteractionResult.SUCCESS; } @@ -71,7 +71,7 @@ world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockRedstoneOre.a, true), 3); } -@@ -52,6 +78,11 @@ +@@ -71,6 +97,11 @@ @Override public void tick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) { if ((Boolean) iblockdata.get(BlockRedstoneOre.a)) { @@ -83,7 +83,7 @@ worldserver.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockRedstoneOre.a, false), 3); } -@@ -60,12 +91,25 @@ +@@ -79,12 +110,25 @@ @Override public void dropNaturally(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, ItemStack itemstack) { super.dropNaturally(iblockdata, worldserver, blockposition, itemstack); diff --git a/nms-patches/net/minecraft/world/level/block/BlockRedstoneTorch.patch b/nms-patches/net/minecraft/world/level/block/BlockRedstoneTorch.patch index f594c0f0e..94cf28cf0 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockRedstoneTorch.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockRedstoneTorch.patch @@ -1,15 +1,15 @@ ---- a/net/minecraft/server/BlockRedstoneTorch.java -+++ b/net/minecraft/server/BlockRedstoneTorch.java -@@ -6,6 +6,8 @@ - import java.util.Random; - import java.util.WeakHashMap; +--- a/net/minecraft/world/level/block/BlockRedstoneTorch.java ++++ b/net/minecraft/world/level/block/BlockRedstoneTorch.java +@@ -17,6 +17,8 @@ + import net.minecraft.world.level.block.state.properties.BlockProperties; + import net.minecraft.world.level.block.state.properties.BlockStateBoolean; +import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit + public class BlockRedstoneTorch extends BlockTorch { public static final BlockStateBoolean LIT = BlockProperties.r; -@@ -62,8 +64,24 @@ +@@ -73,8 +75,24 @@ list.remove(0); } @@ -34,7 +34,7 @@ worldserver.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockRedstoneTorch.LIT, false), 3); if (a(worldserver, blockposition, true)) { worldserver.triggerEffect(1502, blockposition, 0); -@@ -71,6 +89,15 @@ +@@ -82,6 +100,15 @@ } } } else if (!flag && !a(worldserver, blockposition, false)) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockRedstoneWire.patch b/nms-patches/net/minecraft/world/level/block/BlockRedstoneWire.patch index 5f909ebfc..5a8753f80 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockRedstoneWire.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockRedstoneWire.patch @@ -1,15 +1,15 @@ ---- a/net/minecraft/server/BlockRedstoneWire.java -+++ b/net/minecraft/server/BlockRedstoneWire.java -@@ -9,6 +9,8 @@ - import java.util.Set; - import javax.annotation.Nullable; +--- a/net/minecraft/world/level/block/BlockRedstoneWire.java ++++ b/net/minecraft/world/level/block/BlockRedstoneWire.java +@@ -34,6 +34,8 @@ + import net.minecraft.world.phys.shapes.VoxelShapeCollision; + import net.minecraft.world.phys.shapes.VoxelShapes; +import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit + public class BlockRedstoneWire extends Block { public static final BlockStateEnum NORTH = BlockProperties.X; -@@ -213,7 +215,16 @@ +@@ -238,7 +240,16 @@ private void a(World world, BlockPosition blockposition, IBlockData iblockdata) { int i = this.a(world, blockposition); diff --git a/nms-patches/net/minecraft/world/level/block/BlockReed.patch b/nms-patches/net/minecraft/world/level/block/BlockReed.patch index 16d32eed3..a0b56761d 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockReed.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockReed.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BlockReed.java -+++ b/net/minecraft/server/BlockReed.java -@@ -39,7 +39,7 @@ +--- a/net/minecraft/world/level/block/BlockReed.java ++++ b/net/minecraft/world/level/block/BlockReed.java +@@ -55,7 +55,7 @@ int j = (Integer) iblockdata.get(BlockReed.AGE); if (j == 15) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockSapling.patch b/nms-patches/net/minecraft/world/level/block/BlockSapling.patch index 62dd59f54..65afc5237 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockSapling.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockSapling.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/BlockSapling.java -+++ b/net/minecraft/server/BlockSapling.java -@@ -2,11 +2,19 @@ - - import java.util.Random; +--- a/net/minecraft/world/level/block/BlockSapling.java ++++ b/net/minecraft/world/level/block/BlockSapling.java +@@ -15,11 +15,19 @@ + import net.minecraft.world.phys.shapes.VoxelShape; + import net.minecraft.world.phys.shapes.VoxelShapeCollision; +// CraftBukkit start +import org.bukkit.Location; @@ -20,7 +20,7 @@ protected BlockSapling(WorldGenTreeProvider worldgentreeprovider, BlockBase.Info blockbase_info) { super(blockbase_info); -@@ -22,7 +30,30 @@ +@@ -35,7 +43,30 @@ @Override public void tick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) { if (worldserver.getLightLevel(blockposition.up()) >= 9 && random.nextInt(7) == 0) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockScaffolding.patch b/nms-patches/net/minecraft/world/level/block/BlockScaffolding.patch index 3bc8a16b5..e3019e7a1 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockScaffolding.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockScaffolding.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BlockScaffolding.java -+++ b/net/minecraft/server/BlockScaffolding.java -@@ -73,7 +73,7 @@ +--- a/net/minecraft/world/level/block/BlockScaffolding.java ++++ b/net/minecraft/world/level/block/BlockScaffolding.java +@@ -94,7 +94,7 @@ int i = a((IBlockAccess) worldserver, blockposition); IBlockData iblockdata1 = (IBlockData) ((IBlockData) iblockdata.set(BlockScaffolding.a, i)).set(BlockScaffolding.c, this.a(worldserver, blockposition, i)); diff --git a/nms-patches/net/minecraft/world/level/block/BlockSnow.patch b/nms-patches/net/minecraft/world/level/block/BlockSnow.patch index f94055297..7fb414a67 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockSnow.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockSnow.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BlockSnow.java -+++ b/net/minecraft/server/BlockSnow.java -@@ -67,6 +67,11 @@ +--- a/net/minecraft/world/level/block/BlockSnow.java ++++ b/net/minecraft/world/level/block/BlockSnow.java +@@ -85,6 +85,11 @@ @Override public void tick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) { if (worldserver.getBrightness(EnumSkyBlock.BLOCK, blockposition) > 11) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockSoil.patch b/nms-patches/net/minecraft/world/level/block/BlockSoil.patch index 5dcd4e558..893fcc629 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockSoil.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockSoil.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/BlockSoil.java -+++ b/net/minecraft/server/BlockSoil.java -@@ -3,6 +3,11 @@ - import java.util.Iterator; - import java.util.Random; +--- a/net/minecraft/world/level/block/BlockSoil.java ++++ b/net/minecraft/world/level/block/BlockSoil.java +@@ -26,6 +26,11 @@ + import net.minecraft.world.phys.shapes.VoxelShape; + import net.minecraft.world.phys.shapes.VoxelShapeCollision; +// CraftBukkit start +import org.bukkit.event.entity.EntityInteractEvent; @@ -12,7 +12,7 @@ public class BlockSoil extends Block { public static final BlockStateInteger MOISTURE = BlockProperties.aw; -@@ -58,26 +63,49 @@ +@@ -81,26 +86,49 @@ if (!a((IWorldReader) worldserver, blockposition) && !worldserver.isRainingAt(blockposition.up())) { if (i > 0) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockSponge.patch b/nms-patches/net/minecraft/world/level/block/BlockSponge.patch index b39c53b2a..9ae2263c5 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockSponge.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockSponge.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/BlockSponge.java -+++ b/net/minecraft/server/BlockSponge.java -@@ -3,6 +3,13 @@ - import com.google.common.collect.Lists; - import java.util.Queue; +--- a/net/minecraft/world/level/block/BlockSponge.java ++++ b/net/minecraft/world/level/block/BlockSponge.java +@@ -16,6 +16,13 @@ + import net.minecraft.world.level.material.FluidTypes; + import net.minecraft.world.level.material.Material; +// CraftBukkit start +import java.util.List; @@ -14,7 +14,7 @@ public class BlockSponge extends Block { protected BlockSponge(BlockBase.Info blockbase_info) { -@@ -35,6 +42,7 @@ +@@ -48,6 +55,7 @@ queue.add(new Tuple<>(blockposition, 0)); int i = 0; @@ -22,7 +22,7 @@ while (!queue.isEmpty()) { Tuple tuple = (Tuple) queue.poll(); -@@ -46,27 +54,31 @@ +@@ -59,27 +67,31 @@ for (int l = 0; l < k; ++l) { EnumDirection enumdirection = aenumdirection[l]; BlockPosition blockposition2 = blockposition1.shift(enumdirection); @@ -61,7 +61,7 @@ ++i; if (j < 6) { queue.add(new Tuple<>(blockposition2, j + 1)); -@@ -79,6 +91,39 @@ +@@ -92,6 +104,39 @@ break; } } diff --git a/nms-patches/net/minecraft/world/level/block/BlockStem.patch b/nms-patches/net/minecraft/world/level/block/BlockStem.patch index 6703296f4..091761f81 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockStem.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockStem.patch @@ -1,15 +1,15 @@ ---- a/net/minecraft/server/BlockStem.java -+++ b/net/minecraft/server/BlockStem.java -@@ -2,6 +2,8 @@ - - import java.util.Random; +--- a/net/minecraft/world/level/block/BlockStem.java ++++ b/net/minecraft/world/level/block/BlockStem.java +@@ -15,6 +15,8 @@ + import net.minecraft.world.phys.shapes.VoxelShape; + import net.minecraft.world.phys.shapes.VoxelShapeCollision; +import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit + public class BlockStem extends BlockPlant implements IBlockFragilePlantElement { public static final BlockStateInteger AGE = BlockProperties.ai; -@@ -34,14 +36,18 @@ +@@ -47,14 +49,18 @@ if (i < 7) { iblockdata = (IBlockData) iblockdata.set(BlockStem.AGE, i + 1); @@ -30,7 +30,7 @@ worldserver.setTypeUpdate(blockposition, (IBlockData) this.blockFruit.d().getBlockData().set(BlockFacingHorizontal.FACING, enumdirection)); } } -@@ -65,7 +71,7 @@ +@@ -78,7 +84,7 @@ int i = Math.min(7, (Integer) iblockdata.get(BlockStem.AGE) + MathHelper.nextInt(worldserver.random, 2, 5)); IBlockData iblockdata1 = (IBlockData) iblockdata.set(BlockStem.AGE, i); diff --git a/nms-patches/net/minecraft/world/level/block/BlockSweetBerryBush.patch b/nms-patches/net/minecraft/world/level/block/BlockSweetBerryBush.patch index b4a28febd..d974f401b 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockSweetBerryBush.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockSweetBerryBush.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/BlockSweetBerryBush.java -+++ b/net/minecraft/server/BlockSweetBerryBush.java -@@ -2,6 +2,14 @@ - - import java.util.Random; +--- a/net/minecraft/world/level/block/BlockSweetBerryBush.java ++++ b/net/minecraft/world/level/block/BlockSweetBerryBush.java +@@ -26,6 +26,14 @@ + import net.minecraft.world.phys.shapes.VoxelShape; + import net.minecraft.world.phys.shapes.VoxelShapeCollision; +// CraftBukkit start +import java.util.Collections; @@ -15,7 +15,7 @@ public class BlockSweetBerryBush extends BlockPlant implements IBlockFragilePlantElement { public static final BlockStateInteger a = BlockProperties.ag; -@@ -28,7 +36,7 @@ +@@ -52,7 +60,7 @@ int i = (Integer) iblockdata.get(BlockSweetBerryBush.a); if (i < 3 && random.nextInt(5) == 0 && worldserver.getLightLevel(blockposition.up(), 0) >= 9) { @@ -24,7 +24,7 @@ } } -@@ -42,7 +50,9 @@ +@@ -66,7 +74,9 @@ double d1 = Math.abs(entity.locZ() - entity.F); if (d0 >= 0.003000000026077032D || d1 >= 0.003000000026077032D) { @@ -34,7 +34,7 @@ } } -@@ -59,7 +69,15 @@ +@@ -83,7 +93,15 @@ } else if (i > 1) { int j = 1 + world.random.nextInt(2); diff --git a/nms-patches/net/minecraft/world/level/block/BlockTNT.patch b/nms-patches/net/minecraft/world/level/block/BlockTNT.patch index def64b901..cbbf826de 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockTNT.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockTNT.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BlockTNT.java -+++ b/net/minecraft/server/BlockTNT.java -@@ -94,6 +94,11 @@ +--- a/net/minecraft/world/level/block/BlockTNT.java ++++ b/net/minecraft/world/level/block/BlockTNT.java +@@ -115,6 +115,11 @@ if (iprojectile.isBurning()) { BlockPosition blockposition = movingobjectpositionblock.getBlockPosition(); diff --git a/nms-patches/net/minecraft/world/level/block/BlockTallPlant.patch b/nms-patches/net/minecraft/world/level/block/BlockTallPlant.patch index dea595b55..2e45f966a 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockTallPlant.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockTallPlant.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BlockTallPlant.java -+++ b/net/minecraft/server/BlockTallPlant.java -@@ -66,6 +66,11 @@ +--- a/net/minecraft/world/level/block/BlockTallPlant.java ++++ b/net/minecraft/world/level/block/BlockTallPlant.java +@@ -82,6 +82,11 @@ } protected static void b(World world, BlockPosition blockposition, IBlockData iblockdata, EntityHuman entityhuman) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockTrapdoor.patch b/nms-patches/net/minecraft/world/level/block/BlockTrapdoor.patch index 4a274e0e4..d8014b649 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockTrapdoor.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockTrapdoor.patch @@ -1,15 +1,15 @@ ---- a/net/minecraft/server/BlockTrapdoor.java -+++ b/net/minecraft/server/BlockTrapdoor.java -@@ -2,6 +2,8 @@ - - import javax.annotation.Nullable; +--- a/net/minecraft/world/level/block/BlockTrapdoor.java ++++ b/net/minecraft/world/level/block/BlockTrapdoor.java +@@ -27,6 +27,8 @@ + import net.minecraft.world.phys.shapes.VoxelShape; + import net.minecraft.world.phys.shapes.VoxelShapeCollision; +import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit + public class BlockTrapdoor extends BlockFacingHorizontal implements IBlockWaterlogged { public static final BlockStateBoolean OPEN = BlockProperties.u; -@@ -88,6 +90,19 @@ +@@ -113,6 +115,19 @@ boolean flag1 = world.isBlockIndirectlyPowered(blockposition); if (flag1 != (Boolean) iblockdata.get(BlockTrapdoor.c)) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockTripwire.patch b/nms-patches/net/minecraft/world/level/block/BlockTripwire.patch index 35d5936d4..53ff86300 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockTripwire.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockTripwire.patch @@ -1,15 +1,15 @@ ---- a/net/minecraft/server/BlockTripwire.java -+++ b/net/minecraft/server/BlockTripwire.java -@@ -5,6 +5,8 @@ - import java.util.Map; - import java.util.Random; +--- a/net/minecraft/world/level/block/BlockTripwire.java ++++ b/net/minecraft/world/level/block/BlockTripwire.java +@@ -23,6 +23,8 @@ + import net.minecraft.world.phys.shapes.VoxelShape; + import net.minecraft.world.phys.shapes.VoxelShapeCollision; +import org.bukkit.event.entity.EntityInteractEvent; // CraftBukkit + public class BlockTripwire extends Block { public static final BlockStateBoolean POWERED = BlockProperties.w; -@@ -132,6 +134,40 @@ +@@ -150,6 +152,40 @@ } } diff --git a/nms-patches/net/minecraft/world/level/block/BlockTripwireHook.patch b/nms-patches/net/minecraft/world/level/block/BlockTripwireHook.patch index 2495fbbb9..255d64077 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockTripwireHook.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockTripwireHook.patch @@ -1,15 +1,15 @@ ---- a/net/minecraft/server/BlockTripwireHook.java -+++ b/net/minecraft/server/BlockTripwireHook.java -@@ -4,6 +4,8 @@ - import java.util.Random; - import javax.annotation.Nullable; +--- a/net/minecraft/world/level/block/BlockTripwireHook.java ++++ b/net/minecraft/world/level/block/BlockTripwireHook.java +@@ -25,6 +25,8 @@ + import net.minecraft.world.phys.shapes.VoxelShape; + import net.minecraft.world.phys.shapes.VoxelShapeCollision; +import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit + public class BlockTripwireHook extends Block { public static final BlockStateDirection FACING = BlockFacingHorizontal.FACING; -@@ -134,6 +136,17 @@ +@@ -155,6 +157,17 @@ this.a(world, blockposition1, flag4, flag5, flag2, flag3); } diff --git a/nms-patches/net/minecraft/world/level/block/BlockTurtleEgg.patch b/nms-patches/net/minecraft/world/level/block/BlockTurtleEgg.patch index 5c7a4610b..1413c1598 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockTurtleEgg.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockTurtleEgg.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/BlockTurtleEgg.java -+++ b/net/minecraft/server/BlockTurtleEgg.java -@@ -3,6 +3,12 @@ - import java.util.Random; - import javax.annotation.Nullable; +--- a/net/minecraft/world/level/block/BlockTurtleEgg.java ++++ b/net/minecraft/world/level/block/BlockTurtleEgg.java +@@ -29,6 +29,12 @@ + import net.minecraft.world.phys.shapes.VoxelShape; + import net.minecraft.world.phys.shapes.VoxelShapeCollision; +// CraftBukkit start +import org.bukkit.event.entity.EntityInteractEvent; @@ -13,7 +13,7 @@ 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 @@ +@@ -62,6 +68,19 @@ IBlockData iblockdata = world.getType(blockposition); if (iblockdata.a(Blocks.TURTLE_EGG)) { @@ -33,7 +33,7 @@ this.a(world, blockposition, iblockdata); } } -@@ -62,9 +81,19 @@ +@@ -88,9 +107,19 @@ int i = (Integer) iblockdata.get(BlockTurtleEgg.a); if (i < 2) { @@ -54,7 +54,7 @@ worldserver.playSound((EntityHuman) null, blockposition, SoundEffects.ENTITY_TURTLE_EGG_HATCH, SoundCategory.BLOCKS, 0.7F, 0.9F + random.nextFloat() * 0.2F); worldserver.a(blockposition, false); -@@ -75,7 +104,7 @@ +@@ -101,7 +130,7 @@ entityturtle.setAgeRaw(-24000); entityturtle.setHomePos(blockposition); entityturtle.setPositionRotation((double) blockposition.getX() + 0.3D + (double) j * 0.2D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.3D, 0.0F, 0.0F); diff --git a/nms-patches/net/minecraft/world/level/block/BlockVine.patch b/nms-patches/net/minecraft/world/level/block/BlockVine.patch index 4b8c62e9d..61690537d 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockVine.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockVine.patch @@ -1,15 +1,15 @@ ---- a/net/minecraft/server/BlockVine.java -+++ b/net/minecraft/server/BlockVine.java -@@ -8,6 +8,8 @@ - import java.util.stream.Collectors; - import javax.annotation.Nullable; +--- a/net/minecraft/world/level/block/BlockVine.java ++++ b/net/minecraft/world/level/block/BlockVine.java +@@ -23,6 +23,8 @@ + import net.minecraft.world.phys.shapes.VoxelShapeCollision; + import net.minecraft.world.phys.shapes.VoxelShapes; +import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit + public class BlockVine extends Block { public static final BlockStateBoolean UP = BlockSprawling.e; -@@ -175,20 +177,24 @@ +@@ -190,20 +192,24 @@ BlockPosition blockposition3 = blockposition2.shift(enumdirection1); BlockPosition blockposition4 = blockposition2.shift(enumdirection2); @@ -39,7 +39,7 @@ } } else if (a((IBlockAccess) worldserver, blockposition2, enumdirection)) { worldserver.setTypeAndData(blockposition, (IBlockData) iblockdata.set(getDirection(enumdirection), true), 2); -@@ -218,7 +224,7 @@ +@@ -233,7 +239,7 @@ } if (this.canSpread(iblockdata2)) { @@ -48,7 +48,7 @@ } return; -@@ -233,7 +239,7 @@ +@@ -248,7 +254,7 @@ IBlockData iblockdata4 = this.a(iblockdata, iblockdata3, random); if (iblockdata3 != iblockdata4 && this.canSpread(iblockdata4)) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockWaterLily.patch b/nms-patches/net/minecraft/world/level/block/BlockWaterLily.patch index 0119b98d7..ab1490aa6 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockWaterLily.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockWaterLily.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BlockWaterLily.java -+++ b/net/minecraft/server/BlockWaterLily.java -@@ -11,7 +11,7 @@ +--- a/net/minecraft/world/level/block/BlockWaterLily.java ++++ b/net/minecraft/world/level/block/BlockWaterLily.java +@@ -25,7 +25,7 @@ @Override public void a(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) { super.a(iblockdata, world, blockposition, entity); diff --git a/nms-patches/net/minecraft/world/level/block/BlockWitherRose.patch b/nms-patches/net/minecraft/world/level/block/BlockWitherRose.patch index ee9660f47..f3ac4af49 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockWitherRose.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockWitherRose.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BlockWitherRose.java -+++ b/net/minecraft/server/BlockWitherRose.java -@@ -18,7 +18,7 @@ +--- a/net/minecraft/world/level/block/BlockWitherRose.java ++++ b/net/minecraft/world/level/block/BlockWitherRose.java +@@ -31,7 +31,7 @@ EntityLiving entityliving = (EntityLiving) entity; if (!entityliving.isInvulnerable(DamageSource.WITHER)) { diff --git a/nms-patches/net/minecraft/world/level/block/BlockWitherSkull.patch b/nms-patches/net/minecraft/world/level/block/BlockWitherSkull.patch index 1bdd7edaf..19c83f006 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockWitherSkull.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockWitherSkull.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/BlockWitherSkull.java -+++ b/net/minecraft/server/BlockWitherSkull.java -@@ -3,6 +3,11 @@ - import java.util.Iterator; - import javax.annotation.Nullable; +--- a/net/minecraft/world/level/block/BlockWitherSkull.java ++++ b/net/minecraft/world/level/block/BlockWitherSkull.java +@@ -27,6 +27,11 @@ + import net.minecraft.world.level.block.state.predicate.MaterialPredicate; + import net.minecraft.world.level.material.Material; +// CraftBukkit start +import org.bukkit.craftbukkit.util.BlockStateListPopulator; @@ -12,7 +12,7 @@ public class BlockWitherSkull extends BlockSkull { @Nullable -@@ -26,6 +31,7 @@ +@@ -50,6 +55,7 @@ } public static void a(World world, BlockPosition blockposition, TileEntitySkull tileentityskull) { @@ -20,7 +20,7 @@ if (!world.isClientSide) { IBlockData iblockdata = tileentityskull.getBlock(); boolean flag = iblockdata.a(Blocks.WITHER_SKELETON_SKULL) || iblockdata.a(Blocks.WITHER_SKELETON_WALL_SKULL); -@@ -35,12 +41,14 @@ +@@ -59,12 +65,14 @@ ShapeDetector.ShapeDetectorCollection shapedetector_shapedetectorcollection = shapedetector.a(world, blockposition); if (shapedetector_shapedetectorcollection != null) { @@ -37,7 +37,7 @@ } } -@@ -50,6 +58,15 @@ +@@ -74,6 +82,15 @@ entitywither.setPositionRotation((double) blockposition1.getX() + 0.5D, (double) blockposition1.getY() + 0.55D, (double) blockposition1.getZ() + 0.5D, shapedetector_shapedetectorcollection.getFacing().n() == EnumDirection.EnumAxis.X ? 0.0F : 90.0F, 0.0F); entitywither.aA = shapedetector_shapedetectorcollection.getFacing().n() == EnumDirection.EnumAxis.X ? 0.0F : 90.0F; entitywither.beginSpawnSequence(); @@ -53,7 +53,7 @@ Iterator iterator = world.a(EntityPlayer.class, entitywither.getBoundingBox().g(50.0D)).iterator(); while (iterator.hasNext()) { -@@ -58,7 +75,7 @@ +@@ -82,7 +99,7 @@ CriterionTriggers.n.a(entityplayer, (Entity) entitywither); } diff --git a/nms-patches/net/minecraft/world/level/block/entity/TileEntity.patch b/nms-patches/net/minecraft/world/level/block/entity/TileEntity.patch index 02fa490c3..ad16478e8 100644 --- a/nms-patches/net/minecraft/world/level/block/entity/TileEntity.patch +++ b/nms-patches/net/minecraft/world/level/block/entity/TileEntity.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/TileEntity.java -+++ b/net/minecraft/server/TileEntity.java -@@ -5,8 +5,18 @@ +--- a/net/minecraft/world/level/block/entity/TileEntity.java ++++ b/net/minecraft/world/level/block/entity/TileEntity.java +@@ -15,8 +15,18 @@ import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.util.Supplier; @@ -19,14 +19,14 @@ private static final Logger LOGGER = LogManager.getLogger(); private final TileEntityTypes tileType; @Nullable -@@ -38,6 +48,14 @@ +@@ -48,6 +58,14 @@ public void load(IBlockData iblockdata, NBTTagCompound nbttagcompound) { this.position = new BlockPosition(nbttagcompound.getInt("x"), nbttagcompound.getInt("y"), nbttagcompound.getInt("z")); + // CraftBukkit start - read container + this.persistentDataContainer = new CraftPersistentDataContainer(DATA_TYPE_REGISTRY); + -+ NBTBase persistentDataTag = nbttagcompound.get("PublicBukkitValues"); ++ net.minecraft.nbt.NBTBase persistentDataTag = nbttagcompound.get("PublicBukkitValues"); + if (persistentDataTag instanceof NBTTagCompound) { + this.persistentDataContainer.putAll((NBTTagCompound) persistentDataTag); + } @@ -34,7 +34,7 @@ } public NBTTagCompound save(NBTTagCompound nbttagcompound) { -@@ -54,6 +72,11 @@ +@@ -64,6 +82,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 +192,13 @@ +@@ -179,4 +202,13 @@ }, this::getPosition}); } } diff --git a/nms-patches/net/minecraft/world/level/block/entity/TileEntityBanner.patch b/nms-patches/net/minecraft/world/level/block/entity/TileEntityBanner.patch index d0c233678..c868fd0a5 100644 --- a/nms-patches/net/minecraft/world/level/block/entity/TileEntityBanner.patch +++ b/nms-patches/net/minecraft/world/level/block/entity/TileEntityBanner.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/TileEntityBanner.java -+++ b/net/minecraft/server/TileEntityBanner.java -@@ -70,6 +70,11 @@ +--- a/net/minecraft/world/level/block/entity/TileEntityBanner.java ++++ b/net/minecraft/world/level/block/entity/TileEntityBanner.java +@@ -80,6 +80,11 @@ } this.patterns = nbttagcompound.getList("Patterns", 10); diff --git a/nms-patches/net/minecraft/world/level/block/entity/TileEntityBarrel.patch b/nms-patches/net/minecraft/world/level/block/entity/TileEntityBarrel.patch index 33e51f722..68f3dbc44 100644 --- a/nms-patches/net/minecraft/world/level/block/entity/TileEntityBarrel.patch +++ b/nms-patches/net/minecraft/world/level/block/entity/TileEntityBarrel.patch @@ -1,7 +1,8 @@ ---- a/net/minecraft/server/TileEntityBarrel.java -+++ b/net/minecraft/server/TileEntityBarrel.java -@@ -1,7 +1,49 @@ - package net.minecraft.server; +--- a/net/minecraft/world/level/block/entity/TileEntityBarrel.java ++++ b/net/minecraft/world/level/block/entity/TileEntityBarrel.java +@@ -19,8 +19,50 @@ + import net.minecraft.world.level.block.Blocks; + import net.minecraft.world.level.block.state.IBlockData; +// CraftBukkit start +import java.util.ArrayList; @@ -50,7 +51,7 @@ private NonNullList items; private int b; -@@ -100,7 +142,7 @@ +@@ -119,7 +161,7 @@ return; } diff --git a/nms-patches/net/minecraft/world/level/block/entity/TileEntityBeacon.patch b/nms-patches/net/minecraft/world/level/block/entity/TileEntityBeacon.patch index 7e21b75f4..1a7f81d98 100644 --- a/nms-patches/net/minecraft/world/level/block/entity/TileEntityBeacon.patch +++ b/nms-patches/net/minecraft/world/level/block/entity/TileEntityBeacon.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/TileEntityBeacon.java -+++ b/net/minecraft/server/TileEntityBeacon.java -@@ -8,6 +8,11 @@ - import java.util.stream.Collectors; - import javax.annotation.Nullable; +--- a/net/minecraft/world/level/block/entity/TileEntityBeacon.java ++++ b/net/minecraft/world/level/block/entity/TileEntityBeacon.java +@@ -38,6 +38,11 @@ + import net.minecraft.world.level.levelgen.HeightMap; + import net.minecraft.world.phys.AxisAlignedBB; +// CraftBukkit start +import org.bukkit.craftbukkit.potion.CraftPotionUtil; @@ -12,7 +12,7 @@ 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 +29,15 @@ +@@ -54,6 +59,15 @@ public IChatBaseComponent customName; public ChestLock chestLock; private final IContainerProperties containerProperties; @@ -28,7 +28,7 @@ public TileEntityBeacon() { super(TileEntityTypes.BEACON); -@@ -192,39 +206,78 @@ +@@ -222,39 +236,78 @@ super.al_(); } @@ -117,7 +117,7 @@ public void a(SoundEffect soundeffect) { this.world.playSound((EntityHuman) null, this.position, soundeffect, SoundCategory.BLOCKS, 1.0F, 1.0F); } -@@ -254,8 +307,11 @@ +@@ -284,8 +337,11 @@ @Override public void load(IBlockData iblockdata, NBTTagCompound nbttagcompound) { super.load(iblockdata, nbttagcompound); diff --git a/nms-patches/net/minecraft/world/level/block/entity/TileEntityBeehive.patch b/nms-patches/net/minecraft/world/level/block/entity/TileEntityBeehive.patch index be9f67377..f54259dec 100644 --- a/nms-patches/net/minecraft/world/level/block/entity/TileEntityBeehive.patch +++ b/nms-patches/net/minecraft/world/level/block/entity/TileEntityBeehive.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/TileEntityBeehive.java -+++ b/net/minecraft/server/TileEntityBeehive.java -@@ -10,6 +10,7 @@ +--- a/net/minecraft/world/level/block/entity/TileEntityBeehive.java ++++ b/net/minecraft/world/level/block/entity/TileEntityBeehive.java +@@ -29,6 +29,7 @@ private final List bees = Lists.newArrayList(); @Nullable public BlockPosition flowerPos = null; @@ -8,7 +8,7 @@ public TileEntityBeehive() { super(TileEntityTypes.BEEHIVE); -@@ -49,7 +50,7 @@ +@@ -68,7 +69,7 @@ } public boolean isFull() { @@ -17,7 +17,7 @@ } public void a(@Nullable EntityHuman entityhuman, IBlockData iblockdata, TileEntityBeehive.ReleaseStatus tileentitybeehive_releasestatus) { -@@ -66,7 +67,7 @@ +@@ -85,7 +86,7 @@ if (entityhuman.getPositionVector().distanceSquared(entity.getPositionVector()) <= 16.0D) { if (!this.isSedated()) { @@ -26,7 +26,7 @@ } else { entitybee.setCannotEnterHiveTicks(400); } -@@ -78,10 +79,16 @@ +@@ -97,10 +98,16 @@ } private List releaseBees(IBlockData iblockdata, TileEntityBeehive.ReleaseStatus tileentitybeehive_releasestatus) { @@ -44,7 +44,7 @@ }); return list; } -@@ -107,7 +114,19 @@ +@@ -126,7 +133,19 @@ } public void a(Entity entity, boolean flag, int i) { @@ -65,7 +65,7 @@ entity.stopRiding(); entity.ejectPassengers(); NBTTagCompound nbttagcompound = new NBTTagCompound(); -@@ -133,7 +152,13 @@ +@@ -152,7 +171,13 @@ } private boolean releaseBee(IBlockData iblockdata, TileEntityBeehive.HiveBee tileentitybeehive_hivebee, @Nullable List list, TileEntityBeehive.ReleaseStatus tileentitybeehive_releasestatus) { @@ -80,7 +80,7 @@ return false; } else { BlockPosition blockposition = this.getPosition(); -@@ -157,6 +182,18 @@ +@@ -176,6 +201,18 @@ if (!entity.getEntityType().a((Tag) TagsEntity.BEEHIVE_INHABITORS)) { return false; } else { @@ -99,7 +99,7 @@ if (entity instanceof EntityBee) { EntityBee entitybee = (EntityBee) entity; -@@ -186,6 +223,7 @@ +@@ -205,6 +242,7 @@ list.add(entitybee); } @@ -107,7 +107,7 @@ float f = entity.getWidth(); double d0 = flag ? 0.0D : 0.55D + (double) (f / 2.0F); double d1 = (double) blockposition.getX() + 0.5D + d0 * (double) enumdirection.getAdjacentX(); -@@ -193,10 +231,11 @@ +@@ -212,10 +250,11 @@ double d3 = (double) blockposition.getZ() + 0.5D + d0 * (double) enumdirection.getAdjacentZ(); entity.setPositionRotation(d1, d2, d3, entity.yaw, entity.pitch); @@ -120,7 +120,7 @@ } } else { return false; -@@ -234,6 +273,10 @@ +@@ -253,6 +292,10 @@ if (this.releaseBee(iblockdata, tileentitybeehive_hivebee, (List) null, tileentitybeehive_releasestatus)) { iterator.remove(); @@ -131,7 +131,7 @@ } } } -@@ -276,6 +319,11 @@ +@@ -295,6 +338,11 @@ this.flowerPos = GameProfileSerializer.b(nbttagcompound.getCompound("FlowerPos")); } @@ -143,7 +143,7 @@ } @Override -@@ -285,6 +333,7 @@ +@@ -304,6 +352,7 @@ if (this.x()) { nbttagcompound.set("FlowerPos", GameProfileSerializer.a(this.flowerPos)); } diff --git a/nms-patches/net/minecraft/world/level/block/entity/TileEntityBrewingStand.patch b/nms-patches/net/minecraft/world/level/block/entity/TileEntityBrewingStand.patch index 7a84c06ce..9538973c3 100644 --- a/nms-patches/net/minecraft/world/level/block/entity/TileEntityBrewingStand.patch +++ b/nms-patches/net/minecraft/world/level/block/entity/TileEntityBrewingStand.patch @@ -1,11 +1,12 @@ ---- a/net/minecraft/server/TileEntityBrewingStand.java -+++ b/net/minecraft/server/TileEntityBrewingStand.java -@@ -4,6 +4,16 @@ - import java.util.Iterator; - import javax.annotation.Nullable; +--- a/net/minecraft/world/level/block/entity/TileEntityBrewingStand.java ++++ b/net/minecraft/world/level/block/entity/TileEntityBrewingStand.java +@@ -24,6 +24,17 @@ + import net.minecraft.world.level.block.BlockBrewingStand; + import net.minecraft.world.level.block.state.IBlockData; +// CraftBukkit start +import java.util.List; ++import net.minecraft.server.MinecraftServer; +import org.bukkit.craftbukkit.entity.CraftHumanEntity; +import org.bukkit.craftbukkit.inventory.CraftItemStack; +import org.bukkit.entity.HumanEntity; @@ -17,7 +18,7 @@ public class TileEntityBrewingStand extends TileEntityContainer implements IWorldInventory, ITickable { private static final int[] b = new int[]{3}; -@@ -15,6 +25,36 @@ +@@ -35,6 +46,36 @@ private Item k; public int fuelLevel; protected final IContainerProperties a; @@ -54,7 +55,7 @@ public TileEntityBrewingStand() { super(TileEntityTypes.BREWING_STAND); -@@ -83,8 +123,19 @@ +@@ -103,8 +144,19 @@ ItemStack itemstack = (ItemStack) this.items.get(4); if (this.fuelLevel <= 0 && itemstack.getItem() == Items.BLAZE_POWDER) { @@ -76,7 +77,7 @@ this.update(); } -@@ -92,9 +143,14 @@ +@@ -112,9 +164,14 @@ boolean flag1 = this.brewTime > 0; ItemStack itemstack1 = (ItemStack) this.items.get(3); @@ -93,7 +94,7 @@ if (flag2 && flag) { this.j(); -@@ -168,6 +224,16 @@ +@@ -188,6 +245,16 @@ private void j() { ItemStack itemstack = (ItemStack) this.items.get(3); diff --git a/nms-patches/net/minecraft/world/level/block/entity/TileEntityCampfire.patch b/nms-patches/net/minecraft/world/level/block/entity/TileEntityCampfire.patch index 3c5707e62..8f82afe03 100644 --- a/nms-patches/net/minecraft/world/level/block/entity/TileEntityCampfire.patch +++ b/nms-patches/net/minecraft/world/level/block/entity/TileEntityCampfire.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/TileEntityCampfire.java -+++ b/net/minecraft/server/TileEntityCampfire.java -@@ -4,6 +4,12 @@ - import java.util.Random; - import javax.annotation.Nullable; +--- a/net/minecraft/world/level/block/entity/TileEntityCampfire.java ++++ b/net/minecraft/world/level/block/entity/TileEntityCampfire.java +@@ -21,6 +21,12 @@ + import net.minecraft.world.level.block.BlockCampfire; + import net.minecraft.world.level.block.state.IBlockData; +// CraftBukkit start +import org.bukkit.craftbukkit.block.CraftBlock; @@ -13,7 +13,7 @@ public class TileEntityCampfire extends TileEntity implements Clearable, ITickable { private final NonNullList items; -@@ -55,6 +61,20 @@ +@@ -72,6 +78,20 @@ }).orElse(itemstack); BlockPosition blockposition = this.getPosition(); diff --git a/nms-patches/net/minecraft/world/level/block/entity/TileEntityChest.patch b/nms-patches/net/minecraft/world/level/block/entity/TileEntityChest.patch index 472afa044..ff36b5dd6 100644 --- a/nms-patches/net/minecraft/world/level/block/entity/TileEntityChest.patch +++ b/nms-patches/net/minecraft/world/level/block/entity/TileEntityChest.patch @@ -1,10 +1,11 @@ ---- a/net/minecraft/server/TileEntityChest.java -+++ b/net/minecraft/server/TileEntityChest.java -@@ -3,6 +3,11 @@ - import java.util.Iterator; - import java.util.List; +--- a/net/minecraft/world/level/block/entity/TileEntityChest.java ++++ b/net/minecraft/world/level/block/entity/TileEntityChest.java +@@ -27,6 +27,12 @@ + import net.minecraft.world.level.block.state.properties.BlockPropertyChestType; + import net.minecraft.world.phys.AxisAlignedBB; +// CraftBukkit start ++import net.minecraft.world.level.block.Blocks; +import org.bukkit.craftbukkit.entity.CraftHumanEntity; +import org.bukkit.entity.HumanEntity; +// CraftBukkit end @@ -12,7 +13,7 @@ public class TileEntityChest extends TileEntityLootable implements ITickable { private NonNullList items; -@@ -11,6 +16,37 @@ +@@ -35,6 +41,37 @@ public int viewingCount; private int j; @@ -50,7 +51,7 @@ protected TileEntityChest(TileEntityTypes tileentitytypes) { super(tileentitytypes); this.items = NonNullList.a(27, ItemStack.b); -@@ -61,6 +97,13 @@ +@@ -85,6 +122,13 @@ this.b = this.a; float f = 0.1F; @@ -64,7 +65,7 @@ if (this.viewingCount > 0 && this.a == 0.0F) { this.playOpenSound(SoundEffects.BLOCK_CHEST_OPEN); } -@@ -155,8 +198,20 @@ +@@ -179,8 +223,20 @@ if (this.viewingCount < 0) { this.viewingCount = 0; } @@ -85,7 +86,7 @@ this.onOpen(); } -@@ -165,7 +220,18 @@ +@@ -189,7 +245,18 @@ @Override public void closeContainer(EntityHuman entityhuman) { if (!entityhuman.isSpectator()) { @@ -104,7 +105,7 @@ this.onOpen(); } -@@ -175,7 +241,7 @@ +@@ -199,7 +266,7 @@ Block block = this.getBlock().getBlock(); if (block instanceof BlockChest) { @@ -113,7 +114,7 @@ this.world.applyPhysics(this.position, block); } -@@ -216,4 +282,11 @@ +@@ -240,4 +307,11 @@ protected Container createContainer(int i, PlayerInventory playerinventory) { return ContainerChest.a(i, playerinventory, this); } diff --git a/nms-patches/net/minecraft/world/level/block/entity/TileEntityCommand.patch b/nms-patches/net/minecraft/world/level/block/entity/TileEntityCommand.patch index ab30886d3..be8d2691d 100644 --- a/nms-patches/net/minecraft/world/level/block/entity/TileEntityCommand.patch +++ b/nms-patches/net/minecraft/world/level/block/entity/TileEntityCommand.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/TileEntityCommand.java -+++ b/net/minecraft/server/TileEntityCommand.java -@@ -9,6 +9,13 @@ +--- a/net/minecraft/world/level/block/entity/TileEntityCommand.java ++++ b/net/minecraft/world/level/block/entity/TileEntityCommand.java +@@ -24,6 +24,13 @@ private boolean c; private boolean g; private final CommandBlockListenerAbstract h = new CommandBlockListenerAbstract() { diff --git a/nms-patches/net/minecraft/world/level/block/entity/TileEntityConduit.patch b/nms-patches/net/minecraft/world/level/block/entity/TileEntityConduit.patch index 28ce81948..ea6e09941 100644 --- a/nms-patches/net/minecraft/world/level/block/entity/TileEntityConduit.patch +++ b/nms-patches/net/minecraft/world/level/block/entity/TileEntityConduit.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/TileEntityConduit.java -+++ b/net/minecraft/server/TileEntityConduit.java -@@ -7,6 +7,11 @@ - import java.util.UUID; - import javax.annotation.Nullable; +--- a/net/minecraft/world/level/block/entity/TileEntityConduit.java ++++ b/net/minecraft/world/level/block/entity/TileEntityConduit.java +@@ -27,6 +27,11 @@ + import net.minecraft.world.phys.AxisAlignedBB; + import net.minecraft.world.phys.Vec3D; +// CraftBukkit start +import org.bukkit.craftbukkit.block.CraftBlock; @@ -12,7 +12,7 @@ public class TileEntityConduit extends TileEntity implements ITickable { private static final Block[] b = new Block[]{Blocks.PRISMARINE, Blocks.PRISMARINE_BRICKS, Blocks.SEA_LANTERN, Blocks.DARK_PRISMARINE}; -@@ -158,7 +163,7 @@ +@@ -178,7 +183,7 @@ EntityHuman entityhuman = (EntityHuman) iterator.next(); if (this.position.a((BaseBlockPosition) entityhuman.getChunkCoordinates(), (double) j) && entityhuman.isInWaterOrRain()) { @@ -21,7 +21,7 @@ } } -@@ -175,7 +180,7 @@ +@@ -195,7 +200,7 @@ this.target = this.x(); this.k = null; } else if (this.target == null) { @@ -30,7 +30,7 @@ return entityliving1 instanceof IMonster && entityliving1.isInWaterOrRain(); }); -@@ -187,8 +192,13 @@ +@@ -207,8 +212,13 @@ } if (this.target != null) { @@ -46,7 +46,7 @@ } if (entityliving != this.target) { -@@ -221,7 +231,7 @@ +@@ -241,7 +251,7 @@ @Nullable private EntityLiving x() { diff --git a/nms-patches/net/minecraft/world/level/block/entity/TileEntityContainer.patch b/nms-patches/net/minecraft/world/level/block/entity/TileEntityContainer.patch index f9473c325..be760114c 100644 --- a/nms-patches/net/minecraft/world/level/block/entity/TileEntityContainer.patch +++ b/nms-patches/net/minecraft/world/level/block/entity/TileEntityContainer.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/TileEntityContainer.java -+++ b/net/minecraft/server/TileEntityContainer.java -@@ -76,4 +76,12 @@ +--- a/net/minecraft/world/level/block/entity/TileEntityContainer.java ++++ b/net/minecraft/world/level/block/entity/TileEntityContainer.java +@@ -89,4 +89,12 @@ } protected abstract Container createContainer(int i, PlayerInventory playerinventory); diff --git a/nms-patches/net/minecraft/world/level/block/entity/TileEntityDispenser.patch b/nms-patches/net/minecraft/world/level/block/entity/TileEntityDispenser.patch index 713cfd14d..816d1d7fa 100644 --- a/nms-patches/net/minecraft/world/level/block/entity/TileEntityDispenser.patch +++ b/nms-patches/net/minecraft/world/level/block/entity/TileEntityDispenser.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/TileEntityDispenser.java -+++ b/net/minecraft/server/TileEntityDispenser.java -@@ -2,11 +2,48 @@ - - import java.util.Random; +--- a/net/minecraft/world/level/block/entity/TileEntityDispenser.java ++++ b/net/minecraft/world/level/block/entity/TileEntityDispenser.java +@@ -13,11 +13,48 @@ + import net.minecraft.world.item.ItemStack; + import net.minecraft.world.level.block.state.IBlockData; +// CraftBukkit start +import java.util.List; diff --git a/nms-patches/net/minecraft/world/level/block/entity/TileEntityEndGateway.patch b/nms-patches/net/minecraft/world/level/block/entity/TileEntityEndGateway.patch index eab984a8b..0c6644746 100644 --- a/nms-patches/net/minecraft/world/level/block/entity/TileEntityEndGateway.patch +++ b/nms-patches/net/minecraft/world/level/block/entity/TileEntityEndGateway.patch @@ -1,10 +1,11 @@ ---- a/net/minecraft/server/TileEntityEndGateway.java -+++ b/net/minecraft/server/TileEntityEndGateway.java -@@ -7,6 +7,13 @@ +--- a/net/minecraft/world/level/block/entity/TileEntityEndGateway.java ++++ b/net/minecraft/world/level/block/entity/TileEntityEndGateway.java +@@ -30,6 +30,14 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +// CraftBukkit start ++import net.minecraft.world.level.dimension.DimensionManager; +import org.bukkit.Bukkit; +import org.bukkit.Location; +import org.bukkit.craftbukkit.entity.CraftPlayer; @@ -14,7 +15,7 @@ public class TileEntityEndGateway extends TileEntityEnderPortal implements ITickable { private static final Logger LOGGER = LogManager.getLogger(); -@@ -117,7 +124,7 @@ +@@ -140,7 +148,7 @@ public void b(Entity entity) { if (this.world instanceof WorldServer && !this.f()) { this.c = 100; @@ -23,7 +24,7 @@ this.a((WorldServer) this.world); } -@@ -142,6 +149,27 @@ +@@ -165,6 +173,27 @@ entity1 = entity.getRootVehicle(); } @@ -51,7 +52,7 @@ entity1.resetPortalCooldown(); entity1.enderTeleportAndLoad((double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D); } -@@ -246,7 +274,7 @@ +@@ -269,7 +298,7 @@ } private void a(WorldServer worldserver, BlockPosition blockposition) { diff --git a/nms-patches/net/minecraft/world/level/block/entity/TileEntityFurnace.patch b/nms-patches/net/minecraft/world/level/block/entity/TileEntityFurnace.patch index 7d941a262..09d4e7073 100644 --- a/nms-patches/net/minecraft/world/level/block/entity/TileEntityFurnace.patch +++ b/nms-patches/net/minecraft/world/level/block/entity/TileEntityFurnace.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/TileEntityFurnace.java -+++ b/net/minecraft/server/TileEntityFurnace.java -@@ -10,6 +10,17 @@ - import java.util.Map; - import javax.annotation.Nullable; +--- a/net/minecraft/world/level/block/entity/TileEntityFurnace.java ++++ b/net/minecraft/world/level/block/entity/TileEntityFurnace.java +@@ -39,6 +39,17 @@ + import net.minecraft.world.level.block.state.IBlockData; + import net.minecraft.world.phys.Vec3D; +// CraftBukkit start +import org.bukkit.craftbukkit.block.CraftBlock; @@ -18,7 +18,7 @@ public abstract class TileEntityFurnace extends TileEntityContainer implements IWorldInventory, RecipeHolder, AutoRecipeOutput, ITickable { private static final int[] g = new int[]{0}; -@@ -137,6 +148,36 @@ +@@ -166,6 +177,36 @@ return map; } @@ -55,7 +55,7 @@ private static boolean b(Item item) { return TagsItem.NON_FLAMMABLE_WOOD.isTagged(item); } -@@ -223,12 +264,23 @@ +@@ -252,12 +293,23 @@ this.cookTime = MathHelper.clamp(this.cookTime - 2, 0, this.cookTimeTotal); } } else { @@ -82,7 +82,7 @@ flag1 = true; if (!itemstack.isEmpty()) { Item item = itemstack.getItem(); -@@ -290,11 +342,38 @@ +@@ -319,11 +371,38 @@ ItemStack itemstack1 = irecipe.getResult(); ItemStack itemstack2 = (ItemStack) this.items.get(2); @@ -121,7 +121,7 @@ if (!this.world.isClientSide) { this.a(irecipe); -@@ -319,7 +398,7 @@ +@@ -348,7 +427,7 @@ } protected int getRecipeCookingTime() { @@ -130,7 +130,7 @@ } public static boolean isFuel(ItemStack itemstack) { -@@ -446,14 +525,20 @@ +@@ -475,14 +554,20 @@ @Override public void b(EntityHuman entityhuman) {} @@ -153,7 +153,7 @@ List> list = Lists.newArrayList(); ObjectIterator objectiterator = this.n.object2IntEntrySet().iterator(); -@@ -462,14 +547,14 @@ +@@ -491,14 +576,14 @@ world.getCraftingManager().getRecipe((MinecraftKey) entry.getKey()).ifPresent((irecipe) -> { list.add(irecipe); @@ -170,7 +170,7 @@ int j = MathHelper.d((float) i * f); float f1 = MathHelper.h((float) i * f); -@@ -477,6 +562,14 @@ +@@ -506,6 +591,14 @@ ++j; } diff --git a/nms-patches/net/minecraft/world/level/block/entity/TileEntityHopper.patch b/nms-patches/net/minecraft/world/level/block/entity/TileEntityHopper.patch index 95d74de83..9b5878b37 100644 --- a/nms-patches/net/minecraft/world/level/block/entity/TileEntityHopper.patch +++ b/nms-patches/net/minecraft/world/level/block/entity/TileEntityHopper.patch @@ -1,10 +1,12 @@ ---- a/net/minecraft/server/TileEntityHopper.java -+++ b/net/minecraft/server/TileEntityHopper.java -@@ -7,12 +7,51 @@ - import java.util.stream.IntStream; - import javax.annotation.Nullable; +--- a/net/minecraft/world/level/block/entity/TileEntityHopper.java ++++ b/net/minecraft/world/level/block/entity/TileEntityHopper.java +@@ -33,12 +33,53 @@ + import net.minecraft.world.phys.shapes.OperatorBoolean; + import net.minecraft.world.phys.shapes.VoxelShapes; +// CraftBukkit start ++import net.minecraft.world.InventoryLargeChest; ++import net.minecraft.world.entity.vehicle.EntityMinecartHopper; +import org.bukkit.craftbukkit.entity.CraftHumanEntity; +import org.bukkit.craftbukkit.inventory.CraftItemStack; +import org.bukkit.entity.HumanEntity; @@ -52,7 +54,7 @@ public TileEntityHopper() { super(TileEntityTypes.HOPPER); this.items = NonNullList.a(5, ItemStack.b); -@@ -138,7 +177,28 @@ +@@ -164,7 +205,28 @@ for (int i = 0; i < this.getSize(); ++i) { if (!this.getItem(i).isEmpty()) { ItemStack itemstack = this.getItem(i).cloneItemStack(); @@ -82,7 +84,7 @@ if (itemstack1.isEmpty()) { iinventory.update(); -@@ -203,7 +263,34 @@ +@@ -229,7 +291,34 @@ if (!itemstack.isEmpty() && b(iinventory, itemstack, i, enumdirection)) { ItemStack itemstack1 = itemstack.cloneItemStack(); @@ -118,7 +120,7 @@ if (itemstack2.isEmpty()) { iinventory.update(); -@@ -218,6 +305,13 @@ +@@ -244,6 +333,13 @@ public static boolean a(IInventory iinventory, EntityItem entityitem) { boolean flag = false; diff --git a/nms-patches/net/minecraft/world/level/block/entity/TileEntityLectern.patch b/nms-patches/net/minecraft/world/level/block/entity/TileEntityLectern.patch index bf78093c0..dce66b812 100644 --- a/nms-patches/net/minecraft/world/level/block/entity/TileEntityLectern.patch +++ b/nms-patches/net/minecraft/world/level/block/entity/TileEntityLectern.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/TileEntityLectern.java -+++ b/net/minecraft/server/TileEntityLectern.java -@@ -2,9 +2,63 @@ - - import javax.annotation.Nullable; +--- a/net/minecraft/world/level/block/entity/TileEntityLectern.java ++++ b/net/minecraft/world/level/block/entity/TileEntityLectern.java +@@ -27,9 +27,63 @@ + import net.minecraft.world.phys.Vec2F; + import net.minecraft.world.phys.Vec3D; -public class TileEntityLectern extends TileEntity implements Clearable, ITileInventory { +// CraftBukkit start @@ -66,7 +66,7 @@ @Override public int getSize() { return 1; -@@ -49,11 +103,20 @@ +@@ -74,11 +128,20 @@ } @Override @@ -89,7 +89,7 @@ } @Override -@@ -135,7 +198,7 @@ +@@ -160,7 +223,7 @@ if (j != this.page) { this.page = j; this.update(); @@ -98,7 +98,7 @@ } } -@@ -158,6 +221,32 @@ +@@ -183,6 +246,32 @@ return itemstack; } @@ -131,7 +131,7 @@ private CommandListenerWrapper a(@Nullable EntityHuman entityhuman) { String s; Object object; -@@ -172,7 +261,8 @@ +@@ -197,7 +286,8 @@ Vec3D vec3d = Vec3D.a((BaseBlockPosition) this.position); @@ -141,7 +141,7 @@ } @Override -@@ -211,7 +301,7 @@ +@@ -236,7 +326,7 @@ @Override public Container createMenu(int i, PlayerInventory playerinventory, EntityHuman entityhuman) { diff --git a/nms-patches/net/minecraft/world/level/block/entity/TileEntityShulkerBox.patch b/nms-patches/net/minecraft/world/level/block/entity/TileEntityShulkerBox.patch index aedaf4311..119673267 100644 --- a/nms-patches/net/minecraft/world/level/block/entity/TileEntityShulkerBox.patch +++ b/nms-patches/net/minecraft/world/level/block/entity/TileEntityShulkerBox.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/TileEntityShulkerBox.java -+++ b/net/minecraft/server/TileEntityShulkerBox.java -@@ -4,6 +4,11 @@ - import java.util.stream.IntStream; - import javax.annotation.Nullable; +--- a/net/minecraft/world/level/block/entity/TileEntityShulkerBox.java ++++ b/net/minecraft/world/level/block/entity/TileEntityShulkerBox.java +@@ -29,6 +29,11 @@ + import net.minecraft.world.phys.Vec3D; + import net.minecraft.world.phys.shapes.VoxelShapes; +// CraftBukkit start +import org.bukkit.craftbukkit.entity.CraftHumanEntity; @@ -12,7 +12,7 @@ public class TileEntityShulkerBox extends TileEntityLootable implements IWorldInventory, ITickable { private static final int[] a = IntStream.range(0, 27).toArray(); -@@ -16,6 +21,37 @@ +@@ -41,6 +46,37 @@ private EnumColor l; private boolean m; @@ -50,7 +50,7 @@ public TileEntityShulkerBox(@Nullable EnumColor enumcolor) { super(TileEntityTypes.SHULKER_BOX); this.contents = NonNullList.a(27, ItemStack.b); -@@ -178,6 +214,7 @@ +@@ -203,6 +239,7 @@ } ++this.viewingCount; @@ -58,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 +227,7 @@ +@@ -215,6 +252,7 @@ public void closeContainer(EntityHuman entityhuman) { if (!entityhuman.isSpectator()) { --this.viewingCount; diff --git a/nms-patches/net/minecraft/world/level/block/entity/TileEntitySign.patch b/nms-patches/net/minecraft/world/level/block/entity/TileEntitySign.patch index 096e174a3..41279c969 100644 --- a/nms-patches/net/minecraft/world/level/block/entity/TileEntitySign.patch +++ b/nms-patches/net/minecraft/world/level/block/entity/TileEntitySign.patch @@ -1,15 +1,15 @@ ---- a/net/minecraft/server/TileEntitySign.java -+++ b/net/minecraft/server/TileEntitySign.java -@@ -3,7 +3,7 @@ - import com.mojang.brigadier.exceptions.CommandSyntaxException; - import javax.annotation.Nullable; +--- a/net/minecraft/world/level/block/entity/TileEntitySign.java ++++ b/net/minecraft/world/level/block/entity/TileEntitySign.java +@@ -23,7 +23,7 @@ + import net.minecraft.world.phys.Vec2F; + import net.minecraft.world.phys.Vec3D; -public class TileEntitySign extends TileEntity { +public class TileEntitySign extends TileEntity implements ICommandListener { // CraftBukkit - implements public final IChatBaseComponent[] lines; public boolean isEditable; -@@ -29,6 +29,12 @@ +@@ -49,6 +49,12 @@ nbttagcompound.setString("Text" + (i + 1), s); } @@ -22,7 +22,7 @@ nbttagcompound.setString("Color", this.color.c()); return nbttagcompound; } -@@ -39,18 +45,38 @@ +@@ -59,18 +65,38 @@ super.load(iblockdata, nbttagcompound); this.color = EnumColor.a(nbttagcompound.getString("Color"), EnumColor.BLACK); @@ -68,7 +68,7 @@ } this.g[i] = null; -@@ -111,11 +137,37 @@ +@@ -131,11 +157,37 @@ return true; } @@ -107,7 +107,7 @@ } public EnumColor getColor() { -@@ -126,7 +178,7 @@ +@@ -146,7 +198,7 @@ if (enumcolor != this.getColor()) { this.color = enumcolor; this.update(); diff --git a/nms-patches/net/minecraft/world/level/block/grower/WorldGenMegaTreeProvider.patch b/nms-patches/net/minecraft/world/level/block/grower/WorldGenMegaTreeProvider.patch index 34602daaa..e5a11ce1c 100644 --- a/nms-patches/net/minecraft/world/level/block/grower/WorldGenMegaTreeProvider.patch +++ b/nms-patches/net/minecraft/world/level/block/grower/WorldGenMegaTreeProvider.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/WorldGenMegaTreeProvider.java -+++ b/net/minecraft/server/WorldGenMegaTreeProvider.java -@@ -30,6 +30,7 @@ +--- a/net/minecraft/world/level/block/grower/WorldGenMegaTreeProvider.java ++++ b/net/minecraft/world/level/block/grower/WorldGenMegaTreeProvider.java +@@ -39,6 +39,7 @@ return false; } else { ((WorldGenFeatureTreeConfiguration) worldgenfeatureconfigured.f).b(); diff --git a/nms-patches/net/minecraft/world/level/block/grower/WorldGenTreeProvider.patch b/nms-patches/net/minecraft/world/level/block/grower/WorldGenTreeProvider.patch index 0d6d528c6..e7e3cdb13 100644 --- a/nms-patches/net/minecraft/world/level/block/grower/WorldGenTreeProvider.patch +++ b/nms-patches/net/minecraft/world/level/block/grower/WorldGenTreeProvider.patch @@ -1,15 +1,19 @@ ---- a/net/minecraft/server/WorldGenTreeProvider.java -+++ b/net/minecraft/server/WorldGenTreeProvider.java -@@ -4,6 +4,8 @@ - import java.util.Random; - import javax.annotation.Nullable; +--- a/net/minecraft/world/level/block/grower/WorldGenTreeProvider.java ++++ b/net/minecraft/world/level/block/grower/WorldGenTreeProvider.java +@@ -14,6 +14,12 @@ + import net.minecraft.world.level.levelgen.feature.WorldGenFeatureConfigured; + import net.minecraft.world.level.levelgen.feature.configurations.WorldGenFeatureTreeConfiguration; -+import org.bukkit.TreeType; // CraftBukkit ++// CraftBukkit start ++import net.minecraft.data.worldgen.BiomeDecoratorGroups; ++import net.minecraft.world.level.block.BlockSapling; ++import org.bukkit.TreeType; ++// CraftBukkit end + public abstract class WorldGenTreeProvider { public WorldGenTreeProvider() {} -@@ -17,6 +19,7 @@ +@@ -27,6 +33,7 @@ if (worldgenfeatureconfigured == null) { return false; } else { @@ -17,7 +21,7 @@ worldserver.setTypeAndData(blockposition, Blocks.AIR.getBlockData(), 4); ((WorldGenFeatureTreeConfiguration) worldgenfeatureconfigured.f).b(); if (worldgenfeatureconfigured.a(worldserver, chunkgenerator, random, blockposition)) { -@@ -43,4 +46,46 @@ +@@ -53,4 +60,46 @@ return true; } diff --git a/nms-patches/net/minecraft/world/level/block/piston/BlockPiston.patch b/nms-patches/net/minecraft/world/level/block/piston/BlockPiston.patch index 041c191f6..4d88e6a44 100644 --- a/nms-patches/net/minecraft/world/level/block/piston/BlockPiston.patch +++ b/nms-patches/net/minecraft/world/level/block/piston/BlockPiston.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/BlockPiston.java -+++ b/net/minecraft/server/BlockPiston.java -@@ -7,6 +7,14 @@ - import java.util.Map; - import java.util.Map.Entry; +--- a/net/minecraft/world/level/block/piston/BlockPiston.java ++++ b/net/minecraft/world/level/block/piston/BlockPiston.java +@@ -36,6 +36,14 @@ + import net.minecraft.world.phys.shapes.VoxelShapeCollision; + import net.minecraft.world.phys.shapes.VoxelShapes; +// CraftBukkit start +import com.google.common.collect.ImmutableList; @@ -15,7 +15,7 @@ public class BlockPiston extends BlockDirectional { public static final BlockStateBoolean EXTENDED = BlockProperties.g; -@@ -103,6 +111,18 @@ +@@ -132,6 +140,18 @@ } } @@ -34,7 +34,7 @@ world.playBlockAction(blockposition, this, b0, enumdirection.c()); } -@@ -279,6 +299,48 @@ +@@ -308,6 +328,48 @@ IBlockData[] aiblockdata = new IBlockData[list.size() + list2.size()]; EnumDirection enumdirection1 = flag ? enumdirection : enumdirection.opposite(); int j = 0; diff --git a/nms-patches/net/minecraft/world/level/block/state/properties/BlockStateInteger.patch b/nms-patches/net/minecraft/world/level/block/state/properties/BlockStateInteger.patch index 6c8682896..27e534f75 100644 --- a/nms-patches/net/minecraft/world/level/block/state/properties/BlockStateInteger.patch +++ b/nms-patches/net/minecraft/world/level/block/state/properties/BlockStateInteger.patch @@ -1,5 +1,5 @@ ---- a/net/minecraft/server/BlockStateInteger.java -+++ b/net/minecraft/server/BlockStateInteger.java +--- a/net/minecraft/world/level/block/state/properties/BlockStateInteger.java ++++ b/net/minecraft/world/level/block/state/properties/BlockStateInteger.java @@ -9,9 +9,15 @@ public class BlockStateInteger extends IBlockState { diff --git a/nms-patches/net/minecraft/world/level/border/WorldBorder.patch b/nms-patches/net/minecraft/world/level/border/WorldBorder.patch index 66e53f812..bcd2b2d6c 100644 --- a/nms-patches/net/minecraft/world/level/border/WorldBorder.patch +++ b/nms-patches/net/minecraft/world/level/border/WorldBorder.patch @@ -1,14 +1,14 @@ ---- a/net/minecraft/server/WorldBorder.java -+++ b/net/minecraft/server/WorldBorder.java -@@ -17,6 +17,7 @@ +--- a/net/minecraft/world/level/border/WorldBorder.java ++++ b/net/minecraft/world/level/border/WorldBorder.java +@@ -27,6 +27,7 @@ private int i = 29999984; private WorldBorder.a j = new WorldBorder.d(6.0E7D); public static final WorldBorder.c c = new WorldBorder.c(0.0D, 0.0D, 0.2D, 5.0D, 5, 15, 6.0E7D, 0L, 0.0D); -+ public WorldServer world; // CraftBukkit ++ public net.minecraft.server.level.WorldServer world; // CraftBukkit public WorldBorder() {} -@@ -130,6 +131,7 @@ +@@ -140,6 +141,7 @@ } public void a(IWorldBorderListener iworldborderlistener) { diff --git a/nms-patches/net/minecraft/world/level/chunk/BiomeStorage.patch b/nms-patches/net/minecraft/world/level/chunk/BiomeStorage.patch index 278584550..ba06164c4 100644 --- a/nms-patches/net/minecraft/world/level/chunk/BiomeStorage.patch +++ b/nms-patches/net/minecraft/world/level/chunk/BiomeStorage.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/BiomeStorage.java -+++ b/net/minecraft/server/BiomeStorage.java -@@ -87,4 +87,14 @@ +--- a/net/minecraft/world/level/chunk/BiomeStorage.java ++++ b/net/minecraft/world/level/chunk/BiomeStorage.java +@@ -93,4 +93,14 @@ return this.h[i1 << BiomeStorage.e + BiomeStorage.e | j1 << BiomeStorage.e | l]; } diff --git a/nms-patches/net/minecraft/world/level/chunk/Chunk.patch b/nms-patches/net/minecraft/world/level/chunk/Chunk.patch index b65a14732..66e0aaef6 100644 --- a/nms-patches/net/minecraft/world/level/chunk/Chunk.patch +++ b/nms-patches/net/minecraft/world/level/chunk/Chunk.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/Chunk.java -+++ b/net/minecraft/server/Chunk.java -@@ -31,7 +31,7 @@ +--- a/net/minecraft/world/level/chunk/Chunk.java ++++ b/net/minecraft/world/level/chunk/Chunk.java +@@ -65,7 +65,7 @@ private BiomeStorage d; private final Map e; public boolean loaded; @@ -9,7 +9,7 @@ public final Map heightMap; private final ChunkConverter i; public final Map tileEntities; -@@ -65,7 +65,7 @@ +@@ -99,7 +99,7 @@ this.m = Maps.newHashMap(); this.n = new ShortList[16]; this.entitySlices = (EntitySlice[]) (new EntitySlice[16]); @@ -18,7 +18,7 @@ this.loc = chunkcoordintpair; this.i = chunkconverter; HeightMap.Type[] aheightmap_type = HeightMap.Type.values(); -@@ -96,8 +96,22 @@ +@@ -130,8 +130,22 @@ } } @@ -41,7 +41,7 @@ public Chunk(World world, ProtoChunk protochunk) { this(world, protochunk.getPos(), protochunk.getBiomeIndex(), protochunk.p(), protochunk.n(), protochunk.o(), protochunk.getInhabitedTime(), protochunk.getSections(), (Consumer) null); Iterator iterator = protochunk.y().iterator(); -@@ -139,6 +153,7 @@ +@@ -173,6 +187,7 @@ this.b(protochunk.r()); this.s = true; @@ -49,7 +49,7 @@ } @Override -@@ -229,9 +244,16 @@ +@@ -263,9 +278,16 @@ } } @@ -66,17 +66,17 @@ int i = blockposition.getX() & 15; int j = blockposition.getY(); int k = blockposition.getZ() & 15; -@@ -283,7 +305,8 @@ +@@ -317,7 +339,8 @@ } } - if (!this.world.isClientSide) { + // CraftBukkit - Don't place while processing the BlockPlaceEvent, unless it's a BlockContainer. Prevents blocks such as TNT from activating when cancelled. -+ if (!this.world.isClientSide && doPlace && (!this.world.captureBlockStates || block instanceof BlockTileEntity)) { ++ if (!this.world.isClientSide && doPlace && (!this.world.captureBlockStates || block instanceof net.minecraft.world.level.block.BlockTileEntity)) { iblockdata.onPlace(this.world, blockposition, iblockdata1, flag); } -@@ -378,7 +401,12 @@ +@@ -412,7 +435,12 @@ @Nullable public TileEntity a(BlockPosition blockposition, Chunk.EnumTileEntityState chunk_enumtileentitystate) { @@ -90,13 +90,13 @@ if (tileentity == null) { NBTTagCompound nbttagcompound = (NBTTagCompound) this.e.remove(blockposition); -@@ -424,6 +452,13 @@ +@@ -458,6 +486,13 @@ tileentity1.al_(); } + // CraftBukkit start + } else { -+ System.out.println("Attempted to place a tile entity (" + tileentity + ") at " + tileentity.position.getX() + "," + tileentity.position.getY() + "," + tileentity.position.getZ() ++ System.out.println("Attempted to place a tile entity (" + tileentity + ") at " + tileentity.getPosition().getX() + "," + tileentity.getPosition().getY() + "," + tileentity.getPosition().getZ() + + " (" + getType(blockposition) + ") where there was no entity tile!"); + System.out.println("Chunk coordinates: " + (this.loc.x * 16) + "," + (this.loc.z * 16)); + new Exception().printStackTrace(); @@ -104,7 +104,7 @@ } } -@@ -473,6 +508,50 @@ +@@ -507,6 +542,50 @@ } @@ -155,7 +155,7 @@ public void markDirty() { this.s = true; } -@@ -526,7 +605,7 @@ +@@ -560,7 +639,7 @@ Iterator iterator = this.entitySlices[k].a(Entity.class).iterator(); while (iterator.hasNext()) { @@ -164,7 +164,7 @@ if ((entitytypes == null || entity.getEntityType() == entitytypes) && entity.getBoundingBox().c(axisalignedbb) && predicate.test(entity)) { list.add(entity); -@@ -547,7 +626,7 @@ +@@ -581,7 +660,7 @@ Iterator iterator = this.entitySlices[k].a(oclass).iterator(); while (iterator.hasNext()) { @@ -173,7 +173,7 @@ if (t0.getBoundingBox().c(axisalignedbb) && (predicate == null || predicate.test(t0))) { list.add(t0); -@@ -621,7 +700,7 @@ +@@ -655,7 +734,7 @@ @Override public boolean isNeedsSaving() { @@ -182,7 +182,7 @@ } public void d(boolean flag) { -@@ -763,7 +842,7 @@ +@@ -797,7 +876,7 @@ public void B() { if (this.o instanceof ProtoChunkTickList) { @@ -191,7 +191,7 @@ return this.getType(blockposition).getBlock(); }); this.o = TickListEmpty.b(); -@@ -773,7 +852,7 @@ +@@ -807,7 +886,7 @@ } if (this.p instanceof ProtoChunkTickList) { @@ -200,7 +200,7 @@ return this.getFluid(blockposition).getType(); }); this.p = TickListEmpty.b(); -@@ -785,12 +864,12 @@ +@@ -819,12 +898,12 @@ } public void a(WorldServer worldserver) { diff --git a/nms-patches/net/minecraft/world/level/chunk/ChunkGenerator.patch b/nms-patches/net/minecraft/world/level/chunk/ChunkGenerator.patch index 8f2c8cab5..87855a895 100644 --- a/nms-patches/net/minecraft/world/level/chunk/ChunkGenerator.patch +++ b/nms-patches/net/minecraft/world/level/chunk/ChunkGenerator.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/ChunkGenerator.java -+++ b/net/minecraft/server/ChunkGenerator.java -@@ -210,7 +210,16 @@ +--- a/net/minecraft/world/level/chunk/ChunkGenerator.java ++++ b/net/minecraft/world/level/chunk/ChunkGenerator.java +@@ -246,7 +246,16 @@ while (iterator.hasNext()) { Supplier> supplier = (Supplier) iterator.next(); @@ -18,7 +18,7 @@ } } -@@ -294,9 +303,11 @@ +@@ -330,9 +339,11 @@ } static { diff --git a/nms-patches/net/minecraft/world/level/chunk/ChunkStatus.patch b/nms-patches/net/minecraft/world/level/chunk/ChunkStatus.patch index 49ba72886..f4ff21014 100644 --- a/nms-patches/net/minecraft/world/level/chunk/ChunkStatus.patch +++ b/nms-patches/net/minecraft/world/level/chunk/ChunkStatus.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/ChunkStatus.java -+++ b/net/minecraft/server/ChunkStatus.java -@@ -27,7 +27,7 @@ +--- a/net/minecraft/world/level/chunk/ChunkStatus.java ++++ b/net/minecraft/world/level/chunk/ChunkStatus.java +@@ -38,7 +38,7 @@ }); public static final ChunkStatus STRUCTURE_STARTS = a("structure_starts", ChunkStatus.EMPTY, 0, ChunkStatus.n, ChunkStatus.Type.PROTOCHUNK, (chunkstatus, worldserver, chunkgenerator, definedstructuremanager, lightenginethreaded, function, list, ichunkaccess) -> { if (!ichunkaccess.getChunkStatus().b(chunkstatus)) { @@ -9,7 +9,7 @@ chunkgenerator.createStructures(worldserver.r(), worldserver.getStructureManager(), ichunkaccess, definedstructuremanager, worldserver.getSeed()); } -@@ -90,7 +90,7 @@ +@@ -101,7 +101,7 @@ return (CompletableFuture) function.apply(ichunkaccess); }); private static final List q = ImmutableList.of(ChunkStatus.FULL, ChunkStatus.FEATURES, ChunkStatus.LIQUID_CARVERS, ChunkStatus.STRUCTURE_STARTS, ChunkStatus.STRUCTURE_STARTS, ChunkStatus.STRUCTURE_STARTS, ChunkStatus.STRUCTURE_STARTS, ChunkStatus.STRUCTURE_STARTS, ChunkStatus.STRUCTURE_STARTS, ChunkStatus.STRUCTURE_STARTS, ChunkStatus.STRUCTURE_STARTS); diff --git a/nms-patches/net/minecraft/world/level/chunk/storage/ChunkRegionLoader.patch b/nms-patches/net/minecraft/world/level/chunk/storage/ChunkRegionLoader.patch index f77d3d98c..e7c43d03e 100644 --- a/nms-patches/net/minecraft/world/level/chunk/storage/ChunkRegionLoader.patch +++ b/nms-patches/net/minecraft/world/level/chunk/storage/ChunkRegionLoader.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/ChunkRegionLoader.java -+++ b/net/minecraft/server/ChunkRegionLoader.java -@@ -91,7 +91,7 @@ +--- a/net/minecraft/world/level/chunk/storage/ChunkRegionLoader.java ++++ b/net/minecraft/world/level/chunk/storage/ChunkRegionLoader.java +@@ -133,7 +133,7 @@ if (nbttagcompound1.hasKeyOfType("TileTicks", 9)) { nbttaglist1 = nbttagcompound1.getList("TileTicks", 10); @@ -9,7 +9,7 @@ registryblocks = IRegistry.BLOCK; registryblocks.getClass(); object1 = TickListChunk.a(nbttaglist1, function, registryblocks::get); -@@ -103,7 +103,7 @@ +@@ -145,7 +145,7 @@ if (nbttagcompound1.hasKeyOfType("LiquidTicks", 9)) { nbttaglist1 = nbttagcompound1.getList("LiquidTicks", 10); @@ -18,12 +18,12 @@ registryblocks = IRegistry.FLUID; registryblocks.getClass(); object2 = TickListChunk.a(nbttaglist1, function, registryblocks::get); -@@ -113,6 +113,12 @@ +@@ -155,6 +155,12 @@ object = new Chunk(worldserver.getMinecraftWorld(), chunkcoordintpair, biomestorage, chunkconverter, (TickList) object1, (TickList) object2, j, achunksection, (chunk) -> { loadEntities(nbttagcompound1, chunk); + // CraftBukkit start - load chunk persistent data from nbt -+ NBTBase persistentBase = nbttagcompound1.get("ChunkBukkitValues"); ++ net.minecraft.nbt.NBTBase persistentBase = nbttagcompound1.get("ChunkBukkitValues"); + if (persistentBase instanceof NBTTagCompound) { + chunk.persistentDataContainer.putAll((NBTTagCompound) persistentBase); + } @@ -31,7 +31,7 @@ }); } else { ProtoChunk protochunk = new ProtoChunk(chunkcoordintpair, chunkconverter, achunksection, protochunkticklist, protochunkticklist1); -@@ -246,8 +252,9 @@ +@@ -288,8 +294,9 @@ NBTTagCompound nbttagcompound2; for (int i = -1; i < 17; ++i) { @@ -42,7 +42,7 @@ }).findFirst().orElse(Chunk.a); NibbleArray nibblearray = lightenginethreaded.a(EnumSkyBlock.BLOCK).a(SectionPosition.a(chunkcoordintpair, i)); NibbleArray nibblearray1 = lightenginethreaded.a(EnumSkyBlock.SKY).a(SectionPosition.a(chunkcoordintpair, i)); -@@ -302,6 +309,12 @@ +@@ -344,6 +351,12 @@ if (ichunkaccess.getChunkStatus().getType() == ChunkStatus.Type.LEVELCHUNK) { Chunk chunk = (Chunk) ichunkaccess; diff --git a/nms-patches/net/minecraft/world/level/chunk/storage/IChunkLoader.patch b/nms-patches/net/minecraft/world/level/chunk/storage/IChunkLoader.patch index 780643b09..f4162d365 100644 --- a/nms-patches/net/minecraft/world/level/chunk/storage/IChunkLoader.patch +++ b/nms-patches/net/minecraft/world/level/chunk/storage/IChunkLoader.patch @@ -1,6 +1,21 @@ ---- a/net/minecraft/server/IChunkLoader.java -+++ b/net/minecraft/server/IChunkLoader.java -@@ -18,10 +18,49 @@ +--- a/net/minecraft/world/level/chunk/storage/IChunkLoader.java ++++ b/net/minecraft/world/level/chunk/storage/IChunkLoader.java +@@ -15,6 +15,14 @@ + import net.minecraft.world.level.levelgen.structure.PersistentStructureLegacy; + import net.minecraft.world.level.storage.WorldPersistentData; + ++// CraftBukkit start ++import net.minecraft.server.level.ChunkProviderServer; ++import net.minecraft.server.level.WorldServer; ++import net.minecraft.world.level.GeneratorAccess; ++import net.minecraft.world.level.chunk.ChunkStatus; ++import net.minecraft.world.level.dimension.DimensionManager; ++// CraftBukkit end ++ + public class IChunkLoader implements AutoCloseable { + + private final IOWorker a; +@@ -27,10 +35,49 @@ this.a = new IOWorker(file, flag, "chunk"); } diff --git a/nms-patches/net/minecraft/world/level/chunk/storage/RegionFileCache.patch b/nms-patches/net/minecraft/world/level/chunk/storage/RegionFileCache.patch index 3a17b2ae0..4d73d3c09 100644 --- a/nms-patches/net/minecraft/world/level/chunk/storage/RegionFileCache.patch +++ b/nms-patches/net/minecraft/world/level/chunk/storage/RegionFileCache.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/RegionFileCache.java -+++ b/net/minecraft/server/RegionFileCache.java -@@ -21,7 +21,7 @@ +--- a/net/minecraft/world/level/chunk/storage/RegionFileCache.java ++++ b/net/minecraft/world/level/chunk/storage/RegionFileCache.java +@@ -25,7 +25,7 @@ this.c = flag; } @@ -9,7 +9,7 @@ long i = ChunkCoordIntPair.pair(chunkcoordintpair.getRegionX(), chunkcoordintpair.getRegionZ()); RegionFile regionfile = (RegionFile) this.cache.getAndMoveToFirst(i); -@@ -37,6 +37,7 @@ +@@ -41,6 +41,7 @@ } File file = new File(this.b, "r." + chunkcoordintpair.getRegionX() + "." + chunkcoordintpair.getRegionZ() + ".mca"); @@ -17,7 +17,7 @@ RegionFile regionfile1 = new RegionFile(file, this.b, this.c); this.cache.putAndMoveToFirst(i, regionfile1); -@@ -46,7 +47,12 @@ +@@ -50,7 +51,12 @@ @Nullable public NBTTagCompound read(ChunkCoordIntPair chunkcoordintpair) throws IOException { @@ -31,7 +31,7 @@ DataInputStream datainputstream = regionfile.a(chunkcoordintpair); Throwable throwable = null; -@@ -81,7 +87,7 @@ +@@ -85,7 +91,7 @@ } protected void write(ChunkCoordIntPair chunkcoordintpair, NBTTagCompound nbttagcompound) throws IOException { diff --git a/nms-patches/net/minecraft/world/level/levelgen/ChunkGeneratorAbstract.patch b/nms-patches/net/minecraft/world/level/levelgen/ChunkGeneratorAbstract.patch index edb3116e5..e588d593e 100644 --- a/nms-patches/net/minecraft/world/level/levelgen/ChunkGeneratorAbstract.patch +++ b/nms-patches/net/minecraft/world/level/levelgen/ChunkGeneratorAbstract.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/ChunkGeneratorAbstract.java -+++ b/net/minecraft/server/ChunkGeneratorAbstract.java -@@ -24,7 +24,7 @@ +--- a/net/minecraft/world/level/levelgen/ChunkGeneratorAbstract.java ++++ b/net/minecraft/world/level/levelgen/ChunkGeneratorAbstract.java +@@ -58,7 +58,7 @@ return chunkgeneratorabstract.h; })).apply(instance, instance.stable(ChunkGeneratorAbstract::new)); }); @@ -9,7 +9,7 @@ for (int i = 0; i < 24; ++i) { for (int j = 0; j < 24; ++j) { for (int k = 0; k < 24; ++k) { -@@ -34,7 +34,7 @@ +@@ -68,7 +68,7 @@ } }); @@ -18,7 +18,7 @@ for (int i = -2; i <= 2; ++i) { for (int j = -2; j <= 2; ++j) { float f = 10.0F / MathHelper.c((float) (i * i + j * j) + 0.2F); -@@ -193,6 +193,11 @@ +@@ -227,6 +227,11 @@ f6 = f4; f7 = f5; } diff --git a/nms-patches/net/minecraft/world/level/levelgen/MobSpawnerPatrol.patch b/nms-patches/net/minecraft/world/level/levelgen/MobSpawnerPatrol.patch index dc224a1cc..4657200b9 100644 --- a/nms-patches/net/minecraft/world/level/levelgen/MobSpawnerPatrol.patch +++ b/nms-patches/net/minecraft/world/level/levelgen/MobSpawnerPatrol.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/MobSpawnerPatrol.java -+++ b/net/minecraft/server/MobSpawnerPatrol.java -@@ -102,7 +102,7 @@ +--- a/net/minecraft/world/level/levelgen/MobSpawnerPatrol.java ++++ b/net/minecraft/world/level/levelgen/MobSpawnerPatrol.java +@@ -118,7 +118,7 @@ entitymonsterpatrolling.setPosition((double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ()); entitymonsterpatrolling.prepare(worldserver, worldserver.getDamageScaler(blockposition), EnumMobSpawn.PATROL, (GroupDataEntity) null, (NBTTagCompound) null); diff --git a/nms-patches/net/minecraft/world/level/levelgen/MobSpawnerPhantom.patch b/nms-patches/net/minecraft/world/level/levelgen/MobSpawnerPhantom.patch index 899a76a42..2d8e6a56a 100644 --- a/nms-patches/net/minecraft/world/level/levelgen/MobSpawnerPhantom.patch +++ b/nms-patches/net/minecraft/world/level/levelgen/MobSpawnerPhantom.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/MobSpawnerPhantom.java -+++ b/net/minecraft/server/MobSpawnerPhantom.java -@@ -57,7 +57,7 @@ +--- a/net/minecraft/world/level/levelgen/MobSpawnerPhantom.java ++++ b/net/minecraft/world/level/levelgen/MobSpawnerPhantom.java +@@ -77,7 +77,7 @@ entityphantom.setPositionRotation(blockposition1, 0.0F, 0.0F); groupdataentity = entityphantom.prepare(worldserver, difficultydamagescaler, EnumMobSpawn.NATURAL, groupdataentity, (NBTTagCompound) null); diff --git a/nms-patches/net/minecraft/world/level/levelgen/structure/PersistentStructureLegacy.patch b/nms-patches/net/minecraft/world/level/levelgen/structure/PersistentStructureLegacy.patch index 2e5b6fc97..1e1da9454 100644 --- a/nms-patches/net/minecraft/world/level/levelgen/structure/PersistentStructureLegacy.patch +++ b/nms-patches/net/minecraft/world/level/levelgen/structure/PersistentStructureLegacy.patch @@ -1,7 +1,13 @@ ---- a/net/minecraft/server/PersistentStructureLegacy.java -+++ b/net/minecraft/server/PersistentStructureLegacy.java -@@ -14,7 +14,7 @@ +--- a/net/minecraft/world/level/levelgen/structure/PersistentStructureLegacy.java ++++ b/net/minecraft/world/level/levelgen/structure/PersistentStructureLegacy.java +@@ -20,9 +20,13 @@ + import net.minecraft.world.level.levelgen.feature.StructureGenerator; + import net.minecraft.world.level.storage.WorldPersistentData; ++// CraftBukkit start ++import net.minecraft.world.level.dimension.DimensionManager; ++// CraftBukkit end ++ public class PersistentStructureLegacy { - private static final Map a = (Map) SystemUtils.a((Object) Maps.newHashMap(), (hashmap) -> { @@ -9,7 +15,7 @@ hashmap.put("Village", "Village"); hashmap.put("Mineshaft", "Mineshaft"); hashmap.put("Mansion", "Mansion"); -@@ -27,7 +27,7 @@ +@@ -35,7 +39,7 @@ hashmap.put("Fortress", "Fortress"); hashmap.put("EndCity", "EndCity"); }); @@ -18,7 +24,7 @@ hashmap.put("Iglu", "Igloo"); hashmap.put("TeDP", "Desert_Pyramid"); hashmap.put("TeJP", "Jungle_Pyramid"); -@@ -228,16 +228,16 @@ +@@ -236,16 +240,16 @@ } } diff --git a/nms-patches/net/minecraft/world/level/levelgen/structure/WorldGenWitchHut.patch b/nms-patches/net/minecraft/world/level/levelgen/structure/WorldGenWitchHut.patch index ffefc85ea..273e8ed4e 100644 --- a/nms-patches/net/minecraft/world/level/levelgen/structure/WorldGenWitchHut.patch +++ b/nms-patches/net/minecraft/world/level/levelgen/structure/WorldGenWitchHut.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/WorldGenWitchHut.java -+++ b/net/minecraft/server/WorldGenWitchHut.java -@@ -85,7 +85,7 @@ +--- a/net/minecraft/world/level/levelgen/structure/WorldGenWitchHut.java ++++ b/net/minecraft/world/level/levelgen/structure/WorldGenWitchHut.java +@@ -106,7 +106,7 @@ entitywitch.setPersistent(); entitywitch.setPositionRotation((double) j + 0.5D, (double) i, (double) k + 0.5D, 0.0F, 0.0F); entitywitch.prepare(generatoraccessseed, generatoraccessseed.getDamageScaler(new BlockPosition(j, i, k)), EnumMobSpawn.STRUCTURE, (GroupDataEntity) null, (NBTTagCompound) null); @@ -9,7 +9,7 @@ } } -@@ -107,7 +107,7 @@ +@@ -128,7 +128,7 @@ entitycat.setPersistent(); entitycat.setPositionRotation((double) i + 0.5D, (double) j, (double) k + 0.5D, 0.0F, 0.0F); entitycat.prepare(worldaccess, worldaccess.getDamageScaler(new BlockPosition(i, j, k)), EnumMobSpawn.STRUCTURE, (GroupDataEntity) null, (NBTTagCompound) null); diff --git a/nms-patches/net/minecraft/world/level/levelgen/structure/templatesystem/DefinedStructure.patch b/nms-patches/net/minecraft/world/level/levelgen/structure/templatesystem/DefinedStructure.patch index e259328e6..af20c1943 100644 --- a/nms-patches/net/minecraft/world/level/levelgen/structure/templatesystem/DefinedStructure.patch +++ b/nms-patches/net/minecraft/world/level/levelgen/structure/templatesystem/DefinedStructure.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/DefinedStructure.java -+++ b/net/minecraft/server/DefinedStructure.java -@@ -98,7 +98,7 @@ +--- a/net/minecraft/world/level/levelgen/structure/templatesystem/DefinedStructure.java ++++ b/net/minecraft/world/level/levelgen/structure/templatesystem/DefinedStructure.java +@@ -134,7 +134,7 @@ } private static List a(List list, List list1, List list2) { @@ -9,7 +9,7 @@ return definedstructure_blockinfo.a.getY(); }).thenComparingInt((definedstructure_blockinfo) -> { return definedstructure_blockinfo.a.getX(); -@@ -118,7 +118,7 @@ +@@ -154,7 +154,7 @@ } private void a(World world, BlockPosition blockposition, BlockPosition blockposition1) { @@ -18,7 +18,7 @@ return !(entity instanceof EntityHuman); }); -@@ -430,11 +430,13 @@ +@@ -466,11 +466,13 @@ } private static Optional a(WorldAccess worldaccess, NBTTagCompound nbttagcompound) { @@ -36,7 +36,7 @@ } public BlockPosition a(EnumBlockRotation enumblockrotation) { -@@ -869,7 +871,7 @@ +@@ -905,7 +907,7 @@ public IBlockData a(int i) { IBlockData iblockdata = (IBlockData) this.b.fromId(i); diff --git a/nms-patches/net/minecraft/world/level/levelgen/structure/templatesystem/DefinedStructureManager.patch b/nms-patches/net/minecraft/world/level/levelgen/structure/templatesystem/DefinedStructureManager.patch index c3d85ad0d..1c785a261 100644 --- a/nms-patches/net/minecraft/world/level/levelgen/structure/templatesystem/DefinedStructureManager.patch +++ b/nms-patches/net/minecraft/world/level/levelgen/structure/templatesystem/DefinedStructureManager.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/DefinedStructureManager.java -+++ b/net/minecraft/server/DefinedStructureManager.java -@@ -19,7 +19,7 @@ +--- a/net/minecraft/world/level/levelgen/structure/templatesystem/DefinedStructureManager.java ++++ b/net/minecraft/world/level/levelgen/structure/templatesystem/DefinedStructureManager.java +@@ -31,7 +31,7 @@ public class DefinedStructureManager { private static final Logger LOGGER = LogManager.getLogger(); @@ -8,4 +8,4 @@ + private final Map b = Maps.newConcurrentMap(); // SPIGOT-5287 private final DataFixer c; private IResourceManager d; - private final java.nio.file.Path e; + private final Path e; diff --git a/nms-patches/net/minecraft/world/level/material/FluidTypeFlowing.patch b/nms-patches/net/minecraft/world/level/material/FluidTypeFlowing.patch index bc8142f99..6bb80f3bb 100644 --- a/nms-patches/net/minecraft/world/level/material/FluidTypeFlowing.patch +++ b/nms-patches/net/minecraft/world/level/material/FluidTypeFlowing.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/FluidTypeFlowing.java -+++ b/net/minecraft/server/FluidTypeFlowing.java -@@ -11,6 +11,15 @@ - import java.util.Map; - import java.util.Map.Entry; +--- a/net/minecraft/world/level/material/FluidTypeFlowing.java ++++ b/net/minecraft/world/level/material/FluidTypeFlowing.java +@@ -32,6 +32,15 @@ + import net.minecraft.world.phys.shapes.VoxelShape; + import net.minecraft.world.phys.shapes.VoxelShapes; +// CraftBukkit start +import org.bukkit.block.BlockFace; @@ -16,7 +16,7 @@ public abstract class FluidTypeFlowing extends FluidType { public static final BlockStateBoolean FALLING = BlockProperties.i; -@@ -110,6 +119,15 @@ +@@ -131,6 +140,15 @@ Fluid fluid1 = this.a((IWorldReader) generatoraccess, blockposition1, iblockdata1); if (this.a(generatoraccess, blockposition, iblockdata, EnumDirection.DOWN, blockposition1, iblockdata1, generatoraccess.getFluid(blockposition1), fluid1.getType())) { @@ -32,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 +158,15 @@ +@@ -161,6 +179,15 @@ IBlockData iblockdata1 = generatoraccess.getType(blockposition1); if (this.a(generatoraccess, blockposition, iblockdata, enumdirection, blockposition1, iblockdata1, generatoraccess.getFluid(blockposition1), fluid1.getType())) { @@ -48,7 +48,7 @@ this.a(generatoraccess, blockposition1, iblockdata1, enumdirection, fluid1); } } -@@ -418,12 +445,23 @@ +@@ -439,12 +466,23 @@ if (fluid1.isEmpty()) { fluid = fluid1; diff --git a/nms-patches/net/minecraft/world/level/material/FluidTypeLava.patch b/nms-patches/net/minecraft/world/level/material/FluidTypeLava.patch index 54f189099..368720b54 100644 --- a/nms-patches/net/minecraft/world/level/material/FluidTypeLava.patch +++ b/nms-patches/net/minecraft/world/level/material/FluidTypeLava.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/FluidTypeLava.java -+++ b/net/minecraft/server/FluidTypeLava.java -@@ -39,6 +39,13 @@ +--- a/net/minecraft/world/level/material/FluidTypeLava.java ++++ b/net/minecraft/world/level/material/FluidTypeLava.java +@@ -55,6 +55,13 @@ if (iblockdata.isAir()) { if (this.a((IWorldReader) world, blockposition1)) { @@ -14,7 +14,7 @@ world.setTypeUpdate(blockposition1, BlockFireAbstract.a((IBlockAccess) world, blockposition1)); return; } -@@ -55,6 +62,14 @@ +@@ -71,6 +78,14 @@ } if (world.isEmpty(blockposition2.up()) && this.b(world, blockposition2)) { @@ -29,7 +29,7 @@ world.setTypeUpdate(blockposition2.up(), BlockFireAbstract.a((IBlockAccess) world, blockposition2)); } } -@@ -144,7 +159,11 @@ +@@ -160,7 +175,11 @@ if (this.a((Tag) TagsFluid.LAVA) && fluid1.a((Tag) TagsFluid.WATER)) { if (iblockdata.getBlock() instanceof BlockFluids) { diff --git a/nms-patches/net/minecraft/world/level/portal/BlockPortalShape.patch b/nms-patches/net/minecraft/world/level/portal/BlockPortalShape.patch index ed6ae3c03..fb17ca515 100644 --- a/nms-patches/net/minecraft/world/level/portal/BlockPortalShape.patch +++ b/nms-patches/net/minecraft/world/level/portal/BlockPortalShape.patch @@ -1,8 +1,8 @@ ---- a/net/minecraft/server/BlockPortalShape.java -+++ b/net/minecraft/server/BlockPortalShape.java -@@ -4,6 +4,13 @@ - import java.util.function.Predicate; - import javax.annotation.Nullable; +--- a/net/minecraft/world/level/portal/BlockPortalShape.java ++++ b/net/minecraft/world/level/portal/BlockPortalShape.java +@@ -19,6 +19,13 @@ + import net.minecraft.world.level.block.state.properties.BlockProperties; + import net.minecraft.world.phys.Vec3D; +// CraftBukkit start +import org.bukkit.craftbukkit.block.CraftBlock; @@ -14,7 +14,7 @@ public class BlockPortalShape { private static final BlockBase.e a = (iblockdata, iblockaccess, blockposition) -> { -@@ -17,6 +24,7 @@ +@@ -32,6 +39,7 @@ private BlockPosition position; private int height; private int width; @@ -22,7 +22,7 @@ public static Optional a(GeneratorAccess generatoraccess, BlockPosition blockposition, EnumDirection.EnumAxis enumdirection_enumaxis) { return a(generatoraccess, blockposition, (blockportalshape) -> { -@@ -81,6 +89,7 @@ +@@ -96,6 +104,7 @@ if (!a(iblockdata)) { if (BlockPortalShape.a.test(iblockdata, this.b, blockposition_mutableblockposition)) { @@ -30,7 +30,7 @@ return i; } break; -@@ -152,12 +161,30 @@ +@@ -167,12 +176,30 @@ return this.position != null && this.width >= 2 && this.width <= 21 && this.height >= 3 && this.height <= 21; } @@ -62,7 +62,7 @@ } public boolean c() { -@@ -194,7 +221,7 @@ +@@ -209,7 +236,7 @@ return new Vec3D(d2, d3, d4); } @@ -71,7 +71,7 @@ BlockPosition blockposition = blockutil_rectangle.origin; IBlockData iblockdata = worldserver.getType(blockposition); EnumDirection.EnumAxis enumdirection_enumaxis1 = (EnumDirection.EnumAxis) iblockdata.get(BlockProperties.E); -@@ -208,6 +235,6 @@ +@@ -223,6 +250,6 @@ boolean flag = enumdirection_enumaxis1 == EnumDirection.EnumAxis.X; Vec3D vec3d3 = new Vec3D((double) blockposition.getX() + (flag ? d2 : d4), (double) blockposition.getY() + d3, (double) blockposition.getZ() + (flag ? d4 : d2)); diff --git a/nms-patches/net/minecraft/world/level/portal/PortalTravelAgent.patch b/nms-patches/net/minecraft/world/level/portal/PortalTravelAgent.patch index 9031f5932..0132c7f33 100644 --- a/nms-patches/net/minecraft/world/level/portal/PortalTravelAgent.patch +++ b/nms-patches/net/minecraft/world/level/portal/PortalTravelAgent.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/PortalTravelAgent.java -+++ b/net/minecraft/server/PortalTravelAgent.java -@@ -13,13 +13,19 @@ +--- a/net/minecraft/world/level/portal/PortalTravelAgent.java ++++ b/net/minecraft/world/level/portal/PortalTravelAgent.java +@@ -30,13 +30,19 @@ } public Optional findPortal(BlockPosition blockposition, boolean flag) { @@ -22,7 +22,7 @@ return villageplacerecord.f().j(blockposition); }).thenComparingInt((villageplacerecord) -> { return villageplacerecord.f().getY(); -@@ -40,6 +46,12 @@ +@@ -57,6 +63,12 @@ } public Optional createPortal(BlockPosition blockposition, EnumDirection.EnumAxis enumdirection_enumaxis) { @@ -30,12 +30,12 @@ + return this.createPortal(blockposition, enumdirection_enumaxis, null, 16); + } + -+ public Optional createPortal(BlockPosition blockposition, EnumDirection.EnumAxis enumdirection_enumaxis, Entity entity, int createRadius) { ++ public Optional createPortal(BlockPosition blockposition, EnumDirection.EnumAxis enumdirection_enumaxis, net.minecraft.world.entity.Entity entity, int createRadius) { + // CraftBukkit end EnumDirection enumdirection = EnumDirection.a(EnumDirection.EnumAxisDirection.POSITIVE, enumdirection_enumaxis); double d0 = -1.0D; BlockPosition blockposition1 = null; -@@ -48,7 +60,7 @@ +@@ -65,7 +77,7 @@ WorldBorder worldborder = this.world.getWorldBorder(); int i = this.world.getHeight() - 1; BlockPosition.MutableBlockPosition blockposition_mutableblockposition = blockposition.i(); @@ -44,7 +44,7 @@ int j; -@@ -102,6 +114,7 @@ +@@ -119,6 +131,7 @@ int j1; @@ -52,7 +52,7 @@ if (d0 == -1.0D) { blockposition1 = (new BlockPosition(blockposition.getX(), MathHelper.clamp(blockposition.getY(), 70, this.world.getHeight() - 10), blockposition.getZ())).immutableCopy(); EnumDirection enumdirection1 = enumdirection.g(); -@@ -116,7 +129,7 @@ +@@ -133,7 +146,7 @@ IBlockData iblockdata = k1 < 0 ? Blocks.OBSIDIAN.getBlockData() : Blocks.AIR.getBlockData(); blockposition_mutableblockposition.a((BaseBlockPosition) blockposition1, j * enumdirection.getAdjacentX() + j1 * enumdirection1.getAdjacentX(), k1, j * enumdirection.getAdjacentZ() + j1 * enumdirection1.getAdjacentZ()); @@ -61,7 +61,7 @@ } } } -@@ -126,7 +139,7 @@ +@@ -143,7 +156,7 @@ for (j1 = -1; j1 < 4; ++j1) { if (l1 == -1 || l1 == 2 || j1 == -1 || j1 == 3) { blockposition_mutableblockposition.a((BaseBlockPosition) blockposition1, l1 * enumdirection.getAdjacentX(), j1, l1 * enumdirection.getAdjacentZ()); @@ -70,7 +70,7 @@ } } } -@@ -136,10 +149,20 @@ +@@ -153,10 +166,20 @@ for (j1 = 0; j1 < 2; ++j1) { for (j = 0; j < 3; ++j) { blockposition_mutableblockposition.a((BaseBlockPosition) blockposition1, j1 * enumdirection.getAdjacentX(), j, j1 * enumdirection.getAdjacentZ()); diff --git a/nms-patches/net/minecraft/world/level/portal/ShapeDetectorShape.patch b/nms-patches/net/minecraft/world/level/portal/ShapeDetectorShape.patch index a728f1c73..421f2fdcc 100644 --- a/nms-patches/net/minecraft/world/level/portal/ShapeDetectorShape.patch +++ b/nms-patches/net/minecraft/world/level/portal/ShapeDetectorShape.patch @@ -1,9 +1,13 @@ ---- a/net/minecraft/server/ShapeDetectorShape.java -+++ b/net/minecraft/server/ShapeDetectorShape.java -@@ -1,13 +1,21 @@ - package net.minecraft.server; +--- a/net/minecraft/world/level/portal/ShapeDetectorShape.java ++++ b/net/minecraft/world/level/portal/ShapeDetectorShape.java +@@ -2,14 +2,25 @@ -+import org.bukkit.craftbukkit.event.CraftPortalEvent; // CraftBukkit + import net.minecraft.world.phys.Vec3D; + ++// CraftBukkit start ++import net.minecraft.server.level.WorldServer; ++import org.bukkit.craftbukkit.event.CraftPortalEvent; ++// CraftBukkit end + public class ShapeDetectorShape { diff --git a/nms-patches/net/minecraft/world/level/saveddata/maps/WorldMap.patch b/nms-patches/net/minecraft/world/level/saveddata/maps/WorldMap.patch index a9f779946..103492458 100644 --- a/nms-patches/net/minecraft/world/level/saveddata/maps/WorldMap.patch +++ b/nms-patches/net/minecraft/world/level/saveddata/maps/WorldMap.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/WorldMap.java -+++ b/net/minecraft/server/WorldMap.java -@@ -11,6 +11,15 @@ +--- a/net/minecraft/world/level/saveddata/maps/WorldMap.java ++++ b/net/minecraft/world/level/saveddata/maps/WorldMap.java +@@ -31,6 +31,15 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -16,7 +16,7 @@ public class WorldMap extends PersistentBase { private static final Logger LOGGER = LogManager.getLogger(); -@@ -28,8 +37,18 @@ +@@ -48,8 +57,18 @@ public final Map decorations = Maps.newLinkedHashMap(); private final Map n = Maps.newHashMap(); @@ -35,7 +35,7 @@ } public void a(int i, int j, int k, boolean flag, boolean flag1, ResourceKey resourcekey) { -@@ -52,12 +71,30 @@ +@@ -72,12 +91,30 @@ @Override public void a(NBTTagCompound nbttagcompound) { @@ -69,7 +69,7 @@ }); this.centerX = nbttagcompound.getInt("xCenter"); this.centerZ = nbttagcompound.getInt("zCenter"); -@@ -92,13 +129,32 @@ +@@ -112,13 +149,32 @@ @Override public NBTTagCompound b(NBTTagCompound nbttagcompound) { @@ -103,7 +103,7 @@ nbttagcompound.setInt("xCenter", this.centerX); nbttagcompound.setInt("zCenter", this.centerZ); nbttagcompound.setByte("scale", this.scale); -@@ -389,12 +445,25 @@ +@@ -409,12 +465,25 @@ @Nullable public Packet a(ItemStack itemstack) { diff --git a/nms-patches/net/minecraft/world/level/storage/Convertable.patch b/nms-patches/net/minecraft/world/level/storage/Convertable.patch index 80941e2b5..1c6e59941 100644 --- a/nms-patches/net/minecraft/world/level/storage/Convertable.patch +++ b/nms-patches/net/minecraft/world/level/storage/Convertable.patch @@ -1,6 +1,17 @@ ---- a/net/minecraft/server/Convertable.java -+++ b/net/minecraft/server/Convertable.java -@@ -73,21 +73,21 @@ +--- a/net/minecraft/world/level/storage/Convertable.java ++++ b/net/minecraft/world/level/storage/Convertable.java +@@ -47,6 +47,10 @@ + import org.apache.logging.log4j.LogManager; + import org.apache.logging.log4j.Logger; + ++// CraftBukkit start ++import net.minecraft.world.level.dimension.WorldDimension; ++// CraftBukkit end ++ + public class Convertable { + + private static final Logger LOGGER = LogManager.getLogger(); +@@ -96,21 +100,21 @@ Logger logger1 = Convertable.LOGGER; logger1.getClass(); @@ -25,7 +36,7 @@ return new IllegalStateException("Failed to get noise settings registry"); }); -@@ -195,8 +195,10 @@ +@@ -218,8 +222,10 @@ }; } @@ -38,10 +49,10 @@ } public class ConversionSession implements AutoCloseable { -@@ -205,8 +207,12 @@ - public final java.nio.file.Path folder; +@@ -228,8 +234,12 @@ + public final Path folder; private final String levelName; - private final Map e = Maps.newHashMap(); + private final Map e = Maps.newHashMap(); + // CraftBukkit start + private final ResourceKey dimensionType; @@ -52,15 +63,15 @@ this.levelName = s; this.folder = Convertable.this.universe.resolve(s); this.lock = SessionLock.a(this.folder); -@@ -223,9 +229,23 @@ +@@ -246,8 +256,22 @@ } public File a(ResourceKey resourcekey) { - return DimensionManager.a(resourcekey, this.folder.toFile()); + // CraftBukkit start + return this.getFolder(this.folder.toFile()); - } - ++ } ++ + private File getFolder(File file) { + if (dimensionType == WorldDimension.OVERWORLD) { + return file; @@ -71,9 +82,8 @@ + } else { + throw new IllegalArgumentException("Unknwon dimension " + this.dimensionType); + } -+ } + } + // CraftBukkit end -+ + private void checkSession() { if (!this.lock.a()) { - throw new IllegalStateException("Lock is no longer valid"); diff --git a/nms-patches/net/minecraft/world/level/storage/WorldDataServer.patch b/nms-patches/net/minecraft/world/level/storage/WorldDataServer.patch index 525972f34..b371b3ff5 100644 --- a/nms-patches/net/minecraft/world/level/storage/WorldDataServer.patch +++ b/nms-patches/net/minecraft/world/level/storage/WorldDataServer.patch @@ -1,10 +1,13 @@ ---- a/net/minecraft/server/WorldDataServer.java -+++ b/net/minecraft/server/WorldDataServer.java -@@ -14,10 +14,16 @@ +--- a/net/minecraft/world/level/storage/WorldDataServer.java ++++ b/net/minecraft/world/level/storage/WorldDataServer.java +@@ -38,10 +38,19 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +// CraftBukkit start ++import net.minecraft.network.protocol.game.PacketPlayOutServerDifficulty; ++import net.minecraft.server.level.EntityPlayer; ++import net.minecraft.server.level.WorldServer; +import org.bukkit.Bukkit; +import org.bukkit.event.weather.ThunderChangeEvent; +import org.bukkit.event.weather.WeatherChangeEvent; @@ -18,7 +21,7 @@ private final GeneratorSettings c; private final Lifecycle d; private int e; -@@ -51,6 +57,7 @@ +@@ -75,6 +84,7 @@ private final Set C; private boolean D; private final CustomFunctionCallbackTimerQueue E; @@ -26,7 +29,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 +101,8 @@ +@@ -118,7 +128,8 @@ return (NBTBase) dynamic.get("DimensionData").get("1").get("DragonFight").orElseEmptyMap().getValue(); }); @@ -36,7 +39,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 +134,7 @@ +@@ -150,7 +161,7 @@ nbttagcompound.set("Version", nbttagcompound2); nbttagcompound.setInt("DataVersion", SharedConstants.getGameVersion().getWorldVersion()); RegistryWriteOps registrywriteops = RegistryWriteOps.a(DynamicOpsNBT.a, iregistrycustom); @@ -45,7 +48,7 @@ Logger logger = WorldDataServer.LOGGER; logger.getClass(); -@@ -174,6 +182,7 @@ +@@ -198,6 +209,7 @@ nbttagcompound.a("WanderingTraderId", this.B); } @@ -53,7 +56,7 @@ } @Override -@@ -291,6 +300,20 @@ +@@ -315,6 +327,20 @@ @Override public void setThundering(boolean flag) { @@ -74,7 +77,7 @@ this.thundering = flag; } -@@ -311,6 +334,20 @@ +@@ -335,6 +361,20 @@ @Override public void setStorm(boolean flag) { @@ -95,7 +98,7 @@ this.raining = flag; } -@@ -377,6 +414,12 @@ +@@ -401,6 +441,12 @@ @Override public void setDifficulty(EnumDifficulty enumdifficulty) { this.b = this.b.a(enumdifficulty); @@ -108,7 +111,7 @@ } @Override -@@ -481,4 +524,12 @@ +@@ -505,4 +551,12 @@ public IWorldDataServer H() { return this; } diff --git a/nms-patches/net/minecraft/world/level/storage/WorldNBTStorage.patch b/nms-patches/net/minecraft/world/level/storage/WorldNBTStorage.patch index 8d839716d..a25c07502 100644 --- a/nms-patches/net/minecraft/world/level/storage/WorldNBTStorage.patch +++ b/nms-patches/net/minecraft/world/level/storage/WorldNBTStorage.patch @@ -1,19 +1,20 @@ ---- a/net/minecraft/server/WorldNBTStorage.java -+++ b/net/minecraft/server/WorldNBTStorage.java -@@ -6,6 +6,12 @@ +--- a/net/minecraft/world/level/storage/WorldNBTStorage.java ++++ b/net/minecraft/world/level/storage/WorldNBTStorage.java +@@ -12,6 +12,13 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +// CraftBukkit start +import java.io.FileInputStream; +import java.io.InputStream; ++import net.minecraft.server.level.EntityPlayer; +import org.bukkit.craftbukkit.entity.CraftPlayer; +// CraftBukkit end + public class WorldNBTStorage { private static final Logger LOGGER = LogManager.getLogger(); -@@ -49,6 +55,16 @@ +@@ -55,6 +62,16 @@ } if (nbttagcompound != null) { @@ -30,7 +31,7 @@ int i = nbttagcompound.hasKeyOfType("DataVersion", 3) ? nbttagcompound.getInt("DataVersion") : -1; entityhuman.load(GameProfileSerializer.a(this.a, DataFixTypes.PLAYER, nbttagcompound, i)); -@@ -57,6 +73,22 @@ +@@ -63,6 +80,22 @@ return nbttagcompound; } @@ -53,7 +54,7 @@ public String[] getSeenPlayers() { String[] astring = this.playerDir.list(); -@@ -72,4 +104,10 @@ +@@ -78,4 +111,10 @@ return astring; } diff --git a/nms-patches/net/minecraft/world/level/storage/loot/LootTable.patch b/nms-patches/net/minecraft/world/level/storage/loot/LootTable.patch index 4aa2e2524..7cce3f727 100644 --- a/nms-patches/net/minecraft/world/level/storage/loot/LootTable.patch +++ b/nms-patches/net/minecraft/world/level/storage/loot/LootTable.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/LootTable.java -+++ b/net/minecraft/server/LootTable.java -@@ -19,6 +19,13 @@ +--- a/net/minecraft/world/level/storage/loot/LootTable.java ++++ b/net/minecraft/world/level/storage/loot/LootTable.java +@@ -29,6 +29,13 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -14,7 +14,7 @@ public class LootTable { private static final Logger LOGGER = LogManager.getLogger(); -@@ -103,8 +110,21 @@ +@@ -113,8 +120,21 @@ } public void fillInventory(IInventory iinventory, LootTableInfo loottableinfo) { diff --git a/nms-patches/net/minecraft/world/level/storage/loot/LootTableRegistry.patch b/nms-patches/net/minecraft/world/level/storage/loot/LootTableRegistry.patch index f14f8e73e..2c636efba 100644 --- a/nms-patches/net/minecraft/world/level/storage/loot/LootTableRegistry.patch +++ b/nms-patches/net/minecraft/world/level/storage/loot/LootTableRegistry.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/LootTableRegistry.java -+++ b/net/minecraft/server/LootTableRegistry.java -@@ -15,6 +15,7 @@ +--- a/net/minecraft/world/level/storage/loot/LootTableRegistry.java ++++ b/net/minecraft/world/level/storage/loot/LootTableRegistry.java +@@ -21,6 +21,7 @@ private static final Logger LOGGER = LogManager.getLogger(); private static final Gson b = LootSerialization.c().create(); private Map keyToLootTable = ImmutableMap.of(); @@ -8,16 +8,16 @@ private final LootPredicateManager d; public LootTableRegistry(LootPredicateManager lootpredicatemanager) { -@@ -50,7 +51,7 @@ +@@ -56,7 +57,7 @@ LootPredicateManager lootpredicatemanager = this.d; this.d.getClass(); - Function function = lootpredicatemanager::a; -+ Function function = lootpredicatemanager::a; // CraftBukkit - decompile error ++ Function function = lootpredicatemanager::a; // CraftBukkit - decompile error immutablemap.getClass(); LootCollector lootcollector = new LootCollector(lootcontextparameterset, function, immutablemap::get); -@@ -62,6 +63,11 @@ +@@ -68,6 +69,11 @@ LootTableRegistry.LOGGER.warn("Found validation problem in " + s + ": " + s1); }); this.keyToLootTable = immutablemap; diff --git a/nms-patches/net/minecraft/world/level/storage/loot/entries/LootEntryAbstract.patch b/nms-patches/net/minecraft/world/level/storage/loot/entries/LootEntryAbstract.patch index 7a55aee3f..1504e2f12 100644 --- a/nms-patches/net/minecraft/world/level/storage/loot/entries/LootEntryAbstract.patch +++ b/nms-patches/net/minecraft/world/level/storage/loot/entries/LootEntryAbstract.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/LootEntryAbstract.java -+++ b/net/minecraft/server/LootEntryAbstract.java -@@ -34,7 +34,16 @@ +--- a/net/minecraft/world/level/storage/loot/entries/LootEntryAbstract.java ++++ b/net/minecraft/world/level/storage/loot/entries/LootEntryAbstract.java +@@ -41,7 +41,16 @@ public Serializer() {} diff --git a/nms-patches/net/minecraft/world/level/storage/loot/functions/LootEnchantFunction.patch b/nms-patches/net/minecraft/world/level/storage/loot/functions/LootEnchantFunction.patch index 276b5a105..fcd3d70ac 100644 --- a/nms-patches/net/minecraft/world/level/storage/loot/functions/LootEnchantFunction.patch +++ b/nms-patches/net/minecraft/world/level/storage/loot/functions/LootEnchantFunction.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/LootEnchantFunction.java -+++ b/net/minecraft/server/LootEnchantFunction.java -@@ -37,8 +37,13 @@ +--- a/net/minecraft/world/level/storage/loot/functions/LootEnchantFunction.java ++++ b/net/minecraft/world/level/storage/loot/functions/LootEnchantFunction.java +@@ -47,8 +47,13 @@ if (entity instanceof EntityLiving) { int i = EnchantmentManager.g((EntityLiving) entity); @@ -15,7 +15,7 @@ return itemstack; } -@@ -62,7 +67,7 @@ +@@ -72,7 +77,7 @@ public b() {} public void a(JsonObject jsonobject, LootEnchantFunction lootenchantfunction, JsonSerializationContext jsonserializationcontext) { diff --git a/nms-patches/net/minecraft/world/level/storage/loot/parameters/LootContextParameters.patch b/nms-patches/net/minecraft/world/level/storage/loot/parameters/LootContextParameters.patch index d2993800f..0213d1e80 100644 --- a/nms-patches/net/minecraft/world/level/storage/loot/parameters/LootContextParameters.patch +++ b/nms-patches/net/minecraft/world/level/storage/loot/parameters/LootContextParameters.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/LootContextParameters.java -+++ b/net/minecraft/server/LootContextParameters.java -@@ -12,6 +12,7 @@ +--- a/net/minecraft/world/level/storage/loot/parameters/LootContextParameters.java ++++ b/net/minecraft/world/level/storage/loot/parameters/LootContextParameters.java +@@ -21,6 +21,7 @@ public static final LootContextParameter BLOCK_ENTITY = a("block_entity"); public static final LootContextParameter TOOL = a("tool"); public static final LootContextParameter EXPLOSION_RADIUS = a("explosion_radius"); diff --git a/nms-patches/net/minecraft/world/level/storage/loot/predicates/LootItemConditionRandomChanceWithLooting.patch b/nms-patches/net/minecraft/world/level/storage/loot/predicates/LootItemConditionRandomChanceWithLooting.patch index 7283f018d..272906283 100644 --- a/nms-patches/net/minecraft/world/level/storage/loot/predicates/LootItemConditionRandomChanceWithLooting.patch +++ b/nms-patches/net/minecraft/world/level/storage/loot/predicates/LootItemConditionRandomChanceWithLooting.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/LootItemConditionRandomChanceWithLooting.java -+++ b/net/minecraft/server/LootItemConditionRandomChanceWithLooting.java -@@ -33,6 +33,11 @@ +--- a/net/minecraft/world/level/storage/loot/predicates/LootItemConditionRandomChanceWithLooting.java ++++ b/net/minecraft/world/level/storage/loot/predicates/LootItemConditionRandomChanceWithLooting.java +@@ -41,6 +41,11 @@ if (entity instanceof EntityLiving) { i = EnchantmentManager.g((EntityLiving) entity); } diff --git a/nms-patches/net/minecraft/world/level/storage/loot/predicates/LootItemConditionSurvivesExplosion.patch b/nms-patches/net/minecraft/world/level/storage/loot/predicates/LootItemConditionSurvivesExplosion.patch index 1da01d9f2..17a7f7ba4 100644 --- a/nms-patches/net/minecraft/world/level/storage/loot/predicates/LootItemConditionSurvivesExplosion.patch +++ b/nms-patches/net/minecraft/world/level/storage/loot/predicates/LootItemConditionSurvivesExplosion.patch @@ -1,6 +1,6 @@ ---- a/net/minecraft/server/LootItemConditionSurvivesExplosion.java -+++ b/net/minecraft/server/LootItemConditionSurvivesExplosion.java -@@ -30,7 +30,8 @@ +--- a/net/minecraft/world/level/storage/loot/predicates/LootItemConditionSurvivesExplosion.java ++++ b/net/minecraft/world/level/storage/loot/predicates/LootItemConditionSurvivesExplosion.java +@@ -34,7 +34,8 @@ Random random = loottableinfo.a(); float f = 1.0F / ofloat; diff --git a/pom.xml b/pom.xml index ed084597b..8cee98deb 100644 --- a/pom.xml +++ b/pom.xml @@ -213,8 +213,14 @@ - net.minecraft.server - net.minecraft.server.v${minecraft_version} + com/mojang/math/(.+/)*(.*) + net/minecraft/server/v${minecraft_version}/$2 + true + + + net/minecraft/(.+/)*(.*) + net/minecraft/server/v${minecraft_version}/$2 + true diff --git a/src/main/java/com/mojang/brigadier/tree/CommandNode.java b/src/main/java/com/mojang/brigadier/tree/CommandNode.java index 1685522b4..f0f25fa40 100644 --- a/src/main/java/com/mojang/brigadier/tree/CommandNode.java +++ b/src/main/java/com/mojang/brigadier/tree/CommandNode.java @@ -24,7 +24,7 @@ import java.util.concurrent.CompletableFuture; import java.util.function.Predicate; import java.util.stream.Collectors; -import net.minecraft.server.CommandListenerWrapper; // CraftBukkit +import net.minecraft.commands.CommandListenerWrapper; // CraftBukkit public abstract class CommandNode implements Comparable> { private Map> children = Maps.newLinkedHashMap(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftArt.java b/src/main/java/org/bukkit/craftbukkit/CraftArt.java index 378cd360d..1640d8bb7 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftArt.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftArt.java @@ -3,9 +3,9 @@ package org.bukkit.craftbukkit; import com.google.common.base.Preconditions; import com.google.common.collect.BiMap; import com.google.common.collect.ImmutableBiMap; -import net.minecraft.server.IRegistry; -import net.minecraft.server.MinecraftKey; -import net.minecraft.server.Paintings; +import net.minecraft.core.IRegistry; +import net.minecraft.resources.MinecraftKey; +import net.minecraft.world.entity.decoration.Paintings; import org.bukkit.Art; public class CraftArt { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java index 929e47391..7c3148490 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java @@ -6,24 +6,24 @@ import java.lang.ref.WeakReference; import java.util.Arrays; import java.util.Collection; import java.util.function.Predicate; -import net.minecraft.server.BiomeStorage; -import net.minecraft.server.BlockPosition; -import net.minecraft.server.Blocks; -import net.minecraft.server.ChunkCoordIntPair; -import net.minecraft.server.ChunkSection; -import net.minecraft.server.DataPaletteBlock; -import net.minecraft.server.EnumSkyBlock; -import net.minecraft.server.GameProfileSerializer; -import net.minecraft.server.HeightMap; -import net.minecraft.server.IBlockData; -import net.minecraft.server.IRegistry; -import net.minecraft.server.LightEngine; -import net.minecraft.server.NBTTagCompound; -import net.minecraft.server.NibbleArray; -import net.minecraft.server.SectionPosition; -import net.minecraft.server.SeededRandom; -import net.minecraft.server.WorldChunkManager; -import net.minecraft.server.WorldServer; +import net.minecraft.core.BlockPosition; +import net.minecraft.core.IRegistry; +import net.minecraft.core.SectionPosition; +import net.minecraft.nbt.GameProfileSerializer; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.server.level.WorldServer; +import net.minecraft.world.level.ChunkCoordIntPair; +import net.minecraft.world.level.EnumSkyBlock; +import net.minecraft.world.level.biome.WorldChunkManager; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.state.IBlockData; +import net.minecraft.world.level.chunk.BiomeStorage; +import net.minecraft.world.level.chunk.ChunkSection; +import net.minecraft.world.level.chunk.DataPaletteBlock; +import net.minecraft.world.level.chunk.NibbleArray; +import net.minecraft.world.level.levelgen.HeightMap; +import net.minecraft.world.level.levelgen.SeededRandom; +import net.minecraft.world.level.lighting.LightEngine; import org.bukkit.Chunk; import org.bukkit.ChunkSnapshot; import org.bukkit.World; @@ -38,15 +38,15 @@ import org.bukkit.persistence.PersistentDataContainer; import org.bukkit.plugin.Plugin; public class CraftChunk implements Chunk { - private WeakReference weakChunk; + private WeakReference weakChunk; private final WorldServer worldServer; private final int x; private final int z; private static final DataPaletteBlock emptyBlockIDs = new ChunkSection(0).getBlocks(); private static final byte[] emptyLight = new byte[2048]; - public CraftChunk(net.minecraft.server.Chunk chunk) { - this.weakChunk = new WeakReference(chunk); + public CraftChunk(net.minecraft.world.level.chunk.Chunk chunk) { + this.weakChunk = new WeakReference(chunk); worldServer = (WorldServer) getHandle().world; x = getHandle().getPos().x; @@ -62,13 +62,13 @@ public class CraftChunk implements Chunk { return (CraftWorld) getWorld(); } - public net.minecraft.server.Chunk getHandle() { - net.minecraft.server.Chunk c = weakChunk.get(); + public net.minecraft.world.level.chunk.Chunk getHandle() { + net.minecraft.world.level.chunk.Chunk c = weakChunk.get(); if (c == null) { c = worldServer.getChunkAt(x, z); - weakChunk = new WeakReference(c); + weakChunk = new WeakReference(c); } return c; @@ -106,7 +106,7 @@ public class CraftChunk implements Chunk { getWorld().getChunkAt(x, z); // Transient load for this tick } int count = 0, index = 0; - net.minecraft.server.Chunk chunk = getHandle(); + net.minecraft.world.level.chunk.Chunk chunk = getHandle(); for (int i = 0; i < 16; i++) { count += chunk.entitySlices[i].size(); @@ -117,11 +117,11 @@ public class CraftChunk implements Chunk { for (int i = 0; i < 16; i++) { for (Object obj : chunk.entitySlices[i].toArray()) { - if (!(obj instanceof net.minecraft.server.Entity)) { + if (!(obj instanceof net.minecraft.world.entity.Entity)) { continue; } - entities[index++] = ((net.minecraft.server.Entity) obj).getBukkitEntity(); + entities[index++] = ((net.minecraft.world.entity.Entity) obj).getBukkitEntity(); } } @@ -134,7 +134,7 @@ public class CraftChunk implements Chunk { getWorld().getChunkAt(x, z); // Transient load for this tick } int index = 0; - net.minecraft.server.Chunk chunk = getHandle(); + net.minecraft.world.level.chunk.Chunk chunk = getHandle(); BlockState[] entities = new BlockState[chunk.tileEntities.size()]; @@ -239,7 +239,7 @@ public class CraftChunk implements Chunk { @Override public ChunkSnapshot getChunkSnapshot(boolean includeMaxBlockY, boolean includeBiome, boolean includeBiomeTempRain) { - net.minecraft.server.Chunk chunk = getHandle(); + net.minecraft.world.level.chunk.Chunk chunk = getHandle(); ChunkSection[] cs = chunk.getSections(); DataPaletteBlock[] sectionBlockIDs = new DataPaletteBlock[cs.length]; @@ -257,7 +257,7 @@ public class CraftChunk implements Chunk { NBTTagCompound data = new NBTTagCompound(); cs[i].getBlocks().a(data, "Palette", "BlockStates"); - DataPaletteBlock blockids = new DataPaletteBlock<>(ChunkSection.GLOBAL_PALETTE, net.minecraft.server.Block.REGISTRY_ID, GameProfileSerializer::c, GameProfileSerializer::a, Blocks.AIR.getBlockData()); // TODO: snapshot whole ChunkSection + DataPaletteBlock blockids = new DataPaletteBlock<>(ChunkSection.GLOBAL_PALETTE, net.minecraft.world.level.block.Block.REGISTRY_ID, GameProfileSerializer::c, GameProfileSerializer::a, Blocks.AIR.getBlockData()); // TODO: snapshot whole ChunkSection blockids.a(data.getList("Palette", CraftMagicNumbers.NBT.TAG_COMPOUND), data.getLongArray("BlockStates")); sectionBlockIDs[i] = blockids; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java b/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java index 6cd662c91..aa20cecc9 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java @@ -3,13 +3,13 @@ package org.bukkit.craftbukkit; import com.google.common.base.Preconditions; import com.google.common.base.Predicates; import java.util.function.Predicate; -import net.minecraft.server.BiomeBase; -import net.minecraft.server.BiomeStorage; -import net.minecraft.server.BlockPosition; -import net.minecraft.server.DataPaletteBlock; -import net.minecraft.server.HeightMap; -import net.minecraft.server.IBlockData; -import net.minecraft.server.IRegistry; +import net.minecraft.core.BlockPosition; +import net.minecraft.core.IRegistry; +import net.minecraft.world.level.biome.BiomeBase; +import net.minecraft.world.level.block.state.IBlockData; +import net.minecraft.world.level.chunk.BiomeStorage; +import net.minecraft.world.level.chunk.DataPaletteBlock; +import net.minecraft.world.level.levelgen.HeightMap; import org.bukkit.ChunkSnapshot; import org.bukkit.Material; import org.bukkit.block.Biome; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftCrashReport.java b/src/main/java/org/bukkit/craftbukkit/CraftCrashReport.java index 7511e3813..e50731723 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftCrashReport.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftCrashReport.java @@ -5,7 +5,7 @@ import java.io.StringWriter; import java.util.Arrays; import java.util.Collection; import java.util.Map; -import net.minecraft.server.CrashReportCallable; +import net.minecraft.CrashReportCallable; import net.minecraft.server.MinecraftServer; import org.bukkit.Bukkit; import org.bukkit.Chunk; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftEffect.java b/src/main/java/org/bukkit/craftbukkit/CraftEffect.java index 6ee949be6..5da619366 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftEffect.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftEffect.java @@ -1,7 +1,7 @@ package org.bukkit.craftbukkit; -import net.minecraft.server.Block; -import net.minecraft.server.Item; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.block.Block; import org.apache.commons.lang.Validate; import org.bukkit.Color; import org.bukkit.Effect; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftEquipmentSlot.java b/src/main/java/org/bukkit/craftbukkit/CraftEquipmentSlot.java index 339ae6b74..bb5a39362 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftEquipmentSlot.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftEquipmentSlot.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit; -import net.minecraft.server.EnumItemSlot; +import net.minecraft.world.entity.EnumItemSlot; import org.bukkit.inventory.EquipmentSlot; public class CraftEquipmentSlot { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftFluidCollisionMode.java b/src/main/java/org/bukkit/craftbukkit/CraftFluidCollisionMode.java index f403b33ba..1991614da 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftFluidCollisionMode.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftFluidCollisionMode.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit; -import net.minecraft.server.RayTrace.FluidCollisionOption; +import net.minecraft.world.level.RayTrace.FluidCollisionOption; import org.bukkit.FluidCollisionMode; public final class CraftFluidCollisionMode { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftHeightMap.java b/src/main/java/org/bukkit/craftbukkit/CraftHeightMap.java index 1c4a91157..55ec590f4 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftHeightMap.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftHeightMap.java @@ -7,26 +7,26 @@ final class CraftHeightMap { private CraftHeightMap() { } - public static net.minecraft.server.HeightMap.Type toNMS(HeightMap bukkitHeightMap) { + public static net.minecraft.world.level.levelgen.HeightMap.Type toNMS(HeightMap bukkitHeightMap) { switch (bukkitHeightMap) { case MOTION_BLOCKING_NO_LEAVES: - return net.minecraft.server.HeightMap.Type.MOTION_BLOCKING_NO_LEAVES; + return net.minecraft.world.level.levelgen.HeightMap.Type.MOTION_BLOCKING_NO_LEAVES; case OCEAN_FLOOR: - return net.minecraft.server.HeightMap.Type.OCEAN_FLOOR; + return net.minecraft.world.level.levelgen.HeightMap.Type.OCEAN_FLOOR; case OCEAN_FLOOR_WG: - return net.minecraft.server.HeightMap.Type.OCEAN_FLOOR_WG; + return net.minecraft.world.level.levelgen.HeightMap.Type.OCEAN_FLOOR_WG; case WORLD_SURFACE: - return net.minecraft.server.HeightMap.Type.WORLD_SURFACE; + return net.minecraft.world.level.levelgen.HeightMap.Type.WORLD_SURFACE; case WORLD_SURFACE_WG: - return net.minecraft.server.HeightMap.Type.WORLD_SURFACE_WG; + return net.minecraft.world.level.levelgen.HeightMap.Type.WORLD_SURFACE_WG; case MOTION_BLOCKING: - return net.minecraft.server.HeightMap.Type.MOTION_BLOCKING; + return net.minecraft.world.level.levelgen.HeightMap.Type.MOTION_BLOCKING; default: - throw new EnumConstantNotPresentException(net.minecraft.server.HeightMap.Type.class, bukkitHeightMap.name()); + throw new EnumConstantNotPresentException(net.minecraft.world.level.levelgen.HeightMap.Type.class, bukkitHeightMap.name()); } } - public static HeightMap fromNMS(net.minecraft.server.HeightMap.Type nmsHeightMapType) { + public static HeightMap fromNMS(net.minecraft.world.level.levelgen.HeightMap.Type nmsHeightMapType) { switch (nmsHeightMapType) { case WORLD_SURFACE_WG: return HeightMap.WORLD_SURFACE_WG; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftIpBanEntry.java b/src/main/java/org/bukkit/craftbukkit/CraftIpBanEntry.java index 372404cd1..e2f3f8ec9 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftIpBanEntry.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftIpBanEntry.java @@ -3,8 +3,8 @@ package org.bukkit.craftbukkit; import java.io.IOException; import java.util.Date; import java.util.logging.Level; -import net.minecraft.server.IpBanEntry; -import net.minecraft.server.IpBanList; +import net.minecraft.server.players.IpBanEntry; +import net.minecraft.server.players.IpBanList; import org.bukkit.Bukkit; public final class CraftIpBanEntry implements org.bukkit.BanEntry { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftIpBanList.java b/src/main/java/org/bukkit/craftbukkit/CraftIpBanList.java index 101a32555..594b6da34 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftIpBanList.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftIpBanList.java @@ -6,8 +6,8 @@ import java.net.InetSocketAddress; import java.util.Date; import java.util.Set; import java.util.logging.Level; -import net.minecraft.server.IpBanEntry; -import net.minecraft.server.IpBanList; +import net.minecraft.server.players.IpBanEntry; +import net.minecraft.server.players.IpBanList; import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.Validate; import org.bukkit.Bukkit; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftLootTable.java b/src/main/java/org/bukkit/craftbukkit/CraftLootTable.java index bf6fe7783..14fa2a434 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftLootTable.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftLootTable.java @@ -4,17 +4,17 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Random; -import net.minecraft.server.DamageSource; -import net.minecraft.server.Entity; -import net.minecraft.server.EntityHuman; -import net.minecraft.server.IInventory; -import net.minecraft.server.LootContextParameter; -import net.minecraft.server.LootContextParameterSet; -import net.minecraft.server.LootContextParameters; -import net.minecraft.server.LootTable; -import net.minecraft.server.LootTableInfo; -import net.minecraft.server.Vec3D; -import net.minecraft.server.WorldServer; +import net.minecraft.server.level.WorldServer; +import net.minecraft.world.IInventory; +import net.minecraft.world.damagesource.DamageSource; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.player.EntityHuman; +import net.minecraft.world.level.storage.loot.LootTable; +import net.minecraft.world.level.storage.loot.LootTableInfo; +import net.minecraft.world.level.storage.loot.parameters.LootContextParameter; +import net.minecraft.world.level.storage.loot.parameters.LootContextParameterSet; +import net.minecraft.world.level.storage.loot.parameters.LootContextParameters; +import net.minecraft.world.phys.Vec3D; import org.bukkit.Location; import org.bukkit.NamespacedKey; import org.bukkit.craftbukkit.entity.CraftEntity; @@ -42,10 +42,10 @@ public class CraftLootTable implements org.bukkit.loot.LootTable { @Override public Collection populateLoot(Random random, LootContext context) { LootTableInfo nmsContext = convertContext(context); - List nmsItems = handle.populateLoot(nmsContext); + List nmsItems = handle.populateLoot(nmsContext); Collection bukkit = new ArrayList<>(nmsItems.size()); - for (net.minecraft.server.ItemStack item : nmsItems) { + for (net.minecraft.world.item.ItemStack item : nmsItems) { if (item.isEmpty()) { continue; } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java index 00333548b..9b8d7b176 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java @@ -6,10 +6,10 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.UUID; -import net.minecraft.server.NBTTagCompound; -import net.minecraft.server.ServerStatisticManager; -import net.minecraft.server.WhiteListEntry; -import net.minecraft.server.WorldNBTStorage; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.server.players.WhiteListEntry; +import net.minecraft.stats.ServerStatisticManager; +import net.minecraft.world.level.storage.WorldNBTStorage; import org.bukkit.BanList; import org.bukkit.Bukkit; import org.bukkit.Location; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftParticle.java b/src/main/java/org/bukkit/craftbukkit/CraftParticle.java index 54800bbed..daa23a57a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftParticle.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftParticle.java @@ -5,13 +5,13 @@ import com.google.common.collect.BiMap; import com.google.common.collect.HashBiMap; import java.util.HashMap; import java.util.Map; -import net.minecraft.server.IRegistry; -import net.minecraft.server.MinecraftKey; -import net.minecraft.server.ParticleParam; -import net.minecraft.server.ParticleParamBlock; -import net.minecraft.server.ParticleParamItem; -import net.minecraft.server.ParticleParamRedstone; -import net.minecraft.server.ParticleType; +import net.minecraft.core.IRegistry; +import net.minecraft.core.particles.ParticleParam; +import net.minecraft.core.particles.ParticleParamBlock; +import net.minecraft.core.particles.ParticleParamItem; +import net.minecraft.core.particles.ParticleParamRedstone; +import net.minecraft.core.particles.ParticleType; +import net.minecraft.resources.MinecraftKey; import org.bukkit.Color; import org.bukkit.Particle; import org.bukkit.block.data.BlockData; @@ -137,7 +137,7 @@ public enum CraftParticle { canonical = aliases.get(particle); } - net.minecraft.server.Particle nms = IRegistry.PARTICLE_TYPE.get(particles.get(canonical)); + net.minecraft.core.particles.Particle nms = IRegistry.PARTICLE_TYPE.get(particles.get(canonical)); Preconditions.checkArgument(nms != null, "No NMS particle %s", particle); if (particle.getDataType().equals(Void.class)) { @@ -146,15 +146,15 @@ public enum CraftParticle { Preconditions.checkArgument(obj != null, "Particle %s requires data, null provided", particle); if (particle.getDataType().equals(ItemStack.class)) { ItemStack itemStack = (ItemStack) obj; - return new ParticleParamItem((net.minecraft.server.Particle) nms, CraftItemStack.asNMSCopy(itemStack)); + return new ParticleParamItem((net.minecraft.core.particles.Particle) nms, CraftItemStack.asNMSCopy(itemStack)); } if (particle.getDataType() == MaterialData.class) { MaterialData data = (MaterialData) obj; - return new ParticleParamBlock((net.minecraft.server.Particle) nms, CraftMagicNumbers.getBlock(data)); + return new ParticleParamBlock((net.minecraft.core.particles.Particle) nms, CraftMagicNumbers.getBlock(data)); } if (particle.getDataType() == BlockData.class) { BlockData data = (BlockData) obj; - return new ParticleParamBlock((net.minecraft.server.Particle) nms, ((CraftBlockData) data).getState()); + return new ParticleParamBlock((net.minecraft.core.particles.Particle) nms, ((CraftBlockData) data).getState()); } if (particle.getDataType() == Particle.DustOptions.class) { Particle.DustOptions data = (Particle.DustOptions) obj; @@ -164,11 +164,11 @@ public enum CraftParticle { throw new IllegalArgumentException(particle.getDataType().toString()); } - public static Particle toBukkit(net.minecraft.server.ParticleParam nms) { + public static Particle toBukkit(net.minecraft.core.particles.ParticleParam nms) { return toBukkit(nms.getParticle()); } - public static Particle toBukkit(net.minecraft.server.Particle nms) { + public static Particle toBukkit(net.minecraft.core.particles.Particle nms) { return particles.inverse().get(IRegistry.PARTICLE_TYPE.getKey(nms)); } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftProfileBanEntry.java b/src/main/java/org/bukkit/craftbukkit/CraftProfileBanEntry.java index bbe91bca1..37b487bd9 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftProfileBanEntry.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftProfileBanEntry.java @@ -4,8 +4,8 @@ import com.mojang.authlib.GameProfile; import java.io.IOException; import java.util.Date; import java.util.logging.Level; -import net.minecraft.server.GameProfileBanEntry; -import net.minecraft.server.GameProfileBanList; +import net.minecraft.server.players.GameProfileBanEntry; +import net.minecraft.server.players.GameProfileBanList; import org.bukkit.Bukkit; public final class CraftProfileBanEntry implements org.bukkit.BanEntry { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftProfileBanList.java b/src/main/java/org/bukkit/craftbukkit/CraftProfileBanList.java index 492a5bad8..b6143d474 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftProfileBanList.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftProfileBanList.java @@ -7,10 +7,10 @@ import java.util.Date; import java.util.Set; import java.util.UUID; import java.util.logging.Level; -import net.minecraft.server.GameProfileBanEntry; -import net.minecraft.server.GameProfileBanList; -import net.minecraft.server.JsonListEntry; import net.minecraft.server.MinecraftServer; +import net.minecraft.server.players.GameProfileBanEntry; +import net.minecraft.server.players.GameProfileBanList; +import net.minecraft.server.players.JsonListEntry; import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.Validate; import org.bukkit.Bukkit; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRaid.java b/src/main/java/org/bukkit/craftbukkit/CraftRaid.java index c14825e65..aa405523d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftRaid.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftRaid.java @@ -7,9 +7,9 @@ import java.util.List; import java.util.Set; import java.util.UUID; import java.util.function.Function; -import net.minecraft.server.BlockPosition; -import net.minecraft.server.EntityRaider; -import net.minecraft.server.World; +import net.minecraft.core.BlockPosition; +import net.minecraft.world.entity.raid.EntityRaider; +import net.minecraft.world.level.World; import org.bukkit.Location; import org.bukkit.Raid; import org.bukkit.Raid.RaidStatus; @@ -17,9 +17,9 @@ import org.bukkit.entity.Raider; public final class CraftRaid implements Raid { - private final net.minecraft.server.Raid handle; + private final net.minecraft.world.entity.raid.Raid handle; - public CraftRaid(net.minecraft.server.Raid handle) { + public CraftRaid(net.minecraft.world.entity.raid.Raid handle) { this.handle = handle; } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java index c732c4e8e..985b7115f 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -47,62 +47,62 @@ import java.util.logging.Level; import java.util.logging.Logger; import javax.imageio.ImageIO; import jline.console.ConsoleReader; -import net.minecraft.server.Advancement; -import net.minecraft.server.ArgumentEntity; -import net.minecraft.server.BiomeManager; -import net.minecraft.server.Block; -import net.minecraft.server.BlockPosition; -import net.minecraft.server.BossBattleCustom; -import net.minecraft.server.CommandDispatcher; -import net.minecraft.server.CommandListenerWrapper; -import net.minecraft.server.CommandReload; -import net.minecraft.server.Convertable; -import net.minecraft.server.DataConverterRegistry; -import net.minecraft.server.DedicatedPlayerList; -import net.minecraft.server.DedicatedServer; -import net.minecraft.server.DedicatedServerProperties; -import net.minecraft.server.DedicatedServerSettings; -import net.minecraft.server.DimensionManager; -import net.minecraft.server.DynamicOpsNBT; -import net.minecraft.server.Enchantments; -import net.minecraft.server.EntityPlayer; -import net.minecraft.server.EnumDifficulty; -import net.minecraft.server.EnumGamemode; -import net.minecraft.server.FluidType; -import net.minecraft.server.GameRules; -import net.minecraft.server.GeneratorSettings; -import net.minecraft.server.IRecipe; -import net.minecraft.server.IRegistry; -import net.minecraft.server.Item; -import net.minecraft.server.ItemWorldMap; -import net.minecraft.server.Items; -import net.minecraft.server.JsonListEntry; -import net.minecraft.server.LootTableRegistry; -import net.minecraft.server.MapIcon; -import net.minecraft.server.MinecraftKey; +import net.minecraft.advancements.Advancement; +import net.minecraft.commands.CommandDispatcher; +import net.minecraft.commands.CommandListenerWrapper; +import net.minecraft.commands.arguments.ArgumentEntity; +import net.minecraft.core.BlockPosition; +import net.minecraft.core.IRegistry; +import net.minecraft.core.RegistryMaterials; +import net.minecraft.nbt.DynamicOpsNBT; +import net.minecraft.nbt.NBTBase; +import net.minecraft.resources.MinecraftKey; +import net.minecraft.resources.RegistryReadOps; +import net.minecraft.resources.ResourceKey; import net.minecraft.server.MinecraftServer; -import net.minecraft.server.MobEffects; -import net.minecraft.server.MobSpawner; -import net.minecraft.server.MobSpawnerCat; -import net.minecraft.server.MobSpawnerPatrol; -import net.minecraft.server.MobSpawnerPhantom; -import net.minecraft.server.MobSpawnerTrader; -import net.minecraft.server.NBTBase; -import net.minecraft.server.PlayerList; -import net.minecraft.server.RegistryMaterials; -import net.minecraft.server.RegistryReadOps; -import net.minecraft.server.ResourceKey; import net.minecraft.server.ServerCommand; -import net.minecraft.server.Tags; -import net.minecraft.server.TicketType; -import net.minecraft.server.Vec3D; -import net.minecraft.server.VillageSiege; -import net.minecraft.server.WorldDataServer; -import net.minecraft.server.WorldDimension; -import net.minecraft.server.WorldMap; -import net.minecraft.server.WorldNBTStorage; -import net.minecraft.server.WorldServer; -import net.minecraft.server.WorldSettings; +import net.minecraft.server.bossevents.BossBattleCustom; +import net.minecraft.server.commands.CommandReload; +import net.minecraft.server.dedicated.DedicatedPlayerList; +import net.minecraft.server.dedicated.DedicatedServer; +import net.minecraft.server.dedicated.DedicatedServerProperties; +import net.minecraft.server.dedicated.DedicatedServerSettings; +import net.minecraft.server.level.EntityPlayer; +import net.minecraft.server.level.TicketType; +import net.minecraft.server.level.WorldServer; +import net.minecraft.server.players.JsonListEntry; +import net.minecraft.server.players.PlayerList; +import net.minecraft.tags.Tags; +import net.minecraft.util.datafix.DataConverterRegistry; +import net.minecraft.world.EnumDifficulty; +import net.minecraft.world.effect.MobEffects; +import net.minecraft.world.entity.ai.village.VillageSiege; +import net.minecraft.world.entity.npc.MobSpawnerCat; +import net.minecraft.world.entity.npc.MobSpawnerTrader; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemWorldMap; +import net.minecraft.world.item.Items; +import net.minecraft.world.item.crafting.IRecipe; +import net.minecraft.world.item.enchantment.Enchantments; +import net.minecraft.world.level.EnumGamemode; +import net.minecraft.world.level.GameRules; +import net.minecraft.world.level.MobSpawner; +import net.minecraft.world.level.WorldSettings; +import net.minecraft.world.level.biome.BiomeManager; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.dimension.DimensionManager; +import net.minecraft.world.level.dimension.WorldDimension; +import net.minecraft.world.level.levelgen.GeneratorSettings; +import net.minecraft.world.level.levelgen.MobSpawnerPatrol; +import net.minecraft.world.level.levelgen.MobSpawnerPhantom; +import net.minecraft.world.level.material.FluidType; +import net.minecraft.world.level.saveddata.maps.MapIcon; +import net.minecraft.world.level.saveddata.maps.WorldMap; +import net.minecraft.world.level.storage.Convertable; +import net.minecraft.world.level.storage.WorldDataServer; +import net.minecraft.world.level.storage.WorldNBTStorage; +import net.minecraft.world.level.storage.loot.LootTableRegistry; +import net.minecraft.world.phys.Vec3D; import org.apache.commons.lang.Validate; import org.bukkit.BanList; import org.bukkit.Bukkit; @@ -1021,7 +1021,7 @@ public final class CraftServer implements Server { RegistryMaterials registrymaterials = worlddata.getGeneratorSettings().d(); WorldDimension worlddimension = (WorldDimension) registrymaterials.a(actualDimension); DimensionManager dimensionmanager; - net.minecraft.server.ChunkGenerator chunkgenerator; + net.minecraft.world.level.chunk.ChunkGenerator chunkgenerator; if (worlddimension == null) { dimensionmanager = (DimensionManager) console.customRegistry.a().d(DimensionManager.OVERWORLD); @@ -1031,7 +1031,7 @@ public final class CraftServer implements Server { chunkgenerator = worlddimension.c(); } - ResourceKey worldKey = ResourceKey.a(IRegistry.L, new MinecraftKey(name.toLowerCase(java.util.Locale.ENGLISH))); + ResourceKey worldKey = ResourceKey.a(IRegistry.L, new MinecraftKey(name.toLowerCase(java.util.Locale.ENGLISH))); WorldServer internal = (WorldServer) new WorldServer(console, console.executorService, worldSession, worlddata, worldKey, dimensionmanager, getServer().worldLoadListenerFactory.create(11), chunkgenerator, worlddata.getGeneratorSettings().isDebugWorld(), j, creator.environment() == Environment.NORMAL ? list : ImmutableList.of(), true, creator.environment(), generator); @@ -1070,7 +1070,7 @@ public final class CraftServer implements Server { return false; } - if (handle.getDimensionKey() == net.minecraft.server.World.OVERWORLD) { + if (handle.getDimensionKey() == net.minecraft.world.level.World.OVERWORLD) { return false; } @@ -1345,7 +1345,7 @@ public final class CraftServer implements Server { @Override @Deprecated public CraftMapView getMap(int id) { - WorldMap worldmap = console.getWorldServer(net.minecraft.server.World.OVERWORLD).a("map_" + id); + WorldMap worldmap = console.getWorldServer(net.minecraft.world.level.World.OVERWORLD).a("map_" + id); if (worldmap == null) { return null; } @@ -1356,7 +1356,7 @@ public final class CraftServer implements Server { public CraftMapView createMap(World world) { Validate.notNull(world, "World cannot be null"); - net.minecraft.server.ItemStack stack = new net.minecraft.server.ItemStack(Items.MAP, 1); + net.minecraft.world.item.ItemStack stack = new net.minecraft.world.item.ItemStack(Items.MAP, 1); WorldMap worldmap = ItemWorldMap.getSavedMap(stack, ((CraftWorld) world).getHandle()); return worldmap.mapView; } @@ -1377,7 +1377,7 @@ public final class CraftServer implements Server { BlockPosition structurePosition = new BlockPosition(structureLocation.getBlockX(), structureLocation.getBlockY(), structureLocation.getBlockZ()); // Create map with trackPlayer = true, unlimitedTracking = true - net.minecraft.server.ItemStack stack = ItemWorldMap.createFilledMapView(worldServer, structurePosition.getX(), structurePosition.getZ(), MapView.Scale.NORMAL.getValue(), true, true); + net.minecraft.world.item.ItemStack stack = ItemWorldMap.createFilledMapView(worldServer, structurePosition.getX(), structurePosition.getZ(), MapView.Scale.NORMAL.getValue(), true, true); ItemWorldMap.applySepiaFilter(worldServer, stack); // "+" map ID taken from EntityVillager ItemWorldMap.getSavedMap(stack, worldServer).decorateMap(stack, structurePosition, "+", MapIcon.Type.a(structureType.getMapIcon().getValue())); @@ -1542,7 +1542,7 @@ public final class CraftServer implements Server { @Override public GameMode getDefaultGameMode() { - return GameMode.getByValue(console.getWorldServer(net.minecraft.server.World.OVERWORLD).worldDataServer.getGameType().getId()); + return GameMode.getByValue(console.getWorldServer(net.minecraft.world.level.World.OVERWORLD).worldDataServer.getGameType().getId()); } @Override @@ -1573,7 +1573,7 @@ public final class CraftServer implements Server { @Override public File getWorldContainer() { - return this.getServer().convertable.a(net.minecraft.server.World.OVERWORLD).getParentFile(); + return this.getServer().convertable.a(net.minecraft.world.level.World.OVERWORLD).getParentFile(); } @Override @@ -1862,7 +1862,7 @@ public final class CraftServer implements Server { @Override public KeyedBossBar getBossBar(NamespacedKey key) { Preconditions.checkArgument(key != null, "key"); - net.minecraft.server.BossBattleCustom bossBattleCustom = getServer().getBossBattleCustomData().a(CraftNamespacedKey.toMinecraft(key)); + net.minecraft.server.bossevents.BossBattleCustom bossBattleCustom = getServer().getBossBattleCustomData().a(CraftNamespacedKey.toMinecraft(key)); return (bossBattleCustom == null) ? null : bossBattleCustom.getBukkitEntity(); } @@ -1870,8 +1870,8 @@ public final class CraftServer implements Server { @Override public boolean removeBossBar(NamespacedKey key) { Preconditions.checkArgument(key != null, "key"); - net.minecraft.server.BossBattleCustomData bossBattleCustomData = getServer().getBossBattleCustomData(); - net.minecraft.server.BossBattleCustom bossBattleCustom = bossBattleCustomData.a(CraftNamespacedKey.toMinecraft(key)); + net.minecraft.server.bossevents.BossBattleCustomData bossBattleCustomData = getServer().getBossBattleCustomData(); + net.minecraft.server.bossevents.BossBattleCustom bossBattleCustom = bossBattleCustomData.a(CraftNamespacedKey.toMinecraft(key)); if (bossBattleCustom != null) { bossBattleCustomData.remove(bossBattleCustom); @@ -1886,7 +1886,7 @@ public final class CraftServer implements Server { Validate.notNull(uuid, "UUID cannot be null"); for (WorldServer world : getServer().getWorlds()) { - net.minecraft.server.Entity entity = world.getEntity(uuid); + net.minecraft.world.entity.Entity entity = world.getEntity(uuid); if (entity != null) { return entity.getBukkitEntity(); } @@ -2006,7 +2006,7 @@ public final class CraftServer implements Server { Preconditions.checkArgument(sender != null, "Sender cannot be null"); ArgumentEntity arg = ArgumentEntity.multipleEntities(); - List nms; + List nms; try { StringReader reader = new StringReader(selector); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftSound.java b/src/main/java/org/bukkit/craftbukkit/CraftSound.java index a7137123f..e839d50c7 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftSound.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftSound.java @@ -1,9 +1,9 @@ package org.bukkit.craftbukkit; import com.google.common.base.Preconditions; -import net.minecraft.server.IRegistry; -import net.minecraft.server.MinecraftKey; -import net.minecraft.server.SoundEffect; +import net.minecraft.core.IRegistry; +import net.minecraft.resources.MinecraftKey; +import net.minecraft.sounds.SoundEffect; import org.bukkit.Registry; import org.bukkit.Sound; import org.bukkit.craftbukkit.util.CraftNamespacedKey; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftSoundGroup.java b/src/main/java/org/bukkit/craftbukkit/CraftSoundGroup.java index c9f7ba1d5..8fe42fb33 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftSoundGroup.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftSoundGroup.java @@ -1,24 +1,24 @@ package org.bukkit.craftbukkit; import java.util.HashMap; -import net.minecraft.server.SoundEffectType; +import net.minecraft.world.level.block.SoundEffectType; import org.bukkit.Sound; import org.bukkit.SoundGroup; public class CraftSoundGroup implements SoundGroup { - private final net.minecraft.server.SoundEffectType handle; + private final net.minecraft.world.level.block.SoundEffectType handle; private static final HashMap SOUND_GROUPS = new HashMap<>(); public static SoundGroup getSoundGroup(SoundEffectType soundEffectType) { return SOUND_GROUPS.computeIfAbsent(soundEffectType, CraftSoundGroup::new); } - private CraftSoundGroup(net.minecraft.server.SoundEffectType soundEffectType) { + private CraftSoundGroup(net.minecraft.world.level.block.SoundEffectType soundEffectType) { this.handle = soundEffectType; } - public net.minecraft.server.SoundEffectType getHandle() { + public net.minecraft.world.level.block.SoundEffectType getHandle() { return handle; } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftStatistic.java b/src/main/java/org/bukkit/craftbukkit/CraftStatistic.java index 2758eee2b..43420fc6b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftStatistic.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftStatistic.java @@ -3,13 +3,13 @@ package org.bukkit.craftbukkit; import com.google.common.base.Preconditions; import com.google.common.collect.BiMap; import com.google.common.collect.ImmutableBiMap; -import net.minecraft.server.Block; -import net.minecraft.server.EntityTypes; -import net.minecraft.server.IRegistry; -import net.minecraft.server.Item; -import net.minecraft.server.MinecraftKey; -import net.minecraft.server.ServerStatisticManager; -import net.minecraft.server.StatisticList; +import net.minecraft.core.IRegistry; +import net.minecraft.resources.MinecraftKey; +import net.minecraft.stats.ServerStatisticManager; +import net.minecraft.stats.StatisticList; +import net.minecraft.world.entity.EntityTypes; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.block.Block; import org.apache.commons.lang.Validate; import org.bukkit.Material; import org.bukkit.Statistic; @@ -120,7 +120,7 @@ public enum CraftStatistic { Preconditions.checkState(bukkit != null, "Bukkit statistic %s does not exist", this.name()); } - public static org.bukkit.Statistic getBukkitStatistic(net.minecraft.server.Statistic statistic) { + public static org.bukkit.Statistic getBukkitStatistic(net.minecraft.stats.Statistic statistic) { IRegistry statRegistry = statistic.getWrapper().getRegistry(); MinecraftKey nmsKey = IRegistry.STATS.getKey(statistic.getWrapper()); @@ -131,16 +131,16 @@ public enum CraftStatistic { return statistics.get(nmsKey); } - public static net.minecraft.server.Statistic getNMSStatistic(org.bukkit.Statistic bukkit) { + public static net.minecraft.stats.Statistic getNMSStatistic(org.bukkit.Statistic bukkit) { Preconditions.checkArgument(bukkit.getType() == Statistic.Type.UNTYPED, "This method only accepts untyped statistics"); - net.minecraft.server.Statistic nms = StatisticList.CUSTOM.b(statistics.inverse().get(bukkit)); + net.minecraft.stats.Statistic nms = StatisticList.CUSTOM.b(statistics.inverse().get(bukkit)); Preconditions.checkArgument(nms != null, "NMS Statistic %s does not exist", bukkit); return nms; } - public static net.minecraft.server.Statistic getMaterialStatistic(org.bukkit.Statistic stat, Material material) { + public static net.minecraft.stats.Statistic getMaterialStatistic(org.bukkit.Statistic stat, Material material) { try { if (stat == Statistic.MINE_BLOCK) { return StatisticList.BLOCK_MINED.b(CraftMagicNumbers.getBlock(material)); @@ -166,26 +166,26 @@ public enum CraftStatistic { return null; } - public static net.minecraft.server.Statistic getEntityStatistic(org.bukkit.Statistic stat, EntityType entity) { + public static net.minecraft.stats.Statistic getEntityStatistic(org.bukkit.Statistic stat, EntityType entity) { if (entity.getName() != null) { EntityTypes nmsEntity = IRegistry.ENTITY_TYPE.get(new MinecraftKey(entity.getName())); if (stat == org.bukkit.Statistic.KILL_ENTITY) { - return net.minecraft.server.StatisticList.ENTITY_KILLED.b(nmsEntity); + return net.minecraft.stats.StatisticList.ENTITY_KILLED.b(nmsEntity); } if (stat == org.bukkit.Statistic.ENTITY_KILLED_BY) { - return net.minecraft.server.StatisticList.ENTITY_KILLED_BY.b(nmsEntity); + return net.minecraft.stats.StatisticList.ENTITY_KILLED_BY.b(nmsEntity); } } return null; } - public static EntityType getEntityTypeFromStatistic(net.minecraft.server.Statistic> statistic) { + public static EntityType getEntityTypeFromStatistic(net.minecraft.stats.Statistic> statistic) { MinecraftKey name = EntityTypes.getName(statistic.b()); return EntityType.fromName(name.getKey()); } - public static Material getMaterialFromStatistic(net.minecraft.server.Statistic statistic) { + public static Material getMaterialFromStatistic(net.minecraft.stats.Statistic statistic) { if (statistic.b() instanceof Item) { return CraftMagicNumbers.getMaterial((Item) statistic.b()); } @@ -223,7 +223,7 @@ public enum CraftStatistic { Validate.notNull(statistic, "Statistic cannot be null"); Validate.isTrue(statistic.getType() == Type.UNTYPED, "Must supply additional paramater for this statistic"); Validate.isTrue(newValue >= 0, "Value must be greater than or equal to 0"); - net.minecraft.server.Statistic nmsStatistic = CraftStatistic.getNMSStatistic(statistic); + net.minecraft.stats.Statistic nmsStatistic = CraftStatistic.getNMSStatistic(statistic); manager.setStatistic(null, nmsStatistic, newValue);; } @@ -239,7 +239,7 @@ public enum CraftStatistic { Validate.notNull(statistic, "Statistic cannot be null"); Validate.notNull(material, "Material cannot be null"); Validate.isTrue(statistic.getType() == Type.BLOCK || statistic.getType() == Type.ITEM, "This statistic does not take a Material parameter"); - net.minecraft.server.Statistic nmsStatistic = CraftStatistic.getMaterialStatistic(statistic, material); + net.minecraft.stats.Statistic nmsStatistic = CraftStatistic.getMaterialStatistic(statistic, material); Validate.notNull(nmsStatistic, "The supplied Material does not have a corresponding statistic"); return manager.getStatisticValue(nmsStatistic); } @@ -259,7 +259,7 @@ public enum CraftStatistic { Validate.notNull(material, "Material cannot be null"); Validate.isTrue(newValue >= 0, "Value must be greater than or equal to 0"); Validate.isTrue(statistic.getType() == Type.BLOCK || statistic.getType() == Type.ITEM, "This statistic does not take a Material parameter"); - net.minecraft.server.Statistic nmsStatistic = CraftStatistic.getMaterialStatistic(statistic, material); + net.minecraft.stats.Statistic nmsStatistic = CraftStatistic.getMaterialStatistic(statistic, material); Validate.notNull(nmsStatistic, "The supplied Material does not have a corresponding statistic"); manager.setStatistic(null, nmsStatistic, newValue); } @@ -276,7 +276,7 @@ public enum CraftStatistic { Validate.notNull(statistic, "Statistic cannot be null"); Validate.notNull(entityType, "EntityType cannot be null"); Validate.isTrue(statistic.getType() == Type.ENTITY, "This statistic does not take an EntityType parameter"); - net.minecraft.server.Statistic nmsStatistic = CraftStatistic.getEntityStatistic(statistic, entityType); + net.minecraft.stats.Statistic nmsStatistic = CraftStatistic.getEntityStatistic(statistic, entityType); Validate.notNull(nmsStatistic, "The supplied EntityType does not have a corresponding statistic"); return manager.getStatisticValue(nmsStatistic); } @@ -296,7 +296,7 @@ public enum CraftStatistic { Validate.notNull(entityType, "EntityType cannot be null"); Validate.isTrue(newValue >= 0, "Value must be greater than or equal to 0"); Validate.isTrue(statistic.getType() == Type.ENTITY, "This statistic does not take an EntityType parameter"); - net.minecraft.server.Statistic nmsStatistic = CraftStatistic.getEntityStatistic(statistic, entityType); + net.minecraft.stats.Statistic nmsStatistic = CraftStatistic.getEntityStatistic(statistic, entityType); Validate.notNull(nmsStatistic, "The supplied EntityType does not have a corresponding statistic"); manager.setStatistic(null, nmsStatistic, newValue); } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index e0b645145..97fcafb57 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -21,75 +21,75 @@ import java.util.Set; import java.util.UUID; import java.util.function.Predicate; import java.util.stream.Collectors; -import net.minecraft.server.ArraySetSorted; -import net.minecraft.server.AxisAlignedBB; -import net.minecraft.server.BiomeBase; -import net.minecraft.server.BiomeDecoratorGroups; -import net.minecraft.server.BlockChorusFlower; -import net.minecraft.server.BlockDiodeAbstract; -import net.minecraft.server.BlockPosition; -import net.minecraft.server.Blocks; -import net.minecraft.server.ChunkCoordIntPair; -import net.minecraft.server.ChunkMapDistance; -import net.minecraft.server.ChunkStatus; -import net.minecraft.server.EntityAreaEffectCloud; -import net.minecraft.server.EntityArmorStand; -import net.minecraft.server.EntityArrow; -import net.minecraft.server.EntityBoat; -import net.minecraft.server.EntityEgg; -import net.minecraft.server.EntityEnderSignal; -import net.minecraft.server.EntityEvokerFangs; -import net.minecraft.server.EntityExperienceOrb; -import net.minecraft.server.EntityFallingBlock; -import net.minecraft.server.EntityFireball; -import net.minecraft.server.EntityFireworks; -import net.minecraft.server.EntityHanging; -import net.minecraft.server.EntityHuman; -import net.minecraft.server.EntityInsentient; -import net.minecraft.server.EntityItem; -import net.minecraft.server.EntityItemFrame; -import net.minecraft.server.EntityLeash; -import net.minecraft.server.EntityLightning; -import net.minecraft.server.EntityMinecartChest; -import net.minecraft.server.EntityMinecartCommandBlock; -import net.minecraft.server.EntityMinecartFurnace; -import net.minecraft.server.EntityMinecartHopper; -import net.minecraft.server.EntityMinecartMobSpawner; -import net.minecraft.server.EntityMinecartRideable; -import net.minecraft.server.EntityMinecartTNT; -import net.minecraft.server.EntityPainting; -import net.minecraft.server.EntityPotion; -import net.minecraft.server.EntitySnowball; -import net.minecraft.server.EntityTNTPrimed; -import net.minecraft.server.EntityTippedArrow; -import net.minecraft.server.EntityTypes; -import net.minecraft.server.EntityZombie; -import net.minecraft.server.EnumDifficulty; -import net.minecraft.server.EnumDirection; -import net.minecraft.server.EnumMobSpawn; -import net.minecraft.server.Explosion; -import net.minecraft.server.GameRules; -import net.minecraft.server.GroupDataEntity; -import net.minecraft.server.IBlockData; -import net.minecraft.server.IChunkAccess; -import net.minecraft.server.IRegistry; -import net.minecraft.server.MinecraftKey; -import net.minecraft.server.MovingObjectPosition; -import net.minecraft.server.PacketPlayOutCustomSoundEffect; -import net.minecraft.server.PacketPlayOutUpdateTime; -import net.minecraft.server.PacketPlayOutWorldEvent; -import net.minecraft.server.PersistentRaid; -import net.minecraft.server.PlayerChunk; -import net.minecraft.server.ProtoChunkExtension; -import net.minecraft.server.RayTrace; -import net.minecraft.server.SavedFile; -import net.minecraft.server.SoundCategory; -import net.minecraft.server.StructureGenerator; -import net.minecraft.server.Ticket; -import net.minecraft.server.TicketType; -import net.minecraft.server.Unit; -import net.minecraft.server.Vec3D; -import net.minecraft.server.WorldServer; +import net.minecraft.core.BlockPosition; +import net.minecraft.core.EnumDirection; +import net.minecraft.core.IRegistry; +import net.minecraft.data.worldgen.BiomeDecoratorGroups; +import net.minecraft.network.protocol.game.PacketPlayOutCustomSoundEffect; +import net.minecraft.network.protocol.game.PacketPlayOutUpdateTime; +import net.minecraft.network.protocol.game.PacketPlayOutWorldEvent; +import net.minecraft.resources.MinecraftKey; +import net.minecraft.server.level.ChunkMapDistance; +import net.minecraft.server.level.PlayerChunk; +import net.minecraft.server.level.Ticket; +import net.minecraft.server.level.TicketType; +import net.minecraft.server.level.WorldServer; +import net.minecraft.sounds.SoundCategory; +import net.minecraft.util.ArraySetSorted; +import net.minecraft.util.Unit; +import net.minecraft.world.EnumDifficulty; +import net.minecraft.world.entity.EntityAreaEffectCloud; +import net.minecraft.world.entity.EntityExperienceOrb; +import net.minecraft.world.entity.EntityInsentient; +import net.minecraft.world.entity.EntityLightning; +import net.minecraft.world.entity.EntityTypes; +import net.minecraft.world.entity.EnumMobSpawn; +import net.minecraft.world.entity.GroupDataEntity; +import net.minecraft.world.entity.decoration.EntityArmorStand; +import net.minecraft.world.entity.decoration.EntityHanging; +import net.minecraft.world.entity.decoration.EntityItemFrame; +import net.minecraft.world.entity.decoration.EntityLeash; +import net.minecraft.world.entity.decoration.EntityPainting; +import net.minecraft.world.entity.item.EntityFallingBlock; +import net.minecraft.world.entity.item.EntityItem; +import net.minecraft.world.entity.item.EntityTNTPrimed; +import net.minecraft.world.entity.monster.EntityZombie; +import net.minecraft.world.entity.player.EntityHuman; +import net.minecraft.world.entity.projectile.EntityArrow; +import net.minecraft.world.entity.projectile.EntityEgg; +import net.minecraft.world.entity.projectile.EntityEnderSignal; +import net.minecraft.world.entity.projectile.EntityEvokerFangs; +import net.minecraft.world.entity.projectile.EntityFireball; +import net.minecraft.world.entity.projectile.EntityFireworks; +import net.minecraft.world.entity.projectile.EntityPotion; +import net.minecraft.world.entity.projectile.EntitySnowball; +import net.minecraft.world.entity.projectile.EntityTippedArrow; +import net.minecraft.world.entity.raid.PersistentRaid; +import net.minecraft.world.entity.vehicle.EntityBoat; +import net.minecraft.world.entity.vehicle.EntityMinecartChest; +import net.minecraft.world.entity.vehicle.EntityMinecartCommandBlock; +import net.minecraft.world.entity.vehicle.EntityMinecartFurnace; +import net.minecraft.world.entity.vehicle.EntityMinecartHopper; +import net.minecraft.world.entity.vehicle.EntityMinecartMobSpawner; +import net.minecraft.world.entity.vehicle.EntityMinecartRideable; +import net.minecraft.world.entity.vehicle.EntityMinecartTNT; +import net.minecraft.world.level.ChunkCoordIntPair; +import net.minecraft.world.level.Explosion; +import net.minecraft.world.level.GameRules; +import net.minecraft.world.level.RayTrace; +import net.minecraft.world.level.biome.BiomeBase; +import net.minecraft.world.level.block.BlockChorusFlower; +import net.minecraft.world.level.block.BlockDiodeAbstract; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.state.IBlockData; +import net.minecraft.world.level.chunk.ChunkStatus; +import net.minecraft.world.level.chunk.IChunkAccess; +import net.minecraft.world.level.chunk.ProtoChunkExtension; +import net.minecraft.world.level.levelgen.feature.StructureGenerator; +import net.minecraft.world.level.storage.SavedFile; +import net.minecraft.world.phys.AxisAlignedBB; +import net.minecraft.world.phys.MovingObjectPosition; +import net.minecraft.world.phys.Vec3D; import org.apache.commons.lang.Validate; import org.bukkit.BlockChangeDelegate; import org.bukkit.Bukkit; @@ -364,7 +364,7 @@ public class CraftWorld implements World { @Override public Chunk[] getLoadedChunks() { Long2ObjectLinkedOpenHashMap chunks = world.getChunkProvider().playerChunkMap.visibleChunks; - return chunks.values().stream().map(PlayerChunk::getFullChunk).filter(Objects::nonNull).map(net.minecraft.server.Chunk::getBukkitChunk).toArray(Chunk[]::new); + return chunks.values().stream().map(PlayerChunk::getFullChunk).filter(Objects::nonNull).map(net.minecraft.world.level.chunk.Chunk::getBukkitChunk).toArray(Chunk[]::new); } @Override @@ -400,7 +400,7 @@ public class CraftWorld implements World { if (!isChunkLoaded(x, z)) { return true; } - net.minecraft.server.Chunk chunk = world.getChunkAt(x, z); + net.minecraft.world.level.chunk.Chunk chunk = world.getChunkAt(x, z); chunk.mustNotSave = !save; unloadChunkRequest(x, z); @@ -470,7 +470,7 @@ public class CraftWorld implements World { chunk = world.getChunkProvider().getChunkAt(x, z, ChunkStatus.FULL, true); } - if (chunk instanceof net.minecraft.server.Chunk) { + if (chunk instanceof net.minecraft.world.level.chunk.Chunk) { world.getChunkProvider().addTicket(TicketType.PLUGIN, new ChunkCoordIntPair(x, z), 1, Unit.INSTANCE); return true; } @@ -683,7 +683,7 @@ public class CraftWorld implements World { public boolean generateTree(Location loc, TreeType type) { BlockPosition pos = new BlockPosition(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()); - net.minecraft.server.WorldGenFeatureConfigured gen; + net.minecraft.world.level.levelgen.feature.WorldGenFeatureConfigured gen; switch (type) { case BIG_TREE: gen = BiomeDecoratorGroups.FANCY_OAK; @@ -758,10 +758,10 @@ public class CraftWorld implements World { if (grownTree) { // Copy block data to delegate for (BlockState blockstate : world.capturedBlockStates.values()) { BlockPosition position = ((CraftBlockState) blockstate).getPosition(); - net.minecraft.server.IBlockData oldBlock = world.getType(position); + net.minecraft.world.level.block.state.IBlockData oldBlock = world.getType(position); int flag = ((CraftBlockState) blockstate).getFlag(); delegate.setBlockData(blockstate.getX(), blockstate.getY(), blockstate.getZ(), blockstate.getBlockData()); - net.minecraft.server.IBlockData newBlock = world.getType(position); + net.minecraft.world.level.block.state.IBlockData newBlock = world.getType(position); world.notifyAndUpdatePhysics(position, null, oldBlock, newBlock, newBlock, flag, 512); } world.capturedBlockStates.clear(); @@ -957,7 +957,7 @@ public class CraftWorld implements World { BiomeBase bb = CraftBlock.biomeToBiomeBase(getHandle().r().b(IRegistry.ay), bio); BlockPosition pos = new BlockPosition(x, 0, z); if (this.world.isLoaded(pos)) { - net.minecraft.server.Chunk chunk = this.world.getChunkAtWorldCoords(pos); + net.minecraft.world.level.chunk.Chunk chunk = this.world.getChunkAtWorldCoords(pos); if (chunk != null) { chunk.getBiomeIndex().setBiome(x >> 2, y >> 2, z >> 2, bb); @@ -993,8 +993,8 @@ public class CraftWorld implements World { List list = new ArrayList(); for (Object o : world.entitiesById.values()) { - if (o instanceof net.minecraft.server.Entity) { - net.minecraft.server.Entity mcEnt = (net.minecraft.server.Entity) o; + if (o instanceof net.minecraft.world.entity.Entity) { + net.minecraft.world.entity.Entity mcEnt = (net.minecraft.world.entity.Entity) o; Entity bukkitEntity = mcEnt.getBukkitEntity(); // Assuming that bukkitEntity isn't null @@ -1012,8 +1012,8 @@ public class CraftWorld implements World { List list = new ArrayList(); for (Object o : world.entitiesById.values()) { - if (o instanceof net.minecraft.server.Entity) { - net.minecraft.server.Entity mcEnt = (net.minecraft.server.Entity) o; + if (o instanceof net.minecraft.world.entity.Entity) { + net.minecraft.world.entity.Entity mcEnt = (net.minecraft.world.entity.Entity) o; Entity bukkitEntity = mcEnt.getBukkitEntity(); // Assuming that bukkitEntity isn't null @@ -1039,8 +1039,8 @@ public class CraftWorld implements World { Collection list = new ArrayList(); for (Object entity: world.entitiesById.values()) { - if (entity instanceof net.minecraft.server.Entity) { - Entity bukkitEntity = ((net.minecraft.server.Entity) entity).getBukkitEntity(); + if (entity instanceof net.minecraft.world.entity.Entity) { + Entity bukkitEntity = ((net.minecraft.world.entity.Entity) entity).getBukkitEntity(); if (bukkitEntity == null) { continue; @@ -1062,8 +1062,8 @@ public class CraftWorld implements World { Collection list = new ArrayList(); for (Object entity: world.entitiesById.values()) { - if (entity instanceof net.minecraft.server.Entity) { - Entity bukkitEntity = ((net.minecraft.server.Entity) entity).getBukkitEntity(); + if (entity instanceof net.minecraft.world.entity.Entity) { + Entity bukkitEntity = ((net.minecraft.world.entity.Entity) entity).getBukkitEntity(); if (bukkitEntity == null) { continue; @@ -1109,10 +1109,10 @@ public class CraftWorld implements World { Validate.notNull(boundingBox, "Bounding box is null!"); AxisAlignedBB bb = new AxisAlignedBB(boundingBox.getMinX(), boundingBox.getMinY(), boundingBox.getMinZ(), boundingBox.getMaxX(), boundingBox.getMaxY(), boundingBox.getMaxZ()); - List entityList = getHandle().getEntities((net.minecraft.server.Entity) null, bb, null); + List entityList = getHandle().getEntities((net.minecraft.world.entity.Entity) null, bb, null); List bukkitEntityList = new ArrayList(entityList.size()); - for (net.minecraft.server.Entity entity : entityList) { + for (net.minecraft.world.entity.Entity entity : entityList) { Entity bukkitEntity = entity.getBukkitEntity(); if (filter == null || filter.test(bukkitEntity)) { bukkitEntityList.add(bukkitEntity); @@ -1456,12 +1456,12 @@ public class CraftWorld implements World { } @SuppressWarnings("unchecked") - public net.minecraft.server.Entity createEntity(Location location, Class clazz) throws IllegalArgumentException { + public net.minecraft.world.entity.Entity createEntity(Location location, Class clazz) throws IllegalArgumentException { if (location == null || clazz == null) { throw new IllegalArgumentException("Location or entity class cannot be null"); } - net.minecraft.server.Entity entity = null; + net.minecraft.world.entity.Entity entity = null; double x = location.getX(); double y = location.getY(); @@ -1526,7 +1526,7 @@ public class CraftWorld implements World { entity = EntityTypes.LLAMA_SPIT.a(world); entity.setPositionRotation(x, y, z, yaw, pitch); } else if (Firework.class.isAssignableFrom(clazz)) { - entity = new EntityFireworks(world, x, y, z, net.minecraft.server.ItemStack.b); + entity = new EntityFireworks(world, x, y, z, net.minecraft.world.item.ItemStack.b); } } else if (Minecart.class.isAssignableFrom(clazz)) { if (PoweredMinecart.class.isAssignableFrom(clazz)) { @@ -1757,9 +1757,9 @@ public class CraftWorld implements World { AxisAlignedBB bb = (ItemFrame.class.isAssignableFrom(clazz)) ? EntityItemFrame.calculateBoundingBox(null, pos, CraftBlock.blockFaceToNotch(dir).opposite(), width, height) : EntityHanging.calculateBoundingBox(null, pos, CraftBlock.blockFaceToNotch(dir).opposite(), width, height); - List list = (List) world.getEntities(null, bb); - for (Iterator it = list.iterator(); !taken && it.hasNext();) { - net.minecraft.server.Entity e = it.next(); + List list = (List) world.getEntities(null, bb); + for (Iterator it = list.iterator(); !taken && it.hasNext();) { + net.minecraft.world.entity.Entity e = it.next(); if (e instanceof EntityHanging) { taken = true; // Hanging entities do not like hanging entities which intersect them. } @@ -1810,12 +1810,12 @@ public class CraftWorld implements World { } @SuppressWarnings("unchecked") - public T addEntity(net.minecraft.server.Entity entity, SpawnReason reason) throws IllegalArgumentException { + public T addEntity(net.minecraft.world.entity.Entity entity, SpawnReason reason) throws IllegalArgumentException { return addEntity(entity, reason, null); } @SuppressWarnings("unchecked") - public T addEntity(net.minecraft.server.Entity entity, SpawnReason reason, Consumer function) throws IllegalArgumentException { + public T addEntity(net.minecraft.world.entity.Entity entity, SpawnReason reason, Consumer function) throws IllegalArgumentException { Preconditions.checkArgument(entity != null, "Cannot spawn null entity"); if (entity instanceof EntityInsentient) { @@ -1831,7 +1831,7 @@ public class CraftWorld implements World { } public T spawn(Location location, Class clazz, Consumer function, SpawnReason reason) throws IllegalArgumentException { - net.minecraft.server.Entity entity = createEntity(location, clazz); + net.minecraft.world.entity.Entity entity = createEntity(location, clazz); return addEntity(entity, reason, function); } @@ -2333,7 +2333,7 @@ public class CraftWorld implements World { Validate.isTrue(radius >= 0, "Radius cannot be negative"); PersistentRaid persistentRaid = world.getPersistentRaid(); - net.minecraft.server.Raid raid = persistentRaid.getNearbyRaid(new BlockPosition(location.getBlockX(), location.getBlockY(), location.getBlockZ()), radius * radius); + net.minecraft.world.entity.raid.Raid raid = persistentRaid.getNearbyRaid(new BlockPosition(location.getBlockX(), location.getBlockY(), location.getBlockZ()), radius * radius); return (raid == null) ? null : new CraftRaid(raid); } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorldBorder.java b/src/main/java/org/bukkit/craftbukkit/CraftWorldBorder.java index 044d46ac8..31f197ded 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorldBorder.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorldBorder.java @@ -1,7 +1,7 @@ package org.bukkit.craftbukkit; import com.google.common.base.Preconditions; -import net.minecraft.server.BlockPosition; +import net.minecraft.core.BlockPosition; import org.bukkit.Location; import org.bukkit.World; import org.bukkit.WorldBorder; @@ -9,7 +9,7 @@ import org.bukkit.WorldBorder; public class CraftWorldBorder implements WorldBorder { private final World world; - private final net.minecraft.server.WorldBorder handle; + private final net.minecraft.world.level.border.WorldBorder handle; public CraftWorldBorder(CraftWorld world) { this.world = world; diff --git a/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancement.java b/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancement.java index a5aadf285..77abcd6de 100644 --- a/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancement.java +++ b/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancement.java @@ -2,7 +2,7 @@ package org.bukkit.craftbukkit.advancement; import java.util.Collection; import java.util.Collections; -import net.minecraft.server.Advancement; +import net.minecraft.advancements.Advancement; import org.bukkit.NamespacedKey; import org.bukkit.craftbukkit.util.CraftNamespacedKey; diff --git a/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancementProgress.java b/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancementProgress.java index 60fc5aff8..5e1e9fd0a 100644 --- a/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancementProgress.java +++ b/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancementProgress.java @@ -4,8 +4,8 @@ import com.google.common.collect.Lists; import java.util.Collection; import java.util.Collections; import java.util.Date; +import net.minecraft.advancements.CriterionProgress; import net.minecraft.server.AdvancementDataPlayer; -import net.minecraft.server.CriterionProgress; import org.bukkit.advancement.Advancement; import org.bukkit.advancement.AdvancementProgress; @@ -13,9 +13,9 @@ public class CraftAdvancementProgress implements AdvancementProgress { private final CraftAdvancement advancement; private final AdvancementDataPlayer playerData; - private final net.minecraft.server.AdvancementProgress handle; + private final net.minecraft.advancements.AdvancementProgress handle; - public CraftAdvancementProgress(CraftAdvancement advancement, AdvancementDataPlayer player, net.minecraft.server.AdvancementProgress handle) { + public CraftAdvancementProgress(CraftAdvancement advancement, AdvancementDataPlayer player, net.minecraft.advancements.AdvancementProgress handle) { this.advancement = advancement; this.playerData = player; this.handle = handle; diff --git a/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeInstance.java b/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeInstance.java index a7c500323..743afe7b7 100644 --- a/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeInstance.java +++ b/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeInstance.java @@ -10,10 +10,10 @@ import org.bukkit.attribute.AttributeModifier; public class CraftAttributeInstance implements AttributeInstance { - private final net.minecraft.server.AttributeModifiable handle; + private final net.minecraft.world.entity.ai.attributes.AttributeModifiable handle; private final Attribute attribute; - public CraftAttributeInstance(net.minecraft.server.AttributeModifiable handle, Attribute attribute) { + public CraftAttributeInstance(net.minecraft.world.entity.ai.attributes.AttributeModifiable handle, Attribute attribute) { this.handle = handle; this.attribute = attribute; } @@ -36,7 +36,7 @@ public class CraftAttributeInstance implements AttributeInstance { @Override public Collection getModifiers() { List result = new ArrayList(); - for (net.minecraft.server.AttributeModifier nms : handle.getModifiers()) { + for (net.minecraft.world.entity.ai.attributes.AttributeModifier nms : handle.getModifiers()) { result.add(convert(nms)); } @@ -65,11 +65,11 @@ public class CraftAttributeInstance implements AttributeInstance { return handle.getAttribute().getDefault(); } - public static net.minecraft.server.AttributeModifier convert(AttributeModifier bukkit) { - return new net.minecraft.server.AttributeModifier(bukkit.getUniqueId(), bukkit.getName(), bukkit.getAmount(), net.minecraft.server.AttributeModifier.Operation.values()[bukkit.getOperation().ordinal()]); + public static net.minecraft.world.entity.ai.attributes.AttributeModifier convert(AttributeModifier bukkit) { + return new net.minecraft.world.entity.ai.attributes.AttributeModifier(bukkit.getUniqueId(), bukkit.getName(), bukkit.getAmount(), net.minecraft.world.entity.ai.attributes.AttributeModifier.Operation.values()[bukkit.getOperation().ordinal()]); } - public static AttributeModifier convert(net.minecraft.server.AttributeModifier nms) { + public static AttributeModifier convert(net.minecraft.world.entity.ai.attributes.AttributeModifier nms) { return new AttributeModifier(nms.getUniqueId(), nms.getName(), nms.getAmount(), AttributeModifier.Operation.values()[nms.getOperation().ordinal()]); } } diff --git a/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeMap.java b/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeMap.java index bf3b236b2..43fa8d3c5 100644 --- a/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeMap.java +++ b/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeMap.java @@ -1,9 +1,9 @@ package org.bukkit.craftbukkit.attribute; import com.google.common.base.Preconditions; -import net.minecraft.server.AttributeBase; -import net.minecraft.server.AttributeMapBase; -import net.minecraft.server.IRegistry; +import net.minecraft.core.IRegistry; +import net.minecraft.world.entity.ai.attributes.AttributeBase; +import net.minecraft.world.entity.ai.attributes.AttributeMapBase; import org.bukkit.Registry; import org.bukkit.attribute.Attributable; import org.bukkit.attribute.Attribute; @@ -21,7 +21,7 @@ public class CraftAttributeMap implements Attributable { @Override public AttributeInstance getAttribute(Attribute attribute) { Preconditions.checkArgument(attribute != null, "attribute"); - net.minecraft.server.AttributeModifiable nms = handle.a(toMinecraft(attribute)); + net.minecraft.world.entity.ai.attributes.AttributeModifiable nms = handle.a(toMinecraft(attribute)); return (nms == null) ? null : new CraftAttributeInstance(nms, attribute); } diff --git a/src/main/java/org/bukkit/craftbukkit/block/CapturedBlockState.java b/src/main/java/org/bukkit/craftbukkit/block/CapturedBlockState.java index e90e73af4..ad1613505 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CapturedBlockState.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CapturedBlockState.java @@ -1,13 +1,13 @@ package org.bukkit.craftbukkit.block; import java.util.Random; -import net.minecraft.server.BlockPosition; -import net.minecraft.server.EntityBee; -import net.minecraft.server.EntityTypes; -import net.minecraft.server.GeneratorAccessSeed; -import net.minecraft.server.TileEntity; -import net.minecraft.server.TileEntityBeehive; -import net.minecraft.server.World; +import net.minecraft.core.BlockPosition; +import net.minecraft.world.entity.EntityTypes; +import net.minecraft.world.entity.animal.EntityBee; +import net.minecraft.world.level.GeneratorAccessSeed; +import net.minecraft.world.level.World; +import net.minecraft.world.level.block.entity.TileEntity; +import net.minecraft.world.level.block.entity.TileEntityBeehive; import org.bukkit.Material; import org.bukkit.block.Block; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java index 754205636..870ae6e7a 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java @@ -3,11 +3,11 @@ package org.bukkit.craftbukkit.block; import com.google.common.base.Preconditions; import java.util.ArrayList; import java.util.List; -import net.minecraft.server.BlockBannerAbstract; -import net.minecraft.server.EnumColor; -import net.minecraft.server.NBTTagCompound; -import net.minecraft.server.NBTTagList; -import net.minecraft.server.TileEntityBanner; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.world.item.EnumColor; +import net.minecraft.world.level.block.BlockBannerAbstract; +import net.minecraft.world.level.block.entity.TileEntityBanner; import org.bukkit.DyeColor; import org.bukkit.Material; import org.bukkit.block.Banner; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBarrel.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBarrel.java index 9bfd2d7ef..e27f5d689 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBarrel.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBarrel.java @@ -1,9 +1,9 @@ package org.bukkit.craftbukkit.block; -import net.minecraft.server.BlockBarrel; -import net.minecraft.server.IBlockData; -import net.minecraft.server.SoundEffects; -import net.minecraft.server.TileEntityBarrel; +import net.minecraft.sounds.SoundEffects; +import net.minecraft.world.level.block.BlockBarrel; +import net.minecraft.world.level.block.entity.TileEntityBarrel; +import net.minecraft.world.level.block.state.IBlockData; import org.bukkit.Material; import org.bukkit.block.Barrel; import org.bukkit.block.Block; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java index 21ebceafb..ae735836a 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java @@ -2,11 +2,11 @@ package org.bukkit.craftbukkit.block; import java.util.ArrayList; import java.util.Collection; -import net.minecraft.server.ChestLock; -import net.minecraft.server.EntityHuman; -import net.minecraft.server.MobEffectList; -import net.minecraft.server.TileEntity; -import net.minecraft.server.TileEntityBeacon; +import net.minecraft.world.ChestLock; +import net.minecraft.world.effect.MobEffectList; +import net.minecraft.world.entity.player.EntityHuman; +import net.minecraft.world.level.block.entity.TileEntity; +import net.minecraft.world.level.block.entity.TileEntityBeacon; import org.bukkit.Material; import org.bukkit.block.Beacon; import org.bukkit.block.Block; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBed.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBed.java index 100ed8a8f..418e525e6 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBed.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBed.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.block; -import net.minecraft.server.TileEntityBed; +import net.minecraft.world.level.block.entity.TileEntityBed; import org.bukkit.DyeColor; import org.bukkit.Material; import org.bukkit.block.Bed; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBeehive.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBeehive.java index 0ffec8115..af691b28b 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBeehive.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBeehive.java @@ -3,10 +3,10 @@ package org.bukkit.craftbukkit.block; import com.google.common.base.Preconditions; import java.util.ArrayList; import java.util.List; -import net.minecraft.server.BlockPosition; -import net.minecraft.server.Entity; -import net.minecraft.server.TileEntityBeehive; -import net.minecraft.server.TileEntityBeehive.ReleaseStatus; +import net.minecraft.core.BlockPosition; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.level.block.entity.TileEntityBeehive; +import net.minecraft.world.level.block.entity.TileEntityBeehive.ReleaseStatus; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.block.Beehive; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBell.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBell.java index 83f176a5c..b2b34ff0a 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBell.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBell.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.block; -import net.minecraft.server.TileEntityBell; +import net.minecraft.world.level.block.entity.TileEntityBell; import org.bukkit.Material; import org.bukkit.block.Bell; import org.bukkit.block.Block; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlastFurnace.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlastFurnace.java index 9f1dd82b2..39fd6ebf7 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlastFurnace.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlastFurnace.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.block; -import net.minecraft.server.TileEntityBlastFurnace; +import net.minecraft.world.level.block.entity.TileEntityBlastFurnace; import org.bukkit.Material; import org.bukkit.block.BlastFurnace; import org.bukkit.block.Block; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java index 5de8463c9..7654c0f8b 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java @@ -5,29 +5,29 @@ import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.stream.Collectors; -import net.minecraft.server.AxisAlignedBB; -import net.minecraft.server.BiomeBase; -import net.minecraft.server.BlockPosition; -import net.minecraft.server.BlockRedstoneWire; -import net.minecraft.server.BlockTileEntity; -import net.minecraft.server.Blocks; -import net.minecraft.server.EnumDirection; -import net.minecraft.server.EnumHand; -import net.minecraft.server.EnumInteractionResult; -import net.minecraft.server.EnumSkyBlock; -import net.minecraft.server.GeneratorAccess; -import net.minecraft.server.IBlockData; -import net.minecraft.server.IRegistry; -import net.minecraft.server.ItemActionContext; -import net.minecraft.server.ItemBoneMeal; -import net.minecraft.server.Items; -import net.minecraft.server.MovingObjectPosition; -import net.minecraft.server.MovingObjectPositionBlock; -import net.minecraft.server.RayTrace; -import net.minecraft.server.TileEntity; -import net.minecraft.server.Vec3D; -import net.minecraft.server.VoxelShape; -import net.minecraft.server.WorldServer; +import net.minecraft.core.BlockPosition; +import net.minecraft.core.EnumDirection; +import net.minecraft.core.IRegistry; +import net.minecraft.server.level.WorldServer; +import net.minecraft.world.EnumHand; +import net.minecraft.world.EnumInteractionResult; +import net.minecraft.world.item.ItemBoneMeal; +import net.minecraft.world.item.Items; +import net.minecraft.world.item.context.ItemActionContext; +import net.minecraft.world.level.EnumSkyBlock; +import net.minecraft.world.level.GeneratorAccess; +import net.minecraft.world.level.RayTrace; +import net.minecraft.world.level.biome.BiomeBase; +import net.minecraft.world.level.block.BlockRedstoneWire; +import net.minecraft.world.level.block.BlockTileEntity; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.entity.TileEntity; +import net.minecraft.world.level.block.state.IBlockData; +import net.minecraft.world.phys.AxisAlignedBB; +import net.minecraft.world.phys.MovingObjectPosition; +import net.minecraft.world.phys.MovingObjectPositionBlock; +import net.minecraft.world.phys.Vec3D; +import net.minecraft.world.phys.shapes.VoxelShape; import org.apache.commons.lang.Validate; import org.bukkit.Chunk; import org.bukkit.FluidCollisionMode; @@ -59,7 +59,7 @@ import org.bukkit.util.RayTraceResult; import org.bukkit.util.Vector; public class CraftBlock implements Block { - private final net.minecraft.server.GeneratorAccess world; + private final net.minecraft.world.level.GeneratorAccess world; private final BlockPosition position; public CraftBlock(GeneratorAccess world, BlockPosition position) { @@ -71,11 +71,11 @@ public class CraftBlock implements Block { return new CraftBlock(world, position); } - private net.minecraft.server.Block getNMSBlock() { + private net.minecraft.world.level.block.Block getNMSBlock() { return getNMS().getBlock(); } - public net.minecraft.server.IBlockData getNMS() { + public net.minecraft.world.level.block.state.IBlockData getNMS() { return world.getType(position); } @@ -188,8 +188,8 @@ public class CraftBlock implements Block { // SPIGOT-611: need to do this to prevent glitchiness. Easier to handle this here (like /setblock) than to fix weirdness in tile entity cleanup if (!blockData.isAir() && blockData.getBlock() instanceof BlockTileEntity && blockData.getBlock() != getNMSBlock()) { // SPIGOT-4612: faster - just clear tile - if (world instanceof net.minecraft.server.World) { - ((net.minecraft.server.World) world).removeTileEntity(position); + if (world instanceof net.minecraft.world.level.World) { + ((net.minecraft.world.level.World) world).removeTileEntity(position); } else { world.setTypeAndData(position, Blocks.AIR.getBlockData(), 0); } @@ -568,7 +568,7 @@ public class CraftBlock implements Block { @Override public int getBlockPower(BlockFace face) { int power = 0; - net.minecraft.server.World world = this.world.getMinecraftWorld(); + net.minecraft.world.level.World world = this.world.getMinecraftWorld(); int x = getX(); int y = getY(); int z = getZ(); @@ -619,14 +619,14 @@ public class CraftBlock implements Block { @Override public boolean breakNaturally(ItemStack item) { // Order matters here, need to drop before setting to air so skulls can get their data - net.minecraft.server.IBlockData iblockdata = this.getNMS(); - net.minecraft.server.Block block = iblockdata.getBlock(); - net.minecraft.server.ItemStack nmsItem = CraftItemStack.asNMSCopy(item); + net.minecraft.world.level.block.state.IBlockData iblockdata = this.getNMS(); + net.minecraft.world.level.block.Block block = iblockdata.getBlock(); + net.minecraft.world.item.ItemStack nmsItem = CraftItemStack.asNMSCopy(item); boolean result = false; // Modelled off EntityHuman#hasBlock if (block != Blocks.AIR && (item == null || !iblockdata.isRequiresSpecialTool() || nmsItem.canDestroySpecialBlock(iblockdata))) { - net.minecraft.server.Block.dropItems(iblockdata, world.getMinecraftWorld(), position, world.getTileEntity(position), null, nmsItem); + net.minecraft.world.level.block.Block.dropItems(iblockdata, world.getMinecraftWorld(), position, world.getTileEntity(position), null, nmsItem); result = true; } @@ -654,11 +654,11 @@ public class CraftBlock implements Block { @Override public Collection getDrops(ItemStack item, Entity entity) { IBlockData iblockdata = getNMS(); - net.minecraft.server.ItemStack nms = CraftItemStack.asNMSCopy(item); + net.minecraft.world.item.ItemStack nms = CraftItemStack.asNMSCopy(item); // Modelled off EntityHuman#hasBlock if (item == null || !iblockdata.isRequiresSpecialTool() || nms.canDestroySpecialBlock(iblockdata)) { - return net.minecraft.server.Block.getDrops(iblockdata, (WorldServer) world.getMinecraftWorld(), position, world.getTileEntity(position), entity == null ? null : ((CraftEntity) entity).getHandle(), nms) + return net.minecraft.world.level.block.Block.getDrops(iblockdata, (WorldServer) world.getMinecraftWorld(), position, world.getTileEntity(position), entity == null ? null : ((CraftEntity) entity).getHandle(), nms) .stream().map(CraftItemStack::asBukkitCopy).collect(Collectors.toList()); } else { return Collections.emptyList(); diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java index df71eb967..524f27830 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java @@ -1,9 +1,9 @@ package org.bukkit.craftbukkit.block; import com.google.common.base.Preconditions; -import net.minecraft.server.BlockPosition; -import net.minecraft.server.NBTTagCompound; -import net.minecraft.server.TileEntity; +import net.minecraft.core.BlockPosition; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.level.block.entity.TileEntity; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.TileState; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java index 0f89e7768..b7ce67757 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java @@ -2,9 +2,9 @@ package org.bukkit.craftbukkit.block; import com.google.common.base.Preconditions; import java.util.List; -import net.minecraft.server.BlockPosition; -import net.minecraft.server.GeneratorAccess; -import net.minecraft.server.IBlockData; +import net.minecraft.core.BlockPosition; +import net.minecraft.world.level.GeneratorAccess; +import net.minecraft.world.level.block.state.IBlockData; import org.bukkit.Chunk; import org.bukkit.Location; import org.bukkit.Material; @@ -44,11 +44,11 @@ public class CraftBlockState implements BlockState { position = BlockPosition.ZERO; } - public static CraftBlockState getBlockState(GeneratorAccess world, net.minecraft.server.BlockPosition pos) { + public static CraftBlockState getBlockState(GeneratorAccess world, net.minecraft.core.BlockPosition pos) { return new CraftBlockState(CraftBlock.at(world, pos)); } - public static CraftBlockState getBlockState(net.minecraft.server.World world, net.minecraft.server.BlockPosition pos, int flag) { + public static CraftBlockState getBlockState(net.minecraft.world.level.World world, net.minecraft.core.BlockPosition pos, int flag) { return new CraftBlockState(world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ()), flag); } diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBrewingStand.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBrewingStand.java index 37b6ad55c..f963cdde4 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBrewingStand.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBrewingStand.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.block; -import net.minecraft.server.TileEntityBrewingStand; +import net.minecraft.world.level.block.entity.TileEntityBrewingStand; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.BrewingStand; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftCampfire.java b/src/main/java/org/bukkit/craftbukkit/block/CraftCampfire.java index 95d10dd9f..326729103 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftCampfire.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftCampfire.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.block; -import net.minecraft.server.TileEntityCampfire; +import net.minecraft.world.level.block.entity.TileEntityCampfire; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.Campfire; @@ -24,7 +24,7 @@ public class CraftCampfire extends CraftBlockEntityState imp @Override public ItemStack getItem(int index) { - net.minecraft.server.ItemStack item = getSnapshot().getItems().get(index); + net.minecraft.world.item.ItemStack item = getSnapshot().getItems().get(index); return item.isEmpty() ? null : CraftItemStack.asCraftMirror(item); } diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java b/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java index 89df1d7f8..486fa8937 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java @@ -1,10 +1,10 @@ package org.bukkit.craftbukkit.block; -import net.minecraft.server.BlockChest; -import net.minecraft.server.Blocks; -import net.minecraft.server.ITileInventory; -import net.minecraft.server.SoundEffects; -import net.minecraft.server.TileEntityChest; +import net.minecraft.sounds.SoundEffects; +import net.minecraft.world.ITileInventory; +import net.minecraft.world.level.block.BlockChest; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.entity.TileEntityChest; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.Chest; @@ -60,7 +60,7 @@ public class CraftChest extends CraftLootable implements Chest public void open() { requirePlaced(); if (!getTileEntity().opened) { - net.minecraft.server.Block block = getTileEntity().getBlock().getBlock(); + net.minecraft.world.level.block.Block block = getTileEntity().getBlock().getBlock(); getTileEntity().getWorld().playBlockAction(getTileEntity().getPosition(), block, 1, getTileEntity().viewingCount + 1); getTileEntity().playOpenSound(SoundEffects.BLOCK_CHEST_OPEN); } @@ -71,7 +71,7 @@ public class CraftChest extends CraftLootable implements Chest public void close() { requirePlaced(); if (getTileEntity().opened) { - net.minecraft.server.Block block = getTileEntity().getBlock().getBlock(); + net.minecraft.world.level.block.Block block = getTileEntity().getBlock().getBlock(); getTileEntity().getWorld().playBlockAction(getTileEntity().getPosition(), block, 1, 0); getTileEntity().playOpenSound(SoundEffects.BLOCK_CHEST_CLOSE); } diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftCommandBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftCommandBlock.java index 791500bd0..a99d79153 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftCommandBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftCommandBlock.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.block; -import net.minecraft.server.TileEntityCommand; +import net.minecraft.world.level.block.entity.TileEntityCommand; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.CommandBlock; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftComparator.java b/src/main/java/org/bukkit/craftbukkit/block/CraftComparator.java index 2e6a738ac..12d7efdb9 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftComparator.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftComparator.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.block; -import net.minecraft.server.TileEntityComparator; +import net.minecraft.world.level.block.entity.TileEntityComparator; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.Comparator; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftConduit.java b/src/main/java/org/bukkit/craftbukkit/block/CraftConduit.java index 5116a3765..49b485920 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftConduit.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftConduit.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.block; -import net.minecraft.server.TileEntityConduit; +import net.minecraft.world.level.block.entity.TileEntityConduit; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.Conduit; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftContainer.java b/src/main/java/org/bukkit/craftbukkit/block/CraftContainer.java index 36ba813e5..e8ce890c5 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftContainer.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftContainer.java @@ -1,7 +1,7 @@ package org.bukkit.craftbukkit.block; -import net.minecraft.server.ChestLock; -import net.minecraft.server.TileEntityContainer; +import net.minecraft.world.ChestLock; +import net.minecraft.world.level.block.entity.TileEntityContainer; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.Container; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java b/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java index 5c4c3c70c..28295ebd3 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java @@ -1,9 +1,9 @@ package org.bukkit.craftbukkit.block; import com.google.common.base.Preconditions; -import net.minecraft.server.EntityTypes; -import net.minecraft.server.MinecraftKey; -import net.minecraft.server.TileEntityMobSpawner; +import net.minecraft.resources.MinecraftKey; +import net.minecraft.world.entity.EntityTypes; +import net.minecraft.world.level.block.entity.TileEntityMobSpawner; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.CreatureSpawner; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftDaylightDetector.java b/src/main/java/org/bukkit/craftbukkit/block/CraftDaylightDetector.java index 1c9b84c69..04bd48f95 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftDaylightDetector.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftDaylightDetector.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.block; -import net.minecraft.server.TileEntityLightDetector; +import net.minecraft.world.level.block.entity.TileEntityLightDetector; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.DaylightDetector; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftDispenser.java b/src/main/java/org/bukkit/craftbukkit/block/CraftDispenser.java index ab31963f7..2176969fd 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftDispenser.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftDispenser.java @@ -1,8 +1,8 @@ package org.bukkit.craftbukkit.block; -import net.minecraft.server.BlockDispenser; -import net.minecraft.server.Blocks; -import net.minecraft.server.TileEntityDispenser; +import net.minecraft.world.level.block.BlockDispenser; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.entity.TileEntityDispenser; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.Dispenser; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftDropper.java b/src/main/java/org/bukkit/craftbukkit/block/CraftDropper.java index 12d65bf6c..561e2d01d 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftDropper.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftDropper.java @@ -1,8 +1,8 @@ package org.bukkit.craftbukkit.block; -import net.minecraft.server.BlockDropper; -import net.minecraft.server.Blocks; -import net.minecraft.server.TileEntityDropper; +import net.minecraft.world.level.block.BlockDropper; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.entity.TileEntityDropper; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.Dropper; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftEnchantingTable.java b/src/main/java/org/bukkit/craftbukkit/block/CraftEnchantingTable.java index 3a782294c..a559a77aa 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftEnchantingTable.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftEnchantingTable.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.block; -import net.minecraft.server.TileEntityEnchantTable; +import net.minecraft.world.level.block.entity.TileEntityEnchantTable; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.EnchantingTable; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftEndGateway.java b/src/main/java/org/bukkit/craftbukkit/block/CraftEndGateway.java index 54287744e..57e458628 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftEndGateway.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftEndGateway.java @@ -1,8 +1,8 @@ package org.bukkit.craftbukkit.block; import java.util.Objects; -import net.minecraft.server.BlockPosition; -import net.minecraft.server.TileEntityEndGateway; +import net.minecraft.core.BlockPosition; +import net.minecraft.world.level.block.entity.TileEntityEndGateway; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.block.Block; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftEnderChest.java b/src/main/java/org/bukkit/craftbukkit/block/CraftEnderChest.java index 2004ee2f3..3c0b28faa 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftEnderChest.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftEnderChest.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.block; -import net.minecraft.server.TileEntityEnderChest; +import net.minecraft.world.level.block.entity.TileEntityEnderChest; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.EnderChest; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftFurnace.java b/src/main/java/org/bukkit/craftbukkit/block/CraftFurnace.java index 27c8cc130..760fe719f 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftFurnace.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftFurnace.java @@ -1,7 +1,7 @@ package org.bukkit.craftbukkit.block; -import net.minecraft.server.BlockFurnace; -import net.minecraft.server.TileEntityFurnace; +import net.minecraft.world.level.block.BlockFurnace; +import net.minecraft.world.level.block.entity.TileEntityFurnace; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.Furnace; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftFurnaceFurnace.java b/src/main/java/org/bukkit/craftbukkit/block/CraftFurnaceFurnace.java index 680ad6826..e6800689f 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftFurnaceFurnace.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftFurnaceFurnace.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.block; -import net.minecraft.server.TileEntityFurnaceFurnace; +import net.minecraft.world.level.block.entity.TileEntityFurnaceFurnace; import org.bukkit.Material; import org.bukkit.block.Block; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftHopper.java b/src/main/java/org/bukkit/craftbukkit/block/CraftHopper.java index 6566554ab..5231afc29 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftHopper.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftHopper.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.block; -import net.minecraft.server.TileEntityHopper; +import net.minecraft.world.level.block.entity.TileEntityHopper; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.Hopper; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftJigsaw.java b/src/main/java/org/bukkit/craftbukkit/block/CraftJigsaw.java index bbce44c48..0e4144795 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftJigsaw.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftJigsaw.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.block; -import net.minecraft.server.TileEntityJigsaw; +import net.minecraft.world.level.block.entity.TileEntityJigsaw; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.Jigsaw; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftJukebox.java b/src/main/java/org/bukkit/craftbukkit/block/CraftJukebox.java index 6f20b9ac7..8ea318a86 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftJukebox.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftJukebox.java @@ -1,10 +1,10 @@ package org.bukkit.craftbukkit.block; -import net.minecraft.server.BlockJukeBox; -import net.minecraft.server.Blocks; -import net.minecraft.server.ItemStack; -import net.minecraft.server.TileEntity; -import net.minecraft.server.TileEntityJukeBox; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.block.BlockJukeBox; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.entity.TileEntity; +import net.minecraft.world.level.block.entity.TileEntityJukeBox; import org.bukkit.Effect; import org.bukkit.Material; import org.bukkit.block.Block; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftLectern.java b/src/main/java/org/bukkit/craftbukkit/block/CraftLectern.java index eb6b6a6dc..f56ec524c 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftLectern.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftLectern.java @@ -1,7 +1,7 @@ package org.bukkit.craftbukkit.block; -import net.minecraft.server.BlockLectern; -import net.minecraft.server.TileEntityLectern; +import net.minecraft.world.level.block.BlockLectern; +import net.minecraft.world.level.block.entity.TileEntityLectern; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.Lectern; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java b/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java index e1ad26a24..f0a7e61a2 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java @@ -1,7 +1,7 @@ package org.bukkit.craftbukkit.block; -import net.minecraft.server.MinecraftKey; -import net.minecraft.server.TileEntityLootable; +import net.minecraft.resources.MinecraftKey; +import net.minecraft.world.level.block.entity.TileEntityLootable; import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.Nameable; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java b/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java index 10bc0b094..e9c8ce7a1 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java @@ -1,10 +1,10 @@ package org.bukkit.craftbukkit.block; -import net.minecraft.server.BlockShulkerBox; -import net.minecraft.server.SoundCategory; -import net.minecraft.server.SoundEffects; -import net.minecraft.server.TileEntityShulkerBox; -import net.minecraft.server.World; +import net.minecraft.sounds.SoundCategory; +import net.minecraft.sounds.SoundEffects; +import net.minecraft.world.level.World; +import net.minecraft.world.level.block.BlockShulkerBox; +import net.minecraft.world.level.block.entity.TileEntityShulkerBox; import org.bukkit.DyeColor; import org.bukkit.Material; import org.bukkit.block.Block; @@ -39,7 +39,7 @@ public class CraftShulkerBox extends CraftLootable impleme @Override public DyeColor getColor() { - net.minecraft.server.Block block = CraftMagicNumbers.getBlock(this.getType()); + net.minecraft.world.level.block.Block block = CraftMagicNumbers.getBlock(this.getType()); return DyeColor.getByWoolData((byte) ((BlockShulkerBox) block).color.getColorIndex()); } diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java index 81f6bf553..50d3f9ea1 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java @@ -1,9 +1,9 @@ package org.bukkit.craftbukkit.block; -import net.minecraft.server.ChatComponentText; -import net.minecraft.server.EnumColor; -import net.minecraft.server.IChatBaseComponent; -import net.minecraft.server.TileEntitySign; +import net.minecraft.network.chat.ChatComponentText; +import net.minecraft.network.chat.IChatBaseComponent; +import net.minecraft.world.item.EnumColor; +import net.minecraft.world.level.block.entity.TileEntitySign; import org.bukkit.DyeColor; import org.bukkit.Material; import org.bukkit.block.Block; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java b/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java index 205885983..80ee7ab69 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java @@ -3,7 +3,7 @@ package org.bukkit.craftbukkit.block; import com.google.common.base.Preconditions; import com.mojang.authlib.GameProfile; import net.minecraft.server.MinecraftServer; -import net.minecraft.server.TileEntitySkull; +import net.minecraft.world.level.block.entity.TileEntitySkull; import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.OfflinePlayer; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftSmoker.java b/src/main/java/org/bukkit/craftbukkit/block/CraftSmoker.java index 7b17b6c69..ddfd2db31 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftSmoker.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSmoker.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.block; -import net.minecraft.server.TileEntitySmoker; +import net.minecraft.world.level.block.entity.TileEntitySmoker; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.Smoker; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftStructureBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftStructureBlock.java index 15e01f615..037d8abf4 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftStructureBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftStructureBlock.java @@ -1,11 +1,11 @@ package org.bukkit.craftbukkit.block; import com.google.common.base.Preconditions; -import net.minecraft.server.BlockPosition; -import net.minecraft.server.BlockPropertyStructureMode; -import net.minecraft.server.EnumBlockMirror; -import net.minecraft.server.EnumBlockRotation; -import net.minecraft.server.TileEntityStructure; +import net.minecraft.core.BlockPosition; +import net.minecraft.world.level.block.EnumBlockMirror; +import net.minecraft.world.level.block.EnumBlockRotation; +import net.minecraft.world.level.block.entity.TileEntityStructure; +import net.minecraft.world.level.block.state.properties.BlockPropertyStructureMode; import org.apache.commons.lang3.Validate; import org.bukkit.Material; import org.bukkit.block.Block; diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftAgeable.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftAgeable.java index e311e66bd..124a79626 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftAgeable.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftAgeable.java @@ -4,7 +4,7 @@ import org.bukkit.block.data.Ageable; public abstract class CraftAgeable extends CraftBlockData implements Ageable { - private static final net.minecraft.server.BlockStateInteger AGE = getInteger("age"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger AGE = getInteger("age"); @Override public int getAge() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftAnaloguePowerable.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftAnaloguePowerable.java index 60a247ced..a295c4042 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftAnaloguePowerable.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftAnaloguePowerable.java @@ -4,7 +4,7 @@ import org.bukkit.block.data.AnaloguePowerable; public abstract class CraftAnaloguePowerable extends CraftBlockData implements AnaloguePowerable { - private static final net.minecraft.server.BlockStateInteger POWER = getInteger("power"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger POWER = getInteger("power"); @Override public int getPower() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftAttachable.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftAttachable.java index 657cf0734..dd2099a50 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftAttachable.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftAttachable.java @@ -4,7 +4,7 @@ import org.bukkit.block.data.Attachable; public abstract class CraftAttachable extends CraftBlockData implements Attachable { - private static final net.minecraft.server.BlockStateBoolean ATTACHED = getBoolean("attached"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean ATTACHED = getBoolean("attached"); @Override public boolean isAttached() { 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 ddad84f7c..79837ff2f 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBisected.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBisected.java @@ -4,7 +4,7 @@ import org.bukkit.block.data.Bisected; public class CraftBisected extends CraftBlockData implements Bisected { - private static final net.minecraft.server.BlockStateEnum HALF = getEnum("half"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum HALF = getEnum("half"); @Override public org.bukkit.block.data.Bisected.Half getHalf() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java index 0a377b202..76fd1fea3 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java @@ -9,18 +9,18 @@ import java.util.HashMap; import java.util.Map; import java.util.Set; import java.util.stream.Collectors; -import net.minecraft.server.ArgumentBlock; -import net.minecraft.server.Block; -import net.minecraft.server.BlockStateBoolean; -import net.minecraft.server.BlockStateEnum; -import net.minecraft.server.BlockStateInteger; -import net.minecraft.server.EnumDirection; -import net.minecraft.server.IBlockData; -import net.minecraft.server.IBlockDataHolder; -import net.minecraft.server.IBlockState; -import net.minecraft.server.INamable; -import net.minecraft.server.IRegistry; -import net.minecraft.server.NBTTagCompound; +import net.minecraft.commands.arguments.blocks.ArgumentBlock; +import net.minecraft.core.EnumDirection; +import net.minecraft.core.IRegistry; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.INamable; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.IBlockData; +import net.minecraft.world.level.block.state.IBlockDataHolder; +import net.minecraft.world.level.block.state.properties.BlockStateBoolean; +import net.minecraft.world.level.block.state.properties.BlockStateEnum; +import net.minecraft.world.level.block.state.properties.BlockStateInteger; +import net.minecraft.world.level.block.state.properties.IBlockState; import org.bukkit.Material; import org.bukkit.SoundGroup; import org.bukkit.block.BlockFace; @@ -342,133 +342,133 @@ public class CraftBlockData implements BlockData { static { // - register(net.minecraft.server.BlockAnvil.class, org.bukkit.craftbukkit.block.impl.CraftAnvil::new); - register(net.minecraft.server.BlockBamboo.class, org.bukkit.craftbukkit.block.impl.CraftBamboo::new); - register(net.minecraft.server.BlockBanner.class, org.bukkit.craftbukkit.block.impl.CraftBanner::new); - register(net.minecraft.server.BlockBannerWall.class, org.bukkit.craftbukkit.block.impl.CraftBannerWall::new); - register(net.minecraft.server.BlockBarrel.class, org.bukkit.craftbukkit.block.impl.CraftBarrel::new); - register(net.minecraft.server.BlockBed.class, org.bukkit.craftbukkit.block.impl.CraftBed::new); - register(net.minecraft.server.BlockBeehive.class, org.bukkit.craftbukkit.block.impl.CraftBeehive::new); - register(net.minecraft.server.BlockBeetroot.class, org.bukkit.craftbukkit.block.impl.CraftBeetroot::new); - register(net.minecraft.server.BlockBell.class, org.bukkit.craftbukkit.block.impl.CraftBell::new); - register(net.minecraft.server.BlockBlastFurnace.class, org.bukkit.craftbukkit.block.impl.CraftBlastFurnace::new); - register(net.minecraft.server.BlockBrewingStand.class, org.bukkit.craftbukkit.block.impl.CraftBrewingStand::new); - register(net.minecraft.server.BlockBubbleColumn.class, org.bukkit.craftbukkit.block.impl.CraftBubbleColumn::new); - register(net.minecraft.server.BlockCactus.class, org.bukkit.craftbukkit.block.impl.CraftCactus::new); - register(net.minecraft.server.BlockCake.class, org.bukkit.craftbukkit.block.impl.CraftCake::new); - register(net.minecraft.server.BlockCampfire.class, org.bukkit.craftbukkit.block.impl.CraftCampfire::new); - register(net.minecraft.server.BlockCarrots.class, org.bukkit.craftbukkit.block.impl.CraftCarrots::new); - register(net.minecraft.server.BlockCauldron.class, org.bukkit.craftbukkit.block.impl.CraftCauldron::new); - register(net.minecraft.server.BlockChain.class, org.bukkit.craftbukkit.block.impl.CraftChain::new); - register(net.minecraft.server.BlockChest.class, org.bukkit.craftbukkit.block.impl.CraftChest::new); - register(net.minecraft.server.BlockChestTrapped.class, org.bukkit.craftbukkit.block.impl.CraftChestTrapped::new); - register(net.minecraft.server.BlockChorusFlower.class, org.bukkit.craftbukkit.block.impl.CraftChorusFlower::new); - register(net.minecraft.server.BlockChorusFruit.class, org.bukkit.craftbukkit.block.impl.CraftChorusFruit::new); - register(net.minecraft.server.BlockCobbleWall.class, org.bukkit.craftbukkit.block.impl.CraftCobbleWall::new); - register(net.minecraft.server.BlockCocoa.class, org.bukkit.craftbukkit.block.impl.CraftCocoa::new); - register(net.minecraft.server.BlockCommand.class, org.bukkit.craftbukkit.block.impl.CraftCommand::new); - register(net.minecraft.server.BlockComposter.class, org.bukkit.craftbukkit.block.impl.CraftComposter::new); - register(net.minecraft.server.BlockConduit.class, org.bukkit.craftbukkit.block.impl.CraftConduit::new); - register(net.minecraft.server.BlockCoralDead.class, org.bukkit.craftbukkit.block.impl.CraftCoralDead::new); - register(net.minecraft.server.BlockCoralFan.class, org.bukkit.craftbukkit.block.impl.CraftCoralFan::new); - register(net.minecraft.server.BlockCoralFanAbstract.class, org.bukkit.craftbukkit.block.impl.CraftCoralFanAbstract::new); - register(net.minecraft.server.BlockCoralFanWall.class, org.bukkit.craftbukkit.block.impl.CraftCoralFanWall::new); - register(net.minecraft.server.BlockCoralFanWallAbstract.class, org.bukkit.craftbukkit.block.impl.CraftCoralFanWallAbstract::new); - register(net.minecraft.server.BlockCoralPlant.class, org.bukkit.craftbukkit.block.impl.CraftCoralPlant::new); - register(net.minecraft.server.BlockCrops.class, org.bukkit.craftbukkit.block.impl.CraftCrops::new); - register(net.minecraft.server.BlockDaylightDetector.class, org.bukkit.craftbukkit.block.impl.CraftDaylightDetector::new); - register(net.minecraft.server.BlockDirtSnow.class, org.bukkit.craftbukkit.block.impl.CraftDirtSnow::new); - register(net.minecraft.server.BlockDispenser.class, org.bukkit.craftbukkit.block.impl.CraftDispenser::new); - register(net.minecraft.server.BlockDoor.class, org.bukkit.craftbukkit.block.impl.CraftDoor::new); - register(net.minecraft.server.BlockDropper.class, org.bukkit.craftbukkit.block.impl.CraftDropper::new); - register(net.minecraft.server.BlockEndRod.class, org.bukkit.craftbukkit.block.impl.CraftEndRod::new); - register(net.minecraft.server.BlockEnderChest.class, org.bukkit.craftbukkit.block.impl.CraftEnderChest::new); - register(net.minecraft.server.BlockEnderPortalFrame.class, org.bukkit.craftbukkit.block.impl.CraftEnderPortalFrame::new); - register(net.minecraft.server.BlockFence.class, org.bukkit.craftbukkit.block.impl.CraftFence::new); - register(net.minecraft.server.BlockFenceGate.class, org.bukkit.craftbukkit.block.impl.CraftFenceGate::new); - register(net.minecraft.server.BlockFire.class, org.bukkit.craftbukkit.block.impl.CraftFire::new); - register(net.minecraft.server.BlockFloorSign.class, org.bukkit.craftbukkit.block.impl.CraftFloorSign::new); - register(net.minecraft.server.BlockFluids.class, org.bukkit.craftbukkit.block.impl.CraftFluids::new); - register(net.minecraft.server.BlockFurnaceFurace.class, org.bukkit.craftbukkit.block.impl.CraftFurnaceFurace::new); - register(net.minecraft.server.BlockGlazedTerracotta.class, org.bukkit.craftbukkit.block.impl.CraftGlazedTerracotta::new); - register(net.minecraft.server.BlockGrass.class, org.bukkit.craftbukkit.block.impl.CraftGrass::new); - register(net.minecraft.server.BlockGrindstone.class, org.bukkit.craftbukkit.block.impl.CraftGrindstone::new); - register(net.minecraft.server.BlockHay.class, org.bukkit.craftbukkit.block.impl.CraftHay::new); - register(net.minecraft.server.BlockHopper.class, org.bukkit.craftbukkit.block.impl.CraftHopper::new); - register(net.minecraft.server.BlockHugeMushroom.class, org.bukkit.craftbukkit.block.impl.CraftHugeMushroom::new); - register(net.minecraft.server.BlockIceFrost.class, org.bukkit.craftbukkit.block.impl.CraftIceFrost::new); - register(net.minecraft.server.BlockIronBars.class, org.bukkit.craftbukkit.block.impl.CraftIronBars::new); - register(net.minecraft.server.BlockJigsaw.class, org.bukkit.craftbukkit.block.impl.CraftJigsaw::new); - register(net.minecraft.server.BlockJukeBox.class, org.bukkit.craftbukkit.block.impl.CraftJukeBox::new); - register(net.minecraft.server.BlockKelp.class, org.bukkit.craftbukkit.block.impl.CraftKelp::new); - register(net.minecraft.server.BlockLadder.class, org.bukkit.craftbukkit.block.impl.CraftLadder::new); - register(net.minecraft.server.BlockLantern.class, org.bukkit.craftbukkit.block.impl.CraftLantern::new); - register(net.minecraft.server.BlockLeaves.class, org.bukkit.craftbukkit.block.impl.CraftLeaves::new); - register(net.minecraft.server.BlockLectern.class, org.bukkit.craftbukkit.block.impl.CraftLectern::new); - register(net.minecraft.server.BlockLever.class, org.bukkit.craftbukkit.block.impl.CraftLever::new); - register(net.minecraft.server.BlockLoom.class, org.bukkit.craftbukkit.block.impl.CraftLoom::new); - register(net.minecraft.server.BlockMinecartDetector.class, org.bukkit.craftbukkit.block.impl.CraftMinecartDetector::new); - register(net.minecraft.server.BlockMinecartTrack.class, org.bukkit.craftbukkit.block.impl.CraftMinecartTrack::new); - register(net.minecraft.server.BlockMycel.class, org.bukkit.craftbukkit.block.impl.CraftMycel::new); - register(net.minecraft.server.BlockNetherWart.class, org.bukkit.craftbukkit.block.impl.CraftNetherWart::new); - register(net.minecraft.server.BlockNote.class, org.bukkit.craftbukkit.block.impl.CraftNote::new); - register(net.minecraft.server.BlockObserver.class, org.bukkit.craftbukkit.block.impl.CraftObserver::new); - register(net.minecraft.server.BlockPiston.class, org.bukkit.craftbukkit.block.impl.CraftPiston::new); - register(net.minecraft.server.BlockPistonExtension.class, org.bukkit.craftbukkit.block.impl.CraftPistonExtension::new); - register(net.minecraft.server.BlockPistonMoving.class, org.bukkit.craftbukkit.block.impl.CraftPistonMoving::new); - register(net.minecraft.server.BlockPortal.class, org.bukkit.craftbukkit.block.impl.CraftPortal::new); - register(net.minecraft.server.BlockPotatoes.class, org.bukkit.craftbukkit.block.impl.CraftPotatoes::new); - register(net.minecraft.server.BlockPoweredRail.class, org.bukkit.craftbukkit.block.impl.CraftPoweredRail::new); - register(net.minecraft.server.BlockPressurePlateBinary.class, org.bukkit.craftbukkit.block.impl.CraftPressurePlateBinary::new); - register(net.minecraft.server.BlockPressurePlateWeighted.class, org.bukkit.craftbukkit.block.impl.CraftPressurePlateWeighted::new); - register(net.minecraft.server.BlockPumpkinCarved.class, org.bukkit.craftbukkit.block.impl.CraftPumpkinCarved::new); - register(net.minecraft.server.BlockRedstoneComparator.class, org.bukkit.craftbukkit.block.impl.CraftRedstoneComparator::new); - register(net.minecraft.server.BlockRedstoneLamp.class, org.bukkit.craftbukkit.block.impl.CraftRedstoneLamp::new); - register(net.minecraft.server.BlockRedstoneOre.class, org.bukkit.craftbukkit.block.impl.CraftRedstoneOre::new); - register(net.minecraft.server.BlockRedstoneTorch.class, org.bukkit.craftbukkit.block.impl.CraftRedstoneTorch::new); - register(net.minecraft.server.BlockRedstoneTorchWall.class, org.bukkit.craftbukkit.block.impl.CraftRedstoneTorchWall::new); - register(net.minecraft.server.BlockRedstoneWire.class, org.bukkit.craftbukkit.block.impl.CraftRedstoneWire::new); - register(net.minecraft.server.BlockReed.class, org.bukkit.craftbukkit.block.impl.CraftReed::new); - register(net.minecraft.server.BlockRepeater.class, org.bukkit.craftbukkit.block.impl.CraftRepeater::new); - register(net.minecraft.server.BlockRespawnAnchor.class, org.bukkit.craftbukkit.block.impl.CraftRespawnAnchor::new); - register(net.minecraft.server.BlockRotatable.class, org.bukkit.craftbukkit.block.impl.CraftRotatable::new); - register(net.minecraft.server.BlockSapling.class, org.bukkit.craftbukkit.block.impl.CraftSapling::new); - register(net.minecraft.server.BlockScaffolding.class, org.bukkit.craftbukkit.block.impl.CraftScaffolding::new); - register(net.minecraft.server.BlockSeaPickle.class, org.bukkit.craftbukkit.block.impl.CraftSeaPickle::new); - register(net.minecraft.server.BlockShulkerBox.class, org.bukkit.craftbukkit.block.impl.CraftShulkerBox::new); - register(net.minecraft.server.BlockSkull.class, org.bukkit.craftbukkit.block.impl.CraftSkull::new); - register(net.minecraft.server.BlockSkullPlayer.class, org.bukkit.craftbukkit.block.impl.CraftSkullPlayer::new); - register(net.minecraft.server.BlockSkullPlayerWall.class, org.bukkit.craftbukkit.block.impl.CraftSkullPlayerWall::new); - register(net.minecraft.server.BlockSkullWall.class, org.bukkit.craftbukkit.block.impl.CraftSkullWall::new); - register(net.minecraft.server.BlockSmoker.class, org.bukkit.craftbukkit.block.impl.CraftSmoker::new); - register(net.minecraft.server.BlockSnow.class, org.bukkit.craftbukkit.block.impl.CraftSnow::new); - register(net.minecraft.server.BlockSoil.class, org.bukkit.craftbukkit.block.impl.CraftSoil::new); - register(net.minecraft.server.BlockStainedGlassPane.class, org.bukkit.craftbukkit.block.impl.CraftStainedGlassPane::new); - register(net.minecraft.server.BlockStairs.class, org.bukkit.craftbukkit.block.impl.CraftStairs::new); - register(net.minecraft.server.BlockStem.class, org.bukkit.craftbukkit.block.impl.CraftStem::new); - register(net.minecraft.server.BlockStemAttached.class, org.bukkit.craftbukkit.block.impl.CraftStemAttached::new); - register(net.minecraft.server.BlockStepAbstract.class, org.bukkit.craftbukkit.block.impl.CraftStepAbstract::new); - register(net.minecraft.server.BlockStoneButton.class, org.bukkit.craftbukkit.block.impl.CraftStoneButton::new); - register(net.minecraft.server.BlockStonecutter.class, org.bukkit.craftbukkit.block.impl.CraftStonecutter::new); - register(net.minecraft.server.BlockStructure.class, org.bukkit.craftbukkit.block.impl.CraftStructure::new); - register(net.minecraft.server.BlockSweetBerryBush.class, org.bukkit.craftbukkit.block.impl.CraftSweetBerryBush::new); - register(net.minecraft.server.BlockTNT.class, org.bukkit.craftbukkit.block.impl.CraftTNT::new); - register(net.minecraft.server.BlockTallPlant.class, org.bukkit.craftbukkit.block.impl.CraftTallPlant::new); - register(net.minecraft.server.BlockTallPlantFlower.class, org.bukkit.craftbukkit.block.impl.CraftTallPlantFlower::new); - register(net.minecraft.server.BlockTallSeaGrass.class, org.bukkit.craftbukkit.block.impl.CraftTallSeaGrass::new); - register(net.minecraft.server.BlockTarget.class, org.bukkit.craftbukkit.block.impl.CraftTarget::new); - register(net.minecraft.server.BlockTorchWall.class, org.bukkit.craftbukkit.block.impl.CraftTorchWall::new); - register(net.minecraft.server.BlockTrapdoor.class, org.bukkit.craftbukkit.block.impl.CraftTrapdoor::new); - register(net.minecraft.server.BlockTripwire.class, org.bukkit.craftbukkit.block.impl.CraftTripwire::new); - register(net.minecraft.server.BlockTripwireHook.class, org.bukkit.craftbukkit.block.impl.CraftTripwireHook::new); - register(net.minecraft.server.BlockTurtleEgg.class, org.bukkit.craftbukkit.block.impl.CraftTurtleEgg::new); - register(net.minecraft.server.BlockTwistingVines.class, org.bukkit.craftbukkit.block.impl.CraftTwistingVines::new); - register(net.minecraft.server.BlockVine.class, org.bukkit.craftbukkit.block.impl.CraftVine::new); - register(net.minecraft.server.BlockWallSign.class, org.bukkit.craftbukkit.block.impl.CraftWallSign::new); - register(net.minecraft.server.BlockWeepingVines.class, org.bukkit.craftbukkit.block.impl.CraftWeepingVines::new); - register(net.minecraft.server.BlockWitherSkull.class, org.bukkit.craftbukkit.block.impl.CraftWitherSkull::new); - register(net.minecraft.server.BlockWitherSkullWall.class, org.bukkit.craftbukkit.block.impl.CraftWitherSkullWall::new); - register(net.minecraft.server.BlockWoodButton.class, org.bukkit.craftbukkit.block.impl.CraftWoodButton::new); + register(net.minecraft.world.level.block.BlockAnvil.class, org.bukkit.craftbukkit.block.impl.CraftAnvil::new); + register(net.minecraft.world.level.block.BlockBamboo.class, org.bukkit.craftbukkit.block.impl.CraftBamboo::new); + register(net.minecraft.world.level.block.BlockBanner.class, org.bukkit.craftbukkit.block.impl.CraftBanner::new); + register(net.minecraft.world.level.block.BlockBannerWall.class, org.bukkit.craftbukkit.block.impl.CraftBannerWall::new); + register(net.minecraft.world.level.block.BlockBarrel.class, org.bukkit.craftbukkit.block.impl.CraftBarrel::new); + register(net.minecraft.world.level.block.BlockBed.class, org.bukkit.craftbukkit.block.impl.CraftBed::new); + register(net.minecraft.world.level.block.BlockBeehive.class, org.bukkit.craftbukkit.block.impl.CraftBeehive::new); + register(net.minecraft.world.level.block.BlockBeetroot.class, org.bukkit.craftbukkit.block.impl.CraftBeetroot::new); + register(net.minecraft.world.level.block.BlockBell.class, org.bukkit.craftbukkit.block.impl.CraftBell::new); + register(net.minecraft.world.level.block.BlockBlastFurnace.class, org.bukkit.craftbukkit.block.impl.CraftBlastFurnace::new); + register(net.minecraft.world.level.block.BlockBrewingStand.class, org.bukkit.craftbukkit.block.impl.CraftBrewingStand::new); + register(net.minecraft.world.level.block.BlockBubbleColumn.class, org.bukkit.craftbukkit.block.impl.CraftBubbleColumn::new); + register(net.minecraft.world.level.block.BlockCactus.class, org.bukkit.craftbukkit.block.impl.CraftCactus::new); + register(net.minecraft.world.level.block.BlockCake.class, org.bukkit.craftbukkit.block.impl.CraftCake::new); + register(net.minecraft.world.level.block.BlockCampfire.class, org.bukkit.craftbukkit.block.impl.CraftCampfire::new); + register(net.minecraft.world.level.block.BlockCarrots.class, org.bukkit.craftbukkit.block.impl.CraftCarrots::new); + register(net.minecraft.world.level.block.BlockCauldron.class, org.bukkit.craftbukkit.block.impl.CraftCauldron::new); + register(net.minecraft.world.level.block.BlockChain.class, org.bukkit.craftbukkit.block.impl.CraftChain::new); + register(net.minecraft.world.level.block.BlockChest.class, org.bukkit.craftbukkit.block.impl.CraftChest::new); + register(net.minecraft.world.level.block.BlockChestTrapped.class, org.bukkit.craftbukkit.block.impl.CraftChestTrapped::new); + register(net.minecraft.world.level.block.BlockChorusFlower.class, org.bukkit.craftbukkit.block.impl.CraftChorusFlower::new); + register(net.minecraft.world.level.block.BlockChorusFruit.class, org.bukkit.craftbukkit.block.impl.CraftChorusFruit::new); + register(net.minecraft.world.level.block.BlockCobbleWall.class, org.bukkit.craftbukkit.block.impl.CraftCobbleWall::new); + register(net.minecraft.world.level.block.BlockCocoa.class, org.bukkit.craftbukkit.block.impl.CraftCocoa::new); + register(net.minecraft.world.level.block.BlockCommand.class, org.bukkit.craftbukkit.block.impl.CraftCommand::new); + register(net.minecraft.world.level.block.BlockComposter.class, org.bukkit.craftbukkit.block.impl.CraftComposter::new); + register(net.minecraft.world.level.block.BlockConduit.class, org.bukkit.craftbukkit.block.impl.CraftConduit::new); + register(net.minecraft.world.level.block.BlockCoralDead.class, org.bukkit.craftbukkit.block.impl.CraftCoralDead::new); + register(net.minecraft.world.level.block.BlockCoralFan.class, org.bukkit.craftbukkit.block.impl.CraftCoralFan::new); + register(net.minecraft.world.level.block.BlockCoralFanAbstract.class, org.bukkit.craftbukkit.block.impl.CraftCoralFanAbstract::new); + register(net.minecraft.world.level.block.BlockCoralFanWall.class, org.bukkit.craftbukkit.block.impl.CraftCoralFanWall::new); + register(net.minecraft.world.level.block.BlockCoralFanWallAbstract.class, org.bukkit.craftbukkit.block.impl.CraftCoralFanWallAbstract::new); + register(net.minecraft.world.level.block.BlockCoralPlant.class, org.bukkit.craftbukkit.block.impl.CraftCoralPlant::new); + register(net.minecraft.world.level.block.BlockCrops.class, org.bukkit.craftbukkit.block.impl.CraftCrops::new); + register(net.minecraft.world.level.block.BlockDaylightDetector.class, org.bukkit.craftbukkit.block.impl.CraftDaylightDetector::new); + register(net.minecraft.world.level.block.BlockDirtSnow.class, org.bukkit.craftbukkit.block.impl.CraftDirtSnow::new); + register(net.minecraft.world.level.block.BlockDispenser.class, org.bukkit.craftbukkit.block.impl.CraftDispenser::new); + register(net.minecraft.world.level.block.BlockDoor.class, org.bukkit.craftbukkit.block.impl.CraftDoor::new); + register(net.minecraft.world.level.block.BlockDropper.class, org.bukkit.craftbukkit.block.impl.CraftDropper::new); + register(net.minecraft.world.level.block.BlockEndRod.class, org.bukkit.craftbukkit.block.impl.CraftEndRod::new); + register(net.minecraft.world.level.block.BlockEnderChest.class, org.bukkit.craftbukkit.block.impl.CraftEnderChest::new); + register(net.minecraft.world.level.block.BlockEnderPortalFrame.class, org.bukkit.craftbukkit.block.impl.CraftEnderPortalFrame::new); + register(net.minecraft.world.level.block.BlockFence.class, org.bukkit.craftbukkit.block.impl.CraftFence::new); + register(net.minecraft.world.level.block.BlockFenceGate.class, org.bukkit.craftbukkit.block.impl.CraftFenceGate::new); + register(net.minecraft.world.level.block.BlockFire.class, org.bukkit.craftbukkit.block.impl.CraftFire::new); + register(net.minecraft.world.level.block.BlockFloorSign.class, org.bukkit.craftbukkit.block.impl.CraftFloorSign::new); + register(net.minecraft.world.level.block.BlockFluids.class, org.bukkit.craftbukkit.block.impl.CraftFluids::new); + register(net.minecraft.world.level.block.BlockFurnaceFurace.class, org.bukkit.craftbukkit.block.impl.CraftFurnaceFurace::new); + register(net.minecraft.world.level.block.BlockGlazedTerracotta.class, org.bukkit.craftbukkit.block.impl.CraftGlazedTerracotta::new); + register(net.minecraft.world.level.block.BlockGrass.class, org.bukkit.craftbukkit.block.impl.CraftGrass::new); + register(net.minecraft.world.level.block.BlockGrindstone.class, org.bukkit.craftbukkit.block.impl.CraftGrindstone::new); + register(net.minecraft.world.level.block.BlockHay.class, org.bukkit.craftbukkit.block.impl.CraftHay::new); + register(net.minecraft.world.level.block.BlockHopper.class, org.bukkit.craftbukkit.block.impl.CraftHopper::new); + register(net.minecraft.world.level.block.BlockHugeMushroom.class, org.bukkit.craftbukkit.block.impl.CraftHugeMushroom::new); + register(net.minecraft.world.level.block.BlockIceFrost.class, org.bukkit.craftbukkit.block.impl.CraftIceFrost::new); + register(net.minecraft.world.level.block.BlockIronBars.class, org.bukkit.craftbukkit.block.impl.CraftIronBars::new); + register(net.minecraft.world.level.block.BlockJigsaw.class, org.bukkit.craftbukkit.block.impl.CraftJigsaw::new); + register(net.minecraft.world.level.block.BlockJukeBox.class, org.bukkit.craftbukkit.block.impl.CraftJukeBox::new); + register(net.minecraft.world.level.block.BlockKelp.class, org.bukkit.craftbukkit.block.impl.CraftKelp::new); + register(net.minecraft.world.level.block.BlockLadder.class, org.bukkit.craftbukkit.block.impl.CraftLadder::new); + register(net.minecraft.world.level.block.BlockLantern.class, org.bukkit.craftbukkit.block.impl.CraftLantern::new); + register(net.minecraft.world.level.block.BlockLeaves.class, org.bukkit.craftbukkit.block.impl.CraftLeaves::new); + register(net.minecraft.world.level.block.BlockLectern.class, org.bukkit.craftbukkit.block.impl.CraftLectern::new); + register(net.minecraft.world.level.block.BlockLever.class, org.bukkit.craftbukkit.block.impl.CraftLever::new); + register(net.minecraft.world.level.block.BlockLoom.class, org.bukkit.craftbukkit.block.impl.CraftLoom::new); + register(net.minecraft.world.level.block.BlockMinecartDetector.class, org.bukkit.craftbukkit.block.impl.CraftMinecartDetector::new); + register(net.minecraft.world.level.block.BlockMinecartTrack.class, org.bukkit.craftbukkit.block.impl.CraftMinecartTrack::new); + register(net.minecraft.world.level.block.BlockMycel.class, org.bukkit.craftbukkit.block.impl.CraftMycel::new); + register(net.minecraft.world.level.block.BlockNetherWart.class, org.bukkit.craftbukkit.block.impl.CraftNetherWart::new); + register(net.minecraft.world.level.block.BlockNote.class, org.bukkit.craftbukkit.block.impl.CraftNote::new); + register(net.minecraft.world.level.block.BlockObserver.class, org.bukkit.craftbukkit.block.impl.CraftObserver::new); + register(net.minecraft.world.level.block.piston.BlockPiston.class, org.bukkit.craftbukkit.block.impl.CraftPiston::new); + register(net.minecraft.world.level.block.piston.BlockPistonExtension.class, org.bukkit.craftbukkit.block.impl.CraftPistonExtension::new); + register(net.minecraft.world.level.block.piston.BlockPistonMoving.class, org.bukkit.craftbukkit.block.impl.CraftPistonMoving::new); + register(net.minecraft.world.level.block.BlockPortal.class, org.bukkit.craftbukkit.block.impl.CraftPortal::new); + register(net.minecraft.world.level.block.BlockPotatoes.class, org.bukkit.craftbukkit.block.impl.CraftPotatoes::new); + register(net.minecraft.world.level.block.BlockPoweredRail.class, org.bukkit.craftbukkit.block.impl.CraftPoweredRail::new); + register(net.minecraft.world.level.block.BlockPressurePlateBinary.class, org.bukkit.craftbukkit.block.impl.CraftPressurePlateBinary::new); + register(net.minecraft.world.level.block.BlockPressurePlateWeighted.class, org.bukkit.craftbukkit.block.impl.CraftPressurePlateWeighted::new); + register(net.minecraft.world.level.block.BlockPumpkinCarved.class, org.bukkit.craftbukkit.block.impl.CraftPumpkinCarved::new); + register(net.minecraft.world.level.block.BlockRedstoneComparator.class, org.bukkit.craftbukkit.block.impl.CraftRedstoneComparator::new); + register(net.minecraft.world.level.block.BlockRedstoneLamp.class, org.bukkit.craftbukkit.block.impl.CraftRedstoneLamp::new); + register(net.minecraft.world.level.block.BlockRedstoneOre.class, org.bukkit.craftbukkit.block.impl.CraftRedstoneOre::new); + register(net.minecraft.world.level.block.BlockRedstoneTorch.class, org.bukkit.craftbukkit.block.impl.CraftRedstoneTorch::new); + register(net.minecraft.world.level.block.BlockRedstoneTorchWall.class, org.bukkit.craftbukkit.block.impl.CraftRedstoneTorchWall::new); + register(net.minecraft.world.level.block.BlockRedstoneWire.class, org.bukkit.craftbukkit.block.impl.CraftRedstoneWire::new); + register(net.minecraft.world.level.block.BlockReed.class, org.bukkit.craftbukkit.block.impl.CraftReed::new); + register(net.minecraft.world.level.block.BlockRepeater.class, org.bukkit.craftbukkit.block.impl.CraftRepeater::new); + register(net.minecraft.world.level.block.BlockRespawnAnchor.class, org.bukkit.craftbukkit.block.impl.CraftRespawnAnchor::new); + register(net.minecraft.world.level.block.BlockRotatable.class, org.bukkit.craftbukkit.block.impl.CraftRotatable::new); + register(net.minecraft.world.level.block.BlockSapling.class, org.bukkit.craftbukkit.block.impl.CraftSapling::new); + register(net.minecraft.world.level.block.BlockScaffolding.class, org.bukkit.craftbukkit.block.impl.CraftScaffolding::new); + register(net.minecraft.world.level.block.BlockSeaPickle.class, org.bukkit.craftbukkit.block.impl.CraftSeaPickle::new); + register(net.minecraft.world.level.block.BlockShulkerBox.class, org.bukkit.craftbukkit.block.impl.CraftShulkerBox::new); + register(net.minecraft.world.level.block.BlockSkull.class, org.bukkit.craftbukkit.block.impl.CraftSkull::new); + register(net.minecraft.world.level.block.BlockSkullPlayer.class, org.bukkit.craftbukkit.block.impl.CraftSkullPlayer::new); + register(net.minecraft.world.level.block.BlockSkullPlayerWall.class, org.bukkit.craftbukkit.block.impl.CraftSkullPlayerWall::new); + register(net.minecraft.world.level.block.BlockSkullWall.class, org.bukkit.craftbukkit.block.impl.CraftSkullWall::new); + register(net.minecraft.world.level.block.BlockSmoker.class, org.bukkit.craftbukkit.block.impl.CraftSmoker::new); + register(net.minecraft.world.level.block.BlockSnow.class, org.bukkit.craftbukkit.block.impl.CraftSnow::new); + register(net.minecraft.world.level.block.BlockSoil.class, org.bukkit.craftbukkit.block.impl.CraftSoil::new); + register(net.minecraft.world.level.block.BlockStainedGlassPane.class, org.bukkit.craftbukkit.block.impl.CraftStainedGlassPane::new); + register(net.minecraft.world.level.block.BlockStairs.class, org.bukkit.craftbukkit.block.impl.CraftStairs::new); + register(net.minecraft.world.level.block.BlockStem.class, org.bukkit.craftbukkit.block.impl.CraftStem::new); + register(net.minecraft.world.level.block.BlockStemAttached.class, org.bukkit.craftbukkit.block.impl.CraftStemAttached::new); + register(net.minecraft.world.level.block.BlockStepAbstract.class, org.bukkit.craftbukkit.block.impl.CraftStepAbstract::new); + register(net.minecraft.world.level.block.BlockStoneButton.class, org.bukkit.craftbukkit.block.impl.CraftStoneButton::new); + register(net.minecraft.world.level.block.BlockStonecutter.class, org.bukkit.craftbukkit.block.impl.CraftStonecutter::new); + register(net.minecraft.world.level.block.BlockStructure.class, org.bukkit.craftbukkit.block.impl.CraftStructure::new); + register(net.minecraft.world.level.block.BlockSweetBerryBush.class, org.bukkit.craftbukkit.block.impl.CraftSweetBerryBush::new); + register(net.minecraft.world.level.block.BlockTNT.class, org.bukkit.craftbukkit.block.impl.CraftTNT::new); + register(net.minecraft.world.level.block.BlockTallPlant.class, org.bukkit.craftbukkit.block.impl.CraftTallPlant::new); + register(net.minecraft.world.level.block.BlockTallPlantFlower.class, org.bukkit.craftbukkit.block.impl.CraftTallPlantFlower::new); + register(net.minecraft.world.level.block.BlockTallSeaGrass.class, org.bukkit.craftbukkit.block.impl.CraftTallSeaGrass::new); + register(net.minecraft.world.level.block.BlockTarget.class, org.bukkit.craftbukkit.block.impl.CraftTarget::new); + register(net.minecraft.world.level.block.BlockTorchWall.class, org.bukkit.craftbukkit.block.impl.CraftTorchWall::new); + register(net.minecraft.world.level.block.BlockTrapdoor.class, org.bukkit.craftbukkit.block.impl.CraftTrapdoor::new); + register(net.minecraft.world.level.block.BlockTripwire.class, org.bukkit.craftbukkit.block.impl.CraftTripwire::new); + register(net.minecraft.world.level.block.BlockTripwireHook.class, org.bukkit.craftbukkit.block.impl.CraftTripwireHook::new); + register(net.minecraft.world.level.block.BlockTurtleEgg.class, org.bukkit.craftbukkit.block.impl.CraftTurtleEgg::new); + register(net.minecraft.world.level.block.BlockTwistingVines.class, org.bukkit.craftbukkit.block.impl.CraftTwistingVines::new); + register(net.minecraft.world.level.block.BlockVine.class, org.bukkit.craftbukkit.block.impl.CraftVine::new); + register(net.minecraft.world.level.block.BlockWallSign.class, org.bukkit.craftbukkit.block.impl.CraftWallSign::new); + register(net.minecraft.world.level.block.BlockWeepingVines.class, org.bukkit.craftbukkit.block.impl.CraftWeepingVines::new); + register(net.minecraft.world.level.block.BlockWitherSkull.class, org.bukkit.craftbukkit.block.impl.CraftWitherSkull::new); + register(net.minecraft.world.level.block.BlockWitherSkullWall.class, org.bukkit.craftbukkit.block.impl.CraftWitherSkullWall::new); + register(net.minecraft.world.level.block.BlockWoodButton.class, org.bukkit.craftbukkit.block.impl.CraftWoodButton::new); // } diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftDirectional.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftDirectional.java index 7b3ec8811..7c7f118df 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftDirectional.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftDirectional.java @@ -4,7 +4,7 @@ import org.bukkit.block.data.Directional; public abstract class CraftDirectional extends CraftBlockData implements Directional { - private static final net.minecraft.server.BlockStateEnum FACING = getEnum("facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum("facing"); @Override public org.bukkit.block.BlockFace getFacing() { 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 6f84d54a0..6ab47e6b3 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftFaceAttachable.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftFaceAttachable.java @@ -4,7 +4,7 @@ import org.bukkit.block.data.FaceAttachable; public abstract class CraftFaceAttachable extends CraftBlockData implements FaceAttachable { - private static final net.minecraft.server.BlockStateEnum ATTACH_FACE = getEnum("face"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum ATTACH_FACE = getEnum("face"); @Override public org.bukkit.block.data.FaceAttachable.AttachedFace getAttachedFace() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftLevelled.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftLevelled.java index 3d4afa748..fb7b5ae8c 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftLevelled.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftLevelled.java @@ -4,7 +4,7 @@ import org.bukkit.block.data.Levelled; public abstract class CraftLevelled extends CraftBlockData implements Levelled { - private static final net.minecraft.server.BlockStateInteger LEVEL = getInteger("level"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger LEVEL = getInteger("level"); @Override public int getLevel() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftLightable.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftLightable.java index cfe4b26e4..684c868f0 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftLightable.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftLightable.java @@ -4,7 +4,7 @@ import org.bukkit.block.data.Lightable; public abstract class CraftLightable extends CraftBlockData implements Lightable { - private static final net.minecraft.server.BlockStateBoolean LIT = getBoolean("lit"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean LIT = getBoolean("lit"); @Override public boolean isLit() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftMultipleFacing.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftMultipleFacing.java index ac2a335f9..7748d40de 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftMultipleFacing.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftMultipleFacing.java @@ -4,13 +4,13 @@ import org.bukkit.block.data.MultipleFacing; public abstract class CraftMultipleFacing extends CraftBlockData implements MultipleFacing { - private static final net.minecraft.server.BlockStateBoolean[] FACES = new net.minecraft.server.BlockStateBoolean[]{ + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean[] FACES = new net.minecraft.world.level.block.state.properties.BlockStateBoolean[]{ getBoolean("north", true), getBoolean("east", true), getBoolean("south", true), getBoolean("west", true), getBoolean("up", true), getBoolean("down", true) }; @Override public boolean hasFace(org.bukkit.block.BlockFace face) { - net.minecraft.server.BlockStateBoolean state = FACES[face.ordinal()]; + net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()]; if (state == null) { throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces."); } @@ -19,7 +19,7 @@ public abstract class CraftMultipleFacing extends CraftBlockData implements Mult @Override public void setFace(org.bukkit.block.BlockFace face, boolean has) { - net.minecraft.server.BlockStateBoolean state = FACES[face.ordinal()]; + net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()]; if (state == null) { throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces."); } diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftOpenable.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftOpenable.java index 31abd411e..738e5c6b1 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftOpenable.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftOpenable.java @@ -4,7 +4,7 @@ import org.bukkit.block.data.Openable; public abstract class CraftOpenable extends CraftBlockData implements Openable { - private static final net.minecraft.server.BlockStateBoolean OPEN = getBoolean("open"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean OPEN = getBoolean("open"); @Override public boolean isOpen() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftOrientable.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftOrientable.java index 72cc0aa97..b556d0817 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftOrientable.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftOrientable.java @@ -4,7 +4,7 @@ import org.bukkit.block.data.Orientable; public class CraftOrientable extends CraftBlockData implements Orientable { - private static final net.minecraft.server.BlockStateEnum AXIS = getEnum("axis"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum AXIS = getEnum("axis"); @Override public org.bukkit.Axis getAxis() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftPowerable.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftPowerable.java index f932cf17f..bbe860fdb 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftPowerable.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftPowerable.java @@ -4,7 +4,7 @@ import org.bukkit.block.data.Powerable; public abstract class CraftPowerable extends CraftBlockData implements Powerable { - private static final net.minecraft.server.BlockStateBoolean POWERED = getBoolean("powered"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean("powered"); @Override public boolean isPowered() { 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 5774ba5f5..b44fe1cfc 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftRail.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftRail.java @@ -4,7 +4,7 @@ import org.bukkit.block.data.Rail; public abstract class CraftRail extends CraftBlockData implements Rail { - private static final net.minecraft.server.BlockStateEnum SHAPE = getEnum("shape"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum SHAPE = getEnum("shape"); @Override public org.bukkit.block.data.Rail.Shape getShape() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftRotatable.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftRotatable.java index 78668da5b..907387eea 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftRotatable.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftRotatable.java @@ -4,7 +4,7 @@ import org.bukkit.block.data.Rotatable; public abstract class CraftRotatable extends CraftBlockData implements Rotatable { - private static final net.minecraft.server.BlockStateInteger ROTATION = getInteger("rotation"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger ROTATION = getInteger("rotation"); @Override public org.bukkit.block.BlockFace getRotation() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftSnowable.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftSnowable.java index e59c3d230..81dba3851 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftSnowable.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftSnowable.java @@ -4,7 +4,7 @@ import org.bukkit.block.data.Snowable; public abstract class CraftSnowable extends CraftBlockData implements Snowable { - private static final net.minecraft.server.BlockStateBoolean SNOWY = getBoolean("snowy"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean SNOWY = getBoolean("snowy"); @Override public boolean isSnowy() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftWaterlogged.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftWaterlogged.java index 4e1a672fc..43f2d7a6c 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftWaterlogged.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftWaterlogged.java @@ -4,7 +4,7 @@ import org.bukkit.block.data.Waterlogged; public abstract class CraftWaterlogged extends CraftBlockData implements Waterlogged { - private static final net.minecraft.server.BlockStateBoolean WATERLOGGED = getBoolean("waterlogged"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean("waterlogged"); @Override public boolean isWaterlogged() { 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 aab2575cd..1c5ba682d 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 @@ -5,7 +5,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; public abstract class CraftBamboo extends CraftBlockData implements Bamboo { - private static final net.minecraft.server.BlockStateEnum LEAVES = getEnum("leaves"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum LEAVES = getEnum("leaves"); @Override public org.bukkit.block.data.type.Bamboo.Leaves getLeaves() { 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 9de782196..3c12a80af 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 @@ -5,8 +5,8 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; public abstract class CraftBed extends CraftBlockData implements Bed { - private static final net.minecraft.server.BlockStateEnum PART = getEnum("part"); - private static final net.minecraft.server.BlockStateBoolean OCCUPIED = getBoolean("occupied"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum PART = getEnum("part"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean OCCUPIED = getBoolean("occupied"); @Override public org.bukkit.block.data.type.Bed.Part getPart() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBeehive.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBeehive.java index 084b8f94f..8966c06ed 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBeehive.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBeehive.java @@ -5,7 +5,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; public abstract class CraftBeehive extends CraftBlockData implements Beehive { - private static final net.minecraft.server.BlockStateInteger HONEY_LEVEL = getInteger("honey_level"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger HONEY_LEVEL = getInteger("honey_level"); @Override public int getHoneyLevel() { 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 f765b00f9..a360627ce 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 @@ -5,7 +5,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; public abstract class CraftBell extends CraftBlockData implements Bell { - private static final net.minecraft.server.BlockStateEnum ATTACHMENT = getEnum("attachment"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum ATTACHMENT = getEnum("attachment"); @Override public org.bukkit.block.data.type.Bell.Attachment getAttachment() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBrewingStand.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBrewingStand.java index 9349e02fe..b446b4d2f 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBrewingStand.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBrewingStand.java @@ -5,7 +5,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; public abstract class CraftBrewingStand extends CraftBlockData implements BrewingStand { - private static final net.minecraft.server.BlockStateBoolean[] HAS_BOTTLE = new net.minecraft.server.BlockStateBoolean[]{ + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean[] HAS_BOTTLE = new net.minecraft.world.level.block.state.properties.BlockStateBoolean[]{ getBoolean("has_bottle_0"), getBoolean("has_bottle_1"), getBoolean("has_bottle_2") }; diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBubbleColumn.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBubbleColumn.java index eedb51022..a5fc982c5 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBubbleColumn.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBubbleColumn.java @@ -5,7 +5,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; public abstract class CraftBubbleColumn extends CraftBlockData implements BubbleColumn { - private static final net.minecraft.server.BlockStateBoolean DRAG = getBoolean("drag"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean DRAG = getBoolean("drag"); @Override public boolean isDrag() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftCake.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftCake.java index aae60937b..24f0c31b5 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftCake.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftCake.java @@ -5,7 +5,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; public abstract class CraftCake extends CraftBlockData implements Cake { - private static final net.minecraft.server.BlockStateInteger BITES = getInteger("bites"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger BITES = getInteger("bites"); @Override public int getBites() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftCampfire.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftCampfire.java index 99250172b..3f13c29aa 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftCampfire.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftCampfire.java @@ -5,7 +5,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; public abstract class CraftCampfire extends CraftBlockData implements Campfire { - private static final net.minecraft.server.BlockStateBoolean SIGNAL_FIRE = getBoolean("signal_fire"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean SIGNAL_FIRE = getBoolean("signal_fire"); @Override public boolean isSignalFire() { 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 822c4fce1..bfb700be6 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 @@ -5,7 +5,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; public abstract class CraftChest extends CraftBlockData implements Chest { - private static final net.minecraft.server.BlockStateEnum TYPE = getEnum("type"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum TYPE = getEnum("type"); @Override public org.bukkit.block.data.type.Chest.Type getType() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftCommandBlock.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftCommandBlock.java index ddb9ac5e0..132df8713 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftCommandBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftCommandBlock.java @@ -5,7 +5,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; public abstract class CraftCommandBlock extends CraftBlockData implements CommandBlock { - private static final net.minecraft.server.BlockStateBoolean CONDITIONAL = getBoolean("conditional"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean CONDITIONAL = getBoolean("conditional"); @Override public boolean isConditional() { 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 450361e16..09378dde4 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 @@ -5,7 +5,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; public abstract class CraftComparator extends CraftBlockData implements Comparator { - private static final net.minecraft.server.BlockStateEnum MODE = getEnum("mode"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum MODE = getEnum("mode"); @Override public org.bukkit.block.data.type.Comparator.Mode getMode() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftDaylightDetector.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftDaylightDetector.java index 842fe51f9..f58d0ce46 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftDaylightDetector.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftDaylightDetector.java @@ -5,7 +5,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; public abstract class CraftDaylightDetector extends CraftBlockData implements DaylightDetector { - private static final net.minecraft.server.BlockStateBoolean INVERTED = getBoolean("inverted"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean INVERTED = getBoolean("inverted"); @Override public boolean isInverted() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftDispenser.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftDispenser.java index 5d43240e7..c674d19e0 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftDispenser.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftDispenser.java @@ -5,7 +5,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; public abstract class CraftDispenser extends CraftBlockData implements Dispenser { - private static final net.minecraft.server.BlockStateBoolean TRIGGERED = getBoolean("triggered"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean TRIGGERED = getBoolean("triggered"); @Override public boolean isTriggered() { 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 5d435a65c..6681c4334 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 @@ -5,7 +5,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; public abstract class CraftDoor extends CraftBlockData implements Door { - private static final net.minecraft.server.BlockStateEnum HINGE = getEnum("hinge"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum HINGE = getEnum("hinge"); @Override public org.bukkit.block.data.type.Door.Hinge getHinge() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftEndPortalFrame.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftEndPortalFrame.java index 84cd1d039..af50653a1 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftEndPortalFrame.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftEndPortalFrame.java @@ -5,7 +5,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; public abstract class CraftEndPortalFrame extends CraftBlockData implements EndPortalFrame { - private static final net.minecraft.server.BlockStateBoolean EYE = getBoolean("eye"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean EYE = getBoolean("eye"); @Override public boolean hasEye() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftFarmland.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftFarmland.java index 515ee588c..5d8f71f5e 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftFarmland.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftFarmland.java @@ -5,7 +5,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; public abstract class CraftFarmland extends CraftBlockData implements Farmland { - private static final net.minecraft.server.BlockStateInteger MOISTURE = getInteger("moisture"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger MOISTURE = getInteger("moisture"); @Override public int getMoisture() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftGate.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftGate.java index 1f6ad5d98..63e14889c 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftGate.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftGate.java @@ -5,7 +5,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; public abstract class CraftGate extends CraftBlockData implements Gate { - private static final net.minecraft.server.BlockStateBoolean IN_WALL = getBoolean("in_wall"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean IN_WALL = getBoolean("in_wall"); @Override public boolean isInWall() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftHopper.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftHopper.java index 055629fde..5e11dc83b 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftHopper.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftHopper.java @@ -5,7 +5,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; public abstract class CraftHopper extends CraftBlockData implements Hopper { - private static final net.minecraft.server.BlockStateBoolean ENABLED = getBoolean("enabled"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean ENABLED = getBoolean("enabled"); @Override public boolean isEnabled() { 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 6703235a0..9538eaa8d 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 @@ -5,7 +5,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; public abstract class CraftJigsaw extends CraftBlockData implements Jigsaw { - private static final net.minecraft.server.BlockStateEnum ORIENTATION = getEnum("orientation"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum ORIENTATION = getEnum("orientation"); @Override public org.bukkit.block.data.type.Jigsaw.Orientation getOrientation() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftJukebox.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftJukebox.java index c1fe52e1b..fc5f588f7 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftJukebox.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftJukebox.java @@ -5,7 +5,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; public abstract class CraftJukebox extends CraftBlockData implements Jukebox { - private static final net.minecraft.server.BlockStateBoolean HAS_RECORD = getBoolean("has_record"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean HAS_RECORD = getBoolean("has_record"); @Override public boolean hasRecord() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftLantern.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftLantern.java index 01bdf9d80..ab376d1e3 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftLantern.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftLantern.java @@ -5,7 +5,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; public abstract class CraftLantern extends CraftBlockData implements Lantern { - private static final net.minecraft.server.BlockStateBoolean HANGING = getBoolean("hanging"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean HANGING = getBoolean("hanging"); @Override public boolean isHanging() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftLeaves.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftLeaves.java index a233f5550..03137bfe7 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftLeaves.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftLeaves.java @@ -5,8 +5,8 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; public class CraftLeaves extends CraftBlockData implements Leaves { - private static final net.minecraft.server.BlockStateInteger DISTANCE = getInteger("distance"); - private static final net.minecraft.server.BlockStateBoolean PERSISTENT = getBoolean("persistent"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger DISTANCE = getInteger("distance"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean PERSISTENT = getBoolean("persistent"); @Override public boolean isPersistent() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftLectern.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftLectern.java index 1ecdf4718..b585ed548 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftLectern.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftLectern.java @@ -5,7 +5,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; public abstract class CraftLectern extends CraftBlockData implements Lectern { - private static final net.minecraft.server.BlockStateBoolean HAS_BOOK = getBoolean("has_book"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean HAS_BOOK = getBoolean("has_book"); @Override public boolean hasBook() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftNoteBlock.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftNoteBlock.java index 51814a497..70cb460d2 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftNoteBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftNoteBlock.java @@ -5,8 +5,8 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; public abstract class CraftNoteBlock extends CraftBlockData implements NoteBlock { - private static final net.minecraft.server.BlockStateEnum INSTRUMENT = getEnum("instrument"); - private static final net.minecraft.server.BlockStateInteger NOTE = getInteger("note"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum INSTRUMENT = getEnum("instrument"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger NOTE = getInteger("note"); @Override public org.bukkit.Instrument getInstrument() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftPiston.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftPiston.java index 8cebb751e..061e5c124 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftPiston.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftPiston.java @@ -5,7 +5,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; public abstract class CraftPiston extends CraftBlockData implements Piston { - private static final net.minecraft.server.BlockStateBoolean EXTENDED = getBoolean("extended"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean EXTENDED = getBoolean("extended"); @Override public boolean isExtended() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftPistonHead.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftPistonHead.java index 3fb24d4b8..1dc2cdaac 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftPistonHead.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftPistonHead.java @@ -5,7 +5,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; public abstract class CraftPistonHead extends CraftBlockData implements PistonHead { - private static final net.minecraft.server.BlockStateBoolean SHORT = getBoolean("short"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean SHORT = getBoolean("short"); @Override public boolean isShort() { 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 ac43a531b..962b9982c 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 @@ -5,10 +5,10 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; public abstract class CraftRedstoneWire extends CraftBlockData implements RedstoneWire { - private static final net.minecraft.server.BlockStateEnum NORTH = getEnum("north"); - private static final net.minecraft.server.BlockStateEnum EAST = getEnum("east"); - private static final net.minecraft.server.BlockStateEnum SOUTH = getEnum("south"); - private static final net.minecraft.server.BlockStateEnum WEST = getEnum("west"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum NORTH = getEnum("north"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum EAST = getEnum("east"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum SOUTH = getEnum("south"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum WEST = getEnum("west"); @Override public org.bukkit.block.data.type.RedstoneWire.Connection getFace(org.bukkit.block.BlockFace face) { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftRepeater.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftRepeater.java index 482a4ed75..a43a4dfaf 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftRepeater.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftRepeater.java @@ -5,8 +5,8 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; public abstract class CraftRepeater extends CraftBlockData implements Repeater { - private static final net.minecraft.server.BlockStateInteger DELAY = getInteger("delay"); - private static final net.minecraft.server.BlockStateBoolean LOCKED = getBoolean("locked"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger DELAY = getInteger("delay"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean LOCKED = getBoolean("locked"); @Override public int getDelay() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftRespawnAnchor.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftRespawnAnchor.java index b75d993f8..797326ff6 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftRespawnAnchor.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftRespawnAnchor.java @@ -5,7 +5,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; public abstract class CraftRespawnAnchor extends CraftBlockData implements RespawnAnchor { - private static final net.minecraft.server.BlockStateInteger CHARGES = getInteger("charges"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger CHARGES = getInteger("charges"); @Override public int getCharges() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSapling.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSapling.java index dd96acff1..b8dedea6c 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSapling.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSapling.java @@ -5,7 +5,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; public abstract class CraftSapling extends CraftBlockData implements Sapling { - private static final net.minecraft.server.BlockStateInteger STAGE = getInteger("stage"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger STAGE = getInteger("stage"); @Override public int getStage() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftScaffolding.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftScaffolding.java index fe896908c..f80edd893 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftScaffolding.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftScaffolding.java @@ -5,8 +5,8 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; public abstract class CraftScaffolding extends CraftBlockData implements Scaffolding { - private static final net.minecraft.server.BlockStateBoolean BOTTOM = getBoolean("bottom"); - private static final net.minecraft.server.BlockStateInteger DISTANCE = getInteger("distance"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean BOTTOM = getBoolean("bottom"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger DISTANCE = getInteger("distance"); @Override public boolean isBottom() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSeaPickle.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSeaPickle.java index dc138d9c7..bf92e11ef 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSeaPickle.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSeaPickle.java @@ -5,7 +5,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; public abstract class CraftSeaPickle extends CraftBlockData implements SeaPickle { - private static final net.minecraft.server.BlockStateInteger PICKLES = getInteger("pickles"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger PICKLES = getInteger("pickles"); @Override public int getPickles() { 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 e5105cb97..31380b3d1 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 @@ -5,7 +5,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; public abstract class CraftSlab extends CraftBlockData implements Slab { - private static final net.minecraft.server.BlockStateEnum TYPE = getEnum("type"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum TYPE = getEnum("type"); @Override public org.bukkit.block.data.type.Slab.Type getType() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSnow.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSnow.java index 879a5d679..7002206b8 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSnow.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSnow.java @@ -5,7 +5,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; public class CraftSnow extends CraftBlockData implements Snow { - private static final net.minecraft.server.BlockStateInteger LAYERS = getInteger("layers"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger LAYERS = getInteger("layers"); @Override public int getLayers() { 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 573bc7cfc..47d914f1d 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 @@ -5,7 +5,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; public abstract class CraftStairs extends CraftBlockData implements Stairs { - private static final net.minecraft.server.BlockStateEnum SHAPE = getEnum("shape"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum SHAPE = getEnum("shape"); @Override public org.bukkit.block.data.type.Stairs.Shape getShape() { 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 93b878075..f568d7a44 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 @@ -5,7 +5,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; public abstract class CraftStructureBlock extends CraftBlockData implements StructureBlock { - private static final net.minecraft.server.BlockStateEnum MODE = getEnum("mode"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum MODE = getEnum("mode"); @Override public org.bukkit.block.data.type.StructureBlock.Mode getMode() { 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 70c414502..4b12349fd 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 @@ -5,7 +5,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; public abstract class CraftSwitch extends CraftBlockData implements Switch { - private static final net.minecraft.server.BlockStateEnum FACE = getEnum("face"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACE = getEnum("face"); @Override public org.bukkit.block.data.type.Switch.Face getFace() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftTNT.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftTNT.java index 18662a805..2f431bd4f 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftTNT.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftTNT.java @@ -5,7 +5,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; public abstract class CraftTNT extends CraftBlockData implements TNT { - private static final net.minecraft.server.BlockStateBoolean UNSTABLE = getBoolean("unstable"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean UNSTABLE = getBoolean("unstable"); @Override public boolean isUnstable() { 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 fa4398dda..0ad988f65 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 @@ -5,7 +5,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; public abstract class CraftTechnicalPiston extends CraftBlockData implements TechnicalPiston { - private static final net.minecraft.server.BlockStateEnum TYPE = getEnum("type"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum TYPE = getEnum("type"); @Override public org.bukkit.block.data.type.TechnicalPiston.Type getType() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftTripwire.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftTripwire.java index 55bacd2e5..7f8dda3ec 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftTripwire.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftTripwire.java @@ -5,7 +5,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; public abstract class CraftTripwire extends CraftBlockData implements Tripwire { - private static final net.minecraft.server.BlockStateBoolean DISARMED = getBoolean("disarmed"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean DISARMED = getBoolean("disarmed"); @Override public boolean isDisarmed() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftTurtleEgg.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftTurtleEgg.java index dca37886e..b5e7164f3 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftTurtleEgg.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftTurtleEgg.java @@ -5,8 +5,8 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; public abstract class CraftTurtleEgg extends CraftBlockData implements TurtleEgg { - private static final net.minecraft.server.BlockStateInteger EGGS = getInteger("eggs"); - private static final net.minecraft.server.BlockStateInteger HATCH = getInteger("hatch"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger EGGS = getInteger("eggs"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger HATCH = getInteger("hatch"); @Override public int getEggs() { 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 3c511b153..c02ab57d9 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 @@ -5,8 +5,8 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; public abstract class CraftWall extends CraftBlockData implements Wall { - private static final net.minecraft.server.BlockStateBoolean UP = getBoolean("up"); - private static final net.minecraft.server.BlockStateEnum[] HEIGHTS = new net.minecraft.server.BlockStateEnum[]{ + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean UP = getBoolean("up"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum[] HEIGHTS = new net.minecraft.world.level.block.state.properties.BlockStateEnum[]{ getEnum("north"), getEnum("east"), getEnum("south"), getEnum("west") }; diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftAnvil.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftAnvil.java index 3010e8fe1..e874ad40e 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftAnvil.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftAnvil.java @@ -9,13 +9,13 @@ public final class CraftAnvil extends org.bukkit.craftbukkit.block.data.CraftBlo super(); } - public CraftAnvil(net.minecraft.server.IBlockData state) { + public CraftAnvil(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockAnvil.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockAnvil.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { 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 8c2d08450..3f3a1d107 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBamboo.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBamboo.java @@ -9,13 +9,13 @@ public final class CraftBamboo extends org.bukkit.craftbukkit.block.data.CraftBl super(); } - public CraftBamboo(net.minecraft.server.IBlockData state) { + public CraftBamboo(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftBamboo - private static final net.minecraft.server.BlockStateEnum LEAVES = getEnum(net.minecraft.server.BlockBamboo.class, "leaves"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum LEAVES = getEnum(net.minecraft.world.level.block.BlockBamboo.class, "leaves"); @Override public org.bukkit.block.data.type.Bamboo.Leaves getLeaves() { @@ -29,7 +29,7 @@ public final class CraftBamboo extends org.bukkit.craftbukkit.block.data.CraftBl // org.bukkit.craftbukkit.block.data.CraftAgeable - private static final net.minecraft.server.BlockStateInteger AGE = getInteger(net.minecraft.server.BlockBamboo.class, "age"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger AGE = getInteger(net.minecraft.world.level.block.BlockBamboo.class, "age"); @Override public int getAge() { @@ -48,7 +48,7 @@ public final class CraftBamboo extends org.bukkit.craftbukkit.block.data.CraftBl // org.bukkit.craftbukkit.block.data.type.CraftSapling - private static final net.minecraft.server.BlockStateInteger STAGE = getInteger(net.minecraft.server.BlockBamboo.class, "stage"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger STAGE = getInteger(net.minecraft.world.level.block.BlockBamboo.class, "stage"); @Override public int getStage() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBanner.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBanner.java index d95c548bc..790272342 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBanner.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBanner.java @@ -9,13 +9,13 @@ public final class CraftBanner extends org.bukkit.craftbukkit.block.data.CraftBl super(); } - public CraftBanner(net.minecraft.server.IBlockData state) { + public CraftBanner(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftRotatable - private static final net.minecraft.server.BlockStateInteger ROTATION = getInteger(net.minecraft.server.BlockBanner.class, "rotation"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger ROTATION = getInteger(net.minecraft.world.level.block.BlockBanner.class, "rotation"); @Override public org.bukkit.block.BlockFace getRotation() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBannerWall.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBannerWall.java index 48215035f..981c32567 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBannerWall.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBannerWall.java @@ -9,13 +9,13 @@ public final class CraftBannerWall extends org.bukkit.craftbukkit.block.data.Cra super(); } - public CraftBannerWall(net.minecraft.server.IBlockData state) { + public CraftBannerWall(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockBannerWall.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockBannerWall.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBarrel.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBarrel.java index 81919c941..d00280144 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBarrel.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBarrel.java @@ -9,13 +9,13 @@ public final class CraftBarrel extends org.bukkit.craftbukkit.block.data.CraftBl super(); } - public CraftBarrel(net.minecraft.server.IBlockData state) { + public CraftBarrel(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockBarrel.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockBarrel.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { 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 04fae20f5..50deaba4d 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBed.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBed.java @@ -9,14 +9,14 @@ public final class CraftBed extends org.bukkit.craftbukkit.block.data.CraftBlock super(); } - public CraftBed(net.minecraft.server.IBlockData state) { + public CraftBed(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftBed - private static final net.minecraft.server.BlockStateEnum PART = getEnum(net.minecraft.server.BlockBed.class, "part"); - private static final net.minecraft.server.BlockStateBoolean OCCUPIED = getBoolean(net.minecraft.server.BlockBed.class, "occupied"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum PART = getEnum(net.minecraft.world.level.block.BlockBed.class, "part"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean OCCUPIED = getBoolean(net.minecraft.world.level.block.BlockBed.class, "occupied"); @Override public org.bukkit.block.data.type.Bed.Part getPart() { @@ -35,7 +35,7 @@ public final class CraftBed extends org.bukkit.craftbukkit.block.data.CraftBlock // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockBed.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockBed.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBeehive.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBeehive.java index c2a2820b2..e537ded2d 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBeehive.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBeehive.java @@ -9,13 +9,13 @@ public final class CraftBeehive extends org.bukkit.craftbukkit.block.data.CraftB super(); } - public CraftBeehive(net.minecraft.server.IBlockData state) { + public CraftBeehive(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftBeehive - private static final net.minecraft.server.BlockStateInteger HONEY_LEVEL = getInteger(net.minecraft.server.BlockBeehive.class, "honey_level"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger HONEY_LEVEL = getInteger(net.minecraft.world.level.block.BlockBeehive.class, "honey_level"); @Override public int getHoneyLevel() { @@ -34,7 +34,7 @@ public final class CraftBeehive extends org.bukkit.craftbukkit.block.data.CraftB // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockBeehive.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockBeehive.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBeetroot.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBeetroot.java index 4e9a27f47..a4f212742 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBeetroot.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBeetroot.java @@ -9,13 +9,13 @@ public final class CraftBeetroot extends org.bukkit.craftbukkit.block.data.Craft super(); } - public CraftBeetroot(net.minecraft.server.IBlockData state) { + public CraftBeetroot(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftAgeable - private static final net.minecraft.server.BlockStateInteger AGE = getInteger(net.minecraft.server.BlockBeetroot.class, "age"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger AGE = getInteger(net.minecraft.world.level.block.BlockBeetroot.class, "age"); @Override public int getAge() { 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 7fa9ba1ce..5a3e22466 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBell.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBell.java @@ -9,13 +9,13 @@ public final class CraftBell extends org.bukkit.craftbukkit.block.data.CraftBloc super(); } - public CraftBell(net.minecraft.server.IBlockData state) { + public CraftBell(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftBell - private static final net.minecraft.server.BlockStateEnum ATTACHMENT = getEnum(net.minecraft.server.BlockBell.class, "attachment"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum ATTACHMENT = getEnum(net.minecraft.world.level.block.BlockBell.class, "attachment"); @Override public org.bukkit.block.data.type.Bell.Attachment getAttachment() { @@ -29,7 +29,7 @@ public final class CraftBell extends org.bukkit.craftbukkit.block.data.CraftBloc // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockBell.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockBell.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { @@ -48,7 +48,7 @@ public final class CraftBell extends org.bukkit.craftbukkit.block.data.CraftBloc // org.bukkit.craftbukkit.block.data.CraftPowerable - private static final net.minecraft.server.BlockStateBoolean POWERED = getBoolean(net.minecraft.server.BlockBell.class, "powered"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockBell.class, "powered"); @Override public boolean isPowered() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBlastFurnace.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBlastFurnace.java index 8e223604f..6c6107793 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBlastFurnace.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBlastFurnace.java @@ -9,13 +9,13 @@ public final class CraftBlastFurnace extends org.bukkit.craftbukkit.block.data.C super(); } - public CraftBlastFurnace(net.minecraft.server.IBlockData state) { + public CraftBlastFurnace(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockBlastFurnace.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockBlastFurnace.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { @@ -34,7 +34,7 @@ public final class CraftBlastFurnace extends org.bukkit.craftbukkit.block.data.C // org.bukkit.craftbukkit.block.data.CraftLightable - private static final net.minecraft.server.BlockStateBoolean LIT = getBoolean(net.minecraft.server.BlockBlastFurnace.class, "lit"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean LIT = getBoolean(net.minecraft.world.level.block.BlockBlastFurnace.class, "lit"); @Override public boolean isLit() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBrewingStand.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBrewingStand.java index fe0e7dec6..3ea151b0b 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBrewingStand.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBrewingStand.java @@ -9,14 +9,14 @@ public final class CraftBrewingStand extends org.bukkit.craftbukkit.block.data.C super(); } - public CraftBrewingStand(net.minecraft.server.IBlockData state) { + public CraftBrewingStand(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftBrewingStand - private static final net.minecraft.server.BlockStateBoolean[] HAS_BOTTLE = new net.minecraft.server.BlockStateBoolean[]{ - getBoolean(net.minecraft.server.BlockBrewingStand.class, "has_bottle_0"), getBoolean(net.minecraft.server.BlockBrewingStand.class, "has_bottle_1"), getBoolean(net.minecraft.server.BlockBrewingStand.class, "has_bottle_2") + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean[] HAS_BOTTLE = new net.minecraft.world.level.block.state.properties.BlockStateBoolean[]{ + getBoolean(net.minecraft.world.level.block.BlockBrewingStand.class, "has_bottle_0"), getBoolean(net.minecraft.world.level.block.BlockBrewingStand.class, "has_bottle_1"), getBoolean(net.minecraft.world.level.block.BlockBrewingStand.class, "has_bottle_2") }; @Override diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBubbleColumn.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBubbleColumn.java index 574a5b9a7..63e312638 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBubbleColumn.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBubbleColumn.java @@ -9,13 +9,13 @@ public final class CraftBubbleColumn extends org.bukkit.craftbukkit.block.data.C super(); } - public CraftBubbleColumn(net.minecraft.server.IBlockData state) { + public CraftBubbleColumn(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftBubbleColumn - private static final net.minecraft.server.BlockStateBoolean DRAG = getBoolean(net.minecraft.server.BlockBubbleColumn.class, "drag"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean DRAG = getBoolean(net.minecraft.world.level.block.BlockBubbleColumn.class, "drag"); @Override public boolean isDrag() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCactus.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCactus.java index e62f4dd17..279067bff 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCactus.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCactus.java @@ -9,13 +9,13 @@ public final class CraftCactus extends org.bukkit.craftbukkit.block.data.CraftBl super(); } - public CraftCactus(net.minecraft.server.IBlockData state) { + public CraftCactus(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftAgeable - private static final net.minecraft.server.BlockStateInteger AGE = getInteger(net.minecraft.server.BlockCactus.class, "age"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger AGE = getInteger(net.minecraft.world.level.block.BlockCactus.class, "age"); @Override public int getAge() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCake.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCake.java index fee523abe..ddaf32ce1 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCake.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCake.java @@ -9,13 +9,13 @@ public final class CraftCake extends org.bukkit.craftbukkit.block.data.CraftBloc super(); } - public CraftCake(net.minecraft.server.IBlockData state) { + public CraftCake(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftCake - private static final net.minecraft.server.BlockStateInteger BITES = getInteger(net.minecraft.server.BlockCake.class, "bites"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger BITES = getInteger(net.minecraft.world.level.block.BlockCake.class, "bites"); @Override public int getBites() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCampfire.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCampfire.java index 9761b082e..6c79c954b 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCampfire.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCampfire.java @@ -9,13 +9,13 @@ public final class CraftCampfire extends org.bukkit.craftbukkit.block.data.Craft super(); } - public CraftCampfire(net.minecraft.server.IBlockData state) { + public CraftCampfire(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftCampfire - private static final net.minecraft.server.BlockStateBoolean SIGNAL_FIRE = getBoolean(net.minecraft.server.BlockCampfire.class, "signal_fire"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean SIGNAL_FIRE = getBoolean(net.minecraft.world.level.block.BlockCampfire.class, "signal_fire"); @Override public boolean isSignalFire() { @@ -29,7 +29,7 @@ public final class CraftCampfire extends org.bukkit.craftbukkit.block.data.Craft // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockCampfire.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockCampfire.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { @@ -48,7 +48,7 @@ public final class CraftCampfire extends org.bukkit.craftbukkit.block.data.Craft // org.bukkit.craftbukkit.block.data.CraftLightable - private static final net.minecraft.server.BlockStateBoolean LIT = getBoolean(net.minecraft.server.BlockCampfire.class, "lit"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean LIT = getBoolean(net.minecraft.world.level.block.BlockCampfire.class, "lit"); @Override public boolean isLit() { @@ -62,7 +62,7 @@ public final class CraftCampfire extends org.bukkit.craftbukkit.block.data.Craft // org.bukkit.craftbukkit.block.data.CraftWaterlogged - private static final net.minecraft.server.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.server.BlockCampfire.class, "waterlogged"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockCampfire.class, "waterlogged"); @Override public boolean isWaterlogged() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCarrots.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCarrots.java index 9ab29636e..9e2096eb0 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCarrots.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCarrots.java @@ -9,13 +9,13 @@ public final class CraftCarrots extends org.bukkit.craftbukkit.block.data.CraftB super(); } - public CraftCarrots(net.minecraft.server.IBlockData state) { + public CraftCarrots(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftAgeable - private static final net.minecraft.server.BlockStateInteger AGE = getInteger(net.minecraft.server.BlockCarrots.class, "age"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger AGE = getInteger(net.minecraft.world.level.block.BlockCarrots.class, "age"); @Override public int getAge() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCauldron.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCauldron.java index 5ddeb7158..c1ceb6fb5 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCauldron.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCauldron.java @@ -9,13 +9,13 @@ public final class CraftCauldron extends org.bukkit.craftbukkit.block.data.Craft super(); } - public CraftCauldron(net.minecraft.server.IBlockData state) { + public CraftCauldron(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftLevelled - private static final net.minecraft.server.BlockStateInteger LEVEL = getInteger(net.minecraft.server.BlockCauldron.class, "level"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger LEVEL = getInteger(net.minecraft.world.level.block.BlockCauldron.class, "level"); @Override public int getLevel() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChain.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChain.java index f99be1b36..be3b6d4da 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChain.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChain.java @@ -9,13 +9,13 @@ public final class CraftChain extends org.bukkit.craftbukkit.block.data.CraftBlo super(); } - public CraftChain(net.minecraft.server.IBlockData state) { + public CraftChain(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftOrientable - private static final net.minecraft.server.BlockStateEnum AXIS = getEnum(net.minecraft.server.BlockChain.class, "axis"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum AXIS = getEnum(net.minecraft.world.level.block.BlockChain.class, "axis"); @Override public org.bukkit.Axis getAxis() { @@ -34,7 +34,7 @@ public final class CraftChain extends org.bukkit.craftbukkit.block.data.CraftBlo // org.bukkit.craftbukkit.block.data.CraftWaterlogged - private static final net.minecraft.server.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.server.BlockChain.class, "waterlogged"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockChain.class, "waterlogged"); @Override public boolean isWaterlogged() { 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 e693aee0e..df826da17 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChest.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChest.java @@ -9,13 +9,13 @@ public final class CraftChest extends org.bukkit.craftbukkit.block.data.CraftBlo super(); } - public CraftChest(net.minecraft.server.IBlockData state) { + public CraftChest(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftChest - private static final net.minecraft.server.BlockStateEnum TYPE = getEnum(net.minecraft.server.BlockChest.class, "type"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum TYPE = getEnum(net.minecraft.world.level.block.BlockChest.class, "type"); @Override public org.bukkit.block.data.type.Chest.Type getType() { @@ -29,7 +29,7 @@ public final class CraftChest extends org.bukkit.craftbukkit.block.data.CraftBlo // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockChest.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockChest.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { @@ -48,7 +48,7 @@ public final class CraftChest extends org.bukkit.craftbukkit.block.data.CraftBlo // org.bukkit.craftbukkit.block.data.CraftWaterlogged - private static final net.minecraft.server.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.server.BlockChest.class, "waterlogged"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockChest.class, "waterlogged"); @Override public boolean isWaterlogged() { 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 fd54dfe8f..08aba0ee0 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChestTrapped.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChestTrapped.java @@ -9,13 +9,13 @@ public final class CraftChestTrapped extends org.bukkit.craftbukkit.block.data.C super(); } - public CraftChestTrapped(net.minecraft.server.IBlockData state) { + public CraftChestTrapped(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftChest - private static final net.minecraft.server.BlockStateEnum TYPE = getEnum(net.minecraft.server.BlockChestTrapped.class, "type"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum TYPE = getEnum(net.minecraft.world.level.block.BlockChestTrapped.class, "type"); @Override public org.bukkit.block.data.type.Chest.Type getType() { @@ -29,7 +29,7 @@ public final class CraftChestTrapped extends org.bukkit.craftbukkit.block.data.C // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockChestTrapped.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockChestTrapped.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { @@ -48,7 +48,7 @@ public final class CraftChestTrapped extends org.bukkit.craftbukkit.block.data.C // org.bukkit.craftbukkit.block.data.CraftWaterlogged - private static final net.minecraft.server.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.server.BlockChestTrapped.class, "waterlogged"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockChestTrapped.class, "waterlogged"); @Override public boolean isWaterlogged() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChorusFlower.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChorusFlower.java index af1e85bcd..203cc451c 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChorusFlower.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChorusFlower.java @@ -9,13 +9,13 @@ public final class CraftChorusFlower extends org.bukkit.craftbukkit.block.data.C super(); } - public CraftChorusFlower(net.minecraft.server.IBlockData state) { + public CraftChorusFlower(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftAgeable - private static final net.minecraft.server.BlockStateInteger AGE = getInteger(net.minecraft.server.BlockChorusFlower.class, "age"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger AGE = getInteger(net.minecraft.world.level.block.BlockChorusFlower.class, "age"); @Override public int getAge() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChorusFruit.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChorusFruit.java index b367f275b..b1c7fee0d 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChorusFruit.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChorusFruit.java @@ -9,19 +9,19 @@ public final class CraftChorusFruit extends org.bukkit.craftbukkit.block.data.Cr super(); } - public CraftChorusFruit(net.minecraft.server.IBlockData state) { + public CraftChorusFruit(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftMultipleFacing - private static final net.minecraft.server.BlockStateBoolean[] FACES = new net.minecraft.server.BlockStateBoolean[]{ - getBoolean(net.minecraft.server.BlockChorusFruit.class, "north", true), getBoolean(net.minecraft.server.BlockChorusFruit.class, "east", true), getBoolean(net.minecraft.server.BlockChorusFruit.class, "south", true), getBoolean(net.minecraft.server.BlockChorusFruit.class, "west", true), getBoolean(net.minecraft.server.BlockChorusFruit.class, "up", true), getBoolean(net.minecraft.server.BlockChorusFruit.class, "down", true) + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean[] FACES = new net.minecraft.world.level.block.state.properties.BlockStateBoolean[]{ + getBoolean(net.minecraft.world.level.block.BlockChorusFruit.class, "north", true), getBoolean(net.minecraft.world.level.block.BlockChorusFruit.class, "east", true), getBoolean(net.minecraft.world.level.block.BlockChorusFruit.class, "south", true), getBoolean(net.minecraft.world.level.block.BlockChorusFruit.class, "west", true), getBoolean(net.minecraft.world.level.block.BlockChorusFruit.class, "up", true), getBoolean(net.minecraft.world.level.block.BlockChorusFruit.class, "down", true) }; @Override public boolean hasFace(org.bukkit.block.BlockFace face) { - net.minecraft.server.BlockStateBoolean state = FACES[face.ordinal()]; + net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()]; if (state == null) { throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces."); } @@ -30,7 +30,7 @@ public final class CraftChorusFruit extends org.bukkit.craftbukkit.block.data.Cr @Override public void setFace(org.bukkit.block.BlockFace face, boolean has) { - net.minecraft.server.BlockStateBoolean state = FACES[face.ordinal()]; + net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()]; if (state == null) { throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces."); } 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 1fd10df85..e05139f09 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCobbleWall.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCobbleWall.java @@ -9,15 +9,15 @@ public final class CraftCobbleWall extends org.bukkit.craftbukkit.block.data.Cra super(); } - public CraftCobbleWall(net.minecraft.server.IBlockData state) { + public CraftCobbleWall(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftWall - private static final net.minecraft.server.BlockStateBoolean UP = getBoolean(net.minecraft.server.BlockCobbleWall.class, "up"); - private static final net.minecraft.server.BlockStateEnum[] HEIGHTS = new net.minecraft.server.BlockStateEnum[]{ - getEnum(net.minecraft.server.BlockCobbleWall.class, "north"), getEnum(net.minecraft.server.BlockCobbleWall.class, "east"), getEnum(net.minecraft.server.BlockCobbleWall.class, "south"), getEnum(net.minecraft.server.BlockCobbleWall.class, "west") + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean UP = getBoolean(net.minecraft.world.level.block.BlockCobbleWall.class, "up"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum[] HEIGHTS = new net.minecraft.world.level.block.state.properties.BlockStateEnum[]{ + getEnum(net.minecraft.world.level.block.BlockCobbleWall.class, "north"), getEnum(net.minecraft.world.level.block.BlockCobbleWall.class, "east"), getEnum(net.minecraft.world.level.block.BlockCobbleWall.class, "south"), getEnum(net.minecraft.world.level.block.BlockCobbleWall.class, "west") }; @Override @@ -42,7 +42,7 @@ public final class CraftCobbleWall extends org.bukkit.craftbukkit.block.data.Cra // org.bukkit.craftbukkit.block.data.CraftWaterlogged - private static final net.minecraft.server.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.server.BlockCobbleWall.class, "waterlogged"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockCobbleWall.class, "waterlogged"); @Override public boolean isWaterlogged() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCocoa.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCocoa.java index 79b2b52ca..2298e9a12 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCocoa.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCocoa.java @@ -9,13 +9,13 @@ public final class CraftCocoa extends org.bukkit.craftbukkit.block.data.CraftBlo super(); } - public CraftCocoa(net.minecraft.server.IBlockData state) { + public CraftCocoa(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftAgeable - private static final net.minecraft.server.BlockStateInteger AGE = getInteger(net.minecraft.server.BlockCocoa.class, "age"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger AGE = getInteger(net.minecraft.world.level.block.BlockCocoa.class, "age"); @Override public int getAge() { @@ -34,7 +34,7 @@ public final class CraftCocoa extends org.bukkit.craftbukkit.block.data.CraftBlo // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockCocoa.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockCocoa.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCommand.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCommand.java index ed1684a63..f42cf17c8 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCommand.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCommand.java @@ -9,13 +9,13 @@ public final class CraftCommand extends org.bukkit.craftbukkit.block.data.CraftB super(); } - public CraftCommand(net.minecraft.server.IBlockData state) { + public CraftCommand(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftCommandBlock - private static final net.minecraft.server.BlockStateBoolean CONDITIONAL = getBoolean(net.minecraft.server.BlockCommand.class, "conditional"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean CONDITIONAL = getBoolean(net.minecraft.world.level.block.BlockCommand.class, "conditional"); @Override public boolean isConditional() { @@ -29,7 +29,7 @@ public final class CraftCommand extends org.bukkit.craftbukkit.block.data.CraftB // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockCommand.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockCommand.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftComposter.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftComposter.java index 536628624..cf572f5bb 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftComposter.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftComposter.java @@ -9,13 +9,13 @@ public final class CraftComposter extends org.bukkit.craftbukkit.block.data.Craf super(); } - public CraftComposter(net.minecraft.server.IBlockData state) { + public CraftComposter(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftLevelled - private static final net.minecraft.server.BlockStateInteger LEVEL = getInteger(net.minecraft.server.BlockComposter.class, "level"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger LEVEL = getInteger(net.minecraft.world.level.block.BlockComposter.class, "level"); @Override public int getLevel() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftConduit.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftConduit.java index ec2c91526..b2e424b8a 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftConduit.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftConduit.java @@ -9,13 +9,13 @@ public final class CraftConduit extends org.bukkit.craftbukkit.block.data.CraftB super(); } - public CraftConduit(net.minecraft.server.IBlockData state) { + public CraftConduit(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftWaterlogged - private static final net.minecraft.server.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.server.BlockConduit.class, "waterlogged"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockConduit.class, "waterlogged"); @Override public boolean isWaterlogged() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralDead.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralDead.java index 450f6658d..88a64ddf0 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralDead.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralDead.java @@ -9,13 +9,13 @@ public final class CraftCoralDead extends org.bukkit.craftbukkit.block.data.Craf super(); } - public CraftCoralDead(net.minecraft.server.IBlockData state) { + public CraftCoralDead(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftWaterlogged - private static final net.minecraft.server.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.server.BlockCoralDead.class, "waterlogged"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockCoralDead.class, "waterlogged"); @Override public boolean isWaterlogged() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFan.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFan.java index dde1a04bd..35aedfe24 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFan.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFan.java @@ -9,13 +9,13 @@ public final class CraftCoralFan extends org.bukkit.craftbukkit.block.data.Craft super(); } - public CraftCoralFan(net.minecraft.server.IBlockData state) { + public CraftCoralFan(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftWaterlogged - private static final net.minecraft.server.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.server.BlockCoralFan.class, "waterlogged"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockCoralFan.class, "waterlogged"); @Override public boolean isWaterlogged() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFanAbstract.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFanAbstract.java index f1eddf70a..35b6f0833 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFanAbstract.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFanAbstract.java @@ -9,13 +9,13 @@ public final class CraftCoralFanAbstract extends org.bukkit.craftbukkit.block.da super(); } - public CraftCoralFanAbstract(net.minecraft.server.IBlockData state) { + public CraftCoralFanAbstract(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftWaterlogged - private static final net.minecraft.server.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.server.BlockCoralFanAbstract.class, "waterlogged"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockCoralFanAbstract.class, "waterlogged"); @Override public boolean isWaterlogged() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFanWall.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFanWall.java index 8b89b6b41..a69bde4b8 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFanWall.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFanWall.java @@ -9,13 +9,13 @@ public final class CraftCoralFanWall extends org.bukkit.craftbukkit.block.data.C super(); } - public CraftCoralFanWall(net.minecraft.server.IBlockData state) { + public CraftCoralFanWall(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockCoralFanWall.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockCoralFanWall.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { @@ -34,7 +34,7 @@ public final class CraftCoralFanWall extends org.bukkit.craftbukkit.block.data.C // org.bukkit.craftbukkit.block.data.CraftWaterlogged - private static final net.minecraft.server.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.server.BlockCoralFanWall.class, "waterlogged"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockCoralFanWall.class, "waterlogged"); @Override public boolean isWaterlogged() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFanWallAbstract.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFanWallAbstract.java index 320f2f216..7134c7b1b 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFanWallAbstract.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFanWallAbstract.java @@ -9,13 +9,13 @@ public final class CraftCoralFanWallAbstract extends org.bukkit.craftbukkit.bloc super(); } - public CraftCoralFanWallAbstract(net.minecraft.server.IBlockData state) { + public CraftCoralFanWallAbstract(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockCoralFanWallAbstract.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockCoralFanWallAbstract.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { @@ -34,7 +34,7 @@ public final class CraftCoralFanWallAbstract extends org.bukkit.craftbukkit.bloc // org.bukkit.craftbukkit.block.data.CraftWaterlogged - private static final net.minecraft.server.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.server.BlockCoralFanWallAbstract.class, "waterlogged"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockCoralFanWallAbstract.class, "waterlogged"); @Override public boolean isWaterlogged() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralPlant.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralPlant.java index 4fb0fa98d..31f7e5296 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralPlant.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralPlant.java @@ -9,13 +9,13 @@ public final class CraftCoralPlant extends org.bukkit.craftbukkit.block.data.Cra super(); } - public CraftCoralPlant(net.minecraft.server.IBlockData state) { + public CraftCoralPlant(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftWaterlogged - private static final net.minecraft.server.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.server.BlockCoralPlant.class, "waterlogged"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockCoralPlant.class, "waterlogged"); @Override public boolean isWaterlogged() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCrops.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCrops.java index 61921a2a5..83b8b56fb 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCrops.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCrops.java @@ -9,13 +9,13 @@ public final class CraftCrops extends org.bukkit.craftbukkit.block.data.CraftBlo super(); } - public CraftCrops(net.minecraft.server.IBlockData state) { + public CraftCrops(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftAgeable - private static final net.minecraft.server.BlockStateInteger AGE = getInteger(net.minecraft.server.BlockCrops.class, "age"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger AGE = getInteger(net.minecraft.world.level.block.BlockCrops.class, "age"); @Override public int getAge() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDaylightDetector.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDaylightDetector.java index ffed5c9a3..c5ab57008 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDaylightDetector.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDaylightDetector.java @@ -9,13 +9,13 @@ public final class CraftDaylightDetector extends org.bukkit.craftbukkit.block.da super(); } - public CraftDaylightDetector(net.minecraft.server.IBlockData state) { + public CraftDaylightDetector(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftDaylightDetector - private static final net.minecraft.server.BlockStateBoolean INVERTED = getBoolean(net.minecraft.server.BlockDaylightDetector.class, "inverted"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean INVERTED = getBoolean(net.minecraft.world.level.block.BlockDaylightDetector.class, "inverted"); @Override public boolean isInverted() { @@ -29,7 +29,7 @@ public final class CraftDaylightDetector extends org.bukkit.craftbukkit.block.da // org.bukkit.craftbukkit.block.data.CraftAnaloguePowerable - private static final net.minecraft.server.BlockStateInteger POWER = getInteger(net.minecraft.server.BlockDaylightDetector.class, "power"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger POWER = getInteger(net.minecraft.world.level.block.BlockDaylightDetector.class, "power"); @Override public int getPower() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDirtSnow.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDirtSnow.java index 7c3857e92..5c4a061b0 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDirtSnow.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDirtSnow.java @@ -9,13 +9,13 @@ public final class CraftDirtSnow extends org.bukkit.craftbukkit.block.data.Craft super(); } - public CraftDirtSnow(net.minecraft.server.IBlockData state) { + public CraftDirtSnow(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftSnowable - private static final net.minecraft.server.BlockStateBoolean SNOWY = getBoolean(net.minecraft.server.BlockDirtSnow.class, "snowy"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean SNOWY = getBoolean(net.minecraft.world.level.block.BlockDirtSnow.class, "snowy"); @Override public boolean isSnowy() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDispenser.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDispenser.java index cea8f941e..061e98697 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDispenser.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDispenser.java @@ -9,13 +9,13 @@ public final class CraftDispenser extends org.bukkit.craftbukkit.block.data.Craf super(); } - public CraftDispenser(net.minecraft.server.IBlockData state) { + public CraftDispenser(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftDispenser - private static final net.minecraft.server.BlockStateBoolean TRIGGERED = getBoolean(net.minecraft.server.BlockDispenser.class, "triggered"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean TRIGGERED = getBoolean(net.minecraft.world.level.block.BlockDispenser.class, "triggered"); @Override public boolean isTriggered() { @@ -29,7 +29,7 @@ public final class CraftDispenser extends org.bukkit.craftbukkit.block.data.Craf // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockDispenser.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockDispenser.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { 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 6b64528ef..1dafa4ea7 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDoor.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDoor.java @@ -9,13 +9,13 @@ public final class CraftDoor extends org.bukkit.craftbukkit.block.data.CraftBloc super(); } - public CraftDoor(net.minecraft.server.IBlockData state) { + public CraftDoor(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftDoor - private static final net.minecraft.server.BlockStateEnum HINGE = getEnum(net.minecraft.server.BlockDoor.class, "hinge"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum HINGE = getEnum(net.minecraft.world.level.block.BlockDoor.class, "hinge"); @Override public org.bukkit.block.data.type.Door.Hinge getHinge() { @@ -29,7 +29,7 @@ public final class CraftDoor extends org.bukkit.craftbukkit.block.data.CraftBloc // org.bukkit.craftbukkit.block.data.CraftBisected - private static final net.minecraft.server.BlockStateEnum HALF = getEnum(net.minecraft.server.BlockDoor.class, "half"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum HALF = getEnum(net.minecraft.world.level.block.BlockDoor.class, "half"); @Override public org.bukkit.block.data.Bisected.Half getHalf() { @@ -43,7 +43,7 @@ public final class CraftDoor extends org.bukkit.craftbukkit.block.data.CraftBloc // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockDoor.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockDoor.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { @@ -62,7 +62,7 @@ public final class CraftDoor extends org.bukkit.craftbukkit.block.data.CraftBloc // org.bukkit.craftbukkit.block.data.CraftOpenable - private static final net.minecraft.server.BlockStateBoolean OPEN = getBoolean(net.minecraft.server.BlockDoor.class, "open"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean OPEN = getBoolean(net.minecraft.world.level.block.BlockDoor.class, "open"); @Override public boolean isOpen() { @@ -76,7 +76,7 @@ public final class CraftDoor extends org.bukkit.craftbukkit.block.data.CraftBloc // org.bukkit.craftbukkit.block.data.CraftPowerable - private static final net.minecraft.server.BlockStateBoolean POWERED = getBoolean(net.minecraft.server.BlockDoor.class, "powered"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockDoor.class, "powered"); @Override public boolean isPowered() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDropper.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDropper.java index 82486f1b0..37fbb0b0a 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDropper.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDropper.java @@ -9,13 +9,13 @@ public final class CraftDropper extends org.bukkit.craftbukkit.block.data.CraftB super(); } - public CraftDropper(net.minecraft.server.IBlockData state) { + public CraftDropper(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftDispenser - private static final net.minecraft.server.BlockStateBoolean TRIGGERED = getBoolean(net.minecraft.server.BlockDropper.class, "triggered"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean TRIGGERED = getBoolean(net.minecraft.world.level.block.BlockDropper.class, "triggered"); @Override public boolean isTriggered() { @@ -29,7 +29,7 @@ public final class CraftDropper extends org.bukkit.craftbukkit.block.data.CraftB // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockDropper.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockDropper.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftEndRod.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftEndRod.java index d72c9d050..387f17960 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftEndRod.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftEndRod.java @@ -9,13 +9,13 @@ public final class CraftEndRod extends org.bukkit.craftbukkit.block.data.CraftBl super(); } - public CraftEndRod(net.minecraft.server.IBlockData state) { + public CraftEndRod(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockEndRod.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockEndRod.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftEnderChest.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftEnderChest.java index 2f8380807..6bf22b7ec 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftEnderChest.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftEnderChest.java @@ -9,13 +9,13 @@ public final class CraftEnderChest extends org.bukkit.craftbukkit.block.data.Cra super(); } - public CraftEnderChest(net.minecraft.server.IBlockData state) { + public CraftEnderChest(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockEnderChest.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockEnderChest.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { @@ -34,7 +34,7 @@ public final class CraftEnderChest extends org.bukkit.craftbukkit.block.data.Cra // org.bukkit.craftbukkit.block.data.CraftWaterlogged - private static final net.minecraft.server.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.server.BlockEnderChest.class, "waterlogged"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockEnderChest.class, "waterlogged"); @Override public boolean isWaterlogged() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftEnderPortalFrame.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftEnderPortalFrame.java index f57cbbeca..99dd4b6cc 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftEnderPortalFrame.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftEnderPortalFrame.java @@ -9,13 +9,13 @@ public final class CraftEnderPortalFrame extends org.bukkit.craftbukkit.block.da super(); } - public CraftEnderPortalFrame(net.minecraft.server.IBlockData state) { + public CraftEnderPortalFrame(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftEndPortalFrame - private static final net.minecraft.server.BlockStateBoolean EYE = getBoolean(net.minecraft.server.BlockEnderPortalFrame.class, "eye"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean EYE = getBoolean(net.minecraft.world.level.block.BlockEnderPortalFrame.class, "eye"); @Override public boolean hasEye() { @@ -29,7 +29,7 @@ public final class CraftEnderPortalFrame extends org.bukkit.craftbukkit.block.da // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockEnderPortalFrame.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockEnderPortalFrame.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFence.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFence.java index 0be4d836c..28eec8009 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFence.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFence.java @@ -9,19 +9,19 @@ public final class CraftFence extends org.bukkit.craftbukkit.block.data.CraftBlo super(); } - public CraftFence(net.minecraft.server.IBlockData state) { + public CraftFence(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftMultipleFacing - private static final net.minecraft.server.BlockStateBoolean[] FACES = new net.minecraft.server.BlockStateBoolean[]{ - getBoolean(net.minecraft.server.BlockFence.class, "north", true), getBoolean(net.minecraft.server.BlockFence.class, "east", true), getBoolean(net.minecraft.server.BlockFence.class, "south", true), getBoolean(net.minecraft.server.BlockFence.class, "west", true), getBoolean(net.minecraft.server.BlockFence.class, "up", true), getBoolean(net.minecraft.server.BlockFence.class, "down", true) + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean[] FACES = new net.minecraft.world.level.block.state.properties.BlockStateBoolean[]{ + getBoolean(net.minecraft.world.level.block.BlockFence.class, "north", true), getBoolean(net.minecraft.world.level.block.BlockFence.class, "east", true), getBoolean(net.minecraft.world.level.block.BlockFence.class, "south", true), getBoolean(net.minecraft.world.level.block.BlockFence.class, "west", true), getBoolean(net.minecraft.world.level.block.BlockFence.class, "up", true), getBoolean(net.minecraft.world.level.block.BlockFence.class, "down", true) }; @Override public boolean hasFace(org.bukkit.block.BlockFace face) { - net.minecraft.server.BlockStateBoolean state = FACES[face.ordinal()]; + net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()]; if (state == null) { throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces."); } @@ -30,7 +30,7 @@ public final class CraftFence extends org.bukkit.craftbukkit.block.data.CraftBlo @Override public void setFace(org.bukkit.block.BlockFace face, boolean has) { - net.minecraft.server.BlockStateBoolean state = FACES[face.ordinal()]; + net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()]; if (state == null) { throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces."); } @@ -65,7 +65,7 @@ public final class CraftFence extends org.bukkit.craftbukkit.block.data.CraftBlo // org.bukkit.craftbukkit.block.data.CraftWaterlogged - private static final net.minecraft.server.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.server.BlockFence.class, "waterlogged"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockFence.class, "waterlogged"); @Override public boolean isWaterlogged() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFenceGate.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFenceGate.java index 4fc294452..6ffb60600 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFenceGate.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFenceGate.java @@ -9,13 +9,13 @@ public final class CraftFenceGate extends org.bukkit.craftbukkit.block.data.Craf super(); } - public CraftFenceGate(net.minecraft.server.IBlockData state) { + public CraftFenceGate(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftGate - private static final net.minecraft.server.BlockStateBoolean IN_WALL = getBoolean(net.minecraft.server.BlockFenceGate.class, "in_wall"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean IN_WALL = getBoolean(net.minecraft.world.level.block.BlockFenceGate.class, "in_wall"); @Override public boolean isInWall() { @@ -29,7 +29,7 @@ public final class CraftFenceGate extends org.bukkit.craftbukkit.block.data.Craf // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockFenceGate.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockFenceGate.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { @@ -48,7 +48,7 @@ public final class CraftFenceGate extends org.bukkit.craftbukkit.block.data.Craf // org.bukkit.craftbukkit.block.data.CraftOpenable - private static final net.minecraft.server.BlockStateBoolean OPEN = getBoolean(net.minecraft.server.BlockFenceGate.class, "open"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean OPEN = getBoolean(net.minecraft.world.level.block.BlockFenceGate.class, "open"); @Override public boolean isOpen() { @@ -62,7 +62,7 @@ public final class CraftFenceGate extends org.bukkit.craftbukkit.block.data.Craf // org.bukkit.craftbukkit.block.data.CraftPowerable - private static final net.minecraft.server.BlockStateBoolean POWERED = getBoolean(net.minecraft.server.BlockFenceGate.class, "powered"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockFenceGate.class, "powered"); @Override public boolean isPowered() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFire.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFire.java index a4ae33f84..cac0e18eb 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFire.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFire.java @@ -9,13 +9,13 @@ public final class CraftFire extends org.bukkit.craftbukkit.block.data.CraftBloc super(); } - public CraftFire(net.minecraft.server.IBlockData state) { + public CraftFire(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftAgeable - private static final net.minecraft.server.BlockStateInteger AGE = getInteger(net.minecraft.server.BlockFire.class, "age"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger AGE = getInteger(net.minecraft.world.level.block.BlockFire.class, "age"); @Override public int getAge() { @@ -34,13 +34,13 @@ public final class CraftFire extends org.bukkit.craftbukkit.block.data.CraftBloc // org.bukkit.craftbukkit.block.data.CraftMultipleFacing - private static final net.minecraft.server.BlockStateBoolean[] FACES = new net.minecraft.server.BlockStateBoolean[]{ - getBoolean(net.minecraft.server.BlockFire.class, "north", true), getBoolean(net.minecraft.server.BlockFire.class, "east", true), getBoolean(net.minecraft.server.BlockFire.class, "south", true), getBoolean(net.minecraft.server.BlockFire.class, "west", true), getBoolean(net.minecraft.server.BlockFire.class, "up", true), getBoolean(net.minecraft.server.BlockFire.class, "down", true) + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean[] FACES = new net.minecraft.world.level.block.state.properties.BlockStateBoolean[]{ + getBoolean(net.minecraft.world.level.block.BlockFire.class, "north", true), getBoolean(net.minecraft.world.level.block.BlockFire.class, "east", true), getBoolean(net.minecraft.world.level.block.BlockFire.class, "south", true), getBoolean(net.minecraft.world.level.block.BlockFire.class, "west", true), getBoolean(net.minecraft.world.level.block.BlockFire.class, "up", true), getBoolean(net.minecraft.world.level.block.BlockFire.class, "down", true) }; @Override public boolean hasFace(org.bukkit.block.BlockFace face) { - net.minecraft.server.BlockStateBoolean state = FACES[face.ordinal()]; + net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()]; if (state == null) { throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces."); } @@ -49,7 +49,7 @@ public final class CraftFire extends org.bukkit.craftbukkit.block.data.CraftBloc @Override public void setFace(org.bukkit.block.BlockFace face, boolean has) { - net.minecraft.server.BlockStateBoolean state = FACES[face.ordinal()]; + net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()]; if (state == null) { throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces."); } diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFloorSign.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFloorSign.java index aa52ec777..fbea1e86c 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFloorSign.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFloorSign.java @@ -9,13 +9,13 @@ public final class CraftFloorSign extends org.bukkit.craftbukkit.block.data.Craf super(); } - public CraftFloorSign(net.minecraft.server.IBlockData state) { + public CraftFloorSign(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftRotatable - private static final net.minecraft.server.BlockStateInteger ROTATION = getInteger(net.minecraft.server.BlockFloorSign.class, "rotation"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger ROTATION = getInteger(net.minecraft.world.level.block.BlockFloorSign.class, "rotation"); @Override public org.bukkit.block.BlockFace getRotation() { @@ -118,7 +118,7 @@ public final class CraftFloorSign extends org.bukkit.craftbukkit.block.data.Craf // org.bukkit.craftbukkit.block.data.CraftWaterlogged - private static final net.minecraft.server.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.server.BlockFloorSign.class, "waterlogged"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockFloorSign.class, "waterlogged"); @Override public boolean isWaterlogged() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFluids.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFluids.java index 21c30c7c7..0d9bf0703 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFluids.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFluids.java @@ -9,13 +9,13 @@ public final class CraftFluids extends org.bukkit.craftbukkit.block.data.CraftBl super(); } - public CraftFluids(net.minecraft.server.IBlockData state) { + public CraftFluids(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftLevelled - private static final net.minecraft.server.BlockStateInteger LEVEL = getInteger(net.minecraft.server.BlockFluids.class, "level"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger LEVEL = getInteger(net.minecraft.world.level.block.BlockFluids.class, "level"); @Override public int getLevel() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFurnaceFurace.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFurnaceFurace.java index 49d4b885e..30478af33 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFurnaceFurace.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFurnaceFurace.java @@ -9,13 +9,13 @@ public final class CraftFurnaceFurace extends org.bukkit.craftbukkit.block.data. super(); } - public CraftFurnaceFurace(net.minecraft.server.IBlockData state) { + public CraftFurnaceFurace(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockFurnaceFurace.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockFurnaceFurace.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { @@ -34,7 +34,7 @@ public final class CraftFurnaceFurace extends org.bukkit.craftbukkit.block.data. // org.bukkit.craftbukkit.block.data.CraftLightable - private static final net.minecraft.server.BlockStateBoolean LIT = getBoolean(net.minecraft.server.BlockFurnaceFurace.class, "lit"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean LIT = getBoolean(net.minecraft.world.level.block.BlockFurnaceFurace.class, "lit"); @Override public boolean isLit() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftGlazedTerracotta.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftGlazedTerracotta.java index 89cc7f95f..ec024f0da 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftGlazedTerracotta.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftGlazedTerracotta.java @@ -9,13 +9,13 @@ public final class CraftGlazedTerracotta extends org.bukkit.craftbukkit.block.da super(); } - public CraftGlazedTerracotta(net.minecraft.server.IBlockData state) { + public CraftGlazedTerracotta(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockGlazedTerracotta.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockGlazedTerracotta.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftGrass.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftGrass.java index 08fcfb0b4..bdcd971c3 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftGrass.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftGrass.java @@ -9,13 +9,13 @@ public final class CraftGrass extends org.bukkit.craftbukkit.block.data.CraftBlo super(); } - public CraftGrass(net.minecraft.server.IBlockData state) { + public CraftGrass(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftSnowable - private static final net.minecraft.server.BlockStateBoolean SNOWY = getBoolean(net.minecraft.server.BlockGrass.class, "snowy"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean SNOWY = getBoolean(net.minecraft.world.level.block.BlockGrass.class, "snowy"); @Override public boolean isSnowy() { 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 bc232bc95..32444f739 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftGrindstone.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftGrindstone.java @@ -9,13 +9,13 @@ public final class CraftGrindstone extends org.bukkit.craftbukkit.block.data.Cra super(); } - public CraftGrindstone(net.minecraft.server.IBlockData state) { + public CraftGrindstone(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockGrindstone.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockGrindstone.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { @@ -34,7 +34,7 @@ public final class CraftGrindstone extends org.bukkit.craftbukkit.block.data.Cra // org.bukkit.craftbukkit.block.data.CraftFaceAttachable - private static final net.minecraft.server.BlockStateEnum ATTACH_FACE = getEnum(net.minecraft.server.BlockGrindstone.class, "face"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum ATTACH_FACE = getEnum(net.minecraft.world.level.block.BlockGrindstone.class, "face"); @Override public org.bukkit.block.data.FaceAttachable.AttachedFace getAttachedFace() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftHay.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftHay.java index db7d61ad6..afe656014 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftHay.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftHay.java @@ -9,13 +9,13 @@ public final class CraftHay extends org.bukkit.craftbukkit.block.data.CraftBlock super(); } - public CraftHay(net.minecraft.server.IBlockData state) { + public CraftHay(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftOrientable - private static final net.minecraft.server.BlockStateEnum AXIS = getEnum(net.minecraft.server.BlockHay.class, "axis"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum AXIS = getEnum(net.minecraft.world.level.block.BlockHay.class, "axis"); @Override public org.bukkit.Axis getAxis() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftHopper.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftHopper.java index f13115177..ff70d732b 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftHopper.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftHopper.java @@ -9,13 +9,13 @@ public final class CraftHopper extends org.bukkit.craftbukkit.block.data.CraftBl super(); } - public CraftHopper(net.minecraft.server.IBlockData state) { + public CraftHopper(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftHopper - private static final net.minecraft.server.BlockStateBoolean ENABLED = getBoolean(net.minecraft.server.BlockHopper.class, "enabled"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean ENABLED = getBoolean(net.minecraft.world.level.block.BlockHopper.class, "enabled"); @Override public boolean isEnabled() { @@ -29,7 +29,7 @@ public final class CraftHopper extends org.bukkit.craftbukkit.block.data.CraftBl // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockHopper.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockHopper.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftHugeMushroom.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftHugeMushroom.java index 3170a234d..3b8bcfa13 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftHugeMushroom.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftHugeMushroom.java @@ -9,19 +9,19 @@ public final class CraftHugeMushroom extends org.bukkit.craftbukkit.block.data.C super(); } - public CraftHugeMushroom(net.minecraft.server.IBlockData state) { + public CraftHugeMushroom(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftMultipleFacing - private static final net.minecraft.server.BlockStateBoolean[] FACES = new net.minecraft.server.BlockStateBoolean[]{ - getBoolean(net.minecraft.server.BlockHugeMushroom.class, "north", true), getBoolean(net.minecraft.server.BlockHugeMushroom.class, "east", true), getBoolean(net.minecraft.server.BlockHugeMushroom.class, "south", true), getBoolean(net.minecraft.server.BlockHugeMushroom.class, "west", true), getBoolean(net.minecraft.server.BlockHugeMushroom.class, "up", true), getBoolean(net.minecraft.server.BlockHugeMushroom.class, "down", true) + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean[] FACES = new net.minecraft.world.level.block.state.properties.BlockStateBoolean[]{ + getBoolean(net.minecraft.world.level.block.BlockHugeMushroom.class, "north", true), getBoolean(net.minecraft.world.level.block.BlockHugeMushroom.class, "east", true), getBoolean(net.minecraft.world.level.block.BlockHugeMushroom.class, "south", true), getBoolean(net.minecraft.world.level.block.BlockHugeMushroom.class, "west", true), getBoolean(net.minecraft.world.level.block.BlockHugeMushroom.class, "up", true), getBoolean(net.minecraft.world.level.block.BlockHugeMushroom.class, "down", true) }; @Override public boolean hasFace(org.bukkit.block.BlockFace face) { - net.minecraft.server.BlockStateBoolean state = FACES[face.ordinal()]; + net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()]; if (state == null) { throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces."); } @@ -30,7 +30,7 @@ public final class CraftHugeMushroom extends org.bukkit.craftbukkit.block.data.C @Override public void setFace(org.bukkit.block.BlockFace face, boolean has) { - net.minecraft.server.BlockStateBoolean state = FACES[face.ordinal()]; + net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()]; if (state == null) { throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces."); } diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftIceFrost.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftIceFrost.java index 7b297dc22..b4ad06fd7 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftIceFrost.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftIceFrost.java @@ -9,13 +9,13 @@ public final class CraftIceFrost extends org.bukkit.craftbukkit.block.data.Craft super(); } - public CraftIceFrost(net.minecraft.server.IBlockData state) { + public CraftIceFrost(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftAgeable - private static final net.minecraft.server.BlockStateInteger AGE = getInteger(net.minecraft.server.BlockIceFrost.class, "age"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger AGE = getInteger(net.minecraft.world.level.block.BlockIceFrost.class, "age"); @Override public int getAge() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftIronBars.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftIronBars.java index e69ec75bb..c755dbd0f 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftIronBars.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftIronBars.java @@ -9,19 +9,19 @@ public final class CraftIronBars extends org.bukkit.craftbukkit.block.data.Craft super(); } - public CraftIronBars(net.minecraft.server.IBlockData state) { + public CraftIronBars(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftMultipleFacing - private static final net.minecraft.server.BlockStateBoolean[] FACES = new net.minecraft.server.BlockStateBoolean[]{ - getBoolean(net.minecraft.server.BlockIronBars.class, "north", true), getBoolean(net.minecraft.server.BlockIronBars.class, "east", true), getBoolean(net.minecraft.server.BlockIronBars.class, "south", true), getBoolean(net.minecraft.server.BlockIronBars.class, "west", true), getBoolean(net.minecraft.server.BlockIronBars.class, "up", true), getBoolean(net.minecraft.server.BlockIronBars.class, "down", true) + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean[] FACES = new net.minecraft.world.level.block.state.properties.BlockStateBoolean[]{ + getBoolean(net.minecraft.world.level.block.BlockIronBars.class, "north", true), getBoolean(net.minecraft.world.level.block.BlockIronBars.class, "east", true), getBoolean(net.minecraft.world.level.block.BlockIronBars.class, "south", true), getBoolean(net.minecraft.world.level.block.BlockIronBars.class, "west", true), getBoolean(net.minecraft.world.level.block.BlockIronBars.class, "up", true), getBoolean(net.minecraft.world.level.block.BlockIronBars.class, "down", true) }; @Override public boolean hasFace(org.bukkit.block.BlockFace face) { - net.minecraft.server.BlockStateBoolean state = FACES[face.ordinal()]; + net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()]; if (state == null) { throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces."); } @@ -30,7 +30,7 @@ public final class CraftIronBars extends org.bukkit.craftbukkit.block.data.Craft @Override public void setFace(org.bukkit.block.BlockFace face, boolean has) { - net.minecraft.server.BlockStateBoolean state = FACES[face.ordinal()]; + net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()]; if (state == null) { throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces."); } @@ -65,7 +65,7 @@ public final class CraftIronBars extends org.bukkit.craftbukkit.block.data.Craft // org.bukkit.craftbukkit.block.data.CraftWaterlogged - private static final net.minecraft.server.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.server.BlockIronBars.class, "waterlogged"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockIronBars.class, "waterlogged"); @Override public boolean isWaterlogged() { 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 4bd11d51a..344bdb5d7 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftJigsaw.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftJigsaw.java @@ -9,13 +9,13 @@ public final class CraftJigsaw extends org.bukkit.craftbukkit.block.data.CraftBl super(); } - public CraftJigsaw(net.minecraft.server.IBlockData state) { + public CraftJigsaw(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftJigsaw - private static final net.minecraft.server.BlockStateEnum ORIENTATION = getEnum(net.minecraft.server.BlockJigsaw.class, "orientation"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum ORIENTATION = getEnum(net.minecraft.world.level.block.BlockJigsaw.class, "orientation"); @Override public org.bukkit.block.data.type.Jigsaw.Orientation getOrientation() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftJukeBox.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftJukeBox.java index b87801f3a..998a04a1f 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftJukeBox.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftJukeBox.java @@ -9,13 +9,13 @@ public final class CraftJukeBox extends org.bukkit.craftbukkit.block.data.CraftB super(); } - public CraftJukeBox(net.minecraft.server.IBlockData state) { + public CraftJukeBox(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftJukebox - private static final net.minecraft.server.BlockStateBoolean HAS_RECORD = getBoolean(net.minecraft.server.BlockJukeBox.class, "has_record"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean HAS_RECORD = getBoolean(net.minecraft.world.level.block.BlockJukeBox.class, "has_record"); @Override public boolean hasRecord() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftKelp.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftKelp.java index e9ba8ade4..cf291bbe1 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftKelp.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftKelp.java @@ -9,13 +9,13 @@ public final class CraftKelp extends org.bukkit.craftbukkit.block.data.CraftBloc super(); } - public CraftKelp(net.minecraft.server.IBlockData state) { + public CraftKelp(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftAgeable - private static final net.minecraft.server.BlockStateInteger AGE = getInteger(net.minecraft.server.BlockKelp.class, "age"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger AGE = getInteger(net.minecraft.world.level.block.BlockKelp.class, "age"); @Override public int getAge() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLadder.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLadder.java index 2c7f396fa..16c1bc184 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLadder.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLadder.java @@ -9,13 +9,13 @@ public final class CraftLadder extends org.bukkit.craftbukkit.block.data.CraftBl super(); } - public CraftLadder(net.minecraft.server.IBlockData state) { + public CraftLadder(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockLadder.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockLadder.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { @@ -34,7 +34,7 @@ public final class CraftLadder extends org.bukkit.craftbukkit.block.data.CraftBl // org.bukkit.craftbukkit.block.data.CraftWaterlogged - private static final net.minecraft.server.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.server.BlockLadder.class, "waterlogged"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockLadder.class, "waterlogged"); @Override public boolean isWaterlogged() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLantern.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLantern.java index 461fc2c07..207e5895d 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLantern.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLantern.java @@ -9,13 +9,13 @@ public final class CraftLantern extends org.bukkit.craftbukkit.block.data.CraftB super(); } - public CraftLantern(net.minecraft.server.IBlockData state) { + public CraftLantern(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftLantern - private static final net.minecraft.server.BlockStateBoolean HANGING = getBoolean(net.minecraft.server.BlockLantern.class, "hanging"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean HANGING = getBoolean(net.minecraft.world.level.block.BlockLantern.class, "hanging"); @Override public boolean isHanging() { @@ -29,7 +29,7 @@ public final class CraftLantern extends org.bukkit.craftbukkit.block.data.CraftB // org.bukkit.craftbukkit.block.data.CraftWaterlogged - private static final net.minecraft.server.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.server.BlockLantern.class, "waterlogged"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockLantern.class, "waterlogged"); @Override public boolean isWaterlogged() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLeaves.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLeaves.java index 2e2f091b9..dfbb5289c 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLeaves.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLeaves.java @@ -9,14 +9,14 @@ public final class CraftLeaves extends org.bukkit.craftbukkit.block.data.CraftBl super(); } - public CraftLeaves(net.minecraft.server.IBlockData state) { + public CraftLeaves(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftLeaves - private static final net.minecraft.server.BlockStateInteger DISTANCE = getInteger(net.minecraft.server.BlockLeaves.class, "distance"); - private static final net.minecraft.server.BlockStateBoolean PERSISTENT = getBoolean(net.minecraft.server.BlockLeaves.class, "persistent"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger DISTANCE = getInteger(net.minecraft.world.level.block.BlockLeaves.class, "distance"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean PERSISTENT = getBoolean(net.minecraft.world.level.block.BlockLeaves.class, "persistent"); @Override public boolean isPersistent() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLectern.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLectern.java index f7fa832ed..a25443af3 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLectern.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLectern.java @@ -9,13 +9,13 @@ public final class CraftLectern extends org.bukkit.craftbukkit.block.data.CraftB super(); } - public CraftLectern(net.minecraft.server.IBlockData state) { + public CraftLectern(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftLectern - private static final net.minecraft.server.BlockStateBoolean HAS_BOOK = getBoolean(net.minecraft.server.BlockLectern.class, "has_book"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean HAS_BOOK = getBoolean(net.minecraft.world.level.block.BlockLectern.class, "has_book"); @Override public boolean hasBook() { @@ -24,7 +24,7 @@ public final class CraftLectern extends org.bukkit.craftbukkit.block.data.CraftB // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockLectern.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockLectern.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { @@ -43,7 +43,7 @@ public final class CraftLectern extends org.bukkit.craftbukkit.block.data.CraftB // org.bukkit.craftbukkit.block.data.CraftPowerable - private static final net.minecraft.server.BlockStateBoolean POWERED = getBoolean(net.minecraft.server.BlockLectern.class, "powered"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockLectern.class, "powered"); @Override public boolean isPowered() { 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 ab08c9329..217614886 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLever.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLever.java @@ -9,13 +9,13 @@ public final class CraftLever extends org.bukkit.craftbukkit.block.data.CraftBlo super(); } - public CraftLever(net.minecraft.server.IBlockData state) { + public CraftLever(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftSwitch - private static final net.minecraft.server.BlockStateEnum FACE = getEnum(net.minecraft.server.BlockLever.class, "face"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACE = getEnum(net.minecraft.world.level.block.BlockLever.class, "face"); @Override public org.bukkit.block.data.type.Switch.Face getFace() { @@ -29,7 +29,7 @@ public final class CraftLever extends org.bukkit.craftbukkit.block.data.CraftBlo // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockLever.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockLever.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { @@ -48,7 +48,7 @@ public final class CraftLever extends org.bukkit.craftbukkit.block.data.CraftBlo // org.bukkit.craftbukkit.block.data.CraftFaceAttachable - private static final net.minecraft.server.BlockStateEnum ATTACH_FACE = getEnum(net.minecraft.server.BlockLever.class, "face"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum ATTACH_FACE = getEnum(net.minecraft.world.level.block.BlockLever.class, "face"); @Override public org.bukkit.block.data.FaceAttachable.AttachedFace getAttachedFace() { @@ -62,7 +62,7 @@ public final class CraftLever extends org.bukkit.craftbukkit.block.data.CraftBlo // org.bukkit.craftbukkit.block.data.CraftPowerable - private static final net.minecraft.server.BlockStateBoolean POWERED = getBoolean(net.minecraft.server.BlockLever.class, "powered"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockLever.class, "powered"); @Override public boolean isPowered() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLoom.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLoom.java index e0e56dc95..dad3dd226 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLoom.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLoom.java @@ -9,13 +9,13 @@ public final class CraftLoom extends org.bukkit.craftbukkit.block.data.CraftBloc super(); } - public CraftLoom(net.minecraft.server.IBlockData state) { + public CraftLoom(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockLoom.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockLoom.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { 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 94bc90af3..61e29dd31 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMinecartDetector.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMinecartDetector.java @@ -9,13 +9,13 @@ public final class CraftMinecartDetector extends org.bukkit.craftbukkit.block.da super(); } - public CraftMinecartDetector(net.minecraft.server.IBlockData state) { + public CraftMinecartDetector(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftPowerable - private static final net.minecraft.server.BlockStateBoolean POWERED = getBoolean(net.minecraft.server.BlockMinecartDetector.class, "powered"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockMinecartDetector.class, "powered"); @Override public boolean isPowered() { @@ -29,7 +29,7 @@ public final class CraftMinecartDetector extends org.bukkit.craftbukkit.block.da // org.bukkit.craftbukkit.block.data.CraftRail - private static final net.minecraft.server.BlockStateEnum SHAPE = getEnum(net.minecraft.server.BlockMinecartDetector.class, "shape"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum SHAPE = getEnum(net.minecraft.world.level.block.BlockMinecartDetector.class, "shape"); @Override public org.bukkit.block.data.Rail.Shape getShape() { 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 92df0fa60..ac02a1bea 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMinecartTrack.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMinecartTrack.java @@ -9,13 +9,13 @@ public final class CraftMinecartTrack extends org.bukkit.craftbukkit.block.data. super(); } - public CraftMinecartTrack(net.minecraft.server.IBlockData state) { + public CraftMinecartTrack(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftRail - private static final net.minecraft.server.BlockStateEnum SHAPE = getEnum(net.minecraft.server.BlockMinecartTrack.class, "shape"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum SHAPE = getEnum(net.minecraft.world.level.block.BlockMinecartTrack.class, "shape"); @Override public org.bukkit.block.data.Rail.Shape getShape() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMycel.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMycel.java index ca9d60f3a..f39400b72 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMycel.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMycel.java @@ -9,13 +9,13 @@ public final class CraftMycel extends org.bukkit.craftbukkit.block.data.CraftBlo super(); } - public CraftMycel(net.minecraft.server.IBlockData state) { + public CraftMycel(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftSnowable - private static final net.minecraft.server.BlockStateBoolean SNOWY = getBoolean(net.minecraft.server.BlockMycel.class, "snowy"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean SNOWY = getBoolean(net.minecraft.world.level.block.BlockMycel.class, "snowy"); @Override public boolean isSnowy() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftNetherWart.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftNetherWart.java index 449d0f6f5..036e0d888 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftNetherWart.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftNetherWart.java @@ -9,13 +9,13 @@ public final class CraftNetherWart extends org.bukkit.craftbukkit.block.data.Cra super(); } - public CraftNetherWart(net.minecraft.server.IBlockData state) { + public CraftNetherWart(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftAgeable - private static final net.minecraft.server.BlockStateInteger AGE = getInteger(net.minecraft.server.BlockNetherWart.class, "age"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger AGE = getInteger(net.minecraft.world.level.block.BlockNetherWart.class, "age"); @Override public int getAge() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftNote.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftNote.java index 03a736bd7..9cd547eed 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftNote.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftNote.java @@ -9,14 +9,14 @@ public final class CraftNote extends org.bukkit.craftbukkit.block.data.CraftBloc super(); } - public CraftNote(net.minecraft.server.IBlockData state) { + public CraftNote(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftNoteBlock - private static final net.minecraft.server.BlockStateEnum INSTRUMENT = getEnum(net.minecraft.server.BlockNote.class, "instrument"); - private static final net.minecraft.server.BlockStateInteger NOTE = getInteger(net.minecraft.server.BlockNote.class, "note"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum INSTRUMENT = getEnum(net.minecraft.world.level.block.BlockNote.class, "instrument"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger NOTE = getInteger(net.minecraft.world.level.block.BlockNote.class, "note"); @Override public org.bukkit.Instrument getInstrument() { @@ -40,7 +40,7 @@ public final class CraftNote extends org.bukkit.craftbukkit.block.data.CraftBloc // org.bukkit.craftbukkit.block.data.CraftPowerable - private static final net.minecraft.server.BlockStateBoolean POWERED = getBoolean(net.minecraft.server.BlockNote.class, "powered"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockNote.class, "powered"); @Override public boolean isPowered() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftObserver.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftObserver.java index ba3a4f072..b06ac0287 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftObserver.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftObserver.java @@ -9,13 +9,13 @@ public final class CraftObserver extends org.bukkit.craftbukkit.block.data.Craft super(); } - public CraftObserver(net.minecraft.server.IBlockData state) { + public CraftObserver(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockObserver.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockObserver.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { @@ -34,7 +34,7 @@ public final class CraftObserver extends org.bukkit.craftbukkit.block.data.Craft // org.bukkit.craftbukkit.block.data.CraftPowerable - private static final net.minecraft.server.BlockStateBoolean POWERED = getBoolean(net.minecraft.server.BlockObserver.class, "powered"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockObserver.class, "powered"); @Override public boolean isPowered() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPiston.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPiston.java index f16404f49..754dc78c4 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPiston.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPiston.java @@ -9,13 +9,13 @@ public final class CraftPiston extends org.bukkit.craftbukkit.block.data.CraftBl super(); } - public CraftPiston(net.minecraft.server.IBlockData state) { + public CraftPiston(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftPiston - private static final net.minecraft.server.BlockStateBoolean EXTENDED = getBoolean(net.minecraft.server.BlockPiston.class, "extended"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean EXTENDED = getBoolean(net.minecraft.world.level.block.piston.BlockPiston.class, "extended"); @Override public boolean isExtended() { @@ -29,7 +29,7 @@ public final class CraftPiston extends org.bukkit.craftbukkit.block.data.CraftBl // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockPiston.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.piston.BlockPiston.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { 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 cab86c45a..ad4079ee6 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPistonExtension.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPistonExtension.java @@ -9,13 +9,13 @@ public final class CraftPistonExtension extends org.bukkit.craftbukkit.block.dat super(); } - public CraftPistonExtension(net.minecraft.server.IBlockData state) { + public CraftPistonExtension(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftPistonHead - private static final net.minecraft.server.BlockStateBoolean SHORT = getBoolean(net.minecraft.server.BlockPistonExtension.class, "short"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean SHORT = getBoolean(net.minecraft.world.level.block.piston.BlockPistonExtension.class, "short"); @Override public boolean isShort() { @@ -29,7 +29,7 @@ public final class CraftPistonExtension extends org.bukkit.craftbukkit.block.dat // org.bukkit.craftbukkit.block.data.type.CraftTechnicalPiston - private static final net.minecraft.server.BlockStateEnum TYPE = getEnum(net.minecraft.server.BlockPistonExtension.class, "type"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum TYPE = getEnum(net.minecraft.world.level.block.piston.BlockPistonExtension.class, "type"); @Override public org.bukkit.block.data.type.TechnicalPiston.Type getType() { @@ -43,7 +43,7 @@ public final class CraftPistonExtension extends org.bukkit.craftbukkit.block.dat // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockPistonExtension.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.piston.BlockPistonExtension.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { 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 36c4d35f0..0d20624e0 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPistonMoving.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPistonMoving.java @@ -9,13 +9,13 @@ public final class CraftPistonMoving extends org.bukkit.craftbukkit.block.data.C super(); } - public CraftPistonMoving(net.minecraft.server.IBlockData state) { + public CraftPistonMoving(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftTechnicalPiston - private static final net.minecraft.server.BlockStateEnum TYPE = getEnum(net.minecraft.server.BlockPistonMoving.class, "type"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum TYPE = getEnum(net.minecraft.world.level.block.piston.BlockPistonMoving.class, "type"); @Override public org.bukkit.block.data.type.TechnicalPiston.Type getType() { @@ -29,7 +29,7 @@ public final class CraftPistonMoving extends org.bukkit.craftbukkit.block.data.C // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockPistonMoving.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.piston.BlockPistonMoving.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPortal.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPortal.java index 7701ca85d..b74a7783e 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPortal.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPortal.java @@ -9,13 +9,13 @@ public final class CraftPortal extends org.bukkit.craftbukkit.block.data.CraftBl super(); } - public CraftPortal(net.minecraft.server.IBlockData state) { + public CraftPortal(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftOrientable - private static final net.minecraft.server.BlockStateEnum AXIS = getEnum(net.minecraft.server.BlockPortal.class, "axis"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum AXIS = getEnum(net.minecraft.world.level.block.BlockPortal.class, "axis"); @Override public org.bukkit.Axis getAxis() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPotatoes.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPotatoes.java index c09a9c78c..7b43c937c 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPotatoes.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPotatoes.java @@ -9,13 +9,13 @@ public final class CraftPotatoes extends org.bukkit.craftbukkit.block.data.Craft super(); } - public CraftPotatoes(net.minecraft.server.IBlockData state) { + public CraftPotatoes(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftAgeable - private static final net.minecraft.server.BlockStateInteger AGE = getInteger(net.minecraft.server.BlockPotatoes.class, "age"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger AGE = getInteger(net.minecraft.world.level.block.BlockPotatoes.class, "age"); @Override public int getAge() { 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 71d62fda3..c8dc7e331 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPoweredRail.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPoweredRail.java @@ -9,13 +9,13 @@ public final class CraftPoweredRail extends org.bukkit.craftbukkit.block.data.Cr super(); } - public CraftPoweredRail(net.minecraft.server.IBlockData state) { + public CraftPoweredRail(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftPowerable - private static final net.minecraft.server.BlockStateBoolean POWERED = getBoolean(net.minecraft.server.BlockPoweredRail.class, "powered"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockPoweredRail.class, "powered"); @Override public boolean isPowered() { @@ -29,7 +29,7 @@ public final class CraftPoweredRail extends org.bukkit.craftbukkit.block.data.Cr // org.bukkit.craftbukkit.block.data.CraftRail - private static final net.minecraft.server.BlockStateEnum SHAPE = getEnum(net.minecraft.server.BlockPoweredRail.class, "shape"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum SHAPE = getEnum(net.minecraft.world.level.block.BlockPoweredRail.class, "shape"); @Override public org.bukkit.block.data.Rail.Shape getShape() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPressurePlateBinary.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPressurePlateBinary.java index 806ad2565..4239183d5 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPressurePlateBinary.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPressurePlateBinary.java @@ -9,13 +9,13 @@ public final class CraftPressurePlateBinary extends org.bukkit.craftbukkit.block super(); } - public CraftPressurePlateBinary(net.minecraft.server.IBlockData state) { + public CraftPressurePlateBinary(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftPowerable - private static final net.minecraft.server.BlockStateBoolean POWERED = getBoolean(net.minecraft.server.BlockPressurePlateBinary.class, "powered"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockPressurePlateBinary.class, "powered"); @Override public boolean isPowered() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPressurePlateWeighted.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPressurePlateWeighted.java index 840506640..4477c73fd 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPressurePlateWeighted.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPressurePlateWeighted.java @@ -9,13 +9,13 @@ public final class CraftPressurePlateWeighted extends org.bukkit.craftbukkit.blo super(); } - public CraftPressurePlateWeighted(net.minecraft.server.IBlockData state) { + public CraftPressurePlateWeighted(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftAnaloguePowerable - private static final net.minecraft.server.BlockStateInteger POWER = getInteger(net.minecraft.server.BlockPressurePlateWeighted.class, "power"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger POWER = getInteger(net.minecraft.world.level.block.BlockPressurePlateWeighted.class, "power"); @Override public int getPower() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPumpkinCarved.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPumpkinCarved.java index b258e7449..cf2822bd2 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPumpkinCarved.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPumpkinCarved.java @@ -9,13 +9,13 @@ public final class CraftPumpkinCarved extends org.bukkit.craftbukkit.block.data. super(); } - public CraftPumpkinCarved(net.minecraft.server.IBlockData state) { + public CraftPumpkinCarved(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockPumpkinCarved.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockPumpkinCarved.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { 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 ceb4b5bfc..5d33c10b3 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneComparator.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneComparator.java @@ -9,13 +9,13 @@ public final class CraftRedstoneComparator extends org.bukkit.craftbukkit.block. super(); } - public CraftRedstoneComparator(net.minecraft.server.IBlockData state) { + public CraftRedstoneComparator(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftComparator - private static final net.minecraft.server.BlockStateEnum MODE = getEnum(net.minecraft.server.BlockRedstoneComparator.class, "mode"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum MODE = getEnum(net.minecraft.world.level.block.BlockRedstoneComparator.class, "mode"); @Override public org.bukkit.block.data.type.Comparator.Mode getMode() { @@ -29,7 +29,7 @@ public final class CraftRedstoneComparator extends org.bukkit.craftbukkit.block. // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockRedstoneComparator.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockRedstoneComparator.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { @@ -48,7 +48,7 @@ public final class CraftRedstoneComparator extends org.bukkit.craftbukkit.block. // org.bukkit.craftbukkit.block.data.CraftPowerable - private static final net.minecraft.server.BlockStateBoolean POWERED = getBoolean(net.minecraft.server.BlockRedstoneComparator.class, "powered"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockRedstoneComparator.class, "powered"); @Override public boolean isPowered() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneLamp.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneLamp.java index 7769c93c8..ceb0ab3e3 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneLamp.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneLamp.java @@ -9,13 +9,13 @@ public final class CraftRedstoneLamp extends org.bukkit.craftbukkit.block.data.C super(); } - public CraftRedstoneLamp(net.minecraft.server.IBlockData state) { + public CraftRedstoneLamp(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftLightable - private static final net.minecraft.server.BlockStateBoolean LIT = getBoolean(net.minecraft.server.BlockRedstoneLamp.class, "lit"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean LIT = getBoolean(net.minecraft.world.level.block.BlockRedstoneLamp.class, "lit"); @Override public boolean isLit() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneOre.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneOre.java index effe08ead..116331495 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneOre.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneOre.java @@ -9,13 +9,13 @@ public final class CraftRedstoneOre extends org.bukkit.craftbukkit.block.data.Cr super(); } - public CraftRedstoneOre(net.minecraft.server.IBlockData state) { + public CraftRedstoneOre(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftLightable - private static final net.minecraft.server.BlockStateBoolean LIT = getBoolean(net.minecraft.server.BlockRedstoneOre.class, "lit"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean LIT = getBoolean(net.minecraft.world.level.block.BlockRedstoneOre.class, "lit"); @Override public boolean isLit() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneTorch.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneTorch.java index d9d142016..cc346ac04 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneTorch.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneTorch.java @@ -9,13 +9,13 @@ public final class CraftRedstoneTorch extends org.bukkit.craftbukkit.block.data. super(); } - public CraftRedstoneTorch(net.minecraft.server.IBlockData state) { + public CraftRedstoneTorch(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftLightable - private static final net.minecraft.server.BlockStateBoolean LIT = getBoolean(net.minecraft.server.BlockRedstoneTorch.class, "lit"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean LIT = getBoolean(net.minecraft.world.level.block.BlockRedstoneTorch.class, "lit"); @Override public boolean isLit() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneTorchWall.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneTorchWall.java index 8125b4004..db64e31e9 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneTorchWall.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneTorchWall.java @@ -9,13 +9,13 @@ public final class CraftRedstoneTorchWall extends org.bukkit.craftbukkit.block.d super(); } - public CraftRedstoneTorchWall(net.minecraft.server.IBlockData state) { + public CraftRedstoneTorchWall(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockRedstoneTorchWall.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockRedstoneTorchWall.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { @@ -34,7 +34,7 @@ public final class CraftRedstoneTorchWall extends org.bukkit.craftbukkit.block.d // org.bukkit.craftbukkit.block.data.CraftLightable - private static final net.minecraft.server.BlockStateBoolean LIT = getBoolean(net.minecraft.server.BlockRedstoneTorchWall.class, "lit"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean LIT = getBoolean(net.minecraft.world.level.block.BlockRedstoneTorchWall.class, "lit"); @Override public boolean isLit() { 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 5093e56ef..e05ae0efa 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneWire.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneWire.java @@ -9,16 +9,16 @@ public final class CraftRedstoneWire extends org.bukkit.craftbukkit.block.data.C super(); } - public CraftRedstoneWire(net.minecraft.server.IBlockData state) { + public CraftRedstoneWire(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftRedstoneWire - private static final net.minecraft.server.BlockStateEnum NORTH = getEnum(net.minecraft.server.BlockRedstoneWire.class, "north"); - private static final net.minecraft.server.BlockStateEnum EAST = getEnum(net.minecraft.server.BlockRedstoneWire.class, "east"); - private static final net.minecraft.server.BlockStateEnum SOUTH = getEnum(net.minecraft.server.BlockRedstoneWire.class, "south"); - private static final net.minecraft.server.BlockStateEnum WEST = getEnum(net.minecraft.server.BlockRedstoneWire.class, "west"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum NORTH = getEnum(net.minecraft.world.level.block.BlockRedstoneWire.class, "north"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum EAST = getEnum(net.minecraft.world.level.block.BlockRedstoneWire.class, "east"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum SOUTH = getEnum(net.minecraft.world.level.block.BlockRedstoneWire.class, "south"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum WEST = getEnum(net.minecraft.world.level.block.BlockRedstoneWire.class, "west"); @Override public org.bukkit.block.data.type.RedstoneWire.Connection getFace(org.bukkit.block.BlockFace face) { @@ -63,7 +63,7 @@ public final class CraftRedstoneWire extends org.bukkit.craftbukkit.block.data.C // org.bukkit.craftbukkit.block.data.CraftAnaloguePowerable - private static final net.minecraft.server.BlockStateInteger POWER = getInteger(net.minecraft.server.BlockRedstoneWire.class, "power"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger POWER = getInteger(net.minecraft.world.level.block.BlockRedstoneWire.class, "power"); @Override public int getPower() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftReed.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftReed.java index 138b8701b..f3a8aca15 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftReed.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftReed.java @@ -9,13 +9,13 @@ public final class CraftReed extends org.bukkit.craftbukkit.block.data.CraftBloc super(); } - public CraftReed(net.minecraft.server.IBlockData state) { + public CraftReed(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftAgeable - private static final net.minecraft.server.BlockStateInteger AGE = getInteger(net.minecraft.server.BlockReed.class, "age"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger AGE = getInteger(net.minecraft.world.level.block.BlockReed.class, "age"); @Override public int getAge() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRepeater.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRepeater.java index 97724f682..85772e365 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRepeater.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRepeater.java @@ -9,14 +9,14 @@ public final class CraftRepeater extends org.bukkit.craftbukkit.block.data.Craft super(); } - public CraftRepeater(net.minecraft.server.IBlockData state) { + public CraftRepeater(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftRepeater - private static final net.minecraft.server.BlockStateInteger DELAY = getInteger(net.minecraft.server.BlockRepeater.class, "delay"); - private static final net.minecraft.server.BlockStateBoolean LOCKED = getBoolean(net.minecraft.server.BlockRepeater.class, "locked"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger DELAY = getInteger(net.minecraft.world.level.block.BlockRepeater.class, "delay"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean LOCKED = getBoolean(net.minecraft.world.level.block.BlockRepeater.class, "locked"); @Override public int getDelay() { @@ -50,7 +50,7 @@ public final class CraftRepeater extends org.bukkit.craftbukkit.block.data.Craft // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockRepeater.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockRepeater.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { @@ -69,7 +69,7 @@ public final class CraftRepeater extends org.bukkit.craftbukkit.block.data.Craft // org.bukkit.craftbukkit.block.data.CraftPowerable - private static final net.minecraft.server.BlockStateBoolean POWERED = getBoolean(net.minecraft.server.BlockRepeater.class, "powered"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockRepeater.class, "powered"); @Override public boolean isPowered() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRespawnAnchor.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRespawnAnchor.java index 4a3e38864..316ea5204 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRespawnAnchor.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRespawnAnchor.java @@ -9,13 +9,13 @@ public final class CraftRespawnAnchor extends org.bukkit.craftbukkit.block.data. super(); } - public CraftRespawnAnchor(net.minecraft.server.IBlockData state) { + public CraftRespawnAnchor(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftRespawnAnchor - private static final net.minecraft.server.BlockStateInteger CHARGES = getInteger(net.minecraft.server.BlockRespawnAnchor.class, "charges"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger CHARGES = getInteger(net.minecraft.world.level.block.BlockRespawnAnchor.class, "charges"); @Override public int getCharges() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRotatable.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRotatable.java index c44f23e64..b14166e5b 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRotatable.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRotatable.java @@ -9,13 +9,13 @@ public final class CraftRotatable extends org.bukkit.craftbukkit.block.data.Craf super(); } - public CraftRotatable(net.minecraft.server.IBlockData state) { + public CraftRotatable(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftOrientable - private static final net.minecraft.server.BlockStateEnum AXIS = getEnum(net.minecraft.server.BlockRotatable.class, "axis"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum AXIS = getEnum(net.minecraft.world.level.block.BlockRotatable.class, "axis"); @Override public org.bukkit.Axis getAxis() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSapling.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSapling.java index 0654c9e7b..b9a0b1466 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSapling.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSapling.java @@ -9,13 +9,13 @@ public final class CraftSapling extends org.bukkit.craftbukkit.block.data.CraftB super(); } - public CraftSapling(net.minecraft.server.IBlockData state) { + public CraftSapling(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftSapling - private static final net.minecraft.server.BlockStateInteger STAGE = getInteger(net.minecraft.server.BlockSapling.class, "stage"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger STAGE = getInteger(net.minecraft.world.level.block.BlockSapling.class, "stage"); @Override public int getStage() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftScaffolding.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftScaffolding.java index 857e4d1fc..10c244249 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftScaffolding.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftScaffolding.java @@ -9,14 +9,14 @@ public final class CraftScaffolding extends org.bukkit.craftbukkit.block.data.Cr super(); } - public CraftScaffolding(net.minecraft.server.IBlockData state) { + public CraftScaffolding(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftScaffolding - private static final net.minecraft.server.BlockStateBoolean BOTTOM = getBoolean(net.minecraft.server.BlockScaffolding.class, "bottom"); - private static final net.minecraft.server.BlockStateInteger DISTANCE = getInteger(net.minecraft.server.BlockScaffolding.class, "distance"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean BOTTOM = getBoolean(net.minecraft.world.level.block.BlockScaffolding.class, "bottom"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger DISTANCE = getInteger(net.minecraft.world.level.block.BlockScaffolding.class, "distance"); @Override public boolean isBottom() { @@ -45,7 +45,7 @@ public final class CraftScaffolding extends org.bukkit.craftbukkit.block.data.Cr // org.bukkit.craftbukkit.block.data.CraftWaterlogged - private static final net.minecraft.server.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.server.BlockScaffolding.class, "waterlogged"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockScaffolding.class, "waterlogged"); @Override public boolean isWaterlogged() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSeaPickle.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSeaPickle.java index a0078bd8b..154e4bddb 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSeaPickle.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSeaPickle.java @@ -9,13 +9,13 @@ public final class CraftSeaPickle extends org.bukkit.craftbukkit.block.data.Craf super(); } - public CraftSeaPickle(net.minecraft.server.IBlockData state) { + public CraftSeaPickle(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftSeaPickle - private static final net.minecraft.server.BlockStateInteger PICKLES = getInteger(net.minecraft.server.BlockSeaPickle.class, "pickles"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger PICKLES = getInteger(net.minecraft.world.level.block.BlockSeaPickle.class, "pickles"); @Override public int getPickles() { @@ -39,7 +39,7 @@ public final class CraftSeaPickle extends org.bukkit.craftbukkit.block.data.Craf // org.bukkit.craftbukkit.block.data.CraftWaterlogged - private static final net.minecraft.server.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.server.BlockSeaPickle.class, "waterlogged"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockSeaPickle.class, "waterlogged"); @Override public boolean isWaterlogged() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftShulkerBox.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftShulkerBox.java index 631f5cffb..2310a2573 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftShulkerBox.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftShulkerBox.java @@ -9,13 +9,13 @@ public final class CraftShulkerBox extends org.bukkit.craftbukkit.block.data.Cra super(); } - public CraftShulkerBox(net.minecraft.server.IBlockData state) { + public CraftShulkerBox(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockShulkerBox.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockShulkerBox.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSkull.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSkull.java index 5677a9f0b..255b87af6 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSkull.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSkull.java @@ -9,13 +9,13 @@ public final class CraftSkull extends org.bukkit.craftbukkit.block.data.CraftBlo super(); } - public CraftSkull(net.minecraft.server.IBlockData state) { + public CraftSkull(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftRotatable - private static final net.minecraft.server.BlockStateInteger ROTATION = getInteger(net.minecraft.server.BlockSkull.class, "rotation"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger ROTATION = getInteger(net.minecraft.world.level.block.BlockSkull.class, "rotation"); @Override public org.bukkit.block.BlockFace getRotation() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSkullPlayer.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSkullPlayer.java index 6e6e0033f..8637b414d 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSkullPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSkullPlayer.java @@ -9,13 +9,13 @@ public final class CraftSkullPlayer extends org.bukkit.craftbukkit.block.data.Cr super(); } - public CraftSkullPlayer(net.minecraft.server.IBlockData state) { + public CraftSkullPlayer(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftRotatable - private static final net.minecraft.server.BlockStateInteger ROTATION = getInteger(net.minecraft.server.BlockSkullPlayer.class, "rotation"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger ROTATION = getInteger(net.minecraft.world.level.block.BlockSkullPlayer.class, "rotation"); @Override public org.bukkit.block.BlockFace getRotation() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSkullPlayerWall.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSkullPlayerWall.java index d2b3ce935..14e526092 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSkullPlayerWall.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSkullPlayerWall.java @@ -9,13 +9,13 @@ public final class CraftSkullPlayerWall extends org.bukkit.craftbukkit.block.dat super(); } - public CraftSkullPlayerWall(net.minecraft.server.IBlockData state) { + public CraftSkullPlayerWall(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockSkullPlayerWall.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockSkullPlayerWall.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSkullWall.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSkullWall.java index 020e5b715..74e8f65da 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSkullWall.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSkullWall.java @@ -9,13 +9,13 @@ public final class CraftSkullWall extends org.bukkit.craftbukkit.block.data.Craf super(); } - public CraftSkullWall(net.minecraft.server.IBlockData state) { + public CraftSkullWall(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockSkullWall.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockSkullWall.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSmoker.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSmoker.java index c14aed35c..5dd456a46 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSmoker.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSmoker.java @@ -9,13 +9,13 @@ public final class CraftSmoker extends org.bukkit.craftbukkit.block.data.CraftBl super(); } - public CraftSmoker(net.minecraft.server.IBlockData state) { + public CraftSmoker(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockSmoker.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockSmoker.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { @@ -34,7 +34,7 @@ public final class CraftSmoker extends org.bukkit.craftbukkit.block.data.CraftBl // org.bukkit.craftbukkit.block.data.CraftLightable - private static final net.minecraft.server.BlockStateBoolean LIT = getBoolean(net.minecraft.server.BlockSmoker.class, "lit"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean LIT = getBoolean(net.minecraft.world.level.block.BlockSmoker.class, "lit"); @Override public boolean isLit() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSnow.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSnow.java index d4f0bfa80..fd54c47ca 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSnow.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSnow.java @@ -9,13 +9,13 @@ public final class CraftSnow extends org.bukkit.craftbukkit.block.data.CraftBloc super(); } - public CraftSnow(net.minecraft.server.IBlockData state) { + public CraftSnow(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftSnow - private static final net.minecraft.server.BlockStateInteger LAYERS = getInteger(net.minecraft.server.BlockSnow.class, "layers"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger LAYERS = getInteger(net.minecraft.world.level.block.BlockSnow.class, "layers"); @Override public int getLayers() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSoil.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSoil.java index 09cfa4671..9c0e6a32a 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSoil.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSoil.java @@ -9,13 +9,13 @@ public final class CraftSoil extends org.bukkit.craftbukkit.block.data.CraftBloc super(); } - public CraftSoil(net.minecraft.server.IBlockData state) { + public CraftSoil(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftFarmland - private static final net.minecraft.server.BlockStateInteger MOISTURE = getInteger(net.minecraft.server.BlockSoil.class, "moisture"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger MOISTURE = getInteger(net.minecraft.world.level.block.BlockSoil.class, "moisture"); @Override public int getMoisture() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStainedGlassPane.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStainedGlassPane.java index 2fc25359c..983a2fcc2 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStainedGlassPane.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStainedGlassPane.java @@ -9,19 +9,19 @@ public final class CraftStainedGlassPane extends org.bukkit.craftbukkit.block.da super(); } - public CraftStainedGlassPane(net.minecraft.server.IBlockData state) { + public CraftStainedGlassPane(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftMultipleFacing - private static final net.minecraft.server.BlockStateBoolean[] FACES = new net.minecraft.server.BlockStateBoolean[]{ - getBoolean(net.minecraft.server.BlockStainedGlassPane.class, "north", true), getBoolean(net.minecraft.server.BlockStainedGlassPane.class, "east", true), getBoolean(net.minecraft.server.BlockStainedGlassPane.class, "south", true), getBoolean(net.minecraft.server.BlockStainedGlassPane.class, "west", true), getBoolean(net.minecraft.server.BlockStainedGlassPane.class, "up", true), getBoolean(net.minecraft.server.BlockStainedGlassPane.class, "down", true) + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean[] FACES = new net.minecraft.world.level.block.state.properties.BlockStateBoolean[]{ + getBoolean(net.minecraft.world.level.block.BlockStainedGlassPane.class, "north", true), getBoolean(net.minecraft.world.level.block.BlockStainedGlassPane.class, "east", true), getBoolean(net.minecraft.world.level.block.BlockStainedGlassPane.class, "south", true), getBoolean(net.minecraft.world.level.block.BlockStainedGlassPane.class, "west", true), getBoolean(net.minecraft.world.level.block.BlockStainedGlassPane.class, "up", true), getBoolean(net.minecraft.world.level.block.BlockStainedGlassPane.class, "down", true) }; @Override public boolean hasFace(org.bukkit.block.BlockFace face) { - net.minecraft.server.BlockStateBoolean state = FACES[face.ordinal()]; + net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()]; if (state == null) { throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces."); } @@ -30,7 +30,7 @@ public final class CraftStainedGlassPane extends org.bukkit.craftbukkit.block.da @Override public void setFace(org.bukkit.block.BlockFace face, boolean has) { - net.minecraft.server.BlockStateBoolean state = FACES[face.ordinal()]; + net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()]; if (state == null) { throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces."); } @@ -65,7 +65,7 @@ public final class CraftStainedGlassPane extends org.bukkit.craftbukkit.block.da // org.bukkit.craftbukkit.block.data.CraftWaterlogged - private static final net.minecraft.server.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.server.BlockStainedGlassPane.class, "waterlogged"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockStainedGlassPane.class, "waterlogged"); @Override public boolean isWaterlogged() { 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 bb4b8fd22..603447b2b 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStairs.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStairs.java @@ -9,13 +9,13 @@ public final class CraftStairs extends org.bukkit.craftbukkit.block.data.CraftBl super(); } - public CraftStairs(net.minecraft.server.IBlockData state) { + public CraftStairs(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftStairs - private static final net.minecraft.server.BlockStateEnum SHAPE = getEnum(net.minecraft.server.BlockStairs.class, "shape"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum SHAPE = getEnum(net.minecraft.world.level.block.BlockStairs.class, "shape"); @Override public org.bukkit.block.data.type.Stairs.Shape getShape() { @@ -29,7 +29,7 @@ public final class CraftStairs extends org.bukkit.craftbukkit.block.data.CraftBl // org.bukkit.craftbukkit.block.data.CraftBisected - private static final net.minecraft.server.BlockStateEnum HALF = getEnum(net.minecraft.server.BlockStairs.class, "half"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum HALF = getEnum(net.minecraft.world.level.block.BlockStairs.class, "half"); @Override public org.bukkit.block.data.Bisected.Half getHalf() { @@ -43,7 +43,7 @@ public final class CraftStairs extends org.bukkit.craftbukkit.block.data.CraftBl // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockStairs.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockStairs.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { @@ -62,7 +62,7 @@ public final class CraftStairs extends org.bukkit.craftbukkit.block.data.CraftBl // org.bukkit.craftbukkit.block.data.CraftWaterlogged - private static final net.minecraft.server.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.server.BlockStairs.class, "waterlogged"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockStairs.class, "waterlogged"); @Override public boolean isWaterlogged() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStem.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStem.java index 2a91e9582..9c0e2a121 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStem.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStem.java @@ -9,13 +9,13 @@ public final class CraftStem extends org.bukkit.craftbukkit.block.data.CraftBloc super(); } - public CraftStem(net.minecraft.server.IBlockData state) { + public CraftStem(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftAgeable - private static final net.minecraft.server.BlockStateInteger AGE = getInteger(net.minecraft.server.BlockStem.class, "age"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger AGE = getInteger(net.minecraft.world.level.block.BlockStem.class, "age"); @Override public int getAge() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStemAttached.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStemAttached.java index c6d9223d1..6297c45c2 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStemAttached.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStemAttached.java @@ -9,13 +9,13 @@ public final class CraftStemAttached extends org.bukkit.craftbukkit.block.data.C super(); } - public CraftStemAttached(net.minecraft.server.IBlockData state) { + public CraftStemAttached(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockStemAttached.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockStemAttached.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { 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 68fec26d1..eeaae4fa6 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStepAbstract.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStepAbstract.java @@ -9,13 +9,13 @@ public final class CraftStepAbstract extends org.bukkit.craftbukkit.block.data.C super(); } - public CraftStepAbstract(net.minecraft.server.IBlockData state) { + public CraftStepAbstract(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftSlab - private static final net.minecraft.server.BlockStateEnum TYPE = getEnum(net.minecraft.server.BlockStepAbstract.class, "type"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum TYPE = getEnum(net.minecraft.world.level.block.BlockStepAbstract.class, "type"); @Override public org.bukkit.block.data.type.Slab.Type getType() { @@ -29,7 +29,7 @@ public final class CraftStepAbstract extends org.bukkit.craftbukkit.block.data.C // org.bukkit.craftbukkit.block.data.CraftWaterlogged - private static final net.minecraft.server.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.server.BlockStepAbstract.class, "waterlogged"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockStepAbstract.class, "waterlogged"); @Override public boolean isWaterlogged() { 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 35d3d96d2..7333591d8 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStoneButton.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStoneButton.java @@ -9,13 +9,13 @@ public final class CraftStoneButton extends org.bukkit.craftbukkit.block.data.Cr super(); } - public CraftStoneButton(net.minecraft.server.IBlockData state) { + public CraftStoneButton(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftSwitch - private static final net.minecraft.server.BlockStateEnum FACE = getEnum(net.minecraft.server.BlockStoneButton.class, "face"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACE = getEnum(net.minecraft.world.level.block.BlockStoneButton.class, "face"); @Override public org.bukkit.block.data.type.Switch.Face getFace() { @@ -29,7 +29,7 @@ public final class CraftStoneButton extends org.bukkit.craftbukkit.block.data.Cr // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockStoneButton.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockStoneButton.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { @@ -48,7 +48,7 @@ public final class CraftStoneButton extends org.bukkit.craftbukkit.block.data.Cr // org.bukkit.craftbukkit.block.data.CraftFaceAttachable - private static final net.minecraft.server.BlockStateEnum ATTACH_FACE = getEnum(net.minecraft.server.BlockStoneButton.class, "face"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum ATTACH_FACE = getEnum(net.minecraft.world.level.block.BlockStoneButton.class, "face"); @Override public org.bukkit.block.data.FaceAttachable.AttachedFace getAttachedFace() { @@ -62,7 +62,7 @@ public final class CraftStoneButton extends org.bukkit.craftbukkit.block.data.Cr // org.bukkit.craftbukkit.block.data.CraftPowerable - private static final net.minecraft.server.BlockStateBoolean POWERED = getBoolean(net.minecraft.server.BlockStoneButton.class, "powered"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockStoneButton.class, "powered"); @Override public boolean isPowered() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStonecutter.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStonecutter.java index 7a2789eb7..5d3ab776d 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStonecutter.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStonecutter.java @@ -9,13 +9,13 @@ public final class CraftStonecutter extends org.bukkit.craftbukkit.block.data.Cr super(); } - public CraftStonecutter(net.minecraft.server.IBlockData state) { + public CraftStonecutter(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockStonecutter.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockStonecutter.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { 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 5cc301f0b..297070b8f 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStructure.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStructure.java @@ -9,13 +9,13 @@ public final class CraftStructure extends org.bukkit.craftbukkit.block.data.Craf super(); } - public CraftStructure(net.minecraft.server.IBlockData state) { + public CraftStructure(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftStructureBlock - private static final net.minecraft.server.BlockStateEnum MODE = getEnum(net.minecraft.server.BlockStructure.class, "mode"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum MODE = getEnum(net.minecraft.world.level.block.BlockStructure.class, "mode"); @Override public org.bukkit.block.data.type.StructureBlock.Mode getMode() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSweetBerryBush.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSweetBerryBush.java index 2733a067e..39e9375e8 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSweetBerryBush.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSweetBerryBush.java @@ -9,13 +9,13 @@ public final class CraftSweetBerryBush extends org.bukkit.craftbukkit.block.data super(); } - public CraftSweetBerryBush(net.minecraft.server.IBlockData state) { + public CraftSweetBerryBush(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftAgeable - private static final net.minecraft.server.BlockStateInteger AGE = getInteger(net.minecraft.server.BlockSweetBerryBush.class, "age"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger AGE = getInteger(net.minecraft.world.level.block.BlockSweetBerryBush.class, "age"); @Override public int getAge() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTNT.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTNT.java index cf9c33b82..4b08b54de 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTNT.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTNT.java @@ -9,13 +9,13 @@ public final class CraftTNT extends org.bukkit.craftbukkit.block.data.CraftBlock super(); } - public CraftTNT(net.minecraft.server.IBlockData state) { + public CraftTNT(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftTNT - private static final net.minecraft.server.BlockStateBoolean UNSTABLE = getBoolean(net.minecraft.server.BlockTNT.class, "unstable"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean UNSTABLE = getBoolean(net.minecraft.world.level.block.BlockTNT.class, "unstable"); @Override public boolean isUnstable() { 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 718ec49ad..8e753b21a 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTallPlant.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTallPlant.java @@ -9,13 +9,13 @@ public final class CraftTallPlant extends org.bukkit.craftbukkit.block.data.Craf super(); } - public CraftTallPlant(net.minecraft.server.IBlockData state) { + public CraftTallPlant(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftBisected - private static final net.minecraft.server.BlockStateEnum HALF = getEnum(net.minecraft.server.BlockTallPlant.class, "half"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum HALF = getEnum(net.minecraft.world.level.block.BlockTallPlant.class, "half"); @Override public org.bukkit.block.data.Bisected.Half getHalf() { 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 07645ac95..50490d273 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTallPlantFlower.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTallPlantFlower.java @@ -9,13 +9,13 @@ public final class CraftTallPlantFlower extends org.bukkit.craftbukkit.block.dat super(); } - public CraftTallPlantFlower(net.minecraft.server.IBlockData state) { + public CraftTallPlantFlower(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftBisected - private static final net.minecraft.server.BlockStateEnum HALF = getEnum(net.minecraft.server.BlockTallPlantFlower.class, "half"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum HALF = getEnum(net.minecraft.world.level.block.BlockTallPlantFlower.class, "half"); @Override public org.bukkit.block.data.Bisected.Half getHalf() { 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 9242494fd..af8178b35 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTallSeaGrass.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTallSeaGrass.java @@ -9,13 +9,13 @@ public final class CraftTallSeaGrass extends org.bukkit.craftbukkit.block.data.C super(); } - public CraftTallSeaGrass(net.minecraft.server.IBlockData state) { + public CraftTallSeaGrass(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftBisected - private static final net.minecraft.server.BlockStateEnum HALF = getEnum(net.minecraft.server.BlockTallSeaGrass.class, "half"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum HALF = getEnum(net.minecraft.world.level.block.BlockTallSeaGrass.class, "half"); @Override public org.bukkit.block.data.Bisected.Half getHalf() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTarget.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTarget.java index 4d1ba198a..f1c73016a 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTarget.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTarget.java @@ -9,13 +9,13 @@ public final class CraftTarget extends org.bukkit.craftbukkit.block.data.CraftBl super(); } - public CraftTarget(net.minecraft.server.IBlockData state) { + public CraftTarget(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftAnaloguePowerable - private static final net.minecraft.server.BlockStateInteger POWER = getInteger(net.minecraft.server.BlockTarget.class, "power"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger POWER = getInteger(net.minecraft.world.level.block.BlockTarget.class, "power"); @Override public int getPower() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTorchWall.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTorchWall.java index d98f21aaf..fc307680e 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTorchWall.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTorchWall.java @@ -9,13 +9,13 @@ public final class CraftTorchWall extends org.bukkit.craftbukkit.block.data.Craf super(); } - public CraftTorchWall(net.minecraft.server.IBlockData state) { + public CraftTorchWall(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockTorchWall.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockTorchWall.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { 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 16f789cf5..c8c6ae2c8 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTrapdoor.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTrapdoor.java @@ -9,13 +9,13 @@ public final class CraftTrapdoor extends org.bukkit.craftbukkit.block.data.Craft super(); } - public CraftTrapdoor(net.minecraft.server.IBlockData state) { + public CraftTrapdoor(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftBisected - private static final net.minecraft.server.BlockStateEnum HALF = getEnum(net.minecraft.server.BlockTrapdoor.class, "half"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum HALF = getEnum(net.minecraft.world.level.block.BlockTrapdoor.class, "half"); @Override public org.bukkit.block.data.Bisected.Half getHalf() { @@ -29,7 +29,7 @@ public final class CraftTrapdoor extends org.bukkit.craftbukkit.block.data.Craft // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockTrapdoor.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockTrapdoor.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { @@ -48,7 +48,7 @@ public final class CraftTrapdoor extends org.bukkit.craftbukkit.block.data.Craft // org.bukkit.craftbukkit.block.data.CraftOpenable - private static final net.minecraft.server.BlockStateBoolean OPEN = getBoolean(net.minecraft.server.BlockTrapdoor.class, "open"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean OPEN = getBoolean(net.minecraft.world.level.block.BlockTrapdoor.class, "open"); @Override public boolean isOpen() { @@ -62,7 +62,7 @@ public final class CraftTrapdoor extends org.bukkit.craftbukkit.block.data.Craft // org.bukkit.craftbukkit.block.data.CraftPowerable - private static final net.minecraft.server.BlockStateBoolean POWERED = getBoolean(net.minecraft.server.BlockTrapdoor.class, "powered"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockTrapdoor.class, "powered"); @Override public boolean isPowered() { @@ -76,7 +76,7 @@ public final class CraftTrapdoor extends org.bukkit.craftbukkit.block.data.Craft // org.bukkit.craftbukkit.block.data.CraftWaterlogged - private static final net.minecraft.server.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.server.BlockTrapdoor.class, "waterlogged"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockTrapdoor.class, "waterlogged"); @Override public boolean isWaterlogged() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTripwire.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTripwire.java index cfce50fcc..b8e01c7b2 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTripwire.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTripwire.java @@ -9,13 +9,13 @@ public final class CraftTripwire extends org.bukkit.craftbukkit.block.data.Craft super(); } - public CraftTripwire(net.minecraft.server.IBlockData state) { + public CraftTripwire(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftTripwire - private static final net.minecraft.server.BlockStateBoolean DISARMED = getBoolean(net.minecraft.server.BlockTripwire.class, "disarmed"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean DISARMED = getBoolean(net.minecraft.world.level.block.BlockTripwire.class, "disarmed"); @Override public boolean isDisarmed() { @@ -29,7 +29,7 @@ public final class CraftTripwire extends org.bukkit.craftbukkit.block.data.Craft // org.bukkit.craftbukkit.block.data.CraftAttachable - private static final net.minecraft.server.BlockStateBoolean ATTACHED = getBoolean(net.minecraft.server.BlockTripwire.class, "attached"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean ATTACHED = getBoolean(net.minecraft.world.level.block.BlockTripwire.class, "attached"); @Override public boolean isAttached() { @@ -43,13 +43,13 @@ public final class CraftTripwire extends org.bukkit.craftbukkit.block.data.Craft // org.bukkit.craftbukkit.block.data.CraftMultipleFacing - private static final net.minecraft.server.BlockStateBoolean[] FACES = new net.minecraft.server.BlockStateBoolean[]{ - getBoolean(net.minecraft.server.BlockTripwire.class, "north", true), getBoolean(net.minecraft.server.BlockTripwire.class, "east", true), getBoolean(net.minecraft.server.BlockTripwire.class, "south", true), getBoolean(net.minecraft.server.BlockTripwire.class, "west", true), getBoolean(net.minecraft.server.BlockTripwire.class, "up", true), getBoolean(net.minecraft.server.BlockTripwire.class, "down", true) + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean[] FACES = new net.minecraft.world.level.block.state.properties.BlockStateBoolean[]{ + getBoolean(net.minecraft.world.level.block.BlockTripwire.class, "north", true), getBoolean(net.minecraft.world.level.block.BlockTripwire.class, "east", true), getBoolean(net.minecraft.world.level.block.BlockTripwire.class, "south", true), getBoolean(net.minecraft.world.level.block.BlockTripwire.class, "west", true), getBoolean(net.minecraft.world.level.block.BlockTripwire.class, "up", true), getBoolean(net.minecraft.world.level.block.BlockTripwire.class, "down", true) }; @Override public boolean hasFace(org.bukkit.block.BlockFace face) { - net.minecraft.server.BlockStateBoolean state = FACES[face.ordinal()]; + net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()]; if (state == null) { throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces."); } @@ -58,7 +58,7 @@ public final class CraftTripwire extends org.bukkit.craftbukkit.block.data.Craft @Override public void setFace(org.bukkit.block.BlockFace face, boolean has) { - net.minecraft.server.BlockStateBoolean state = FACES[face.ordinal()]; + net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()]; if (state == null) { throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces."); } @@ -93,7 +93,7 @@ public final class CraftTripwire extends org.bukkit.craftbukkit.block.data.Craft // org.bukkit.craftbukkit.block.data.CraftPowerable - private static final net.minecraft.server.BlockStateBoolean POWERED = getBoolean(net.minecraft.server.BlockTripwire.class, "powered"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockTripwire.class, "powered"); @Override public boolean isPowered() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTripwireHook.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTripwireHook.java index bd7b43ade..ccd34c0e3 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTripwireHook.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTripwireHook.java @@ -9,13 +9,13 @@ public final class CraftTripwireHook extends org.bukkit.craftbukkit.block.data.C super(); } - public CraftTripwireHook(net.minecraft.server.IBlockData state) { + public CraftTripwireHook(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftAttachable - private static final net.minecraft.server.BlockStateBoolean ATTACHED = getBoolean(net.minecraft.server.BlockTripwireHook.class, "attached"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean ATTACHED = getBoolean(net.minecraft.world.level.block.BlockTripwireHook.class, "attached"); @Override public boolean isAttached() { @@ -29,7 +29,7 @@ public final class CraftTripwireHook extends org.bukkit.craftbukkit.block.data.C // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockTripwireHook.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockTripwireHook.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { @@ -48,7 +48,7 @@ public final class CraftTripwireHook extends org.bukkit.craftbukkit.block.data.C // org.bukkit.craftbukkit.block.data.CraftPowerable - private static final net.minecraft.server.BlockStateBoolean POWERED = getBoolean(net.minecraft.server.BlockTripwireHook.class, "powered"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockTripwireHook.class, "powered"); @Override public boolean isPowered() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTurtleEgg.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTurtleEgg.java index 64812ad12..b916d3f55 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTurtleEgg.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTurtleEgg.java @@ -9,14 +9,14 @@ public final class CraftTurtleEgg extends org.bukkit.craftbukkit.block.data.Craf super(); } - public CraftTurtleEgg(net.minecraft.server.IBlockData state) { + public CraftTurtleEgg(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftTurtleEgg - private static final net.minecraft.server.BlockStateInteger EGGS = getInteger(net.minecraft.server.BlockTurtleEgg.class, "eggs"); - private static final net.minecraft.server.BlockStateInteger HATCH = getInteger(net.minecraft.server.BlockTurtleEgg.class, "hatch"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger EGGS = getInteger(net.minecraft.world.level.block.BlockTurtleEgg.class, "eggs"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger HATCH = getInteger(net.minecraft.world.level.block.BlockTurtleEgg.class, "hatch"); @Override public int getEggs() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTwistingVines.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTwistingVines.java index 3d63dd437..b3455ee4d 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTwistingVines.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTwistingVines.java @@ -9,13 +9,13 @@ public final class CraftTwistingVines extends org.bukkit.craftbukkit.block.data. super(); } - public CraftTwistingVines(net.minecraft.server.IBlockData state) { + public CraftTwistingVines(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftAgeable - private static final net.minecraft.server.BlockStateInteger AGE = getInteger(net.minecraft.server.BlockTwistingVines.class, "age"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger AGE = getInteger(net.minecraft.world.level.block.BlockTwistingVines.class, "age"); @Override public int getAge() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftVine.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftVine.java index 98a754289..f954ea541 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftVine.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftVine.java @@ -9,19 +9,19 @@ public final class CraftVine extends org.bukkit.craftbukkit.block.data.CraftBloc super(); } - public CraftVine(net.minecraft.server.IBlockData state) { + public CraftVine(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftMultipleFacing - private static final net.minecraft.server.BlockStateBoolean[] FACES = new net.minecraft.server.BlockStateBoolean[]{ - getBoolean(net.minecraft.server.BlockVine.class, "north", true), getBoolean(net.minecraft.server.BlockVine.class, "east", true), getBoolean(net.minecraft.server.BlockVine.class, "south", true), getBoolean(net.minecraft.server.BlockVine.class, "west", true), getBoolean(net.minecraft.server.BlockVine.class, "up", true), getBoolean(net.minecraft.server.BlockVine.class, "down", true) + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean[] FACES = new net.minecraft.world.level.block.state.properties.BlockStateBoolean[]{ + getBoolean(net.minecraft.world.level.block.BlockVine.class, "north", true), getBoolean(net.minecraft.world.level.block.BlockVine.class, "east", true), getBoolean(net.minecraft.world.level.block.BlockVine.class, "south", true), getBoolean(net.minecraft.world.level.block.BlockVine.class, "west", true), getBoolean(net.minecraft.world.level.block.BlockVine.class, "up", true), getBoolean(net.minecraft.world.level.block.BlockVine.class, "down", true) }; @Override public boolean hasFace(org.bukkit.block.BlockFace face) { - net.minecraft.server.BlockStateBoolean state = FACES[face.ordinal()]; + net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()]; if (state == null) { throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces."); } @@ -30,7 +30,7 @@ public final class CraftVine extends org.bukkit.craftbukkit.block.data.CraftBloc @Override public void setFace(org.bukkit.block.BlockFace face, boolean has) { - net.minecraft.server.BlockStateBoolean state = FACES[face.ordinal()]; + net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()]; if (state == null) { throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces."); } diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWallSign.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWallSign.java index ffa7e3c4b..e8f92efad 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWallSign.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWallSign.java @@ -9,13 +9,13 @@ public final class CraftWallSign extends org.bukkit.craftbukkit.block.data.Craft super(); } - public CraftWallSign(net.minecraft.server.IBlockData state) { + public CraftWallSign(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockWallSign.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockWallSign.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { @@ -34,7 +34,7 @@ public final class CraftWallSign extends org.bukkit.craftbukkit.block.data.Craft // org.bukkit.craftbukkit.block.data.CraftWaterlogged - private static final net.minecraft.server.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.server.BlockWallSign.class, "waterlogged"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockWallSign.class, "waterlogged"); @Override public boolean isWaterlogged() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWeepingVines.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWeepingVines.java index c217b27e5..f54f798cd 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWeepingVines.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWeepingVines.java @@ -9,13 +9,13 @@ public final class CraftWeepingVines extends org.bukkit.craftbukkit.block.data.C super(); } - public CraftWeepingVines(net.minecraft.server.IBlockData state) { + public CraftWeepingVines(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftAgeable - private static final net.minecraft.server.BlockStateInteger AGE = getInteger(net.minecraft.server.BlockWeepingVines.class, "age"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger AGE = getInteger(net.minecraft.world.level.block.BlockWeepingVines.class, "age"); @Override public int getAge() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWitherSkull.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWitherSkull.java index 0aec1dbed..b44192bf9 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWitherSkull.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWitherSkull.java @@ -9,13 +9,13 @@ public final class CraftWitherSkull extends org.bukkit.craftbukkit.block.data.Cr super(); } - public CraftWitherSkull(net.minecraft.server.IBlockData state) { + public CraftWitherSkull(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftRotatable - private static final net.minecraft.server.BlockStateInteger ROTATION = getInteger(net.minecraft.server.BlockWitherSkull.class, "rotation"); + private static final net.minecraft.world.level.block.state.properties.BlockStateInteger ROTATION = getInteger(net.minecraft.world.level.block.BlockWitherSkull.class, "rotation"); @Override public org.bukkit.block.BlockFace getRotation() { diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWitherSkullWall.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWitherSkullWall.java index fa9597da2..206012086 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWitherSkullWall.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWitherSkullWall.java @@ -9,13 +9,13 @@ public final class CraftWitherSkullWall extends org.bukkit.craftbukkit.block.dat super(); } - public CraftWitherSkullWall(net.minecraft.server.IBlockData state) { + public CraftWitherSkullWall(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockWitherSkullWall.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockWitherSkullWall.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { 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 5fef574fc..15c8eb8ca 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWoodButton.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWoodButton.java @@ -9,13 +9,13 @@ public final class CraftWoodButton extends org.bukkit.craftbukkit.block.data.Cra super(); } - public CraftWoodButton(net.minecraft.server.IBlockData state) { + public CraftWoodButton(net.minecraft.world.level.block.state.IBlockData state) { super(state); } // org.bukkit.craftbukkit.block.data.type.CraftSwitch - private static final net.minecraft.server.BlockStateEnum FACE = getEnum(net.minecraft.server.BlockWoodButton.class, "face"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACE = getEnum(net.minecraft.world.level.block.BlockWoodButton.class, "face"); @Override public org.bukkit.block.data.type.Switch.Face getFace() { @@ -29,7 +29,7 @@ public final class CraftWoodButton extends org.bukkit.craftbukkit.block.data.Cra // org.bukkit.craftbukkit.block.data.CraftDirectional - private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockWoodButton.class, "facing"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum FACING = getEnum(net.minecraft.world.level.block.BlockWoodButton.class, "facing"); @Override public org.bukkit.block.BlockFace getFacing() { @@ -48,7 +48,7 @@ public final class CraftWoodButton extends org.bukkit.craftbukkit.block.data.Cra // org.bukkit.craftbukkit.block.data.CraftFaceAttachable - private static final net.minecraft.server.BlockStateEnum ATTACH_FACE = getEnum(net.minecraft.server.BlockWoodButton.class, "face"); + private static final net.minecraft.world.level.block.state.properties.BlockStateEnum ATTACH_FACE = getEnum(net.minecraft.world.level.block.BlockWoodButton.class, "face"); @Override public org.bukkit.block.data.FaceAttachable.AttachedFace getAttachedFace() { @@ -62,7 +62,7 @@ public final class CraftWoodButton extends org.bukkit.craftbukkit.block.data.Cra // org.bukkit.craftbukkit.block.data.CraftPowerable - private static final net.minecraft.server.BlockStateBoolean POWERED = getBoolean(net.minecraft.server.BlockWoodButton.class, "powered"); + private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockWoodButton.class, "powered"); @Override public boolean isPowered() { diff --git a/src/main/java/org/bukkit/craftbukkit/boss/CraftBossBar.java b/src/main/java/org/bukkit/craftbukkit/boss/CraftBossBar.java index 7771cd6d0..14bd54755 100644 --- a/src/main/java/org/bukkit/craftbukkit/boss/CraftBossBar.java +++ b/src/main/java/org/bukkit/craftbukkit/boss/CraftBossBar.java @@ -7,10 +7,10 @@ import java.util.List; import java.util.Map; import java.util.function.Consumer; import java.util.function.Supplier; -import net.minecraft.server.BossBattle; -import net.minecraft.server.BossBattleServer; -import net.minecraft.server.EntityPlayer; -import net.minecraft.server.PacketPlayOutBoss; +import net.minecraft.network.protocol.game.PacketPlayOutBoss; +import net.minecraft.server.level.BossBattleServer; +import net.minecraft.server.level.EntityPlayer; +import net.minecraft.world.BossBattle; import org.bukkit.boss.BarColor; import org.bukkit.boss.BarFlag; import org.bukkit.boss.BarStyle; diff --git a/src/main/java/org/bukkit/craftbukkit/boss/CraftDragonBattle.java b/src/main/java/org/bukkit/craftbukkit/boss/CraftDragonBattle.java index 4c98a811f..d2c583516 100644 --- a/src/main/java/org/bukkit/craftbukkit/boss/CraftDragonBattle.java +++ b/src/main/java/org/bukkit/craftbukkit/boss/CraftDragonBattle.java @@ -1,9 +1,9 @@ package org.bukkit.craftbukkit.boss; import com.google.common.base.Preconditions; -import net.minecraft.server.EnderDragonBattle; -import net.minecraft.server.Entity; -import net.minecraft.server.EnumDragonRespawn; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.level.dimension.end.EnderDragonBattle; +import net.minecraft.world.level.dimension.end.EnumDragonRespawn; import org.bukkit.Location; import org.bukkit.boss.BossBar; import org.bukkit.boss.DragonBattle; diff --git a/src/main/java/org/bukkit/craftbukkit/boss/CraftKeyedBossbar.java b/src/main/java/org/bukkit/craftbukkit/boss/CraftKeyedBossbar.java index e6ad94022..555633b6c 100644 --- a/src/main/java/org/bukkit/craftbukkit/boss/CraftKeyedBossbar.java +++ b/src/main/java/org/bukkit/craftbukkit/boss/CraftKeyedBossbar.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.boss; -import net.minecraft.server.BossBattleCustom; +import net.minecraft.server.bossevents.BossBattleCustom; import org.bukkit.NamespacedKey; import org.bukkit.boss.KeyedBossBar; import org.bukkit.craftbukkit.util.CraftNamespacedKey; diff --git a/src/main/java/org/bukkit/craftbukkit/command/BukkitCommandWrapper.java b/src/main/java/org/bukkit/craftbukkit/command/BukkitCommandWrapper.java index 5f33c9e52..23d922a8b 100644 --- a/src/main/java/org/bukkit/craftbukkit/command/BukkitCommandWrapper.java +++ b/src/main/java/org/bukkit/craftbukkit/command/BukkitCommandWrapper.java @@ -13,7 +13,7 @@ import com.mojang.brigadier.tree.LiteralCommandNode; import java.util.List; import java.util.concurrent.CompletableFuture; import java.util.function.Predicate; -import net.minecraft.server.CommandListenerWrapper; +import net.minecraft.commands.CommandListenerWrapper; import org.bukkit.command.Command; import org.bukkit.craftbukkit.CraftServer; diff --git a/src/main/java/org/bukkit/craftbukkit/command/CraftBlockCommandSender.java b/src/main/java/org/bukkit/craftbukkit/command/CraftBlockCommandSender.java index 17aa86625..599fe901f 100644 --- a/src/main/java/org/bukkit/craftbukkit/command/CraftBlockCommandSender.java +++ b/src/main/java/org/bukkit/craftbukkit/command/CraftBlockCommandSender.java @@ -1,9 +1,9 @@ package org.bukkit.craftbukkit.command; -import net.minecraft.server.CommandListenerWrapper; -import net.minecraft.server.IChatBaseComponent; -import net.minecraft.server.SystemUtils; -import net.minecraft.server.TileEntity; +import net.minecraft.SystemUtils; +import net.minecraft.commands.CommandListenerWrapper; +import net.minecraft.network.chat.IChatBaseComponent; +import net.minecraft.world.level.block.entity.TileEntity; import org.bukkit.block.Block; import org.bukkit.command.BlockCommandSender; import org.bukkit.craftbukkit.block.CraftBlock; diff --git a/src/main/java/org/bukkit/craftbukkit/command/CraftRemoteConsoleCommandSender.java b/src/main/java/org/bukkit/craftbukkit/command/CraftRemoteConsoleCommandSender.java index 655bdbc37..24662d58c 100644 --- a/src/main/java/org/bukkit/craftbukkit/command/CraftRemoteConsoleCommandSender.java +++ b/src/main/java/org/bukkit/craftbukkit/command/CraftRemoteConsoleCommandSender.java @@ -1,8 +1,8 @@ package org.bukkit.craftbukkit.command; -import net.minecraft.server.ChatComponentText; -import net.minecraft.server.RemoteControlCommandListener; -import net.minecraft.server.SystemUtils; +import net.minecraft.SystemUtils; +import net.minecraft.network.chat.ChatComponentText; +import net.minecraft.server.rcon.RemoteControlCommandListener; import org.bukkit.command.RemoteConsoleCommandSender; public class CraftRemoteConsoleCommandSender extends ServerCommandSender implements RemoteConsoleCommandSender { diff --git a/src/main/java/org/bukkit/craftbukkit/command/ProxiedNativeCommandSender.java b/src/main/java/org/bukkit/craftbukkit/command/ProxiedNativeCommandSender.java index 49f2416e0..1beca7819 100644 --- a/src/main/java/org/bukkit/craftbukkit/command/ProxiedNativeCommandSender.java +++ b/src/main/java/org/bukkit/craftbukkit/command/ProxiedNativeCommandSender.java @@ -2,7 +2,7 @@ package org.bukkit.craftbukkit.command; import java.util.Set; import java.util.UUID; -import net.minecraft.server.CommandListenerWrapper; +import net.minecraft.commands.CommandListenerWrapper; import org.bukkit.Server; import org.bukkit.command.CommandSender; import org.bukkit.command.ProxiedCommandSender; diff --git a/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java b/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java index f34461460..5702f18cd 100644 --- a/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java +++ b/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java @@ -6,11 +6,11 @@ import com.mojang.brigadier.tree.CommandNode; import java.util.ArrayList; import java.util.Collections; import java.util.List; -import net.minecraft.server.CommandDispatcher; -import net.minecraft.server.CommandListenerWrapper; -import net.minecraft.server.DedicatedServer; -import net.minecraft.server.EntityMinecartCommandBlock; +import net.minecraft.commands.CommandDispatcher; +import net.minecraft.commands.CommandListenerWrapper; import net.minecraft.server.MinecraftServer; +import net.minecraft.server.dedicated.DedicatedServer; +import net.minecraft.world.entity.vehicle.EntityMinecartCommandBlock; import org.apache.commons.lang.Validate; import org.bukkit.Location; import org.bukkit.command.BlockCommandSender; diff --git a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java index 34ceee4a8..8f694de2f 100644 --- a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java +++ b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java @@ -1,8 +1,8 @@ package org.bukkit.craftbukkit.enchantments; -import net.minecraft.server.EnchantmentBinding; -import net.minecraft.server.EnchantmentVanishing; -import net.minecraft.server.IRegistry; +import net.minecraft.core.IRegistry; +import net.minecraft.world.item.enchantment.EnchantmentBinding; +import net.minecraft.world.item.enchantment.EnchantmentVanishing; import org.bukkit.craftbukkit.inventory.CraftItemStack; import org.bukkit.craftbukkit.util.CraftNamespacedKey; import org.bukkit.enchantments.Enchantment; @@ -11,9 +11,9 @@ import org.bukkit.enchantments.EnchantmentWrapper; import org.bukkit.inventory.ItemStack; public class CraftEnchantment extends Enchantment { - private final net.minecraft.server.Enchantment target; + private final net.minecraft.world.item.enchantment.Enchantment target; - public CraftEnchantment(net.minecraft.server.Enchantment target) { + public CraftEnchantment(net.minecraft.world.item.enchantment.Enchantment target) { super(CraftNamespacedKey.fromMinecraft(IRegistry.ENCHANTMENT.getKey(target))); this.target = target; } @@ -164,7 +164,7 @@ public class CraftEnchantment extends Enchantment { } } - public static net.minecraft.server.Enchantment getRaw(Enchantment enchantment) { + public static net.minecraft.world.item.enchantment.Enchantment getRaw(Enchantment enchantment) { if (enchantment instanceof EnchantmentWrapper) { enchantment = ((EnchantmentWrapper) enchantment).getEnchantment(); } @@ -188,7 +188,7 @@ public class CraftEnchantment extends Enchantment { return !target.isCompatible(ench.target); } - public net.minecraft.server.Enchantment getHandle() { + public net.minecraft.world.item.enchantment.Enchantment getHandle() { return target; } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/AbstractProjectile.java b/src/main/java/org/bukkit/craftbukkit/entity/AbstractProjectile.java index 47b3fe555..b3c04f87e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/AbstractProjectile.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/AbstractProjectile.java @@ -7,7 +7,7 @@ public abstract class AbstractProjectile extends CraftEntity implements Projecti private boolean doesBounce; - public AbstractProjectile(CraftServer server, net.minecraft.server.Entity entity) { + public AbstractProjectile(CraftServer server, net.minecraft.world.entity.Entity entity) { super(server, entity); doesBounce = false; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java index 339656c62..00b97d9ee 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java @@ -1,8 +1,8 @@ package org.bukkit.craftbukkit.entity; import java.util.UUID; -import net.minecraft.server.EntityHorseAbstract; -import net.minecraft.server.GenericAttributes; +import net.minecraft.world.entity.ai.attributes.GenericAttributes; +import net.minecraft.world.entity.animal.horse.EntityHorseAbstract; import org.apache.commons.lang.Validate; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.inventory.CraftInventoryAbstractHorse; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractVillager.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractVillager.java index 18520fec0..01285d555 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractVillager.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractVillager.java @@ -1,8 +1,8 @@ package org.bukkit.craftbukkit.entity; import java.util.List; -import net.minecraft.server.EntityVillager; -import net.minecraft.server.EntityVillagerAbstract; +import net.minecraft.world.entity.npc.EntityVillager; +import net.minecraft.world.entity.npc.EntityVillagerAbstract; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.inventory.CraftInventory; import org.bukkit.craftbukkit.inventory.CraftMerchant; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAgeable.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAgeable.java index f9ac60e24..d51996f85 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAgeable.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAgeable.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityAgeable; +import net.minecraft.world.entity.EntityAgeable; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Ageable; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAmbient.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAmbient.java index a482c2aab..235c9b81f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAmbient.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAmbient.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityAmbient; +import net.minecraft.world.entity.ambient.EntityAmbient; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Ambient; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAnimals.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAnimals.java index 599db583b..6dc57b708 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAnimals.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAnimals.java @@ -2,7 +2,7 @@ package org.bukkit.craftbukkit.entity; import com.google.common.base.Preconditions; import java.util.UUID; -import net.minecraft.server.EntityAnimal; +import net.minecraft.world.entity.animal.EntityAnimal; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Animals; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAreaEffectCloud.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAreaEffectCloud.java index ab6cbf560..73c4b549d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAreaEffectCloud.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAreaEffectCloud.java @@ -2,10 +2,10 @@ package org.bukkit.craftbukkit.entity; import com.google.common.collect.ImmutableList; import java.util.List; -import net.minecraft.server.EntityAreaEffectCloud; -import net.minecraft.server.EntityLiving; -import net.minecraft.server.MobEffect; -import net.minecraft.server.MobEffectList; +import net.minecraft.world.effect.MobEffect; +import net.minecraft.world.effect.MobEffectList; +import net.minecraft.world.entity.EntityAreaEffectCloud; +import net.minecraft.world.entity.EntityLiving; import org.apache.commons.lang.Validate; import org.bukkit.Color; import org.bukkit.Particle; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java index 8f3850096..86c8662b3 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java @@ -1,7 +1,7 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityArmorStand; -import net.minecraft.server.Vector3f; +import net.minecraft.core.Vector3f; +import net.minecraft.world.entity.decoration.EntityArmorStand; import org.bukkit.craftbukkit.CraftEquipmentSlot; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.ArmorStand; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java index ddaa10704..ea33a36df 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java @@ -1,8 +1,8 @@ package org.bukkit.craftbukkit.entity; import com.google.common.base.Preconditions; -import net.minecraft.server.BlockPosition; -import net.minecraft.server.EntityArrow; +import net.minecraft.core.BlockPosition; +import net.minecraft.world.entity.projectile.EntityArrow; import org.apache.commons.lang.Validate; import org.bukkit.block.Block; import org.bukkit.craftbukkit.CraftServer; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftBat.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftBat.java index e7061d9d7..822fd12b9 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftBat.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftBat.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityBat; +import net.minecraft.world.entity.ambient.EntityBat; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Bat; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftBee.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftBee.java index 937209b82..e7904216c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftBee.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftBee.java @@ -1,8 +1,8 @@ package org.bukkit.craftbukkit.entity; import com.google.common.base.Preconditions; -import net.minecraft.server.BlockPosition; -import net.minecraft.server.EntityBee; +import net.minecraft.core.BlockPosition; +import net.minecraft.world.entity.animal.EntityBee; import org.bukkit.Location; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Bee; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftBlaze.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftBlaze.java index 089419ede..c5800e245 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftBlaze.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftBlaze.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityBlaze; +import net.minecraft.world.entity.monster.EntityBlaze; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Blaze; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftBoat.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftBoat.java index 271950903..c7a459c0c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftBoat.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftBoat.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityBoat; +import net.minecraft.world.entity.vehicle.EntityBoat; import org.bukkit.TreeSpecies; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Boat; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftCat.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftCat.java index c63a23ff4..38a09900a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftCat.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftCat.java @@ -1,8 +1,8 @@ package org.bukkit.craftbukkit.entity; import com.google.common.base.Preconditions; -import net.minecraft.server.EntityCat; -import net.minecraft.server.EnumColor; +import net.minecraft.world.entity.animal.EntityCat; +import net.minecraft.world.item.EnumColor; import org.bukkit.DyeColor; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Cat; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftCaveSpider.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftCaveSpider.java index fceb2b2fb..f4e11cbbc 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftCaveSpider.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftCaveSpider.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityCaveSpider; +import net.minecraft.world.entity.monster.EntityCaveSpider; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.CaveSpider; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftChestedHorse.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftChestedHorse.java index 39620e06e..552dfbb88 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftChestedHorse.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftChestedHorse.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityHorseChestedAbstract; +import net.minecraft.world.entity.animal.horse.EntityHorseChestedAbstract; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.ChestedHorse; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftChicken.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftChicken.java index 47fcf1b1a..45976e453 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftChicken.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftChicken.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityChicken; +import net.minecraft.world.entity.animal.EntityChicken; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Chicken; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftCod.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftCod.java index 9cda680c0..c9705064c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftCod.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftCod.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityCod; +import net.minecraft.world.entity.animal.EntityCod; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Cod; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftComplexLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftComplexLivingEntity.java index cc115cc36..3550eb81b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftComplexLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftComplexLivingEntity.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityLiving; +import net.minecraft.world.entity.EntityLiving; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.ComplexLivingEntity; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftComplexPart.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftComplexPart.java index c1829a0d0..eb7155609 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftComplexPart.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftComplexPart.java @@ -1,7 +1,7 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityComplexPart; -import net.minecraft.server.EntityEnderDragon; +import net.minecraft.world.entity.boss.EntityComplexPart; +import net.minecraft.world.entity.boss.enderdragon.EntityEnderDragon; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.ComplexEntityPart; import org.bukkit.entity.ComplexLivingEntity; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftCow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftCow.java index 31bfa02e8..fcfef870b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftCow.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftCow.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityCow; +import net.minecraft.world.entity.animal.EntityCow; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Cow; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftCreature.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftCreature.java index 73db6101b..b9f2e5e8a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftCreature.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftCreature.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityCreature; +import net.minecraft.world.entity.EntityCreature; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Creature; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java index 896405148..013e0b1bc 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java @@ -1,7 +1,7 @@ package org.bukkit.craftbukkit.entity; import com.google.common.base.Preconditions; -import net.minecraft.server.EntityCreeper; +import net.minecraft.world.entity.monster.EntityCreeper; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Creeper; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftDolphin.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftDolphin.java index 0399e6f51..63ec66e30 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftDolphin.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftDolphin.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityDolphin; +import net.minecraft.world.entity.animal.EntityDolphin; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Dolphin; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftDonkey.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftDonkey.java index b4d74414a..35bfc0955 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftDonkey.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftDonkey.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityHorseDonkey; +import net.minecraft.world.entity.animal.horse.EntityHorseDonkey; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Donkey; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftDragonFireball.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftDragonFireball.java index 4a48b16d5..322b7434a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftDragonFireball.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftDragonFireball.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityDragonFireball; +import net.minecraft.world.entity.projectile.EntityDragonFireball; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.DragonFireball; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftDrowned.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftDrowned.java index 6e41dfd92..3bb39dae1 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftDrowned.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftDrowned.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityDrowned; +import net.minecraft.world.entity.monster.EntityDrowned; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Drowned; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEgg.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEgg.java index f9db95515..865e260fc 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEgg.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEgg.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityEgg; +import net.minecraft.world.entity.projectile.EntityEgg; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Egg; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftElderGuardian.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftElderGuardian.java index 34df49bbd..c0f1dc519 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftElderGuardian.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftElderGuardian.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityGuardianElder; +import net.minecraft.world.entity.monster.EntityGuardianElder; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.ElderGuardian; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderCrystal.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderCrystal.java index 46d8e36ac..66a461ddd 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderCrystal.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderCrystal.java @@ -1,7 +1,7 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.BlockPosition; -import net.minecraft.server.EntityEnderCrystal; +import net.minecraft.core.BlockPosition; +import net.minecraft.world.entity.boss.enderdragon.EntityEnderCrystal; import org.bukkit.Location; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EnderCrystal; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java index 66e4e8b5c..df5530806 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java @@ -3,9 +3,9 @@ package org.bukkit.craftbukkit.entity; import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSet.Builder; import java.util.Set; -import net.minecraft.server.DragonControllerPhase; -import net.minecraft.server.EntityComplexPart; -import net.minecraft.server.EntityEnderDragon; +import net.minecraft.world.entity.boss.EntityComplexPart; +import net.minecraft.world.entity.boss.enderdragon.EntityEnderDragon; +import net.minecraft.world.entity.boss.enderdragon.phases.DragonControllerPhase; import org.bukkit.boss.BossBar; import org.bukkit.boss.DragonBattle; import org.bukkit.craftbukkit.CraftServer; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragonPart.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragonPart.java index e6d050099..01d7c3683 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragonPart.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragonPart.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityComplexPart; +import net.minecraft.world.entity.boss.EntityComplexPart; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EnderDragon; import org.bukkit.entity.EnderDragonPart; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderPearl.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderPearl.java index 7fdefcc92..6e4e5da55 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderPearl.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderPearl.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityEnderPearl; +import net.minecraft.world.entity.projectile.EntityEnderPearl; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EnderPearl; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderSignal.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderSignal.java index 346764b2b..d8beee82c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderSignal.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderSignal.java @@ -1,9 +1,9 @@ package org.bukkit.craftbukkit.entity; import com.google.common.base.Preconditions; -import net.minecraft.server.BlockPosition; -import net.minecraft.server.EntityEnderSignal; -import net.minecraft.server.Items; +import net.minecraft.core.BlockPosition; +import net.minecraft.world.entity.projectile.EntityEnderSignal; +import net.minecraft.world.item.Items; import org.bukkit.Location; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.inventory.CraftItemStack; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java index 970efabd3..8894d6197 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java @@ -1,7 +1,7 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityEnderman; -import net.minecraft.server.IBlockData; +import net.minecraft.world.entity.monster.EntityEnderman; +import net.minecraft.world.level.block.state.IBlockData; import org.bukkit.Material; import org.bukkit.block.data.BlockData; import org.bukkit.craftbukkit.CraftServer; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEndermite.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEndermite.java index 31c5d97ee..30b16c057 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEndermite.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEndermite.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityEndermite; +import net.minecraft.world.entity.monster.EntityEndermite; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Endermite; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java index 346a6d22d..7c217fcfc 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -6,144 +6,144 @@ import com.google.common.collect.Lists; import java.util.List; import java.util.Set; import java.util.UUID; -import net.minecraft.server.AxisAlignedBB; -import net.minecraft.server.BlockPosition; -import net.minecraft.server.DamageSource; -import net.minecraft.server.Entity; -import net.minecraft.server.EntityAmbient; -import net.minecraft.server.EntityAnimal; -import net.minecraft.server.EntityAreaEffectCloud; -import net.minecraft.server.EntityArmorStand; -import net.minecraft.server.EntityArrow; -import net.minecraft.server.EntityBat; -import net.minecraft.server.EntityBee; -import net.minecraft.server.EntityBlaze; -import net.minecraft.server.EntityBoat; -import net.minecraft.server.EntityCat; -import net.minecraft.server.EntityCaveSpider; -import net.minecraft.server.EntityChicken; -import net.minecraft.server.EntityCod; -import net.minecraft.server.EntityComplexPart; -import net.minecraft.server.EntityCow; -import net.minecraft.server.EntityCreature; -import net.minecraft.server.EntityCreeper; -import net.minecraft.server.EntityDolphin; -import net.minecraft.server.EntityDragonFireball; -import net.minecraft.server.EntityDrowned; -import net.minecraft.server.EntityEgg; -import net.minecraft.server.EntityEnderCrystal; -import net.minecraft.server.EntityEnderDragon; -import net.minecraft.server.EntityEnderPearl; -import net.minecraft.server.EntityEnderSignal; -import net.minecraft.server.EntityEnderman; -import net.minecraft.server.EntityEndermite; -import net.minecraft.server.EntityEvoker; -import net.minecraft.server.EntityEvokerFangs; -import net.minecraft.server.EntityExperienceOrb; -import net.minecraft.server.EntityFallingBlock; -import net.minecraft.server.EntityFireball; -import net.minecraft.server.EntityFireworks; -import net.minecraft.server.EntityFish; -import net.minecraft.server.EntityFishingHook; -import net.minecraft.server.EntityFlying; -import net.minecraft.server.EntityFox; -import net.minecraft.server.EntityGhast; -import net.minecraft.server.EntityGiantZombie; -import net.minecraft.server.EntityGolem; -import net.minecraft.server.EntityGuardian; -import net.minecraft.server.EntityGuardianElder; -import net.minecraft.server.EntityHanging; -import net.minecraft.server.EntityHoglin; -import net.minecraft.server.EntityHorse; -import net.minecraft.server.EntityHorseAbstract; -import net.minecraft.server.EntityHorseChestedAbstract; -import net.minecraft.server.EntityHorseDonkey; -import net.minecraft.server.EntityHorseMule; -import net.minecraft.server.EntityHorseSkeleton; -import net.minecraft.server.EntityHorseZombie; -import net.minecraft.server.EntityHuman; -import net.minecraft.server.EntityIllagerAbstract; -import net.minecraft.server.EntityIllagerIllusioner; -import net.minecraft.server.EntityIllagerWizard; -import net.minecraft.server.EntityIronGolem; -import net.minecraft.server.EntityItem; -import net.minecraft.server.EntityItemFrame; -import net.minecraft.server.EntityLargeFireball; -import net.minecraft.server.EntityLeash; -import net.minecraft.server.EntityLightning; -import net.minecraft.server.EntityLiving; -import net.minecraft.server.EntityLlama; -import net.minecraft.server.EntityLlamaSpit; -import net.minecraft.server.EntityLlamaTrader; -import net.minecraft.server.EntityMagmaCube; -import net.minecraft.server.EntityMinecartAbstract; -import net.minecraft.server.EntityMinecartChest; -import net.minecraft.server.EntityMinecartCommandBlock; -import net.minecraft.server.EntityMinecartFurnace; -import net.minecraft.server.EntityMinecartHopper; -import net.minecraft.server.EntityMinecartMobSpawner; -import net.minecraft.server.EntityMinecartRideable; -import net.minecraft.server.EntityMinecartTNT; -import net.minecraft.server.EntityMonster; -import net.minecraft.server.EntityMushroomCow; -import net.minecraft.server.EntityOcelot; -import net.minecraft.server.EntityPainting; -import net.minecraft.server.EntityPanda; -import net.minecraft.server.EntityParrot; -import net.minecraft.server.EntityPhantom; -import net.minecraft.server.EntityPig; -import net.minecraft.server.EntityPigZombie; -import net.minecraft.server.EntityPiglin; -import net.minecraft.server.EntityPiglinAbstract; -import net.minecraft.server.EntityPiglinBrute; -import net.minecraft.server.EntityPillager; -import net.minecraft.server.EntityPlayer; -import net.minecraft.server.EntityPolarBear; -import net.minecraft.server.EntityPotion; -import net.minecraft.server.EntityProjectile; -import net.minecraft.server.EntityPufferFish; -import net.minecraft.server.EntityRabbit; -import net.minecraft.server.EntityRavager; -import net.minecraft.server.EntitySalmon; -import net.minecraft.server.EntitySheep; -import net.minecraft.server.EntityShulker; -import net.minecraft.server.EntityShulkerBullet; -import net.minecraft.server.EntitySilverfish; -import net.minecraft.server.EntitySkeletonAbstract; -import net.minecraft.server.EntitySkeletonStray; -import net.minecraft.server.EntitySkeletonWither; -import net.minecraft.server.EntitySlime; -import net.minecraft.server.EntitySmallFireball; -import net.minecraft.server.EntitySnowball; -import net.minecraft.server.EntitySnowman; -import net.minecraft.server.EntitySpectralArrow; -import net.minecraft.server.EntitySpider; -import net.minecraft.server.EntitySquid; -import net.minecraft.server.EntityStrider; -import net.minecraft.server.EntityTNTPrimed; -import net.minecraft.server.EntityTameableAnimal; -import net.minecraft.server.EntityThrownExpBottle; -import net.minecraft.server.EntityThrownTrident; -import net.minecraft.server.EntityTippedArrow; -import net.minecraft.server.EntityTropicalFish; -import net.minecraft.server.EntityTurtle; -import net.minecraft.server.EntityVex; -import net.minecraft.server.EntityVillager; -import net.minecraft.server.EntityVillagerAbstract; -import net.minecraft.server.EntityVillagerTrader; -import net.minecraft.server.EntityVindicator; -import net.minecraft.server.EntityWaterAnimal; -import net.minecraft.server.EntityWitch; -import net.minecraft.server.EntityWither; -import net.minecraft.server.EntityWitherSkull; -import net.minecraft.server.EntityWolf; -import net.minecraft.server.EntityZoglin; -import net.minecraft.server.EntityZombie; -import net.minecraft.server.EntityZombieHusk; -import net.minecraft.server.EntityZombieVillager; -import net.minecraft.server.IChatBaseComponent; -import net.minecraft.server.NBTBase; -import net.minecraft.server.NBTTagCompound; +import net.minecraft.core.BlockPosition; +import net.minecraft.nbt.NBTBase; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.chat.IChatBaseComponent; +import net.minecraft.server.level.EntityPlayer; +import net.minecraft.world.damagesource.DamageSource; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.EntityAreaEffectCloud; +import net.minecraft.world.entity.EntityCreature; +import net.minecraft.world.entity.EntityExperienceOrb; +import net.minecraft.world.entity.EntityFlying; +import net.minecraft.world.entity.EntityLightning; +import net.minecraft.world.entity.EntityLiving; +import net.minecraft.world.entity.EntityTameableAnimal; +import net.minecraft.world.entity.ambient.EntityAmbient; +import net.minecraft.world.entity.ambient.EntityBat; +import net.minecraft.world.entity.animal.EntityAnimal; +import net.minecraft.world.entity.animal.EntityBee; +import net.minecraft.world.entity.animal.EntityCat; +import net.minecraft.world.entity.animal.EntityChicken; +import net.minecraft.world.entity.animal.EntityCod; +import net.minecraft.world.entity.animal.EntityCow; +import net.minecraft.world.entity.animal.EntityDolphin; +import net.minecraft.world.entity.animal.EntityFish; +import net.minecraft.world.entity.animal.EntityFox; +import net.minecraft.world.entity.animal.EntityGolem; +import net.minecraft.world.entity.animal.EntityIronGolem; +import net.minecraft.world.entity.animal.EntityMushroomCow; +import net.minecraft.world.entity.animal.EntityOcelot; +import net.minecraft.world.entity.animal.EntityPanda; +import net.minecraft.world.entity.animal.EntityParrot; +import net.minecraft.world.entity.animal.EntityPig; +import net.minecraft.world.entity.animal.EntityPolarBear; +import net.minecraft.world.entity.animal.EntityPufferFish; +import net.minecraft.world.entity.animal.EntityRabbit; +import net.minecraft.world.entity.animal.EntitySalmon; +import net.minecraft.world.entity.animal.EntitySheep; +import net.minecraft.world.entity.animal.EntitySnowman; +import net.minecraft.world.entity.animal.EntitySquid; +import net.minecraft.world.entity.animal.EntityTropicalFish; +import net.minecraft.world.entity.animal.EntityTurtle; +import net.minecraft.world.entity.animal.EntityWaterAnimal; +import net.minecraft.world.entity.animal.EntityWolf; +import net.minecraft.world.entity.animal.horse.EntityHorse; +import net.minecraft.world.entity.animal.horse.EntityHorseAbstract; +import net.minecraft.world.entity.animal.horse.EntityHorseChestedAbstract; +import net.minecraft.world.entity.animal.horse.EntityHorseDonkey; +import net.minecraft.world.entity.animal.horse.EntityHorseMule; +import net.minecraft.world.entity.animal.horse.EntityHorseSkeleton; +import net.minecraft.world.entity.animal.horse.EntityHorseZombie; +import net.minecraft.world.entity.animal.horse.EntityLlama; +import net.minecraft.world.entity.animal.horse.EntityLlamaTrader; +import net.minecraft.world.entity.boss.EntityComplexPart; +import net.minecraft.world.entity.boss.enderdragon.EntityEnderCrystal; +import net.minecraft.world.entity.boss.enderdragon.EntityEnderDragon; +import net.minecraft.world.entity.boss.wither.EntityWither; +import net.minecraft.world.entity.decoration.EntityArmorStand; +import net.minecraft.world.entity.decoration.EntityHanging; +import net.minecraft.world.entity.decoration.EntityItemFrame; +import net.minecraft.world.entity.decoration.EntityLeash; +import net.minecraft.world.entity.decoration.EntityPainting; +import net.minecraft.world.entity.item.EntityFallingBlock; +import net.minecraft.world.entity.item.EntityItem; +import net.minecraft.world.entity.item.EntityTNTPrimed; +import net.minecraft.world.entity.monster.EntityBlaze; +import net.minecraft.world.entity.monster.EntityCaveSpider; +import net.minecraft.world.entity.monster.EntityCreeper; +import net.minecraft.world.entity.monster.EntityDrowned; +import net.minecraft.world.entity.monster.EntityEnderman; +import net.minecraft.world.entity.monster.EntityEndermite; +import net.minecraft.world.entity.monster.EntityEvoker; +import net.minecraft.world.entity.monster.EntityGhast; +import net.minecraft.world.entity.monster.EntityGiantZombie; +import net.minecraft.world.entity.monster.EntityGuardian; +import net.minecraft.world.entity.monster.EntityGuardianElder; +import net.minecraft.world.entity.monster.EntityIllagerAbstract; +import net.minecraft.world.entity.monster.EntityIllagerIllusioner; +import net.minecraft.world.entity.monster.EntityIllagerWizard; +import net.minecraft.world.entity.monster.EntityMagmaCube; +import net.minecraft.world.entity.monster.EntityMonster; +import net.minecraft.world.entity.monster.EntityPhantom; +import net.minecraft.world.entity.monster.EntityPigZombie; +import net.minecraft.world.entity.monster.EntityPillager; +import net.minecraft.world.entity.monster.EntityRavager; +import net.minecraft.world.entity.monster.EntityShulker; +import net.minecraft.world.entity.monster.EntitySilverfish; +import net.minecraft.world.entity.monster.EntitySkeletonAbstract; +import net.minecraft.world.entity.monster.EntitySkeletonStray; +import net.minecraft.world.entity.monster.EntitySkeletonWither; +import net.minecraft.world.entity.monster.EntitySlime; +import net.minecraft.world.entity.monster.EntitySpider; +import net.minecraft.world.entity.monster.EntityStrider; +import net.minecraft.world.entity.monster.EntityVex; +import net.minecraft.world.entity.monster.EntityVindicator; +import net.minecraft.world.entity.monster.EntityWitch; +import net.minecraft.world.entity.monster.EntityZoglin; +import net.minecraft.world.entity.monster.EntityZombie; +import net.minecraft.world.entity.monster.EntityZombieHusk; +import net.minecraft.world.entity.monster.EntityZombieVillager; +import net.minecraft.world.entity.monster.hoglin.EntityHoglin; +import net.minecraft.world.entity.monster.piglin.EntityPiglin; +import net.minecraft.world.entity.monster.piglin.EntityPiglinAbstract; +import net.minecraft.world.entity.monster.piglin.EntityPiglinBrute; +import net.minecraft.world.entity.npc.EntityVillager; +import net.minecraft.world.entity.npc.EntityVillagerAbstract; +import net.minecraft.world.entity.npc.EntityVillagerTrader; +import net.minecraft.world.entity.player.EntityHuman; +import net.minecraft.world.entity.projectile.EntityArrow; +import net.minecraft.world.entity.projectile.EntityDragonFireball; +import net.minecraft.world.entity.projectile.EntityEgg; +import net.minecraft.world.entity.projectile.EntityEnderPearl; +import net.minecraft.world.entity.projectile.EntityEnderSignal; +import net.minecraft.world.entity.projectile.EntityEvokerFangs; +import net.minecraft.world.entity.projectile.EntityFireball; +import net.minecraft.world.entity.projectile.EntityFireworks; +import net.minecraft.world.entity.projectile.EntityFishingHook; +import net.minecraft.world.entity.projectile.EntityLargeFireball; +import net.minecraft.world.entity.projectile.EntityLlamaSpit; +import net.minecraft.world.entity.projectile.EntityPotion; +import net.minecraft.world.entity.projectile.EntityProjectile; +import net.minecraft.world.entity.projectile.EntityShulkerBullet; +import net.minecraft.world.entity.projectile.EntitySmallFireball; +import net.minecraft.world.entity.projectile.EntitySnowball; +import net.minecraft.world.entity.projectile.EntitySpectralArrow; +import net.minecraft.world.entity.projectile.EntityThrownExpBottle; +import net.minecraft.world.entity.projectile.EntityThrownTrident; +import net.minecraft.world.entity.projectile.EntityTippedArrow; +import net.minecraft.world.entity.projectile.EntityWitherSkull; +import net.minecraft.world.entity.vehicle.EntityBoat; +import net.minecraft.world.entity.vehicle.EntityMinecartAbstract; +import net.minecraft.world.entity.vehicle.EntityMinecartChest; +import net.minecraft.world.entity.vehicle.EntityMinecartCommandBlock; +import net.minecraft.world.entity.vehicle.EntityMinecartFurnace; +import net.minecraft.world.entity.vehicle.EntityMinecartHopper; +import net.minecraft.world.entity.vehicle.EntityMinecartMobSpawner; +import net.minecraft.world.entity.vehicle.EntityMinecartRideable; +import net.minecraft.world.entity.vehicle.EntityMinecartTNT; +import net.minecraft.world.phys.AxisAlignedBB; import org.bukkit.EntityEffect; import org.bukkit.Location; import org.bukkit.Server; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEvoker.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEvoker.java index 0636d2647..5e8e9d950 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEvoker.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEvoker.java @@ -1,7 +1,7 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityEvoker; -import net.minecraft.server.EntityIllagerWizard; +import net.minecraft.world.entity.monster.EntityEvoker; +import net.minecraft.world.entity.monster.EntityIllagerWizard; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Evoker; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEvokerFangs.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEvokerFangs.java index 14e0accf8..340ff53e2 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEvokerFangs.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEvokerFangs.java @@ -1,7 +1,7 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityEvokerFangs; -import net.minecraft.server.EntityLiving; +import net.minecraft.world.entity.EntityLiving; +import net.minecraft.world.entity.projectile.EntityEvokerFangs; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.EvokerFangs; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java index 1b512cc45..da14f59ae 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityExperienceOrb; +import net.minecraft.world.entity.EntityExperienceOrb; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.ExperienceOrb; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java index b8ebacead..c98d0c684 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityFallingBlock; +import net.minecraft.world.entity.item.EntityFallingBlock; import org.bukkit.Material; import org.bukkit.block.data.BlockData; import org.bukkit.craftbukkit.CraftServer; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java index f1437d2c5..528c76ae9 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityFireball; +import net.minecraft.world.entity.projectile.EntityFireball; import org.apache.commons.lang.Validate; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java index d984a7a78..33162fd41 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java @@ -1,9 +1,9 @@ package org.bukkit.craftbukkit.entity; import java.util.Random; -import net.minecraft.server.EntityFireworks; -import net.minecraft.server.ItemStack; -import net.minecraft.server.Items; +import net.minecraft.world.entity.projectile.EntityFireworks; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; import org.bukkit.Material; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.inventory.CraftItemStack; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFish.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFish.java index 6169119cf..ec4aa908f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFish.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFish.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityFish; +import net.minecraft.world.entity.animal.EntityFish; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Fish; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java index f8e897f0b..4dd3deaab 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java @@ -1,8 +1,8 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.BlockPosition; -import net.minecraft.server.EntityFishingHook; -import net.minecraft.server.MathHelper; +import net.minecraft.core.BlockPosition; +import net.minecraft.util.MathHelper; +import net.minecraft.world.entity.projectile.EntityFishingHook; import org.apache.commons.lang.Validate; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Entity; @@ -92,7 +92,7 @@ public class CraftFishHook extends CraftProjectile implements FishHook { @Override public Entity getHookedEntity() { - net.minecraft.server.Entity hooked = getHandle().hooked; + net.minecraft.world.entity.Entity hooked = getHandle().hooked; return (hooked != null) ? hooked.getBukkitEntity() : null; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFlying.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFlying.java index 6b0c33b39..a5ebbe73d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFlying.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFlying.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityFlying; +import net.minecraft.world.entity.EntityFlying; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Flying; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFox.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFox.java index a00be6ee6..362ac8e43 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFox.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFox.java @@ -3,7 +3,7 @@ package org.bukkit.craftbukkit.entity; import com.google.common.base.Preconditions; import java.util.Optional; import java.util.UUID; -import net.minecraft.server.EntityFox; +import net.minecraft.world.entity.animal.EntityFox; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.AnimalTamer; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftGhast.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftGhast.java index cac82ce76..b24807364 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftGhast.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftGhast.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityGhast; +import net.minecraft.world.entity.monster.EntityGhast; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Ghast; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftGiant.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftGiant.java index ecbead90a..95cfa87cc 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftGiant.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftGiant.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityGiantZombie; +import net.minecraft.world.entity.monster.EntityGiantZombie; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Giant; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftGolem.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftGolem.java index 1fef5e029..12fa1a092 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftGolem.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftGolem.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityGolem; +import net.minecraft.world.entity.animal.EntityGolem; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Golem; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftGuardian.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftGuardian.java index fd4f774f0..ef3daa653 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftGuardian.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftGuardian.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityGuardian; +import net.minecraft.world.entity.monster.EntityGuardian; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Guardian; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHanging.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHanging.java index 54a9f39d2..b597f268f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHanging.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHanging.java @@ -1,7 +1,7 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityHanging; -import net.minecraft.server.EnumDirection; +import net.minecraft.core.EnumDirection; +import net.minecraft.world.entity.decoration.EntityHanging; import org.bukkit.block.BlockFace; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.block.CraftBlock; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHoglin.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHoglin.java index 27bdc5e0d..54d92bb52 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHoglin.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHoglin.java @@ -1,7 +1,7 @@ package org.bukkit.craftbukkit.entity; import com.google.common.base.Preconditions; -import net.minecraft.server.EntityHoglin; +import net.minecraft.world.entity.monster.hoglin.EntityHoglin; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Hoglin; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHorse.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHorse.java index 2a36eee99..de9e5e786 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHorse.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHorse.java @@ -1,8 +1,8 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityHorse; -import net.minecraft.server.HorseColor; -import net.minecraft.server.HorseStyle; +import net.minecraft.world.entity.animal.horse.EntityHorse; +import net.minecraft.world.entity.animal.horse.HorseColor; +import net.minecraft.world.entity.animal.horse.HorseStyle; import org.apache.commons.lang.Validate; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.inventory.CraftInventoryHorse; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java index 3ea267a78..3a4e2261d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java @@ -7,30 +7,30 @@ import java.util.Arrays; import java.util.Collection; import java.util.Optional; import java.util.Set; -import net.minecraft.server.BlockBed; -import net.minecraft.server.BlockEnchantmentTable; -import net.minecraft.server.BlockPosition; -import net.minecraft.server.BlockWorkbench; -import net.minecraft.server.Blocks; -import net.minecraft.server.Container; -import net.minecraft.server.Containers; -import net.minecraft.server.CraftingManager; -import net.minecraft.server.Entity; -import net.minecraft.server.EntityHuman; -import net.minecraft.server.EntityPlayer; -import net.minecraft.server.EntityTypes; -import net.minecraft.server.EnumMainHand; -import net.minecraft.server.IBlockData; -import net.minecraft.server.IChatBaseComponent; -import net.minecraft.server.IMerchant; -import net.minecraft.server.IRecipe; -import net.minecraft.server.ITileInventory; -import net.minecraft.server.ItemCooldown; -import net.minecraft.server.NBTTagCompound; -import net.minecraft.server.PacketPlayInCloseWindow; -import net.minecraft.server.PacketPlayOutOpenWindow; -import net.minecraft.server.TileEntity; -import net.minecraft.server.TileEntityContainer; +import net.minecraft.core.BlockPosition; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.chat.IChatBaseComponent; +import net.minecraft.network.protocol.game.PacketPlayInCloseWindow; +import net.minecraft.network.protocol.game.PacketPlayOutOpenWindow; +import net.minecraft.server.level.EntityPlayer; +import net.minecraft.world.ITileInventory; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.EntityTypes; +import net.minecraft.world.entity.EnumMainHand; +import net.minecraft.world.entity.player.EntityHuman; +import net.minecraft.world.inventory.Container; +import net.minecraft.world.inventory.Containers; +import net.minecraft.world.item.ItemCooldown; +import net.minecraft.world.item.crafting.CraftingManager; +import net.minecraft.world.item.crafting.IRecipe; +import net.minecraft.world.item.trading.IMerchant; +import net.minecraft.world.level.block.BlockBed; +import net.minecraft.world.level.block.BlockEnchantmentTable; +import net.minecraft.world.level.block.BlockWorkbench; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.entity.TileEntity; +import net.minecraft.world.level.block.entity.TileEntityContainer; +import net.minecraft.world.level.block.state.IBlockData; import org.bukkit.GameMode; import org.bukkit.Location; import org.bukkit.Material; @@ -114,7 +114,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { @Override public void setItemOnCursor(ItemStack item) { - net.minecraft.server.ItemStack stack = CraftItemStack.asNMSCopy(item); + net.minecraft.world.item.ItemStack stack = CraftItemStack.asNMSCopy(item); getHandle().inventory.setCarried(stack); if (this instanceof CraftPlayer) { ((EntityPlayer) getHandle()).broadcastCarriedItem(); // Send set slot for cursor diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHusk.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHusk.java index 46425820b..d0f3166ef 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHusk.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHusk.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityZombieHusk; +import net.minecraft.world.entity.monster.EntityZombieHusk; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Husk; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftIllager.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftIllager.java index 9bdd1f1d4..c8be77045 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftIllager.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftIllager.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityIllagerAbstract; +import net.minecraft.world.entity.monster.EntityIllagerAbstract; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Illager; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftIllusioner.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftIllusioner.java index 2ec1af8be..0dabb012b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftIllusioner.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftIllusioner.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityIllagerIllusioner; +import net.minecraft.world.entity.monster.EntityIllagerIllusioner; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Illusioner; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftIronGolem.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftIronGolem.java index 9ca8eeff5..69fe6c47c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftIronGolem.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftIronGolem.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityIronGolem; +import net.minecraft.world.entity.animal.EntityIronGolem; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.IronGolem; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java index d7da0cf2e..f333dd272 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java @@ -1,8 +1,8 @@ package org.bukkit.craftbukkit.entity; import java.util.UUID; -import net.minecraft.server.Entity; -import net.minecraft.server.EntityItem; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.item.EntityItem; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.inventory.CraftItemStack; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java index 445220468..86bb26cd1 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java @@ -1,12 +1,12 @@ package org.bukkit.craftbukkit.entity; import com.google.common.base.Preconditions; -import net.minecraft.server.BlockPosition; -import net.minecraft.server.EntityHanging; -import net.minecraft.server.EntityItemFrame; -import net.minecraft.server.EnumDirection; -import net.minecraft.server.ItemStack; -import net.minecraft.server.WorldServer; +import net.minecraft.core.BlockPosition; +import net.minecraft.core.EnumDirection; +import net.minecraft.server.level.WorldServer; +import net.minecraft.world.entity.decoration.EntityHanging; +import net.minecraft.world.entity.decoration.EntityItemFrame; +import net.minecraft.world.item.ItemStack; import org.apache.commons.lang.Validate; import org.bukkit.Rotation; import org.bukkit.block.BlockFace; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLargeFireball.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLargeFireball.java index 7ff0ad262..389cb9e17 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLargeFireball.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLargeFireball.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityLargeFireball; +import net.minecraft.world.entity.projectile.EntityLargeFireball; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.LargeFireball; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLeash.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLeash.java index 7114b5156..2345f7248 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLeash.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLeash.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityLeash; +import net.minecraft.world.entity.decoration.EntityLeash; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.LeashHitch; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLightningStrike.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLightningStrike.java index 6c05cb414..2f881b054 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLightningStrike.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLightningStrike.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityLightning; +import net.minecraft.world.entity.EntityLightning; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.LightningStrike; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java index 422e5578a..da0a7a60c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -8,37 +8,37 @@ import java.util.Iterator; import java.util.List; import java.util.Set; import java.util.UUID; -import net.minecraft.server.DamageSource; -import net.minecraft.server.EntityArmorStand; -import net.minecraft.server.EntityArrow; -import net.minecraft.server.EntityDragonFireball; -import net.minecraft.server.EntityEgg; -import net.minecraft.server.EntityEnderPearl; -import net.minecraft.server.EntityFireball; -import net.minecraft.server.EntityFireworks; -import net.minecraft.server.EntityFishingHook; -import net.minecraft.server.EntityHuman; -import net.minecraft.server.EntityInsentient; -import net.minecraft.server.EntityLargeFireball; -import net.minecraft.server.EntityLiving; -import net.minecraft.server.EntityLlamaSpit; -import net.minecraft.server.EntityPotion; -import net.minecraft.server.EntityProjectile; -import net.minecraft.server.EntityShulkerBullet; -import net.minecraft.server.EntitySmallFireball; -import net.minecraft.server.EntitySnowball; -import net.minecraft.server.EntitySpectralArrow; -import net.minecraft.server.EntityThrownExpBottle; -import net.minecraft.server.EntityThrownTrident; -import net.minecraft.server.EntityTippedArrow; -import net.minecraft.server.EntityTypes; -import net.minecraft.server.EntityWither; -import net.minecraft.server.EntityWitherSkull; -import net.minecraft.server.EnumHand; -import net.minecraft.server.EnumMonsterType; -import net.minecraft.server.GenericAttributes; -import net.minecraft.server.MobEffect; -import net.minecraft.server.MobEffectList; +import net.minecraft.world.EnumHand; +import net.minecraft.world.damagesource.DamageSource; +import net.minecraft.world.effect.MobEffect; +import net.minecraft.world.effect.MobEffectList; +import net.minecraft.world.entity.EntityInsentient; +import net.minecraft.world.entity.EntityLiving; +import net.minecraft.world.entity.EntityTypes; +import net.minecraft.world.entity.EnumMonsterType; +import net.minecraft.world.entity.ai.attributes.GenericAttributes; +import net.minecraft.world.entity.boss.wither.EntityWither; +import net.minecraft.world.entity.decoration.EntityArmorStand; +import net.minecraft.world.entity.player.EntityHuman; +import net.minecraft.world.entity.projectile.EntityArrow; +import net.minecraft.world.entity.projectile.EntityDragonFireball; +import net.minecraft.world.entity.projectile.EntityEgg; +import net.minecraft.world.entity.projectile.EntityEnderPearl; +import net.minecraft.world.entity.projectile.EntityFireball; +import net.minecraft.world.entity.projectile.EntityFireworks; +import net.minecraft.world.entity.projectile.EntityFishingHook; +import net.minecraft.world.entity.projectile.EntityLargeFireball; +import net.minecraft.world.entity.projectile.EntityLlamaSpit; +import net.minecraft.world.entity.projectile.EntityPotion; +import net.minecraft.world.entity.projectile.EntityProjectile; +import net.minecraft.world.entity.projectile.EntityShulkerBullet; +import net.minecraft.world.entity.projectile.EntitySmallFireball; +import net.minecraft.world.entity.projectile.EntitySnowball; +import net.minecraft.world.entity.projectile.EntitySpectralArrow; +import net.minecraft.world.entity.projectile.EntityThrownExpBottle; +import net.minecraft.world.entity.projectile.EntityThrownTrident; +import net.minecraft.world.entity.projectile.EntityTippedArrow; +import net.minecraft.world.entity.projectile.EntityWitherSkull; import org.apache.commons.lang.Validate; import org.bukkit.FluidCollisionMode; import org.bukkit.Location; @@ -394,8 +394,8 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { @Override @SuppressWarnings("unchecked") public T launchProjectile(Class projectile, Vector velocity) { - net.minecraft.server.World world = ((CraftWorld) getWorld()).getHandle(); - net.minecraft.server.Entity launch = null; + net.minecraft.world.level.World world = ((CraftWorld) getWorld()).getHandle(); + net.minecraft.world.entity.Entity launch = null; if (Snowball.class.isAssignableFrom(projectile)) { launch = new EntitySnowball(world, getHandle()); @@ -413,7 +413,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { } else if (SpectralArrow.class.isAssignableFrom(projectile)) { launch = new EntitySpectralArrow(world, getHandle()); } else if (Trident.class.isAssignableFrom(projectile)) { - launch = new EntityThrownTrident(world, getHandle(), new net.minecraft.server.ItemStack(net.minecraft.server.Items.TRIDENT)); + launch = new EntityThrownTrident(world, getHandle(), new net.minecraft.world.item.ItemStack(net.minecraft.world.item.Items.TRIDENT)); } else { launch = new EntityTippedArrow(world, getHandle()); } @@ -465,7 +465,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { } else if (Firework.class.isAssignableFrom(projectile)) { Location location = getEyeLocation(); - launch = new EntityFireworks(world, net.minecraft.server.ItemStack.b, getHandle()); + launch = new EntityFireworks(world, net.minecraft.world.item.ItemStack.b, getHandle()); launch.setPositionRotation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch()); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLlama.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLlama.java index 058010b99..6dcf196fd 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLlama.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLlama.java @@ -1,7 +1,7 @@ package org.bukkit.craftbukkit.entity; import com.google.common.base.Preconditions; -import net.minecraft.server.EntityLlama; +import net.minecraft.world.entity.animal.horse.EntityLlama; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.inventory.CraftInventoryLlama; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLlamaSpit.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLlamaSpit.java index 4fec54bac..59b65c4ad 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLlamaSpit.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLlamaSpit.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityLlamaSpit; +import net.minecraft.world.entity.projectile.EntityLlamaSpit; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.LlamaSpit; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMagmaCube.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMagmaCube.java index 5e005c9e4..53909f6ee 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMagmaCube.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMagmaCube.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityMagmaCube; +import net.minecraft.world.entity.monster.EntityMagmaCube; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.MagmaCube; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecart.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecart.java index d23f994f5..69415f5a8 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecart.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecart.java @@ -1,8 +1,8 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.Blocks; -import net.minecraft.server.EntityMinecartAbstract; -import net.minecraft.server.IBlockData; +import net.minecraft.world.entity.vehicle.EntityMinecartAbstract; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.state.IBlockData; import org.bukkit.block.data.BlockData; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.block.data.CraftBlockData; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java index e05624e64..cbd121c21 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityMinecartChest; +import net.minecraft.world.entity.vehicle.EntityMinecartChest; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.inventory.CraftInventory; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartCommand.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartCommand.java index 89affac56..0590675b9 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartCommand.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartCommand.java @@ -1,7 +1,7 @@ package org.bukkit.craftbukkit.entity; import java.util.Set; -import net.minecraft.server.EntityMinecartCommandBlock; +import net.minecraft.world.entity.vehicle.EntityMinecartCommandBlock; import org.bukkit.Bukkit; import org.bukkit.Server; import org.bukkit.craftbukkit.CraftServer; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartContainer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartContainer.java index 2d776b520..5ffb8108f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartContainer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartContainer.java @@ -1,8 +1,8 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityMinecartAbstract; -import net.minecraft.server.EntityMinecartContainer; -import net.minecraft.server.MinecraftKey; +import net.minecraft.resources.MinecraftKey; +import net.minecraft.world.entity.vehicle.EntityMinecartAbstract; +import net.minecraft.world.entity.vehicle.EntityMinecartContainer; import org.bukkit.Bukkit; import org.bukkit.NamespacedKey; import org.bukkit.craftbukkit.CraftServer; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartFurnace.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartFurnace.java index 80ccbb2cc..1142cfce4 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartFurnace.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartFurnace.java @@ -1,7 +1,7 @@ package org.bukkit.craftbukkit.entity; import com.google.common.base.Preconditions; -import net.minecraft.server.EntityMinecartFurnace; +import net.minecraft.world.entity.vehicle.EntityMinecartFurnace; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.minecart.PoweredMinecart; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java index 334bd5bb3..17a42aec7 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityMinecartHopper; +import net.minecraft.world.entity.vehicle.EntityMinecartHopper; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.inventory.CraftInventory; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartMobSpawner.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartMobSpawner.java index b6c86c01f..2830f543e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartMobSpawner.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartMobSpawner.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityMinecartMobSpawner; +import net.minecraft.world.entity.vehicle.EntityMinecartMobSpawner; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.minecart.SpawnerMinecart; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartRideable.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartRideable.java index 1c2b32fc4..4c05a099a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartRideable.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartRideable.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityMinecartAbstract; +import net.minecraft.world.entity.vehicle.EntityMinecartAbstract; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.minecart.RideableMinecart; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartTNT.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartTNT.java index 02c5589bc..db99de07d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartTNT.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartTNT.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityMinecartTNT; +import net.minecraft.world.entity.vehicle.EntityMinecartTNT; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.minecart.ExplosiveMinecart; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java index 90e63fbf2..eb275ac45 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityInsentient; +import net.minecraft.world.entity.EntityInsentient; import org.bukkit.Bukkit; import org.bukkit.NamespacedKey; import org.bukkit.craftbukkit.CraftServer; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMonster.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMonster.java index 6bfb4bc35..b7378d6d0 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMonster.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMonster.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityMonster; +import net.minecraft.world.entity.monster.EntityMonster; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Monster; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMule.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMule.java index cf9b3ac18..423b1deea 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMule.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMule.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityHorseMule; +import net.minecraft.world.entity.animal.horse.EntityHorseMule; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Horse.Variant; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java index 375dbf4a4..24e2197ac 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java @@ -1,7 +1,7 @@ package org.bukkit.craftbukkit.entity; import com.google.common.base.Preconditions; -import net.minecraft.server.EntityMushroomCow; +import net.minecraft.world.entity.animal.EntityMushroomCow; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.MushroomCow; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftOcelot.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftOcelot.java index bd25ea0e1..8be5d60e1 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftOcelot.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftOcelot.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityOcelot; +import net.minecraft.world.entity.animal.EntityOcelot; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Ocelot; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPainting.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPainting.java index 7960839b2..30f4053ac 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPainting.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPainting.java @@ -1,9 +1,9 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityPainting; -import net.minecraft.server.EntityTypes; -import net.minecraft.server.Paintings; -import net.minecraft.server.WorldServer; +import net.minecraft.server.level.WorldServer; +import net.minecraft.world.entity.EntityTypes; +import net.minecraft.world.entity.decoration.EntityPainting; +import net.minecraft.world.entity.decoration.Paintings; import org.bukkit.Art; import org.bukkit.block.BlockFace; import org.bukkit.craftbukkit.CraftArt; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPanda.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPanda.java index a0c5ae379..29eea7cfe 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPanda.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPanda.java @@ -1,7 +1,7 @@ package org.bukkit.craftbukkit.entity; import com.google.common.base.Preconditions; -import net.minecraft.server.EntityPanda; +import net.minecraft.world.entity.animal.EntityPanda; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Panda; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftParrot.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftParrot.java index 491a1706e..ff4b16f33 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftParrot.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftParrot.java @@ -1,7 +1,7 @@ package org.bukkit.craftbukkit.entity; import com.google.common.base.Preconditions; -import net.minecraft.server.EntityParrot; +import net.minecraft.world.entity.animal.EntityParrot; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Parrot; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPhantom.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPhantom.java index 9f9ee9239..6ec7cf434 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPhantom.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPhantom.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityPhantom; +import net.minecraft.world.entity.monster.EntityPhantom; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Phantom; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPig.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPig.java index db96ed320..80a2f05b1 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPig.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPig.java @@ -1,7 +1,7 @@ package org.bukkit.craftbukkit.entity; import com.google.common.base.Preconditions; -import net.minecraft.server.EntityPig; +import net.minecraft.world.entity.animal.EntityPig; import org.bukkit.Material; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPigZombie.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPigZombie.java index 1af3afdaf..0b5c4218a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPigZombie.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPigZombie.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityPigZombie; +import net.minecraft.world.entity.monster.EntityPigZombie; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.PigZombie; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPiglin.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPiglin.java index 6f83387c4..a224ebf16 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPiglin.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPiglin.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityPiglin; +import net.minecraft.world.entity.monster.piglin.EntityPiglin; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Piglin; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPiglinAbstract.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPiglinAbstract.java index e16585539..5087e922c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPiglinAbstract.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPiglinAbstract.java @@ -1,7 +1,7 @@ package org.bukkit.craftbukkit.entity; import com.google.common.base.Preconditions; -import net.minecraft.server.EntityPiglinAbstract; +import net.minecraft.world.entity.monster.piglin.EntityPiglinAbstract; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.PiglinAbstract; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPiglinBrute.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPiglinBrute.java index d59f6a3e0..2d689e055 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPiglinBrute.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPiglinBrute.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityPiglinBrute; +import net.minecraft.world.entity.monster.piglin.EntityPiglinBrute; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.PiglinBrute; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPillager.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPillager.java index 9c659d764..72ac9eae7 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPillager.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPillager.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityPillager; +import net.minecraft.world.entity.monster.EntityPillager; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.inventory.CraftInventory; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index 31877a21c..ff66893ec 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -24,50 +24,50 @@ import java.util.WeakHashMap; import java.util.logging.Level; import java.util.logging.Logger; import javax.annotation.Nullable; +import net.minecraft.SystemUtils; +import net.minecraft.advancements.AdvancementProgress; +import net.minecraft.core.BlockPosition; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.PacketDataSerializer; +import net.minecraft.network.chat.ChatComponentText; +import net.minecraft.network.chat.ChatMessageType; +import net.minecraft.network.chat.IChatBaseComponent; +import net.minecraft.network.protocol.game.PacketPlayOutBlockBreakAnimation; +import net.minecraft.network.protocol.game.PacketPlayOutBlockChange; +import net.minecraft.network.protocol.game.PacketPlayOutChat; +import net.minecraft.network.protocol.game.PacketPlayOutCustomPayload; +import net.minecraft.network.protocol.game.PacketPlayOutCustomSoundEffect; +import net.minecraft.network.protocol.game.PacketPlayOutExperience; +import net.minecraft.network.protocol.game.PacketPlayOutMap; +import net.minecraft.network.protocol.game.PacketPlayOutNamedSoundEffect; +import net.minecraft.network.protocol.game.PacketPlayOutPlayerInfo; +import net.minecraft.network.protocol.game.PacketPlayOutPlayerListHeaderFooter; +import net.minecraft.network.protocol.game.PacketPlayOutSpawnPosition; +import net.minecraft.network.protocol.game.PacketPlayOutStopSound; +import net.minecraft.network.protocol.game.PacketPlayOutTitle; +import net.minecraft.network.protocol.game.PacketPlayOutUpdateAttributes; +import net.minecraft.network.protocol.game.PacketPlayOutUpdateHealth; +import net.minecraft.network.protocol.game.PacketPlayOutWorldEvent; +import net.minecraft.network.protocol.game.PacketPlayOutWorldParticles; +import net.minecraft.resources.MinecraftKey; import net.minecraft.server.AdvancementDataPlayer; -import net.minecraft.server.AdvancementProgress; -import net.minecraft.server.AttributeMapBase; -import net.minecraft.server.AttributeModifiable; -import net.minecraft.server.BlockPosition; -import net.minecraft.server.ChatComponentText; -import net.minecraft.server.ChatMessageType; -import net.minecraft.server.Container; -import net.minecraft.server.Entity; -import net.minecraft.server.EntityHuman; -import net.minecraft.server.EntityLiving; -import net.minecraft.server.EntityPlayer; -import net.minecraft.server.EnumColor; -import net.minecraft.server.EnumGamemode; -import net.minecraft.server.GenericAttributes; -import net.minecraft.server.IChatBaseComponent; -import net.minecraft.server.MapIcon; -import net.minecraft.server.MinecraftKey; -import net.minecraft.server.NBTTagCompound; -import net.minecraft.server.PacketDataSerializer; -import net.minecraft.server.PacketPlayOutBlockBreakAnimation; -import net.minecraft.server.PacketPlayOutBlockChange; -import net.minecraft.server.PacketPlayOutChat; -import net.minecraft.server.PacketPlayOutCustomPayload; -import net.minecraft.server.PacketPlayOutCustomSoundEffect; -import net.minecraft.server.PacketPlayOutExperience; -import net.minecraft.server.PacketPlayOutMap; -import net.minecraft.server.PacketPlayOutNamedSoundEffect; -import net.minecraft.server.PacketPlayOutPlayerInfo; -import net.minecraft.server.PacketPlayOutPlayerListHeaderFooter; -import net.minecraft.server.PacketPlayOutSpawnPosition; -import net.minecraft.server.PacketPlayOutStopSound; -import net.minecraft.server.PacketPlayOutTitle; -import net.minecraft.server.PacketPlayOutUpdateAttributes; -import net.minecraft.server.PacketPlayOutUpdateHealth; -import net.minecraft.server.PacketPlayOutWorldEvent; -import net.minecraft.server.PacketPlayOutWorldParticles; -import net.minecraft.server.PlayerChunkMap; -import net.minecraft.server.PlayerConnection; -import net.minecraft.server.SystemUtils; -import net.minecraft.server.TileEntitySign; -import net.minecraft.server.Vec3D; -import net.minecraft.server.WhiteListEntry; -import net.minecraft.server.WorldServer; +import net.minecraft.server.level.EntityPlayer; +import net.minecraft.server.level.PlayerChunkMap; +import net.minecraft.server.level.WorldServer; +import net.minecraft.server.network.PlayerConnection; +import net.minecraft.server.players.WhiteListEntry; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.EntityLiving; +import net.minecraft.world.entity.ai.attributes.AttributeMapBase; +import net.minecraft.world.entity.ai.attributes.AttributeModifiable; +import net.minecraft.world.entity.ai.attributes.GenericAttributes; +import net.minecraft.world.entity.player.EntityHuman; +import net.minecraft.world.inventory.Container; +import net.minecraft.world.item.EnumColor; +import net.minecraft.world.level.EnumGamemode; +import net.minecraft.world.level.block.entity.TileEntitySign; +import net.minecraft.world.level.saveddata.maps.MapIcon; +import net.minecraft.world.phys.Vec3D; import org.apache.commons.lang.NotImplementedException; import org.apache.commons.lang.Validate; import org.bukkit.BanList; @@ -396,7 +396,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } float f = (float) Math.pow(2.0D, (note - 12.0D) / 12.0D); - getHandle().playerConnection.sendPacket(new PacketPlayOutNamedSoundEffect(CraftSound.getSoundEffect("block.note_block." + instrumentName), net.minecraft.server.SoundCategory.RECORDS, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), 3.0f, f)); + getHandle().playerConnection.sendPacket(new PacketPlayOutNamedSoundEffect(CraftSound.getSoundEffect("block.note_block." + instrumentName), net.minecraft.sounds.SoundCategory.RECORDS, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), 3.0f, f)); } @Override @@ -458,7 +458,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { break; } float f = (float) Math.pow(2.0D, (note.getId() - 12.0D) / 12.0D); - getHandle().playerConnection.sendPacket(new PacketPlayOutNamedSoundEffect(CraftSound.getSoundEffect("block.note_block." + instrumentName), net.minecraft.server.SoundCategory.RECORDS, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), 3.0f, f)); + getHandle().playerConnection.sendPacket(new PacketPlayOutNamedSoundEffect(CraftSound.getSoundEffect("block.note_block." + instrumentName), net.minecraft.sounds.SoundCategory.RECORDS, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), 3.0f, f)); } @Override @@ -475,7 +475,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void playSound(Location loc, Sound sound, org.bukkit.SoundCategory category, float volume, float pitch) { if (loc == null || sound == null || category == null || getHandle().playerConnection == null) return; - PacketPlayOutNamedSoundEffect packet = new PacketPlayOutNamedSoundEffect(CraftSound.getSoundEffect(sound), net.minecraft.server.SoundCategory.valueOf(category.name()), loc.getX(), loc.getY(), loc.getZ(), volume, pitch); + PacketPlayOutNamedSoundEffect packet = new PacketPlayOutNamedSoundEffect(CraftSound.getSoundEffect(sound), net.minecraft.sounds.SoundCategory.valueOf(category.name()), loc.getX(), loc.getY(), loc.getZ(), volume, pitch); getHandle().playerConnection.sendPacket(packet); } @@ -483,7 +483,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void playSound(Location loc, String sound, org.bukkit.SoundCategory category, float volume, float pitch) { if (loc == null || sound == null || category == null || getHandle().playerConnection == null) return; - PacketPlayOutCustomSoundEffect packet = new PacketPlayOutCustomSoundEffect(new MinecraftKey(sound), net.minecraft.server.SoundCategory.valueOf(category.name()), new Vec3D(loc.getX(), loc.getY(), loc.getZ()), volume, pitch); + PacketPlayOutCustomSoundEffect packet = new PacketPlayOutCustomSoundEffect(new MinecraftKey(sound), net.minecraft.sounds.SoundCategory.valueOf(category.name()), new Vec3D(loc.getX(), loc.getY(), loc.getZ()), volume, pitch); getHandle().playerConnection.sendPacket(packet); } @@ -506,7 +506,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void stopSound(String sound, org.bukkit.SoundCategory category) { if (getHandle().playerConnection == null) return; - getHandle().playerConnection.sendPacket(new PacketPlayOutStopSound(new MinecraftKey(sound), category == null ? net.minecraft.server.SoundCategory.MASTER : net.minecraft.server.SoundCategory.valueOf(category.name()))); + getHandle().playerConnection.sendPacket(new PacketPlayOutStopSound(new MinecraftKey(sound), category == null ? net.minecraft.sounds.SoundCategory.MASTER : net.minecraft.sounds.SoundCategory.valueOf(category.name()))); } @Override @@ -1696,7 +1696,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { ItemStack hand = getInventory().getItemInMainHand(); getInventory().setItemInMainHand(book); - getHandle().openBook(org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(book), net.minecraft.server.EnumHand.MAIN_HAND); + getHandle().openBook(org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(book), net.minecraft.world.EnumHand.MAIN_HAND); getInventory().setItemInMainHand(hand); } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPolarBear.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPolarBear.java index 21129672c..d95734fe8 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPolarBear.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPolarBear.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityPolarBear; +import net.minecraft.world.entity.animal.EntityPolarBear; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.PolarBear; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftProjectile.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftProjectile.java index f947a6e8c..76d726c98 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftProjectile.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftProjectile.java @@ -1,13 +1,13 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityLiving; -import net.minecraft.server.IProjectile; +import net.minecraft.world.entity.EntityLiving; +import net.minecraft.world.entity.projectile.IProjectile; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Projectile; import org.bukkit.projectiles.ProjectileSource; public abstract class CraftProjectile extends AbstractProjectile implements Projectile { - public CraftProjectile(CraftServer server, net.minecraft.server.IProjectile entity) { + public CraftProjectile(CraftServer server, net.minecraft.world.entity.projectile.IProjectile entity) { super(server, entity); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPufferFish.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPufferFish.java index 647971d5e..d65c08a02 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPufferFish.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPufferFish.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityPufferFish; +import net.minecraft.world.entity.animal.EntityPufferFish; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.PufferFish; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftRabbit.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftRabbit.java index 7c18aed40..f5e98f184 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftRabbit.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftRabbit.java @@ -1,8 +1,8 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityRabbit; -import net.minecraft.server.PathfinderGoalSelector; -import net.minecraft.server.World; +import net.minecraft.world.entity.ai.goal.PathfinderGoalSelector; +import net.minecraft.world.entity.animal.EntityRabbit; +import net.minecraft.world.level.World; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.CraftWorld; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftRaider.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftRaider.java index d68a84a17..834451ea6 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftRaider.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftRaider.java @@ -1,8 +1,8 @@ package org.bukkit.craftbukkit.entity; import com.google.common.base.Preconditions; -import net.minecraft.server.BlockPosition; -import net.minecraft.server.EntityRaider; +import net.minecraft.core.BlockPosition; +import net.minecraft.world.entity.raid.EntityRaider; import org.bukkit.block.Block; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.block.CraftBlock; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftRavager.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftRavager.java index 3cb2e6cc5..23697cf50 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftRavager.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftRavager.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityRavager; +import net.minecraft.world.entity.monster.EntityRavager; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Ravager; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSalmon.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSalmon.java index 0e4a9ce09..f635bec31 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSalmon.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSalmon.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntitySalmon; +import net.minecraft.world.entity.animal.EntitySalmon; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Salmon; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSheep.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSheep.java index fef86120d..1d84ad8df 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSheep.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSheep.java @@ -1,7 +1,7 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntitySheep; -import net.minecraft.server.EnumColor; +import net.minecraft.world.entity.animal.EntitySheep; +import net.minecraft.world.item.EnumColor; import org.bukkit.DyeColor; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftShulker.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftShulker.java index d18531378..6fc7d2a0e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftShulker.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftShulker.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityShulker; +import net.minecraft.world.entity.monster.EntityShulker; import org.bukkit.DyeColor; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftShulkerBullet.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftShulkerBullet.java index 7dbd111d9..41ca56f62 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftShulkerBullet.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftShulkerBullet.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityShulkerBullet; +import net.minecraft.world.entity.projectile.EntityShulkerBullet; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Entity; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSilverfish.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSilverfish.java index 0fe4b0e8c..1160c32b8 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSilverfish.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSilverfish.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntitySilverfish; +import net.minecraft.world.entity.monster.EntitySilverfish; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Silverfish; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSizedFireball.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSizedFireball.java index 082e7bda7..4c7627b10 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSizedFireball.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSizedFireball.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityFireballFireball; +import net.minecraft.world.entity.projectile.EntityFireballFireball; import org.bukkit.Material; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.inventory.CraftItemStack; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java index 1cd359b3d..cebb90fd4 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntitySkeletonAbstract; +import net.minecraft.world.entity.monster.EntitySkeletonAbstract; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Skeleton; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeletonHorse.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeletonHorse.java index e822c2200..4aec5fdb6 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeletonHorse.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeletonHorse.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityHorseSkeleton; +import net.minecraft.world.entity.animal.horse.EntityHorseSkeleton; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Horse.Variant; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java index ce6ed6e89..aa0ac8d84 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntitySlime; +import net.minecraft.world.entity.monster.EntitySlime; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Slime; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSmallFireball.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSmallFireball.java index bd60de99f..53749f3ad 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSmallFireball.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSmallFireball.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntitySmallFireball; +import net.minecraft.world.entity.projectile.EntitySmallFireball; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.SmallFireball; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowball.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowball.java index 186ebc970..21976458c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowball.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowball.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntitySnowball; +import net.minecraft.world.entity.projectile.EntitySnowball; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Snowball; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java index 27460c59e..5720bdf64 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntitySnowman; +import net.minecraft.world.entity.animal.EntitySnowman; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Snowman; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSpectralArrow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSpectralArrow.java index 3a614edd7..e9379d623 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSpectralArrow.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSpectralArrow.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntitySpectralArrow; +import net.minecraft.world.entity.projectile.EntitySpectralArrow; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.SpectralArrow; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSpellcaster.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSpellcaster.java index 91292f4e4..63d17fc4f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSpellcaster.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSpellcaster.java @@ -1,7 +1,7 @@ package org.bukkit.craftbukkit.entity; import com.google.common.base.Preconditions; -import net.minecraft.server.EntityIllagerWizard; +import net.minecraft.world.entity.monster.EntityIllagerWizard; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Spellcaster; import org.bukkit.entity.Spellcaster.Spell; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSpider.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSpider.java index a3f452aca..1cfef80f2 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSpider.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSpider.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntitySpider; +import net.minecraft.world.entity.monster.EntitySpider; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Spider; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSquid.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSquid.java index 6cb09623e..6557b3b4f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSquid.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSquid.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntitySquid; +import net.minecraft.world.entity.animal.EntitySquid; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Squid; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftStray.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftStray.java index 180ae3e9a..14d630837 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftStray.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftStray.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntitySkeletonStray; +import net.minecraft.world.entity.monster.EntitySkeletonStray; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Skeleton.SkeletonType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftStrider.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftStrider.java index a17027323..3e9be0182 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftStrider.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftStrider.java @@ -1,7 +1,7 @@ package org.bukkit.craftbukkit.entity; import com.google.common.base.Preconditions; -import net.minecraft.server.EntityStrider; +import net.minecraft.world.entity.monster.EntityStrider; import org.bukkit.Material; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftTNTPrimed.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftTNTPrimed.java index e01f44563..67a9585c8 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftTNTPrimed.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftTNTPrimed.java @@ -1,7 +1,7 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityLiving; -import net.minecraft.server.EntityTNTPrimed; +import net.minecraft.world.entity.EntityLiving; +import net.minecraft.world.entity.item.EntityTNTPrimed; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Entity; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java index 58d9cd817..3ac662319 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java @@ -1,7 +1,7 @@ package org.bukkit.craftbukkit.entity; import java.util.UUID; -import net.minecraft.server.EntityTameableAnimal; +import net.minecraft.world.entity.EntityTameableAnimal; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.AnimalTamer; import org.bukkit.entity.Creature; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftThrowableProjectile.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftThrowableProjectile.java index 0516f2e71..e56754a38 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftThrowableProjectile.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftThrowableProjectile.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityProjectileThrowable; +import net.minecraft.world.entity.projectile.EntityProjectileThrowable; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.inventory.CraftItemStack; import org.bukkit.entity.ThrowableProjectile; @@ -15,7 +15,7 @@ public abstract class CraftThrowableProjectile extends CraftProjectile implement @Override public ItemStack getItem() { if (getHandle().getItem().isEmpty()) { - return CraftItemStack.asBukkitCopy(new net.minecraft.server.ItemStack(getHandle().getDefaultItemPublic())); + return CraftItemStack.asBukkitCopy(new net.minecraft.world.item.ItemStack(getHandle().getDefaultItemPublic())); } else { return CraftItemStack.asBukkitCopy(getHandle().getItem()); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownExpBottle.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownExpBottle.java index fc649413a..42d7b9105 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownExpBottle.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownExpBottle.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityThrownExpBottle; +import net.minecraft.world.entity.projectile.EntityThrownExpBottle; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.ThrownExpBottle; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownPotion.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownPotion.java index 2400f3309..9a2f5841b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownPotion.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownPotion.java @@ -2,9 +2,9 @@ package org.bukkit.craftbukkit.entity; import com.google.common.collect.ImmutableList; import java.util.Collection; -import net.minecraft.server.EntityPotion; -import net.minecraft.server.MobEffect; -import net.minecraft.server.PotionUtil; +import net.minecraft.world.effect.MobEffect; +import net.minecraft.world.entity.projectile.EntityPotion; +import net.minecraft.world.item.alchemy.PotionUtil; import org.apache.commons.lang.Validate; import org.bukkit.Material; import org.bukkit.craftbukkit.CraftServer; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftTippedArrow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftTippedArrow.java index ecdaa2b97..7322b38a6 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftTippedArrow.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftTippedArrow.java @@ -2,9 +2,9 @@ package org.bukkit.craftbukkit.entity; import com.google.common.collect.ImmutableList; import java.util.List; -import net.minecraft.server.EntityTippedArrow; -import net.minecraft.server.MobEffect; -import net.minecraft.server.MobEffectList; +import net.minecraft.world.effect.MobEffect; +import net.minecraft.world.effect.MobEffectList; +import net.minecraft.world.entity.projectile.EntityTippedArrow; import org.apache.commons.lang.Validate; import org.bukkit.Color; import org.bukkit.craftbukkit.CraftServer; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftTraderLlama.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftTraderLlama.java index 38a8649c6..1419d88ec 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftTraderLlama.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftTraderLlama.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityLlamaTrader; +import net.minecraft.world.entity.animal.horse.EntityLlamaTrader; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.TraderLlama; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftTrident.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftTrident.java index d84b78dba..3a91823b5 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftTrident.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftTrident.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityThrownTrident; +import net.minecraft.world.entity.projectile.EntityThrownTrident; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.inventory.CraftItemStack; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftTropicalFish.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftTropicalFish.java index 088022c87..87f87cda6 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftTropicalFish.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftTropicalFish.java @@ -2,7 +2,7 @@ package org.bukkit.craftbukkit.entity; import java.util.HashMap; import java.util.Map; -import net.minecraft.server.EntityTropicalFish; +import net.minecraft.world.entity.animal.EntityTropicalFish; import org.bukkit.DyeColor; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftTurtle.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftTurtle.java index 123a2c75c..b46bb7592 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftTurtle.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftTurtle.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityTurtle; +import net.minecraft.world.entity.animal.EntityTurtle; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Turtle; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVehicle.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVehicle.java index 8e4af469f..2a3ae470f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVehicle.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVehicle.java @@ -4,7 +4,7 @@ import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Vehicle; public abstract class CraftVehicle extends CraftEntity implements Vehicle { - public CraftVehicle(CraftServer server, net.minecraft.server.Entity entity) { + public CraftVehicle(CraftServer server, net.minecraft.world.entity.Entity entity) { super(server, entity); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java index 737a37b6f..ccaccffbf 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityVex; +import net.minecraft.world.entity.monster.EntityVex; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Vex; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java index 25a57d94a..b020bc9e7 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java @@ -2,12 +2,12 @@ package org.bukkit.craftbukkit.entity; import com.google.common.base.Preconditions; import java.util.Locale; -import net.minecraft.server.BlockBed; -import net.minecraft.server.BlockPosition; -import net.minecraft.server.EntityVillager; -import net.minecraft.server.IBlockData; -import net.minecraft.server.IRegistry; -import net.minecraft.server.VillagerProfession; +import net.minecraft.core.BlockPosition; +import net.minecraft.core.IRegistry; +import net.minecraft.world.entity.npc.EntityVillager; +import net.minecraft.world.entity.npc.VillagerProfession; +import net.minecraft.world.level.block.BlockBed; +import net.minecraft.world.level.block.state.IBlockData; import org.apache.commons.lang.Validate; import org.bukkit.Location; import org.bukkit.craftbukkit.CraftServer; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillagerZombie.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillagerZombie.java index 2c8f157a9..7734d7ee2 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillagerZombie.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillagerZombie.java @@ -3,10 +3,10 @@ package org.bukkit.craftbukkit.entity; import com.google.common.base.Preconditions; import java.util.Locale; import java.util.UUID; -import net.minecraft.server.EntityZombieVillager; -import net.minecraft.server.IRegistry; -import net.minecraft.server.MinecraftKey; -import net.minecraft.server.MobEffects; +import net.minecraft.core.IRegistry; +import net.minecraft.resources.MinecraftKey; +import net.minecraft.world.effect.MobEffects; +import net.minecraft.world.entity.monster.EntityZombieVillager; import org.apache.commons.lang.Validate; import org.bukkit.Bukkit; import org.bukkit.OfflinePlayer; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVindicator.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVindicator.java index 951d47929..e793820e1 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVindicator.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVindicator.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityVindicator; +import net.minecraft.world.entity.monster.EntityVindicator; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Vindicator; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftWanderingTrader.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftWanderingTrader.java index 21cdd7fa7..c8344ce0a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftWanderingTrader.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftWanderingTrader.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityVillagerTrader; +import net.minecraft.world.entity.npc.EntityVillagerTrader; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.WanderingTrader; @@ -28,11 +28,11 @@ public class CraftWanderingTrader extends CraftAbstractVillager implements Wande @Override public int getDespawnDelay() { - return getHandle().eX(); + return getHandle().getDespawnDelay(); } @Override public void setDespawnDelay(int despawnDelay) { - getHandle().u(despawnDelay); + getHandle().setDespawnDelay(despawnDelay); } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftWaterMob.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftWaterMob.java index 2be883986..4860475cd 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftWaterMob.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftWaterMob.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityWaterAnimal; +import net.minecraft.world.entity.animal.EntityWaterAnimal; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.WaterMob; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftWitch.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftWitch.java index 244e4dc8e..796bd26d4 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftWitch.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftWitch.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityWitch; +import net.minecraft.world.entity.monster.EntityWitch; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Witch; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java index 38b555cc7..7150702d8 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityWither; +import net.minecraft.world.entity.boss.wither.EntityWither; import org.bukkit.boss.BossBar; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.boss.CraftBossBar; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftWitherSkeleton.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftWitherSkeleton.java index a05163039..3f35d939d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftWitherSkeleton.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftWitherSkeleton.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntitySkeletonWither; +import net.minecraft.world.entity.monster.EntitySkeletonWither; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Skeleton.SkeletonType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftWitherSkull.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftWitherSkull.java index 93616809d..5ff783366 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftWitherSkull.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftWitherSkull.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityWitherSkull; +import net.minecraft.world.entity.projectile.EntityWitherSkull; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.WitherSkull; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftWolf.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftWolf.java index 5f3314feb..dc5ba91eb 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftWolf.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftWolf.java @@ -1,7 +1,7 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityWolf; -import net.minecraft.server.EnumColor; +import net.minecraft.world.entity.animal.EntityWolf; +import net.minecraft.world.item.EnumColor; import org.bukkit.DyeColor; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftZoglin.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftZoglin.java index a0e323623..1f776372e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftZoglin.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftZoglin.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityZoglin; +import net.minecraft.world.entity.monster.EntityZoglin; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Zoglin; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java index 2387f17ac..8ba92b7ed 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java @@ -1,8 +1,8 @@ package org.bukkit.craftbukkit.entity; import com.google.common.base.Preconditions; -import net.minecraft.server.EntityZombie; -import net.minecraft.server.EntityZombieVillager; +import net.minecraft.world.entity.monster.EntityZombie; +import net.minecraft.world.entity.monster.EntityZombieVillager; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Villager; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftZombieHorse.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftZombieHorse.java index 5b31b6816..063933dbc 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftZombieHorse.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftZombieHorse.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.EntityHorseZombie; +import net.minecraft.world.entity.animal.horse.EntityHorseZombie; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Horse.Variant; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/memory/CraftMemoryKey.java b/src/main/java/org/bukkit/craftbukkit/entity/memory/CraftMemoryKey.java index fee6bc588..246b5ea80 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/memory/CraftMemoryKey.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/memory/CraftMemoryKey.java @@ -1,7 +1,7 @@ package org.bukkit.craftbukkit.entity.memory; -import net.minecraft.server.IRegistry; -import net.minecraft.server.MemoryModuleType; +import net.minecraft.core.IRegistry; +import net.minecraft.world.entity.ai.memory.MemoryModuleType; import org.bukkit.craftbukkit.util.CraftNamespacedKey; import org.bukkit.entity.memory.MemoryKey; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/memory/CraftMemoryMapper.java b/src/main/java/org/bukkit/craftbukkit/entity/memory/CraftMemoryMapper.java index 0616cdf19..eae0f82bb 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/memory/CraftMemoryMapper.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/memory/CraftMemoryMapper.java @@ -1,8 +1,8 @@ package org.bukkit.craftbukkit.entity.memory; import java.util.UUID; -import net.minecraft.server.BlockPosition; -import net.minecraft.server.GlobalPos; +import net.minecraft.core.BlockPosition; +import net.minecraft.core.GlobalPos; import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.craftbukkit.CraftServer; diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java index 61d406b2c..45e14cfb4 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -12,59 +12,59 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; import javax.annotation.Nullable; -import net.minecraft.server.BlockPosition; -import net.minecraft.server.BlockPropertyInstrument; -import net.minecraft.server.Container; -import net.minecraft.server.ContainerMerchant; -import net.minecraft.server.DamageSource; -import net.minecraft.server.Entity; -import net.minecraft.server.EntityAnimal; -import net.minecraft.server.EntityAreaEffectCloud; -import net.minecraft.server.EntityDamageSource; -import net.minecraft.server.EntityDamageSourceIndirect; -import net.minecraft.server.EntityEnderDragon; -import net.minecraft.server.EntityExperienceOrb; -import net.minecraft.server.EntityFireworks; -import net.minecraft.server.EntityGhast; -import net.minecraft.server.EntityGolem; -import net.minecraft.server.EntityHuman; -import net.minecraft.server.EntityIllagerWizard; -import net.minecraft.server.EntityInsentient; -import net.minecraft.server.EntityItem; -import net.minecraft.server.EntityLiving; -import net.minecraft.server.EntityMonster; -import net.minecraft.server.EntityPlayer; -import net.minecraft.server.EntityPotion; -import net.minecraft.server.EntityRaider; -import net.minecraft.server.EntitySlime; -import net.minecraft.server.EntityStrider; -import net.minecraft.server.EntityTypes; -import net.minecraft.server.EntityVillager; -import net.minecraft.server.EntityWaterAnimal; -import net.minecraft.server.EnumDirection; -import net.minecraft.server.EnumHand; -import net.minecraft.server.Explosion; -import net.minecraft.server.GeneratorAccess; -import net.minecraft.server.IBlockData; -import net.minecraft.server.IInventory; -import net.minecraft.server.IProjectile; -import net.minecraft.server.ItemActionContext; -import net.minecraft.server.ItemStack; -import net.minecraft.server.Items; -import net.minecraft.server.LootContextParameters; -import net.minecraft.server.LootTable; -import net.minecraft.server.LootTableInfo; -import net.minecraft.server.MinecraftKey; -import net.minecraft.server.MobEffect; -import net.minecraft.server.MovingObjectPosition; -import net.minecraft.server.MovingObjectPositionBlock; -import net.minecraft.server.MovingObjectPositionEntity; -import net.minecraft.server.NPC; -import net.minecraft.server.PacketPlayInCloseWindow; -import net.minecraft.server.Raid; -import net.minecraft.server.Unit; -import net.minecraft.server.World; -import net.minecraft.server.WorldServer; +import net.minecraft.core.BlockPosition; +import net.minecraft.core.EnumDirection; +import net.minecraft.network.protocol.game.PacketPlayInCloseWindow; +import net.minecraft.resources.MinecraftKey; +import net.minecraft.server.level.EntityPlayer; +import net.minecraft.server.level.WorldServer; +import net.minecraft.util.Unit; +import net.minecraft.world.EnumHand; +import net.minecraft.world.IInventory; +import net.minecraft.world.damagesource.DamageSource; +import net.minecraft.world.damagesource.EntityDamageSource; +import net.minecraft.world.damagesource.EntityDamageSourceIndirect; +import net.minecraft.world.effect.MobEffect; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.EntityAreaEffectCloud; +import net.minecraft.world.entity.EntityExperienceOrb; +import net.minecraft.world.entity.EntityInsentient; +import net.minecraft.world.entity.EntityLiving; +import net.minecraft.world.entity.EntityTypes; +import net.minecraft.world.entity.animal.EntityAnimal; +import net.minecraft.world.entity.animal.EntityGolem; +import net.minecraft.world.entity.animal.EntityWaterAnimal; +import net.minecraft.world.entity.boss.enderdragon.EntityEnderDragon; +import net.minecraft.world.entity.item.EntityItem; +import net.minecraft.world.entity.monster.EntityGhast; +import net.minecraft.world.entity.monster.EntityIllagerWizard; +import net.minecraft.world.entity.monster.EntityMonster; +import net.minecraft.world.entity.monster.EntitySlime; +import net.minecraft.world.entity.monster.EntityStrider; +import net.minecraft.world.entity.npc.EntityVillager; +import net.minecraft.world.entity.npc.NPC; +import net.minecraft.world.entity.player.EntityHuman; +import net.minecraft.world.entity.projectile.EntityFireworks; +import net.minecraft.world.entity.projectile.EntityPotion; +import net.minecraft.world.entity.projectile.IProjectile; +import net.minecraft.world.entity.raid.EntityRaider; +import net.minecraft.world.entity.raid.Raid; +import net.minecraft.world.inventory.Container; +import net.minecraft.world.inventory.ContainerMerchant; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import net.minecraft.world.item.context.ItemActionContext; +import net.minecraft.world.level.Explosion; +import net.minecraft.world.level.GeneratorAccess; +import net.minecraft.world.level.World; +import net.minecraft.world.level.block.state.IBlockData; +import net.minecraft.world.level.block.state.properties.BlockPropertyInstrument; +import net.minecraft.world.level.storage.loot.LootTable; +import net.minecraft.world.level.storage.loot.LootTableInfo; +import net.minecraft.world.level.storage.loot.parameters.LootContextParameters; +import net.minecraft.world.phys.MovingObjectPosition; +import net.minecraft.world.phys.MovingObjectPositionBlock; +import net.minecraft.world.phys.MovingObjectPositionEntity; import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.NamespacedKey; @@ -398,11 +398,11 @@ public class CraftEventFactory { return (PlayerBucketEmptyEvent) getPlayerBucketEvent(false, world, who, changed, clicked, clickedFace, itemInHand, Items.BUCKET); } - public static PlayerBucketFillEvent callPlayerBucketFillEvent(WorldServer world, EntityHuman who, BlockPosition changed, BlockPosition clicked, EnumDirection clickedFace, ItemStack itemInHand, net.minecraft.server.Item bucket) { + public static PlayerBucketFillEvent callPlayerBucketFillEvent(WorldServer world, EntityHuman who, BlockPosition changed, BlockPosition clicked, EnumDirection clickedFace, ItemStack itemInHand, net.minecraft.world.item.Item bucket) { return (PlayerBucketFillEvent) getPlayerBucketEvent(true, world, who, clicked, changed, clickedFace, itemInHand, bucket); } - private static PlayerEvent getPlayerBucketEvent(boolean isFilling, WorldServer world, EntityHuman who, BlockPosition changed, BlockPosition clicked, EnumDirection clickedFace, ItemStack itemstack, net.minecraft.server.Item item) { + private static PlayerEvent getPlayerBucketEvent(boolean isFilling, WorldServer world, EntityHuman who, BlockPosition changed, BlockPosition clicked, EnumDirection clickedFace, ItemStack itemstack, net.minecraft.world.item.Item item) { Player player = (Player) who.getBukkitEntity(); CraftItemStack itemInHand = CraftItemStack.asNewCraftStack(item); Material bucket = CraftMagicNumbers.getMaterial(itemstack.getItem()); @@ -1009,7 +1009,7 @@ public class CraftEventFactory { return event; } - public static PlayerItemMendEvent callPlayerItemMendEvent(EntityHuman entity, EntityExperienceOrb orb, net.minecraft.server.ItemStack nmsMendedItem, int repairAmount) { + public static PlayerItemMendEvent callPlayerItemMendEvent(EntityHuman entity, EntityExperienceOrb orb, net.minecraft.world.item.ItemStack nmsMendedItem, int repairAmount) { Player player = (Player) entity.getBukkitEntity(); org.bukkit.inventory.ItemStack bukkitStack = CraftItemStack.asCraftMirror(nmsMendedItem); PlayerItemMendEvent event = new PlayerItemMendEvent(player, bukkitStack, (ExperienceOrb) orb.getBukkitEntity(), repairAmount); @@ -1318,7 +1318,7 @@ public class CraftEventFactory { return !event.isCancelled(); } - public static Cancellable handleStatisticsIncrease(EntityHuman entityHuman, net.minecraft.server.Statistic statistic, int current, int newValue) { + public static Cancellable handleStatisticsIncrease(EntityHuman entityHuman, net.minecraft.stats.Statistic statistic, int current, int newValue) { Player player = ((EntityPlayer) entityHuman).getBukkitEntity(); Event event; if (true) { @@ -1351,7 +1351,7 @@ public class CraftEventFactory { if (stat.getType() == Type.UNTYPED) { event = new PlayerStatisticIncrementEvent(player, stat, current, newValue); } else if (stat.getType() == Type.ENTITY) { - EntityType entityType = CraftStatistic.getEntityTypeFromStatistic((net.minecraft.server.Statistic>) statistic); + EntityType entityType = CraftStatistic.getEntityTypeFromStatistic((net.minecraft.stats.Statistic>) statistic); event = new PlayerStatisticIncrementEvent(player, stat, current, newValue, entityType); } else { Material material = CraftStatistic.getMaterialFromStatistic(statistic); diff --git a/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java b/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java index 8191e7c34..3d1591527 100644 --- a/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java +++ b/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java @@ -2,10 +2,10 @@ package org.bukkit.craftbukkit.generator; import java.util.HashSet; import java.util.Set; -import net.minecraft.server.BlockPosition; -import net.minecraft.server.Blocks; -import net.minecraft.server.ChunkSection; -import net.minecraft.server.IBlockData; +import net.minecraft.core.BlockPosition; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.state.IBlockData; +import net.minecraft.world.level.chunk.ChunkSection; import org.bukkit.Material; import org.bukkit.World; import org.bukkit.block.data.BlockData; diff --git a/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java b/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java index 69429e267..3e6d78a1f 100644 --- a/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java +++ b/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java @@ -3,28 +3,28 @@ package org.bukkit.craftbukkit.generator; import com.google.common.base.Preconditions; import com.mojang.serialization.Codec; import java.util.Random; -import net.minecraft.server.BiomeBase; -import net.minecraft.server.BiomeManager; -import net.minecraft.server.BiomeStorage; -import net.minecraft.server.Block; -import net.minecraft.server.BlockPosition; -import net.minecraft.server.ChunkSection; -import net.minecraft.server.DefinedStructureManager; -import net.minecraft.server.GeneratorAccess; -import net.minecraft.server.GeneratorAccessSeed; -import net.minecraft.server.HeightMap; -import net.minecraft.server.IBlockAccess; -import net.minecraft.server.IChunkAccess; -import net.minecraft.server.IRegistry; -import net.minecraft.server.IRegistryCustom; -import net.minecraft.server.ITileEntity; -import net.minecraft.server.ProtoChunk; -import net.minecraft.server.RegionLimitedWorldAccess; -import net.minecraft.server.StructureManager; -import net.minecraft.server.TileEntity; -import net.minecraft.server.WorldChunkManager; -import net.minecraft.server.WorldGenStage; -import net.minecraft.server.WorldServer; +import net.minecraft.core.BlockPosition; +import net.minecraft.core.IRegistry; +import net.minecraft.core.IRegistryCustom; +import net.minecraft.server.level.RegionLimitedWorldAccess; +import net.minecraft.server.level.WorldServer; +import net.minecraft.world.level.GeneratorAccess; +import net.minecraft.world.level.GeneratorAccessSeed; +import net.minecraft.world.level.IBlockAccess; +import net.minecraft.world.level.StructureManager; +import net.minecraft.world.level.biome.BiomeBase; +import net.minecraft.world.level.biome.BiomeManager; +import net.minecraft.world.level.biome.WorldChunkManager; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.ITileEntity; +import net.minecraft.world.level.block.entity.TileEntity; +import net.minecraft.world.level.chunk.BiomeStorage; +import net.minecraft.world.level.chunk.ChunkSection; +import net.minecraft.world.level.chunk.IChunkAccess; +import net.minecraft.world.level.chunk.ProtoChunk; +import net.minecraft.world.level.levelgen.HeightMap; +import net.minecraft.world.level.levelgen.WorldGenStage; +import net.minecraft.world.level.levelgen.structure.templatesystem.DefinedStructureManager; import org.bukkit.block.Biome; import org.bukkit.craftbukkit.block.CraftBlock; import org.bukkit.generator.ChunkGenerator; @@ -33,7 +33,7 @@ import org.bukkit.generator.ChunkGenerator.ChunkData; public class CustomChunkGenerator extends InternalChunkGenerator { - private final net.minecraft.server.ChunkGenerator delegate; + private final net.minecraft.world.level.chunk.ChunkGenerator delegate; private final ChunkGenerator generator; private final WorldServer world; private final Random random = new Random(); @@ -69,7 +69,7 @@ public class CustomChunkGenerator extends InternalChunkGenerator { } } - public CustomChunkGenerator(WorldServer world, net.minecraft.server.ChunkGenerator delegate, ChunkGenerator generator) { + public CustomChunkGenerator(WorldServer world, net.minecraft.world.level.chunk.ChunkGenerator delegate, ChunkGenerator generator) { super(delegate.getWorldChunkManager(), delegate.getSettings()); this.world = world; @@ -208,7 +208,7 @@ public class CustomChunkGenerator extends InternalChunkGenerator { } @Override - protected Codec a() { + protected Codec a() { throw new UnsupportedOperationException("Cannot serialize CustomChunkGenerator"); } } diff --git a/src/main/java/org/bukkit/craftbukkit/generator/InternalChunkGenerator.java b/src/main/java/org/bukkit/craftbukkit/generator/InternalChunkGenerator.java index b595cee49..d9760201f 100644 --- a/src/main/java/org/bukkit/craftbukkit/generator/InternalChunkGenerator.java +++ b/src/main/java/org/bukkit/craftbukkit/generator/InternalChunkGenerator.java @@ -1,10 +1,10 @@ package org.bukkit.craftbukkit.generator; -import net.minecraft.server.StructureSettings; -import net.minecraft.server.WorldChunkManager; +import net.minecraft.world.level.biome.WorldChunkManager; +import net.minecraft.world.level.levelgen.StructureSettings; // Do not implement functions to this class, add to NormalChunkGenerator -public abstract class InternalChunkGenerator extends net.minecraft.server.ChunkGenerator { +public abstract class InternalChunkGenerator extends net.minecraft.world.level.chunk.ChunkGenerator { public InternalChunkGenerator(WorldChunkManager worldchunkmanager, StructureSettings structuresettings) { super(worldchunkmanager, structuresettings); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftBlastingRecipe.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftBlastingRecipe.java index f6e32ca09..120fc8b91 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftBlastingRecipe.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftBlastingRecipe.java @@ -25,6 +25,6 @@ public class CraftBlastingRecipe extends BlastingRecipe implements CraftRecipe { public void addToCraftingManager() { ItemStack result = this.getResult(); - MinecraftServer.getServer().getCraftingManager().addRecipe(new net.minecraft.server.RecipeBlasting(CraftNamespacedKey.toMinecraft(this.getKey()), this.getGroup(), toNMS(this.getInputChoice(), true), CraftItemStack.asNMSCopy(result), getExperience(), getCookingTime())); + MinecraftServer.getServer().getCraftingManager().addRecipe(new net.minecraft.world.item.crafting.RecipeBlasting(CraftNamespacedKey.toMinecraft(this.getKey()), this.getGroup(), toNMS(this.getInputChoice(), true), CraftItemStack.asNMSCopy(result), getExperience(), getCookingTime())); } } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftBlockInventoryHolder.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftBlockInventoryHolder.java index d5149c246..8add96c01 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftBlockInventoryHolder.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftBlockInventoryHolder.java @@ -1,8 +1,8 @@ package org.bukkit.craftbukkit.inventory; -import net.minecraft.server.BlockPosition; -import net.minecraft.server.GeneratorAccess; -import net.minecraft.server.IInventory; +import net.minecraft.core.BlockPosition; +import net.minecraft.world.IInventory; +import net.minecraft.world.level.GeneratorAccess; import org.bukkit.block.Block; import org.bukkit.craftbukkit.block.CraftBlock; import org.bukkit.inventory.BlockInventoryHolder; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftCampfireRecipe.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftCampfireRecipe.java index 5c61cf965..6b8af874a 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftCampfireRecipe.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftCampfireRecipe.java @@ -25,6 +25,6 @@ public class CraftCampfireRecipe extends CampfireRecipe implements CraftRecipe { public void addToCraftingManager() { ItemStack result = this.getResult(); - MinecraftServer.getServer().getCraftingManager().addRecipe(new net.minecraft.server.RecipeCampfire(CraftNamespacedKey.toMinecraft(this.getKey()), this.getGroup(), toNMS(this.getInputChoice(), true), CraftItemStack.asNMSCopy(result), getExperience(), getCookingTime())); + MinecraftServer.getServer().getCraftingManager().addRecipe(new net.minecraft.world.item.crafting.RecipeCampfire(CraftNamespacedKey.toMinecraft(this.getKey()), this.getGroup(), toNMS(this.getInputChoice(), true), CraftItemStack.asNMSCopy(result), getExperience(), getCookingTime())); } } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftComplexRecipe.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftComplexRecipe.java index 5efb0ab75..f27705779 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftComplexRecipe.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftComplexRecipe.java @@ -1,7 +1,7 @@ package org.bukkit.craftbukkit.inventory; -import net.minecraft.server.IRecipeComplex; import net.minecraft.server.MinecraftServer; +import net.minecraft.world.item.crafting.IRecipeComplex; import org.bukkit.NamespacedKey; import org.bukkit.craftbukkit.util.CraftNamespacedKey; import org.bukkit.inventory.ComplexRecipe; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java index 8c714c743..384520dd7 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java @@ -1,34 +1,34 @@ package org.bukkit.craftbukkit.inventory; -import net.minecraft.server.ChatComponentText; -import net.minecraft.server.Container; -import net.minecraft.server.ContainerAnvil; -import net.minecraft.server.ContainerBeacon; -import net.minecraft.server.ContainerBlastFurnace; -import net.minecraft.server.ContainerBrewingStand; -import net.minecraft.server.ContainerCartography; -import net.minecraft.server.ContainerChest; -import net.minecraft.server.ContainerDispenser; -import net.minecraft.server.ContainerEnchantTable; -import net.minecraft.server.ContainerFurnaceFurnace; -import net.minecraft.server.ContainerGrindstone; -import net.minecraft.server.ContainerHopper; -import net.minecraft.server.ContainerLectern; -import net.minecraft.server.ContainerLoom; -import net.minecraft.server.ContainerMerchant; -import net.minecraft.server.ContainerProperties; -import net.minecraft.server.ContainerShulkerBox; -import net.minecraft.server.ContainerSmithing; -import net.minecraft.server.ContainerSmoker; -import net.minecraft.server.ContainerStonecutter; -import net.minecraft.server.ContainerWorkbench; -import net.minecraft.server.Containers; -import net.minecraft.server.EntityHuman; -import net.minecraft.server.IInventory; -import net.minecraft.server.ItemStack; -import net.minecraft.server.PacketPlayOutOpenWindow; -import net.minecraft.server.PlayerInventory; -import net.minecraft.server.Slot; +import net.minecraft.network.chat.ChatComponentText; +import net.minecraft.network.protocol.game.PacketPlayOutOpenWindow; +import net.minecraft.world.IInventory; +import net.minecraft.world.entity.player.EntityHuman; +import net.minecraft.world.entity.player.PlayerInventory; +import net.minecraft.world.inventory.Container; +import net.minecraft.world.inventory.ContainerAnvil; +import net.minecraft.world.inventory.ContainerBeacon; +import net.minecraft.world.inventory.ContainerBlastFurnace; +import net.minecraft.world.inventory.ContainerBrewingStand; +import net.minecraft.world.inventory.ContainerCartography; +import net.minecraft.world.inventory.ContainerChest; +import net.minecraft.world.inventory.ContainerDispenser; +import net.minecraft.world.inventory.ContainerEnchantTable; +import net.minecraft.world.inventory.ContainerFurnaceFurnace; +import net.minecraft.world.inventory.ContainerGrindstone; +import net.minecraft.world.inventory.ContainerHopper; +import net.minecraft.world.inventory.ContainerLectern; +import net.minecraft.world.inventory.ContainerLoom; +import net.minecraft.world.inventory.ContainerMerchant; +import net.minecraft.world.inventory.ContainerProperties; +import net.minecraft.world.inventory.ContainerShulkerBox; +import net.minecraft.world.inventory.ContainerSmithing; +import net.minecraft.world.inventory.ContainerSmoker; +import net.minecraft.world.inventory.ContainerStonecutter; +import net.minecraft.world.inventory.ContainerWorkbench; +import net.minecraft.world.inventory.Containers; +import net.minecraft.world.inventory.Slot; +import net.minecraft.world.item.ItemStack; import org.bukkit.craftbukkit.entity.CraftPlayer; import org.bukkit.entity.HumanEntity; import org.bukkit.event.inventory.InventoryType; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftEntityEquipment.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftEntityEquipment.java index 9052fc15c..27e0e2767 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftEntityEquipment.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftEntityEquipment.java @@ -1,8 +1,8 @@ package org.bukkit.craftbukkit.inventory; import com.google.common.base.Preconditions; -import net.minecraft.server.EntityInsentient; -import net.minecraft.server.EnumItemSlot; +import net.minecraft.world.entity.EntityInsentient; +import net.minecraft.world.entity.EnumItemSlot; import org.bukkit.craftbukkit.CraftEquipmentSlot; import org.bukkit.craftbukkit.entity.CraftLivingEntity; import org.bukkit.entity.Entity; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftFurnaceRecipe.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftFurnaceRecipe.java index fddae1a78..3f3e66bb5 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftFurnaceRecipe.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftFurnaceRecipe.java @@ -25,6 +25,6 @@ public class CraftFurnaceRecipe extends FurnaceRecipe implements CraftRecipe { public void addToCraftingManager() { ItemStack result = this.getResult(); - MinecraftServer.getServer().getCraftingManager().addRecipe(new net.minecraft.server.FurnaceRecipe(CraftNamespacedKey.toMinecraft(this.getKey()), this.getGroup(), toNMS(this.getInputChoice(), true), CraftItemStack.asNMSCopy(result), getExperience(), getCookingTime())); + MinecraftServer.getServer().getCraftingManager().addRecipe(new net.minecraft.world.item.crafting.FurnaceRecipe(CraftNamespacedKey.toMinecraft(this.getKey()), this.getGroup(), toNMS(this.getInputChoice(), true), CraftItemStack.asNMSCopy(result), getExperience(), getCookingTime())); } } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java index 28b8f5f61..4211bdfb2 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java @@ -3,21 +3,21 @@ package org.bukkit.craftbukkit.inventory; import java.util.HashMap; import java.util.List; import java.util.ListIterator; -import net.minecraft.server.IHopper; -import net.minecraft.server.IInventory; -import net.minecraft.server.InventoryCrafting; -import net.minecraft.server.InventoryEnderChest; -import net.minecraft.server.InventoryMerchant; -import net.minecraft.server.PlayerInventory; -import net.minecraft.server.TileEntityBarrel; -import net.minecraft.server.TileEntityBlastFurnace; -import net.minecraft.server.TileEntityBrewingStand; -import net.minecraft.server.TileEntityDispenser; -import net.minecraft.server.TileEntityDropper; -import net.minecraft.server.TileEntityFurnace; -import net.minecraft.server.TileEntityLectern; -import net.minecraft.server.TileEntityShulkerBox; -import net.minecraft.server.TileEntitySmoker; +import net.minecraft.world.IInventory; +import net.minecraft.world.entity.player.PlayerInventory; +import net.minecraft.world.inventory.InventoryCrafting; +import net.minecraft.world.inventory.InventoryEnderChest; +import net.minecraft.world.inventory.InventoryMerchant; +import net.minecraft.world.level.block.entity.IHopper; +import net.minecraft.world.level.block.entity.TileEntityBarrel; +import net.minecraft.world.level.block.entity.TileEntityBlastFurnace; +import net.minecraft.world.level.block.entity.TileEntityBrewingStand; +import net.minecraft.world.level.block.entity.TileEntityDispenser; +import net.minecraft.world.level.block.entity.TileEntityDropper; +import net.minecraft.world.level.block.entity.TileEntityFurnace; +import net.minecraft.world.level.block.entity.TileEntityLectern; +import net.minecraft.world.level.block.entity.TileEntityShulkerBox; +import net.minecraft.world.level.block.entity.TileEntitySmoker; import org.apache.commons.lang.Validate; import org.bukkit.Location; import org.bukkit.Material; @@ -46,16 +46,16 @@ public class CraftInventory implements Inventory { @Override public ItemStack getItem(int index) { - net.minecraft.server.ItemStack item = getInventory().getItem(index); + net.minecraft.world.item.ItemStack item = getInventory().getItem(index); return item.isEmpty() ? null : CraftItemStack.asCraftMirror(item); } - protected ItemStack[] asCraftMirror(List mcItems) { + protected ItemStack[] asCraftMirror(List mcItems) { int size = mcItems.size(); ItemStack[] items = new ItemStack[size]; for (int i = 0; i < size; i++) { - net.minecraft.server.ItemStack mcItem = mcItems.get(i); + net.minecraft.world.item.ItemStack mcItem = mcItems.get(i); items[i] = (mcItem.isEmpty()) ? null : CraftItemStack.asCraftMirror(mcItem); } @@ -74,7 +74,7 @@ public class CraftInventory implements Inventory { @Override public ItemStack[] getContents() { - List mcItems = getInventory().getContents(); + List mcItems = getInventory().getContents(); return asCraftMirror(mcItems); } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryAbstractHorse.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryAbstractHorse.java index b7793caa2..add8d95b9 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryAbstractHorse.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryAbstractHorse.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.inventory; -import net.minecraft.server.IInventory; +import net.minecraft.world.IInventory; import org.bukkit.inventory.AbstractHorseInventory; import org.bukkit.inventory.ItemStack; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryAnvil.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryAnvil.java index 9374c2706..fd59f77d7 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryAnvil.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryAnvil.java @@ -1,8 +1,8 @@ package org.bukkit.craftbukkit.inventory; import com.google.common.base.Preconditions; -import net.minecraft.server.ContainerAnvil; -import net.minecraft.server.IInventory; +import net.minecraft.world.IInventory; +import net.minecraft.world.inventory.ContainerAnvil; import org.bukkit.Location; import org.bukkit.inventory.AnvilInventory; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryBeacon.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryBeacon.java index 163c572ca..7fa1184ef 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryBeacon.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryBeacon.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.inventory; -import net.minecraft.server.IInventory; +import net.minecraft.world.IInventory; import org.bukkit.inventory.BeaconInventory; import org.bukkit.inventory.ItemStack; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryBrewer.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryBrewer.java index 5fa833041..6aaf363e7 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryBrewer.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryBrewer.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.inventory; -import net.minecraft.server.IInventory; +import net.minecraft.world.IInventory; import org.bukkit.block.BrewingStand; import org.bukkit.inventory.BrewerInventory; import org.bukkit.inventory.ItemStack; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCartography.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCartography.java index 9458de90e..5829745e3 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCartography.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCartography.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.inventory; -import net.minecraft.server.IInventory; +import net.minecraft.world.IInventory; import org.bukkit.inventory.CartographyInventory; public class CraftInventoryCartography extends CraftResultInventory implements CartographyInventory { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCrafting.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCrafting.java index 3cf4cd5fa..323eb1926 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCrafting.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCrafting.java @@ -2,8 +2,8 @@ package org.bukkit.craftbukkit.inventory; import java.util.Arrays; import java.util.List; -import net.minecraft.server.IInventory; -import net.minecraft.server.IRecipe; +import net.minecraft.world.IInventory; +import net.minecraft.world.item.crafting.IRecipe; import org.bukkit.inventory.CraftingInventory; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.Recipe; @@ -40,14 +40,14 @@ public class CraftInventoryCrafting extends CraftInventory implements CraftingIn @Override public ItemStack[] getContents() { ItemStack[] items = new ItemStack[getSize()]; - List mcResultItems = getResultInventory().getContents(); + List mcResultItems = getResultInventory().getContents(); int i = 0; for (i = 0; i < mcResultItems.size(); i++) { items[i] = CraftItemStack.asCraftMirror(mcResultItems.get(i)); } - List mcItems = getMatrixInventory().getContents(); + List mcItems = getMatrixInventory().getContents(); for (int j = 0; j < mcItems.size(); j++) { items[i + j] = CraftItemStack.asCraftMirror(mcItems.get(j)); @@ -64,10 +64,10 @@ public class CraftInventoryCrafting extends CraftInventory implements CraftingIn @Override public CraftItemStack getItem(int index) { if (index < getResultInventory().getSize()) { - net.minecraft.server.ItemStack item = getResultInventory().getItem(index); + net.minecraft.world.item.ItemStack item = getResultInventory().getItem(index); return item.isEmpty() ? null : CraftItemStack.asCraftMirror(item); } else { - net.minecraft.server.ItemStack item = getMatrixInventory().getItem(index - getResultInventory().getSize()); + net.minecraft.world.item.ItemStack item = getMatrixInventory().getItem(index - getResultInventory().getSize()); return item.isEmpty() ? null : CraftItemStack.asCraftMirror(item); } } @@ -83,14 +83,14 @@ public class CraftInventoryCrafting extends CraftInventory implements CraftingIn @Override public ItemStack[] getMatrix() { - List matrix = getMatrixInventory().getContents(); + List matrix = getMatrixInventory().getContents(); return asCraftMirror(matrix); } @Override public ItemStack getResult() { - net.minecraft.server.ItemStack item = getResultInventory().getItem(0); + net.minecraft.world.item.ItemStack item = getResultInventory().getItem(0); if (!item.isEmpty()) return CraftItemStack.asCraftMirror(item); return null; } @@ -105,14 +105,14 @@ public class CraftInventoryCrafting extends CraftInventory implements CraftingIn if (i < contents.length) { getMatrixInventory().setItem(i, CraftItemStack.asNMSCopy(contents[i])); } else { - getMatrixInventory().setItem(i, net.minecraft.server.ItemStack.b); + getMatrixInventory().setItem(i, net.minecraft.world.item.ItemStack.b); } } } @Override public void setResult(ItemStack item) { - List contents = getResultInventory().getContents(); + List contents = getResultInventory().getContents(); contents.set(0, CraftItemStack.asNMSCopy(item)); } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java index e1dfdb23f..a537cc4ac 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java @@ -3,10 +3,10 @@ package org.bukkit.craftbukkit.inventory; import java.util.ArrayList; import java.util.Iterator; import java.util.List; -import net.minecraft.server.EntityHuman; -import net.minecraft.server.IInventory; -import net.minecraft.server.ItemStack; -import net.minecraft.server.NonNullList; +import net.minecraft.core.NonNullList; +import net.minecraft.world.IInventory; +import net.minecraft.world.entity.player.EntityHuman; +import net.minecraft.world.item.ItemStack; import org.apache.commons.lang.Validate; import org.bukkit.Location; import org.bukkit.craftbukkit.entity.CraftHumanEntity; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryDoubleChest.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryDoubleChest.java index e917db0b0..47029af76 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryDoubleChest.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryDoubleChest.java @@ -1,8 +1,8 @@ package org.bukkit.craftbukkit.inventory; -import net.minecraft.server.BlockChest; -import net.minecraft.server.ITileInventory; -import net.minecraft.server.InventoryLargeChest; +import net.minecraft.world.ITileInventory; +import net.minecraft.world.InventoryLargeChest; +import net.minecraft.world.level.block.BlockChest; import org.bukkit.Location; import org.bukkit.block.DoubleChest; import org.bukkit.inventory.DoubleChestInventory; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryEnchanting.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryEnchanting.java index 4d4323da2..34f6d0583 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryEnchanting.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryEnchanting.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.inventory; -import net.minecraft.server.IInventory; +import net.minecraft.world.IInventory; import org.bukkit.inventory.EnchantingInventory; import org.bukkit.inventory.ItemStack; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryFurnace.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryFurnace.java index 8ff7daa1d..09779f999 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryFurnace.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryFurnace.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.inventory; -import net.minecraft.server.TileEntityFurnace; +import net.minecraft.world.level.block.entity.TileEntityFurnace; import org.bukkit.block.Furnace; import org.bukkit.inventory.FurnaceInventory; import org.bukkit.inventory.ItemStack; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryGrindstone.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryGrindstone.java index ce89ce764..6a128d638 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryGrindstone.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryGrindstone.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.inventory; -import net.minecraft.server.IInventory; +import net.minecraft.world.IInventory; import org.bukkit.inventory.GrindstoneInventory; public class CraftInventoryGrindstone extends CraftResultInventory implements GrindstoneInventory { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryHorse.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryHorse.java index 63991bf4b..c3599b29c 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryHorse.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryHorse.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.inventory; -import net.minecraft.server.IInventory; +import net.minecraft.world.IInventory; import org.bukkit.inventory.HorseInventory; import org.bukkit.inventory.ItemStack; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryLectern.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryLectern.java index f60ed85ef..8d8aaffd6 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryLectern.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryLectern.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.inventory; -import net.minecraft.server.IInventory; +import net.minecraft.world.IInventory; import org.bukkit.block.Lectern; import org.bukkit.inventory.LecternInventory; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryLlama.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryLlama.java index c910f5e9c..ee10a79b6 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryLlama.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryLlama.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.inventory; -import net.minecraft.server.IInventory; +import net.minecraft.world.IInventory; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.LlamaInventory; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryLoom.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryLoom.java index d3c541799..2c6ab7d54 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryLoom.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryLoom.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.inventory; -import net.minecraft.server.IInventory; +import net.minecraft.world.IInventory; import org.bukkit.inventory.LoomInventory; public class CraftInventoryLoom extends CraftResultInventory implements LoomInventory { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryMerchant.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryMerchant.java index 3b40adcf5..6863e220d 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryMerchant.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryMerchant.java @@ -1,7 +1,7 @@ package org.bukkit.craftbukkit.inventory; -import net.minecraft.server.IMerchant; -import net.minecraft.server.InventoryMerchant; +import net.minecraft.world.inventory.InventoryMerchant; +import net.minecraft.world.item.trading.IMerchant; import org.bukkit.inventory.Merchant; import org.bukkit.inventory.MerchantInventory; import org.bukkit.inventory.MerchantRecipe; @@ -22,7 +22,7 @@ public class CraftInventoryMerchant extends CraftInventory implements MerchantIn @Override public MerchantRecipe getSelectedRecipe() { - net.minecraft.server.MerchantRecipe nmsRecipe = getInventory().getRecipe(); + net.minecraft.world.item.trading.MerchantRecipe nmsRecipe = getInventory().getRecipe(); return (nmsRecipe == null) ? null : nmsRecipe.asBukkit(); } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java index 9d894c508..b812e1af4 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java @@ -1,10 +1,10 @@ package org.bukkit.craftbukkit.inventory; import com.google.common.base.Preconditions; -import net.minecraft.server.EntityPlayer; -import net.minecraft.server.PacketPlayOutHeldItemSlot; -import net.minecraft.server.PacketPlayOutSetSlot; -import net.minecraft.server.PlayerInventory; +import net.minecraft.network.protocol.game.PacketPlayOutHeldItemSlot; +import net.minecraft.network.protocol.game.PacketPlayOutSetSlot; +import net.minecraft.server.level.EntityPlayer; +import net.minecraft.world.entity.player.PlayerInventory; import org.apache.commons.lang.Validate; import org.bukkit.craftbukkit.entity.CraftPlayer; import org.bukkit.entity.HumanEntity; @@ -13,7 +13,7 @@ import org.bukkit.inventory.EquipmentSlot; import org.bukkit.inventory.ItemStack; public class CraftInventoryPlayer extends CraftInventory implements org.bukkit.inventory.PlayerInventory, EntityEquipment { - public CraftInventoryPlayer(net.minecraft.server.PlayerInventory inventory) { + public CraftInventoryPlayer(net.minecraft.world.entity.player.PlayerInventory inventory) { super(inventory); } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventorySmithing.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventorySmithing.java index d577c1754..4c540c8e3 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventorySmithing.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventorySmithing.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.inventory; -import net.minecraft.server.IInventory; +import net.minecraft.world.IInventory; import org.bukkit.Location; import org.bukkit.inventory.SmithingInventory; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryStonecutter.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryStonecutter.java index e4135b679..016aa57b3 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryStonecutter.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryStonecutter.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.inventory; -import net.minecraft.server.IInventory; +import net.minecraft.world.IInventory; import org.bukkit.inventory.StonecutterInventory; public class CraftInventoryStonecutter extends CraftResultInventory implements StonecutterInventory { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java index 4c6492a92..04073ed45 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.inventory; -import net.minecraft.server.Container; +import net.minecraft.world.inventory.Container; import org.bukkit.GameMode; import org.bukkit.craftbukkit.entity.CraftHumanEntity; import org.bukkit.craftbukkit.util.CraftChatMessage; @@ -48,7 +48,7 @@ public class CraftInventoryView extends InventoryView { @Override public void setItem(int slot, ItemStack item) { - net.minecraft.server.ItemStack stack = CraftItemStack.asNMSCopy(item); + net.minecraft.world.item.ItemStack stack = CraftItemStack.asNMSCopy(item); if (slot >= 0) { container.getSlot(slot).set(stack); } else { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java index 62cdb32a6..52fa8a385 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -3,10 +3,10 @@ package org.bukkit.craftbukkit.inventory; import static org.bukkit.craftbukkit.inventory.CraftMetaItem.*; import com.google.common.collect.ImmutableMap; import java.util.Map; -import net.minecraft.server.EnchantmentManager; -import net.minecraft.server.Item; -import net.minecraft.server.NBTTagCompound; -import net.minecraft.server.NBTTagList; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.enchantment.EnchantmentManager; import org.apache.commons.lang.Validate; import org.bukkit.Material; import org.bukkit.configuration.serialization.DelegateDeserialization; @@ -22,30 +22,30 @@ import org.bukkit.material.MaterialData; @DelegateDeserialization(ItemStack.class) public final class CraftItemStack extends ItemStack { - public static net.minecraft.server.ItemStack asNMSCopy(ItemStack original) { + public static net.minecraft.world.item.ItemStack asNMSCopy(ItemStack original) { if (original instanceof CraftItemStack) { CraftItemStack stack = (CraftItemStack) original; - return stack.handle == null ? net.minecraft.server.ItemStack.b : stack.handle.cloneItemStack(); + return stack.handle == null ? net.minecraft.world.item.ItemStack.b : stack.handle.cloneItemStack(); } if (original == null || original.getType() == Material.AIR) { - return net.minecraft.server.ItemStack.b; + return net.minecraft.world.item.ItemStack.b; } Item item = CraftMagicNumbers.getItem(original.getType(), original.getDurability()); if (item == null) { - return net.minecraft.server.ItemStack.b; + return net.minecraft.world.item.ItemStack.b; } - net.minecraft.server.ItemStack stack = new net.minecraft.server.ItemStack(item, original.getAmount()); + net.minecraft.world.item.ItemStack stack = new net.minecraft.world.item.ItemStack(item, original.getAmount()); if (original.hasItemMeta()) { setItemMeta(stack, original.getItemMeta()); } return stack; } - public static net.minecraft.server.ItemStack copyNMSStack(net.minecraft.server.ItemStack original, int amount) { - net.minecraft.server.ItemStack stack = original.cloneItemStack(); + public static net.minecraft.world.item.ItemStack copyNMSStack(net.minecraft.world.item.ItemStack original, int amount) { + net.minecraft.world.item.ItemStack stack = original.cloneItemStack(); stack.setCount(amount); return stack; } @@ -53,7 +53,7 @@ public final class CraftItemStack extends ItemStack { /** * Copies the NMS stack to return as a strictly-Bukkit stack */ - public static ItemStack asBukkitCopy(net.minecraft.server.ItemStack original) { + public static ItemStack asBukkitCopy(net.minecraft.world.item.ItemStack original) { if (original.isEmpty()) { return new ItemStack(Material.AIR); } @@ -64,7 +64,7 @@ public final class CraftItemStack extends ItemStack { return stack; } - public static CraftItemStack asCraftMirror(net.minecraft.server.ItemStack original) { + public static CraftItemStack asCraftMirror(net.minecraft.world.item.ItemStack original) { return new CraftItemStack((original == null || original.isEmpty()) ? null : original); } @@ -84,12 +84,12 @@ public final class CraftItemStack extends ItemStack { return new CraftItemStack(CraftMagicNumbers.getMaterial(item), amount, (short) 0, null); } - net.minecraft.server.ItemStack handle; + net.minecraft.world.item.ItemStack handle; /** * Mirror */ - private CraftItemStack(net.minecraft.server.ItemStack item) { + private CraftItemStack(net.minecraft.world.item.ItemStack item) { this.handle = item; } @@ -123,7 +123,7 @@ public final class CraftItemStack extends ItemStack { } else if (CraftMagicNumbers.getItem(type) == null) { // :( handle = null; } else if (handle == null) { - handle = new net.minecraft.server.ItemStack(CraftMagicNumbers.getItem(type), 1); + handle = new net.minecraft.world.item.ItemStack(CraftMagicNumbers.getItem(type), 1); } else { handle.setItem(CraftMagicNumbers.getItem(type)); if (hasItemMeta()) { @@ -201,7 +201,7 @@ public final class CraftItemStack extends ItemStack { list.add(tag); } - static boolean makeTag(net.minecraft.server.ItemStack item) { + static boolean makeTag(net.minecraft.world.item.ItemStack item) { if (item == null) { return false; } @@ -277,7 +277,7 @@ public final class CraftItemStack extends ItemStack { return getEnchantments(handle); } - static Map getEnchantments(net.minecraft.server.ItemStack item) { + static Map getEnchantments(net.minecraft.world.item.ItemStack item) { NBTTagList list = (item != null && item.hasEnchantments()) ? item.getEnchantments() : null; if (list == null || list.size() == 0) { @@ -299,7 +299,7 @@ public final class CraftItemStack extends ItemStack { return result.build(); } - static NBTTagList getEnchantmentList(net.minecraft.server.ItemStack item) { + static NBTTagList getEnchantmentList(net.minecraft.world.item.ItemStack item) { return (item != null && item.hasEnchantments()) ? item.getEnchantments() : null; } @@ -317,7 +317,7 @@ public final class CraftItemStack extends ItemStack { return getItemMeta(handle); } - public static ItemMeta getItemMeta(net.minecraft.server.ItemStack item) { + public static ItemMeta getItemMeta(net.minecraft.world.item.ItemStack item) { if (!hasItemMeta(item)) { return CraftItemFactory.instance().getItemMeta(getType(item)); } @@ -541,7 +541,7 @@ public final class CraftItemStack extends ItemStack { } } - static Material getType(net.minecraft.server.ItemStack item) { + static Material getType(net.minecraft.world.item.ItemStack item) { return item == null ? Material.AIR : CraftMagicNumbers.getMaterial(item.getItem()); } @@ -550,7 +550,7 @@ public final class CraftItemStack extends ItemStack { return setItemMeta(handle, itemMeta); } - public static boolean setItemMeta(net.minecraft.server.ItemStack item, ItemMeta itemMeta) { + public static boolean setItemMeta(net.minecraft.world.item.ItemStack item, ItemMeta itemMeta) { if (item == null) { return false; } @@ -615,7 +615,7 @@ public final class CraftItemStack extends ItemStack { return hasItemMeta(handle) && !CraftItemFactory.instance().equals(getItemMeta(), null); } - static boolean hasItemMeta(net.minecraft.server.ItemStack item) { + static boolean hasItemMeta(net.minecraft.world.item.ItemStack item) { return !(item == null || item.getTag() == null || item.getTag().isEmpty()); } } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchant.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchant.java index 50bc720d4..00d43e4a7 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchant.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchant.java @@ -4,9 +4,9 @@ import com.google.common.base.Function; import com.google.common.collect.Lists; import java.util.Collections; import java.util.List; -import net.minecraft.server.EntityHuman; -import net.minecraft.server.IMerchant; -import net.minecraft.server.MerchantRecipeList; +import net.minecraft.world.entity.player.EntityHuman; +import net.minecraft.world.item.trading.IMerchant; +import net.minecraft.world.item.trading.MerchantRecipeList; import org.bukkit.entity.HumanEntity; import org.bukkit.inventory.Merchant; import org.bukkit.inventory.MerchantRecipe; @@ -25,9 +25,9 @@ public class CraftMerchant implements Merchant { @Override public List getRecipes() { - return Collections.unmodifiableList(Lists.transform(merchant.getOffers(), new Function() { + return Collections.unmodifiableList(Lists.transform(merchant.getOffers(), new Function() { @Override - public MerchantRecipe apply(net.minecraft.server.MerchantRecipe recipe) { + public MerchantRecipe apply(net.minecraft.world.item.trading.MerchantRecipe recipe) { return recipe.asBukkit(); } })); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java index 9f6e797d3..ef10c7ab1 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java @@ -1,15 +1,15 @@ package org.bukkit.craftbukkit.inventory; -import net.minecraft.server.ChatComponentText; -import net.minecraft.server.EntityHuman; -import net.minecraft.server.IChatBaseComponent; -import net.minecraft.server.IMerchant; -import net.minecraft.server.ItemStack; -import net.minecraft.server.MerchantRecipe; -import net.minecraft.server.MerchantRecipeList; -import net.minecraft.server.SoundEffect; -import net.minecraft.server.SoundEffects; -import net.minecraft.server.World; +import net.minecraft.network.chat.ChatComponentText; +import net.minecraft.network.chat.IChatBaseComponent; +import net.minecraft.sounds.SoundEffect; +import net.minecraft.sounds.SoundEffects; +import net.minecraft.world.entity.player.EntityHuman; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.trading.IMerchant; +import net.minecraft.world.item.trading.MerchantRecipe; +import net.minecraft.world.item.trading.MerchantRecipeList; +import net.minecraft.world.level.World; import org.apache.commons.lang.Validate; public class CraftMerchantCustom extends CraftMerchant { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantRecipe.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantRecipe.java index e19825161..e3b9a0ebe 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantRecipe.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantRecipe.java @@ -7,9 +7,9 @@ import org.bukkit.inventory.MerchantRecipe; public class CraftMerchantRecipe extends MerchantRecipe { - private final net.minecraft.server.MerchantRecipe handle; + private final net.minecraft.world.item.trading.MerchantRecipe handle; - public CraftMerchantRecipe(net.minecraft.server.MerchantRecipe merchantRecipe) { + public CraftMerchantRecipe(net.minecraft.world.item.trading.MerchantRecipe merchantRecipe) { super(CraftItemStack.asBukkitCopy(merchantRecipe.sellingItem), 0); this.handle = merchantRecipe; addIngredient(CraftItemStack.asBukkitCopy(merchantRecipe.buyingItem1)); @@ -18,9 +18,9 @@ public class CraftMerchantRecipe extends MerchantRecipe { public CraftMerchantRecipe(ItemStack result, int uses, int maxUses, boolean experienceReward, int experience, float priceMultiplier) { super(result, uses, maxUses, experienceReward, experience, priceMultiplier); - this.handle = new net.minecraft.server.MerchantRecipe( - net.minecraft.server.ItemStack.b, - net.minecraft.server.ItemStack.b, + this.handle = new net.minecraft.world.item.trading.MerchantRecipe( + net.minecraft.world.item.ItemStack.b, + net.minecraft.world.item.ItemStack.b, CraftItemStack.asNMSCopy(result), uses, maxUses, @@ -81,7 +81,7 @@ public class CraftMerchantRecipe extends MerchantRecipe { handle.priceMultiplier = priceMultiplier; } - public net.minecraft.server.MerchantRecipe toMinecraft() { + public net.minecraft.world.item.trading.MerchantRecipe toMinecraft() { List ingredients = getIngredients(); Preconditions.checkState(!ingredients.isEmpty(), "No offered ingredients"); handle.buyingItem1 = CraftItemStack.asNMSCopy(ingredients.get(0)); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java index 9be4f8d56..c593499ae 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java @@ -2,8 +2,8 @@ package org.bukkit.craftbukkit.inventory; import com.google.common.collect.ImmutableMap.Builder; import java.util.Map; -import net.minecraft.server.NBTBase; -import net.minecraft.server.NBTTagCompound; +import net.minecraft.nbt.NBTBase; +import net.minecraft.nbt.NBTTagCompound; import org.bukkit.Material; import org.bukkit.configuration.serialization.DelegateDeserialization; import org.bukkit.craftbukkit.inventory.CraftMetaItem.ItemMetaKey; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java index 1c1fac698..27e7d7919 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java @@ -5,8 +5,8 @@ import com.google.common.collect.ImmutableMap; import java.util.ArrayList; import java.util.List; import java.util.Map; -import net.minecraft.server.NBTTagCompound; -import net.minecraft.server.NBTTagList; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; import org.bukkit.DyeColor; import org.bukkit.Material; import org.bukkit.block.banner.Pattern; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java index b7a574cc6..d003a2e5d 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java @@ -3,38 +3,38 @@ package org.bukkit.craftbukkit.inventory; import com.google.common.base.Objects; import com.google.common.collect.ImmutableMap; import java.util.Map; -import net.minecraft.server.EnumColor; -import net.minecraft.server.NBTBase; -import net.minecraft.server.NBTTagCompound; -import net.minecraft.server.TileEntity; -import net.minecraft.server.TileEntityBanner; -import net.minecraft.server.TileEntityBarrel; -import net.minecraft.server.TileEntityBeacon; -import net.minecraft.server.TileEntityBeehive; -import net.minecraft.server.TileEntityBell; -import net.minecraft.server.TileEntityBlastFurnace; -import net.minecraft.server.TileEntityBrewingStand; -import net.minecraft.server.TileEntityCampfire; -import net.minecraft.server.TileEntityChest; -import net.minecraft.server.TileEntityCommand; -import net.minecraft.server.TileEntityComparator; -import net.minecraft.server.TileEntityDispenser; -import net.minecraft.server.TileEntityDropper; -import net.minecraft.server.TileEntityEnchantTable; -import net.minecraft.server.TileEntityEndGateway; -import net.minecraft.server.TileEntityEnderChest; -import net.minecraft.server.TileEntityFurnaceFurnace; -import net.minecraft.server.TileEntityHopper; -import net.minecraft.server.TileEntityJigsaw; -import net.minecraft.server.TileEntityJukeBox; -import net.minecraft.server.TileEntityLectern; -import net.minecraft.server.TileEntityLightDetector; -import net.minecraft.server.TileEntityMobSpawner; -import net.minecraft.server.TileEntityShulkerBox; -import net.minecraft.server.TileEntitySign; -import net.minecraft.server.TileEntitySkull; -import net.minecraft.server.TileEntitySmoker; -import net.minecraft.server.TileEntityStructure; +import net.minecraft.nbt.NBTBase; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.item.EnumColor; +import net.minecraft.world.level.block.entity.TileEntity; +import net.minecraft.world.level.block.entity.TileEntityBanner; +import net.minecraft.world.level.block.entity.TileEntityBarrel; +import net.minecraft.world.level.block.entity.TileEntityBeacon; +import net.minecraft.world.level.block.entity.TileEntityBeehive; +import net.minecraft.world.level.block.entity.TileEntityBell; +import net.minecraft.world.level.block.entity.TileEntityBlastFurnace; +import net.minecraft.world.level.block.entity.TileEntityBrewingStand; +import net.minecraft.world.level.block.entity.TileEntityCampfire; +import net.minecraft.world.level.block.entity.TileEntityChest; +import net.minecraft.world.level.block.entity.TileEntityCommand; +import net.minecraft.world.level.block.entity.TileEntityComparator; +import net.minecraft.world.level.block.entity.TileEntityDispenser; +import net.minecraft.world.level.block.entity.TileEntityDropper; +import net.minecraft.world.level.block.entity.TileEntityEnchantTable; +import net.minecraft.world.level.block.entity.TileEntityEndGateway; +import net.minecraft.world.level.block.entity.TileEntityEnderChest; +import net.minecraft.world.level.block.entity.TileEntityFurnaceFurnace; +import net.minecraft.world.level.block.entity.TileEntityHopper; +import net.minecraft.world.level.block.entity.TileEntityJigsaw; +import net.minecraft.world.level.block.entity.TileEntityJukeBox; +import net.minecraft.world.level.block.entity.TileEntityLectern; +import net.minecraft.world.level.block.entity.TileEntityLightDetector; +import net.minecraft.world.level.block.entity.TileEntityMobSpawner; +import net.minecraft.world.level.block.entity.TileEntityShulkerBox; +import net.minecraft.world.level.block.entity.TileEntitySign; +import net.minecraft.world.level.block.entity.TileEntitySkull; +import net.minecraft.world.level.block.entity.TileEntitySmoker; +import net.minecraft.world.level.block.entity.TileEntityStructure; import org.apache.commons.lang.Validate; import org.bukkit.Material; import org.bukkit.block.BlockState; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java index 25df428b5..ef61d0233 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java @@ -8,10 +8,10 @@ import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.Objects; -import net.minecraft.server.IChatBaseComponent; -import net.minecraft.server.NBTTagCompound; -import net.minecraft.server.NBTTagList; -import net.minecraft.server.NBTTagString; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.nbt.NBTTagString; +import net.minecraft.network.chat.IChatBaseComponent; import org.apache.commons.lang.Validate; import org.bukkit.Material; import org.bukkit.configuration.serialization.DelegateDeserialization; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java index 0bd396ebe..0835541f5 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java @@ -2,7 +2,7 @@ package org.bukkit.craftbukkit.inventory; import com.google.common.collect.ImmutableMap.Builder; import java.util.Map; -import net.minecraft.server.NBTTagCompound; +import net.minecraft.nbt.NBTTagCompound; import org.bukkit.Material; import org.bukkit.configuration.serialization.DelegateDeserialization; import org.bukkit.craftbukkit.inventory.CraftMetaItem.SerializableMeta; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCharge.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCharge.java index be967a1d2..4a6437f6e 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCharge.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCharge.java @@ -2,7 +2,7 @@ package org.bukkit.craftbukkit.inventory; import com.google.common.collect.ImmutableMap.Builder; import java.util.Map; -import net.minecraft.server.NBTTagCompound; +import net.minecraft.nbt.NBTTagCompound; import org.bukkit.FireworkEffect; import org.bukkit.Material; import org.bukkit.configuration.serialization.DelegateDeserialization; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCompass.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCompass.java index c5fe26f54..10ef4c6f0 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCompass.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCompass.java @@ -5,13 +5,13 @@ import com.google.common.collect.ImmutableMap.Builder; import com.mojang.serialization.DataResult; import java.util.Map; import java.util.Optional; -import net.minecraft.server.DynamicOpsNBT; +import net.minecraft.nbt.DynamicOpsNBT; +import net.minecraft.nbt.NBTBase; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagString; +import net.minecraft.resources.ResourceKey; import net.minecraft.server.MinecraftServer; -import net.minecraft.server.NBTBase; -import net.minecraft.server.NBTTagCompound; -import net.minecraft.server.NBTTagString; -import net.minecraft.server.ResourceKey; -import net.minecraft.server.WorldServer; +import net.minecraft.server.level.WorldServer; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.World; @@ -131,7 +131,7 @@ public class CraftMetaCompass extends CraftMetaItem implements CompassMeta { if (lodestoneWorld == null) { return null; } - Optional> key = net.minecraft.server.World.f.parse(DynamicOpsNBT.a, lodestoneWorld).result(); + Optional> key = net.minecraft.world.level.World.f.parse(DynamicOpsNBT.a, lodestoneWorld).result(); WorldServer worldServer = key.isPresent() ? MinecraftServer.getServer().getWorldServer(key.get()) : null; World world = worldServer != null ? worldServer.getWorld() : null; return new Location(world, lodestoneX, lodestoneY, lodestoneZ); // world may be null here, if the referenced world is not loaded @@ -143,8 +143,8 @@ public class CraftMetaCompass extends CraftMetaItem implements CompassMeta { if (lodestone == null) { this.lodestoneWorld = null; } else { - ResourceKey key = ((CraftWorld) lodestone.getWorld()).getHandle().getDimensionKey(); - DataResult dataresult = net.minecraft.server.World.f.encodeStart(DynamicOpsNBT.a, key); + ResourceKey key = ((CraftWorld) lodestone.getWorld()).getHandle().getDimensionKey(); + DataResult dataresult = net.minecraft.world.level.World.f.encodeStart(DynamicOpsNBT.a, key); this.lodestoneWorld = (NBTTagString) dataresult.get().orThrow(); this.lodestoneX = lodestone.getBlockX(); this.lodestoneY = lodestone.getBlockY(); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCrossbow.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCrossbow.java index 1bb398530..e9965318d 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCrossbow.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCrossbow.java @@ -6,9 +6,9 @@ import com.google.common.collect.ImmutableMap; import java.util.ArrayList; import java.util.List; import java.util.Map; -import net.minecraft.server.ItemArrow; -import net.minecraft.server.NBTTagCompound; -import net.minecraft.server.NBTTagList; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.world.item.ItemArrow; import org.bukkit.Material; import org.bukkit.configuration.serialization.DelegateDeserialization; import org.bukkit.craftbukkit.inventory.CraftMetaItem.ItemMetaKey; @@ -55,7 +55,7 @@ public class CraftMetaCrossbow extends CraftMetaItem implements CrossbowMeta { for (int i = 0; i < list.size(); i++) { NBTTagCompound nbttagcompound1 = list.getCompound(i); - chargedProjectiles.add(CraftItemStack.asCraftMirror(net.minecraft.server.ItemStack.a(nbttagcompound1))); + chargedProjectiles.add(CraftItemStack.asCraftMirror(net.minecraft.world.item.ItemStack.a(nbttagcompound1))); } } } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEnchantedBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEnchantedBook.java index 40e9a0a53..943af29e5 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEnchantedBook.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEnchantedBook.java @@ -4,7 +4,7 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap.Builder; import java.util.HashMap; import java.util.Map; -import net.minecraft.server.NBTTagCompound; +import net.minecraft.nbt.NBTTagCompound; import org.bukkit.Material; import org.bukkit.configuration.serialization.DelegateDeserialization; import org.bukkit.craftbukkit.inventory.CraftMetaItem.ItemMetaKey; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEntityTag.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEntityTag.java index e6ceba781..a8a5db50f 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEntityTag.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEntityTag.java @@ -2,8 +2,8 @@ package org.bukkit.craftbukkit.inventory; import com.google.common.collect.ImmutableMap.Builder; import java.util.Map; -import net.minecraft.server.NBTBase; -import net.minecraft.server.NBTTagCompound; +import net.minecraft.nbt.NBTBase; +import net.minecraft.nbt.NBTTagCompound; import org.bukkit.Material; import org.bukkit.configuration.serialization.DelegateDeserialization; import org.bukkit.craftbukkit.inventory.CraftMetaItem.ItemMetaKey; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java index 10fb58be7..4016a9edf 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java @@ -6,8 +6,8 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Map; -import net.minecraft.server.NBTTagCompound; -import net.minecraft.server.NBTTagList; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; import org.apache.commons.lang.Validate; import org.bukkit.Color; import org.bukkit.FireworkEffect; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java index 5263e258a..2a1deb8d9 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -36,14 +36,14 @@ import java.util.logging.Level; import java.util.logging.Logger; import javax.annotation.Nonnull; import javax.annotation.Nullable; -import net.minecraft.server.ChatComponentText; -import net.minecraft.server.EnumItemSlot; -import net.minecraft.server.ItemBlock; -import net.minecraft.server.NBTBase; -import net.minecraft.server.NBTCompressedStreamTools; -import net.minecraft.server.NBTTagCompound; -import net.minecraft.server.NBTTagList; -import net.minecraft.server.NBTTagString; +import net.minecraft.nbt.NBTBase; +import net.minecraft.nbt.NBTCompressedStreamTools; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.nbt.NBTTagString; +import net.minecraft.network.chat.ChatComponentText; +import net.minecraft.world.entity.EnumItemSlot; +import net.minecraft.world.item.ItemBlock; import org.apache.commons.codec.binary.Base64; import org.apache.commons.lang.Validate; import org.apache.commons.lang3.EnumUtils; @@ -417,7 +417,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { // entry is not an actual NBTTagCompound. getCompound returns empty NBTTagCompound in that case continue; } - net.minecraft.server.AttributeModifier nmsModifier = net.minecraft.server.AttributeModifier.a(entry); + net.minecraft.world.entity.ai.attributes.AttributeModifier nmsModifier = net.minecraft.world.entity.ai.attributes.AttributeModifier.a(entry); if (nmsModifier == null) { continue; } @@ -698,7 +698,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { if (entry.getKey() == null || entry.getValue() == null) { continue; } - net.minecraft.server.AttributeModifier nmsModifier = CraftAttributeInstance.convert(entry.getValue()); + net.minecraft.world.entity.ai.attributes.AttributeModifier nmsModifier = CraftAttributeInstance.convert(entry.getValue()); NBTTagCompound sub = nmsModifier.save(); if (sub.isEmpty()) { continue; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaKnowledgeBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaKnowledgeBook.java index b471c5d84..317631c39 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaKnowledgeBook.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaKnowledgeBook.java @@ -5,9 +5,9 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; -import net.minecraft.server.NBTTagCompound; -import net.minecraft.server.NBTTagList; -import net.minecraft.server.NBTTagString; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.nbt.NBTTagString; import org.bukkit.Material; import org.bukkit.NamespacedKey; import org.bukkit.configuration.serialization.DelegateDeserialization; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java index c8c51bc1c..9624fc13c 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java @@ -3,8 +3,8 @@ package org.bukkit.craftbukkit.inventory; import static org.bukkit.craftbukkit.inventory.CraftItemFactory.*; import com.google.common.collect.ImmutableMap.Builder; import java.util.Map; -import net.minecraft.server.NBTTagCompound; -import net.minecraft.server.NBTTagInt; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagInt; import org.bukkit.Color; import org.bukkit.Material; import org.bukkit.configuration.serialization.DelegateDeserialization; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMap.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMap.java index 591572e24..2d7ddc62a 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMap.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMap.java @@ -3,9 +3,9 @@ package org.bukkit.craftbukkit.inventory; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableMap; import java.util.Map; -import net.minecraft.server.NBTTagCompound; -import net.minecraft.server.NBTTagInt; -import net.minecraft.server.NBTTagString; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagInt; +import net.minecraft.nbt.NBTTagString; import org.bukkit.Bukkit; import org.bukkit.Color; import org.bukkit.Material; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java index 20f4f621d..df0dda466 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java @@ -6,8 +6,8 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Map; -import net.minecraft.server.NBTTagCompound; -import net.minecraft.server.NBTTagList; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; import org.apache.commons.lang.Validate; import org.bukkit.Color; import org.bukkit.Material; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java index 10cbc3240..d171b8fc3 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java @@ -4,10 +4,10 @@ import com.google.common.collect.ImmutableMap.Builder; import com.mojang.authlib.GameProfile; import java.util.Map; import java.util.UUID; -import net.minecraft.server.GameProfileSerializer; -import net.minecraft.server.NBTBase; -import net.minecraft.server.NBTTagCompound; -import net.minecraft.server.TileEntitySkull; +import net.minecraft.nbt.GameProfileSerializer; +import net.minecraft.nbt.NBTBase; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.level.block.entity.TileEntitySkull; import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.OfflinePlayer; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java index 973a1895c..417160685 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java @@ -2,9 +2,9 @@ package org.bukkit.craftbukkit.inventory; import com.google.common.collect.ImmutableMap.Builder; import java.util.Map; -import net.minecraft.server.MinecraftKey; -import net.minecraft.server.NBTBase; -import net.minecraft.server.NBTTagCompound; +import net.minecraft.nbt.NBTBase; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.resources.MinecraftKey; import org.bukkit.Material; import org.bukkit.configuration.serialization.DelegateDeserialization; import org.bukkit.craftbukkit.inventory.CraftMetaItem.ItemMetaKey; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSuspiciousStew.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSuspiciousStew.java index 6a2d5c53f..37c4352cf 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSuspiciousStew.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSuspiciousStew.java @@ -6,8 +6,8 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Map; -import net.minecraft.server.NBTTagCompound; -import net.minecraft.server.NBTTagList; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; import org.apache.commons.lang.Validate; import org.bukkit.Material; import org.bukkit.configuration.serialization.DelegateDeserialization; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTropicalFishBucket.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTropicalFishBucket.java index b9411382e..7b7e4907c 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTropicalFishBucket.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTropicalFishBucket.java @@ -2,8 +2,8 @@ package org.bukkit.craftbukkit.inventory; import com.google.common.collect.ImmutableMap; import java.util.Map; -import net.minecraft.server.NBTBase; -import net.minecraft.server.NBTTagCompound; +import net.minecraft.nbt.NBTBase; +import net.minecraft.nbt.NBTTagCompound; import org.bukkit.DyeColor; import org.bukkit.Material; import org.bukkit.configuration.serialization.DelegateDeserialization; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftRecipe.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftRecipe.java index ef29599a8..b7e8c3798 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftRecipe.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftRecipe.java @@ -2,7 +2,7 @@ package org.bukkit.craftbukkit.inventory; import java.util.ArrayList; import java.util.List; -import net.minecraft.server.RecipeItemStack; +import net.minecraft.world.item.crafting.RecipeItemStack; import org.bukkit.craftbukkit.util.CraftMagicNumbers; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.Recipe; @@ -18,9 +18,9 @@ public interface CraftRecipe extends Recipe { if (bukkit == null) { stack = RecipeItemStack.a; } else if (bukkit instanceof RecipeChoice.MaterialChoice) { - stack = new RecipeItemStack(((RecipeChoice.MaterialChoice) bukkit).getChoices().stream().map((mat) -> new net.minecraft.server.RecipeItemStack.StackProvider(CraftItemStack.asNMSCopy(new ItemStack(mat))))); + stack = new RecipeItemStack(((RecipeChoice.MaterialChoice) bukkit).getChoices().stream().map((mat) -> new net.minecraft.world.item.crafting.RecipeItemStack.StackProvider(CraftItemStack.asNMSCopy(new ItemStack(mat))))); } else if (bukkit instanceof RecipeChoice.ExactChoice) { - stack = new RecipeItemStack(((RecipeChoice.ExactChoice) bukkit).getChoices().stream().map((mat) -> new net.minecraft.server.RecipeItemStack.StackProvider(CraftItemStack.asNMSCopy(mat)))); + stack = new RecipeItemStack(((RecipeChoice.ExactChoice) bukkit).getChoices().stream().map((mat) -> new net.minecraft.world.item.crafting.RecipeItemStack.StackProvider(CraftItemStack.asNMSCopy(mat)))); stack.exact = true; } else { throw new IllegalArgumentException("Unknown recipe stack instance " + bukkit); @@ -43,7 +43,7 @@ public interface CraftRecipe extends Recipe { if (list.exact) { List choices = new ArrayList<>(list.choices.length); - for (net.minecraft.server.ItemStack i : list.choices) { + for (net.minecraft.world.item.ItemStack i : list.choices) { choices.add(CraftItemStack.asBukkitCopy(i)); } @@ -51,7 +51,7 @@ public interface CraftRecipe extends Recipe { } else { List choices = new ArrayList<>(list.choices.length); - for (net.minecraft.server.ItemStack i : list.choices) { + for (net.minecraft.world.item.ItemStack i : list.choices) { choices.add(CraftMagicNumbers.getMaterial(i.getItem())); } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftResultInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftResultInventory.java index ff7f589a2..3b676c485 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftResultInventory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftResultInventory.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.inventory; -import net.minecraft.server.IInventory; +import net.minecraft.world.IInventory; import org.bukkit.inventory.ItemStack; public class CraftResultInventory extends CraftInventory { @@ -23,10 +23,10 @@ public class CraftResultInventory extends CraftInventory { @Override public ItemStack getItem(int slot) { if (slot < getIngredientsInventory().getSize()) { - net.minecraft.server.ItemStack item = getIngredientsInventory().getItem(slot); + net.minecraft.world.item.ItemStack item = getIngredientsInventory().getItem(slot); return item.isEmpty() ? null : CraftItemStack.asCraftMirror(item); } else { - net.minecraft.server.ItemStack item = getResultInventory().getItem(slot - getIngredientsInventory().getSize()); + net.minecraft.world.item.ItemStack item = getResultInventory().getItem(slot - getIngredientsInventory().getSize()); return item.isEmpty() ? null : CraftItemStack.asCraftMirror(item); } } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapedRecipe.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapedRecipe.java index 6dbd249f5..b69097f9c 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapedRecipe.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapedRecipe.java @@ -1,10 +1,10 @@ package org.bukkit.craftbukkit.inventory; import java.util.Map; +import net.minecraft.core.NonNullList; import net.minecraft.server.MinecraftServer; -import net.minecraft.server.NonNullList; -import net.minecraft.server.RecipeItemStack; -import net.minecraft.server.ShapedRecipes; +import net.minecraft.world.item.crafting.RecipeItemStack; +import net.minecraft.world.item.crafting.ShapedRecipes; import org.bukkit.NamespacedKey; import org.bukkit.craftbukkit.util.CraftNamespacedKey; import org.bukkit.inventory.ItemStack; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapelessRecipe.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapelessRecipe.java index 4aba511fe..de9c5ed6b 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapelessRecipe.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapelessRecipe.java @@ -1,10 +1,10 @@ package org.bukkit.craftbukkit.inventory; import java.util.List; +import net.minecraft.core.NonNullList; import net.minecraft.server.MinecraftServer; -import net.minecraft.server.NonNullList; -import net.minecraft.server.RecipeItemStack; -import net.minecraft.server.ShapelessRecipes; +import net.minecraft.world.item.crafting.RecipeItemStack; +import net.minecraft.world.item.crafting.ShapelessRecipes; import org.bukkit.NamespacedKey; import org.bukkit.craftbukkit.util.CraftNamespacedKey; import org.bukkit.inventory.ItemStack; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingRecipe.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingRecipe.java index 025ee588c..5ca10153c 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingRecipe.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingRecipe.java @@ -24,6 +24,6 @@ public class CraftSmithingRecipe extends SmithingRecipe implements CraftRecipe { public void addToCraftingManager() { ItemStack result = this.getResult(); - MinecraftServer.getServer().getCraftingManager().addRecipe(new net.minecraft.server.RecipeSmithing(CraftNamespacedKey.toMinecraft(this.getKey()), toNMS(this.getBase(), true), toNMS(this.getAddition(), true), CraftItemStack.asNMSCopy(result))); + MinecraftServer.getServer().getCraftingManager().addRecipe(new net.minecraft.world.item.crafting.RecipeSmithing(CraftNamespacedKey.toMinecraft(this.getKey()), toNMS(this.getBase(), true), toNMS(this.getAddition(), true), CraftItemStack.asNMSCopy(result))); } } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmokingRecipe.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmokingRecipe.java index 400437e2c..d2572b2fc 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmokingRecipe.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmokingRecipe.java @@ -25,6 +25,6 @@ public class CraftSmokingRecipe extends SmokingRecipe implements CraftRecipe { public void addToCraftingManager() { ItemStack result = this.getResult(); - MinecraftServer.getServer().getCraftingManager().addRecipe(new net.minecraft.server.RecipeSmoking(CraftNamespacedKey.toMinecraft(this.getKey()), this.getGroup(), toNMS(this.getInputChoice(), true), CraftItemStack.asNMSCopy(result), getExperience(), getCookingTime())); + MinecraftServer.getServer().getCraftingManager().addRecipe(new net.minecraft.world.item.crafting.RecipeSmoking(CraftNamespacedKey.toMinecraft(this.getKey()), this.getGroup(), toNMS(this.getInputChoice(), true), CraftItemStack.asNMSCopy(result), getExperience(), getCookingTime())); } } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftStonecuttingRecipe.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftStonecuttingRecipe.java index 512a0e9d3..eb5a3c8e8 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftStonecuttingRecipe.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftStonecuttingRecipe.java @@ -25,6 +25,6 @@ public class CraftStonecuttingRecipe extends StonecuttingRecipe implements Craft public void addToCraftingManager() { ItemStack result = this.getResult(); - MinecraftServer.getServer().getCraftingManager().addRecipe(new net.minecraft.server.RecipeStonecutting(CraftNamespacedKey.toMinecraft(this.getKey()), this.getGroup(), toNMS(this.getInputChoice(), true), CraftItemStack.asNMSCopy(result))); + MinecraftServer.getServer().getCraftingManager().addRecipe(new net.minecraft.world.item.crafting.RecipeStonecutting(CraftNamespacedKey.toMinecraft(this.getKey()), this.getGroup(), toNMS(this.getInputChoice(), true), CraftItemStack.asNMSCopy(result))); } } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/RecipeIterator.java b/src/main/java/org/bukkit/craftbukkit/inventory/RecipeIterator.java index 28f77a341..3401134dd 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/RecipeIterator.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/RecipeIterator.java @@ -3,10 +3,10 @@ package org.bukkit.craftbukkit.inventory; import it.unimi.dsi.fastutil.objects.Object2ObjectLinkedOpenHashMap; import java.util.Iterator; import java.util.Map; -import net.minecraft.server.IRecipe; -import net.minecraft.server.MinecraftKey; +import net.minecraft.resources.MinecraftKey; import net.minecraft.server.MinecraftServer; -import net.minecraft.server.Recipes; +import net.minecraft.world.item.crafting.IRecipe; +import net.minecraft.world.item.crafting.Recipes; import org.bukkit.inventory.Recipe; public class RecipeIterator implements Iterator { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java index ad91eabb4..f35e66dab 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java @@ -1,19 +1,19 @@ package org.bukkit.craftbukkit.inventory.util; -import net.minecraft.server.BlockPosition; -import net.minecraft.server.IInventory; +import net.minecraft.core.BlockPosition; import net.minecraft.server.MinecraftServer; -import net.minecraft.server.TileEntityBlastFurnace; -import net.minecraft.server.TileEntityBrewingStand; -import net.minecraft.server.TileEntityDispenser; -import net.minecraft.server.TileEntityDropper; -import net.minecraft.server.TileEntityFurnace; -import net.minecraft.server.TileEntityFurnaceFurnace; -import net.minecraft.server.TileEntityHopper; -import net.minecraft.server.TileEntityLectern; -import net.minecraft.server.TileEntityLootable; -import net.minecraft.server.TileEntitySmoker; -import net.minecraft.server.World; +import net.minecraft.world.IInventory; +import net.minecraft.world.level.World; +import net.minecraft.world.level.block.entity.TileEntityBlastFurnace; +import net.minecraft.world.level.block.entity.TileEntityBrewingStand; +import net.minecraft.world.level.block.entity.TileEntityDispenser; +import net.minecraft.world.level.block.entity.TileEntityDropper; +import net.minecraft.world.level.block.entity.TileEntityFurnace; +import net.minecraft.world.level.block.entity.TileEntityFurnaceFurnace; +import net.minecraft.world.level.block.entity.TileEntityHopper; +import net.minecraft.world.level.block.entity.TileEntityLectern; +import net.minecraft.world.level.block.entity.TileEntityLootable; +import net.minecraft.world.level.block.entity.TileEntitySmoker; import org.bukkit.craftbukkit.inventory.CraftInventory; import org.bukkit.craftbukkit.inventory.CraftInventoryBrewer; import org.bukkit.craftbukkit.inventory.CraftInventoryFurnace; diff --git a/src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java b/src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java index b14333ce9..b86604cbf 100644 --- a/src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java +++ b/src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java @@ -8,24 +8,24 @@ import java.util.HashSet; import java.util.Map; import java.util.Optional; import java.util.Set; -import net.minecraft.server.Block; -import net.minecraft.server.BlockStateList; -import net.minecraft.server.Blocks; -import net.minecraft.server.DataConverterFlattenData; -import net.minecraft.server.DataConverterMaterialId; -import net.minecraft.server.DataConverterRegistry; -import net.minecraft.server.DataConverterTypes; +import net.minecraft.core.IRegistry; +import net.minecraft.nbt.DynamicOpsNBT; +import net.minecraft.nbt.NBTBase; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.resources.MinecraftKey; import net.minecraft.server.DispenserRegistry; -import net.minecraft.server.DynamicOpsNBT; -import net.minecraft.server.IBlockData; -import net.minecraft.server.IBlockState; -import net.minecraft.server.IRegistry; -import net.minecraft.server.Item; -import net.minecraft.server.Items; -import net.minecraft.server.MinecraftKey; import net.minecraft.server.MinecraftServer; -import net.minecraft.server.NBTBase; -import net.minecraft.server.NBTTagCompound; +import net.minecraft.util.datafix.DataConverterRegistry; +import net.minecraft.util.datafix.fixes.DataConverterFlattenData; +import net.minecraft.util.datafix.fixes.DataConverterMaterialId; +import net.minecraft.util.datafix.fixes.DataConverterTypes; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.Items; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.state.BlockStateList; +import net.minecraft.world.level.block.state.IBlockData; +import net.minecraft.world.level.block.state.properties.IBlockState; import org.bukkit.Material; import org.bukkit.craftbukkit.util.CraftMagicNumbers; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/map/CraftMapRenderer.java b/src/main/java/org/bukkit/craftbukkit/map/CraftMapRenderer.java index 93b39092c..1f0b117fc 100644 --- a/src/main/java/org/bukkit/craftbukkit/map/CraftMapRenderer.java +++ b/src/main/java/org/bukkit/craftbukkit/map/CraftMapRenderer.java @@ -1,7 +1,7 @@ package org.bukkit.craftbukkit.map; -import net.minecraft.server.MapIcon; -import net.minecraft.server.WorldMap; +import net.minecraft.world.level.saveddata.maps.MapIcon; +import net.minecraft.world.level.saveddata.maps.WorldMap; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.util.CraftChatMessage; import org.bukkit.entity.Player; diff --git a/src/main/java/org/bukkit/craftbukkit/map/CraftMapView.java b/src/main/java/org/bukkit/craftbukkit/map/CraftMapView.java index 587d6690d..30631e831 100644 --- a/src/main/java/org/bukkit/craftbukkit/map/CraftMapView.java +++ b/src/main/java/org/bukkit/craftbukkit/map/CraftMapView.java @@ -6,10 +6,10 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.logging.Level; +import net.minecraft.resources.ResourceKey; import net.minecraft.server.MinecraftServer; -import net.minecraft.server.ResourceKey; -import net.minecraft.server.WorldMap; -import net.minecraft.server.WorldServer; +import net.minecraft.server.level.WorldServer; +import net.minecraft.world.level.saveddata.maps.WorldMap; import org.bukkit.Bukkit; import org.bukkit.World; import org.bukkit.craftbukkit.CraftWorld; @@ -61,7 +61,7 @@ public final class CraftMapView implements MapView { @Override public World getWorld() { - ResourceKey dimension = worldMap.map; + ResourceKey dimension = worldMap.map; WorldServer world = MinecraftServer.getServer().getWorldServer(dimension); return (world == null) ? null : world.getWorld(); diff --git a/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java b/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java index 58e2db5da..f342feee4 100644 --- a/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java +++ b/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java @@ -6,8 +6,8 @@ import java.util.Map; import java.util.Map.Entry; import java.util.Objects; import java.util.Set; -import net.minecraft.server.NBTBase; -import net.minecraft.server.NBTTagCompound; +import net.minecraft.nbt.NBTBase; +import net.minecraft.nbt.NBTTagCompound; import org.apache.commons.lang.Validate; import org.bukkit.NamespacedKey; import org.bukkit.craftbukkit.util.CraftNBTTagConfigSerializer; diff --git a/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataTypeRegistry.java b/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataTypeRegistry.java index 1b3b86463..da08325dd 100644 --- a/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataTypeRegistry.java +++ b/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataTypeRegistry.java @@ -6,19 +6,19 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; import java.util.function.Function; -import net.minecraft.server.NBTBase; -import net.minecraft.server.NBTTagByte; -import net.minecraft.server.NBTTagByteArray; -import net.minecraft.server.NBTTagCompound; -import net.minecraft.server.NBTTagDouble; -import net.minecraft.server.NBTTagFloat; -import net.minecraft.server.NBTTagInt; -import net.minecraft.server.NBTTagIntArray; -import net.minecraft.server.NBTTagList; -import net.minecraft.server.NBTTagLong; -import net.minecraft.server.NBTTagLongArray; -import net.minecraft.server.NBTTagShort; -import net.minecraft.server.NBTTagString; +import net.minecraft.nbt.NBTBase; +import net.minecraft.nbt.NBTTagByte; +import net.minecraft.nbt.NBTTagByteArray; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagDouble; +import net.minecraft.nbt.NBTTagFloat; +import net.minecraft.nbt.NBTTagInt; +import net.minecraft.nbt.NBTTagIntArray; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.nbt.NBTTagLong; +import net.minecraft.nbt.NBTTagLongArray; +import net.minecraft.nbt.NBTTagShort; +import net.minecraft.nbt.NBTTagString; import org.apache.commons.lang3.Validate; import org.bukkit.persistence.PersistentDataContainer; diff --git a/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionBrewer.java b/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionBrewer.java index 87d680a87..7156bd1c8 100644 --- a/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionBrewer.java +++ b/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionBrewer.java @@ -6,8 +6,8 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Map; -import net.minecraft.server.MobEffect; -import net.minecraft.server.PotionRegistry; +import net.minecraft.world.effect.MobEffect; +import net.minecraft.world.item.alchemy.PotionRegistry; import org.bukkit.potion.PotionBrewer; import org.bukkit.potion.PotionData; import org.bukkit.potion.PotionEffect; diff --git a/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionEffectType.java b/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionEffectType.java index 082b0fdf9..bc11c564d 100644 --- a/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionEffectType.java +++ b/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionEffectType.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.potion; -import net.minecraft.server.MobEffectList; +import net.minecraft.world.effect.MobEffectList; import org.bukkit.Color; import org.bukkit.potion.PotionEffectType; diff --git a/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionUtil.java b/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionUtil.java index c1e0863c4..94fbf3f54 100644 --- a/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionUtil.java +++ b/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionUtil.java @@ -3,8 +3,8 @@ package org.bukkit.craftbukkit.potion; import com.google.common.base.Preconditions; import com.google.common.collect.BiMap; import com.google.common.collect.ImmutableBiMap; -import net.minecraft.server.MobEffect; -import net.minecraft.server.MobEffectList; +import net.minecraft.world.effect.MobEffect; +import net.minecraft.world.effect.MobEffectList; import org.bukkit.potion.PotionData; import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffectType; diff --git a/src/main/java/org/bukkit/craftbukkit/projectiles/CraftBlockProjectileSource.java b/src/main/java/org/bukkit/craftbukkit/projectiles/CraftBlockProjectileSource.java index 459a08984..39844f401 100644 --- a/src/main/java/org/bukkit/craftbukkit/projectiles/CraftBlockProjectileSource.java +++ b/src/main/java/org/bukkit/craftbukkit/projectiles/CraftBlockProjectileSource.java @@ -1,26 +1,26 @@ package org.bukkit.craftbukkit.projectiles; import java.util.Random; -import net.minecraft.server.BlockDispenser; -import net.minecraft.server.EntityArrow; -import net.minecraft.server.EntityEgg; -import net.minecraft.server.EntityEnderPearl; -import net.minecraft.server.EntityFireball; -import net.minecraft.server.EntityPotion; -import net.minecraft.server.EntityProjectile; -import net.minecraft.server.EntitySmallFireball; -import net.minecraft.server.EntitySnowball; -import net.minecraft.server.EntitySpectralArrow; -import net.minecraft.server.EntityThrownExpBottle; -import net.minecraft.server.EntityTippedArrow; -import net.minecraft.server.EntityTypes; -import net.minecraft.server.EnumDirection; -import net.minecraft.server.IPosition; -import net.minecraft.server.IProjectile; -import net.minecraft.server.MathHelper; -import net.minecraft.server.SourceBlock; -import net.minecraft.server.TileEntityDispenser; -import net.minecraft.server.WorldServer; +import net.minecraft.core.EnumDirection; +import net.minecraft.core.IPosition; +import net.minecraft.core.SourceBlock; +import net.minecraft.server.level.WorldServer; +import net.minecraft.util.MathHelper; +import net.minecraft.world.entity.EntityTypes; +import net.minecraft.world.entity.projectile.EntityArrow; +import net.minecraft.world.entity.projectile.EntityEgg; +import net.minecraft.world.entity.projectile.EntityEnderPearl; +import net.minecraft.world.entity.projectile.EntityFireball; +import net.minecraft.world.entity.projectile.EntityPotion; +import net.minecraft.world.entity.projectile.EntityProjectile; +import net.minecraft.world.entity.projectile.EntitySmallFireball; +import net.minecraft.world.entity.projectile.EntitySnowball; +import net.minecraft.world.entity.projectile.EntitySpectralArrow; +import net.minecraft.world.entity.projectile.EntityThrownExpBottle; +import net.minecraft.world.entity.projectile.EntityTippedArrow; +import net.minecraft.world.entity.projectile.IProjectile; +import net.minecraft.world.level.block.BlockDispenser; +import net.minecraft.world.level.block.entity.TileEntityDispenser; import org.apache.commons.lang.Validate; import org.bukkit.Material; import org.bukkit.block.Block; @@ -70,8 +70,8 @@ public class CraftBlockProjectileSource implements BlockProjectileSource { // Copied from DispenseBehaviorProjectile IPosition iposition = BlockDispenser.a(isourceblock); EnumDirection enumdirection = (EnumDirection) isourceblock.getBlockData().get(BlockDispenser.FACING); - net.minecraft.server.World world = dispenserBlock.getWorld(); - net.minecraft.server.Entity launch = null; + net.minecraft.world.level.World world = dispenserBlock.getWorld(); + net.minecraft.world.entity.Entity launch = null; if (Snowball.class.isAssignableFrom(projectile)) { launch = new EntitySnowball(world, iposition.getX(), iposition.getY(), iposition.getZ()); diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftCriteria.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftCriteria.java index 73786eda7..1a5d9f1b0 100644 --- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftCriteria.java +++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftCriteria.java @@ -2,8 +2,8 @@ package org.bukkit.craftbukkit.scoreboard; import com.google.common.collect.ImmutableMap; import java.util.Map; -import net.minecraft.server.IScoreboardCriteria; -import net.minecraft.server.ScoreboardObjective; +import net.minecraft.world.scores.ScoreboardObjective; +import net.minecraft.world.scores.criteria.IScoreboardCriteria; final class CraftCriteria { static final Map DEFAULTS; diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java index 5eaea24d2..8fedca656 100644 --- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java +++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java @@ -1,7 +1,7 @@ package org.bukkit.craftbukkit.scoreboard; -import net.minecraft.server.Scoreboard; -import net.minecraft.server.ScoreboardObjective; +import net.minecraft.world.scores.Scoreboard; +import net.minecraft.world.scores.ScoreboardObjective; import org.apache.commons.lang.Validate; import org.bukkit.OfflinePlayer; import org.bukkit.craftbukkit.util.CraftChatMessage; diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScore.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScore.java index 41d22d223..af86f6d54 100644 --- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScore.java +++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScore.java @@ -1,9 +1,9 @@ package org.bukkit.craftbukkit.scoreboard; import java.util.Map; -import net.minecraft.server.Scoreboard; -import net.minecraft.server.ScoreboardObjective; -import net.minecraft.server.ScoreboardScore; +import net.minecraft.world.scores.Scoreboard; +import net.minecraft.world.scores.ScoreboardObjective; +import net.minecraft.world.scores.ScoreboardScore; import org.bukkit.Bukkit; import org.bukkit.OfflinePlayer; import org.bukkit.scoreboard.Objective; diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java index e3036fe23..954389b81 100644 --- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java +++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java @@ -4,9 +4,9 @@ import com.google.common.base.Function; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; import java.util.Collection; -import net.minecraft.server.Scoreboard; -import net.minecraft.server.ScoreboardObjective; -import net.minecraft.server.ScoreboardTeam; +import net.minecraft.world.scores.Scoreboard; +import net.minecraft.world.scores.ScoreboardObjective; +import net.minecraft.world.scores.ScoreboardTeam; import org.apache.commons.lang.Validate; import org.bukkit.Bukkit; import org.bukkit.OfflinePlayer; diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java index fd9949e1e..efcd5aa02 100644 --- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java +++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java @@ -6,16 +6,16 @@ import java.util.HashSet; import java.util.Iterator; import java.util.Map; import java.util.function.Consumer; -import net.minecraft.server.EntityPlayer; -import net.minecraft.server.IScoreboardCriteria; +import net.minecraft.network.protocol.game.PacketPlayOutScoreboardObjective; +import net.minecraft.network.protocol.game.PacketPlayOutScoreboardTeam; import net.minecraft.server.MinecraftServer; -import net.minecraft.server.PacketPlayOutScoreboardObjective; -import net.minecraft.server.PacketPlayOutScoreboardTeam; -import net.minecraft.server.Scoreboard; -import net.minecraft.server.ScoreboardObjective; -import net.minecraft.server.ScoreboardScore; import net.minecraft.server.ScoreboardServer; -import net.minecraft.server.ScoreboardTeam; +import net.minecraft.server.level.EntityPlayer; +import net.minecraft.world.scores.Scoreboard; +import net.minecraft.world.scores.ScoreboardObjective; +import net.minecraft.world.scores.ScoreboardScore; +import net.minecraft.world.scores.ScoreboardTeam; +import net.minecraft.world.scores.criteria.IScoreboardCriteria; import org.apache.commons.lang.Validate; import org.bukkit.craftbukkit.entity.CraftPlayer; import org.bukkit.craftbukkit.util.WeakCollection; @@ -28,7 +28,7 @@ public final class CraftScoreboardManager implements ScoreboardManager { private final Collection scoreboards = new WeakCollection(); private final Map playerBoards = new HashMap(); - public CraftScoreboardManager(MinecraftServer minecraftserver, net.minecraft.server.Scoreboard scoreboardServer) { + public CraftScoreboardManager(MinecraftServer minecraftserver, net.minecraft.world.scores.Scoreboard scoreboardServer) { mainScoreboard = new CraftScoreboard(scoreboardServer); server = minecraftserver; scoreboards.add(mainScoreboard); @@ -57,8 +57,8 @@ public final class CraftScoreboardManager implements ScoreboardManager { Validate.isTrue(bukkitScoreboard instanceof CraftScoreboard, "Cannot set player scoreboard to an unregistered Scoreboard"); CraftScoreboard scoreboard = (CraftScoreboard) bukkitScoreboard; - net.minecraft.server.Scoreboard oldboard = getPlayerBoard(player).getHandle(); - net.minecraft.server.Scoreboard newboard = scoreboard.getHandle(); + net.minecraft.world.scores.Scoreboard oldboard = getPlayerBoard(player).getHandle(); + net.minecraft.world.scores.Scoreboard newboard = scoreboard.getHandle(); EntityPlayer entityplayer = player.getHandle(); if (oldboard == newboard) { diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardTranslations.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardTranslations.java index f63413532..8dc76e336 100644 --- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardTranslations.java +++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardTranslations.java @@ -1,8 +1,8 @@ package org.bukkit.craftbukkit.scoreboard; import com.google.common.collect.ImmutableBiMap; -import net.minecraft.server.IScoreboardCriteria; -import net.minecraft.server.Scoreboard; +import net.minecraft.world.scores.Scoreboard; +import net.minecraft.world.scores.criteria.IScoreboardCriteria; import org.bukkit.scoreboard.DisplaySlot; import org.bukkit.scoreboard.RenderType; diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java index 6c24db0d2..a213c2e3b 100644 --- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java +++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java @@ -2,9 +2,9 @@ package org.bukkit.craftbukkit.scoreboard; import com.google.common.collect.ImmutableSet; import java.util.Set; -import net.minecraft.server.ScoreboardTeam; -import net.minecraft.server.ScoreboardTeamBase; -import net.minecraft.server.ScoreboardTeamBase.EnumNameTagVisibility; +import net.minecraft.world.scores.ScoreboardTeam; +import net.minecraft.world.scores.ScoreboardTeamBase; +import net.minecraft.world.scores.ScoreboardTeamBase.EnumNameTagVisibility; import org.apache.commons.lang.Validate; import org.bukkit.Bukkit; import org.bukkit.ChatColor; diff --git a/src/main/java/org/bukkit/craftbukkit/tag/CraftBlockTag.java b/src/main/java/org/bukkit/craftbukkit/tag/CraftBlockTag.java index da6ac8274..e831b9b42 100644 --- a/src/main/java/org/bukkit/craftbukkit/tag/CraftBlockTag.java +++ b/src/main/java/org/bukkit/craftbukkit/tag/CraftBlockTag.java @@ -3,9 +3,9 @@ package org.bukkit.craftbukkit.tag; import java.util.Collections; import java.util.Set; import java.util.stream.Collectors; -import net.minecraft.server.Block; -import net.minecraft.server.MinecraftKey; -import net.minecraft.server.Tags; +import net.minecraft.resources.MinecraftKey; +import net.minecraft.tags.Tags; +import net.minecraft.world.level.block.Block; import org.bukkit.Material; import org.bukkit.craftbukkit.util.CraftMagicNumbers; diff --git a/src/main/java/org/bukkit/craftbukkit/tag/CraftFluidTag.java b/src/main/java/org/bukkit/craftbukkit/tag/CraftFluidTag.java index d7b2bce1a..9d4dbb56e 100644 --- a/src/main/java/org/bukkit/craftbukkit/tag/CraftFluidTag.java +++ b/src/main/java/org/bukkit/craftbukkit/tag/CraftFluidTag.java @@ -3,9 +3,9 @@ package org.bukkit.craftbukkit.tag; import java.util.Collections; import java.util.Set; import java.util.stream.Collectors; -import net.minecraft.server.FluidType; -import net.minecraft.server.MinecraftKey; -import net.minecraft.server.Tags; +import net.minecraft.resources.MinecraftKey; +import net.minecraft.tags.Tags; +import net.minecraft.world.level.material.FluidType; import org.bukkit.Fluid; import org.bukkit.craftbukkit.util.CraftMagicNumbers; diff --git a/src/main/java/org/bukkit/craftbukkit/tag/CraftItemTag.java b/src/main/java/org/bukkit/craftbukkit/tag/CraftItemTag.java index f6cfbc108..fdcf7c82b 100644 --- a/src/main/java/org/bukkit/craftbukkit/tag/CraftItemTag.java +++ b/src/main/java/org/bukkit/craftbukkit/tag/CraftItemTag.java @@ -3,9 +3,9 @@ package org.bukkit.craftbukkit.tag; import java.util.Collections; import java.util.Set; import java.util.stream.Collectors; -import net.minecraft.server.Item; -import net.minecraft.server.MinecraftKey; -import net.minecraft.server.Tags; +import net.minecraft.resources.MinecraftKey; +import net.minecraft.tags.Tags; +import net.minecraft.world.item.Item; import org.bukkit.Material; import org.bukkit.craftbukkit.util.CraftMagicNumbers; diff --git a/src/main/java/org/bukkit/craftbukkit/tag/CraftTag.java b/src/main/java/org/bukkit/craftbukkit/tag/CraftTag.java index 007db9fbd..dda83ef77 100644 --- a/src/main/java/org/bukkit/craftbukkit/tag/CraftTag.java +++ b/src/main/java/org/bukkit/craftbukkit/tag/CraftTag.java @@ -1,7 +1,7 @@ package org.bukkit.craftbukkit.tag; -import net.minecraft.server.MinecraftKey; -import net.minecraft.server.Tags; +import net.minecraft.resources.MinecraftKey; +import net.minecraft.tags.Tags; import org.bukkit.Keyed; import org.bukkit.NamespacedKey; import org.bukkit.Tag; @@ -9,17 +9,17 @@ import org.bukkit.craftbukkit.util.CraftNamespacedKey; public abstract class CraftTag implements Tag { - private final net.minecraft.server.Tags registry; + private final net.minecraft.tags.Tags registry; private final MinecraftKey tag; // - private net.minecraft.server.Tag handle; + private net.minecraft.tags.Tag handle; public CraftTag(Tags registry, MinecraftKey tag) { this.registry = registry; this.tag = tag; } - protected net.minecraft.server.Tag getHandle() { + protected net.minecraft.tags.Tag getHandle() { if (handle == null) { handle = registry.b(tag); } diff --git a/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java b/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java index 60330f753..8f77cf482 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java +++ b/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java @@ -4,10 +4,10 @@ import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Set; -import net.minecraft.server.BlockPosition; -import net.minecraft.server.Fluid; -import net.minecraft.server.IBlockData; -import net.minecraft.server.World; +import net.minecraft.core.BlockPosition; +import net.minecraft.world.level.World; +import net.minecraft.world.level.block.state.IBlockData; +import net.minecraft.world.level.material.Fluid; import org.bukkit.block.BlockState; import org.bukkit.craftbukkit.block.CraftBlockState; diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java index 1582a799e..6a0b4cd36 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java @@ -9,15 +9,15 @@ import java.util.Map; import java.util.Optional; import java.util.regex.Matcher; import java.util.regex.Pattern; -import net.minecraft.server.ChatClickable; -import net.minecraft.server.ChatClickable.EnumClickAction; -import net.minecraft.server.ChatComponentText; -import net.minecraft.server.ChatHexColor; -import net.minecraft.server.ChatMessage; -import net.minecraft.server.ChatModifier; -import net.minecraft.server.EnumChatFormat; -import net.minecraft.server.IChatBaseComponent; -import net.minecraft.server.IChatMutableComponent; +import net.minecraft.EnumChatFormat; +import net.minecraft.network.chat.ChatClickable; +import net.minecraft.network.chat.ChatClickable.EnumClickAction; +import net.minecraft.network.chat.ChatComponentText; +import net.minecraft.network.chat.ChatHexColor; +import net.minecraft.network.chat.ChatMessage; +import net.minecraft.network.chat.ChatModifier; +import net.minecraft.network.chat.IChatBaseComponent; +import net.minecraft.network.chat.IChatMutableComponent; import org.bukkit.ChatColor; public final class CraftChatMessage { diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftDamageSource.java b/src/main/java/org/bukkit/craftbukkit/util/CraftDamageSource.java index a8e2b5e20..cf0124cd7 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftDamageSource.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftDamageSource.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.util; -import net.minecraft.server.DamageSource; +import net.minecraft.world.damagesource.DamageSource; // Util class to create custom DamageSources. public final class CraftDamageSource extends DamageSource { diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java index 6194d8aac..972840fd3 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -18,25 +18,25 @@ import java.util.Locale; import java.util.Map; import java.util.logging.Level; import java.util.logging.Logger; +import net.minecraft.SharedConstants; +import net.minecraft.advancements.critereon.LootDeserializationContext; +import net.minecraft.core.IRegistry; +import net.minecraft.nbt.DynamicOpsNBT; +import net.minecraft.nbt.MojangsonParser; +import net.minecraft.nbt.NBTBase; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagString; +import net.minecraft.resources.MinecraftKey; import net.minecraft.server.AdvancementDataWorld; -import net.minecraft.server.Block; -import net.minecraft.server.ChatDeserializer; -import net.minecraft.server.DataConverterRegistry; -import net.minecraft.server.DataConverterTypes; -import net.minecraft.server.DynamicOpsNBT; -import net.minecraft.server.FluidType; -import net.minecraft.server.IBlockData; -import net.minecraft.server.IRegistry; -import net.minecraft.server.Item; -import net.minecraft.server.LootDeserializationContext; -import net.minecraft.server.MinecraftKey; import net.minecraft.server.MinecraftServer; -import net.minecraft.server.MojangsonParser; -import net.minecraft.server.NBTBase; -import net.minecraft.server.NBTTagCompound; -import net.minecraft.server.NBTTagString; -import net.minecraft.server.SavedFile; -import net.minecraft.server.SharedConstants; +import net.minecraft.util.ChatDeserializer; +import net.minecraft.util.datafix.DataConverterRegistry; +import net.minecraft.util.datafix.fixes.DataConverterTypes; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.IBlockData; +import net.minecraft.world.level.material.FluidType; +import net.minecraft.world.level.storage.SavedFile; import org.bukkit.Bukkit; import org.bukkit.Fluid; import org.bukkit.Material; @@ -224,7 +224,7 @@ public final class CraftMagicNumbers implements UnsafeValues { * @return string */ public String getMappingsVersion() { - return "54e89c47309b53737f894f1bf1b0edbe"; + return "d4b392244df170796f8779ef0fc1f2e9"; } @Override @@ -234,7 +234,7 @@ public final class CraftMagicNumbers implements UnsafeValues { @Override public ItemStack modifyItemStack(ItemStack stack, String arguments) { - net.minecraft.server.ItemStack nmsStack = CraftItemStack.asNMSCopy(stack); + net.minecraft.world.item.ItemStack nmsStack = CraftItemStack.asNMSCopy(stack); try { nmsStack.setTag((NBTTagCompound) MojangsonParser.parse(arguments)); @@ -260,7 +260,7 @@ public final class CraftMagicNumbers implements UnsafeValues { JsonElement jsonelement = AdvancementDataWorld.DESERIALIZER.fromJson(advancement, JsonElement.class); JsonObject jsonobject = ChatDeserializer.m(jsonelement, "advancement"); - net.minecraft.server.Advancement.SerializedAdvancement nms = net.minecraft.server.Advancement.SerializedAdvancement.a(jsonobject, new LootDeserializationContext(minecraftkey, MinecraftServer.getServer().getLootPredicateManager())); + net.minecraft.advancements.Advancement.SerializedAdvancement nms = net.minecraft.advancements.Advancement.SerializedAdvancement.a(jsonobject, new LootDeserializationContext(minecraftkey, MinecraftServer.getServer().getLootPredicateManager())); if (nms != null) { MinecraftServer.getServer().getAdvancementData().REGISTRY.a(Maps.newHashMap(Collections.singletonMap(minecraftkey, nms))); Advancement bukkit = Bukkit.getAdvancement(key); diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftNBTTagConfigSerializer.java b/src/main/java/org/bukkit/craftbukkit/util/CraftNBTTagConfigSerializer.java index b17faa25e..1c5d62abc 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftNBTTagConfigSerializer.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftNBTTagConfigSerializer.java @@ -7,14 +7,14 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.regex.Pattern; -import net.minecraft.server.MojangsonParser; -import net.minecraft.server.NBTBase; -import net.minecraft.server.NBTList; -import net.minecraft.server.NBTTagCompound; -import net.minecraft.server.NBTTagDouble; -import net.minecraft.server.NBTTagInt; -import net.minecraft.server.NBTTagList; -import net.minecraft.server.NBTTagString; +import net.minecraft.nbt.MojangsonParser; +import net.minecraft.nbt.NBTBase; +import net.minecraft.nbt.NBTList; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagDouble; +import net.minecraft.nbt.NBTTagInt; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.nbt.NBTTagString; public class CraftNBTTagConfigSerializer { diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftNamespacedKey.java b/src/main/java/org/bukkit/craftbukkit/util/CraftNamespacedKey.java index b308b1901..38e04819d 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftNamespacedKey.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftNamespacedKey.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.util; -import net.minecraft.server.MinecraftKey; +import net.minecraft.resources.MinecraftKey; import org.bukkit.NamespacedKey; public final class CraftNamespacedKey { diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftRayTraceResult.java b/src/main/java/org/bukkit/craftbukkit/util/CraftRayTraceResult.java index 6995e1bea..10b05918e 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftRayTraceResult.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftRayTraceResult.java @@ -1,11 +1,11 @@ package org.bukkit.craftbukkit.util; -import net.minecraft.server.BlockPosition; -import net.minecraft.server.MovingObjectPosition; -import net.minecraft.server.MovingObjectPosition.EnumMovingObjectType; -import net.minecraft.server.MovingObjectPositionBlock; -import net.minecraft.server.MovingObjectPositionEntity; -import net.minecraft.server.Vec3D; +import net.minecraft.core.BlockPosition; +import net.minecraft.world.phys.MovingObjectPosition; +import net.minecraft.world.phys.MovingObjectPosition.EnumMovingObjectType; +import net.minecraft.world.phys.MovingObjectPositionBlock; +import net.minecraft.world.phys.MovingObjectPositionEntity; +import net.minecraft.world.phys.Vec3D; import org.bukkit.World; import org.bukkit.block.Block; import org.bukkit.block.BlockFace; diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftVector.java b/src/main/java/org/bukkit/craftbukkit/util/CraftVector.java index d47432739..fc63c87f1 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftVector.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftVector.java @@ -5,11 +5,11 @@ public final class CraftVector { private CraftVector() { } - public static org.bukkit.util.Vector toBukkit(net.minecraft.server.Vec3D nms) { + public static org.bukkit.util.Vector toBukkit(net.minecraft.world.phys.Vec3D nms) { return new org.bukkit.util.Vector(nms.x, nms.y, nms.z); } - public static net.minecraft.server.Vec3D toNMS(org.bukkit.util.Vector bukkit) { - return new net.minecraft.server.Vec3D(bukkit.getX(), bukkit.getY(), bukkit.getZ()); + public static net.minecraft.world.phys.Vec3D toNMS(org.bukkit.util.Vector bukkit) { + return new net.minecraft.world.phys.Vec3D(bukkit.getX(), bukkit.getY(), bukkit.getZ()); } } diff --git a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java index 2eeb3e23e..f4ea5809f 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java +++ b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java @@ -3,34 +3,34 @@ package org.bukkit.craftbukkit.util; import java.util.List; import java.util.Random; import java.util.function.Predicate; -import net.minecraft.server.AxisAlignedBB; -import net.minecraft.server.BiomeBase; -import net.minecraft.server.BiomeManager; -import net.minecraft.server.Block; -import net.minecraft.server.BlockPosition; -import net.minecraft.server.ChunkStatus; -import net.minecraft.server.DifficultyDamageScaler; -import net.minecraft.server.DimensionManager; -import net.minecraft.server.Entity; -import net.minecraft.server.EntityHuman; -import net.minecraft.server.Fluid; -import net.minecraft.server.FluidType; -import net.minecraft.server.GeneratorAccess; -import net.minecraft.server.HeightMap; -import net.minecraft.server.IBlockData; -import net.minecraft.server.IChunkAccess; -import net.minecraft.server.IChunkProvider; -import net.minecraft.server.IRegistryCustom; -import net.minecraft.server.LightEngine; -import net.minecraft.server.ParticleParam; -import net.minecraft.server.SoundCategory; -import net.minecraft.server.SoundEffect; -import net.minecraft.server.TickList; -import net.minecraft.server.TickListEmpty; -import net.minecraft.server.TileEntity; -import net.minecraft.server.WorldBorder; -import net.minecraft.server.WorldData; -import net.minecraft.server.WorldServer; +import net.minecraft.core.BlockPosition; +import net.minecraft.core.IRegistryCustom; +import net.minecraft.core.particles.ParticleParam; +import net.minecraft.server.level.WorldServer; +import net.minecraft.sounds.SoundCategory; +import net.minecraft.sounds.SoundEffect; +import net.minecraft.world.DifficultyDamageScaler; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.player.EntityHuman; +import net.minecraft.world.level.GeneratorAccess; +import net.minecraft.world.level.TickList; +import net.minecraft.world.level.TickListEmpty; +import net.minecraft.world.level.biome.BiomeBase; +import net.minecraft.world.level.biome.BiomeManager; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.entity.TileEntity; +import net.minecraft.world.level.block.state.IBlockData; +import net.minecraft.world.level.border.WorldBorder; +import net.minecraft.world.level.chunk.ChunkStatus; +import net.minecraft.world.level.chunk.IChunkAccess; +import net.minecraft.world.level.chunk.IChunkProvider; +import net.minecraft.world.level.dimension.DimensionManager; +import net.minecraft.world.level.levelgen.HeightMap; +import net.minecraft.world.level.lighting.LightEngine; +import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.FluidType; +import net.minecraft.world.level.storage.WorldData; +import net.minecraft.world.phys.AxisAlignedBB; public class DummyGeneratorAccess implements GeneratorAccess { diff --git a/src/main/java/org/bukkit/craftbukkit/util/LazyPlayerSet.java b/src/main/java/org/bukkit/craftbukkit/util/LazyPlayerSet.java index f847a9dd6..e7b9250eb 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/LazyPlayerSet.java +++ b/src/main/java/org/bukkit/craftbukkit/util/LazyPlayerSet.java @@ -2,8 +2,8 @@ package org.bukkit.craftbukkit.util; import java.util.HashSet; import java.util.List; -import net.minecraft.server.EntityPlayer; import net.minecraft.server.MinecraftServer; +import net.minecraft.server.level.EntityPlayer; import org.bukkit.entity.Player; public class LazyPlayerSet extends LazyHashSet { diff --git a/src/test/java/org/bukkit/ArtTest.java b/src/test/java/org/bukkit/ArtTest.java index 39e3d2150..4fc985e4d 100644 --- a/src/test/java/org/bukkit/ArtTest.java +++ b/src/test/java/org/bukkit/ArtTest.java @@ -8,9 +8,9 @@ import java.util.EnumMap; import java.util.HashMap; import java.util.List; import java.util.Map; -import net.minecraft.server.IRegistry; -import net.minecraft.server.MinecraftKey; -import net.minecraft.server.Paintings; +import net.minecraft.core.IRegistry; +import net.minecraft.resources.MinecraftKey; +import net.minecraft.world.entity.decoration.Paintings; import org.bukkit.craftbukkit.CraftArt; import org.bukkit.support.AbstractTestingBase; import org.junit.Test; diff --git a/src/test/java/org/bukkit/BiomeTest.java b/src/test/java/org/bukkit/BiomeTest.java index c971e0a1a..7105dbfe6 100644 --- a/src/test/java/org/bukkit/BiomeTest.java +++ b/src/test/java/org/bukkit/BiomeTest.java @@ -1,7 +1,7 @@ package org.bukkit; -import net.minecraft.server.BiomeBase; -import net.minecraft.server.RegistryGeneration; +import net.minecraft.data.RegistryGeneration; +import net.minecraft.world.level.biome.BiomeBase; import org.bukkit.block.Biome; import org.bukkit.craftbukkit.block.CraftBlock; import org.bukkit.support.AbstractTestingBase; diff --git a/src/test/java/org/bukkit/BlockDataConversionTest.java b/src/test/java/org/bukkit/BlockDataConversionTest.java index 46cc26b31..a53d0530b 100644 --- a/src/test/java/org/bukkit/BlockDataConversionTest.java +++ b/src/test/java/org/bukkit/BlockDataConversionTest.java @@ -2,9 +2,9 @@ package org.bukkit; import java.util.ArrayList; import java.util.List; -import net.minecraft.server.Block; -import net.minecraft.server.IBlockData; -import net.minecraft.server.IRegistry; +import net.minecraft.core.IRegistry; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.IBlockData; import org.bukkit.craftbukkit.block.data.CraftBlockData; import org.bukkit.support.AbstractTestingBase; import org.junit.Assert; diff --git a/src/test/java/org/bukkit/BlockDataTest.java b/src/test/java/org/bukkit/BlockDataTest.java index 00b8ad356..985bf898d 100644 --- a/src/test/java/org/bukkit/BlockDataTest.java +++ b/src/test/java/org/bukkit/BlockDataTest.java @@ -1,10 +1,10 @@ package org.bukkit; import static org.hamcrest.Matchers.*; -import net.minecraft.server.BlockCake; -import net.minecraft.server.BlockChest; -import net.minecraft.server.Blocks; -import net.minecraft.server.EnumDirection; +import net.minecraft.core.EnumDirection; +import net.minecraft.world.level.block.BlockCake; +import net.minecraft.world.level.block.BlockChest; +import net.minecraft.world.level.block.Blocks; import org.bukkit.block.BlockFace; import org.bukkit.block.data.BlockData; import org.bukkit.block.data.type.Cake; diff --git a/src/test/java/org/bukkit/ChatTest.java b/src/test/java/org/bukkit/ChatTest.java index 95bc1d598..30e96a0d6 100644 --- a/src/test/java/org/bukkit/ChatTest.java +++ b/src/test/java/org/bukkit/ChatTest.java @@ -1,8 +1,8 @@ package org.bukkit; import static org.junit.Assert.*; -import net.minecraft.server.EnumChatFormat; -import net.minecraft.server.IChatBaseComponent; +import net.minecraft.EnumChatFormat; +import net.minecraft.network.chat.IChatBaseComponent; import org.bukkit.craftbukkit.util.CraftChatMessage; import org.junit.Assert; import org.junit.Test; diff --git a/src/test/java/org/bukkit/DyeColorsTest.java b/src/test/java/org/bukkit/DyeColorsTest.java index 9bd05a702..e650cd93d 100644 --- a/src/test/java/org/bukkit/DyeColorsTest.java +++ b/src/test/java/org/bukkit/DyeColorsTest.java @@ -4,7 +4,7 @@ import static org.hamcrest.Matchers.*; import static org.junit.Assert.*; import java.util.ArrayList; import java.util.List; -import net.minecraft.server.EnumColor; +import net.minecraft.world.item.EnumColor; import org.bukkit.support.AbstractTestingBase; import org.junit.Test; import org.junit.runner.RunWith; diff --git a/src/test/java/org/bukkit/EnchantmentTest.java b/src/test/java/org/bukkit/EnchantmentTest.java index e69283b1f..073559da1 100644 --- a/src/test/java/org/bukkit/EnchantmentTest.java +++ b/src/test/java/org/bukkit/EnchantmentTest.java @@ -1,7 +1,7 @@ package org.bukkit; -import net.minecraft.server.IRegistry; -import net.minecraft.server.MinecraftKey; +import net.minecraft.core.IRegistry; +import net.minecraft.resources.MinecraftKey; import org.bukkit.craftbukkit.util.CraftNamespacedKey; import org.bukkit.enchantments.Enchantment; import org.bukkit.support.AbstractTestingBase; @@ -13,7 +13,7 @@ public class EnchantmentTest extends AbstractTestingBase { @Test public void verifyMapping() { for (MinecraftKey key : IRegistry.ENCHANTMENT.keySet()) { - net.minecraft.server.Enchantment nms = IRegistry.ENCHANTMENT.get(key); + net.minecraft.world.item.enchantment.Enchantment nms = IRegistry.ENCHANTMENT.get(key); Enchantment bukkitById = Enchantment.getByKey(CraftNamespacedKey.fromMinecraft(key)); diff --git a/src/test/java/org/bukkit/GameRuleTest.java b/src/test/java/org/bukkit/GameRuleTest.java index ca598c58b..b9ac29bde 100644 --- a/src/test/java/org/bukkit/GameRuleTest.java +++ b/src/test/java/org/bukkit/GameRuleTest.java @@ -1,7 +1,7 @@ package org.bukkit; import java.util.Map; -import net.minecraft.server.GameRules; +import net.minecraft.world.level.GameRules; import org.bukkit.craftbukkit.CraftWorld; import org.junit.Assert; import org.junit.Test; diff --git a/src/test/java/org/bukkit/LootTablesTest.java b/src/test/java/org/bukkit/LootTablesTest.java index bb44fd7aa..9bfbfb1a3 100644 --- a/src/test/java/org/bukkit/LootTablesTest.java +++ b/src/test/java/org/bukkit/LootTablesTest.java @@ -1,6 +1,6 @@ package org.bukkit; -import net.minecraft.server.MinecraftKey; +import net.minecraft.resources.MinecraftKey; import org.bukkit.craftbukkit.util.CraftNamespacedKey; import org.bukkit.loot.LootTable; import org.bukkit.loot.LootTables; @@ -24,7 +24,7 @@ public class LootTablesTest extends AbstractTestingBase { @Test public void testNMS() { - for (MinecraftKey key : net.minecraft.server.LootTables.a()) { + for (MinecraftKey key : net.minecraft.world.level.storage.loot.LootTables.a()) { NamespacedKey bukkitKey = CraftNamespacedKey.fromMinecraft(key); LootTables lootTable = Registry.LOOT_TABLES.get(bukkitKey); diff --git a/src/test/java/org/bukkit/MaterialTest.java b/src/test/java/org/bukkit/MaterialTest.java index f72559894..59682a687 100644 --- a/src/test/java/org/bukkit/MaterialTest.java +++ b/src/test/java/org/bukkit/MaterialTest.java @@ -11,9 +11,9 @@ import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.stream.StreamSupport; -import net.minecraft.server.IRegistry; -import net.minecraft.server.Item; -import net.minecraft.server.MinecraftKey; +import net.minecraft.core.IRegistry; +import net.minecraft.resources.MinecraftKey; +import net.minecraft.world.item.Item; import org.bukkit.craftbukkit.util.CraftMagicNumbers; import org.bukkit.support.AbstractTestingBase; import org.junit.Test; diff --git a/src/test/java/org/bukkit/ParticleTest.java b/src/test/java/org/bukkit/ParticleTest.java index 33701c812..49282d691 100644 --- a/src/test/java/org/bukkit/ParticleTest.java +++ b/src/test/java/org/bukkit/ParticleTest.java @@ -1,6 +1,6 @@ package org.bukkit; -import net.minecraft.server.IRegistry; +import net.minecraft.core.IRegistry; import org.bukkit.block.data.BlockData; import org.bukkit.craftbukkit.CraftParticle; import org.bukkit.craftbukkit.block.data.CraftBlockData; @@ -28,7 +28,7 @@ public class ParticleTest extends AbstractTestingBase { Assert.assertNotNull("Missing Bukkit->NMS particle mapping for " + bukkit, CraftParticle.toNMS(bukkit, data)); } - for (net.minecraft.server.Particle nms : IRegistry.PARTICLE_TYPE) { + for (net.minecraft.core.particles.Particle nms : IRegistry.PARTICLE_TYPE) { Assert.assertNotNull("Missing NMS->Bukkit particle mapping for " + IRegistry.PARTICLE_TYPE.getKey(nms), CraftParticle.toBukkit(nms)); } } diff --git a/src/test/java/org/bukkit/PerMaterialTest.java b/src/test/java/org/bukkit/PerMaterialTest.java index b99ad0faf..a7d09660f 100644 --- a/src/test/java/org/bukkit/PerMaterialTest.java +++ b/src/test/java/org/bukkit/PerMaterialTest.java @@ -5,20 +5,20 @@ import static org.junit.Assert.*; import com.google.common.collect.Lists; import java.util.List; import java.util.Map; -import net.minecraft.server.Block; -import net.minecraft.server.BlockAccessAir; -import net.minecraft.server.BlockBase; -import net.minecraft.server.BlockFalling; -import net.minecraft.server.BlockFire; -import net.minecraft.server.BlockPosition; -import net.minecraft.server.Blocks; -import net.minecraft.server.EntityHuman; -import net.minecraft.server.EnumHand; -import net.minecraft.server.IBlockData; -import net.minecraft.server.Item; -import net.minecraft.server.ItemRecord; -import net.minecraft.server.MovingObjectPositionBlock; -import net.minecraft.server.TileEntityFurnace; +import net.minecraft.core.BlockPosition; +import net.minecraft.world.EnumHand; +import net.minecraft.world.entity.player.EntityHuman; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemRecord; +import net.minecraft.world.level.BlockAccessAir; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.BlockFalling; +import net.minecraft.world.level.block.BlockFire; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.entity.TileEntityFurnace; +import net.minecraft.world.level.block.state.BlockBase; +import net.minecraft.world.level.block.state.IBlockData; +import net.minecraft.world.phys.MovingObjectPositionBlock; import org.bukkit.craftbukkit.inventory.CraftItemStack; import org.bukkit.craftbukkit.util.CraftMagicNumbers; import org.bukkit.enchantments.EnchantmentTarget; @@ -148,7 +148,7 @@ public class PerMaterialTest extends AbstractTestingBase { @Test public void isFuel() { - assertThat(material.isFuel(), is(TileEntityFurnace.isFuel(new net.minecraft.server.ItemStack(CraftMagicNumbers.getItem(material))))); + assertThat(material.isFuel(), is(TileEntityFurnace.isFuel(new net.minecraft.world.item.ItemStack(CraftMagicNumbers.getItem(material))))); } @Test @@ -219,7 +219,7 @@ public class PerMaterialTest extends AbstractTestingBase { if (material.isBlock()) { assertThat(material.isInteractable(), is(!CraftMagicNumbers.getBlock(material).getClass() - .getMethod("interact", IBlockData.class, net.minecraft.server.World.class, BlockPosition.class, EntityHuman.class, EnumHand.class, MovingObjectPositionBlock.class) + .getMethod("interact", IBlockData.class, net.minecraft.world.level.World.class, BlockPosition.class, EntityHuman.class, EnumHand.class, MovingObjectPositionBlock.class) .getDeclaringClass().equals(BlockBase.class))); } else { assertFalse(material.isInteractable()); diff --git a/src/test/java/org/bukkit/SoundTest.java b/src/test/java/org/bukkit/SoundTest.java index fa93eb059..3e05466c9 100644 --- a/src/test/java/org/bukkit/SoundTest.java +++ b/src/test/java/org/bukkit/SoundTest.java @@ -2,8 +2,8 @@ package org.bukkit; import static org.hamcrest.Matchers.*; import static org.junit.Assert.*; -import net.minecraft.server.IRegistry; -import net.minecraft.server.MinecraftKey; +import net.minecraft.core.IRegistry; +import net.minecraft.resources.MinecraftKey; import org.bukkit.craftbukkit.CraftSound; import org.bukkit.support.AbstractTestingBase; import org.junit.Test; @@ -27,13 +27,13 @@ public class SoundTest extends AbstractTestingBase { @Test public void testCategory() { for (SoundCategory category : SoundCategory.values()) { - assertNotNull(category + "", net.minecraft.server.SoundCategory.valueOf(category.name())); + assertNotNull(category + "", net.minecraft.sounds.SoundCategory.valueOf(category.name())); } } @Test public void testCategoryReverse() { - for (net.minecraft.server.SoundCategory category : net.minecraft.server.SoundCategory.values()) { + for (net.minecraft.sounds.SoundCategory category : net.minecraft.sounds.SoundCategory.values()) { assertNotNull(category + "", SoundCategory.valueOf(category.name())); } } diff --git a/src/test/java/org/bukkit/StatisticsAndAchievementsTest.java b/src/test/java/org/bukkit/StatisticsAndAchievementsTest.java index f45fa3fd6..d9c70d395 100644 --- a/src/test/java/org/bukkit/StatisticsAndAchievementsTest.java +++ b/src/test/java/org/bukkit/StatisticsAndAchievementsTest.java @@ -3,9 +3,9 @@ package org.bukkit; import static org.hamcrest.Matchers.*; import static org.junit.Assert.*; import com.google.common.collect.HashMultiset; -import net.minecraft.server.EntityTypes; -import net.minecraft.server.IRegistry; -import net.minecraft.server.StatisticWrapper; +import net.minecraft.core.IRegistry; +import net.minecraft.stats.StatisticWrapper; +import net.minecraft.world.entity.EntityTypes; import org.bukkit.craftbukkit.CraftStatistic; import org.bukkit.entity.EntityType; import org.bukkit.support.AbstractTestingBase; @@ -33,7 +33,7 @@ public class StatisticsAndAchievementsTest extends AbstractTestingBase { HashMultiset statistics = HashMultiset.create(); for (StatisticWrapper wrapper : IRegistry.STATS) { for (Object child : wrapper.getRegistry()) { - net.minecraft.server.Statistic statistic = wrapper.b(child); + net.minecraft.stats.Statistic statistic = wrapper.b(child); String message = String.format("org.bukkit.Statistic is missing: '%s'", statistic); Statistic subject = CraftStatistic.getBukkitStatistic(statistic); @@ -42,7 +42,7 @@ public class StatisticsAndAchievementsTest extends AbstractTestingBase { if (wrapper.getRegistry() == IRegistry.BLOCK || wrapper.getRegistry() == IRegistry.ITEM) { assertNotNull("Material type map missing for " + wrapper.getRegistry().getKey(child), CraftStatistic.getMaterialFromStatistic(statistic)); } else if (wrapper.getRegistry() == IRegistry.ENTITY_TYPE) { - assertNotNull("Entity type map missing for " + EntityTypes.getName((EntityTypes) child), CraftStatistic.getEntityTypeFromStatistic((net.minecraft.server.Statistic>) statistic)); + assertNotNull("Entity type map missing for " + EntityTypes.getName((EntityTypes) child), CraftStatistic.getEntityTypeFromStatistic((net.minecraft.stats.Statistic>) statistic)); } statistics.add(subject); diff --git a/src/test/java/org/bukkit/StructureTypeTest.java b/src/test/java/org/bukkit/StructureTypeTest.java index f25e13c08..4522e65e8 100644 --- a/src/test/java/org/bukkit/StructureTypeTest.java +++ b/src/test/java/org/bukkit/StructureTypeTest.java @@ -1,8 +1,8 @@ package org.bukkit; import java.util.Map; -import net.minecraft.server.IRegistry; -import net.minecraft.server.MinecraftKey; +import net.minecraft.core.IRegistry; +import net.minecraft.resources.MinecraftKey; import org.bukkit.support.AbstractTestingBase; import org.junit.Assert; import org.junit.BeforeClass; diff --git a/src/test/java/org/bukkit/block/banner/PatternTypeTest.java b/src/test/java/org/bukkit/block/banner/PatternTypeTest.java index 489d46c95..c7b6eed11 100644 --- a/src/test/java/org/bukkit/block/banner/PatternTypeTest.java +++ b/src/test/java/org/bukkit/block/banner/PatternTypeTest.java @@ -1,7 +1,7 @@ package org.bukkit.block.banner; import junit.framework.Assert; -import net.minecraft.server.EnumBannerPatternType; +import net.minecraft.world.level.block.entity.EnumBannerPatternType; import org.bukkit.support.AbstractTestingBase; import org.junit.Test; diff --git a/src/test/java/org/bukkit/craftbukkit/HeightMapTest.java b/src/test/java/org/bukkit/craftbukkit/HeightMapTest.java index 6db64c529..356ba6645 100644 --- a/src/test/java/org/bukkit/craftbukkit/HeightMapTest.java +++ b/src/test/java/org/bukkit/craftbukkit/HeightMapTest.java @@ -8,7 +8,7 @@ public class HeightMapTest { @Test public void heightMapConversionFromNMSToBukkitShouldNotThrowExceptio() { - for (net.minecraft.server.HeightMap.Type nmsHeightMapType : net.minecraft.server.HeightMap.Type.values()) { + for (net.minecraft.world.level.levelgen.HeightMap.Type nmsHeightMapType : net.minecraft.world.level.levelgen.HeightMap.Type.values()) { Assert.assertNotNull("fromNMS", CraftHeightMap.fromNMS(nmsHeightMapType)); } } diff --git a/src/test/java/org/bukkit/craftbukkit/attribute/AttributeTest.java b/src/test/java/org/bukkit/craftbukkit/attribute/AttributeTest.java index 586d044a0..09b61c247 100644 --- a/src/test/java/org/bukkit/craftbukkit/attribute/AttributeTest.java +++ b/src/test/java/org/bukkit/craftbukkit/attribute/AttributeTest.java @@ -1,8 +1,8 @@ package org.bukkit.craftbukkit.attribute; -import net.minecraft.server.AttributeBase; -import net.minecraft.server.IRegistry; -import net.minecraft.server.MinecraftKey; +import net.minecraft.core.IRegistry; +import net.minecraft.resources.MinecraftKey; +import net.minecraft.world.entity.ai.attributes.AttributeBase; import org.bukkit.attribute.Attribute; import org.bukkit.support.AbstractTestingBase; import org.junit.Assert; diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/DeprecatedItemMetaCustomValueTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/DeprecatedItemMetaCustomValueTest.java index 0ab65ac73..b075749ed 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/DeprecatedItemMetaCustomValueTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/DeprecatedItemMetaCustomValueTest.java @@ -6,7 +6,7 @@ import java.lang.reflect.Array; import java.nio.ByteBuffer; import java.util.Map; import java.util.UUID; -import net.minecraft.server.NBTTagCompound; +import net.minecraft.nbt.NBTTagCompound; import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.NamespacedKey; diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java index a33cb37f9..9a351c137 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java @@ -6,13 +6,13 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.UUID; -import net.minecraft.server.Block; -import net.minecraft.server.IRegistry; -import net.minecraft.server.ITileEntity; -import net.minecraft.server.Item; -import net.minecraft.server.ItemBlock; -import net.minecraft.server.ItemBlockWallable; -import net.minecraft.server.NBTTagCompound; +import net.minecraft.core.IRegistry; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemBlock; +import net.minecraft.world.item.ItemBlockWallable; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.ITileEntity; import org.bukkit.Bukkit; import org.bukkit.Color; import org.bukkit.DyeColor; diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/NMSCraftItemStackTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/NMSCraftItemStackTest.java index 5f5781230..8718e4570 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/NMSCraftItemStackTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/NMSCraftItemStackTest.java @@ -2,7 +2,7 @@ package org.bukkit.craftbukkit.inventory; import static org.hamcrest.Matchers.*; import static org.junit.Assert.*; -import net.minecraft.server.Enchantments; +import net.minecraft.world.item.enchantment.Enchantments; import org.bukkit.inventory.ItemStack; import org.bukkit.support.AbstractTestingBase; import org.junit.Test; @@ -11,7 +11,7 @@ public class NMSCraftItemStackTest extends AbstractTestingBase { @Test public void testCloneEnchantedItem() throws Exception { - net.minecraft.server.ItemStack nmsItemStack = new net.minecraft.server.ItemStack(net.minecraft.server.Items.POTION); + net.minecraft.world.item.ItemStack nmsItemStack = new net.minecraft.world.item.ItemStack(net.minecraft.world.item.Items.POTION); nmsItemStack.addEnchantment(Enchantments.DAMAGE_ALL, 1); ItemStack itemStack = CraftItemStack.asCraftMirror(nmsItemStack); ItemStack clone = itemStack.clone(); @@ -25,7 +25,7 @@ public class NMSCraftItemStackTest extends AbstractTestingBase { @Test public void testCloneNullItem() throws Exception { - net.minecraft.server.ItemStack nmsItemStack = null; + net.minecraft.world.item.ItemStack nmsItemStack = null; ItemStack itemStack = CraftItemStack.asCraftMirror(nmsItemStack); ItemStack clone = itemStack.clone(); assertThat(clone, is(itemStack)); diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/PersistentDataContainerTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/PersistentDataContainerTest.java index 6feee747e..ff9cc59c3 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/PersistentDataContainerTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/PersistentDataContainerTest.java @@ -6,7 +6,7 @@ import java.lang.reflect.Array; import java.nio.ByteBuffer; import java.util.Map; import java.util.UUID; -import net.minecraft.server.NBTTagCompound; +import net.minecraft.nbt.NBTTagCompound; import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.NamespacedKey; diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/PlayerInventoryTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/PlayerInventoryTest.java index 6f56e56af..724290302 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/PlayerInventoryTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/PlayerInventoryTest.java @@ -1,9 +1,9 @@ package org.bukkit.craftbukkit.inventory; import static org.junit.Assert.*; -import net.minecraft.server.ItemStack; -import net.minecraft.server.Items; -import net.minecraft.server.PlayerInventory; +import net.minecraft.world.entity.player.PlayerInventory; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; import org.bukkit.support.AbstractTestingBase; import org.junit.Test; diff --git a/src/test/java/org/bukkit/craftbukkit/util/CraftChatMessageTest.java b/src/test/java/org/bukkit/craftbukkit/util/CraftChatMessageTest.java index db11d48ab..acbaa8206 100644 --- a/src/test/java/org/bukkit/craftbukkit/util/CraftChatMessageTest.java +++ b/src/test/java/org/bukkit/craftbukkit/util/CraftChatMessageTest.java @@ -1,9 +1,9 @@ package org.bukkit.craftbukkit.util; import static org.junit.Assert.*; -import net.minecraft.server.ChatComponentText; -import net.minecraft.server.IChatBaseComponent; -import net.minecraft.server.IChatMutableComponent; +import net.minecraft.network.chat.ChatComponentText; +import net.minecraft.network.chat.IChatBaseComponent; +import net.minecraft.network.chat.IChatMutableComponent; import org.junit.Test; public class CraftChatMessageTest { diff --git a/src/test/java/org/bukkit/enchantments/EnchantmentTargetTest.java b/src/test/java/org/bukkit/enchantments/EnchantmentTargetTest.java index 983aff004..2a0507866 100644 --- a/src/test/java/org/bukkit/enchantments/EnchantmentTargetTest.java +++ b/src/test/java/org/bukkit/enchantments/EnchantmentTargetTest.java @@ -1,8 +1,8 @@ package org.bukkit.enchantments; -import net.minecraft.server.EnchantmentSlotType; -import net.minecraft.server.IRegistry; -import net.minecraft.server.Item; +import net.minecraft.core.IRegistry; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.enchantment.EnchantmentSlotType; import org.bukkit.Material; import org.bukkit.craftbukkit.util.CraftMagicNumbers; import org.junit.Assert; diff --git a/src/test/java/org/bukkit/entity/EnderDragonPhaseTest.java b/src/test/java/org/bukkit/entity/EnderDragonPhaseTest.java index b10fe0cd1..d51a0c15b 100644 --- a/src/test/java/org/bukkit/entity/EnderDragonPhaseTest.java +++ b/src/test/java/org/bukkit/entity/EnderDragonPhaseTest.java @@ -1,6 +1,6 @@ package org.bukkit.entity; -import net.minecraft.server.DragonControllerPhase; +import net.minecraft.world.entity.boss.enderdragon.phases.DragonControllerPhase; import org.bukkit.craftbukkit.entity.CraftEnderDragon; import org.junit.Assert; import org.junit.Test; diff --git a/src/test/java/org/bukkit/entity/EntityTypesTest.java b/src/test/java/org/bukkit/entity/EntityTypesTest.java index af570ccfd..7ed98bb67 100644 --- a/src/test/java/org/bukkit/entity/EntityTypesTest.java +++ b/src/test/java/org/bukkit/entity/EntityTypesTest.java @@ -3,9 +3,9 @@ package org.bukkit.entity; import java.util.Arrays; import java.util.Set; import java.util.stream.Collectors; -import net.minecraft.server.EntityTypes; -import net.minecraft.server.IRegistry; -import net.minecraft.server.MinecraftKey; +import net.minecraft.core.IRegistry; +import net.minecraft.resources.MinecraftKey; +import net.minecraft.world.entity.EntityTypes; import org.bukkit.support.AbstractTestingBase; import org.junit.Assert; import org.junit.Test; diff --git a/src/test/java/org/bukkit/entity/PandaGeneTest.java b/src/test/java/org/bukkit/entity/PandaGeneTest.java index 5505e1490..0b8e214b2 100644 --- a/src/test/java/org/bukkit/entity/PandaGeneTest.java +++ b/src/test/java/org/bukkit/entity/PandaGeneTest.java @@ -1,6 +1,6 @@ package org.bukkit.entity; -import net.minecraft.server.EntityPanda; +import net.minecraft.world.entity.animal.EntityPanda; import org.bukkit.craftbukkit.entity.CraftPanda; import org.junit.Assert; import org.junit.Test; diff --git a/src/test/java/org/bukkit/entity/memory/CraftMemoryKeyTest.java b/src/test/java/org/bukkit/entity/memory/CraftMemoryKeyTest.java index 2bda0c73a..afbbaa60d 100644 --- a/src/test/java/org/bukkit/entity/memory/CraftMemoryKeyTest.java +++ b/src/test/java/org/bukkit/entity/memory/CraftMemoryKeyTest.java @@ -1,8 +1,8 @@ package org.bukkit.entity.memory; -import net.minecraft.server.GlobalPos; -import net.minecraft.server.IRegistry; -import net.minecraft.server.MemoryModuleType; +import net.minecraft.core.GlobalPos; +import net.minecraft.core.IRegistry; +import net.minecraft.world.entity.ai.memory.MemoryModuleType; import org.bukkit.Location; import org.bukkit.craftbukkit.entity.memory.CraftMemoryKey; import org.bukkit.support.AbstractTestingBase; diff --git a/src/test/java/org/bukkit/map/MapTest.java b/src/test/java/org/bukkit/map/MapTest.java index 029834a1e..37cae0859 100644 --- a/src/test/java/org/bukkit/map/MapTest.java +++ b/src/test/java/org/bukkit/map/MapTest.java @@ -3,7 +3,7 @@ package org.bukkit.map; import java.awt.Color; import java.util.logging.Level; import java.util.logging.Logger; -import net.minecraft.server.MaterialMapColor; +import net.minecraft.world.level.material.MaterialMapColor; import org.junit.Assert; import org.junit.Test; diff --git a/src/test/java/org/bukkit/potion/PotionTest.java b/src/test/java/org/bukkit/potion/PotionTest.java index ebd2efa5a..95eb6bbe3 100644 --- a/src/test/java/org/bukkit/potion/PotionTest.java +++ b/src/test/java/org/bukkit/potion/PotionTest.java @@ -4,11 +4,11 @@ import static org.junit.Assert.*; import java.util.EnumMap; import java.util.List; import java.util.Map; -import net.minecraft.server.IRegistry; -import net.minecraft.server.MinecraftKey; -import net.minecraft.server.MobEffect; -import net.minecraft.server.MobEffectList; -import net.minecraft.server.PotionRegistry; +import net.minecraft.core.IRegistry; +import net.minecraft.resources.MinecraftKey; +import net.minecraft.world.effect.MobEffect; +import net.minecraft.world.effect.MobEffectList; +import net.minecraft.world.item.alchemy.PotionRegistry; import org.bukkit.support.AbstractTestingBase; import org.junit.Test; diff --git a/src/test/java/org/bukkit/support/AbstractTestingBase.java b/src/test/java/org/bukkit/support/AbstractTestingBase.java index 75a5c0818..5831d6d38 100644 --- a/src/test/java/org/bukkit/support/AbstractTestingBase.java +++ b/src/test/java/org/bukkit/support/AbstractTestingBase.java @@ -6,13 +6,13 @@ import java.util.Collections; import java.util.List; import java.util.concurrent.CompletableFuture; import net.minecraft.server.DispenserRegistry; -import net.minecraft.server.EnumResourcePackType; -import net.minecraft.server.LootPredicateManager; -import net.minecraft.server.LootTableRegistry; -import net.minecraft.server.ResourceManager; -import net.minecraft.server.ResourcePackVanilla; -import net.minecraft.server.TagRegistry; -import net.minecraft.server.Unit; +import net.minecraft.server.packs.EnumResourcePackType; +import net.minecraft.server.packs.ResourcePackVanilla; +import net.minecraft.server.packs.resources.ResourceManager; +import net.minecraft.tags.TagRegistry; +import net.minecraft.util.Unit; +import net.minecraft.world.level.storage.loot.LootPredicateManager; +import net.minecraft.world.level.storage.loot.LootTableRegistry; import org.bukkit.Material; import org.bukkit.craftbukkit.util.CraftMagicNumbers; import org.junit.Assert; diff --git a/src/test/java/org/bukkit/support/DummyEnchantments.java b/src/test/java/org/bukkit/support/DummyEnchantments.java index f3cc27e71..7a6b74e19 100644 --- a/src/test/java/org/bukkit/support/DummyEnchantments.java +++ b/src/test/java/org/bukkit/support/DummyEnchantments.java @@ -1,6 +1,6 @@ package org.bukkit.support; -import net.minecraft.server.Enchantments; +import net.minecraft.world.item.enchantment.Enchantments; public class DummyEnchantments { static {