mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-21 04:42:17 +00:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0525b31262 | ||
|
|
fdb2053c50 |
No files matched your search
@@ -26,17 +26,7 @@ public class BlockError extends Block {
|
||||
public BlockError() {
|
||||
super(Material.rock);
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void onTextureStitch(TextureStitchEvent.Pre event) {
|
||||
if (event.map.getTextureType() == 0) {
|
||||
for (int i = 0; i < icons.length; i++) {
|
||||
icons[i] = event.map.registerIcon("angelica:error_block_" + i);
|
||||
}
|
||||
}
|
||||
MinecraftForge.EVENT_BUS.register(new EventHandler());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -45,4 +35,15 @@ public class BlockError extends Block {
|
||||
return meta >= 0 && meta < icons.length ? icons[meta] : null;
|
||||
}
|
||||
|
||||
public static class EventHandler{
|
||||
@SubscribeEvent
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void onTextureStitch(TextureStitchEvent.Pre event) {
|
||||
if (event.map.getTextureType() == 0) {
|
||||
for (int i = 0; i < icons.length; i++) {
|
||||
icons[i] = event.map.registerIcon("angelica:error_block_" + i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -117,12 +117,13 @@ final class Enchantment extends OverrideBase {
|
||||
return;
|
||||
}
|
||||
begin(intensity);
|
||||
Tessellator.instance.startDrawingQuads();
|
||||
Tessellator.instance.addVertexWithUV(x0, y0, z, 0.0f, 0.0f);
|
||||
Tessellator.instance.addVertexWithUV(x0, y1, z, 0.0f, 1.0f);
|
||||
Tessellator.instance.addVertexWithUV(x1, y1, z, 1.0f, 1.0f);
|
||||
Tessellator.instance.addVertexWithUV(x1, y0, z, 1.0f, 0.0f);
|
||||
Tessellator.instance.draw();
|
||||
final Tessellator tess = Tessellator.instance;
|
||||
tess.startDrawingQuads();
|
||||
tess.addVertexWithUV(x0, y0, z, 0.0f, 0.0f);
|
||||
tess.addVertexWithUV(x0, y1, z, 0.0f, 1.0f);
|
||||
tess.addVertexWithUV(x1, y1, z, 1.0f, 1.0f);
|
||||
tess.addVertexWithUV(x1, y0, z, 1.0f, 0.0f);
|
||||
tess.draw();
|
||||
end();
|
||||
}
|
||||
|
||||
|
||||
@@ -427,13 +427,13 @@ public class SkyRenderer {
|
||||
private static void drawTile(int tile) {
|
||||
double tileX = (tile % 3) / 3.0;
|
||||
double tileY = (tile / 3) / 2.0;
|
||||
Tessellator.instance.startDrawingQuads();
|
||||
Tessellator.instance.addVertexWithUV(-SKY_DISTANCE, -SKY_DISTANCE, -SKY_DISTANCE, tileX, tileY);
|
||||
Tessellator.instance.addVertexWithUV(-SKY_DISTANCE, -SKY_DISTANCE, SKY_DISTANCE, tileX, tileY + 0.5);
|
||||
Tessellator.instance
|
||||
.addVertexWithUV(SKY_DISTANCE, -SKY_DISTANCE, SKY_DISTANCE, tileX + 1.0 / 3.0, tileY + 0.5);
|
||||
Tessellator.instance.addVertexWithUV(SKY_DISTANCE, -SKY_DISTANCE, -SKY_DISTANCE, tileX + 1.0 / 3.0, tileY);
|
||||
Tessellator.instance.draw();
|
||||
final Tessellator tess = Tessellator.instance;
|
||||
tess.startDrawingQuads();
|
||||
tess.addVertexWithUV(-SKY_DISTANCE, -SKY_DISTANCE, -SKY_DISTANCE, tileX, tileY);
|
||||
tess.addVertexWithUV(-SKY_DISTANCE, -SKY_DISTANCE, SKY_DISTANCE, tileX, tileY + 0.5);
|
||||
tess.addVertexWithUV(SKY_DISTANCE, -SKY_DISTANCE, SKY_DISTANCE, tileX + 1.0 / 3.0, tileY + 0.5);
|
||||
tess.addVertexWithUV(SKY_DISTANCE, -SKY_DISTANCE, -SKY_DISTANCE, tileX + 1.0 / 3.0, tileY);
|
||||
tess.draw();
|
||||
}
|
||||
|
||||
void setBlendingMethod(float brightness) {
|
||||
|
||||
Reference in new issue
Block a user