remove a few warnings
This commit is contained in:
1 parent
3bec43fbc8
commit
6ac249968a
41 files changed
+122
-137
No files matched your search
@@ -133,9 +133,9 @@ import static java.lang.Math.sqrt;
|
||||
public class CarpetExpression
|
||||
{
|
||||
|
||||
private ServerCommandSource source;
|
||||
private BlockPos origin;
|
||||
private Expression expr;
|
||||
private final ServerCommandSource source;
|
||||
private final BlockPos origin;
|
||||
private final Expression expr;
|
||||
Expression getExpr() {return expr;}
|
||||
private static long tickStart = 0L;
|
||||
|
||||
@@ -274,7 +274,7 @@ public class CarpetExpression
|
||||
return bs;
|
||||
}
|
||||
|
||||
private static Map<String, ParticleEffect> particleCache = new HashMap<>();
|
||||
private static final Map<String, ParticleEffect> particleCache = new HashMap<>();
|
||||
private ParticleEffect getParticleData(String name)
|
||||
{
|
||||
ParticleEffect particle = particleCache.get(name);
|
||||
@@ -2145,7 +2145,7 @@ public class CarpetExpression
|
||||
args = Collections.singletonList(lv.get(3).evalValue(c));
|
||||
else if (lv.size()>4)
|
||||
{
|
||||
args = new ArrayList<>(lv.subList(3, lv.size()).stream().map((vv) -> vv.evalValue(c)).collect(Collectors.toList()));
|
||||
args = lv.subList(3, lv.size()).stream().map((vv) -> vv.evalValue(c)).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
((EntityValue) v).setEvent((CarpetContext)c, what, function, args);
|
||||
@@ -2377,12 +2377,12 @@ public class CarpetExpression
|
||||
CarpetContext cc = (CarpetContext)c;
|
||||
return (c_, t_) -> new LazyListValue()
|
||||
{
|
||||
int minx = cx-sminx;
|
||||
int miny = cy-sminy;
|
||||
int minz = cz-sminz;
|
||||
int maxx = cx+smaxx;
|
||||
int maxy = cy+smaxy;
|
||||
int maxz = cz+smaxz;
|
||||
final int minx = cx-sminx;
|
||||
final int miny = cy-sminy;
|
||||
final int minz = cz-sminz;
|
||||
final int maxx = cx+smaxx;
|
||||
final int maxy = cy+smaxy;
|
||||
final int maxz = cz+smaxz;
|
||||
int x;
|
||||
int y;
|
||||
int z;
|
||||
@@ -3188,7 +3188,7 @@ public class CarpetExpression
|
||||
this.expr.addLazyFunction("schedule", -1, (c, t, lv) -> {
|
||||
if (lv.size()<2)
|
||||
throw new InternalExpressionException("'schedule' should have at least 2 arguments, delay and call name");
|
||||
Long delay = NumericValue.asNumber(lv.get(0).evalValue(c)).getLong();
|
||||
long delay = NumericValue.asNumber(lv.get(0).evalValue(c)).getLong();
|
||||
|
||||
Value functionValue = lv.get(1).evalValue(c);
|
||||
if (!(functionValue instanceof FunctionValue))
|
||||
|
||||
Reference in new issue
Block a user