|
21 | 21 | import net.minecraft.world.level.block.entity.BlockEntity; |
22 | 22 | import net.minecraft.world.level.block.entity.BlockEntityType; |
23 | 23 | import net.minecraft.world.level.block.state.BlockState; |
24 | | -import net.nuclearteam.createnuclear.CNBlocks; |
25 | | -import net.nuclearteam.createnuclear.CNItems; |
26 | | -import net.nuclearteam.createnuclear.CNPackets; |
27 | | -import net.nuclearteam.createnuclear.CreateNuclear; |
| 24 | +import net.nuclearteam.createnuclear.*; |
28 | 25 | import net.nuclearteam.createnuclear.content.multiblock.IHeat; |
29 | 26 | import net.nuclearteam.createnuclear.content.multiblock.input.ReactorInputEntity; |
30 | 27 | import net.nuclearteam.createnuclear.content.multiblock.output.ReactorOutput; |
@@ -319,10 +316,10 @@ private double calculateHeat(CompoundTag tag) { |
319 | 316 | String currentRod = ""; |
320 | 317 | ListTag list = inventory.getStackInSlot(0).getOrCreateTag().getCompound("pattern").getList("Items", Tag.TAG_COMPOUND); |
321 | 318 | for (int i = 0; i < list.size(); i++) { |
322 | | - if (list.getCompound(i).getString("id").equals("createnuclear:uranium_rod")) { |
| 319 | + if (ItemStack.of(list.getCompound(i)).is(CNTags.CNItemTags.FUEL.tag)) { |
323 | 320 | heat += baseUraniumHeat; |
324 | 321 | currentRod = "u"; |
325 | | - } else if (list.getCompound(i).getString("id").equals("createnuclear:graphite_rod")) { |
| 322 | + } else if (ItemStack.of(list.getCompound(i)).is(CNTags.CNItemTags.COOLER.tag)) { |
326 | 323 | heat += baseGraphiteHeat; |
327 | 324 | currentRod = "g"; |
328 | 325 | } |
@@ -350,10 +347,10 @@ private double calculateHeat(CompoundTag tag) { |
350 | 347 | if (list.getCompound(l).getInt("Slot") == neighborSlot) { |
351 | 348 | // If the currentRod equals "u", apply the corresponding heat |
352 | 349 | if (currentRod.equals("u")) { |
353 | | - String id = list.getCompound(l).getString("id"); |
354 | | - if (id.equals("createnuclear:uranium_rod")) { |
| 350 | + ItemStack stack = ItemStack.of(list.getCompound(i)); |
| 351 | + if (stack.is(CNTags.CNItemTags.FUEL.tag)) { |
355 | 352 | heat += proximityUraniumHeat; |
356 | | - } else if (id.equals("createnuclear:graphite_rod")) { |
| 353 | + } else if (stack.is(CNTags.CNItemTags.COOLER.tag)) { |
357 | 354 | heat += proximityGraphiteHeat; |
358 | 355 | } |
359 | 356 | } |
|
0 commit comments