Merge branch 'master' into 1.15
# Conflicts: # gradle.properties
This commit is contained in:
commit
b1cf5f4a09
4 files changed
+64
-22
No files matched your search
@@ -51,6 +51,7 @@ import net.minecraft.item.BlockItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.nbt.StringTag;
|
||||
import net.minecraft.nbt.Tag;
|
||||
import net.minecraft.particle.ParticleEffect;
|
||||
import net.minecraft.predicate.entity.EntityPredicates;
|
||||
@@ -2789,6 +2790,13 @@ public class CarpetExpression
|
||||
return (cc, tt) -> ret;
|
||||
});
|
||||
|
||||
this.expr.addLazyFunction("escape_nbt", 1, (c, t, lv) -> {
|
||||
Value v = lv.get(0).evalValue(c);
|
||||
String string = v.getString();
|
||||
Value ret = new StringValue(StringTag.escape(string));
|
||||
return (cc, tt) -> ret;
|
||||
});
|
||||
|
||||
//"overridden" native call that prints to stderr
|
||||
this.expr.addLazyFunction("print", 1, (c, t, lv) ->
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user