Skip to content

Commit 051964b

Browse files
authored
Fix ghost circuit in item detector (#4293)
1 parent 8e420c6 commit 051964b

File tree

4 files changed

+10
-0
lines changed

4 files changed

+10
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"values": [
3+
"gtceu:programmed_circuit"
4+
]
5+
}

src/main/java/com/gregtechceu/gtceu/common/cover/detector/ItemDetectorCover.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import com.gregtechceu.gtceu.api.capability.ICoverable;
44
import com.gregtechceu.gtceu.api.cover.CoverDefinition;
5+
import com.gregtechceu.gtceu.data.recipe.CustomTags;
56
import com.gregtechceu.gtceu.utils.GTTransferUtils;
67
import com.gregtechceu.gtceu.utils.RedstoneUtil;
78

@@ -35,6 +36,7 @@ protected void update() {
3536
return;
3637

3738
for (int i = 0; i < handler.getSlots(); i++) {
39+
if (handler.getStackInSlot(i).is(CustomTags.SKIP_ITEM_DETECTOR)) continue;
3840
storedItems += handler.getStackInSlot(i).getCount();
3941
}
4042

src/main/java/com/gregtechceu/gtceu/common/data/GTItems.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2035,6 +2035,7 @@ public static ItemEntry<ComponentItem> createFluidCell(Material mat, int capacit
20352035
.onRegister(modelPredicate(GTCEu.id("circuit"),
20362036
(itemStack) -> IntCircuitBehaviour.getCircuitConfiguration(itemStack) / 100f))
20372037
.onRegister(attach(new IntCircuitBehaviour()))
2038+
.tag(CustomTags.SKIP_ITEM_DETECTOR)
20382039
.register();
20392040

20402041
// public static ItemEntry<ComponentItem> FOAM_SPRAYER = REGISTRATE.item("foam_sprayer",

src/main/java/com/gregtechceu/gtceu/data/recipe/CustomTags.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ public class CustomTags {
130130

131131
public static final TagKey<Item> CHEM_BATH_WASHABLE = TagUtil.createModItemTag("chemical_bath_washable");
132132

133+
public static final TagKey<Item> SKIP_ITEM_DETECTOR = TagUtil.createModItemTag("skip_item_detector");
134+
133135
// Mineability tags
134136
public static final TagKey<Block> MINEABLE_WITH_WRENCH = TagUtil.createBlockTag("mineable/wrench");
135137
public static final TagKey<Block> MINEABLE_WITH_WIRE_CUTTER = TagUtil.createBlockTag("mineable/wire_cutter");

0 commit comments

Comments
 (0)