add variable sync
This commit is contained in:
parent
b6242d5de1
commit
aee94aa14d
33 changed files with 392 additions and 200 deletions
|
@ -21,6 +21,7 @@ import java.util.Iterator;
|
|||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Queue;
|
||||
import java.util.concurrent.Callable;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
@ -77,15 +78,16 @@ import common.packet.SPacketDisconnect;
|
|||
import common.packet.SPacketHeldItemChange;
|
||||
import common.packet.SPacketJoinGame;
|
||||
import common.packet.SPacketRespawn;
|
||||
import common.packet.SPacketServerConfig;
|
||||
import common.packet.SPacketSetExperience;
|
||||
import common.packet.SPacketSkin;
|
||||
import common.packet.SPacketTimeUpdate;
|
||||
import common.packet.SPacketWorld;
|
||||
import common.tags.TagObject;
|
||||
import common.util.BlockPos;
|
||||
import common.util.EncryptUtil;
|
||||
import common.util.ExtMath;
|
||||
import common.util.LazyLoader;
|
||||
import common.util.Pair;
|
||||
import common.util.PortalType;
|
||||
import common.util.Position;
|
||||
import common.util.Util;
|
||||
|
@ -274,18 +276,10 @@ public final class Server implements IThreadListener, Executor {
|
|||
throw new IllegalArgumentException("Variablenname von " + field + " kann nicht leer sein!");
|
||||
if(this.variables.containsKey(value.name()))
|
||||
throw new IllegalArgumentException("Variable " + value.name() + " existiert bereits!");
|
||||
this.variables.put(value.name(), new SVar(field, value));
|
||||
this.variables.put(value.name(), new SVar(field, value, clazz == Vars.class));
|
||||
}
|
||||
}
|
||||
}
|
||||
this.setCallback(new Runnable() {
|
||||
public void run() {
|
||||
for(WorldServer world : Server.this.getWorlds()) {
|
||||
world.updatePhysics();
|
||||
}
|
||||
Server.this.sendPacket(new SPacketWorld(WorldServer.clampGravity(), SVars.dayCycle, SVars.timeFlow));
|
||||
}
|
||||
}, "daylightCycle", "timeFlow", "gravity");
|
||||
this.setCallback(new Runnable() {
|
||||
public void run() {
|
||||
for(WorldServer world : Server.this.getWorlds()) {
|
||||
|
@ -495,14 +489,14 @@ public final class Server implements IThreadListener, Executor {
|
|||
|
||||
public void preload(WorldServer world, int bx, int bz) {
|
||||
int done = 0;
|
||||
int total = SVars.distance * 2 + 1;
|
||||
int total = Vars.distance * 2 + 1;
|
||||
total *= total;
|
||||
Log.TICK.info("Generiere und lade Welt");
|
||||
bx = bx >> 4;
|
||||
bz = bz >> 4;
|
||||
long last = System.currentTimeMillis();
|
||||
for(int x = -SVars.distance; x <= SVars.distance; x++) {
|
||||
for(int z = -SVars.distance; z <= SVars.distance; z++) {
|
||||
for(int x = -Vars.distance; x <= Vars.distance; x++) {
|
||||
for(int z = -Vars.distance; z <= Vars.distance; z++) {
|
||||
long time = System.currentTimeMillis();
|
||||
if(time - last > 1000L) {
|
||||
Log.TICK.info("Bereite Spawnbereich vor" + ": " + (done * 100 / total) + "%");
|
||||
|
@ -739,10 +733,14 @@ public final class Server implements IThreadListener, Executor {
|
|||
+ player.getId() + " auf " + UniverseRegistry.getName(world.dimension) + ": "
|
||||
+ String.format("%.2f %.2f %.2f", player.posX, player.posY, player.posZ) + " verbunden (" + (tag == null ? "Charakter-Editor" : "'" + player.getCommandName() + "'") + ")");
|
||||
|
||||
List<Pair<String, Object>> vars = Lists.newArrayList();
|
||||
for(Entry<String, SVar> var : this.variables.entrySet()) {
|
||||
if(var.getValue().sync)
|
||||
vars.add(new Pair(var.getKey(), var.getValue().getRaw()));
|
||||
}
|
||||
conn.sendPacket(new SPacketServerConfig(vars));
|
||||
conn.sendPacket(new SPacketJoinGame(player.getId(), world.dimension, EntityRegistry.getEntityID(player), tag == null));
|
||||
conn.sendPacket(new SPacketHeldItemChange(player.inventory.currentItem));
|
||||
conn.sendPacket(new SPacketWorld(WorldServer.clampGravity(),
|
||||
SVars.dayCycle, SVars.timeFlow));
|
||||
this.sendPacket(new SPacketPlayerListItem(false, conn));
|
||||
|
||||
world.spawnEntityInWorld(player);
|
||||
|
|
|
@ -5,6 +5,7 @@ import java.util.Map.Entry;
|
|||
|
||||
import common.collect.Lists;
|
||||
import common.color.TextColor;
|
||||
import common.packet.SPacketServerConfig;
|
||||
import server.command.ArgumentSplitter;
|
||||
import server.command.Command;
|
||||
import server.command.CommandEnvironment;
|
||||
|
@ -93,6 +94,8 @@ public class CommandSv extends Command {
|
|||
}
|
||||
}
|
||||
sv.set(value, false, true);
|
||||
if(sv.sync)
|
||||
env.getServer().sendPacket(new SPacketServerConfig(variable, sv.getRaw()));
|
||||
}
|
||||
exec.log(this.formatVariable(variable, sv, value == null ? "=" : "->", false));
|
||||
return sv.noDef && sv.def.equals(sv.get()) ? null : sv.get();
|
||||
|
|
|
@ -116,6 +116,7 @@ import common.util.PortalType;
|
|||
import common.util.Position;
|
||||
import common.util.Vec3i;
|
||||
import common.util.WorldPos;
|
||||
import common.vars.Vars;
|
||||
import common.village.MerchantRecipeList;
|
||||
import common.world.BlockArray;
|
||||
import common.world.State;
|
||||
|
@ -281,11 +282,11 @@ public class Player extends User implements Executor, IPlayer
|
|||
this.deathPos = this.entity.getPos();
|
||||
this.entity.sendDeathMessage();
|
||||
|
||||
if (!SVars.keepInventory && SVars.playerDrop)
|
||||
if (!Vars.keepInventory && Vars.playerDrop)
|
||||
{
|
||||
this.entity.inventory.dropAllItems();
|
||||
}
|
||||
if(SVars.skullDrop) {
|
||||
if(Vars.skullDrop) {
|
||||
ItemStack stack = new ItemStack(Items.skull);
|
||||
this.entity.dropItem(stack, true, false);
|
||||
}
|
||||
|
@ -466,7 +467,7 @@ public class Player extends User implements Executor, IPlayer
|
|||
{
|
||||
this.lastExperience = -1;
|
||||
this.lastHealth = -1.0F;
|
||||
if(SVars.keepInventory)
|
||||
if(Vars.keepInventory)
|
||||
this.entity.inventory.copyInventory(oldPlayer.inventory);
|
||||
this.entity.experienceLevel = oldPlayer.experienceLevel;
|
||||
this.entity.experienceTotal = oldPlayer.experienceTotal;
|
||||
|
|
|
@ -9,18 +9,20 @@ public class SVar {
|
|||
public final ValueType type;
|
||||
public final String def;
|
||||
public final boolean noDef;
|
||||
public final boolean sync;
|
||||
private final Field field;
|
||||
private final float min;
|
||||
private final float max;
|
||||
|
||||
private Runnable callback;
|
||||
|
||||
public SVar(Field field, Var value) {
|
||||
public SVar(Field field, Var value, boolean sync) {
|
||||
this.type = field.getType() == int.class ? ValueType.INTEGER : (field.getType() == boolean.class ? ValueType.BOOLEAN :
|
||||
(field.getType() == String.class ? ValueType.STRING : (field.getType() == float.class ? ValueType.FLOAT : null)));
|
||||
if(this.type == null)
|
||||
throw new IllegalArgumentException(value.name() + ": Unbekannter Variablen-Typ - " + field.getType());
|
||||
this.field = field;
|
||||
this.sync = sync;
|
||||
this.def = this.get();
|
||||
this.noDef = value.nonDefault();
|
||||
this.min = (this.type == ValueType.INTEGER || this.type == ValueType.FLOAT)
|
||||
|
@ -39,6 +41,15 @@ public class SVar {
|
|||
}
|
||||
}
|
||||
|
||||
public Object getRaw() {
|
||||
try {
|
||||
return this.field.get(null);
|
||||
}
|
||||
catch(IllegalArgumentException | IllegalAccessException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public void setCallback(Runnable callback) {
|
||||
this.callback = callback;
|
||||
}
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
package server.vars;
|
||||
|
||||
import common.util.Var;
|
||||
import common.vars.Vars;
|
||||
|
||||
public abstract class SVars extends Vars {
|
||||
public abstract class SVars {
|
||||
@Var(name = "tickSpawning")
|
||||
public static boolean tickSpawn = true;
|
||||
@Var(name = "genSpawning")
|
||||
|
@ -20,10 +19,6 @@ public abstract class SVars extends Vars {
|
|||
public static boolean spawnStrongholdMobs = true;
|
||||
@Var(name = "spawnHutMages")
|
||||
public static boolean spawnHutMage = true;
|
||||
@Var(name = "daylightCycle")
|
||||
public static boolean dayCycle = true;
|
||||
@Var(name = "dropPlayerSkulls")
|
||||
public static boolean skullDrop = true;
|
||||
@Var(name = "checkRespawn")
|
||||
public static boolean checkBed = true;
|
||||
@Var(name = "registration")
|
||||
|
@ -70,14 +65,10 @@ public abstract class SVars extends Vars {
|
|||
public static int playerLimit = 0;
|
||||
@Var(name = "compressAbove")
|
||||
public static int compression = 256;
|
||||
@Var(name = "timeFlow")
|
||||
public static int timeFlow = 1;
|
||||
@Var(name = "emptyTicks")
|
||||
public static int unloadTicks = 1200;
|
||||
@Var(name = "weatherChance")
|
||||
public static int weatherChance = 48000;
|
||||
@Var(name = "viewDistance", min = 2, max = 16)
|
||||
public static int distance = 8;
|
||||
@Var(name = "maxSpawns")
|
||||
public static int maxMobs = 120;
|
||||
@Var(name = "connectionTimeout", min = 10, max = 300)
|
||||
|
@ -89,11 +80,6 @@ public abstract class SVars extends Vars {
|
|||
@Var(name = "spawnDungeonMobs")
|
||||
public static int spawnDungeonMobs = 4;
|
||||
|
||||
@Var(name = "gravity")
|
||||
public static float gravity = 1.0f;
|
||||
|
||||
@Var(name = "password", nonDefault = true)
|
||||
public static String password = "";
|
||||
@Var(name = "baseSeed", nonDefault = true)
|
||||
public static String seed = "";
|
||||
}
|
||||
|
|
|
@ -67,6 +67,7 @@ import common.util.ParticleType;
|
|||
import common.util.PortalType;
|
||||
import common.util.Position;
|
||||
import common.util.Vec3;
|
||||
import common.vars.Vars;
|
||||
import common.village.Village;
|
||||
import common.world.BlockArray;
|
||||
import common.world.Explosion;
|
||||
|
@ -181,7 +182,7 @@ public final class WorldServer extends AWorldServer {
|
|||
private long time;
|
||||
|
||||
public static float clampGravity() {
|
||||
return ExtMath.clampf(SVars.gravity, -10.0f, 10.0f);
|
||||
return ExtMath.clampf(Vars.gravity, -10.0f, 10.0f);
|
||||
}
|
||||
|
||||
public void sendPacket(Packet packet) {
|
||||
|
@ -317,8 +318,8 @@ public final class WorldServer extends AWorldServer {
|
|||
this.updateViewRadius();
|
||||
this.chunkDir = new File(new File("chunk"), UniverseRegistry.getName(dim));
|
||||
this.chunkDir.mkdirs();
|
||||
if(!SVars.seed.isEmpty())
|
||||
this.rand.setSeed((long)SVars.seed.hashCode() ^ ~((long)UniverseRegistry.getName(dim).hashCode()));
|
||||
if(!Vars.seed.isEmpty())
|
||||
this.rand.setSeed((long)Vars.seed.hashCode() ^ ~((long)UniverseRegistry.getName(dim).hashCode()));
|
||||
this.seed = this.rand.longv();
|
||||
this.dimension.setSeed(this.seed);
|
||||
TagObject tag = null;
|
||||
|
@ -348,7 +349,7 @@ public final class WorldServer extends AWorldServer {
|
|||
// ...
|
||||
}
|
||||
else {
|
||||
Log.TICK.info("Startwert für %s: %d" + (SVars.seed.isEmpty() ? "" : " von Basiswert '%s'"), this.dimension.getFormattedName(false), this.seed, SVars.seed);
|
||||
Log.TICK.info("Startwert für %s: %d" + (Vars.seed.isEmpty() ? "" : " von Basiswert '%s'"), this.dimension.getFormattedName(false), this.seed, Vars.seed);
|
||||
}
|
||||
if(this.exterminated)
|
||||
this.weather = Weather.CLEAR;
|
||||
|
@ -379,17 +380,13 @@ public final class WorldServer extends AWorldServer {
|
|||
public Server getServer() {
|
||||
return this.server;
|
||||
}
|
||||
|
||||
public void updatePhysics() {
|
||||
this.setTimeFactor(SVars.timeFlow);
|
||||
this.setGravity(clampGravity());
|
||||
}
|
||||
|
||||
public void tick() {
|
||||
this.updatePhysics();
|
||||
this.updateWeather(false);
|
||||
this.biomeGen.cleanupCache();
|
||||
// this.profiler.start("mobSpawner");
|
||||
if(this.mobs && SVars.mobs && SVars.tickSpawn) {
|
||||
if(this.mobs && Vars.mobs && SVars.tickSpawn) {
|
||||
Spawner.spawn(this);
|
||||
}
|
||||
// this.profiler.next("chunkSource");
|
||||
|
@ -413,8 +410,8 @@ public final class WorldServer extends AWorldServer {
|
|||
// this.info.tick();
|
||||
this.time += 1L;
|
||||
// this.dataModified = true;
|
||||
if(SVars.dayCycle) // {
|
||||
this.daytime += this.timeFactor;
|
||||
if(Vars.dayCycle) // {
|
||||
this.daytime += Vars.timeFlow;
|
||||
// if(this.dimension.getType().dayCycle)
|
||||
// this.season = this.getSeasonByTime();
|
||||
// }
|
||||
|
@ -520,7 +517,7 @@ public final class WorldServer extends AWorldServer {
|
|||
}
|
||||
|
||||
protected void updateBlocks() {
|
||||
this.setActivePlayerChunksAndCheckLight(SVars.distance);
|
||||
this.setActivePlayerChunksAndCheckLight(Vars.distance);
|
||||
|
||||
int dtics = 0;
|
||||
int rtics = 0;
|
||||
|
@ -574,7 +571,7 @@ public final class WorldServer extends AWorldServer {
|
|||
this.getState(blockpos1).getBlock().fillWithRain(this, blockpos1);
|
||||
}
|
||||
|
||||
if(SVars.igniteChance > 0 && SVars.fire && !this.isRaining() &&
|
||||
if(SVars.igniteChance > 0 && Vars.fire && !this.isRaining() &&
|
||||
this.rand.chance(this.hasDownfall() ? Math.max(1, SVars.igniteChance / 3) : SVars.igniteChance)
|
||||
&& this.canPlaceFireAt(blockpos2)) {
|
||||
this.setState(blockpos2, Blocks.fire.getState());
|
||||
|
@ -1006,7 +1003,7 @@ public final class WorldServer extends AWorldServer {
|
|||
this.effects.add(entity);
|
||||
this.sendNear(entity.posX, entity.posY, entity.posZ, 512.0D,
|
||||
new SPacketSpawnGlobalEntity(entity, 1, entity.color));
|
||||
if(fire && SVars.fire) {
|
||||
if(fire && Vars.fire) {
|
||||
BlockPos pos = new BlockPos(entity);
|
||||
if(this.isAreaLoaded(pos, 10)) {
|
||||
if(this.getState(pos).getBlock() == Blocks.air && Blocks.fire.canPlaceBlockAt(this, pos))
|
||||
|
@ -1460,7 +1457,7 @@ public final class WorldServer extends AWorldServer {
|
|||
liquid.generate(this, this.grng, pos);
|
||||
}
|
||||
}
|
||||
if(this.mobs && SVars.mobs && SVars.genSpawn) {
|
||||
if(this.mobs && Vars.mobs && SVars.genSpawn) {
|
||||
Spawner.generate(this, biome, bx + 8, bz + 8, 16, 16, this.grng);
|
||||
}
|
||||
// if(this.snow) {
|
||||
|
@ -1958,7 +1955,7 @@ public final class WorldServer extends AWorldServer {
|
|||
}
|
||||
|
||||
public void updateViewRadius() {
|
||||
int radius = ExtMath.clampi(SVars.distance, 3, 128);
|
||||
int radius = ExtMath.clampi(Vars.distance, 3, 128);
|
||||
|
||||
if(radius != this.viewRadius) {
|
||||
int diff = radius - this.viewRadius;
|
||||
|
@ -1992,7 +1989,7 @@ public final class WorldServer extends AWorldServer {
|
|||
this.viewRadius = radius;
|
||||
}
|
||||
|
||||
this.trackDistance = SVars.distance * 16 - 16;
|
||||
this.trackDistance = Vars.distance * 16 - 16;
|
||||
}
|
||||
|
||||
public void trackEntity(Entity entityIn) {
|
||||
|
|
|
@ -16,6 +16,7 @@ import common.tileentity.TileEntity;
|
|||
import common.tileentity.TileEntityChest;
|
||||
import common.util.BlockPos;
|
||||
import common.util.Facing;
|
||||
import common.vars.Vars;
|
||||
import common.world.World;
|
||||
import server.vars.SVars;
|
||||
import server.world.WorldServer;
|
||||
|
@ -154,7 +155,7 @@ public class FeatureDungeons
|
|||
}
|
||||
}
|
||||
|
||||
if(SVars.mobs && SVars.spawnDungeonMobs > 0) {
|
||||
if(Vars.mobs && SVars.spawnDungeonMobs > 0) {
|
||||
for(int z = 0; z < SVars.spawnDungeonMobs; z++) {
|
||||
EntityLiving entity = this.pickMobSpawner(rand, worldIn);
|
||||
entity.setLocationAndAngles((double)position.getX() + rand.doublev(), (double)position.getY(), (double)position.getZ() + rand.doublev(), worldIn.rand.floatv() * 360.0F, 0.0F);
|
||||
|
|
|
@ -10,6 +10,7 @@ import common.rng.Random;
|
|||
import common.tags.TagObject;
|
||||
import common.util.BlockPos;
|
||||
import common.util.Facing;
|
||||
import common.vars.Vars;
|
||||
import common.world.State;
|
||||
import server.vars.SVars;
|
||||
import server.world.WorldServer;
|
||||
|
@ -1366,7 +1367,7 @@ public class StructureBridge
|
|||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 6, 8, 5, 7, 8, Blocks.blood_brick_fence.getState(), Blocks.blood_brick_fence.getState(), false);
|
||||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, 2, 8, 8, 4, 8, 8, Blocks.blood_brick_fence.getState(), Blocks.blood_brick_fence.getState(), false);
|
||||
|
||||
if (!this.hasSpawner && SVars.mobs && SVars.spawnBridgeMobs)
|
||||
if (!this.hasSpawner && Vars.mobs && SVars.spawnBridgeMobs)
|
||||
{
|
||||
BlockPos blockpos = new BlockPos(this.getXWithOffset(3, 5), this.getYWithOffset(5), this.getZWithOffset(3, 5));
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ import common.rng.WeightedList;
|
|||
import common.tags.TagObject;
|
||||
import common.util.BlockPos;
|
||||
import common.util.Facing;
|
||||
import common.vars.Vars;
|
||||
import common.world.State;
|
||||
import server.vars.SVars;
|
||||
import server.world.WorldServer;
|
||||
|
@ -363,7 +364,7 @@ public class StructureMineshaft
|
|||
this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 0, 0, k1 + 1, RngLoot.addToList(LootConstants.MINESHAFT_CHEST, ItemEnchantedBook.getRandom(randomIn)), 3 + randomIn.zrange(4));
|
||||
}
|
||||
|
||||
if (this.hasSpiders && !this.spawnerPlaced && SVars.mobs && SVars.spawnMineshaftMobs)
|
||||
if (this.hasSpiders && !this.spawnerPlaced && Vars.mobs && SVars.spawnMineshaftMobs)
|
||||
{
|
||||
int l1 = this.getYWithOffset(0);
|
||||
int i2 = k1 - 1 + randomIn.zrange(3);
|
||||
|
|
|
@ -15,6 +15,7 @@ import common.rng.Random;
|
|||
import common.tags.TagObject;
|
||||
import common.util.BlockPos;
|
||||
import common.util.Facing;
|
||||
import common.vars.Vars;
|
||||
import common.world.State;
|
||||
import server.vars.SVars;
|
||||
import server.world.WorldServer;
|
||||
|
@ -669,7 +670,7 @@ public class StructureScattered
|
|||
}
|
||||
}
|
||||
|
||||
if (!this.hasMage && SVars.mobs && SVars.spawnHutMage)
|
||||
if (!this.hasMage && Vars.mobs && SVars.spawnHutMage)
|
||||
{
|
||||
int l1 = this.getXWithOffset(2, 5);
|
||||
int i2 = this.getYWithOffset(2);
|
||||
|
|
|
@ -17,6 +17,7 @@ import common.rng.Random;
|
|||
import common.tags.TagObject;
|
||||
import common.util.BlockPos;
|
||||
import common.util.Facing;
|
||||
import common.vars.Vars;
|
||||
import common.world.State;
|
||||
import server.vars.SVars;
|
||||
import server.world.WorldServer;
|
||||
|
@ -902,7 +903,7 @@ public class StructureStronghold
|
|||
// this.setBlockState(worldIn, Blocks.end_portal_frame.getStateFromMeta(j1).withProperty(BlockPortalFrame.ORB, Boolean.valueOf(randomIn.floatv() > 0.9F)), 7, 3, 10, structureBoundingBoxIn);
|
||||
// this.setBlockState(worldIn, Blocks.end_portal_frame.getStateFromMeta(j1).withProperty(BlockPortalFrame.ORB, Boolean.valueOf(randomIn.floatv() > 0.9F)), 7, 3, 11, structureBoundingBoxIn);
|
||||
|
||||
if (!this.hasSpawner && SVars.mobs && SVars.spawnStrongholdMobs)
|
||||
if (!this.hasSpawner && Vars.mobs && SVars.spawnStrongholdMobs)
|
||||
{
|
||||
i = this.getYWithOffset(3);
|
||||
BlockPos blockpos = new BlockPos(this.getXWithOffset(5, 6), i, this.getZWithOffset(5, 6));
|
||||
|
|
|
@ -18,6 +18,7 @@ import common.rng.Random;
|
|||
import common.tags.TagObject;
|
||||
import common.util.BlockPos;
|
||||
import common.util.Facing;
|
||||
import common.vars.Vars;
|
||||
import common.world.State;
|
||||
import server.vars.SVars;
|
||||
import server.world.WorldServer;
|
||||
|
@ -1603,7 +1604,7 @@ public class StructureVillage
|
|||
|
||||
protected void spawnVillagers(WorldServer worldIn, StructureBoundingBox p_74893_2_, int p_74893_3_, int p_74893_4_, int p_74893_5_, int p_74893_6_)
|
||||
{
|
||||
if (this.villagersSpawned < p_74893_6_ && SVars.mobs && SVars.spawnVillager)
|
||||
if (this.villagersSpawned < p_74893_6_ && Vars.mobs && SVars.spawnVillager)
|
||||
{
|
||||
for (int i = this.villagersSpawned; i < p_74893_6_; ++i)
|
||||
{
|
||||
|
@ -1920,7 +1921,7 @@ public class StructureVillage
|
|||
|
||||
protected void spawnVillager(WorldServer worldIn, StructureBoundingBox p_74893_2_, int x, int y, int z)
|
||||
{
|
||||
if (!this.villagerSpawned && SVars.mobs && SVars.spawnCageMobs)
|
||||
if (!this.villagerSpawned && Vars.mobs && SVars.spawnCageMobs)
|
||||
{
|
||||
int j = this.getXWithOffset(x, z);
|
||||
int k = this.getYWithOffset(y);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue