Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
reobf committed Dec 2, 2024
1 parent 8fb46c2 commit 5e43e5c
Show file tree
Hide file tree
Showing 32 changed files with 835 additions and 113 deletions.
3 changes: 3 additions & 0 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,7 @@ api("com.github.GTNewHorizons:NotEnoughEnergistics:1.5.1:dev")

api('com.github.GTNewHorizons:Navigator:1.0.12:dev')
runtimeOnlyNonPublishable(rfg.deobf('maven.modrinth:journeymap:5.2.6'))

api("com.github.GTNewHorizons:Baubles:1.0.4:dev")
api("com.github.GTNewHorizons:ironchest:6.0.85:dev")
}
130 changes: 68 additions & 62 deletions src/main/java/reobf/proghatches/eio/MASettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,74 +34,80 @@
import reobf.proghatches.net.ConnectionModeMessage;

public class MASettings extends BaseSettingsPanel {

static public IWidgetIcon icon;

static public IWidgetIcon getMAIcon(){
if(icon==null)
icon =new IWidgetIcon(){

public MASettings(GuiExternalConnection gui, IConduit con) {
super(
new IWidgetIcon(){

@Override
public int getX() {
// TODO Auto-generated method stub
return 0;
}
@Override
public int getX() {
// TODO Auto-generated method stub
return 0;
}

@Override
public int getY() {
// TODO Auto-generated method stub
return 0;
}
@Override
public int getY() {
// TODO Auto-generated method stub
return 0;
}

@Override
public int getWidth() {
return 16;
}
@Override
public int getWidth() {

return 16;
}

@Override
public int getHeight() {
return 16;
}
@Override
public int getHeight() {

return 16;
}

@Override
public IWidgetIcon getOverlay() {
return null;
}
@Override
public IWidgetIcon getOverlay() {
return null;
}

@Override
public IWidgetMap getMap() {

return new IWidgetMap.WidgetMapImpl(16,

new ResourceLocation("minecraft", "textures/blocks/crafting_table_top.png"))


{

@Override
public void render(IWidgetIcon widget, double x, double y, double width, double height, double zLevel,
boolean doDraw, boolean flipY) {
//一个个画能有多大性能损失? 既然非要共用单个纹理 还假惺惺弄个ResourceLocation参数干啥 真的会谢
Tessellator tessellator = Tessellator.instance;

if(!doDraw)tessellator.draw();//如果是连续绘制 先把之前的画了
int old= GL11.glGetInteger(GL11.GL_TEXTURE_2D);
RenderUtil.bindTexture(this.getTexture());
super.render(widget, x, y, width, height, zLevel, true,flipY);
GL11.glBindTexture(GL11.GL_TEXTURE_2D, old);
if(!doDraw)tessellator.startDrawingQuads();//再重新开始画

}



}

;
}
}


@Override
public IWidgetMap getMap() {

return new IWidgetMap.WidgetMapImpl(16,

new ResourceLocation("minecraft", "textures/blocks/crafting_table_top.png"))


{

@Override
public void render(IWidgetIcon widget, double x, double y, double width, double height, double zLevel,
boolean doDraw, boolean flipY) {
//一个个画能有多大性能损失? 既然非要共用单个纹理 还假惺惺弄个ResourceLocation参数干啥 真的会谢
Tessellator tessellator = Tessellator.instance;

if(!doDraw)tessellator.draw();//如果是连续绘制 先把之前的画了
int old= GL11.glGetInteger(GL11.GL_TEXTURE_2D);
RenderUtil.bindTexture(this.getTexture());
super.render(widget, x, y, width, height, zLevel, true,flipY);
GL11.glBindTexture(GL11.GL_TEXTURE_2D, old);
if(!doDraw)tessellator.startDrawingQuads();//再重新开始画

}



}

;}};
return icon;
}




public MASettings(GuiExternalConnection gui, IConduit con) {
super(getMAIcon()
, EnderIO.lang.localize("itemMEConduit.name"), gui, con);
}
protected boolean hasInOutModes() {
Expand Down
Loading

0 comments on commit 5e43e5c

Please sign in to comment.