Addedd "built-in" resource pack with b1.7.3 variants of certain textures.
|
@ -23,7 +23,7 @@ public class AetherConfig {
|
|||
|
||||
private static int travel_dimension;
|
||||
|
||||
private static boolean menu_enabled, menu_button;
|
||||
private static boolean menu_enabled, menu_button, install_resourcepack;
|
||||
|
||||
public static void init(File location) {
|
||||
File newFile = new File(location + "/aether" + "/AetherI.cfg");
|
||||
|
@ -58,6 +58,8 @@ public class AetherConfig {
|
|||
menu_enabled = config.get("Misc", "Enables the Aether Menu", false).getBoolean(false);
|
||||
menu_button = config.get("Misc", "Enables the Aether Menu toggle button", true).getBoolean(true);
|
||||
|
||||
install_resourcepack = config.get("Misc", "Determines whether the Aether b1.7.3 resource pack should be generated.", true).getBoolean(true);
|
||||
|
||||
config.save();
|
||||
}
|
||||
|
||||
|
@ -115,4 +117,9 @@ public class AetherConfig {
|
|||
{
|
||||
return AetherConfig.menu_button;
|
||||
}
|
||||
|
||||
public static boolean installResourcepack()
|
||||
{
|
||||
return AetherConfig.install_resourcepack;
|
||||
}
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
package com.legacy.aether.client;
|
||||
|
||||
import com.legacy.aether.AetherConfig;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.EntityRenderer;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -18,12 +19,50 @@ import com.legacy.aether.compatibility.client.AetherClientCompatibility;
|
|||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
public class ClientProxy extends CommonProxy {
|
||||
|
||||
public static final IIcon[] ACCESSORY_ICONS = new IIcon[8];
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
try
|
||||
{
|
||||
File resourcePacks = Minecraft.getMinecraft().getResourcePackRepository().getDirResourcepacks().getCanonicalFile();
|
||||
|
||||
File buckets = new File(resourcePacks + "\\Aether b1.7.3 Textures\\assets\\aether_legacy\\textures\\items\\misc\\buckets");
|
||||
File weapons = new File(resourcePacks + "\\Aether b1.7.3 Textures\\assets\\aether_legacy\\textures\\items\\weapons");
|
||||
|
||||
File[] directories = new File[] {buckets, weapons};
|
||||
|
||||
if (AetherConfig.installResourcepack())
|
||||
{
|
||||
for (File file : directories)
|
||||
{
|
||||
if (!file.exists())
|
||||
{
|
||||
file.mkdirs();
|
||||
}
|
||||
}
|
||||
|
||||
generateFile("data/Aether_b1.7.3/pack.mcmeta", "pack.mcmeta", resourcePacks.getAbsolutePath() + "/Aether b1.7.3 Textures");
|
||||
generateFile("data/Aether_b1.7.3/pack.png", "pack.png", resourcePacks.getAbsolutePath() + "/Aether b1.7.3 Textures");
|
||||
generateFile("data/Aether_b1.7.3/skyroot_remedy_bucket.png", "skyroot_remedy_bucket.png", buckets.getAbsolutePath());
|
||||
generateFile("data/Aether_b1.7.3/weapons/bow_pulling_0.png", "bow_pulling_0.png", weapons.getAbsolutePath());
|
||||
generateFile("data/Aether_b1.7.3/weapons/bow_pulling_1.png", "bow_pulling_1.png", weapons.getAbsolutePath());
|
||||
generateFile("data/Aether_b1.7.3/weapons/bow_pulling_2.png", "bow_pulling_2.png", weapons.getAbsolutePath());
|
||||
generateFile("data/Aether_b1.7.3/weapons/flaming_sword.png", "flaming_sword.png", weapons.getAbsolutePath());
|
||||
generateFile("data/Aether_b1.7.3/weapons/holy_sword.png", "holy_sword.png", weapons.getAbsolutePath());
|
||||
generateFile("data/Aether_b1.7.3/weapons/lightning_sword.png", "lightning_sword.png", weapons.getAbsolutePath());
|
||||
generateFile("data/Aether_b1.7.3/weapons/phoenix_bow.png", "phoenix_bow.png", weapons.getAbsolutePath());
|
||||
}
|
||||
}
|
||||
catch (IOException ignore) { }
|
||||
|
||||
berryBushRenderID = RenderingRegistry.getNextAvailableRenderId();
|
||||
treasureChestRenderID = RenderingRegistry.getNextAvailableRenderId();
|
||||
aetherFlowerRenderID = RenderingRegistry.getNextAvailableRenderId();
|
||||
|
@ -43,6 +82,32 @@ public class ClientProxy extends CommonProxy {
|
|||
AetherClientCompatibility.initialization();
|
||||
}
|
||||
|
||||
public void generateFile(String input, String name, String path)
|
||||
{
|
||||
try {
|
||||
File file = new File(path + "/" + name);
|
||||
|
||||
if (!file.exists())
|
||||
{
|
||||
InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream(input);
|
||||
FileOutputStream outputStream = new FileOutputStream(file);
|
||||
|
||||
if (inputStream != null)
|
||||
{
|
||||
int i;
|
||||
while ((i = inputStream.read()) != -1)
|
||||
{
|
||||
outputStream.write(i);
|
||||
}
|
||||
|
||||
inputStream.close();
|
||||
outputStream.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (IOException ignore) { }
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendMessage(EntityPlayer player, String text) {
|
||||
if (this.getPlayer() == player)
|
||||
|
|
6
src/main/resources/data/Aether_b1.7.3/pack.mcmeta
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"pack": {
|
||||
"pack_format": 1,
|
||||
"description": "Aether textures from the b1.7.3 version"
|
||||
}
|
||||
}
|
BIN
src/main/resources/data/Aether_b1.7.3/pack.png
Normal file
After Width: | Height: | Size: 600 B |
BIN
src/main/resources/data/Aether_b1.7.3/skyroot_remedy_bucket.png
Normal file
After Width: | Height: | Size: 484 B |
BIN
src/main/resources/data/Aether_b1.7.3/weapons/bow_pulling_0.png
Normal file
After Width: | Height: | Size: 443 B |
BIN
src/main/resources/data/Aether_b1.7.3/weapons/bow_pulling_1.png
Normal file
After Width: | Height: | Size: 489 B |
BIN
src/main/resources/data/Aether_b1.7.3/weapons/bow_pulling_2.png
Normal file
After Width: | Height: | Size: 445 B |
BIN
src/main/resources/data/Aether_b1.7.3/weapons/flaming_sword.png
Normal file
After Width: | Height: | Size: 355 B |
BIN
src/main/resources/data/Aether_b1.7.3/weapons/holy_sword.png
Normal file
After Width: | Height: | Size: 339 B |
After Width: | Height: | Size: 339 B |
BIN
src/main/resources/data/Aether_b1.7.3/weapons/phoenix_bow.png
Normal file
After Width: | Height: | Size: 385 B |