settings ported to the annotation based system

This commit is contained in:
gnembon committed 2019-06-11 23:01:09 -03:00
1 parent 79495eccd0
commit 734dc95dab
84 files changed
+299 -1238

No files matched your search

@@ -1,7 +1,7 @@
package carpet.script;
import carpet.CarpetServer;
import carpet.CarpetSettings;
import carpet.settings.CarpetSettings;
import carpet.helpers.FeatureGenerator;
import carpet.fakes.MinecraftServerInterface;
import carpet.script.exception.CarpetExpressionException;
@@ -21,7 +21,6 @@ import com.mojang.brigadier.StringReader;
import com.mojang.brigadier.exceptions.CommandSyntaxException;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.block.entity.BlockEntity;
import net.minecraft.enchantment.Enchantments;
import net.minecraft.entity.EntityType;
@@ -707,7 +706,7 @@ public class CarpetExpression
}
if (sourceBlockState == targetBlockState)
return (c_, t_) -> Value.FALSE;
if (!CarpetSettings.b_fillUpdates) CarpetSettings.impendingFillSkipUpdates = true;
CarpetSettings.impendingFillSkipUpdates = !CarpetSettings.fillUpdates;
cc.s.getWorld().setBlockState(targetLocator.block.getPos(), sourceBlockState, 2);
CarpetSettings.impendingFillSkipUpdates = false;
Value retval = new BlockValue(sourceBlockState, world, targetLocator.block.getPos());
@@ -1,7 +1,7 @@
package carpet.script;
import carpet.CarpetServer;
import carpet.CarpetSettings;
import carpet.settings.CarpetSettings;
import carpet.script.bundled.CameraPathModule;
import carpet.script.bundled.FileModule;
import carpet.script.bundled.ModuleInterface;
@@ -242,7 +242,7 @@ public class CarpetScriptServer
}
Messenger.m(source, "gi Package "+hostName+" loaded with /"+hostName+" command");
CarpetServer.minecraft_server.getCommandManager().getDispatcher().register(command);
CarpetSettings.notifyPlayersCommandsChanged();
CarpetServer.settingsManager.notifyPlayersCommandsChanged();
}
public void setChatErrorSnooper(ServerCommandSource source)
@@ -304,7 +304,7 @@ public class CarpetScriptServer
}
// stop all events associated with name
modules.remove(name);
CarpetSettings.notifyPlayersCommandsChanged();
CarpetServer.settingsManager.notifyPlayersCommandsChanged();
Messenger.m(source, "w Removed host "+name);
return true;
}
+1 -1
View File
@@ -1,7 +1,7 @@
package carpet.script;
import carpet.CarpetServer;
import carpet.CarpetSettings;
import carpet.settings.CarpetSettings;
import carpet.script.exception.ExpressionException;
import carpet.script.exception.InvalidCallbackException;
import carpet.script.value.NumericValue;