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

Respect 'eternal' modifier from Forbidden and Arcanus in Deployer Recipes #6231

Merged
Merged
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
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ dependencies {
// runtimeOnly fg.deobf("maven.modrinth:rubidium:0.5.3")
// implementation fg.deobf("com.railwayteam.railways:railways-1.18.2-1.1.1:all") { transitive = false }
// runtimeOnly fg.deobf("maven.modrinth:spark:1.10.38-forge")
//runtimeOnly fg.deobf("curse.maven:forbidden-arcanus-309858:4729924")
//runtimeOnly fg.deobf("curse.maven:valhelsia-core-416935:3886212")

// https://discord.com/channels/313125603924639766/725850371834118214/910619168821354497
// Prevent Mixin annotation processor from getting into IntelliJ's annotation processor settings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public static ProcessingResult whenItemHeld(TransportedItemStack s, TransportedI

public static void activate(TransportedItemStack transported, TransportedItemStackHandlerBehaviour handler,
DeployerBlockEntity blockEntity, Recipe<?> recipe) {

List<TransportedItemStack> collect =
RecipeApplier.applyRecipeOn(ItemHandlerHelper.copyStackWithSize(transported.stack, 1), recipe)
.stream()
Expand All @@ -113,7 +113,7 @@ public static void activate(TransportedItemStack transported, TransportedItemSta
.collect(Collectors.toList());

blockEntity.award(AllAdvancements.DEPLOYER);

TransportedItemStack left = transported.copy();
blockEntity.player.spawnedItemEffects = transported.stack.copy();
left.stack.shrink(1);
Expand All @@ -128,8 +128,9 @@ public static void activate(TransportedItemStack transported, TransportedItemSta
}

ItemStack heldItem = blockEntity.player.getMainHandItem();
boolean unbreakable = heldItem.hasTag() && heldItem.getTag()
.getBoolean("Unbreakable");
boolean unbreakable = heldItem.hasTag() && (
heldItem.getTag().getBoolean("Unbreakable") ||
heldItem.getTag().getString("Modifier").equals("forbidden_arcanus:eternal")); // Forbidden Arcanus Compat, See Creators-of-Create#6220
boolean keepHeld =
recipe instanceof ItemApplicationRecipe && ((ItemApplicationRecipe) recipe).shouldKeepHeldItem();

Expand Down