Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v0.2.0 #10

Merged
merged 20 commits into from
Jul 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
2b0f1e9
Merge pull request #4 from refinedmods/main
raoulvdberge Jun 18, 2024
6099d74
chore: update translation French from crowdin
raoulvdberge Jun 20, 2024
a45d59a
chore: update translation Spanish from crowdin
raoulvdberge Jun 20, 2024
46284b8
chore: update translation German from crowdin
raoulvdberge Jun 20, 2024
bbe040b
chore: update translation Hungarian from crowdin
raoulvdberge Jun 20, 2024
3b8784c
chore: update translation Italian from crowdin
raoulvdberge Jun 20, 2024
4e88cfe
chore: update translation Japanese from crowdin
raoulvdberge Jun 20, 2024
980b8d3
chore: update translation Korean from crowdin
raoulvdberge Jun 20, 2024
dfe3d75
chore: update translation Polish from crowdin
raoulvdberge Jun 20, 2024
3e991c9
chore: update translation Russian from crowdin
raoulvdberge Jun 20, 2024
ecec38d
chore: update translation Chinese Simplified from crowdin
raoulvdberge Jun 20, 2024
b7e03a8
chore: update translation Chinese Traditional from crowdin
raoulvdberge Jun 20, 2024
ecaaa51
chore: update translation Portuguese, Brazilian from crowdin
raoulvdberge Jun 20, 2024
2036541
chore: update translation Indonesian from crowdin
raoulvdberge Jun 20, 2024
568f846
Merge pull request #5 from refinedmods/crowdin-translations
raoulvdberge Jun 20, 2024
52d8611
chore: update code style
raoulvdberge Jun 28, 2024
d85d492
docs: add crowdin badge
raoulvdberge Jul 11, 2024
9f4df0a
feat: port to minecraft 1.21
raoulvdberge Jul 20, 2024
fd8f6c8
Merge pull request #9 from refinedmods/feat/GH-6/port
raoulvdberge Jul 20, 2024
06b10b4
chore: prepare release v0.2.0
raoulvdberge Jul 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ These are the most important things to know before contributing (also explained
- Commit messages must adhere to [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/).
- Branch names must be formatted correctly. The format is `{category}/GH-{issue number}/{lowercase-description}`.
Category must match a
category [used in our Commitlint config](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional#type-enum).
category [used in our Commitlint config](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional#type-enum). You can also use `NO-ISSUE` instead of a GitHub issue number.
- We use [Checkstyle](https://checkstyle.sourceforge.io/) in our build workflow to validate coding style. It is
recommended to import the [config/checkstyle/checkstyle.xml](../config/checkstyle/checkstyle.xml)
or [config/intellij-code-style.xml](../config/intellij-code-style.xml) file into your
Expand Down Expand Up @@ -47,7 +47,7 @@ Because we use merge commits when merging a PR, branch names will be part of the
branch names must follow a certain standard.

The format is `{category}/GH-{issue number}/{lowercase-description}` and a branch name can be maximum 50 characters of
length.
length. You can also use `NO-ISSUE` instead of a GitHub issue number.

Category must match a
category [used in our Commitlint config](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional#type-enum).
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ body:
description: |
If your Minecraft version isn't listed here, it means that it's no longer supported. In that case, don't create an issue.
options:
- Minecraft 1.20.4
- Minecraft 1.21
validations:
required: true
- type: input
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
types: [ opened, synchronize, reopened ]
jobs:
build:
uses: refinedmods/refinedarchitect/.github/workflows/build.yml@v0.13.4
uses: refinedmods/refinedarchitect/.github/workflows/build.yml@v0.16.7
with:
mutation-testing: false
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
type: string
jobs:
draft:
uses: refinedmods/refinedarchitect/.github/workflows/draft-release.yml@v0.13.4
uses: refinedmods/refinedarchitect/.github/workflows/draft-release.yml@v0.16.7
with:
release-type: ${{ inputs.release-type }}
version-number-override: ${{ inputs.version-number-override }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/issue-for-unsupported-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ on:
types: [ labeled, unlabeled, reopened ]
jobs:
unsupported-labeler:
uses: refinedmods/refinedarchitect/.github/workflows/issue-for-unsupported-version.yml@v0.13.4
uses: refinedmods/refinedarchitect/.github/workflows/issue-for-unsupported-version.yml@v0.16.7
2 changes: 1 addition & 1 deletion .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- closed
jobs:
publish-release:
uses: refinedmods/refinedarchitect/.github/workflows/publish-release.yml@v0.13.4
uses: refinedmods/refinedarchitect/.github/workflows/publish-release.yml@v0.16.7
secrets: inherit
with:
project-name: 'Refined Storage - Trinkets Integration'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/resolved-issue-locking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ on:
- cron: '0 0 * * *'
jobs:
lock:
uses: refinedmods/refinedarchitect/.github/workflows/resolved-issue-locking.yml@v0.13.4
uses: refinedmods/refinedarchitect/.github/workflows/resolved-issue-locking.yml@v0.16.7
2 changes: 1 addition & 1 deletion .github/workflows/validate-branch-name.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ name: Validate branch name
on: [ pull_request ]
jobs:
validate-branch-name:
uses: refinedmods/refinedarchitect/.github/workflows/validate-branch-name.yml@v0.13.4
uses: refinedmods/refinedarchitect/.github/workflows/validate-branch-name.yml@v0.16.7
2 changes: 1 addition & 1 deletion .github/workflows/validate-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ on:
types: [ opened, synchronize, reopened, ready_for_review, labeled, unlabeled ]
jobs:
validate-changelog:
uses: refinedmods/refinedarchitect/.github/workflows/validate-changelog.yml@v0.13.4
uses: refinedmods/refinedarchitect/.github/workflows/validate-changelog.yml@v0.16.7
2 changes: 1 addition & 1 deletion .github/workflows/validate-commit-messages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ name: Validate commit messages
on: [ pull_request ]
jobs:
validate-commit-messages:
uses: refinedmods/refinedarchitect/.github/workflows/validate-commit-messages.yml@v0.13.4
uses: refinedmods/refinedarchitect/.github/workflows/validate-commit-messages.yml@v0.16.7
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,21 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.2.0] - 2024-07-20

### Changed

- Support for Refined Storage v2.0.0-milestone.4.4.
- The Portable Grid can now also be equipped as a trinket.

## [0.1.0] - 2024-06-18

### Added

- Initial release.

[Unreleased]: https://github.com/refinedmods/refinedstorage-trinkets-integration/compare/v0.1.0...HEAD
[Unreleased]: https://github.com/refinedmods/refinedstorage-trinkets-integration/compare/v0.2.0...HEAD

[0.2.0]: https://github.com/refinedmods/refinedstorage-trinkets-integration/compare/v0.1.0...v0.2.0

[0.1.0]: https://github.com/refinedmods/refinedstorage-trinkets-integration/compare/d7be9c1c8ca55cdff8c09b314e1f0f423c9462d3...v0.1.0
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Refined Storage - Trinkets Integration [![Build Status](https://github.com/refinedmods/refinedstorage-trinkets-integration/actions/workflows/build.yml/badge.svg?branch=develop)](https://github.com/refinedmods/refinedstorage-trinkets-integration/actions/workflows/build.yml) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=refinedmods_refinedstorage-trinkets-integration&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=refinedmods_refinedstorage-trinkets-integration) [![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=refinedmods_refinedstorage-trinkets-integration&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=refinedmods_refinedstorage-trinkets-integration) [![Discord](https://img.shields.io/discord/342942776494653441)](https://discordapp.com/invite/VYzsydb) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE.md)
# Refined Storage - Trinkets Integration [![Build Status](https://github.com/refinedmods/refinedstorage-trinkets-integration/actions/workflows/build.yml/badge.svg?branch=develop)](https://github.com/refinedmods/refinedstorage-trinkets-integration/actions/workflows/build.yml) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=refinedmods_refinedstorage-trinkets-integration&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=refinedmods_refinedstorage-trinkets-integration) [![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=refinedmods_refinedstorage-trinkets-integration&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=refinedmods_refinedstorage-trinkets-integration) [![Crowdin](https://badges.crowdin.net/refined-storage-trinkets-integration/localized.svg)](https://crowdin.com/project/refined-storage-trinkets-integration) [![Discord](https://img.shields.io/discord/342942776494653441)](https://discordapp.com/invite/VYzsydb) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE.md)

## About

Expand Down
48 changes: 0 additions & 48 deletions build.gradle

This file was deleted.

53 changes: 53 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
plugins {
id("refinedarchitect.root")
id("refinedarchitect.fabric")
}

repositories {
maven {
url = uri("https://maven.pkg.github.com/refinedmods/refinedstorage2")
credentials {
username = "anything"
password = "\u0067hp_oGjcDFCn8jeTzIj4Ke9pLoEVtpnZMP4VQgaX"
}
}
maven {
name = "ModMenu"
url = uri("https://maven.terraformersmc.com/")
}
maven {
name = "Cloth Config"
url = uri("https://maven.shedaniel.me/")
}
maven {
name = "Trinkets"
url = uri("https://maven.ladysnake.org/releases")
}
}

refinedarchitect {
modId = "refinedstorage_trinkets_integration"
fabric()
sonarQube("refinedmods_refinedstorage-trinkets-integration", "refinedmods")
publishing {
maven = true
}
}

group = "com.refinedmods.refinedstorage"

base {
archivesName.set("refinedstorage-trinkets-integration")
}

val refinedstorageVersion: String by project
val trinketsVersion: String by project
val cardinalComponentsVersion: String by project

dependencies {
modApi("com.refinedmods.refinedstorage:refinedstorage-platform-fabric:${refinedstorageVersion}")
modApi("dev.emi:trinkets:${trinketsVersion}")
modApi("dev.onyxstudios.cardinal-components-api:cardinal-components-base:${cardinalComponentsVersion}")
modApi("dev.onyxstudios.cardinal-components-api:cardinal-components-entity:${cardinalComponentsVersion}")
}

2 changes: 2 additions & 0 deletions config/intellij-code-style.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<code_scheme name="Refined Mods" version="173">
<JavaCodeStyleSettings>
<option name="GENERATE_FINAL_LOCALS" value="true" />
<option name="GENERATE_FINAL_PARAMETERS" value="true" />
<option name="SPACE_INSIDE_ONE_LINE_ENUM_BRACES" value="true" />
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
Expand Down
8 changes: 5 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
refinedstorageVersion=2.0.0-milestone.3.13
trinketsVersion=3.8.0
cardinalComponentsVersion=5.4.0
refinedarchitectVersion=0.16.7
refinedstorageVersion=2.0.0-milestone.4.4
# https://www.curseforge.com/minecraft/mc-mods/trinkets/files
trinketsVersion=3.10.0
cardinalComponentsVersion=6.1.0
# Gradle
org.gradle.jvmargs=-Xmx1G
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
24 changes: 24 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
pluginManagement {
repositories {
mavenCentral()
gradlePluginPortal()
maven {
url = uri("https://maven.pkg.github.com/refinedmods/refinedarchitect")
credentials {
username = "anything"
password = "\u0067hp_oGjcDFCn8jeTzIj4Ke9pLoEVtpnZMP4VQgaX"
}
}
maven {
name = "Fabric"
url = uri("https://maven.fabricmc.net/")
}
}
val refinedarchitectVersion: String by settings
plugins {
id("refinedarchitect.root").version(refinedarchitectVersion)
id("refinedarchitect.fabric").version(refinedarchitectVersion)
}
}

rootProject.name = "refinedstorage-trinkets-integration"
Original file line number Diff line number Diff line change
@@ -1,27 +1,19 @@
package com.refinedmods.refinedstorage.trinkets;

import com.refinedmods.refinedstorage2.platform.api.PlatformApi;
import com.refinedmods.refinedstorage2.platform.api.RefinedStoragePlugin;
import com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil;
import com.refinedmods.refinedstorage.platform.api.PlatformApi;
import com.refinedmods.refinedstorage.platform.api.RefinedStoragePlugin;

import net.minecraft.resources.ResourceLocation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class TrinketsRefinedStoragePlugin implements RefinedStoragePlugin {
public static final String ID = "refinedstorage_trinkets_integration";

private static final Logger LOGGER = LoggerFactory.getLogger(TrinketsRefinedStoragePlugin.class);

@Override
public void onPlatformApiAvailable(final PlatformApi platformApi) {
PlatformApi.INSTANCE.getSlotReferenceFactoryRegistry().register(
new ResourceLocation(ID, "trinkets"),
ResourceLocation.fromNamespaceAndPath(ID, "trinkets"),
TrinketsSlotReferenceFactory.INSTANCE
);
PlatformApi.INSTANCE.addSlotReferenceProvider(new TrinketsSlotReferenceProvider());
LOGGER.info(
"Refined Storage - Trinkets Integration has loaded. RS2 ModId: {}",
IdentifierUtil.MOD_ID
);
}
}
Original file line number Diff line number Diff line change
@@ -1,37 +1,20 @@
package com.refinedmods.refinedstorage.trinkets;

import com.refinedmods.refinedstorage.platform.api.support.slotreference.SlotReference;
import com.refinedmods.refinedstorage.platform.api.support.slotreference.SlotReferenceFactory;

import java.util.Optional;

import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference;
import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReferenceFactory;
import dev.emi.trinkets.api.TrinketsApi;
import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;

class TrinketsSlotReference implements SlotReference {
private final String groupName;
private final String slotName;
private final int index;

TrinketsSlotReference(final String groupName, final String slotName, final int index) {
this.groupName = groupName;
this.slotName = slotName;
this.index = index;
}

record TrinketsSlotReference(String groupName, String slotName, int index) implements SlotReference {
@Override
public boolean isDisabledSlot(final int playerSlotIndex) {
return false;
}

@Override
public void writeToBuffer(final FriendlyByteBuf buf) {
buf.writeUtf(groupName);
buf.writeUtf(slotName);
buf.writeInt(index);
}

@Override
public Optional<ItemStack> resolve(final Player player) {
return TrinketsApi.getTrinketComponent(player)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,28 @@
package com.refinedmods.refinedstorage.trinkets;

import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference;
import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReferenceFactory;
import net.minecraft.network.FriendlyByteBuf;
import com.refinedmods.refinedstorage.platform.api.support.slotreference.SlotReference;
import com.refinedmods.refinedstorage.platform.api.support.slotreference.SlotReferenceFactory;

import net.minecraft.network.RegistryFriendlyByteBuf;
import net.minecraft.network.codec.ByteBufCodecs;
import net.minecraft.network.codec.StreamCodec;

class TrinketsSlotReferenceFactory implements SlotReferenceFactory {
public static final SlotReferenceFactory INSTANCE = new TrinketsSlotReferenceFactory();
static final SlotReferenceFactory INSTANCE = new TrinketsSlotReferenceFactory();
private static final StreamCodec<RegistryFriendlyByteBuf, TrinketsSlotReference> STREAM_CODEC =
StreamCodec.composite(
ByteBufCodecs.STRING_UTF8, TrinketsSlotReference::groupName,
ByteBufCodecs.STRING_UTF8, TrinketsSlotReference::slotName,
ByteBufCodecs.INT, TrinketsSlotReference::index,
TrinketsSlotReference::new
);

private TrinketsSlotReferenceFactory() {
}

@Override
public SlotReference create(final FriendlyByteBuf buf) {
return new TrinketsSlotReference(buf.readUtf(), buf.readUtf(), buf.readInt());
@SuppressWarnings({"rawtypes", "unchecked"})
public StreamCodec<RegistryFriendlyByteBuf, SlotReference> getStreamCodec() {
return (StreamCodec) STREAM_CODEC;
}
}
Loading
Loading