mirror of
https://github.com/GTNewHorizons/StructureLib.git
synced 2026-11-13 16:54:01 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
23312198a6 | ||
|
|
fa5e2ae4ca |
No files matched your search
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api("com.github.GTNewHorizons:GTNHLib:0.0.10:dev")
|
api("com.github.GTNewHorizons:GTNHLib:0.0.10:dev")
|
||||||
runtimeOnly("com.github.GTNewHorizons:NotEnoughItems:2.3.25-GTNH:dev")
|
runtimeOnly("com.github.GTNewHorizons:NotEnoughItems:2.3.46-GTNH:dev")
|
||||||
|
|
||||||
testImplementation(platform('org.junit:junit-bom:5.9.2'))
|
testImplementation(platform('org.junit:junit-bom:5.9.2'))
|
||||||
testImplementation('org.junit.jupiter:junit-jupiter')
|
testImplementation('org.junit.jupiter:junit-jupiter')
|
||||||
|
|||||||
@@ -526,7 +526,8 @@ public class ClientProxy extends CommonProxy {
|
|||||||
GL11.glTranslated(-d0 + i0, -d1 + i1, -d2 + i2);
|
GL11.glTranslated(-d0 + i0, -d1 + i1, -d2 + i2);
|
||||||
Tessellator tes = Tessellator.instance;
|
Tessellator tes = Tessellator.instance;
|
||||||
tes.startDrawing(GL11.GL_TRIANGLES);
|
tes.startDrawing(GL11.GL_TRIANGLES);
|
||||||
for (int i = 0, allHintsForRenderSize = allHintsForRender.size(); i < allHintsForRenderSize; i++) {
|
for (int i = 0, allHintsForRenderSize = allHintsForRender.size(), cubeDrawn = 0; i
|
||||||
|
< allHintsForRenderSize; i++, cubeDrawn++) {
|
||||||
HintParticleInfo hint = allHintsForRender.get(i);
|
HintParticleInfo hint = allHintsForRender.get(i);
|
||||||
if (!hint.isInFrustrum(frustrum)) continue;
|
if (!hint.isInFrustrum(frustrum)) continue;
|
||||||
if (renderThrough != hint.renderThrough) {
|
if (renderThrough != hint.renderThrough) {
|
||||||
@@ -534,12 +535,21 @@ public class ClientProxy extends CommonProxy {
|
|||||||
p.endStartSection("Draw");
|
p.endStartSection("Draw");
|
||||||
tes.draw();
|
tes.draw();
|
||||||
tes.startDrawing(GL11.GL_TRIANGLES);
|
tes.startDrawing(GL11.GL_TRIANGLES);
|
||||||
|
cubeDrawn = 0;
|
||||||
p.endStartSection("Prepare");
|
p.endStartSection("Prepare");
|
||||||
}
|
}
|
||||||
if (hint.renderThrough) GL11.glDisable(GL11.GL_DEPTH_TEST);
|
if (hint.renderThrough) GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||||
else GL11.glEnable(GL11.GL_DEPTH_TEST);
|
else GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||||
renderThrough = hint.renderThrough;
|
renderThrough = hint.renderThrough;
|
||||||
}
|
}
|
||||||
|
// Minecraft Tessellator draw in batch of 4096. This plays nicely with quads, but for trigs
|
||||||
|
// it might occasionally end up with one half in first batch and the other half in later batch.
|
||||||
|
// so we manually flush the buffer here if that would happen.
|
||||||
|
// 6 faces per particle, 2 trig per face, 3 vertex per trig
|
||||||
|
if ((cubeDrawn + 1) >= 4096 / (6 * 2 * 3)) {
|
||||||
|
tes.draw();
|
||||||
|
tes.startDrawing(GL11.GL_TRIANGLES);
|
||||||
|
}
|
||||||
// TODO verify if we need to add eyeHeight
|
// TODO verify if we need to add eyeHeight
|
||||||
hint.draw(tes, d0, d1, d2, i0, i1, i2);
|
hint.draw(tes, d0, d1, d2, i0, i1, i2);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2591,7 +2591,7 @@ public class StructureUtility {
|
|||||||
// we will bypass the chatter filter here, as this is a warning that player definitively want to see
|
// we will bypass the chatter filter here, as this is a warning that player definitively want to see
|
||||||
// instead of some false positive error messages like item not find
|
// instead of some false positive error messages like item not find
|
||||||
warnNoExplicitSubChannel(env.getActor());
|
warnNoExplicitSubChannel(env.getActor());
|
||||||
return backing.survivalPlaceBlock(t, world, x, y, z, trigger, env);
|
return backing.survivalPlaceBlock(t, world, x, y, z, newTrigger, env);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user