Skip to content

Commit

Permalink
repair generator fix and upgrade button
Browse files Browse the repository at this point in the history
  • Loading branch information
khjxiaogu committed Dec 30, 2024
1 parent e5e7b13 commit 1a1ff59
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static class Logic{
.component(FHMenuTypes.GENERATOR_T1.createComponent())
.build();
public static final MultiblockRegistration<T2GeneratorState> GENERATOR_T2 = metal(new T2GeneratorLogic(), "generator_t2")
.structure(() -> FHMultiblocks.Multiblock.GENERATOR_T1)
.structure(() -> FHMultiblocks.Multiblock.GENERATOR_T2)
.notMirrored()
.component(FHMenuTypes.GENERATOR_T2.createComponent())
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public void upgradeStructure(IMultiblockContext<R> ctx, ServerPlayer entityplaye
BlockPos negMasterOffset = FHMultiblockHelper.getMasterPos(ctx.getLevel()).subtract(getNextLevelMultiblock().getMasterFromOriginOffset());
Rotation rot = DirectionUtils.getRotationBetweenFacings(Direction.NORTH, ctx.getLevel().getOrientation().front());
((MultiBlockAccess) getNextLevelMultiblock()).setPlayer(entityplayer);
((MultiBlockAccess) getNextLevelMultiblock()).callForm(ctx.getLevel().getRawLevel(), ctx.getLevel().toAbsolute(negMasterOffset), rot, Mirror.NONE, ctx.getLevel().getOrientation().front());
((MultiBlockAccess) getNextLevelMultiblock()).callForm(ctx.getLevel().getRawLevel(), ctx.getLevel().toAbsolute(negMasterOffset), rot, Mirror.NONE, ctx.getLevel().getOrientation().front().getOpposite());

}

Expand Down Expand Up @@ -180,7 +180,7 @@ public List<IngredientWithSize> getUpgradeCost(Level level, IMultiblockBEHelper<
IETemplateMultiblock ietm = getNextLevelMultiblock();
if (ietm != null) {
if (upgrade == null) {
List<StructureBlockInfo> structure = ctx.getMultiblock().getStructure().apply(level);
List<StructureBlockInfo> structure = ietm.getStructure(level);
NonNullList<ItemStack> materials = NonNullList.create();
for (StructureBlockInfo info : structure) {
// Skip dummy blocks in total
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@ protected void renderLabels(GuiGraphics matrixStack, int x, int y) {
// this.font.drawText(matrixStack, this.playerInventory.getDisplayName(),
// this.playerInventoryTitleX, this.playerInventoryTitleY+5, 0xff404040);
// temp level
matrixStack.drawCenteredString(this.font, TemperatureDisplayHelper.toTemperatureDeltaInt(menu.tempDegree.getValue()) + "", 88, 40, 0xffffffff);
matrixStack.drawCenteredString(this.font, TemperatureDisplayHelper.toTemperatureDeltaInt(menu.tempDegree.getValue()) + "", 88, 38, 0xffffffff);
// range level
matrixStack.drawCenteredString(this.font, menu.rangeBlock.getValue() + "", 35, 45, 0xffffffff);
matrixStack.drawCenteredString(this.font, menu.rangeBlock.getValue() + "", 35, 41, 0xffffffff);
// overdrive level
matrixStack.drawCenteredString(this.font, menu.overdrive.getValue() * 100 + "", 141, 45, 0xffffffff);
matrixStack.drawCenteredString(this.font, menu.overdrive.getValue() * 100 + "", 141, 41, 0xffffffff);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@

@Mixin(IrisRenderingPipeline.class)
public interface IrisRenderingPipelineAccess {
@Accessor
@Accessor(remap=false)
RenderTargets getRenderTargets();
}

0 comments on commit 1a1ff59

Please sign in to comment.