This commit is contained in:
Jesse Boyd 2017-02-18 16:12:42 +11:00
parent 3d81e98a2a
commit b9fdfb8b01
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F
9 changed files with 15 additions and 11 deletions

View File

@ -314,7 +314,7 @@ public class BukkitChunk_1_7 extends CharFaweChunk<Chunk, BukkitQueue17> {
byte[] currentIdArray = (byte[]) BukkitQueue17.fieldIds.get(section);
NibbleArray currentDataArray = (NibbleArray) BukkitQueue17.fieldData.get(section);
boolean data = currentDataArray != null && newDataArray != null;
if (!data) {
if (currentDataArray == null && newDataArray != null) {
section.setDataArray(newDataArray);
}
if (currentIdArray == null) {

View File

@ -374,14 +374,17 @@ public class MainUtil {
public static File getJarFile() {
try {
URL url = Fawe.class.getProtectionDomain().getCodeSource().getLocation();
return new File(new URL(url.toURI().toString().split("\\!")[0].replaceAll("jar:file", "file")).toURI().getPath());
return getJarFile(Fawe.class);
} catch (MalformedURLException | URISyntaxException | SecurityException e) {
MainUtil.handleError(e);
return new File(Fawe.imp().getDirectory().getParentFile(), "FastAsyncWorldEdit.jar");
}
}
public static File getJarFile(Class<?> clazz) throws URISyntaxException, MalformedURLException {
URL url = clazz.getProtectionDomain().getCodeSource().getLocation();
return new File(new URL(url.toURI().toString().split("\\!")[0].replaceAll("jar:file", "file")).toURI().getPath());
}
public static void sendCompressedMessage(FaweStreamChangeSet set, FawePlayer actor)
{
try {

View File

@ -215,10 +215,11 @@ public class BundledBlockData {
new Vector(0, -1, 0)};
int len = dir.values.size();
int index = 0;
int amount = (dir.values.size() + 7)/ 8;
for (Map.Entry<String, FaweStateValue> valuesEntry : dir.values.entrySet()) {
FaweStateValue state = valuesEntry.getValue();
if (state != null) {
state.setDirection(dirs[index]);
state.setDirection(dirs[index / amount]);
}
index++;
}

View File

@ -18,7 +18,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.PlayerEvent;
import org.apache.logging.log4j.Logger;
@Mod(modid = "com.boydti.fawe", name = "FastAsyncWorldEdit", version = "3.5.1", acceptableRemoteVersions = "*")
@Mod(modid = "com.boydti.fawe", name = "FastAsyncWorldEdit", version = "3.5.1", acceptableRemoteVersions = "*", dependencies = "before:worldedit")
public class ForgeMain {
private static com.boydti.fawe.forge.FaweForge IMP;
private Logger logger;

View File

@ -17,7 +17,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.PlayerEvent;
import org.apache.logging.log4j.Logger;
@Mod(modid = "com.boydti.fawe", name = "FastAsyncWorldEdit", version = "3.5.1", acceptableRemoteVersions = "*")
@Mod(modid = "com.boydti.fawe", name = "FastAsyncWorldEdit", version = "3.5.1", acceptableRemoteVersions = "*", dependencies = "before:worldedit")
public class ForgeMain {
private static com.boydti.fawe.forge.FaweForge IMP;
private Logger logger;

View File

@ -19,7 +19,7 @@ import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.EntityJoinWorldEvent;
import org.apache.logging.log4j.Logger;
@Mod(modid = "com.boydti.fawe", name = "FastAsyncWorldEdit", version = "3.5.1", acceptableRemoteVersions = "*")
@Mod(modid = "com.boydti.fawe", name = "FastAsyncWorldEdit", version = "3.5.1", acceptableRemoteVersions = "*", dependencies = "before:worldedit")
public class ForgeMain {
private static FaweForge IMP;
private Logger logger;

View File

@ -263,7 +263,7 @@ public class ForgeChunk_All extends CharFaweChunk<Chunk, ForgeQueue_All> {
byte[] currentIdArray = section.getBlockLSBArray();
NibbleArray currentDataArray = section.getMetadataArray();
boolean data = currentDataArray != null && newDataArray != null;
if (!data) {
if (currentDataArray == null && newDataArray != null) {
section.setBlockMetadataArray(newDataArray);
}
int solid = 0;

View File

@ -19,7 +19,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.PlayerEvent;
import org.apache.logging.log4j.Logger;
@Mod(modid = "com.boydti.fawe", name = "FastAsyncWorldEdit", version = "3.5.1", acceptableRemoteVersions = "*")
@Mod(modid = "com.boydti.fawe", name = "FastAsyncWorldEdit", version = "3.5.1", acceptableRemoteVersions = "*", dependencies = "before:worldedit")
public class ForgeMain {
private static com.boydti.fawe.forge.FaweForge IMP;
private Logger logger;

View File

@ -18,7 +18,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.PlayerEvent;
import org.apache.logging.log4j.Logger;
@Mod(modid = "com.boydti.fawe", name = "FastAsyncWorldEdit", version = "3.5.1", acceptableRemoteVersions = "*")
@Mod(modid = "com.boydti.fawe", name = "FastAsyncWorldEdit", version = "3.5.1", acceptableRemoteVersions = "*", dependencies = "before:worldedit")
public class ForgeMain {
private static com.boydti.fawe.forge.FaweForge IMP;
private Logger logger;