plop takes now correct number of arguments.

This commit is contained in:
gnembon committed 2020-11-06 21:55:00 -04:00
1 parent 5053fd06ae
commit c326785fb9
3 files changed
+3 -4

No files matched your search

+1 -1
View File
@@ -5,7 +5,7 @@ org.gradle.jvmargs=-Xmx1G
# check these on https://fabricmc.net/use # check these on https://fabricmc.net/use
# or better: https://modmuss50.me/fabric.html # or better: https://modmuss50.me/fabric.html
minecraft_version=1.16.4 minecraft_version=1.16.4
yarn_mappings=1.16.4+build.1 yarn_mappings=1.16.4+build.6
loader_version=0.10.6+build.214 loader_version=0.10.6+build.214
# Mod Properties # Mod Properties
@@ -63,7 +63,7 @@ public abstract class World_movableTEMixin implements WorldInterface, WorldAcces
if ((Object) this instanceof EmptyChunk) if ((Object) this instanceof EmptyChunk)
return false; return false;
if (World.isHeightInvalid(blockPos_1)) if (World.isOutOfBuildLimitVertically(blockPos_1))
{ {
return false; return false;
} }
@@ -614,7 +614,7 @@ public class Auxiliary {
return (cc, tt) -> retval; return (cc, tt) -> retval;
}); });
expression.addLazyFunction("plop", 4, (c, t, lv) ->{ expression.addLazyFunction("plop", -1, (c, t, lv) ->{
BlockArgument locator = BlockArgument.findIn((CarpetContext)c, lv, 0); BlockArgument locator = BlockArgument.findIn((CarpetContext)c, lv, 0);
if (lv.size() <= locator.offset) if (lv.size() <= locator.offset)
throw new InternalExpressionException("'plop' needs extra argument indicating what to plop"); throw new InternalExpressionException("'plop' needs extra argument indicating what to plop");
@@ -624,7 +624,6 @@ public class Auxiliary {
{ {
Boolean res = FeatureGenerator.plop(what, ((CarpetContext) c).s.getWorld(), locator.block.getPos()); Boolean res = FeatureGenerator.plop(what, ((CarpetContext) c).s.getWorld(), locator.block.getPos());
//Boolean res = FeatureGenerator.spawn(what, ((CarpetContext) c).s.getWorld(), locator.block.getPos());
if (res == null) if (res == null)
return; return;
if (what.equalsIgnoreCase("boulder")) // there might be more of those if (what.equalsIgnoreCase("boulder")) // there might be more of those