Merge branch 'master' into 1.17
# Conflicts: # src/main/java/carpet/script/utils/ShapesRenderer.java
This commit is contained in:
commit
e795a38b17
6 files changed
+20
-10
No files matched your search
@@ -114,7 +114,7 @@ Available shapes:
|
|||||||
* `align` - text alignment with regards to `pos`. Default is `center` (displayed text is
|
* `align` - text alignment with regards to `pos`. Default is `center` (displayed text is
|
||||||
centered with respect to `pos`), `left` (`pos` indicates beginning of text), and `right` (`pos`
|
centered with respect to `pos`), `left` (`pos` indicates beginning of text), and `right` (`pos`
|
||||||
indicates the end of text).
|
indicates the end of text).
|
||||||
* `tilt` - additional rotation of the text on the canvas
|
* `tilt`, `lean`, `turn` - additional rotations of the text on the canvas along all three axis
|
||||||
* `indent`, `height`, `raise` - offsets for text rendering on X (`indent`), Y (`height`), and Z axis (`raise`)
|
* `indent`, `height`, `raise` - offsets for text rendering on X (`indent`), Y (`height`), and Z axis (`raise`)
|
||||||
with regards to the plane of the text. One unit of these corresponds to 1 line spacing, which
|
with regards to the plane of the text. One unit of these corresponds to 1 line spacing, which
|
||||||
can be used to display multiple lines of text bound to the same `pos`
|
can be used to display multiple lines of text bound to the same `pos`
|
||||||
|
|||||||
+1
-1
@@ -10,7 +10,7 @@ org.gradle.jvmargs=-Xmx1G
|
|||||||
fabric_version=0.32.2+1.17
|
fabric_version=0.32.2+1.17
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 1.4.29
|
mod_version = 1.4.30
|
||||||
maven_group = carpet
|
maven_group = carpet
|
||||||
archives_base_name = fabric-carpet
|
archives_base_name = fabric-carpet
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ import static carpet.settings.RuleCategory.CLIENT;
|
|||||||
@SuppressWarnings("CanBeFinal")
|
@SuppressWarnings("CanBeFinal")
|
||||||
public class CarpetSettings
|
public class CarpetSettings
|
||||||
{
|
{
|
||||||
public static final String carpetVersion = "1.4.29+v210310";
|
public static final String carpetVersion = "1.4.30+v210317";
|
||||||
public static final Logger LOG = LogManager.getLogger("carpet");
|
public static final Logger LOG = LogManager.getLogger("carpet");
|
||||||
public static boolean skipGenerationChecks = false;
|
public static boolean skipGenerationChecks = false;
|
||||||
public static boolean impendingFillSkipUpdates = false;
|
public static boolean impendingFillSkipUpdates = false;
|
||||||
|
|||||||
@@ -418,6 +418,8 @@ public class ShapeDispatcher
|
|||||||
put("facing", new StringValue("player")).
|
put("facing", new StringValue("player")).
|
||||||
put("raise", new NumericValue(0)).
|
put("raise", new NumericValue(0)).
|
||||||
put("tilt", new NumericValue(0)).
|
put("tilt", new NumericValue(0)).
|
||||||
|
put("lean", new NumericValue(0)).
|
||||||
|
put("turn", new NumericValue(0)).
|
||||||
put("indent", new NumericValue(0)).
|
put("indent", new NumericValue(0)).
|
||||||
put("height", new NumericValue(0)).
|
put("height", new NumericValue(0)).
|
||||||
put("align", new StringValue("center")).
|
put("align", new StringValue("center")).
|
||||||
@@ -439,6 +441,8 @@ public class ShapeDispatcher
|
|||||||
Direction facing;
|
Direction facing;
|
||||||
float raise;
|
float raise;
|
||||||
float tilt;
|
float tilt;
|
||||||
|
float lean;
|
||||||
|
float turn;
|
||||||
float size;
|
float size;
|
||||||
float indent;
|
float indent;
|
||||||
int align;
|
int align;
|
||||||
@@ -487,6 +491,8 @@ public class ShapeDispatcher
|
|||||||
|
|
||||||
raise = NumericValue.asNumber(options.getOrDefault("raise", optional.get("raise"))).getFloat();
|
raise = NumericValue.asNumber(options.getOrDefault("raise", optional.get("raise"))).getFloat();
|
||||||
tilt = NumericValue.asNumber(options.getOrDefault("tilt", optional.get("tilt"))).getFloat();
|
tilt = NumericValue.asNumber(options.getOrDefault("tilt", optional.get("tilt"))).getFloat();
|
||||||
|
lean = NumericValue.asNumber(options.getOrDefault("lean", optional.get("lean"))).getFloat();
|
||||||
|
turn = NumericValue.asNumber(options.getOrDefault("turn", optional.get("turn"))).getFloat();
|
||||||
indent = NumericValue.asNumber(options.getOrDefault("indent", optional.get("indent"))).getFloat();
|
indent = NumericValue.asNumber(options.getOrDefault("indent", optional.get("indent"))).getFloat();
|
||||||
height = NumericValue.asNumber(options.getOrDefault("height", optional.get("height"))).getFloat();
|
height = NumericValue.asNumber(options.getOrDefault("height", optional.get("height"))).getFloat();
|
||||||
|
|
||||||
@@ -519,6 +525,8 @@ public class ShapeDispatcher
|
|||||||
if (facing!= null) hash ^= facing.hashCode(); hash *= 1099511628211L;
|
if (facing!= null) hash ^= facing.hashCode(); hash *= 1099511628211L;
|
||||||
hash ^= Float.hashCode(raise); hash *= 1099511628211L;
|
hash ^= Float.hashCode(raise); hash *= 1099511628211L;
|
||||||
hash ^= Float.hashCode(tilt); hash *= 1099511628211L;
|
hash ^= Float.hashCode(tilt); hash *= 1099511628211L;
|
||||||
|
hash ^= Float.hashCode(lean); hash *= 1099511628211L;
|
||||||
|
hash ^= Float.hashCode(turn); hash *= 1099511628211L;
|
||||||
hash ^= Float.hashCode(indent); hash *= 1099511628211L;
|
hash ^= Float.hashCode(indent); hash *= 1099511628211L;
|
||||||
hash ^= Float.hashCode(height); hash *= 1099511628211L;
|
hash ^= Float.hashCode(height); hash *= 1099511628211L;
|
||||||
hash ^= Float.hashCode(size); hash *= 1099511628211L;
|
hash ^= Float.hashCode(size); hash *= 1099511628211L;
|
||||||
|
|||||||
@@ -278,11 +278,11 @@ public class ShapesRenderer
|
|||||||
}
|
}
|
||||||
matrices.scale(shape.size* 0.0025f, -shape.size*0.0025f, shape.size*0.0025f);
|
matrices.scale(shape.size* 0.0025f, -shape.size*0.0025f, shape.size*0.0025f);
|
||||||
//RenderSystem.scalef(shape.size* 0.0025f, -shape.size*0.0025f, shape.size*0.0025f);
|
//RenderSystem.scalef(shape.size* 0.0025f, -shape.size*0.0025f, shape.size*0.0025f);
|
||||||
if (shape.tilt!=0.0f)
|
if (shape.tilt!=0.0f) matrices.multiply(Vec3f.POSITIVE_Z.getDegreesQuaternion(shape.tilt));
|
||||||
{
|
if (shape.lean!=0.0f) matrices.multiply(Vec3f.POSITIVE_X.getDegreesQuaternion(shape.lean));
|
||||||
matrices.multiply(Vec3f.POSITIVE_Z.getDegreesQuaternion(shape.tilt));
|
if (shape.turn!=0.0f) matrices.multiply(Vec3f.POSITIVE_Y.getDegreesQuaternion(shape.turn));
|
||||||
}
|
|
||||||
matrices.translate(-10*shape.indent, -10*shape.height-9, (-10*renderEpsilon)-10*shape.raise);
|
matrices.translate(-10*shape.indent, -10*shape.height-9, (-10*renderEpsilon)-10*shape.raise);
|
||||||
|
RenderSystem.translatef(-10*shape.indent, -10*shape.height-9, (float) (-10*renderEpsilon)-10*shape.raise);
|
||||||
//if (visibleThroughWalls) RenderSystem.disableDepthTest();
|
//if (visibleThroughWalls) RenderSystem.disableDepthTest();
|
||||||
matrices.scale(-1, 1, 1);
|
matrices.scale(-1, 1, 1);
|
||||||
//RenderSystem.applyModelViewMatrix(); // passed matrix directly to textRenderer.draw, not AffineTransformation.identity().getMatrix(),
|
//RenderSystem.applyModelViewMatrix(); // passed matrix directly to textRenderer.draw, not AffineTransformation.identity().getMatrix(),
|
||||||
|
|||||||
@@ -318,10 +318,12 @@ public class SettingsManager
|
|||||||
}
|
}
|
||||||
server.send(new ServerTask(this.server.getTicks(), () ->
|
server.send(new ServerTask(this.server.getTicks(), () ->
|
||||||
{
|
{
|
||||||
for (ServerPlayerEntity entityplayermp : server.getPlayerManager().getPlayerList())
|
try {
|
||||||
{
|
for (ServerPlayerEntity entityplayermp : server.getPlayerManager().getPlayerList()) {
|
||||||
server.getCommandManager().sendCommandTree(entityplayermp);
|
server.getCommandManager().sendCommandTree(entityplayermp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
catch (NullPointerException ignored) {}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user