Skip to content

Commit

Permalink
We Could be Immortal
Browse files Browse the repository at this point in the history
 - Respect 'eternal' modifier from Forbidden and Arcanus in Deployer Recipes
 - Fixes Creators-of-Create#6220
  • Loading branch information
Attack8 committed Mar 9, 2024
1 parent 2201d87 commit 86e524f
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 @@ -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

0 comments on commit 86e524f

Please sign in to comment.