Skip to content

Commit

Permalink
Add subtag for generating multi-plates (#3821)
Browse files Browse the repository at this point in the history
Co-authored-by: Maya <[email protected]>
  • Loading branch information
StaffiX and serenibyss authored Jan 19, 2025
1 parent 26a58fb commit 029e21d
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 34 deletions.
65 changes: 65 additions & 0 deletions src/main/java/gregtech/api/enums/Materials.java
Original file line number Diff line number Diff line change
Expand Up @@ -2295,6 +2295,71 @@ private static void initSubTags() {
MaterialsUEVplus.HotExoHalkonite,
MaterialsUEVplus.ExoHalkonite);

SubTag.MULTI_PLATE.addTo(
Adamantium,
Aluminium,
Americium,
Beryllium,
BlackPlutonium,
BlackSteel,
Bronze,
Clay,
Cobalt,
Copper,
CosmicNeutronium,
CrystallinePinkSlime,
DarkSteel,
Duralumin,
Europium,
Gold,
HSSG,
HSSS,
Infinity,
InfinityCatalyst,
Iridium,
Iron,
Lead,
Magnesium,
MaterialsKevlar.Kevlar,
MaterialsUEVplus.Eternity,
MaterialsUEVplus.ProtoHalkonite,
MaterialsUEVplus.SpaceTime,
MaterialsUEVplus.TranscendentMetal,
MelodicAlloy,
Mithril,
Naquadah,
NaquadahAlloy,
Naquadria,
Neutronium,
Nichrome,
Nickel,
NiobiumTitanium,
Oriharukon,
Osmiridium,
Osmium,
Palladium,
Paper,
Platinum,
Polybenzimidazole,
Polycaprolactam,
Polytetrafluoroethylene,
RadoxPolymer,
RedAlloy,
Shadow,
SiliconSG,
Silver,
StainlessSteel,
Steel,
Sunnarium,
Thaumium,
Tin,
Titanium,
Trinium,
Tungsten,
TungstenCarbide,
TungstenSteel,
Void);

SubTag.FOOD.addTo(
MeatRaw,
MeatCooked,
Expand Down
38 changes: 4 additions & 34 deletions src/main/java/gregtech/api/enums/OrePrefixes.java
Original file line number Diff line number Diff line change
Expand Up @@ -671,19 +671,12 @@ public enum OrePrefixes {
frame.mNotGeneratedItems.add(MaterialsUEVplus.Universium);
frameGt.mNotGeneratedItems.add(MaterialsUEVplus.Universium);

plateDouble.mNotGeneratedItems.add(MaterialsUEVplus.MagnetohydrodynamicallyConstrainedStarMatter);
plateTriple.mNotGeneratedItems.add(MaterialsUEVplus.MagnetohydrodynamicallyConstrainedStarMatter);
plateQuadruple.mNotGeneratedItems.add(MaterialsUEVplus.MagnetohydrodynamicallyConstrainedStarMatter);
plateQuintuple.mNotGeneratedItems.add(MaterialsUEVplus.MagnetohydrodynamicallyConstrainedStarMatter);
cell.mNotGeneratedItems.add(MaterialsUEVplus.MagnetohydrodynamicallyConstrainedStarMatter);
turbineBlade.mNotGeneratedItems.add(MaterialsUEVplus.MagnetohydrodynamicallyConstrainedStarMatter);
dust.mNotGeneratedItems.add(MaterialsUEVplus.MagnetohydrodynamicallyConstrainedStarMatter);
dustSmall.mNotGeneratedItems.add(MaterialsUEVplus.MagnetohydrodynamicallyConstrainedStarMatter);
dustTiny.mNotGeneratedItems.add(MaterialsUEVplus.MagnetohydrodynamicallyConstrainedStarMatter);

plateTriple.mNotGeneratedItems.add(MaterialsUEVplus.HotProtoHalkonite);
plateQuadruple.mNotGeneratedItems.add(MaterialsUEVplus.HotProtoHalkonite);
plateQuintuple.mNotGeneratedItems.add(MaterialsUEVplus.HotProtoHalkonite);
cell.mNotGeneratedItems.add(MaterialsUEVplus.HotProtoHalkonite);;
turbineBlade.mNotGeneratedItems.add(MaterialsUEVplus.HotProtoHalkonite);
dust.mNotGeneratedItems.add(MaterialsUEVplus.HotProtoHalkonite);
Expand All @@ -694,9 +687,6 @@ public enum OrePrefixes {
nugget.mNotGeneratedItems.add(MaterialsUEVplus.HotProtoHalkonite);
itemCasing.mNotGeneratedItems.add(MaterialsUEVplus.HotProtoHalkonite);

plateTriple.mNotGeneratedItems.add(MaterialsUEVplus.ProtoHalkonite);
plateQuadruple.mNotGeneratedItems.add(MaterialsUEVplus.ProtoHalkonite);
plateQuintuple.mNotGeneratedItems.add(MaterialsUEVplus.ProtoHalkonite);
cell.mNotGeneratedItems.add(MaterialsUEVplus.ProtoHalkonite);
turbineBlade.mNotGeneratedItems.add(MaterialsUEVplus.ProtoHalkonite);
dust.mNotGeneratedItems.add(MaterialsUEVplus.ProtoHalkonite);
Expand All @@ -707,10 +697,6 @@ public enum OrePrefixes {
nugget.mNotGeneratedItems.add(MaterialsUEVplus.ProtoHalkonite);
itemCasing.mNotGeneratedItems.add(MaterialsUEVplus.ProtoHalkonite);

plateDouble.mNotGeneratedItems.add(MaterialsUEVplus.HotExoHalkonite);
plateTriple.mNotGeneratedItems.add(MaterialsUEVplus.HotExoHalkonite);
plateQuadruple.mNotGeneratedItems.add(MaterialsUEVplus.HotExoHalkonite);
plateQuintuple.mNotGeneratedItems.add(MaterialsUEVplus.HotExoHalkonite);
cell.mNotGeneratedItems.add(MaterialsUEVplus.HotExoHalkonite);
turbineBlade.mNotGeneratedItems.add(MaterialsUEVplus.HotExoHalkonite);
dust.mNotGeneratedItems.add(MaterialsUEVplus.HotExoHalkonite);
Expand All @@ -721,10 +707,6 @@ public enum OrePrefixes {
nugget.mNotGeneratedItems.add(MaterialsUEVplus.HotExoHalkonite);
itemCasing.mNotGeneratedItems.add(MaterialsUEVplus.HotExoHalkonite);

plateDouble.mNotGeneratedItems.add(MaterialsUEVplus.ExoHalkonite);
plateTriple.mNotGeneratedItems.add(MaterialsUEVplus.ExoHalkonite);
plateQuadruple.mNotGeneratedItems.add(MaterialsUEVplus.ExoHalkonite);
plateQuintuple.mNotGeneratedItems.add(MaterialsUEVplus.ExoHalkonite);
cell.mNotGeneratedItems.add(MaterialsUEVplus.ExoHalkonite);
turbineBlade.mNotGeneratedItems.add(MaterialsUEVplus.ExoHalkonite);
dust.mNotGeneratedItems.add(MaterialsUEVplus.ExoHalkonite);
Expand Down Expand Up @@ -925,22 +907,10 @@ public enum OrePrefixes {
SubTag.MAGICAL,
new ICondition.And<>(SubTag.TRANSPARENT, SubTag.HAS_COLOR));

plateDouble.mCondition = new ICondition.Or<>(
SubTag.PAPER,
new ICondition.Not<>(SubTag.NO_SMASHING),
SubTag.STRETCHY);
plateTriple.mCondition = new ICondition.Or<>(
SubTag.PAPER,
new ICondition.Not<>(SubTag.NO_SMASHING),
SubTag.STRETCHY);
plateQuadruple.mCondition = new ICondition.Or<>(
SubTag.PAPER,
new ICondition.Not<>(SubTag.NO_SMASHING),
SubTag.STRETCHY);
plateQuintuple.mCondition = new ICondition.Or<>(
SubTag.PAPER,
new ICondition.Not<>(SubTag.NO_SMASHING),
SubTag.STRETCHY);
plateDouble.mCondition = new ICondition.And<>(SubTag.MULTI_PLATE);
plateTriple.mCondition = new ICondition.And<>(SubTag.MULTI_PLATE);
plateQuadruple.mCondition = new ICondition.And<>(SubTag.MULTI_PLATE);
plateQuintuple.mCondition = new ICondition.And<>(SubTag.MULTI_PLATE);

plateDense.mCondition = new ICondition.Or<>(new ICondition.Not<>(SubTag.NO_SMASHING), SubTag.STRETCHY);
plateSuperdense.mCondition = new ICondition.Or<>(new ICondition.Not<>(SubTag.NO_SMASHING), SubTag.STRETCHY);
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/gregtech/api/enums/SubTag.java
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,11 @@ public final class SubTag implements ICondition<ISubTagContainer> {
*/
public static final SubTag BLACK_HOLE = getNewSubTag("BLACK_HOLE");

/**
* If this material should generate Multi-plates (double, triple, quadruple, quintuple)
*/
public static final SubTag MULTI_PLATE = getNewSubTag("MULTI_PLATE");

public final Collection<ISubTagContainer> mRelevantTaggedItems = new HashSet<>(1);

private SubTag(String aName) {
Expand Down

0 comments on commit 029e21d

Please sign in to comment.