Skip to content

Commit

Permalink
sbobless
Browse files Browse the repository at this point in the history
  • Loading branch information
ghzdude committed Dec 22, 2023
1 parent b882fc8 commit f32c250
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
3 changes: 2 additions & 1 deletion src/main/java/gregtech/client/renderer/texture/Textures.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ public class Textures {
"casings/quantum/controller_active");
public static final SimpleOverlayRenderer QUANTUM_CONTROLLER_INACTIVE = new SimpleOverlayRenderer(
"casings/quantum/controller_inactive");
public static final SimpleOverlayRenderer QUANTUM_PROXY_INACTIVE = new SimpleOverlayRenderer("casings/quantum/proxy_inactive");
public static final SimpleOverlayRenderer QUANTUM_PROXY_INACTIVE = new SimpleOverlayRenderer(
"casings/quantum/proxy_inactive");
public static final SimpleOverlayRenderer QUANTUM_PROXY_ACTIVE = new SimpleOverlayRenderer(
"casings/quantum/proxy_active");
public static final SimpleOverlayRenderer QUANTUM_EXTENDER = new SimpleOverlayRenderer("casings/quantum/extender");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
package gregtech.common.metatileentities.storage;

import codechicken.lib.render.CCRenderState;
import codechicken.lib.render.pipeline.IVertexOperation;
import codechicken.lib.vec.Matrix4;

import gregtech.api.capability.GregtechCapabilities;
import gregtech.api.capability.IEnergyContainer;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.interfaces.IGregTechTileEntity;

import gregtech.client.renderer.texture.Textures;

import net.minecraft.util.EnumFacing;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.capabilities.Capability;

import codechicken.lib.render.CCRenderState;
import codechicken.lib.render.pipeline.IVertexOperation;
import codechicken.lib.vec.Matrix4;

public class MetaTileEntityQuantumEnergyAcceptor extends MetaTileEntityQuantumStorage<IEnergyContainer> {

public MetaTileEntityQuantumEnergyAcceptor(ResourceLocation metaTileEntityId) {
Expand All @@ -23,7 +22,7 @@ public MetaTileEntityQuantumEnergyAcceptor(ResourceLocation metaTileEntityId) {

@Override
public void renderMetaTileEntity(CCRenderState renderState, Matrix4 translation, IVertexOperation[] pipeline) {
Textures.QUANTUM_CASING.render(renderState, translation,pipeline);
Textures.QUANTUM_CASING.render(renderState, translation, pipeline);
Textures.ENERGY_IN_HI.renderSided(getFrontFacing(), renderState, translation, pipeline);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.network.PacketBuffer;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ResourceLocation;

import codechicken.lib.render.CCRenderState;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ public void receiveCustomData(int dataId, PacketBuffer buf) {

if (this.connectedIcon != null) {
this.connectedIcon.setImage(GuiTextures.GREGTECH_LOGO);
String pos = String.format("X=%d, Z=%d, Y=%d", controllerPos.getX(), controllerPos.getZ(), controllerPos.getY());
String pos = String.format("X=%d, Z=%d, Y=%d", controllerPos.getX(), controllerPos.getZ(),
controllerPos.getY());
this.connectedIcon.setTooltip("Connected to Quantum Controller at/n" + pos);
}
} else if (dataId == REMOVE_CONTROLLER) {
Expand Down Expand Up @@ -199,10 +200,12 @@ public void readFromNBT(NBTTagCompound data) {

protected ImageWidget createConnectedGui(int y) {
// todo do something for rendering a highlight at the controller
connectedIcon = new ImageWidget(151, y, 18, 18, isConnected() ? GuiTextures.GREGTECH_LOGO : GuiTextures.GREGTECH_LOGO_DARK);
connectedIcon = new ImageWidget(151, y, 18, 18,
isConnected() ? GuiTextures.GREGTECH_LOGO : GuiTextures.GREGTECH_LOGO_DARK);

if (isConnected()) {
String pos = String.format("X=%d, Z=%d, Y=%d", controllerPos.getX(), controllerPos.getZ(), controllerPos.getY());
String pos = String.format("X=%d, Z=%d, Y=%d", controllerPos.getX(), controllerPos.getZ(),
controllerPos.getY());
connectedIcon.setTooltip("Connected to Quantum Controller at/n" + pos);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ public void receiveCustomData(int dataId, @NotNull PacketBuffer buf) {
@Override
public void renderMetaTileEntity(CCRenderState renderState, Matrix4 translation, IVertexOperation[] pipeline) {
var front = isPowered() ?
Textures.QUANTUM_CONTROLLER_FRONT_ACTIVE:
Textures.QUANTUM_CONTROLLER_FRONT_ACTIVE :
Textures.QUANTUM_CONTROLLER_FRONT_INACTIVE;
var sides = isPowered() ?
Textures.QUANTUM_CONTROLLER_ACTIVE:
Textures.QUANTUM_CONTROLLER_ACTIVE :
Textures.QUANTUM_CONTROLLER_INACTIVE;

front.renderSided(getFrontFacing(), renderState, translation, pipeline);
Expand Down

0 comments on commit f32c250

Please sign in to comment.