mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-12-14 20:20:30 +00:00
Tiny bits and bobs
Oh my, what good commit discipline! - Remove unused method in NetworkHandler. - Correctly pass the transformation to ComputerBorderRenderer.
This commit is contained in:
parent
4411756b06
commit
cd76425877
@ -74,7 +74,7 @@ public final class GuiComputer<T extends ContainerComputerBase> extends Computer
|
||||
{
|
||||
// Draw a border around the terminal
|
||||
ComputerBorderRenderer.render(
|
||||
ComputerBorderRenderer.getTexture( family ), terminal.x, terminal.y, getBlitOffset(),
|
||||
stack.last().pose(), ComputerBorderRenderer.getTexture( family ), terminal.x, terminal.y, getBlitOffset(),
|
||||
FULL_BRIGHT_LIGHTMAP, terminal.getWidth(), terminal.getHeight()
|
||||
);
|
||||
ComputerSidebar.renderBackground( stack, leftPos, topPos + sidebarYOffset );
|
||||
|
@ -23,13 +23,6 @@ public class ComputerBorderRenderer
|
||||
public static final ResourceLocation BACKGROUND_COMMAND = new ResourceLocation( ComputerCraft.MOD_ID, "textures/gui/corners_command.png" );
|
||||
public static final ResourceLocation BACKGROUND_COLOUR = new ResourceLocation( ComputerCraft.MOD_ID, "textures/gui/corners_colour.png" );
|
||||
|
||||
private static final Matrix4f IDENTITY = new Matrix4f();
|
||||
|
||||
static
|
||||
{
|
||||
IDENTITY.setIdentity();
|
||||
}
|
||||
|
||||
/**
|
||||
* The margin between the terminal and its border.
|
||||
*/
|
||||
@ -91,10 +84,10 @@ public class ComputerBorderRenderer
|
||||
return RenderType.text( location );
|
||||
}
|
||||
|
||||
public static void render( ResourceLocation location, int x, int y, int z, int light, int width, int height )
|
||||
public static void render( Matrix4f transform, ResourceLocation location, int x, int y, int z, int light, int width, int height )
|
||||
{
|
||||
IRenderTypeBuffer.Impl source = IRenderTypeBuffer.immediate( Tessellator.getInstance().getBuilder() );
|
||||
render( IDENTITY, source.getBuffer( getRenderType( location ) ), x, y, z, light, width, height, false, 1, 1, 1 );
|
||||
render( transform, source.getBuffer( getRenderType( location ) ), x, y, z, light, width, height, false, 1, 1, 1 );
|
||||
source.endBatch();
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,6 @@ import net.minecraftforge.fml.network.PacketDistributor;
|
||||
import net.minecraftforge.fml.network.simple.SimpleChannel;
|
||||
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public final class NetworkHandler
|
||||
{
|
||||
@ -111,10 +110,4 @@ public final class NetworkHandler
|
||||
} )
|
||||
.add();
|
||||
}
|
||||
|
||||
@SuppressWarnings( "unchecked" )
|
||||
private static <T> Class<T> getType( Supplier<T> supplier )
|
||||
{
|
||||
return (Class<T>) supplier.get().getClass();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user