Skip to content

Commit

Permalink
1.18.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ghasto69 committed Sep 24, 2023
1 parent 1a0f378 commit 842c8c1
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 34 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ bin/
# fabric

run/
src/generated/
22 changes: 11 additions & 11 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
2 changes: 1 addition & 1 deletion src/main/java/com/ghasto/create_so/ModBlocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/com/ghasto/create_so/ModDamageTypes.java
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -211,7 +211,7 @@ public CreateRecipeCategory<T> build(String name, CreateRecipeCategory.Factory<T

CreateRecipeCategory.Info<T> 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<T> category = factory.create(info);
allCategories.add(category);
return category;
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -23,25 +26,25 @@ public SandpaperItemMixinClient(Properties properties) {
@Override
public void appendHoverText(ItemStack stack, @Nullable Level level, List<Component> 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))
));
}
}
Expand Down

0 comments on commit 842c8c1

Please sign in to comment.