Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions src/main/java/cpw/mods/retro/WorldRetrogen.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import net.minecraft.command.CommandBase;
import net.minecraft.command.CommandException;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.nbt.NBTTagString;
Expand Down Expand Up @@ -72,7 +73,7 @@
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.Semaphore;

@Mod(modid="simpleretrogen", name="Simple Retrogen", acceptableRemoteVersions="*", acceptedMinecraftVersions = "[1.9,1.11)")
@Mod(modid="simpleretrogen", name="Simple Retrogen", acceptableRemoteVersions="*", acceptedMinecraftVersions = "[1.9,1.11.2]")
@ParametersAreNonnullByDefault
public class WorldRetrogen {
private List<Marker> markers = Lists.newArrayList();
Expand Down Expand Up @@ -169,14 +170,14 @@ public void serverStarting(FMLServerStartingEvent evt) {
{
@Override
@Nonnull
public String getCommandName()
public String getName()
{
return "listretrogenclasstargets";
}

@Override
@Nonnull
public String getCommandUsage(ICommandSender sender)
public String getUsage(ICommandSender sender)
{
return "List retrogens";
}
Expand All @@ -198,14 +199,16 @@ public void execute(MinecraftServer server, ICommandSender sender, String[] args
targets.add(worldGen.getClass().getName());
}
}

if (targets.isEmpty()) {
sender.addChatMessage(new TextComponentString("There are no retrogen target classes"));
sender.sendMessage(new TextComponentString("There are no retrogen target classes"));
} else {
sender.addChatMessage(new TextComponentString(CommandBase.joinNiceStringFromCollection(targets)));
sender.sendMessage(new TextComponentString(CommandBase.joinNiceStringFromCollection(targets)));
}
}
});
}

@EventHandler
public void serverAboutToStart(FMLServerAboutToStartEvent evt)
{
Expand Down Expand Up @@ -348,14 +351,14 @@ public void onChunkLoad(ChunkDataEvent.Load chunkevt)
{
if (retros.containsKey(retro))
{
queueRetrogen(retro, w, chk.getChunkCoordIntPair());
queueRetrogen(retro, w, chk.getPos());
}
}
}

for (String retro : existingGens)
{
completeRetrogen(chk.getChunkCoordIntPair(), w, retro);
completeRetrogen(chk.getPos(), w, retro);
}
}

Expand All @@ -373,7 +376,7 @@ public void onChunkSave(ChunkDataEvent.Save chunkevt)
if (completedWork.containsKey(w))
{
ListMultimap<ChunkPos, String> doneChunks = completedWork.get(w);
List<String> retroClassList = doneChunks.get(chunkevt.getChunk().getChunkCoordIntPair());
List<String> retroClassList = doneChunks.get(chunkevt.getChunk().getPos());
if (retroClassList.isEmpty())
return;
NBTTagCompound data = chunkevt.getData();
Expand Down