Skip to content

Commit

Permalink
re-added Trinkets support #60
Browse files Browse the repository at this point in the history
  • Loading branch information
cech12 committed Jul 15, 2024
1 parent 297d789 commit 0391d7f
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 18 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Forge Recommended Versioning](https://mcforge.readthedocs.io/en/latest/conventions/versioning/).

## [1.21-6.3.1.0] - 2024-07-15
### Changed
- re-added Trinkets support (1.21-3.10.0) (Fabric/Quilt)

## [1.21-6.3.0.0] - 2024-07-14
### Changed
- updated NeoForge to 21.0.94-beta
Expand Down
2 changes: 1 addition & 1 deletion fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dependencies {
}
modImplementation("com.terraformersmc:modmenu:${mod_menu_version}")

//modImplementation("dev.emi:trinkets:${trinkets_version}")
modImplementation("dev.emi:trinkets:${trinkets_version}")
modImplementation("io.wispforest:accessories-fabric:${accessories_version}")

implementation group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.1'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package de.cech12.usefulhats;

import de.cech12.usefulhats.compat.AccessoriesCompat;
import de.cech12.usefulhats.compat.TrinketsCompat;
import de.cech12.usefulhats.init.ModCreativeTabs;
import de.cech12.usefulhats.init.ModItems;
import de.cech12.usefulhats.platform.Services;
Expand All @@ -14,11 +15,9 @@ public void onInitialize() {
ModItems.init();
ModCreativeTabs.init();

/* TODO
if (Services.PLATFORM.isModLoaded(TrinketsCompat.MOD_ID)) {
TrinketsCompat.register();
}
*/
if (Services.PLATFORM.isModLoaded(Constants.ACCESSORIES_MOD_ID)) {
AccessoriesCompat.register();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import de.cech12.usefulhats.Constants;
import de.cech12.usefulhats.client.compat.AccessoriesClientCompat;
import de.cech12.usefulhats.client.compat.TrinketsClientCompat;
import de.cech12.usefulhats.compat.TrinketsCompat;
import de.cech12.usefulhats.item.AbstractHatItem;
import de.cech12.usefulhats.platform.Services;
import net.fabricmc.api.ClientModInitializer;
Expand Down Expand Up @@ -30,11 +32,9 @@ public void onInitializeClient() {
//register armor renderer
ArmorRenderer.register(renderer, item);
});
/* TODO
if (Services.PLATFORM.isModLoaded(TrinketsCompat.MOD_ID)) {
TrinketsClientCompat.register();
}
*/
if (Services.PLATFORM.isModLoaded(Constants.ACCESSORIES_MOD_ID)) {
AccessoriesClientCompat.register();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package de.cech12.usefulhats.client.compat;
/* TODO

import com.mojang.blaze3d.vertex.PoseStack;
import de.cech12.usefulhats.client.AbstractUsefulHatsRenderer;
import de.cech12.usefulhats.platform.Services;
Expand Down Expand Up @@ -38,4 +38,3 @@ protected void followBodyRotations(LivingEntity livingEntity, HumanoidModel<Livi
}

}
*/
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package de.cech12.usefulhats.compat;
/* TODO

import de.cech12.usefulhats.UsefulHatsEventUtils;
import de.cech12.usefulhats.item.AbstractHatItem;
import de.cech12.usefulhats.platform.Services;
Expand All @@ -13,7 +13,7 @@

public class TrinketsCompat {

public static String MOD_ID = "trinkets";
public static final String MOD_ID = "trinkets";

public static void register() {
Trinket usefulHatsTrinket = new UsefulHatTrinket();
Expand Down Expand Up @@ -55,4 +55,3 @@ public void onUnequip(ItemStack stack, SlotReference slot, LivingEntity entity)
}

}
*/
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

import de.cech12.usefulhats.Constants;
import de.cech12.usefulhats.compat.AccessoriesCompat;
import de.cech12.usefulhats.compat.TrinketsCompat;
import de.cech12.usefulhats.init.ModItems;
import de.cech12.usefulhats.item.AbstractHatItem;
import de.cech12.usefulhats.platform.services.IRegistryHelper;
import net.fabricmc.fabric.api.tag.convention.v1.ConventionalEntityTypeTags;
import net.fabricmc.fabric.api.tag.convention.v2.ConventionalEntityTypeTags;
import net.minecraft.tags.FluidTags;
import net.minecraft.tags.ItemTags;
import net.minecraft.world.entity.EquipmentSlot;
Expand Down Expand Up @@ -43,11 +44,9 @@ public List<ItemStack> getEquippedHatItemStacks(LivingEntity entity) {
if (headItemStack.getItem() instanceof AbstractHatItem) {
stacks.add(headItemStack);
}
/* TODO
if (Services.PLATFORM.isModLoaded(TrinketsCompat.MOD_ID)) {
TrinketsCompat.addEquippedHatsToList(entity, stacks);
}
*/
if (Services.PLATFORM.isModLoaded(Constants.ACCESSORIES_MOD_ID)) {
AccessoriesCompat.addEquippedHatsToList(entity, stacks);
}
Expand Down
3 changes: 2 additions & 1 deletion fabric/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
},
"suggests": {
"modmenu": ">=${mod_menu_version}",
"accessories": ">=${accessories_version}"
"accessories": ">=${accessories_version}",
"trinkets": ">=${trinkets_version}"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
public class ForgeConfigHelper implements IConfigHelper {

public static ForgeConfigSpec SERVER_CONFIG;
public static final ForgeConfigSpec SERVER_CONFIG;

public static final ForgeConfigSpec.BooleanValue AQUANAUT_HELMET_DAMAGE_ENABLED;
public static final ForgeConfigSpec.IntValue AQUANAUT_HELMET_DURABILITY;
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Project
group=de.cech12.usefulhats
mod_version=6.3.0.0
mod_version=6.3.1.0
mod_id=usefulhats
mod_name=Useful Hats
mod_author=Cech12
Expand Down Expand Up @@ -39,7 +39,7 @@ baubles2_file_id=5477738
baubles2_version_range=[0.5,)

# Trinkets
trinkets_version=3.9.0
trinkets_version=3.10.0

# Accessories
accessories_version=1.0.0-beta.5+1.21
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/
public class NeoForgeConfigHelper implements IConfigHelper {

public static ModConfigSpec SERVER_CONFIG;
public static final ModConfigSpec SERVER_CONFIG;

public static final ModConfigSpec.BooleanValue AQUANAUT_HELMET_DAMAGE_ENABLED;
public static final ModConfigSpec.IntValue AQUANAUT_HELMET_DURABILITY;
Expand Down

0 comments on commit 0391d7f

Please sign in to comment.