From b42e289643f908e6cf8beda75799f81f4bd5faf5 Mon Sep 17 00:00:00 2001 From: Maxx <53229958+MBatt1@users.noreply.github.com> Date: Thu, 10 Oct 2024 15:54:01 -0500 Subject: [PATCH] 1.21.0 First pass --- gradle.properties | 15 ++++--- .../net/id/paradiselost/ParadiseLost.java | 4 +- .../id/paradiselost/api/BlockLikeEntity.java | 7 +++- .../blocks/ParadiseLostPortalBlock.java | 4 +- .../CherineCampfireBlockEntity.java | 4 +- .../client/model/ParadiseLostModelLayers.java | 2 - .../model/block/DungeonSwitchModel.java | 40 ------------------- .../rendering/armor/PhoenixArmorRenderer.java | 2 +- .../rendering/ui/BloodstoneHUDRenderer.java | 2 +- .../util/ParadiseLostColorProviders.java | 4 +- .../id/paradiselost/component/MoaGenes.java | 2 +- .../entities/passive/moa/MoaEntity.java | 4 -- .../entities/util/SaddleMountEntity.java | 6 +-- .../paradiselost/items/ParadiseLostItems.java | 6 +-- .../paradiselost/items/misc/MoaEggItem.java | 4 +- .../tools/ParadiseLostToolMaterials.java | 1 - .../tools/bloodstone/BloodstoneItem.java | 4 +- .../utils/ParadiseLostDataComponentTypes.java | 10 ++--- .../client/render/CloudRendererMixin.java | 6 +-- .../enchantment/EnchantmentHelperMixin.java | 18 --------- 20 files changed, 39 insertions(+), 106 deletions(-) delete mode 100644 src/main/java/net/id/paradiselost/client/model/block/DungeonSwitchModel.java delete mode 100644 src/main/java/net/id/paradiselost/mixin/enchantment/EnchantmentHelperMixin.java diff --git a/gradle.properties b/gradle.properties index c04a970ec..ba3af725d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,16 +1,15 @@ # suppress inspection "UnusedProperty" for whole file org.gradle.jvmargs=-Xmx2G -paradiseLostVersion=2.2.5-beta+1.20.5 +paradiseLostVersion=2.2.5-beta+1.21.0 -minecraft_version=1.20.5 -yarn_mappings=1.20.5+build.1 -loader_version=0.16.5 +minecraft_version=1.21 +yarn_mappings=1.21+build.9 +loader_version=0.16.7 javaVersion=21 -fabric_version=0.97.8+1.20.5 -customportalapiVersion=0.0.1-beta65.5-1.20.5 -cardinalComponentsVersion=6.0.0 +fabric_version=0.102.0+1.21 +customportalapiVersion=0.0.1-beta66-1.21 +cardinalComponentsVersion=6.1.0 crowdinTranslateVersion=1.20 -clothConfigVersion=14.0.139 fabricAsmVersion=2.3 diff --git a/src/main/java/net/id/paradiselost/ParadiseLost.java b/src/main/java/net/id/paradiselost/ParadiseLost.java index f45eb6423..124d09313 100644 --- a/src/main/java/net/id/paradiselost/ParadiseLost.java +++ b/src/main/java/net/id/paradiselost/ParadiseLost.java @@ -65,9 +65,9 @@ public class ParadiseLost implements ModInitializer, ClientModInitializer, Dedic */ public static Identifier locate(String location) { if (location.contains(":")) { - return new Identifier(location); + return Identifier.of(location); } else { - return new Identifier(MOD_ID, location); + return Identifier.of(MOD_ID, location); } } diff --git a/src/main/java/net/id/paradiselost/api/BlockLikeEntity.java b/src/main/java/net/id/paradiselost/api/BlockLikeEntity.java index d9efa5056..3cece7ed3 100644 --- a/src/main/java/net/id/paradiselost/api/BlockLikeEntity.java +++ b/src/main/java/net/id/paradiselost/api/BlockLikeEntity.java @@ -12,11 +12,14 @@ import net.minecraft.item.AutomaticItemPlacementContext; import net.minecraft.item.ItemStack; import net.minecraft.nbt.*; +import net.minecraft.network.listener.ClientPlayPacketListener; +import net.minecraft.network.packet.Packet; import net.minecraft.network.packet.s2c.play.EntitySpawnS2CPacket; import net.minecraft.registry.BuiltinRegistries; import net.minecraft.registry.RegistryKeys; import net.minecraft.registry.tag.BlockTags; import net.minecraft.registry.tag.FluidTags; +import net.minecraft.server.network.EntityTrackerEntry; import net.minecraft.state.property.Properties; import net.minecraft.util.crash.CrashReportSection; import net.minecraft.util.hit.BlockHitResult; @@ -376,8 +379,8 @@ public boolean entityDataRequiresOperator() { } @Override - public EntitySpawnS2CPacket createSpawnPacket() { - return new EntitySpawnS2CPacket(this, Block.getRawIdFromState(this.getBlockState()) * (this.partOfSet ? -1 : 1)); + public Packet createSpawnPacket(EntityTrackerEntry entityTrackerEntry) { + return new EntitySpawnS2CPacket(this, entityTrackerEntry, Block.getRawIdFromState(this.getBlockState()) * (this.partOfSet ? -1 : 1)); } @Override diff --git a/src/main/java/net/id/paradiselost/blocks/ParadiseLostPortalBlock.java b/src/main/java/net/id/paradiselost/blocks/ParadiseLostPortalBlock.java index b5c98f2ae..60e4b82b0 100644 --- a/src/main/java/net/id/paradiselost/blocks/ParadiseLostPortalBlock.java +++ b/src/main/java/net/id/paradiselost/blocks/ParadiseLostPortalBlock.java @@ -4,10 +4,8 @@ import net.fabricmc.api.Environment; import net.id.paradiselost.util.ParadiseLostSoundEvents; import net.kyrptonaught.customportalapi.CustomPortalBlock; -import net.kyrptonaught.customportalapi.interfaces.EntityInCustomPortal; import net.minecraft.block.Block; import net.minecraft.block.BlockState; -import net.minecraft.client.MinecraftClient; import net.minecraft.particle.ParticleTypes; import net.minecraft.sound.SoundCategory; import net.minecraft.util.math.BlockPos; @@ -22,7 +20,7 @@ public ParadiseLostPortalBlock(Settings settings) { @Override @Environment(EnvType.CLIENT) public void randomDisplayTick(BlockState state, World world, BlockPos pos, Random random) { - if (!(MinecraftClient.getInstance().player instanceof EntityInCustomPortal entity && entity.didTeleport()) && random.nextInt(200) == 0) { + if (random.nextInt(200) == 0) { world.getProfiler().push("portal"); world.playSound((double) pos.getX() + 0.5D, (double) pos.getY() + 0.5D, (double) pos.getZ() + 0.5D, ParadiseLostSoundEvents.BLOCK_PORTAL_AMBIENT, SoundCategory.BLOCKS, 0.5F, random.nextFloat() * 0.4F + 0.8F, false); world.getProfiler().pop(); diff --git a/src/main/java/net/id/paradiselost/blocks/blockentity/CherineCampfireBlockEntity.java b/src/main/java/net/id/paradiselost/blocks/blockentity/CherineCampfireBlockEntity.java index ac2fd4fe5..2bee5c68b 100644 --- a/src/main/java/net/id/paradiselost/blocks/blockentity/CherineCampfireBlockEntity.java +++ b/src/main/java/net/id/paradiselost/blocks/blockentity/CherineCampfireBlockEntity.java @@ -186,12 +186,12 @@ public void clear() { protected void readComponents(BlockEntity.ComponentsAccess components) { super.readComponents(components); - (components.getOrDefault(DataComponentTypes.CONTAINER, ContainerComponent.DEFAULT)).copyTo(this.getItemsBeingCooked()); + (components.getOrDefault(ComponentTypes.CONTAINER, ContainerComponent.DEFAULT)).copyTo(this.getItemsBeingCooked()); } protected void addComponents(ComponentMap.Builder componentMapBuilder) { super.addComponents(componentMapBuilder); - componentMapBuilder.add(DataComponentTypes.CONTAINER, ContainerComponent.fromStacks(this.getItemsBeingCooked())); + componentMapBuilder.add(ComponentTypes.CONTAINER, ContainerComponent.fromStacks(this.getItemsBeingCooked())); } public void removeFromCopiedStackNbt(NbtCompound nbt) { diff --git a/src/main/java/net/id/paradiselost/client/model/ParadiseLostModelLayers.java b/src/main/java/net/id/paradiselost/client/model/ParadiseLostModelLayers.java index 18f5b49c6..fff5b1978 100644 --- a/src/main/java/net/id/paradiselost/client/model/ParadiseLostModelLayers.java +++ b/src/main/java/net/id/paradiselost/client/model/ParadiseLostModelLayers.java @@ -6,7 +6,6 @@ import net.fabricmc.fabric.mixin.client.rendering.EntityModelLayersAccessor; import net.id.paradiselost.ParadiseLost; import net.id.paradiselost.client.model.armor.PhoenixArmorModel; -import net.id.paradiselost.client.model.block.DungeonSwitchModel; import net.id.paradiselost.client.model.entity.*; import net.minecraft.client.model.Dilation; import net.minecraft.client.model.TexturedModelData; @@ -30,7 +29,6 @@ public class ParadiseLostModelLayers { public static final EntityModelLayer MOA = register("moa", "main", MoaModel.getTexturedModelData()); public static final EntityModelLayer PHOENIX_ARMOR = register("phoenix_armor", "main", PhoenixArmorModel.getTexturedModelData()); - public static final EntityModelLayer DUNGEON_SWITCH = register("dungeon_switch", "main", DungeonSwitchModel.getTexturedModelData()); public static EntityModelLayer register(Identifier id, String layer, TexturedModelData data) { EntityModelLayer entityModelLayer = new EntityModelLayer(id, layer); diff --git a/src/main/java/net/id/paradiselost/client/model/block/DungeonSwitchModel.java b/src/main/java/net/id/paradiselost/client/model/block/DungeonSwitchModel.java deleted file mode 100644 index 6bab1b3f7..000000000 --- a/src/main/java/net/id/paradiselost/client/model/block/DungeonSwitchModel.java +++ /dev/null @@ -1,40 +0,0 @@ -package net.id.paradiselost.client.model.block; - -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.id.paradiselost.client.model.ParadiseLostModelLayers; -import net.minecraft.client.model.*; -import net.minecraft.client.render.RenderLayer; -import net.minecraft.client.render.VertexConsumer; -import net.minecraft.client.render.block.entity.BlockEntityRendererFactory; -import net.minecraft.client.util.math.MatrixStack; - -@Environment(EnvType.CLIENT) -public class DungeonSwitchModel extends Model { - - public ModelPart cube; - - public DungeonSwitchModel(BlockEntityRendererFactory.Context ctx) { - super(RenderLayer::getEntityCutout); - ModelPart modelPart = ctx.getLayerModelPart(ParadiseLostModelLayers.DUNGEON_SWITCH); - cube = modelPart.getChild("cube"); - } - - public static TexturedModelData getTexturedModelData() { - ModelData modelData = new ModelData(); - ModelPartData modelPartData = modelData.getRoot(); - modelPartData.addChild("cube", ModelPartBuilder.create().uv(32, 0).cuboid(-4, -4, -4, 8, 8, 8), ModelTransform.pivot(8, 8, 8)); - return TexturedModelData.of(modelData, 64, 64); - } - - public void render(MatrixStack matrixStack, VertexConsumer vertexConsumer, int i, int j) { - render(matrixStack, vertexConsumer, i, j, 1, 1, 1, 1); - } - - @Override - public void render(MatrixStack matrices, VertexConsumer vertices, int light, int overlay, float red, float green, float blue, float alpha) { - matrices.push(); - cube.render(matrices, vertices, light, overlay); - matrices.pop(); - } -} diff --git a/src/main/java/net/id/paradiselost/client/rendering/armor/PhoenixArmorRenderer.java b/src/main/java/net/id/paradiselost/client/rendering/armor/PhoenixArmorRenderer.java index fd55ec035..29b99fffe 100644 --- a/src/main/java/net/id/paradiselost/client/rendering/armor/PhoenixArmorRenderer.java +++ b/src/main/java/net/id/paradiselost/client/rendering/armor/PhoenixArmorRenderer.java @@ -16,7 +16,7 @@ @Environment(EnvType.CLIENT) public class PhoenixArmorRenderer implements ArmorRenderer { //24: Left this in to repurpose it later because I liked it - private static final Identifier TEXTURE = new Identifier("minecraft", "textures/models/armor/paradise_lost_phoenix_layer_1.png"); + private static final Identifier TEXTURE = Identifier.of("minecraft", "textures/models/armor/paradise_lost_phoenix_layer_1.png"); private static PhoenixArmorModel phoenixArmorModel; @Override diff --git a/src/main/java/net/id/paradiselost/client/rendering/ui/BloodstoneHUDRenderer.java b/src/main/java/net/id/paradiselost/client/rendering/ui/BloodstoneHUDRenderer.java index 89786ea3a..1f6d064cc 100644 --- a/src/main/java/net/id/paradiselost/client/rendering/ui/BloodstoneHUDRenderer.java +++ b/src/main/java/net/id/paradiselost/client/rendering/ui/BloodstoneHUDRenderer.java @@ -85,7 +85,7 @@ private static void renderCherine(DrawContext context, MinecraftClient client, B private static void renderOlvite(DrawContext context, MinecraftClient client, BloodstoneCapturedData bloodstoneCapturedData) { StatusEffectSpriteManager statusEffectSpriteManager = client.getStatusEffectSpriteManager(); - var effectAtlas = client.getSpriteAtlas(new Identifier("textures/atlas/blocks.png")); + var effectAtlas = client.getSpriteAtlas(Identifier.of("textures/atlas/blocks.png")); Sprite affinitySprite = effectAtlas.apply(ParadiseLost.locate("item/icons/affinity")); Sprite raceSprite = effectAtlas.apply(ParadiseLost.locate("item/icons/race")); diff --git a/src/main/java/net/id/paradiselost/client/rendering/util/ParadiseLostColorProviders.java b/src/main/java/net/id/paradiselost/client/rendering/util/ParadiseLostColorProviders.java index e0e4471c0..26625b9ff 100644 --- a/src/main/java/net/id/paradiselost/client/rendering/util/ParadiseLostColorProviders.java +++ b/src/main/java/net/id/paradiselost/client/rendering/util/ParadiseLostColorProviders.java @@ -6,9 +6,9 @@ import net.id.paradiselost.blocks.ParadiseLostBlocks; import net.id.paradiselost.blocks.util.DynamicColorBlock; import net.minecraft.client.color.world.BiomeColors; -import net.minecraft.client.color.world.FoliageColors; -import net.minecraft.client.color.world.GrassColors; import net.minecraft.registry.Registries; +import net.minecraft.world.biome.FoliageColors; +import net.minecraft.world.biome.GrassColors; @Environment(EnvType.CLIENT) public class ParadiseLostColorProviders { diff --git a/src/main/java/net/id/paradiselost/component/MoaGenes.java b/src/main/java/net/id/paradiselost/component/MoaGenes.java index 76979a83b..0ff8eb38e 100644 --- a/src/main/java/net/id/paradiselost/component/MoaGenes.java +++ b/src/main/java/net/id/paradiselost/component/MoaGenes.java @@ -129,7 +129,7 @@ public Identifier getTexture() { Identifier id = this.race.getId(); String name = id.getPath(); String namespace = id.getNamespace(); - return new Identifier(namespace, "textures/entity/moa/" + name + ".png"); + return Identifier.of(namespace, "textures/entity/moa/" + name + ".png"); } public float getHunger() { diff --git a/src/main/java/net/id/paradiselost/entities/passive/moa/MoaEntity.java b/src/main/java/net/id/paradiselost/entities/passive/moa/MoaEntity.java index 321082ec5..277ded817 100644 --- a/src/main/java/net/id/paradiselost/entities/passive/moa/MoaEntity.java +++ b/src/main/java/net/id/paradiselost/entities/passive/moa/MoaEntity.java @@ -624,10 +624,6 @@ public UUID getOwnerUuid() { return getGenes().getOwner(); } - @Override - public EntityView method_48926() { - return null; - } @Nullable @Override diff --git a/src/main/java/net/id/paradiselost/entities/util/SaddleMountEntity.java b/src/main/java/net/id/paradiselost/entities/util/SaddleMountEntity.java index e52df271e..c8656317e 100644 --- a/src/main/java/net/id/paradiselost/entities/util/SaddleMountEntity.java +++ b/src/main/java/net/id/paradiselost/entities/util/SaddleMountEntity.java @@ -134,10 +134,10 @@ public boolean canBeSaddled() { } @Override - public void saddle(@Nullable SoundCategory sound) { + public void saddle(ItemStack stack, @Nullable SoundCategory soundCategory) { //this.items.setStack(0, new ItemStack(Items.SADDLE)); - if (sound != null) { - getWorld().playSoundFromEntity(null, this, SoundEvents.ENTITY_PIG_SADDLE, sound, 0.5F, 1.0F); + if (soundCategory != null) { + getWorld().playSoundFromEntity(null, this, SoundEvents.ENTITY_PIG_SADDLE, soundCategory, 0.5F, 1.0F); } } } diff --git a/src/main/java/net/id/paradiselost/items/ParadiseLostItems.java b/src/main/java/net/id/paradiselost/items/ParadiseLostItems.java index 2c11ed4f0..197fda8db 100644 --- a/src/main/java/net/id/paradiselost/items/ParadiseLostItems.java +++ b/src/main/java/net/id/paradiselost/items/ParadiseLostItems.java @@ -125,9 +125,9 @@ private static Settings unstackableRareTool() { public static final Item GLAZED_GOLD_UPGRADE = add("glazed_gold_upgrade_smithing_template", new SmithingTemplateItem( GLAZED_GOLD_UPGRADE_APPLIES_TO_TEXT, GLAZED_GOLD_UPGRADE_INGREDIENTS_TEXT, GLAZED_GOLD_UPGRADE_TEXT, GLAZED_GOLD_UPGRADE_BASE_SLOT_DESCRIPTION_TEXT, GLAZED_GOLD_UPGRADE_ADDITIONS_SLOT_DESCRIPTION_TEXT, - List.of(new Identifier("item/empty_armor_slot_helmet"), new Identifier("item/empty_armor_slot_chestplate"), new Identifier("item/empty_armor_slot_leggings"), new Identifier("item/empty_armor_slot_boots"), - new Identifier("item/empty_slot_hoe"), new Identifier("item/empty_slot_axe"), new Identifier("item/empty_slot_sword"), new Identifier("item/empty_slot_shovel"), new Identifier("item/empty_slot_pickaxe")), - List.of(new Identifier("item/empty_slot_ingot")) + List.of(Identifier.of("item/empty_armor_slot_helmet"), Identifier.of("item/empty_armor_slot_chestplate"), Identifier.of("item/empty_armor_slot_leggings"), Identifier.of("item/empty_armor_slot_boots"), + Identifier.of("item/empty_slot_hoe"), Identifier.of("item/empty_slot_axe"), Identifier.of("item/empty_slot_sword"), Identifier.of("item/empty_slot_shovel"), Identifier.of("item/empty_slot_pickaxe")), + List.of(Identifier.of("item/empty_slot_ingot")) )); private static Settings wearable() { diff --git a/src/main/java/net/id/paradiselost/items/misc/MoaEggItem.java b/src/main/java/net/id/paradiselost/items/misc/MoaEggItem.java index 7c5bfaa9d..1d6cf3b2b 100644 --- a/src/main/java/net/id/paradiselost/items/misc/MoaEggItem.java +++ b/src/main/java/net/id/paradiselost/items/misc/MoaEggItem.java @@ -7,11 +7,11 @@ import net.id.paradiselost.entities.passive.moa.MoaAttributes; import net.id.paradiselost.entities.passive.moa.MoaEntity; import net.id.paradiselost.items.utils.ParadiseLostDataComponentTypes; -import net.minecraft.client.item.TooltipType; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemUsageContext; +import net.minecraft.item.tooltip.TooltipType; import net.minecraft.text.Text; import net.minecraft.util.ActionResult; import net.minecraft.util.Formatting; @@ -47,7 +47,7 @@ public ActionResult useOnBlock(ItemUsageContext contextIn) { @Override @Environment(EnvType.CLIENT) - public void appendTooltip(ItemStack stack, net.minecraft.item.Item.TooltipContext context, List tooltip, TooltipType type) { + public void appendTooltip(ItemStack stack, TooltipContext context, List tooltip, TooltipType type) { var genes = stack.getOrDefault(ParadiseLostDataComponentTypes.MOA_GENES, null); if (genes != null) { Identifier raceId = genes.race(); diff --git a/src/main/java/net/id/paradiselost/items/tools/ParadiseLostToolMaterials.java b/src/main/java/net/id/paradiselost/items/tools/ParadiseLostToolMaterials.java index 95cfce199..8191a244e 100644 --- a/src/main/java/net/id/paradiselost/items/tools/ParadiseLostToolMaterials.java +++ b/src/main/java/net/id/paradiselost/items/tools/ParadiseLostToolMaterials.java @@ -1,7 +1,6 @@ package net.id.paradiselost.items.tools; import com.google.common.base.Suppliers; -import net.fabricmc.yarn.constants.MiningLevels; import net.id.paradiselost.items.ParadiseLostItems; import net.minecraft.block.Block; import net.minecraft.item.ToolMaterial; diff --git a/src/main/java/net/id/paradiselost/items/tools/bloodstone/BloodstoneItem.java b/src/main/java/net/id/paradiselost/items/tools/bloodstone/BloodstoneItem.java index 4b1b4312d..aef776431 100644 --- a/src/main/java/net/id/paradiselost/items/tools/bloodstone/BloodstoneItem.java +++ b/src/main/java/net/id/paradiselost/items/tools/bloodstone/BloodstoneItem.java @@ -4,11 +4,11 @@ import net.fabricmc.api.Environment; import net.id.paradiselost.items.utils.ParadiseLostDataComponentTypes; import net.id.paradiselost.util.ParadiseLostSoundEvents; -import net.minecraft.client.item.TooltipType; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.item.tooltip.TooltipType; import net.minecraft.sound.SoundCategory; import net.minecraft.text.Text; import net.minecraft.util.ActionResult; @@ -29,7 +29,7 @@ public BloodstoneItem(net.minecraft.item.Item.Settings settings) { @Override @Environment(EnvType.CLIENT) - public void appendTooltip(ItemStack stack, net.minecraft.item.Item.TooltipContext context, List tooltip, TooltipType type) { + public void appendTooltip(ItemStack stack, TooltipContext context, List tooltip, TooltipType type) { tooltip.addAll(getDefaultText()); super.appendTooltip(stack, context, tooltip, type); } diff --git a/src/main/java/net/id/paradiselost/items/utils/ParadiseLostDataComponentTypes.java b/src/main/java/net/id/paradiselost/items/utils/ParadiseLostDataComponentTypes.java index 60a440b69..7732b6ad3 100644 --- a/src/main/java/net/id/paradiselost/items/utils/ParadiseLostDataComponentTypes.java +++ b/src/main/java/net/id/paradiselost/items/utils/ParadiseLostDataComponentTypes.java @@ -3,7 +3,7 @@ import com.mojang.serialization.Codec; import com.mojang.serialization.codecs.RecordCodecBuilder; import net.id.paradiselost.ParadiseLost; -import net.minecraft.component.DataComponentType; +import net.minecraft.component.ComponentType; import net.minecraft.network.RegistryByteBuf; import net.minecraft.network.codec.PacketCodec; import net.minecraft.network.codec.PacketCodecs; @@ -23,14 +23,14 @@ public class ParadiseLostDataComponentTypes { // Registered Components - public static final DataComponentType MOA_GENES = register("moa_genes", (builder) -> builder.codec(MoaGeneComponent.CODEC).packetCodec(MoaGeneComponent.PACKET_CODEC).cache()); - public static final DataComponentType BLOODSTONE = register("bloodstone", (builder) -> builder.codec(BloodstoneComponent.CODEC).packetCodec(BloodstoneComponent.PACKET_CODEC)); + public static final ComponentType MOA_GENES = register("moa_genes", (builder) -> builder.codec(MoaGeneComponent.CODEC).packetCodec(MoaGeneComponent.PACKET_CODEC).cache()); + public static final ComponentType BLOODSTONE = register("bloodstone", (builder) -> builder.codec(BloodstoneComponent.CODEC).packetCodec(BloodstoneComponent.PACKET_CODEC)); // Util - private static DataComponentType register(String id, UnaryOperator> builderOperator) { - return Registry.register(Registries.DATA_COMPONENT_TYPE, locate(id), builderOperator.apply(DataComponentType.builder()).build()); + private static ComponentType register(String id, UnaryOperator> builderOperator) { + return Registry.register(Registries.DATA_COMPONENT_TYPE, locate(id), builderOperator.apply(ComponentType.builder()).build()); } public static void init() { diff --git a/src/main/java/net/id/paradiselost/mixin/client/render/CloudRendererMixin.java b/src/main/java/net/id/paradiselost/mixin/client/render/CloudRendererMixin.java index d7e6f20cb..8e11bc80e 100644 --- a/src/main/java/net/id/paradiselost/mixin/client/render/CloudRendererMixin.java +++ b/src/main/java/net/id/paradiselost/mixin/client/render/CloudRendererMixin.java @@ -54,7 +54,7 @@ public final class CloudRendererMixin { @Nullable private VertexBuffer cloudsBuffer; - @Shadow private BufferBuilder.BuiltBuffer renderClouds(BufferBuilder builder, double x, double y, double z, Vec3d color) { + @Shadow private BuiltBuffer buildCloudsBuffer(Tessellator tessellator, double x, double y, double z, Vec3d color) { throw new AssertionError(); } @@ -100,15 +100,13 @@ private void internalCloudRender(MatrixStack matrices, Matrix4f matrix4f, Matrix if (this.cloudsDirty) { this.cloudsDirty = false; - BufferBuilder bufferBuilder = Tessellator.getInstance().getBuffer(); if (this.cloudsBuffer != null) { this.cloudsBuffer.close(); } this.cloudsBuffer = new VertexBuffer(VertexBuffer.Usage.STATIC); - BufferBuilder.BuiltBuffer builtBuffer = this.renderClouds(bufferBuilder, posX, posY, posZ, vec3d); this.cloudsBuffer.bind(); - this.cloudsBuffer.upload(builtBuffer); + this.cloudsBuffer.upload(this.buildCloudsBuffer(Tessellator.getInstance(), posX, posY, posZ, vec3d)); VertexBuffer.unbind(); } diff --git a/src/main/java/net/id/paradiselost/mixin/enchantment/EnchantmentHelperMixin.java b/src/main/java/net/id/paradiselost/mixin/enchantment/EnchantmentHelperMixin.java deleted file mode 100644 index 3742021bc..000000000 --- a/src/main/java/net/id/paradiselost/mixin/enchantment/EnchantmentHelperMixin.java +++ /dev/null @@ -1,18 +0,0 @@ -package net.id.paradiselost.mixin.enchantment; - -import net.id.paradiselost.tag.ParadiseLostItemTags; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.entity.LivingEntity; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; - -@Mixin(EnchantmentHelper.class) -public class EnchantmentHelperMixin { - - @Inject(method = "getFireAspect", at = @At("HEAD"), cancellable = true) - private static void getFireAspect(LivingEntity entity, CallbackInfoReturnable cir) { - if (entity.getStackInHand(entity.getActiveHand()).isIn(ParadiseLostItemTags.IGNITING_TOOLS)) cir.setReturnValue(2); - } -}