Skip to content

Commit

Permalink
Backport 1.8d-beta2 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Pokechu22 committed May 22, 2016
1 parent e991e7e commit 77dc28d
Show file tree
Hide file tree
Showing 34 changed files with 2,297 additions and 1,455 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

public class ClientBrandRetriever {
public static String getClientModName() {
return "WorldDownloader-1.8.9a-beta1-coremod";
return "WorldDownloader-1.8.9a-beta2-baseedit";
}
}
21 changes: 13 additions & 8 deletions src/assets/wdl/lang/en_US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ wdl.gui.about.debugInfo.copied=Copied!
wdl.gui.extensions.title=World Downloader mod: Extensions
wdl.gui.extensions.detailsCaption=Details (resizable)
wdl.gui.extensions.modVersion=%s v%s
wdl.gui.extensions.enabled=§aEnabled
wdl.gui.extensions.disabled=§cDisabled
#The following line is used as a fallback for extensions that have their own
#GUI but don't give a name for the button to use.
wdl.gui.extensions.defaultSettingsButtonText=Settings...
Expand Down Expand Up @@ -183,8 +185,11 @@ wdl.gui.rangePresets.cancel.description=Cancel without making changes.

wdl.gui.overwriteChanges.title=World Downloader: Overwrite changes?
wdl.gui.overwriteChanges.footer=Last downloaded on %tc, last played on %tc
wdl.gui.overwriteChanges.footerNeverSaved=Never downloaded (different world with the same name as the server?) - last played on %tc
wdl.gui.overwriteChanges.captionTitle=The local copy of the world may have been changed.
wdl.gui.overwriteChanges.captionSubtitle=Changes may be lost if not backed up.
wdl.gui.overwriteChanges.overwriteWarning1=It's also possible that you have a separate world with the same
wdl.gui.overwriteChanges.overwriteWarning2=name as the server that may be overwritten - use caution!
wdl.gui.overwriteChanges.asZip.name=Backup as zip (then start download)
wdl.gui.overwriteChanges.asZip.description=Creates a .zip folder in the saves folder.%n%nThis backup can't be played in game unless extracted, but is useful if you just want to archive the changes.
wdl.gui.overwriteChanges.asFolder.name=Backup folder (then start download)
Expand Down Expand Up @@ -238,6 +243,10 @@ wdl.gui.updates.update.viewForumPost=View forum post
#Used in various places when update info can't be found
wdl.gui.updates.update.unknown=Unknown

wdl.gui.permissions.current=Current perms
wdl.gui.permissions.request=Request perms
wdl.gui.permissions.overrides=Chunk Overrides

wdl.backup.none=No backup
wdl.backup.folder=Copy world folder
wdl.backup.zip=Zip a copy of a world
Expand Down Expand Up @@ -275,12 +284,10 @@ wdl.messages.category.core_recommended=Core (recommended)
wdl.messages.category.core_debug=Core (debug)

wdl.messages.removeEntity.allowingRemoveUserPref=removeEntityFromWorld: Allowing removal of %s (user pref)
wdl.messages.removeEntity.allowingRemoveUnsafe=removeEntityFromWorld: Allowing removal of %s (not safe to save - %s)
wdl.messages.removeEntity.allowingRemoveUnrecognizedDistance=removeEntityFromWorld: Allowing removal of %s (unrecognized distance)
wdl.messages.removeEntity.allowingRemoveDistance=removeEntityFromWorld: Allowing removal of %s at distance %.2f (<= %d)
wdl.messages.removeEntity.savingDistance=removeEntityFromWorld: Saving %s at distance %.2f (> %d)
wdl.messages.removeEntity.notSavingUserPreference=saveChunk: Not saving %s (User preference)
wdl.messages.removeEntity.notSavingUnsafe=saveChunk: Not saving %s (not safe to save - %s)

wdl.messages.tileEntity.usingOld=Using old TE from saved file: %s at %s
wdl.messages.tileEntity.usingNew=Using new TE: %s at %s
Expand Down Expand Up @@ -332,8 +339,6 @@ wdl.messages.onGuiClosedWarning.unhandledEntity=onItemGuiClosed: Unrecognised en
wdl.messages.onGuiClosedWarning.unhandledTileEntity=onItemGuiClosed: Unhandled Tile Entity at %s: %s
wdl.messages.onGuiClosedWarning.failedToFindDoubleChest=Could not save this double chest! Failed to find all neighboring chest blocks.

wdl.unsafeReasons.badCustomName=Invalid custom name! (Threw %s)

wdl.messages.generalInfo.downloadStarted=Download started
wdl.messages.generalInfo.downloadStopped=Download stopped.
wdl.messages.generalInfo.saveStarted=Save started.
Expand All @@ -346,13 +351,12 @@ wdl.messages.generalInfo.seedAndGenSet=Setting single-player world seed to %s an

wdl.messages.generalError.failedToImportTE=Failed to import tile entities for chunk at %d, %d: %s
wdl.messages.generalError.failedToSaveChunk=Chunk at position %d, %d cannot be saved! (%s)
wdl.messages.generalError.failedToFindHashArrayField=Couldn't save chunks: Failed to find hash array field.
wdl.messages.generalError.couldNotGetLHMEntry=Couldn't save chunks: Failed to get class for LongHashMap.Entry.
wdl.messages.generalError.chunkProviderClientEmpty=Can't save currently loaded chunks: ChunkProviderClient has no data! (If you changed dimensions just now, this is normal and the chunks were still saved)
wdl.messages.generalError.forbidden=The server forbids downloading this world!
wdl.messages.generalError.failedToBackUp=Error while backing up world: %s
wdl.messages.generalError.noUTF8=Your computer doesn't support the UTF-8 charset: %s. You should feel bad.
wdl.messages.generalError.failedToSetUpEntityUI=Error setting up Entity List UI: %s
wdl.messages.generalError.failedToSaveEntity=Failed to save entity %s for chunk at %d, %d: %s
wdl.messages.generalError.failedToSaveTE=Failed to save tile entity %s at %s for chunk at %d, %d: %s

wdl.messages.updates.releaseCount=Found %d releases.
wdl.messages.updates.failedToFindMatchingRelease=Could not find a release matching %s. You may be running a version that hasn't been released yet.
Expand Down Expand Up @@ -407,8 +411,9 @@ wdl.props.world.title=These settings are used for a single world in a multiworld

#Some of these messages are using format substitutions, so that special coloring can be added.
wdl.intro.success=The World Downloader mod has been successfully installed!
wdl.intro.usage=For information on how to use this mod, please see the %s.
wdl.intro.usage=For information on how to use this mod, please see the %s and the %s.
wdl.intro.forumsLink=Official Minecraft Forums thread
wdl.intro.wikiLink=Project Wiki
wdl.intro.contribute=To report a bug, suggest a feature, contribute code, or help translate, check out %s.
wdl.intro.githubRepo=GitHub repository
wdl.intro.stolen=%s: If you downloaded this mod from a location other than the Minecraft Forums or GitHub (or another site on %s), you may have used a site that is %s redistributing this mod.
Expand Down
3 changes: 0 additions & 3 deletions src/assets/wdl/lang/es_AR.lang
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,6 @@ wdl.messages.generalInfo.seedAndGenSet=Asignando semilla de mundo un jugador a %

wdl.messages.generalError.failedToImportTE=Fracasé en importar los entidades de bloque por chunk en %d, %d: %s
wdl.messages.generalError.failedToSaveChunk=¡Fracasé en guardar el chunk en %d, %d! (%s)
wdl.messages.generalError.failedToFindHashArrayField=No pude guardar los chunks: no pude ubicar el hash array field.
wdl.messages.generalError.couldNotGetLHMEntry=No pude guardar los chunks: Fracasar en ubicar el class por LongHashMap.Entry.
wdl.messages.generalError.chunkProviderClientEmpty=No pude guardar los chunks cercas: ¡ChunkProviderClient no tiene data! (Si cambias de dimensión ahora, esto es normal y los chunks aún están guardado)
wdl.messages.generalError.forbidden=¡El servidor no permite descargando este mundo!
wdl.messages.generalError.failedToBackUp=Un error occurió durante el backup del mundo: %s
wdl.messages.generalError.noUTF8=Su computadora no habilita el charset UTF-8: %s. Debe sentir mal.
Expand Down
3 changes: 0 additions & 3 deletions src/assets/wdl/lang/es_ES.lang
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,6 @@ wdl.messages.generalInfo.seedAndGenSet=Asignando semilla de mundo un jugador a %

wdl.messages.generalError.failedToImportTE=Fracasé en importar los entidades de bloque por chunk en %d, %d: %s
wdl.messages.generalError.failedToSaveChunk=¡Fracasé en guardar el chunk en %d, %d! (%s)
wdl.messages.generalError.failedToFindHashArrayField=No pude guardar los chunks: no pude ubicar el hash array field.
wdl.messages.generalError.couldNotGetLHMEntry=No pude guardar los chunks: Fracasar en ubicar el class por LongHashMap.Entry.
wdl.messages.generalError.chunkProviderClientEmpty=No pude guardar los chunks cercas: ¡ChunkProviderClient no tiene data! (Si cambias de dimensión ahora, esto es normal y los chunks aún están guardado)
wdl.messages.generalError.forbidden=¡El servidor no permite descargando este mundo!
wdl.messages.generalError.failedToBackUp=Un error occurió durante el backup del mundo: %s
wdl.messages.generalError.noUTF8=Su computadora no habilita el charset UTF-8: %s. Debe sentir mal.
Expand Down
3 changes: 0 additions & 3 deletions src/assets/wdl/lang/es_MX.lang
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,6 @@ wdl.messages.generalInfo.seedAndGenSet=Asignando semilla de mundo un jugador a %

wdl.messages.generalError.failedToImportTE=Fracasé en importar los entidades de bloque por chunk en %d, %d: %s
wdl.messages.generalError.failedToSaveChunk=¡Fracasé en guardar el chunk en %d, %d! (%s)
wdl.messages.generalError.failedToFindHashArrayField=No pude guardar los chunks: no pude ubicar el hash array field.
wdl.messages.generalError.couldNotGetLHMEntry=No pude guardar los chunks: Fracasar en ubicar el class por LongHashMap.Entry.
wdl.messages.generalError.chunkProviderClientEmpty=No pude guardar los chunks cercas: ¡ChunkProviderClient no tiene data! (Si cambias de dimensión ahora, esto es normal y los chunks aún están guardado)
wdl.messages.generalError.forbidden=¡El servidor no permite descargando este mundo!
wdl.messages.generalError.failedToBackUp=Un error occurió durante el backup del mundo: %s
wdl.messages.generalError.noUTF8=Su computadora no habilita el charset UTF-8: %s. Debe sentir mal.
Expand Down
3 changes: 0 additions & 3 deletions src/assets/wdl/lang/es_UY.lang
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,6 @@ wdl.messages.generalInfo.seedAndGenSet=Asignando semilla de mundo un jugador a %

wdl.messages.generalError.failedToImportTE=Fracasé en importar los entidades de bloque por chunk en %d, %d: %s
wdl.messages.generalError.failedToSaveChunk=¡Fracasé en guardar el chunk en %d, %d! (%s)
wdl.messages.generalError.failedToFindHashArrayField=No pude guardar los chunks: no pude ubicar el hash array field.
wdl.messages.generalError.couldNotGetLHMEntry=No pude guardar los chunks: Fracasar en ubicar el class por LongHashMap.Entry.
wdl.messages.generalError.chunkProviderClientEmpty=No pude guardar los chunks cercas: ¡ChunkProviderClient no tiene data! (Si cambias de dimensión ahora, esto es normal y los chunks aún están guardado)
wdl.messages.generalError.forbidden=¡El servidor no permite descargando este mundo!
wdl.messages.generalError.failedToBackUp=Un error occurió durante el backup del mundo: %s
wdl.messages.generalError.noUTF8=Su computadora no habilita el charset UTF-8: %s. Debe sentir mal.
Expand Down
3 changes: 0 additions & 3 deletions src/assets/wdl/lang/es_VE.lang
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,6 @@ wdl.messages.generalInfo.seedAndGenSet=Asignando semilla de mundo un jugador a %

wdl.messages.generalError.failedToImportTE=Fracasé en importar los entidades de bloque por chunk en %d, %d: %s
wdl.messages.generalError.failedToSaveChunk=¡Fracasé en guardar el chunk en %d, %d! (%s)
wdl.messages.generalError.failedToFindHashArrayField=No pude guardar los chunks: no pude ubicar el hash array field.
wdl.messages.generalError.couldNotGetLHMEntry=No pude guardar los chunks: Fracasar en ubicar el class por LongHashMap.Entry.
wdl.messages.generalError.chunkProviderClientEmpty=No pude guardar los chunks cercas: ¡ChunkProviderClient no tiene data! (Si cambias de dimensión ahora, esto es normal y los chunks aún están guardado)
wdl.messages.generalError.forbidden=¡El servidor no permite descargando este mundo!
wdl.messages.generalError.failedToBackUp=Un error occurió durante el backup del mundo: %s
wdl.messages.generalError.noUTF8=Su computadora no habilita el charset UTF-8: %s. Debe sentir mal.
Expand Down
Binary file added src/assets/wdl/textures/permission_widgets.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
89 changes: 89 additions & 0 deletions src/wdl/EntityRealigner.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
package wdl;

import net.minecraft.entity.Entity;
import wdl.api.IEntityEditor;
import wdl.api.IWDLMod;
import wdl.api.IWDLModDescripted;

/**
* Realigns entities to their serverside positions, to mitigate entity drift.
* This is necessary for entities that move clientside, most importantly boats
* (example: http://i.imgur.com/3QQchZL.gifv).
* <br/>
* This is also an example of how an {@link IWDLMod} would be implemented.
*/
public class EntityRealigner implements IEntityEditor, IWDLModDescripted {
@Override
public boolean isValidEnvironment(String version) {
return true;
}

@Override
public String getEnvironmentErrorMessage(String version) {
return null;
}

@Override
public String getDisplayName() {
return "Entity realigner";
}

@Override
public String getMainAuthor() {
return "Pokechu22";
}

@Override
public String[] getAuthors() {
return null;
}

@Override
public String getURL() {
return null;
}

@Override
public String getDescription() {
return "Realigns entities to their serverside position to deal with " +
"entities that drift clientside (for example, boats).";
}

@Override
public boolean shouldEdit(Entity e) {
// We make sure that at least one of serverPosX, y, and
// z is not 0 because an entity with a server pos of 0,
// 0, 0 probably has a different way of setting up its
// position (for example, paintings).
// No sane entity will be at 0, 0, 0. And moving them
// to it can effectively delete entities - see
// https://github.com/uyjulian/LiteModWDL/issues/4.
// (I also think this is the cause for the "world going
// invisible" issue).
return e.serverPosX != 0 || e.serverPosY != 0 || e.serverPosZ != 0;
}

@Override
public void editEntity(Entity e) {
System.out.println("Realigning " + e);
e.posX = convertServerPos(e.serverPosX);
e.posY = convertServerPos(e.serverPosY);
e.posZ = convertServerPos(e.serverPosZ);
System.out.println("Realigned " + e);
}

/**
* Converts a position from the fixed-point version that a packet
* (or {@link Entity#serverPosX} and the like use) into a double.
*
* @see
* <a href="http://wiki.vg/Protocol#Fixed-point_numbers">
* wiki.vg on Fixed-point numbers</a>
*
* @param serverPos
* @return The double version of the position.
*/
private static double convertServerPos(int serverPos) {
return serverPos / 32.0;
}
}
Loading

0 comments on commit 77dc28d

Please sign in to comment.