Update to Minecraft 1.16.3

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2020-09-11 07:00:00 +10:00
parent 64a5548668
commit 5425f6ba43
27 changed files with 67 additions and 113 deletions

View File

@@ -751,7 +751,7 @@ public final class CraftServer implements Server {
configuration = YamlConfiguration.loadConfiguration(getConfigFile());
commandsConfiguration = YamlConfiguration.loadConfiguration(getCommandsConfigFile());
console.propertyManager = new DedicatedServerSettings(console.aX(), console.options);
console.propertyManager = new DedicatedServerSettings(console.getCustomRegistry(), console.options);
DedicatedServerProperties config = console.propertyManager.getProperties();
console.setPVP(config.pvp);
@@ -983,7 +983,7 @@ public final class CraftServer implements Server {
boolean hardcore = creator.hardcore();
RegistryReadOps<NBTBase> registryreadops = RegistryReadOps.a((DynamicOps) DynamicOpsNBT.a, console.dataPackResources.h(), console.f);
RegistryReadOps<NBTBase> registryreadops = RegistryReadOps.a((DynamicOps) DynamicOpsNBT.a, console.dataPackResources.h(), console.customRegistry);
WorldDataServer worlddata = (WorldDataServer) worldSession.a((DynamicOps) registryreadops, console.datapackconfiguration);
WorldSettings worldSettings;
@@ -995,7 +995,7 @@ public final class CraftServer implements Server {
properties.put("generate-structures", Objects.toString(creator.generateStructures()));
properties.put("level-type", Objects.toString(creator.type().getName()));
GeneratorSettings generatorsettings = GeneratorSettings.a(console.aX(), properties);
GeneratorSettings generatorsettings = GeneratorSettings.a(console.getCustomRegistry(), properties);
worldSettings = new WorldSettings(name, EnumGamemode.getById(getDefaultGameMode().getValue()), hardcore, EnumDifficulty.EASY, false, new GameRules(), console.datapackconfiguration);
worlddata = new WorldDataServer(worldSettings, generatorsettings, Lifecycle.stable());
}
@@ -1018,8 +1018,8 @@ public final class CraftServer implements Server {
net.minecraft.server.ChunkGenerator chunkgenerator;
if (worlddimension == null) {
dimensionmanager = (DimensionManager) console.f.a().d(DimensionManager.OVERWORLD);
chunkgenerator = GeneratorSettings.a(console.f.b(IRegistry.ay), console.f.b(IRegistry.ar), (new Random()).nextLong());
dimensionmanager = (DimensionManager) console.customRegistry.a().d(DimensionManager.OVERWORLD);
chunkgenerator = GeneratorSettings.a(console.customRegistry.b(IRegistry.ay), console.customRegistry.b(IRegistry.ar), (new Random()).nextLong());
} else {
dimensionmanager = worlddimension.b();
chunkgenerator = worlddimension.c();

View File

@@ -149,8 +149,8 @@ public class Main {
}
float javaVersion = Float.parseFloat(System.getProperty("java.class.version"));
if (javaVersion > 58.0) {
System.err.println("Unsupported Java detected (" + javaVersion + "). Only up to Java 14 is supported.");
if (javaVersion > 59.0) {
System.err.println("Unsupported Java detected (" + javaVersion + "). Only up to Java 15 is supported.");
return;
}
@@ -177,7 +177,7 @@ public class Main {
useConsole = false;
}
if (false && Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) {
if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) {
Date buildDate = new Date(Integer.parseInt(Main.class.getPackage().getImplementationVendor()) * 1000L);
Calendar deadline = Calendar.getInstance();

View File

@@ -39,7 +39,7 @@ public class CraftBarrel extends CraftLootable<TileEntityBarrel> implements Barr
requirePlaced();
if (!getTileEntity().opened) {
IBlockData blockData = getTileEntity().getBlock();
boolean open = blockData.get(BlockBarrel.b);
boolean open = blockData.get(BlockBarrel.OPEN);
if (!open) {
getTileEntity().setOpenFlag(blockData, true);

View File

@@ -636,7 +636,7 @@ public class CraftBlock implements Block {
@Override
public boolean applyBoneMeal(BlockFace face) {
EnumDirection direction = blockFaceToNotch(face);
ItemActionContext context = new ItemActionContext(getCraftWorld().getHandle(), null, EnumHand.MAIN_HAND, Items.BONE_MEAL.r(), new MovingObjectPositionBlock(Vec3D.a, direction, getPosition(), false)); // PAIL rename createItemStack, ZERO
ItemActionContext context = new ItemActionContext(getCraftWorld().getHandle(), null, EnumHand.MAIN_HAND, Items.BONE_MEAL.createItemStack(), new MovingObjectPositionBlock(Vec3D.ORIGIN, direction, getPosition(), false));
return ItemBoneMeal.applyBonemeal(context) == EnumInteractionResult.SUCCESS;
}

View File

@@ -216,16 +216,16 @@ public class CraftArmorStand extends CraftLivingEntity implements ArmorStand {
@Override
public void addEquipmentLock(EquipmentSlot equipmentSlot, LockType lockType) {
getHandle().bv |= (1 << CraftEquipmentSlot.getNMS(equipmentSlot).c() + lockType.ordinal() * 8); // PAIL c() rename getSlotFlag()
getHandle().disabledSlots |= (1 << CraftEquipmentSlot.getNMS(equipmentSlot).getSlotFlag() + lockType.ordinal() * 8);
}
@Override
public void removeEquipmentLock(EquipmentSlot equipmentSlot, LockType lockType) {
getHandle().bv &= ~(1 << CraftEquipmentSlot.getNMS(equipmentSlot).c() + lockType.ordinal() * 8);
getHandle().disabledSlots &= ~(1 << CraftEquipmentSlot.getNMS(equipmentSlot).getSlotFlag() + lockType.ordinal() * 8);
}
@Override
public boolean hasEquipmentLock(EquipmentSlot equipmentSlot, LockType lockType) {
return (getHandle().bv & (1 << CraftEquipmentSlot.getNMS(equipmentSlot).c() + lockType.ordinal() * 8)) != 0;
return (getHandle().disabledSlots & (1 << CraftEquipmentSlot.getNMS(equipmentSlot).getSlotFlag() + lockType.ordinal() * 8)) != 0;
}
}

View File

@@ -54,12 +54,12 @@ public class CraftEnderSignal extends CraftEntity implements EnderSignal {
@Override
public ItemStack getItem() {
return CraftItemStack.asBukkitCopy(getHandle().g()); // PAIL rename getItemStack
return CraftItemStack.asBukkitCopy(getHandle().getItem());
}
@Override
public void setItem(ItemStack item) {
getHandle().b(item != null ? CraftItemStack.asNMSCopy(item) : Items.ENDER_EYE.r()); // PAIL rename setItemStack, createItemStack
getHandle().setItem(item != null ? CraftItemStack.asNMSCopy(item) : Items.ENDER_EYE.createItemStack());
}
@Override

View File

@@ -248,12 +248,12 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@Override
public int getArrowCooldown() {
return getHandle().al; // PAIL rename arrowCooldown
return getHandle().arrowCooldown;
}
@Override
public void setArrowCooldown(int ticks) {
getHandle().al = ticks;
getHandle().arrowCooldown = ticks;
}
@Override
@@ -264,7 +264,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@Override
public void setArrowsInBody(int count) {
Preconditions.checkArgument(count >= 0, "New arrow amount must be >= 0");
getHandle().getDataWatcher().set(EntityLiving.bh, count);
getHandle().getDataWatcher().set(EntityLiving.ARROWS_IN_BODY, count);
}
@Override
@@ -669,7 +669,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
return EntityCategory.ARTHROPOD;
} else if (type == EnumMonsterType.ILLAGER) {
return EntityCategory.ILLAGER;
} else if (type == EnumMonsterType.e) { // PAIL rename WATER_MOB
} else if (type == EnumMonsterType.WATER_MOB) {
return EntityCategory.WATER;
}

View File

@@ -204,7 +204,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
* @return string
*/
public String getMappingsVersion() {
return "c2d5d7871edcc4fb0f81d18959c647af";
return "09f04031f41cb54f1077c6ac348cc220";
}
@Override