Skip to content

Commit 6802a13

Browse files
authored
Respect 'eternal' modifier from Forbidden and Arcanus in Deployer Recipes (#6231)
- We Could be Immortal - Fixes #6220
1 parent 51db53c commit 6802a13

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

build.gradle

+2
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,8 @@ dependencies {
204204
// runtimeOnly fg.deobf("maven.modrinth:rubidium:0.5.3")
205205
// implementation fg.deobf("com.railwayteam.railways:railways-1.18.2-1.1.1:all") { transitive = false }
206206
// runtimeOnly fg.deobf("maven.modrinth:spark:1.10.38-forge")
207+
//runtimeOnly fg.deobf("curse.maven:forbidden-arcanus-309858:4729924")
208+
//runtimeOnly fg.deobf("curse.maven:valhelsia-core-416935:3886212")
207209

208210
// https://discord.com/channels/313125603924639766/725850371834118214/910619168821354497
209211
// Prevent Mixin annotation processor from getting into IntelliJ's annotation processor settings

src/main/java/com/simibubi/create/content/kinetics/deployer/BeltDeployerCallbacks.java

+5-4
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public static ProcessingResult whenItemHeld(TransportedItemStack s, TransportedI
9494

9595
public static void activate(TransportedItemStack transported, TransportedItemStackHandlerBehaviour handler,
9696
DeployerBlockEntity blockEntity, Recipe<?> recipe) {
97-
97+
9898
List<TransportedItemStack> collect =
9999
RecipeApplier.applyRecipeOn(ItemHandlerHelper.copyStackWithSize(transported.stack, 1), recipe)
100100
.stream()
@@ -113,7 +113,7 @@ public static void activate(TransportedItemStack transported, TransportedItemSta
113113
.collect(Collectors.toList());
114114

115115
blockEntity.award(AllAdvancements.DEPLOYER);
116-
116+
117117
TransportedItemStack left = transported.copy();
118118
blockEntity.player.spawnedItemEffects = transported.stack.copy();
119119
left.stack.shrink(1);
@@ -128,8 +128,9 @@ public static void activate(TransportedItemStack transported, TransportedItemSta
128128
}
129129

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

0 commit comments

Comments
 (0)