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

Walshy/mc 1.21 bundles #4278

Draft
wants to merge 3 commits into
base: walshy/mc-1.21
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ public boolean isItemAllowed(@Nonnull ItemStack item, @Nullable SlimefunItem ite
return false;
}

// Bundles aren't allowed either
if (SlimefunTag.BUNDLES.isTagged(item.getType())) {
return false;
}

return !(itemAsSlimefunItem instanceof SlimefunBackpack);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,9 @@ public enum SlimefunTag implements Tag<Material> {
/**
* All tile entities.
*/
TILE_ENTITIES;
TILE_ENTITIES,

BUNDLES;

/**
* Lookup table for tag names.
Expand Down
72 changes: 72 additions & 0 deletions src/main/resources/tags/bundles.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"values" : [
{
"id" : "minecraft:bundle",
"required" : false
},
{
"id" : "minecraft:white_bundle",
"required" : false
},
{
"id" : "minecraft:orange_bundle",
"required" : false
},
{
"id" : "minecraft:magenta_bundle",
"required" : false
},
{
"id" : "minecraft:light_blue_bundle",
"required" : false
},
{
"id" : "minecraft:yellow_bundle",
"required" : false
},
{
"id" : "minecraft:lime_bundle",
"required" : false
},
{
"id" : "minecraft:pink_bundle",
"required" : false
},
{
"id" : "minecraft:gray_bundle",
"required" : false
},
{
"id" : "minecraft:light_gray_bundle",
"required" : false
},
{
"id" : "minecraft:cyan_bundle",
"required" : false
},
{
"id" : "minecraft:purple_bundle",
"required" : false
},
{
"id" : "minecraft:blue_bundle",
"required" : false
},
{
"id" : "minecraft:brown_bundle",
"required" : false
},
{
"id" : "minecraft:green_bundle",
"required" : false
},
{
"id" : "minecraft:red_bundle",
"required" : false
},
{
"id" : "minecraft:black_bundle",
"required" : false
}
]
}
Loading