ThizThizzyDizzy / nc-reactor-generator

A program to plan and generate reactors for Nuclearcraft (https://www.curseforge.com/minecraft/mc-mods/nuclearcraft-mod)
GNU General Public License v3.0
32 stars 6 forks source link

NullPointerException while rendering GUI (dragging around a fuel cell between layers) #167

Closed justwlocke closed 2 months ago

justwlocke commented 4 months ago

Downloaded the most recent beta build, didn't load a save file, fresh reactor.

  1. Create a new reactor.
  2. Add a fuel cell, with any fuel selected.
  3. Use the select tool select either the input or output ports. image
  4. Switch to the move tool to move the port into a corner of the plan.
  5. Cry as the error occurs. image
justwlocke commented 4 months ago

Actually, it would seem as though moving the fuel cell port over any casing triggers the error, not just the corners.

Wizzerinus commented 4 months ago

Here's the traceback:

java.lang.NullPointerException: Cannot read field "edge" because "b.template.casing" is null
    at net.ncplanner.plannerator.multiblock.overhaul.fissionsfr.OverhaulSFR.canBePlacedInCasingEdge(OverhaulSFR.java:1750)
    at net.ncplanner.plannerator.multiblock.overhaul.fissionsfr.OverhaulSFR.canBePlacedInCasingEdge(OverhaulSFR.java:52)
    at net.ncplanner.plannerator.multiblock.CuboidalMultiblock$1.isSpaceValid(CuboidalMultiblock.java:50)
    at net.ncplanner.plannerator.planner.editor.tool.MoveTool.drawGhosts(MoveTool.java:73)
    at net.ncplanner.plannerator.planner.gui.menu.component.editor.MenuComponentEditorGrid.draw(MenuComponentEditorGrid.java:250)
    at net.ncplanner.plannerator.planner.gui.Component.render2d(Component.java:40)
    at net.ncplanner.plannerator.planner.gui.menu.component.editor.MenuComponentEditorGrid.render2d(MenuComponentEditorGrid.java:77)
    at net.ncplanner.plannerator.planner.gui.menu.component.Scrollable.render2d(Scrollable.java:86)
    at net.ncplanner.plannerator.planner.gui.Component.render2d(Component.java:43)
    at net.ncplanner.plannerator.planner.gui.Menu.render2d(Menu.java:23)
    at net.ncplanner.plannerator.planner.gui.menu.MenuEdit.render2d(MenuEdit.java:471)
    at net.ncplanner.plannerator.planner.gui.GUI.render2d(GUI.java:15)
    at net.ncplanner.plannerator.planner.Core$2.render2d(Core.java:254)
    at net.ncplanner.plannerator.planner.Core.render2d(Core.java:415)
    at net.ncplanner.plannerator.planner.Core.main(Core.java:319)
    at net.ncplanner.plannerator.planner.Main.main(Main.java:88)