mirror of
https://github.com/xoo0524tw/OpenArcadeGames.git
synced 2026-12-06 02:46:01 +02:00
Deobfuscate remaining method and field names across common, latest, and legacy
This commit is contained in:
1 parent
fbed884ad9
commit
5f4da43c5b
538 files changed
+9039
-9039
No files matched your search
+3
-3
@@ -14,17 +14,17 @@ public class AdvancedSlimePaperIntegration extends PluginIntegration {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean a() {
|
||||
public boolean canEnable() {
|
||||
return Bukkit.getPluginManager().getPlugin("ASPaperPlugin") != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void b() {
|
||||
public void onEnable() {
|
||||
this.manager.setWorldProvider(new AdvancedSlimeWorldProvider(this.manager));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void c() {
|
||||
public void onDisable() {
|
||||
this.manager.setWorldProvider((ro.fr33styler.arcade.engine.world.spi.WorldProvider)null);
|
||||
}
|
||||
}
|
||||
+10
-10
@@ -17,39 +17,39 @@ public class AdvancedSlimeTemplateLoader implements SlimeLoader {
|
||||
}
|
||||
|
||||
public byte[] readWorld(String text) {
|
||||
GameTemplate gameTemplate = this.manager.getSessions().e(text);
|
||||
GameTemplate gameTemplate = this.manager.getSessions().getTemplate(text);
|
||||
if (gameTemplate == null) {
|
||||
throw GenericTypeValidation.re$propagate(new UnknownWorldException(text));
|
||||
} else {
|
||||
return gameTemplate.c();
|
||||
return gameTemplate.getWorldData();
|
||||
}
|
||||
}
|
||||
|
||||
public boolean worldExists(String text) {
|
||||
GameTemplate gameTemplate = this.manager.getSessions().e(text);
|
||||
return gameTemplate != null && gameTemplate.c() != null;
|
||||
GameTemplate gameTemplate = this.manager.getSessions().getTemplate(text);
|
||||
return gameTemplate != null && gameTemplate.getWorldData() != null;
|
||||
}
|
||||
|
||||
public List<String> listWorlds() {
|
||||
return this.manager.getSessions().h();
|
||||
return this.manager.getSessions().getTemplateNames();
|
||||
}
|
||||
|
||||
public void saveWorld(String text, byte[] byteVals) {
|
||||
GameTemplate gameTemplate = this.manager.getSessions().e(text);
|
||||
GameTemplate gameTemplate = this.manager.getSessions().getTemplate(text);
|
||||
if (gameTemplate == null) {
|
||||
throw GenericTypeValidation.re$propagate(new IOException("Template not found!"));
|
||||
}
|
||||
|
||||
gameTemplate.a(byteVals);
|
||||
this.manager.getStorage().getStorage5().a(gameTemplate);
|
||||
gameTemplate.setWorldData(byteVals);
|
||||
this.manager.getStorage().getTemplateStorage().save(gameTemplate);
|
||||
}
|
||||
|
||||
public void deleteWorld(String text) {
|
||||
GameTemplate gameTemplate = this.manager.getSessions().e(text);
|
||||
GameTemplate gameTemplate = this.manager.getSessions().getTemplate(text);
|
||||
if (gameTemplate == null) {
|
||||
throw GenericTypeValidation.re$propagate(new UnknownWorldException(text));
|
||||
}
|
||||
|
||||
this.manager.getSessions().f(gameTemplate.a());
|
||||
this.manager.getSessions().unregisterTemplate(gameTemplate.getId());
|
||||
}
|
||||
}
|
||||
+12
-12
@@ -20,23 +20,23 @@ import org.bukkit.World;
|
||||
public class AdvancedSlimeWorldProvider implements WorldProvider {
|
||||
private final AdvancedSlimeTemplateLoader advancedSlimeTemplateLoader;
|
||||
private final AbstractGameManager manager;
|
||||
private final AdvancedSlimePaperAPI c = AdvancedSlimePaperAPI.instance();
|
||||
private final AdvancedSlimePaperAPI slimeApi = AdvancedSlimePaperAPI.instance();
|
||||
|
||||
public AdvancedSlimeWorldProvider(AbstractGameManager manager2) {
|
||||
this.manager = manager2;
|
||||
this.advancedSlimeTemplateLoader = new AdvancedSlimeTemplateLoader(manager2);
|
||||
}
|
||||
|
||||
public <M extends BaseGameMap> World a(GameTemplate<M> gameTemplate, String text) {
|
||||
if (gameTemplate.c() == null) {
|
||||
public <M extends BaseGameMap> World createWorld(GameTemplate<M> gameTemplate, String text) {
|
||||
if (gameTemplate.getWorldData() == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
SlimeWorld slimeWorld = re$readWorld(this.c, this.advancedSlimeTemplateLoader, gameTemplate.a(), true, new SlimePropertyMap());
|
||||
return this.c.loadWorld(slimeWorld.clone(text), true).getBukkitWorld();
|
||||
SlimeWorld slimeWorld = re$readWorld(this.slimeApi, this.advancedSlimeTemplateLoader, gameTemplate.getId(), true, new SlimePropertyMap());
|
||||
return this.slimeApi.loadWorld(slimeWorld.clone(text), true).getBukkitWorld();
|
||||
} catch (IOException | SlimeException ex) {
|
||||
this.manager.getLogger().sendWarn("Failed assigning template: " + gameTemplate.a());
|
||||
this.manager.getLogger().sendWarn("Failed assigning template: " + gameTemplate.getId());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -51,7 +51,7 @@ public class AdvancedSlimeWorldProvider implements WorldProvider {
|
||||
return advancedSlimePaperAPI.readWorld(slimeLoader, text, flag, slimePropertyMap);
|
||||
}
|
||||
|
||||
public void a(GameTemplate<?> gameTemplate) {
|
||||
public void saveTemplate(GameTemplate<?> gameTemplate) {
|
||||
World world = gameTemplate.getMap().getLobby().getWorld();
|
||||
if (world != null) {
|
||||
CompletableFuture.runAsync(() -> {
|
||||
@@ -62,18 +62,18 @@ public class AdvancedSlimeWorldProvider implements WorldProvider {
|
||||
File file2 = new File(Bukkit.getWorldContainer(), world.getName());
|
||||
File file3 = new File(file2, "region");
|
||||
if (file3.exists() && file3.isDirectory()) {
|
||||
Files.a(file3, new File(file, "region"));
|
||||
Files.copyDirectory(file3, new File(file, "region"));
|
||||
} else {
|
||||
Path path = Path.of("dimensions", "minecraft", "overworld", "region");
|
||||
Files.a(new File(file2, path.toString()), new File(file, "region"));
|
||||
Files.copyDirectory(new File(file2, path.toString()), new File(file, "region"));
|
||||
}
|
||||
|
||||
this.c.saveWorld(this.c.readVanillaWorld(file, gameTemplate.a(), this.advancedSlimeTemplateLoader));
|
||||
this.slimeApi.saveWorld(this.slimeApi.readVanillaWorld(file, gameTemplate.getId(), this.advancedSlimeTemplateLoader));
|
||||
} catch (Exception ex) {
|
||||
this.manager.getSessions().f(gameTemplate.a());
|
||||
this.manager.getSessions().unregisterTemplate(gameTemplate.getId());
|
||||
this.manager.getLogger().sendWarn("Failed saving the template: " + ex.getMessage(), ex);
|
||||
} finally {
|
||||
Files.a(file);
|
||||
Files.deleteDirectory(file);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -345,7 +345,7 @@ public class LatestVersionAdapter implements VersionAdapter {
|
||||
@Override
|
||||
public void registerVariantGameIntegrations(Object integrationRegistry, Object gameManager) {
|
||||
if (integrationRegistry instanceof IntegrationManager manager && gameManager instanceof AbstractGameManager gm) {
|
||||
manager.a(new AdvancedSlimePaperIntegration(gm));
|
||||
manager.register(new AdvancedSlimePaperIntegration(gm));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user