diff options
author | Glease <4586901+Glease@users.noreply.github.com> | 2021-06-25 23:21:38 +0800 |
---|---|---|
committer | Glease <4586901+Glease@users.noreply.github.com> | 2021-07-30 14:39:40 +0800 |
commit | bbaa5a3837c2e1999a09abdedf55293095000185 (patch) | |
tree | a380b8c4640d36d640815441262d2bd4cc94fe97 /src/main/java | |
parent | 1dab17bc98123337e80e6a766cdfeeadbded698b (diff) | |
download | GT5-Unofficial-bbaa5a3837c2e1999a09abdedf55293095000185.tar.gz GT5-Unofficial-bbaa5a3837c2e1999a09abdedf55293095000185.tar.bz2 GT5-Unofficial-bbaa5a3837c2e1999a09abdedf55293095000185.zip |
make rotation marker a bit fancier, fix fusion texture
Signed-off-by: Glease <4586901+Glease@users.noreply.github.com>
Diffstat (limited to 'src/main/java')
4 files changed, 43 insertions, 23 deletions
diff --git a/src/main/java/gregtech/common/GT_Client.java b/src/main/java/gregtech/common/GT_Client.java index 3578af5756..5c2fc3c4d9 100644 --- a/src/main/java/gregtech/common/GT_Client.java +++ b/src/main/java/gregtech/common/GT_Client.java @@ -286,22 +286,24 @@ public class GT_Client extends GT_Proxy if (tAlignment != null) { ForgeDirection direction = tAlignment.getDirection(); if (direction.ordinal() == tSideHit) - drawExtendedRotationMarker(ROTATION_MARKER_TRANSFORM_CENTER, aIsSneaking); + drawExtendedRotationMarker(ROTATION_MARKER_TRANSFORM_CENTER, aIsSneaking, false); else if (direction.getOpposite().ordinal() == tSideHit) { for (Transformation t : ROTATION_MARKER_TRANSFORMS_CORNER) { - drawExtendedRotationMarker(t, aIsSneaking); + drawExtendedRotationMarker(t, aIsSneaking, true); } } else { - drawExtendedRotationMarker(ROTATION_MARKER_TRANSFORMS_SIDES_TRANSFORMS[ROTATION_MARKER_TRANSFORMS_SIDES[tSideHit * 6 + direction.ordinal()]], aIsSneaking); + drawExtendedRotationMarker(ROTATION_MARKER_TRANSFORMS_SIDES_TRANSFORMS[ROTATION_MARKER_TRANSFORMS_SIDES[tSideHit * 6 + direction.ordinal()]], aIsSneaking, true); } } } GL11.glPopMatrix(); // get back to player center } - private static void drawExtendedRotationMarker(Transformation transform, boolean sneaking) { + private static void drawExtendedRotationMarker(Transformation transform, boolean sneaking, boolean small) { if (sneaking) drawFlipMarker(transform); + else if (small) + drawRotationMarkerSmall(transform); else drawRotationMarker(transform); } @@ -311,17 +313,37 @@ public class GT_Client extends GT_Proxy transform.glApply(); Tessellator t = Tessellator.instance; t.startDrawing(GL11.GL_LINE_LOOP); - t.addVertex(-0.4d, 0d, -0.4d); - t.addVertex(-0.4d, 0d, 0.4d); - t.addVertex(0.4d, 0d, 0.4d); - t.addVertex(0.4d, 0d, -0.325d); - t.addVertex(0.45d, 0d, -0.325d); - t.addVertex(0.35d, 0d, -0.425d); - t.addVertex(0.25d, 0d, -0.325d); - t.addVertex(0.3d, 0d, -0.325d); - t.addVertex(0.3d, 0d, 0.3d); - t.addVertex(-0.3d, 0d, 0.3d); - t.addVertex(-0.3d, 0d, -0.4d); + t.addVertex(-0.3000d, 0d, -0.3000d); + t.addVertex(-0.3000d, 0d, +0.3000d); + t.addVertex(+0.3000d, 0d, +0.3000d); + t.addVertex(+0.3000d, 0d, -0.1750d); + t.addVertex(+0.3600d, 0d, -0.1750d); + t.addVertex(+0.2500d, 0d, -0.3000d); + t.addVertex(+0.1400d, 0d, -0.1750d); + t.addVertex(+0.2000d, 0d, -0.1750d); + t.addVertex(+0.2000d, 0d, +0.2000d); + t.addVertex(-0.2000d, 0d, +0.2000d); + t.addVertex(-0.2000d, 0d, -0.3000d); + t.draw(); + GL11.glPopMatrix(); + } + + private static void drawRotationMarkerSmall(Transformation transform) { + GL11.glPushMatrix(); + transform.glApply(); + Tessellator t = Tessellator.instance; + t.startDrawing(GL11.GL_LINE_LOOP); + t.addVertex(-0.3500d, 0d, -0.3500d); + t.addVertex(-0.3500d, 0d, +0.3500d); + t.addVertex(+0.3500d, 0d, +0.3500d); + t.addVertex(+0.3500d, 0d, -0.2000d); + t.addVertex(+0.4500d, 0d, -0.2000d); + t.addVertex(+0.3000d, 0d, -0.3500d); + t.addVertex(+0.1500d, 0d, -0.2000d); + t.addVertex(+0.2500d, 0d, -0.2000d); + t.addVertex(+0.2500d, 0d, +0.2500d); + t.addVertex(-0.2500d, 0d, +0.2500d); + t.addVertex(-0.2500d, 0d, -0.3500d); t.draw(); GL11.glPopMatrix(); } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer1.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer1.java index fd55bf715b..2901a9e4f1 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer1.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer1.java @@ -7,7 +7,6 @@ import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import net.minecraft.block.Block; -import org.lwjgl.input.Keyboard; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FUSION1; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FUSION1_GLOW; @@ -15,8 +14,8 @@ import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FUSION1_GLOW; public class GT_MetaTileEntity_FusionComputer1 extends GT_MetaTileEntity_FusionComputer { private static final ITexture textureOverlay = TextureFactory.of( - TextureFactory.of(OVERLAY_FUSION1), - TextureFactory.builder().addIcon(OVERLAY_FUSION1_GLOW).glow().build()); + TextureFactory.builder().addIcon(OVERLAY_FUSION1).extFacing().build(), + TextureFactory.builder().addIcon(OVERLAY_FUSION1_GLOW).extFacing().glow().build()); public GT_MetaTileEntity_FusionComputer1(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, 6); diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer2.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer2.java index 890b43cc7a..6cefdc6812 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer2.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer2.java @@ -14,8 +14,8 @@ import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FUSION2_GLOW; public class GT_MetaTileEntity_FusionComputer2 extends GT_MetaTileEntity_FusionComputer { private static final ITexture textureOverlay = TextureFactory.of( - TextureFactory.of(OVERLAY_FUSION2), - TextureFactory.builder().addIcon(OVERLAY_FUSION2_GLOW).glow().build()); + TextureFactory.builder().addIcon(OVERLAY_FUSION2).extFacing().build(), + TextureFactory.builder().addIcon(OVERLAY_FUSION2_GLOW).extFacing().glow().build()); public GT_MetaTileEntity_FusionComputer2(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, 6); diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java index 0a3bc89d20..b879c7923b 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java @@ -7,7 +7,6 @@ import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import net.minecraft.block.Block; -import org.lwjgl.input.Keyboard; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FUSION3; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FUSION3_GLOW; @@ -15,8 +14,8 @@ import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FUSION3_GLOW; public class GT_MetaTileEntity_FusionComputer3 extends GT_MetaTileEntity_FusionComputer { private static final ITexture textureOverlay = TextureFactory.of( - TextureFactory.of(OVERLAY_FUSION3), - TextureFactory.builder().addIcon(OVERLAY_FUSION3_GLOW).glow().build()); + TextureFactory.builder().addIcon(OVERLAY_FUSION3).extFacing().build(), + TextureFactory.builder().addIcon(OVERLAY_FUSION3_GLOW).extFacing().glow().build()); public GT_MetaTileEntity_FusionComputer3(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, 6); |