diff --git a/.gitignore b/.gitignore index 09cd281..08ce33e 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ bin/ # fabric run/ +src/generated/ diff --git a/gradle.properties b/gradle.properties index 112b729..e4bd32a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,22 +5,22 @@ maven_group = com.ghasto archives_base_name = create_so mod_version = 1.6 -minecraft_version = 1.19.2 +minecraft_version = 1.18.2 # Dependencies # https://fabricmc.net/develop fabric_loader_version = 0.14.22 -fabric_api_version = 0.76.1+1.19.2 +fabric_api_version = 0.76.0+1.18.2 # Mappings # https://lambdaurora.dev/tools/import_quilt.html -qm_version = 22 +qm_version = 26 # https://parchmentmc.org/docs/getting-started -parchment_version = 2022.11.27 +parchment_version = 2022.11.06 # Create # https://modrinth.com/mod/create-fabric/versions -create_version = 0.5.1-c-build.1160+mc1.19.2 +create_version = 0.5.1-c-build.1159+mc1.18.2 # Development QOL # Create supports all 3 recipe viewers: JEI, REI, and EMI. This decides which is enabled at runtime. @@ -29,13 +29,13 @@ recipe_viewer = EMI # JEI - https://www.curseforge.com/minecraft/mc-mods/jei/files/all jei_version = 10.2.1.283 # REI - https://modrinth.com/mod/rei/versions -rei_version = 9.1.657+fabric -rei_plugin_version = 9.1.657 -arch_version = 6.5.82+fabric +rei_version = 8.3.656+fabric +rei_plugin_version = 8.3.656 +arch_version = 4.11.93+fabric # EMI - https://modrinth.com/mod/emi/versions -emi_version = 1.0.20+1.19.2+fabric +emi_version = 0.7.3+1.18.2 # Mod Menu - https://modrinth.com/mod/modmenu/versions -modmenu_version = 4.1.2 +modmenu_version = 3.2.5 # LazyDFU - https://modrinth.com/mod/lazydfu/versions -lazydfu_version = 0.1.3 +lazydfu_version = 0.1.2 diff --git a/src/main/java/com/ghasto/create_so/ModBlocks.java b/src/main/java/com/ghasto/create_so/ModBlocks.java index a65c690..0767fed 100644 --- a/src/main/java/com/ghasto/create_so/ModBlocks.java +++ b/src/main/java/com/ghasto/create_so/ModBlocks.java @@ -34,7 +34,7 @@ public class ModBlocks { REGISTRATE.block("polishing_wheel_controller", PolishingWheelControllerBlock::new) .properties(p -> p.color(MaterialColor.STONE) .noOcclusion() - .noLootTable() + .noDrops() .air() .noCollission()) .blockstate((c, p) -> p.getVariantBuilder(c.get()) diff --git a/src/main/java/com/ghasto/create_so/ModDamageTypes.java b/src/main/java/com/ghasto/create_so/ModDamageTypes.java index a4c957d..866c9ef 100644 --- a/src/main/java/com/ghasto/create_so/ModDamageTypes.java +++ b/src/main/java/com/ghasto/create_so/ModDamageTypes.java @@ -1,10 +1,11 @@ package com.ghasto.create_so; +import io.github.fabricators_of_create.porting_lib.util.DamageSourceHelper; import net.minecraft.world.damagesource.DamageSource; public class ModDamageTypes { - public static final DamageSource SANDPAPER = new DamageSource("sandpaper").bypassMagic().damageHelmet(); - public static final DamageSource POLISH = new DamageSource("polish").bypassArmor(); + public static final DamageSource SANDPAPER = DamageSourceHelper.port_lib$createDamageSource("sandpaper"); + public static final DamageSource POLISH = DamageSourceHelper.port_lib$createArmorBypassingDamageSource("polish"); // public static final DamageTypeData SANDPAPER = DamageTypeData.builder() // .simpleId(CreateSandpaperOverhaul.id("sandpaper")) // .tag(DamageTypeTags.BYPASSES_ARMOR) diff --git a/src/main/java/com/ghasto/create_so/compat/rei/ModReiCompat.java b/src/main/java/com/ghasto/create_so/compat/rei/ModReiCompat.java index cc60049..b0298b7 100644 --- a/src/main/java/com/ghasto/create_so/compat/rei/ModReiCompat.java +++ b/src/main/java/com/ghasto/create_so/compat/rei/ModReiCompat.java @@ -31,7 +31,7 @@ import me.shedaniel.rei.api.client.registry.category.CategoryRegistry; import me.shedaniel.rei.api.client.registry.display.DisplayRegistry; import me.shedaniel.rei.api.common.category.CategoryIdentifier; -import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.Recipe; @@ -211,7 +211,7 @@ public CreateRecipeCategory build(String name, CreateRecipeCategory.Factory info = new CreateRecipeCategory.Info<>( CategoryIdentifier.of(CreateSandpaperOverhaul.id(name)), - Component.translatable("rei.category.create_so." + name), background, icon, recipesSupplier, catalysts, width, height, displayFactory == null ? (recipe) -> new CreateDisplay<>(recipe, CategoryIdentifier.of(CreateSandpaperOverhaul.id(name))) : displayFactory); + new TranslatableComponent("rei.category.create_so." + name), background, icon, recipesSupplier, catalysts, width, height, displayFactory == null ? (recipe) -> new CreateDisplay<>(recipe, CategoryIdentifier.of(CreateSandpaperOverhaul.id(name))) : displayFactory); CreateRecipeCategory category = factory.create(info); allCategories.add(category); return category; diff --git a/src/main/java/com/ghasto/create_so/mixin/SandpaperItemMixinClient.java b/src/main/java/com/ghasto/create_so/mixin/SandpaperItemMixinClient.java index 60d5d06..b9b1a89 100644 --- a/src/main/java/com/ghasto/create_so/mixin/SandpaperItemMixinClient.java +++ b/src/main/java/com/ghasto/create_so/mixin/SandpaperItemMixinClient.java @@ -1,18 +1,21 @@ package com.ghasto.create_so.mixin; +import java.util.List; + +import org.jetbrains.annotations.Nullable; +import org.spongepowered.asm.mixin.Mixin; + import com.simibubi.create.content.equipment.sandPaper.SandPaperItem; import com.simibubi.create.foundation.item.TooltipHelper; + import net.minecraft.ChatFormatting; import net.minecraft.client.gui.screens.Screen; import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TextComponent; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.TooltipFlag; import net.minecraft.world.level.Level; -import org.jetbrains.annotations.Nullable; -import org.spongepowered.asm.mixin.Mixin; - -import java.util.List; @Mixin(SandPaperItem.class) public class SandpaperItemMixinClient extends Item { @@ -23,25 +26,25 @@ public SandpaperItemMixinClient(Properties properties) { @Override public void appendHoverText(ItemStack stack, @Nullable Level level, List tooltipComponents, TooltipFlag isAdvanced) { if(Screen.hasAltDown()){ - tooltipComponents.add(Component.literal("Hold ") + tooltipComponents.add(new TextComponent("Hold ") .withStyle(ChatFormatting.DARK_GRAY) - .append(Component.literal("[").withStyle(ChatFormatting.DARK_GRAY) - .append(Component.literal("Alt").withStyle(ChatFormatting.WHITE)) - .append(Component.literal("]").withStyle(ChatFormatting.DARK_GRAY)) - .append(Component.literal(" for Durability").withStyle(ChatFormatting.DARK_GRAY)) + .append(new TextComponent("[").withStyle(ChatFormatting.DARK_GRAY) + .append(new TextComponent("Alt").withStyle(ChatFormatting.WHITE)) + .append(new TextComponent("]").withStyle(ChatFormatting.DARK_GRAY)) + .append(new TextComponent(" for Durability").withStyle(ChatFormatting.DARK_GRAY)) )); - tooltipComponents.add(Component.literal("") + tooltipComponents.add(new TextComponent("") .append("Durability: ").withStyle(TooltipHelper.Palette.STANDARD_CREATE.primary()) - .append(Component.literal(String.valueOf(stack.getMaxDamage() - stack.getDamageValue())).withStyle(ChatFormatting.BOLD).withStyle(TooltipHelper.Palette.STANDARD_CREATE.highlight())) - .append(Component.literal("/").withStyle(TooltipHelper.Palette.STANDARD_CREATE.highlight()).withStyle(ChatFormatting.BOLD)) - .append(Component.literal(String.valueOf(stack.getMaxDamage())).withStyle(TooltipHelper.Palette.STANDARD_CREATE.highlight()).withStyle(ChatFormatting.BOLD))); + .append(new TextComponent(String.valueOf(stack.getMaxDamage() - stack.getDamageValue())).withStyle(ChatFormatting.BOLD).withStyle(TooltipHelper.Palette.STANDARD_CREATE.highlight())) + .append(new TextComponent("/").withStyle(TooltipHelper.Palette.STANDARD_CREATE.highlight()).withStyle(ChatFormatting.BOLD)) + .append(new TextComponent(String.valueOf(stack.getMaxDamage())).withStyle(TooltipHelper.Palette.STANDARD_CREATE.highlight()).withStyle(ChatFormatting.BOLD))); } else { - tooltipComponents.add(Component.literal("Hold ") + tooltipComponents.add(new TextComponent("Hold ") .withStyle(ChatFormatting.DARK_GRAY) - .append(Component.literal("[").withStyle(ChatFormatting.DARK_GRAY) - .append(Component.literal("Alt").withStyle(ChatFormatting.GRAY)) - .append(Component.literal("]").withStyle(ChatFormatting.DARK_GRAY)) - .append(Component.literal(" for Durability").withStyle(ChatFormatting.DARK_GRAY)) + .append(new TextComponent("[").withStyle(ChatFormatting.DARK_GRAY) + .append(new TextComponent("Alt").withStyle(ChatFormatting.GRAY)) + .append(new TextComponent("]").withStyle(ChatFormatting.DARK_GRAY)) + .append(new TextComponent(" for Durability").withStyle(ChatFormatting.DARK_GRAY)) )); } }