fix some compilation issues

This commit is contained in:
granny
2025-11-27 00:02:58 -08:00
parent 353347fa8c
commit 210819114b
19 changed files with 78 additions and 78 deletions

View File

@@ -12,7 +12,7 @@ import net.kyori.adventure.text.minimessage.MiniMessage;
import net.minecraft.core.Registry;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.resources.Identifier;
import net.minecraft.server.MinecraftServer;
import net.minecraft.world.entity.EntityDimensions;
import net.minecraft.world.entity.EntityType;
@@ -396,7 +396,7 @@ public class PurpurConfig {
}
getList("settings.blocks.grindstone.ignored-enchants", defaultCurses).forEach(key -> {
Registry<Enchantment> registry = MinecraftServer.getServer().registryAccess().lookupOrThrow(Registries.ENCHANTMENT);
Enchantment enchantment = registry.getValue(ResourceLocation.parse(key.toString()));
Enchantment enchantment = registry.getValue(Identifier.parse(key.toString()));
if (enchantment == null) return;
grindstoneIgnoredEnchants.add(enchantment);
});
@@ -525,7 +525,7 @@ public class PurpurConfig {
private static void blastResistanceSettings() {
getMap("settings.blast-resistance-overrides", Collections.emptyMap()).forEach((blockId, value) -> {
Block block = BuiltInRegistries.BLOCK.getValue(ResourceLocation.parse(blockId));
Block block = BuiltInRegistries.BLOCK.getValue(Identifier.parse(blockId));
if (block == Blocks.AIR) {
log(Level.SEVERE, "Invalid block for `settings.blast-resistance-overrides`: " + blockId);
return;
@@ -557,7 +557,7 @@ public class PurpurConfig {
Map.entry("minecraft:purple_bed", Map.of("distance", 0.5F)),
Map.entry("minecraft:magenta_bed", Map.of("distance", 0.5F))
)).forEach((blockId, value) -> {
Block block = BuiltInRegistries.BLOCK.getValue(ResourceLocation.parse(blockId));
Block block = BuiltInRegistries.BLOCK.getValue(Identifier.parse(blockId));
if (block == Blocks.AIR) {
log(Level.SEVERE, "Invalid block for `settings.block-fall-multipliers`: " + blockId);
return;

View File

@@ -7,7 +7,7 @@ import java.util.Set;
import java.util.function.Predicate;
import java.util.logging.Level;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.resources.Identifier;
import net.minecraft.util.Mth;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.monster.Shulker;
@@ -262,7 +262,7 @@ public class PurpurWorldConfig {
public List<Item> itemImmuneToFire = new ArrayList<>();
public List<Item> itemImmuneToLightning = new ArrayList<>();
public boolean dontRunWithScissors = false;
public ResourceLocation dontRunWithScissorsItemModelReference = ResourceLocation.parse("purpurmc:scissors");
public Identifier dontRunWithScissorsItemModelReference = Identifier.parse("purpurmc:scissors");
public boolean ignoreScissorsInWater = false;
public boolean ignoreScissorsInLava = false;
public double scissorsRunningDamage = 1D;
@@ -283,7 +283,7 @@ public class PurpurWorldConfig {
BuiltInRegistries.ITEM.stream().filter(item -> item != Items.AIR).forEach((item) -> itemImmuneToCactus.add(item));
return;
}
Item item = BuiltInRegistries.ITEM.getValue(ResourceLocation.parse(key.toString()));
Item item = BuiltInRegistries.ITEM.getValue(Identifier.parse(key.toString()));
if (item != Items.AIR) itemImmuneToCactus.add(item);
});
itemImmuneToExplosion.clear();
@@ -292,7 +292,7 @@ public class PurpurWorldConfig {
BuiltInRegistries.ITEM.stream().filter(item -> item != Items.AIR).forEach((item) -> itemImmuneToExplosion.add(item));
return;
}
Item item = BuiltInRegistries.ITEM.getValue(ResourceLocation.parse(key.toString()));
Item item = BuiltInRegistries.ITEM.getValue(Identifier.parse(key.toString()));
if (item != Items.AIR) itemImmuneToExplosion.add(item);
});
itemImmuneToFire.clear();
@@ -301,7 +301,7 @@ public class PurpurWorldConfig {
BuiltInRegistries.ITEM.stream().filter(item -> item != Items.AIR).forEach((item) -> itemImmuneToFire.add(item));
return;
}
Item item = BuiltInRegistries.ITEM.getValue(ResourceLocation.parse(key.toString()));
Item item = BuiltInRegistries.ITEM.getValue(Identifier.parse(key.toString()));
if (item != Items.AIR) itemImmuneToFire.add(item);
});
itemImmuneToLightning.clear();
@@ -310,11 +310,11 @@ public class PurpurWorldConfig {
BuiltInRegistries.ITEM.stream().filter(item -> item != Items.AIR).forEach((item) -> itemImmuneToLightning.add(item));
return;
}
Item item = BuiltInRegistries.ITEM.getValue(ResourceLocation.parse(key.toString()));
Item item = BuiltInRegistries.ITEM.getValue(Identifier.parse(key.toString()));
if (item != Items.AIR) itemImmuneToLightning.add(item);
});
dontRunWithScissors = getBoolean("gameplay-mechanics.item.shears.damage-if-sprinting", dontRunWithScissors);
dontRunWithScissorsItemModelReference = ResourceLocation.parse(getString("gameplay-mechanics.item.shears.damage-if-sprinting-item-model", "purpurmc:scissors"));
dontRunWithScissorsItemModelReference = Identifier.parse(getString("gameplay-mechanics.item.shears.damage-if-sprinting-item-model", "purpurmc:scissors"));
ignoreScissorsInWater = getBoolean("gameplay-mechanics.item.shears.ignore-in-water", ignoreScissorsInWater);
ignoreScissorsInLava = getBoolean("gameplay-mechanics.item.shears.ignore-in-lava", ignoreScissorsInLava);
scissorsRunningDamage = getDouble("gameplay-mechanics.item.shears.sprinting-damage", scissorsRunningDamage);
@@ -382,7 +382,7 @@ public class PurpurWorldConfig {
ConfigurationSection section = getConfigurationSection("gameplay-mechanics.minecart.controllable.block-speed");
if (section != null) {
for (String key : section.getKeys(false)) {
Block block = BuiltInRegistries.BLOCK.getValue(ResourceLocation.parse(key));
Block block = BuiltInRegistries.BLOCK.getValue(Identifier.parse(key));
if (block != Blocks.AIR) {
minecartControllableBlockSpeeds.put(block, section.getDouble(key, minecartControllableBaseSpeed));
}
@@ -523,7 +523,7 @@ public class PurpurWorldConfig {
"minecraft:diamond_pickaxe",
"minecraft:netherite_pickaxe"
)).forEach(key -> {
Item item = BuiltInRegistries.ITEM.getValue(ResourceLocation.parse(key.toString()));
Item item = BuiltInRegistries.ITEM.getValue(Identifier.parse(key.toString()));
if (item != Items.AIR) silkTouchTools.add(item);
});
}
@@ -714,17 +714,17 @@ public class PurpurWorldConfig {
Map.entry("minecraft:bamboo_block", Map.of("into", "minecraft:stripped_bamboo_block", "drops", new HashMap<String, Double>()))
)
).forEach((blockId, obj) -> {
Block block = BuiltInRegistries.BLOCK.getValue(ResourceLocation.parse(blockId));
Block block = BuiltInRegistries.BLOCK.getValue(Identifier.parse(blockId));
if (block == Blocks.AIR) { PurpurConfig.log(Level.SEVERE, "Invalid block for `tools.axe.strippables`: " + blockId); return; }
if (!(obj instanceof Map<?, ?> map)) { PurpurConfig.log(Level.SEVERE, "Invalid yaml for `tools.axe.strippables." + blockId + "`"); return; }
String intoId = (String) map.get("into");
Block into = BuiltInRegistries.BLOCK.getValue(ResourceLocation.parse(intoId));
Block into = BuiltInRegistries.BLOCK.getValue(Identifier.parse(intoId));
if (into == Blocks.AIR) { PurpurConfig.log(Level.SEVERE, "Invalid block for `tools.axe.strippables." + blockId + ".into`: " + intoId); return; }
Object dropsObj = map.get("drops");
if (!(dropsObj instanceof Map<?, ?> dropsMap)) { PurpurConfig.log(Level.SEVERE, "Invalid yaml for `tools.axe.strippables." + blockId + ".drops`"); return; }
Map<Item, Double> drops = new HashMap<>();
dropsMap.forEach((itemId, chance) -> {
Item item = BuiltInRegistries.ITEM.getValue(ResourceLocation.parse(itemId.toString()));
Item item = BuiltInRegistries.ITEM.getValue(Identifier.parse(itemId.toString()));
if (item == Items.AIR) { PurpurConfig.log(Level.SEVERE, "Invalid item for `tools.axe.strippables." + blockId + ".drops`: " + itemId); return; }
drops.put(item, (double) chance);
});
@@ -792,17 +792,17 @@ public class PurpurWorldConfig {
Map.entry("minecraft:waxed_weathered_copper_lantern", Map.of("into", "minecraft:weathered_copper_lantern", "drops", new HashMap<String, Double>())),
Map.entry("minecraft:waxed_oxidized_copper_lantern", Map.of("into", "minecraft:oxidized_copper_lantern", "drops", new HashMap<String, Double>())))
).forEach((blockId, obj) -> {
Block block = BuiltInRegistries.BLOCK.getValue(ResourceLocation.parse(blockId));
Block block = BuiltInRegistries.BLOCK.getValue(Identifier.parse(blockId));
if (block == Blocks.AIR) { PurpurConfig.log(Level.SEVERE, "Invalid block for `tools.axe.waxables`: " + blockId); return; }
if (!(obj instanceof Map<?, ?> map)) { PurpurConfig.log(Level.SEVERE, "Invalid yaml for `tools.axe.waxables." + blockId + "`"); return; }
String intoId = (String) map.get("into");
Block into = BuiltInRegistries.BLOCK.getValue(ResourceLocation.parse(intoId));
Block into = BuiltInRegistries.BLOCK.getValue(Identifier.parse(intoId));
if (into == Blocks.AIR) { PurpurConfig.log(Level.SEVERE, "Invalid block for `tools.axe.waxables." + blockId + ".into`: " + intoId); return; }
Object dropsObj = map.get("drops");
if (!(dropsObj instanceof Map<?, ?> dropsMap)) { PurpurConfig.log(Level.SEVERE, "Invalid yaml for `tools.axe.waxables." + blockId + ".drops`"); return; }
Map<Item, Double> drops = new HashMap<>();
dropsMap.forEach((itemId, chance) -> {
Item item = BuiltInRegistries.ITEM.getValue(ResourceLocation.parse(itemId.toString()));
Item item = BuiltInRegistries.ITEM.getValue(Identifier.parse(itemId.toString()));
if (item == Items.AIR) { PurpurConfig.log(Level.SEVERE, "Invalid item for `tools.axe.waxables." + blockId + ".drops`: " + itemId); return; }
drops.put(item, (double) chance);
});
@@ -855,17 +855,17 @@ public class PurpurWorldConfig {
Map.entry("minecraft:weathered_copper_lantern", Map.of("into", "minecraft:exposed_copper_lantern", "drops", new HashMap<String, Double>())),
Map.entry("minecraft:oxidized_copper_lantern", Map.of("into", "minecraft:weathered_copper_lantern", "drops", new HashMap<String, Double>())))
).forEach((blockId, obj) -> {
Block block = BuiltInRegistries.BLOCK.getValue(ResourceLocation.parse(blockId));
Block block = BuiltInRegistries.BLOCK.getValue(Identifier.parse(blockId));
if (block == Blocks.AIR) { PurpurConfig.log(Level.SEVERE, "Invalid block for `tools.axe.weatherables`: " + blockId); return; }
if (!(obj instanceof Map<?, ?> map)) { PurpurConfig.log(Level.SEVERE, "Invalid yaml for `tools.axe.weatherables." + blockId + "`"); return; }
String intoId = (String) map.get("into");
Block into = BuiltInRegistries.BLOCK.getValue(ResourceLocation.parse(intoId));
Block into = BuiltInRegistries.BLOCK.getValue(Identifier.parse(intoId));
if (into == Blocks.AIR) { PurpurConfig.log(Level.SEVERE, "Invalid block for `tools.axe.weatherables." + blockId + ".into`: " + intoId); return; }
Object dropsObj = map.get("drops");
if (!(dropsObj instanceof Map<?, ?> dropsMap)) { PurpurConfig.log(Level.SEVERE, "Invalid yaml for `tools.axe.weatherables." + blockId + ".drops`"); return; }
Map<Item, Double> drops = new HashMap<>();
dropsMap.forEach((itemId, chance) -> {
Item item = BuiltInRegistries.ITEM.getValue(ResourceLocation.parse(itemId.toString()));
Item item = BuiltInRegistries.ITEM.getValue(Identifier.parse(itemId.toString()));
if (item == Items.AIR) { PurpurConfig.log(Level.SEVERE, "Invalid item for `tools.axe.weatherables." + blockId + ".drops`: " + itemId); return; }
drops.put(item, (double) chance);
});
@@ -878,20 +878,20 @@ public class PurpurWorldConfig {
Map.entry("minecraft:coarse_dirt", Map.of("condition", "air_above", "into", "minecraft:dirt", "drops", new HashMap<String, Double>())),
Map.entry("minecraft:rooted_dirt", Map.of("condition", "always", "into", "minecraft:dirt", "drops", Map.of("minecraft:hanging_roots", 1.0D))))
).forEach((blockId, obj) -> {
Block block = BuiltInRegistries.BLOCK.getValue(ResourceLocation.parse(blockId));
Block block = BuiltInRegistries.BLOCK.getValue(Identifier.parse(blockId));
if (block == Blocks.AIR) { PurpurConfig.log(Level.SEVERE, "Invalid block for `tools.hoe.tillables`: " + blockId); return; }
if (!(obj instanceof Map<?, ?> map)) { PurpurConfig.log(Level.SEVERE, "Invalid yaml for `tools.hoe.tillables." + blockId + "`"); return; }
String conditionId = (String) map.get("condition");
Tillable.Condition condition = Tillable.Condition.get(conditionId);
if (condition == null) { PurpurConfig.log(Level.SEVERE, "Invalid condition for `tools.hoe.tillables." + blockId + ".condition`: " + conditionId); return; }
String intoId = (String) map.get("into");
Block into = BuiltInRegistries.BLOCK.getValue(ResourceLocation.parse(intoId));
Block into = BuiltInRegistries.BLOCK.getValue(Identifier.parse(intoId));
if (into == Blocks.AIR) { PurpurConfig.log(Level.SEVERE, "Invalid block for `tools.hoe.tillables." + blockId + ".into`: " + intoId); return; }
Object dropsObj = map.get("drops");
if (!(dropsObj instanceof Map<?, ?> dropsMap)) { PurpurConfig.log(Level.SEVERE, "Invalid yaml for `tools.hoe.tillables." + blockId + ".drops`"); return; }
Map<Item, Double> drops = new HashMap<>();
dropsMap.forEach((itemId, chance) -> {
Item item = BuiltInRegistries.ITEM.getValue(ResourceLocation.parse(itemId.toString()));
Item item = BuiltInRegistries.ITEM.getValue(Identifier.parse(itemId.toString()));
if (item == Items.AIR) { PurpurConfig.log(Level.SEVERE, "Invalid item for `tools.hoe.tillables." + blockId + ".drops`: " + itemId); return; }
drops.put(item, (double) chance);
});
@@ -905,17 +905,17 @@ public class PurpurWorldConfig {
Map.entry("minecraft:mycelium", Map.of("into", "minecraft:dirt_path", "drops", new HashMap<String, Double>())),
Map.entry("minecraft:rooted_dirt", Map.of("into", "minecraft:dirt_path", "drops", new HashMap<String, Double>())))
).forEach((blockId, obj) -> {
Block block = BuiltInRegistries.BLOCK.getValue(ResourceLocation.parse(blockId));
Block block = BuiltInRegistries.BLOCK.getValue(Identifier.parse(blockId));
if (block == Blocks.AIR) { PurpurConfig.log(Level.SEVERE, "Invalid block for `tools.shovel.flattenables`: " + blockId); return; }
if (!(obj instanceof Map<?, ?> map)) { PurpurConfig.log(Level.SEVERE, "Invalid yaml for `tools.shovel.flattenables." + blockId + "`"); return; }
String intoId = (String) map.get("into");
Block into = BuiltInRegistries.BLOCK.getValue(ResourceLocation.parse(intoId));
Block into = BuiltInRegistries.BLOCK.getValue(Identifier.parse(intoId));
if (into == Blocks.AIR) { PurpurConfig.log(Level.SEVERE, "Invalid block for `tools.shovel.flattenables." + blockId + ".into`: " + intoId); return; }
Object dropsObj = map.get("drops");
if (!(dropsObj instanceof Map<?, ?> dropsMap)) { PurpurConfig.log(Level.SEVERE, "Invalid yaml for `tools.shovel.flattenables." + blockId + ".drops`"); return; }
Map<Item, Double> drops = new HashMap<>();
dropsMap.forEach((itemId, chance) -> {
Item item = BuiltInRegistries.ITEM.getValue(ResourceLocation.parse(itemId.toString()));
Item item = BuiltInRegistries.ITEM.getValue(Identifier.parse(itemId.toString()));
if (item == Items.AIR) { PurpurConfig.log(Level.SEVERE, "Invalid item for `tools.shovel.flattenables." + blockId + ".drops`: " + itemId); return; }
drops.put(item, (double) chance);
});
@@ -1040,7 +1040,7 @@ public class PurpurWorldConfig {
public List<Block> doorRequiresRedstone = new ArrayList<>();
private void doorSettings() {
getList("blocks.door.requires-redstone", new ArrayList<String>()).forEach(key -> {
Block block = BuiltInRegistries.BLOCK.getValue(ResourceLocation.parse(key.toString()));
Block block = BuiltInRegistries.BLOCK.getValue(Identifier.parse(key.toString()));
if (!block.defaultBlockState().isAir()) {
doorRequiresRedstone.add(block);
}
@@ -2642,7 +2642,7 @@ public class PurpurWorldConfig {
polarBearMaxHealth = getDouble("mobs.polar_bear.attributes.max_health", polarBearMaxHealth);
polarBearScale = Mth.clamp(getDouble("mobs.polar_bear.attributes.scale", polarBearScale), 0.0625D, 16.0D);
polarBearBreedableItemString = getString("mobs.polar_bear.breedable-item", polarBearBreedableItemString);
Item item = BuiltInRegistries.ITEM.getValue(ResourceLocation.parse(polarBearBreedableItemString));
Item item = BuiltInRegistries.ITEM.getValue(Identifier.parse(polarBearBreedableItemString));
if (item != Items.AIR) polarBearBreedableItem = item;
polarBearBreedingTicks = getInt("mobs.polar_bear.breeding-delay-ticks", polarBearBreedingTicks);
polarBearTakeDamageFromWater = getBoolean("mobs.polar_bear.takes-damage-from-water", polarBearTakeDamageFromWater);
@@ -2765,7 +2765,7 @@ public class PurpurWorldConfig {
set("mobs.ravager.griefable-blocks", new ArrayList<>(set));
}
getList("mobs.ravager.griefable-blocks", defaultRavagerGriefableBlocks).forEach(key -> {
Block block = BuiltInRegistries.BLOCK.getValue(ResourceLocation.parse(key.toString()));
Block block = BuiltInRegistries.BLOCK.getValue(Identifier.parse(key.toString()));
if (!block.defaultBlockState().isAir()) {
ravagerGriefableBlocks.add(block);
}
@@ -3699,7 +3699,7 @@ public class PurpurWorldConfig {
add("minecraft:sea_lantern");
add("minecraft:dark_prismarine");
}}).forEach(key -> {
Block block = BuiltInRegistries.BLOCK.getValue(ResourceLocation.parse(key.toString()));
Block block = BuiltInRegistries.BLOCK.getValue(Identifier.parse(key.toString()));
if (!block.defaultBlockState().isAir()) {
conduitBlockList.add(block);
}

View File

@@ -1,6 +1,6 @@
package org.purpurmc.purpur.entity.ai;
import net.minecraft.world.entity.animal.horse.AbstractHorse;
import net.minecraft.world.entity.animal.equine.AbstractHorse;
public class HorseHasRider extends HasRider {
public final AbstractHorse horse;

View File

@@ -1,6 +1,6 @@
package org.purpurmc.purpur.entity.ai;
import net.minecraft.world.entity.animal.horse.Llama;
import net.minecraft.world.entity.animal.equine.Llama;
public class LlamaHasRider extends HasRider {
public final Llama llama;

View File

@@ -4,13 +4,16 @@ import net.minecraft.server.level.ServerLevel;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityReference;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.ai.goal.Goal;
import net.minecraft.world.entity.animal.IronGolem;
import net.minecraft.world.entity.animal.golem.IronGolem;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.block.Blocks;
import java.util.EnumSet;
import java.util.UUID;
import org.jetbrains.annotations.NotNull;
public class ReceiveFlower extends Goal {
private final IronGolem irongolem;
@@ -30,11 +33,12 @@ public class ReceiveFlower extends Goal {
if (!this.irongolem.isAngry()) {
return false;
}
UUID uuid = this.irongolem.getPersistentAngerTarget();
if (uuid == null) {
EntityReference<LivingEntity> persistentAngerTarget = this.irongolem.getPersistentAngerTarget();
if (persistentAngerTarget == null) {
return false;
}
Entity target = ((ServerLevel) this.irongolem.level()).getEntity(uuid);
LivingEntity target = EntityReference.getLivingEntity(persistentAngerTarget, this.irongolem.level());
if (!(target instanceof ServerPlayer player)) {
return false;
}

View File

@@ -6,7 +6,7 @@ import net.minecraft.util.Mth;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.animal.Dolphin;
import net.minecraft.world.entity.animal.dolphin.Dolphin;
import net.minecraft.world.entity.projectile.LlamaSpit;
import net.minecraft.world.entity.projectile.ProjectileUtil;
import net.minecraft.world.level.Level;

View File

@@ -4,12 +4,12 @@ import net.minecraft.core.BlockPos;
import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.network.codec.StreamCodec;
import net.minecraft.network.protocol.common.custom.CustomPacketPayload;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.resources.Identifier;
import org.jetbrains.annotations.NotNull;
public record ClientboundBeehivePayload(BlockPos pos, int numOfBees) implements CustomPacketPayload {
public static final StreamCodec<FriendlyByteBuf, ClientboundBeehivePayload> STREAM_CODEC = CustomPacketPayload.codec(ClientboundBeehivePayload::write, ClientboundBeehivePayload::new);
public static final Type<ClientboundBeehivePayload> TYPE = new Type<>(ResourceLocation.fromNamespaceAndPath("purpur", "beehive_s2c"));
public static final Type<ClientboundBeehivePayload> TYPE = new Type<>(Identifier.fromNamespaceAndPath("purpur", "beehive_s2c"));
public ClientboundBeehivePayload(FriendlyByteBuf friendlyByteBuf) {
this(friendlyByteBuf.readBlockPos(), friendlyByteBuf.readInt());

View File

@@ -4,12 +4,12 @@ import net.minecraft.core.BlockPos;
import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.network.codec.StreamCodec;
import net.minecraft.network.protocol.common.custom.CustomPacketPayload;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.resources.Identifier;
import org.jetbrains.annotations.NotNull;
public record ServerboundBeehivePayload(BlockPos pos) implements CustomPacketPayload {
public static final StreamCodec<FriendlyByteBuf, ServerboundBeehivePayload> STREAM_CODEC = CustomPacketPayload.codec(ServerboundBeehivePayload::write, ServerboundBeehivePayload::new);
public static final Type<ServerboundBeehivePayload> TYPE = new Type<>(ResourceLocation.fromNamespaceAndPath("purpur", "beehive_c2s"));
public static final Type<ServerboundBeehivePayload> TYPE = new Type<>(Identifier.fromNamespaceAndPath("purpur", "beehive_c2s"));
public ServerboundBeehivePayload(FriendlyByteBuf friendlyByteBuf) {
this(friendlyByteBuf.readBlockPos());