Skip to content

Commit

Permalink
Respect 'eternal' modifier from Forbidden and Arcanus in Deployer Rec…
Browse files Browse the repository at this point in the history
…ipes (Creators-of-Create#6231)

- We Could be Immortal
 - Fixes Creators-of-Create#6220
  • Loading branch information
Attack8 authored Mar 22, 2024
1 parent 51db53c commit 6802a13
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,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

0 comments on commit 6802a13

Please sign in to comment.