Remove apache deps + fix MP gui (again)
This commit is contained in:
parent
c0a1dc5639
commit
5bb9a396f1
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -2,16 +2,15 @@ package net.minecraft.src;
|
||||||
|
|
||||||
import com.google.gson.JsonObject;
|
import com.google.gson.JsonObject;
|
||||||
import com.google.gson.JsonParser;
|
import com.google.gson.JsonParser;
|
||||||
import java.awt.image.BufferedImage;
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import javax.imageio.ImageIO;
|
|
||||||
|
|
||||||
|
import net.lax1dude.eaglercraft.EaglerImage;
|
||||||
import net.lax1dude.eaglercraft.TextureLocation;
|
import net.lax1dude.eaglercraft.TextureLocation;
|
||||||
import org.apache.commons.io.IOUtils;
|
|
||||||
|
|
||||||
public abstract class AbstractResourcePack implements ResourcePack
|
public abstract class AbstractResourcePack implements ResourcePack
|
||||||
{
|
{
|
||||||
|
@ -68,15 +67,14 @@ public abstract class AbstractResourcePack implements ResourcePack
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
IOUtils.closeQuietly(var4);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return par0MetadataSerializer.parseMetadataSection(par2Str, var3);
|
return par0MetadataSerializer.parseMetadataSection(par2Str, var3);
|
||||||
}
|
}
|
||||||
|
|
||||||
public BufferedImage getPackImage() throws IOException
|
public EaglerImage getPackImage() throws IOException
|
||||||
{
|
{
|
||||||
return ImageIO.read(this.getInputStreamByName("pack.png"));
|
return null; //new EaglerImage("pack.png"); // FIX THIS SHIT
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getPackName()
|
public String getPackName()
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import org.apache.commons.lang3.Validate;
|
|
||||||
|
|
||||||
public class AttributeModifier
|
public class AttributeModifier
|
||||||
{
|
{
|
||||||
|
@ -27,10 +26,27 @@ public class AttributeModifier
|
||||||
this.name = par2Str;
|
this.name = par2Str;
|
||||||
this.amount = par3;
|
this.amount = par3;
|
||||||
this.operation = par5;
|
this.operation = par5;
|
||||||
Validate.notEmpty(par2Str, "Modifier name cannot be empty", new Object[0]);
|
notEmpty(par2Str);
|
||||||
Validate.inclusiveBetween(Integer.valueOf(0), Integer.valueOf(2), Integer.valueOf(par5), "Invalid operation", new Object[0]);
|
inclusiveBetween(0, 2, par5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void notEmpty(String par2Str){
|
||||||
|
if (par2Str == null){
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
else if (par2Str.equals("")){
|
||||||
|
throw new IllegalArgumentException("Modifier name cannot be empty");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void inclusiveBetween(int start, int end, int par5){
|
||||||
|
if(par5 < start && par5 > end){
|
||||||
|
throw new IllegalArgumentException("Invalid operation");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public UUID getID()
|
public UUID getID()
|
||||||
{
|
{
|
||||||
return this.id;
|
return this.id;
|
||||||
|
|
|
@ -242,7 +242,7 @@ public class ContainerRepair extends Container
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (org.apache.commons.lang3.StringUtils.isBlank(this.repairedItemName))
|
if (this.repairedItemName == null || this.repairedItemName.equals("") || this.repairedItemName.equals(" "))
|
||||||
{
|
{
|
||||||
if (var1.hasDisplayName())
|
if (var1.hasDisplayName())
|
||||||
{
|
{
|
||||||
|
@ -462,7 +462,7 @@ public class ContainerRepair extends Container
|
||||||
{
|
{
|
||||||
ItemStack var2 = this.getSlot(2).getStack();
|
ItemStack var2 = this.getSlot(2).getStack();
|
||||||
|
|
||||||
if (org.apache.commons.lang3.StringUtils.isBlank(par1Str))
|
if (par1Str == null || par1Str == "" || par1Str == " ")
|
||||||
{
|
{
|
||||||
var2.func_135074_t();
|
var2.func_135074_t();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
|
import net.lax1dude.eaglercraft.EaglerImage;
|
||||||
|
import net.lax1dude.eaglercraft.EaglerInputStream;
|
||||||
import net.lax1dude.eaglercraft.TextureLocation;
|
import net.lax1dude.eaglercraft.TextureLocation;
|
||||||
|
|
||||||
import java.awt.image.BufferedImage;
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
import java.io.FileNotFoundException;
|
import java.io.FileNotFoundException;
|
||||||
|
@ -90,9 +91,10 @@ public class DefaultResourcePack implements ResourcePack
|
||||||
return AbstractResourcePack.readMetadata(par1MetadataSerializer, DefaultResourcePack.class.getResourceAsStream("/" + (new TextureLocation("pack.mcmeta"))), par2Str);
|
return AbstractResourcePack.readMetadata(par1MetadataSerializer, DefaultResourcePack.class.getResourceAsStream("/" + (new TextureLocation("pack.mcmeta"))), par2Str);
|
||||||
}
|
}
|
||||||
|
|
||||||
public BufferedImage getPackImage() throws IOException
|
public EaglerImage getPackImage() throws IOException
|
||||||
{
|
{
|
||||||
return ImageIO.read(DefaultResourcePack.class.getResourceAsStream("/" + (new TextureLocation("pack.png"))));
|
//return ImageIO.read(DefaultResourcePack.class.getResourceAsStream("/" + (new TextureLocation("pack.png"))));
|
||||||
|
return null; // FIX THIS SHIT
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getPackName()
|
public String getPackName()
|
||||||
|
|
|
@ -127,7 +127,7 @@ public abstract class EntityAITarget extends EntityAIBase
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (this.taskOwner instanceof EntityOwnable && org.apache.commons.lang3.StringUtils.isNotEmpty(((EntityOwnable)this.taskOwner).getOwnerName()))
|
if (this.taskOwner instanceof EntityOwnable && ((EntityOwnable)this.taskOwner).getOwnerName() != null)
|
||||||
{
|
{
|
||||||
if (par1EntityLivingBase instanceof EntityOwnable && ((EntityOwnable)this.taskOwner).getOwnerName().equals(((EntityOwnable)par1EntityLivingBase).getOwnerName()))
|
if (par1EntityLivingBase instanceof EntityOwnable && ((EntityOwnable)this.taskOwner).getOwnerName().equals(((EntityOwnable)par1EntityLivingBase).getOwnerName()))
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,7 +7,6 @@ import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import org.apache.commons.io.filefilter.DirectoryFileFilter;
|
|
||||||
|
|
||||||
public class FolderResourcePack extends AbstractResourcePack
|
public class FolderResourcePack extends AbstractResourcePack
|
||||||
{
|
{
|
||||||
|
@ -33,7 +32,7 @@ public class FolderResourcePack extends AbstractResourcePack
|
||||||
|
|
||||||
if (var2.isDirectory())
|
if (var2.isDirectory())
|
||||||
{
|
{
|
||||||
File[] var3 = var2.listFiles((java.io.FileFilter)DirectoryFileFilter.DIRECTORY);
|
File[] var3 = var2.listFiles();
|
||||||
int var4 = var3.length;
|
int var4 = var3.length;
|
||||||
|
|
||||||
for (int var5 = 0; var5 < var4; ++var5)
|
for (int var5 = 0; var5 < var4; ++var5)
|
||||||
|
|
|
@ -321,8 +321,8 @@ public abstract class GuiSlot {
|
||||||
|
|
||||||
if (var20 <= this.bottom && var20 + var13 >= this.top) {
|
if (var20 <= this.bottom && var20 + var13 >= this.top) {
|
||||||
if (this.showSelectionBox && this.isSelected(var11)) {
|
if (this.showSelectionBox && this.isSelected(var11)) {
|
||||||
var14 = this.width / 2 - elementWidth;
|
var14 = this.width / 2 - (elementWidth + 28);
|
||||||
int var15 = this.width / 2 + elementWidth;
|
int var15 = this.width / 2 + (elementWidth + 14);
|
||||||
EaglerAdapter.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
EaglerAdapter.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
EaglerAdapter.glDisable(EaglerAdapter.GL_TEXTURE_2D);
|
EaglerAdapter.glDisable(EaglerAdapter.GL_TEXTURE_2D);
|
||||||
var18.startDrawingQuads();
|
var18.startDrawingQuads();
|
||||||
|
|
|
@ -8,7 +8,6 @@ import net.lax1dude.eaglercraft.EaglercraftRandom;
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.TextureLocation;
|
import net.lax1dude.eaglercraft.TextureLocation;
|
||||||
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
||||||
import org.apache.commons.io.Charsets;
|
|
||||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||||
|
|
||||||
public class GuiWinGame extends GuiScreen
|
public class GuiWinGame extends GuiScreen
|
||||||
|
@ -80,7 +79,7 @@ public class GuiWinGame extends GuiScreen
|
||||||
String var1 = "";
|
String var1 = "";
|
||||||
String var2 = "" + EnumChatFormatting.WHITE + EnumChatFormatting.OBFUSCATED + EnumChatFormatting.GREEN + EnumChatFormatting.AQUA;
|
String var2 = "" + EnumChatFormatting.WHITE + EnumChatFormatting.OBFUSCATED + EnumChatFormatting.GREEN + EnumChatFormatting.AQUA;
|
||||||
short var3 = 274;
|
short var3 = 274;
|
||||||
BufferedReader var4 = new BufferedReader(new InputStreamReader(this.mc.getResourceManager().getResource(new TextureLocation("texts/end.txt")).getInputStream(), Charsets.UTF_8));
|
BufferedReader var4 = new BufferedReader(new InputStreamReader(this.mc.getResourceManager().getResource(new TextureLocation("texts/end.txt")).getInputStream()));
|
||||||
EaglercraftRandom var5 = new EaglercraftRandom(8124371L);
|
EaglercraftRandom var5 = new EaglercraftRandom(8124371L);
|
||||||
int var6;
|
int var6;
|
||||||
|
|
||||||
|
@ -105,7 +104,7 @@ public class GuiWinGame extends GuiScreen
|
||||||
this.lines.add("");
|
this.lines.add("");
|
||||||
}
|
}
|
||||||
|
|
||||||
var4 = new BufferedReader(new InputStreamReader(this.mc.getResourceManager().getResource(new TextureLocation("texts/credits.txt")).getInputStream(), Charsets.UTF_8));
|
var4 = new BufferedReader(new InputStreamReader(this.mc.getResourceManager().getResource(new TextureLocation("texts/credits.txt")).getInputStream()));
|
||||||
|
|
||||||
while ((var1 = var4.readLine()) != null)
|
while ((var1 = var4.readLine()) != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -607,7 +607,6 @@ public class NetServerHandler extends NetHandler
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var2 = org.apache.commons.lang3.StringUtils.normalizeSpace(var2);
|
|
||||||
|
|
||||||
for (int var3 = 0; var3 < var2.length(); ++var3)
|
for (int var3 = 0; var3 < var2.length(); ++var3)
|
||||||
{
|
{
|
||||||
|
|
|
@ -32,7 +32,7 @@ public class Packet203AutoComplete extends Packet
|
||||||
*/
|
*/
|
||||||
public void writePacketData(DataOutput par1DataOutput) throws IOException
|
public void writePacketData(DataOutput par1DataOutput) throws IOException
|
||||||
{
|
{
|
||||||
writeString(org.apache.commons.lang3.StringUtils.substring(this.text, 0, 32767), par1DataOutput);
|
writeString(this.text, par1DataOutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
|
import net.lax1dude.eaglercraft.EaglerImage;
|
||||||
import net.lax1dude.eaglercraft.TextureLocation;
|
import net.lax1dude.eaglercraft.TextureLocation;
|
||||||
|
|
||||||
import java.awt.image.BufferedImage;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
@ -17,7 +17,7 @@ public interface ResourcePack
|
||||||
|
|
||||||
MetadataSection getPackMetadata(MetadataSerializer var1, String var2) throws IOException;
|
MetadataSection getPackMetadata(MetadataSerializer var1, String var2) throws IOException;
|
||||||
|
|
||||||
BufferedImage getPackImage() throws IOException;
|
EaglerImage getPackImage() throws IOException;
|
||||||
|
|
||||||
String getPackName();
|
String getPackName();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +1,16 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.awt.image.BufferedImage;
|
import net.lax1dude.eaglercraft.EaglerImage;
|
||||||
import java.io.Closeable;
|
import net.lax1dude.eaglercraft.TextureLocation;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import org.apache.commons.io.IOUtils;
|
|
||||||
|
|
||||||
public class ResourcePackRepositoryEntry
|
public class ResourcePackRepositoryEntry
|
||||||
{
|
{
|
||||||
private final File resourcePackFile;
|
private final File resourcePackFile;
|
||||||
private ResourcePack reResourcePack;
|
private ResourcePack reResourcePack;
|
||||||
private PackMetadataSection rePackMetadataSection;
|
private PackMetadataSection rePackMetadataSection;
|
||||||
private BufferedImage texturePackIcon;
|
private EaglerImage texturePackIcon;
|
||||||
//private TextureLocation locationTexturePackIcon;
|
|
||||||
|
|
||||||
final ResourcePackRepository reResourcePackRepository;
|
final ResourcePackRepository reResourcePackRepository;
|
||||||
|
|
||||||
|
@ -56,10 +54,7 @@ public class ResourcePackRepositoryEntry
|
||||||
|
|
||||||
public void closeResourcePack()
|
public void closeResourcePack()
|
||||||
{
|
{
|
||||||
if (this.reResourcePack instanceof Closeable)
|
|
||||||
{
|
|
||||||
IOUtils.closeQuietly((Closeable)this.reResourcePack);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ResourcePack getResourcePack()
|
public ResourcePack getResourcePack()
|
||||||
|
|
|
@ -9,7 +9,6 @@ import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.TextureLocation;
|
import net.lax1dude.eaglercraft.TextureLocation;
|
||||||
import org.apache.commons.io.IOUtils;
|
|
||||||
|
|
||||||
public class SimpleResource implements Resource
|
public class SimpleResource implements Resource
|
||||||
{
|
{
|
||||||
|
@ -52,15 +51,13 @@ public class SimpleResource implements Resource
|
||||||
this.mcmetaJsonChecked = true;
|
this.mcmetaJsonChecked = true;
|
||||||
BufferedReader var2 = null;
|
BufferedReader var2 = null;
|
||||||
|
|
||||||
try
|
try {
|
||||||
{
|
|
||||||
var2 = new BufferedReader(new InputStreamReader(this.mcmetaInputStream));
|
var2 = new BufferedReader(new InputStreamReader(this.mcmetaInputStream));
|
||||||
this.mcmetaJson = (new JsonParser()).parse(var2).getAsJsonObject();
|
this.mcmetaJson = (new JsonParser()).parse(var2).getAsJsonObject();
|
||||||
|
} finally {
|
||||||
|
|
||||||
}
|
}
|
||||||
finally
|
|
||||||
{
|
|
||||||
IOUtils.closeQuietly(var2);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MetadataSection var6 = (MetadataSection)this.mapMetadataSections.get(par1Str);
|
MetadataSection var6 = (MetadataSection)this.mapMetadataSections.get(par1Str);
|
||||||
|
|
Loading…
Reference in New Issue