1818import java .util .Map ;
1919
2020// TODO: Research May Produce Waste Or Fail Research
21- // TODO: Tier 1 May Only Research Low Level Items
22- // TODO: Make researchers only research materials, not other items
2321// TODO: Make researchers give boosts to items from the previous tier
24- // TODO: Make research take longer, but more rewarding
25- // TODO: Make research repeatable, but not overpowered
2622// TODO: Try to keep research fun instead of a chore
2723
2824public class Research {
@@ -40,7 +36,6 @@ public void Tier1(TileEntityT1 te) {
4036 ItemStack fuel = inventory [fuelSlot ];
4137
4238 if (output != null ) {
43- // output blocked -> stop burning/researching
4439 te .isResearching = false ;
4540 te .isBurning = false ;
4641 return ;
@@ -53,8 +48,8 @@ public void Tier1(TileEntityT1 te) {
5348 te .isBurning = false ;
5449 return ;
5550 }
51+ if (!ResearchRegistry .canResearch (input .getItem (), 1 )) return ;
5652
57- // start preparing research time only when we haven't started progress yet
5853 if (!te .isResearching || te .researchProgress == 0 && te .maxResearchProgress == 0 ) {
5954 MaterialInfo info = ResearchRegistry .getInfo (input .getItem ());
6055 if (info != null ) {
@@ -90,7 +85,7 @@ public void Tier1(TileEntityT1 te) {
9085 fuel .stackSize --;
9186 inventory [fuelSlot ] = (fuel .stackSize <= 0 ) ? null : fuel ;
9287 } else {
93- // not valid fuel - don't consume
88+
9489 }
9590 }
9691
@@ -150,6 +145,7 @@ public void Tier2(TileEntityT2 te) {
150145 te .isResearching = false ;
151146 return ;
152147 }
148+ if (!ResearchRegistry .canResearch (input .getItem (), 1 )) return ;
153149
154150 // constants for clarity
155151 final int fluidCost = 1000 ; // ml / units used to start a research cycle
@@ -246,6 +242,7 @@ public void Tier3(TileEntityT3 te) {
246242 return ;
247243 }
248244
245+ if (!ResearchRegistry .canResearch (input .getItem (), 1 )) return ;
249246 final int powerPerTick = te .core .getPowerUsage (250 );
250247
251248 // start research (don't subtract per-tick energy here)
0 commit comments