Skip to content

Conversation

@gamecrash534
Copy link

@gamecrash534 gamecrash534 commented Jun 20, 2025

This PR aims to allow the use of custom nbt items to be added in the special.yml file, utilizing the NBTAPI.
The build.gradle.kts has also been changed with updated versions and repositories, so that the project can be built again.
This fixes #71

Image of a new item with custom nbt in the menu:
grafik

if (upperItemName.startsWith("LIGHT") && !upperItemName.equals("LIGHT")) {
int level;
try {
level = Integer.parseInt(itemName.split("-")[1]);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we replace this with JSON configurations for all lighting levels? Now it is possible.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implemented in the new commit

final Material itemMaterial;
try {
itemMaterial = Material.valueOf(itemName);
if (itemName.contains(" ")) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps it is cleaner if not only a space is used, but a ", " is used as a separator.

- 'ITEM_FRAME, {...'

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implemented in the new commit

- 'ITEM_FRAME {"minecraft:entity_data": {id: "minecraft:item_frame", Invisible: 1b}, "minecraft:custom_name":''{text:"Invisible Item Frame"}''}'

# No touch!
version: 1
Copy link

@RedstoneFuture RedstoneFuture Jun 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the version need to be incremented? (Tbd.)

@TehBrian
Copy link
Owner

Thanks for the PR! I'll give it a full review once it's out of draft.

@gamecrash534 gamecrash534 marked this pull request as ready for review June 20, 2025 18:46
@RedstoneFuture
Copy link

Thank you! I confirm that the changes are good.

@gamecrash534 gamecrash534 marked this pull request as draft June 22, 2025 12:10
@gamecrash534 gamecrash534 marked this pull request as ready for review June 22, 2025 12:10
@gamecrash534
Copy link
Author

(I just realized that the relocation of item-nbt-api didnt work, fixed it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

allow full /give syntax for special items

3 participants