From f7764a043e754da512738a8f2f46e01f1f05d61c Mon Sep 17 00:00:00 2001 From: itsmeow Date: Wed, 15 Jun 2022 13:51:50 -0400 Subject: [PATCH] Port to 1.19 --- .../whisperwoods/block/HandOfFateBlock.java | 13 +++++------ .../client/renderer/entity/RenderWisp.java | 4 ++-- .../entity/model/ModelHirschgeist.java | 6 ++--- .../entity/EntityHirschgeist.java | 4 +--- .../whisperwoods/entity/EntityMoth.java | 4 +--- .../whisperwoods/entity/EntityZotzpyre.java | 4 ++-- .../whisperwoods/item/ItemBlockArmor.java | 2 +- .../item/ItemBlockHirschgeistSkull.java | 2 +- fabric/build.gradle | 6 ++--- fabric/src/main/resources/fabric.mod.json | 4 ++-- forge/src/main/resources/META-INF/mods.toml | 6 ++--- forge/src/main/resources/pack.mcmeta | 2 +- gradle.properties | 22 +++++++++---------- 13 files changed, 36 insertions(+), 43 deletions(-) diff --git a/common/src/main/java/dev/itsmeow/whisperwoods/block/HandOfFateBlock.java b/common/src/main/java/dev/itsmeow/whisperwoods/block/HandOfFateBlock.java index 170d837..b950a96 100644 --- a/common/src/main/java/dev/itsmeow/whisperwoods/block/HandOfFateBlock.java +++ b/common/src/main/java/dev/itsmeow/whisperwoods/block/HandOfFateBlock.java @@ -12,7 +12,6 @@ import net.minecraft.core.Direction; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.Style; -import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.sounds.SoundEvents; import net.minecraft.sounds.SoundSource; import net.minecraft.util.Mth; @@ -157,19 +156,19 @@ public void appendHoverText(ItemStack stack, BlockGetter worldIn, List container, I CompoundTag tag = stack.getTag(); if(tag != null) { if(tag.contains("SizeTag")) { - tooltip.add(new TextComponent("Size: " + tag.getFloat("SizeTag")).setStyle(Style.EMPTY.applyFormats(ChatFormatting.ITALIC, ChatFormatting.GRAY))); + tooltip.add(Component.literal("Size: " + tag.getFloat("SizeTag")).setStyle(Style.EMPTY.applyFormats(ChatFormatting.ITALIC, ChatFormatting.GRAY))); } } } diff --git a/common/src/main/java/dev/itsmeow/whisperwoods/entity/EntityZotzpyre.java b/common/src/main/java/dev/itsmeow/whisperwoods/entity/EntityZotzpyre.java index f120069..efeb462 100644 --- a/common/src/main/java/dev/itsmeow/whisperwoods/entity/EntityZotzpyre.java +++ b/common/src/main/java/dev/itsmeow/whisperwoods/entity/EntityZotzpyre.java @@ -11,6 +11,7 @@ import net.minecraft.sounds.SoundEvent; import net.minecraft.sounds.SoundEvents; import net.minecraft.util.Mth; +import net.minecraft.util.RandomSource; import net.minecraft.world.Difficulty; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.effect.MobEffectInstance; @@ -35,7 +36,6 @@ import net.minecraft.world.phys.Vec3; import java.util.EnumSet; -import java.util.Random; public class EntityZotzpyre extends EntityMonsterWithTypes implements FlyingAnimal { @@ -104,7 +104,7 @@ protected SoundEvent getDeathSound() { } @SuppressWarnings("deprecation") - public static boolean canSpawn(EntityType type, LevelAccessor world, MobSpawnType reason, BlockPos pos, Random rand) { + public static boolean canSpawn(EntityType type, LevelAccessor world, MobSpawnType reason, BlockPos pos, RandomSource rand) { if (pos.getY() >= world.getSeaLevel() && !BiomeTypes.getTypes(world.getBiome(pos).unwrapKey().get()).contains(BiomeTypes.JUNGLE)) { return false; } else { diff --git a/common/src/main/java/dev/itsmeow/whisperwoods/item/ItemBlockArmor.java b/common/src/main/java/dev/itsmeow/whisperwoods/item/ItemBlockArmor.java index 78505c2..b8c947f 100644 --- a/common/src/main/java/dev/itsmeow/whisperwoods/item/ItemBlockArmor.java +++ b/common/src/main/java/dev/itsmeow/whisperwoods/item/ItemBlockArmor.java @@ -150,7 +150,7 @@ public String getDescriptionId() { @Override public void fillItemCategory(CreativeModeTab group, NonNullList items) { - if(this.allowdedIn(group)) { + if(this.allowedIn(group)) { this.getBlock().fillItemCategory(group, items); } diff --git a/common/src/main/java/dev/itsmeow/whisperwoods/item/ItemBlockHirschgeistSkull.java b/common/src/main/java/dev/itsmeow/whisperwoods/item/ItemBlockHirschgeistSkull.java index aeb6012..1624623 100644 --- a/common/src/main/java/dev/itsmeow/whisperwoods/item/ItemBlockHirschgeistSkull.java +++ b/common/src/main/java/dev/itsmeow/whisperwoods/item/ItemBlockHirschgeistSkull.java @@ -43,7 +43,7 @@ public ItemBlockHirschgeistSkull(Block blockIn) { @Override protected > A getBaseModelInstance() { if(ModelHGSkullMask.INSTANCE == null) { - ModelHGSkullMask.INSTANCE = new ModelHGSkullMask<>(new EntityRendererProvider.Context(Minecraft.getInstance().getEntityRenderDispatcher(), Minecraft.getInstance().getItemRenderer(), Minecraft.getInstance().getResourceManager(), Minecraft.getInstance().getEntityModels(), Minecraft.getInstance().font).bakeLayer(new ModelLayerLocation(new ResourceLocation(WhisperwoodsMod.MODID, "hirschgeist_skull_mask"), "main"))); + ModelHGSkullMask.INSTANCE = new ModelHGSkullMask<>(new EntityRendererProvider.Context(Minecraft.getInstance().getEntityRenderDispatcher(), Minecraft.getInstance().getItemRenderer(), Minecraft.getInstance().getBlockRenderer(), Minecraft.getInstance().getEntityRenderDispatcher().getItemInHandRenderer(), Minecraft.getInstance().getResourceManager(), Minecraft.getInstance().getEntityModels(), Minecraft.getInstance().font).bakeLayer(new ModelLayerLocation(new ResourceLocation(WhisperwoodsMod.MODID, "hirschgeist_skull_mask"), "main"))); } return (A) ModelHGSkullMask.INSTANCE; } diff --git a/fabric/build.gradle b/fabric/build.gradle index 40e2a81..14c53ad 100644 --- a/fabric/build.gradle +++ b/fabric/build.gradle @@ -26,14 +26,14 @@ dependencies { shadowModImplementation("dev.itsmeow.imdlib:imdlib-fabric:${rootProject.imdlib_version}") { transitive = false } - modRuntimeOnly("com.terraformersmc:modmenu:3.1.1") { + modRuntimeOnly("com.terraformersmc:modmenu:4.0.0") { transitive = false } - modRuntimeOnly ("curse.maven:cloth-config-319057:3641132") { + modRuntimeOnly ("curse.maven:cloth-config-348521:3827487") { exclude(group: "net.fabricmc") exclude(group: "net.fabricmc.fabric-api") } - runtimeOnly("me.shedaniel.cloth:basic-math:0.6.0") + runtimeOnly("me.shedaniel.cloth:basic-math:0.6.1") } shadowJar { diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json index 1941d76..dae57d3 100644 --- a/fabric/src/main/resources/fabric.mod.json +++ b/fabric/src/main/resources/fabric.mod.json @@ -20,8 +20,8 @@ "modmenu": ["dev.itsmeow.imdlib.compat.modmenu.ModMenuCompat"] }, "depends": { - "minecraft": "1.18.2", - "architectury": ">=4.0.0", + "minecraft": "1.19.x", + "architectury": ">=5.0.0", "fabricloader": ">=0.12.0", "fabric": ">=0.32.0" }, diff --git a/forge/src/main/resources/META-INF/mods.toml b/forge/src/main/resources/META-INF/mods.toml index fe01ad9..6b332f3 100644 --- a/forge/src/main/resources/META-INF/mods.toml +++ b/forge/src/main/resources/META-INF/mods.toml @@ -1,5 +1,5 @@ modLoader="javafml" -loaderVersion="[40,)" +loaderVersion="[41,)" issueTrackerURL="https://github.com/itsmeow/whisperwoods/issues" displayURL="https://www.curseforge.com/minecraft/mc-mods/whisperwoods" logoFile="icon.png" @@ -15,12 +15,12 @@ Spooky forest stuff for spooky jam''' [[dependencies.whisperwoods]] modId="forge" mandatory=true - versionRange="[40.0.0,)" + versionRange="[41.0.0,)" ordering="NONE" side="BOTH" [[dependencies.whisperwoods]] modId="architectury" mandatory=true - versionRange="[4.0.0,)" + versionRange="[5.0.0,)" ordering="NONE" side="BOTH" \ No newline at end of file diff --git a/forge/src/main/resources/pack.mcmeta b/forge/src/main/resources/pack.mcmeta index ccd22b1..44d364a 100644 --- a/forge/src/main/resources/pack.mcmeta +++ b/forge/src/main/resources/pack.mcmeta @@ -1,6 +1,6 @@ { "pack": { "description": "whisperwoods resources", - "pack_format": 8 + "pack_format": 9 } } diff --git a/gradle.properties b/gradle.properties index 6eecf5b..bc40788 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,12 +4,12 @@ maven_group = dev.itsmeow.whisperwoods # Forge - mc_version = 1.18.2 - forge_version = 40.0.46 - architectury_version = 4.2.50 - fabric_loader_version = 0.13.3 - fabric_api_version = 0.50.0+1.18.2 - imdlib_version = 1.18.2-0cefc723b2f1479aa04c92284c2e4b03fa164a50 + mc_version = 1.19 + forge_version = 41.0.33 + architectury_version = 5.6.21 + fabric_loader_version = 0.14.7 + fabric_api_version = 0.55.3+1.19 + imdlib_version = 1.19-194ae5c75cdc9a4be590991a3683d0e6f2fe3e74 # Publishing github = itsmeow/whisperwoods @@ -17,13 +17,13 @@ url = https://github.com/itsmeow/whisperwoods curse_title = Whisperwoods curse_project_id = 349597 - curse_versions_fabric = Minecraft 1.18:1.18.2,Java 17,Fabric - curse_versions_forge = Minecraft 1.18:1.18.2,Java 17,Forge - curse_relations_fabric = fabric-api:requiredDependency,architectury-fabric:requiredDependency,cloth-config:optionalDependency,modmenu:optionalDependency,fiber2cloth:embeddedLibrary - curse_relations_forge = architectury-forge:requiredDependency + curse_versions_fabric = Minecraft 1.19:1.19,Java 17,Fabric + curse_versions_forge = Minecraft 1.19:1.19,Java 17,Forge + curse_relations_fabric = fabric-api:requiredDependency,architectury-api:requiredDependency,cloth-config:optionalDependency,modmenu:optionalDependency,fiber2cloth:embeddedLibrary + curse_relations_forge = architectury-api:requiredDependency # Toolchain Versions - loom_version = 0.11.0-SNAPSHOT + loom_version = 0.12.0-SNAPSHOT architectury_plugin_version = 3.4-SNAPSHOT # Misc