mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-12 04:06:52 +01:00
85f704e537
Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
141 lines
9.0 KiB
Diff
141 lines
9.0 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
|
|
Date: Sat, 16 Mar 2024 18:58:41 +0100
|
|
Subject: [PATCH] Code generation marker stub
|
|
|
|
|
|
diff --git a/src/main/java/io/papermc/paper/registry/PaperRegistries.java b/src/main/java/io/papermc/paper/registry/PaperRegistries.java
|
|
index b81d0d906789ef2ff3759395821316462aacf323..860223691f37ca3ecedbf0ceb73feb8a361df19e 100644
|
|
--- a/src/main/java/io/papermc/paper/registry/PaperRegistries.java
|
|
+++ b/src/main/java/io/papermc/paper/registry/PaperRegistries.java
|
|
@@ -82,6 +82,7 @@ public final class PaperRegistries {
|
|
private static final Map<ResourceKey<?>, RegistryEntry<?, ?>> BY_RESOURCE_KEY;
|
|
static {
|
|
REGISTRY_ENTRIES = List.of(
|
|
+ // Paper start - Generated/RegistryDefinitions
|
|
// built-ins
|
|
writable(Registries.GAME_EVENT, RegistryKey.GAME_EVENT, GameEvent.class, CraftGameEvent::new, PaperGameEventRegistryEntry.PaperBuilder::new),
|
|
entry(Registries.STRUCTURE_TYPE, RegistryKey.STRUCTURE_TYPE, StructureType.class, CraftStructureType::new),
|
|
@@ -117,6 +118,7 @@ public final class PaperRegistries {
|
|
apiOnly(Registries.PARTICLE_TYPE, RegistryKey.PARTICLE_TYPE, PaperSimpleRegistry::particleType),
|
|
apiOnly(Registries.POTION, RegistryKey.POTION, PaperSimpleRegistry::potion),
|
|
apiOnly(Registries.MEMORY_MODULE_TYPE, RegistryKey.MEMORY_MODULE_TYPE, () -> (org.bukkit.Registry<MemoryKey<?>>) (org.bukkit.Registry) org.bukkit.Registry.MEMORY_MODULE_TYPE)
|
|
+ // Paper end - Generated/RegistryDefinitions
|
|
);
|
|
final Map<RegistryKey<?>, RegistryEntry<?, ?>> byRegistryKey = new IdentityHashMap<>(REGISTRY_ENTRIES.size());
|
|
final Map<ResourceKey<?>, RegistryEntry<?, ?>> byResourceKey = new IdentityHashMap<>(REGISTRY_ENTRIES.size());
|
|
diff --git a/src/main/java/io/papermc/paper/world/flag/PaperFeatureFlagProviderImpl.java b/src/main/java/io/papermc/paper/world/flag/PaperFeatureFlagProviderImpl.java
|
|
index 8a2fb217501bb6293adf54686420ef7d1ce2ec11..c16b54ae7446fb60890f4a9e9a96e162d028c4c7 100644
|
|
--- a/src/main/java/io/papermc/paper/world/flag/PaperFeatureFlagProviderImpl.java
|
|
+++ b/src/main/java/io/papermc/paper/world/flag/PaperFeatureFlagProviderImpl.java
|
|
@@ -19,11 +19,13 @@ import org.bukkit.potion.PotionType;
|
|
public class PaperFeatureFlagProviderImpl implements FeatureFlagProvider {
|
|
|
|
public static final BiMap<FeatureFlag, net.minecraft.world.flag.FeatureFlag> FLAGS = ImmutableBiMap.of(
|
|
+ // Paper start - Generated/PaperFeatureFlagProviderImpl#FLAGS
|
|
FeatureFlag.VANILLA, FeatureFlags.VANILLA,
|
|
FeatureFlag.TRADE_REBALANCE, FeatureFlags.TRADE_REBALANCE,
|
|
FeatureFlag.MINECART_IMPROVEMENTS, FeatureFlags.MINECART_IMPROVEMENTS,
|
|
FeatureFlag.REDSTONE_EXPERIMENTS, FeatureFlags.REDSTONE_EXPERIMENTS,
|
|
FeatureFlag.WINTER_DROP, FeatureFlags.WINTER_DROP
|
|
+ // Paper end - Generated/PaperFeatureFlagProviderImpl#FLAGS
|
|
);
|
|
|
|
@Override
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftStatistic.java b/src/main/java/org/bukkit/craftbukkit/CraftStatistic.java
|
|
index ccee1f637db5b8c34a5c125938edaa1361233e4d..c3c6ac5afe9ac09bcd20d51b8b97295323b644e9 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftStatistic.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftStatistic.java
|
|
@@ -20,6 +20,7 @@ import org.bukkit.craftbukkit.inventory.CraftItemType;
|
|
import org.bukkit.entity.EntityType;
|
|
|
|
public enum CraftStatistic {
|
|
+ // Paper start - Generated/CraftStatisticCustom
|
|
DAMAGE_DEALT(Stats.DAMAGE_DEALT),
|
|
DAMAGE_TAKEN(Stats.DAMAGE_TAKEN),
|
|
DEATHS(Stats.DEATHS),
|
|
@@ -102,7 +103,10 @@ public enum CraftStatistic {
|
|
INTERACT_WITH_GRINDSTONE(Stats.INTERACT_WITH_GRINDSTONE),
|
|
TARGET_HIT(Stats.TARGET_HIT),
|
|
INTERACT_WITH_SMITHING_TABLE(Stats.INTERACT_WITH_SMITHING_TABLE),
|
|
+ // Paper end - Generated/CraftStatisticCustom
|
|
+ // Paper start - Generated/CraftStatisticType
|
|
STRIDER_ONE_CM(Stats.STRIDER_ONE_CM);
|
|
+ // Paper end - Generated/CraftStatisticType
|
|
private final ResourceLocation minecraftKey;
|
|
private final org.bukkit.Statistic bukkit;
|
|
private static final BiMap<ResourceLocation, org.bukkit.Statistic> statistics;
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java
|
|
index 56453454cbd4b9e9270fc833f8ab38d5fa7a3763..b17011ef1f206eb1610425ec0a60434b1b73e4f6 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java
|
|
@@ -133,7 +133,7 @@ public final class CraftBlockStates {
|
|
// Paper end
|
|
|
|
static {
|
|
- // Paper start - simplify
|
|
+ // Paper start - Generated/CraftBlockEntityStates
|
|
register(BlockEntityType.SIGN, CraftSign.class, CraftSign::new);
|
|
register(BlockEntityType.HANGING_SIGN, CraftHangingSign.class, CraftHangingSign::new);
|
|
register(BlockEntityType.SKULL, CraftSkull.class, CraftSkull::new);
|
|
@@ -179,7 +179,7 @@ public final class CraftBlockStates {
|
|
register(BlockEntityType.CRAFTER, CraftCrafter.class, CraftCrafter::new);
|
|
register(BlockEntityType.TRIAL_SPAWNER, CraftTrialSpawner.class, CraftTrialSpawner::new);
|
|
register(BlockEntityType.VAULT, CraftVault.class, CraftVault::new);
|
|
- // Paper end
|
|
+ // Paper end - Generated/CraftBlockEntityStates
|
|
}
|
|
|
|
private static void register(Material blockType, BlockStateFactory<?> factory) {
|
|
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 8fef0485386d1940d9189b8acfa5ae4679ad4892..6cfe7135a9d619a27839ef2c4ae276b29a5a9ad8 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
|
|
@@ -368,6 +368,7 @@ public class CraftBlockData implements BlockData {
|
|
|
|
static {
|
|
//<editor-fold desc="CraftBlockData Registration" defaultstate="collapsed">
|
|
+ // Paper start - Generated/CraftBlockData#MAP
|
|
register(net.minecraft.world.level.block.AmethystClusterBlock.class, org.bukkit.craftbukkit.block.impl.CraftAmethystCluster::new);
|
|
register(net.minecraft.world.level.block.BigDripleafBlock.class, org.bukkit.craftbukkit.block.impl.CraftBigDripleaf::new);
|
|
register(net.minecraft.world.level.block.BigDripleafStemBlock.class, org.bukkit.craftbukkit.block.impl.CraftBigDripleafStem::new);
|
|
@@ -543,6 +544,7 @@ public class CraftBlockData implements BlockData {
|
|
register(net.minecraft.world.level.block.piston.PistonBaseBlock.class, org.bukkit.craftbukkit.block.impl.CraftPistonBase::new);
|
|
register(net.minecraft.world.level.block.piston.PistonHeadBlock.class, org.bukkit.craftbukkit.block.impl.CraftPistonHead::new);
|
|
register(net.minecraft.world.level.block.piston.MovingPistonBlock.class, org.bukkit.craftbukkit.block.impl.CraftMovingPiston::new);
|
|
+ // Paper end - Generated/CraftBlockData#MAP
|
|
//</editor-fold>
|
|
}
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionUtil.java b/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionUtil.java
|
|
index cb11f0624e4e65aa06bfaaec90729ee536cd53a0..aa3a923a61146702736c9ffb5bdea64b1552efa5 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionUtil.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionUtil.java
|
|
@@ -14,6 +14,7 @@ import org.bukkit.potion.PotionType;
|
|
public class CraftPotionUtil {
|
|
|
|
private static final BiMap<PotionType, PotionType> upgradeable = ImmutableBiMap.<PotionType, PotionType>builder()
|
|
+ // Paper start - Generated/CraftPotionUtil#upgradeable
|
|
.put(PotionType.LEAPING, PotionType.STRONG_LEAPING)
|
|
.put(PotionType.SWIFTNESS, PotionType.STRONG_SWIFTNESS)
|
|
.put(PotionType.HEALING, PotionType.STRONG_HEALING)
|
|
@@ -23,8 +24,10 @@ public class CraftPotionUtil {
|
|
.put(PotionType.STRENGTH, PotionType.STRONG_STRENGTH)
|
|
.put(PotionType.SLOWNESS, PotionType.STRONG_SLOWNESS)
|
|
.put(PotionType.TURTLE_MASTER, PotionType.STRONG_TURTLE_MASTER)
|
|
+ // Paper end - Generated/CraftPotionUtil#upgradeable
|
|
.build();
|
|
private static final BiMap<PotionType, PotionType> extendable = ImmutableBiMap.<PotionType, PotionType>builder()
|
|
+ // Paper start - Generated/CraftPotionUtil#extendable
|
|
.put(PotionType.NIGHT_VISION, PotionType.LONG_NIGHT_VISION)
|
|
.put(PotionType.INVISIBILITY, PotionType.LONG_INVISIBILITY)
|
|
.put(PotionType.LEAPING, PotionType.LONG_LEAPING)
|
|
@@ -38,6 +41,7 @@ public class CraftPotionUtil {
|
|
.put(PotionType.WEAKNESS, PotionType.LONG_WEAKNESS)
|
|
.put(PotionType.TURTLE_MASTER, PotionType.LONG_TURTLE_MASTER)
|
|
.put(PotionType.SLOW_FALLING, PotionType.LONG_SLOW_FALLING)
|
|
+ // Paper end - Generated/CraftPotionUtil#extendable
|
|
.build();
|
|
|
|
public static PotionType fromBukkit(PotionData data) {
|