Replaced texture management, added working mip-mapping to terrain.png
This commit is contained in:
parent
45643f056c
commit
516ba930fd
12
.gitignore
vendored
Normal file
12
.gitignore
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
.gradle
|
||||
.settings
|
||||
build
|
||||
bin
|
||||
/eaglercraftbungee/bin
|
||||
/eaglercraftbungee/rundir
|
||||
/epkcompiler/bin
|
||||
/eaglercraftbungee/rundir
|
||||
/lwjgl-rundir/_eagstorage*
|
||||
/lwjgl-rundir/saves
|
||||
/lwjgl-rundir/texturepacks
|
||||
/lwjgl-rundir/options.txt
|
|
@ -26,7 +26,9 @@ in vec4 a_color;
|
|||
in vec4 a_normal;
|
||||
#endif
|
||||
|
||||
#ifdef CC_fog
|
||||
out vec4 v_position;
|
||||
#endif
|
||||
#ifdef CC_a_color
|
||||
out vec4 v_color;
|
||||
#endif
|
||||
|
@ -39,7 +41,9 @@ out vec2 v_texture0;
|
|||
|
||||
void main(){
|
||||
vec4 pos = matrix_m * vec4(a_position, 1.0);
|
||||
#ifdef CC_fog
|
||||
v_position = pos;
|
||||
#endif
|
||||
#ifdef CC_a_color
|
||||
v_color = a_color;
|
||||
#endif
|
||||
|
@ -80,7 +84,9 @@ uniform vec4 colorUniform;
|
|||
uniform float alphaTestF;
|
||||
#endif
|
||||
|
||||
#ifdef CC_fog
|
||||
in vec4 v_position;
|
||||
#endif
|
||||
#ifdef CC_a_color
|
||||
in vec4 v_color;
|
||||
#endif
|
||||
|
|
|
@ -1332,18 +1332,13 @@ public class EaglerAdapterImpl2 {
|
|||
return s;
|
||||
}
|
||||
|
||||
public static final void setListenerPos(float x, float y, float z, float vx, float vy, float vz, float pitch,
|
||||
float yaw) {
|
||||
float var11 = MathHelper.cos(-yaw * 0.017453292F - (float) Math.PI);
|
||||
float var12 = MathHelper.sin(-yaw * 0.017453292F - (float) Math.PI);
|
||||
float var13 = -var12;
|
||||
float var14 = -MathHelper.sin(-pitch * 0.017453292F - (float) Math.PI);
|
||||
float var15 = -var11;
|
||||
float var16 = 0.0F;
|
||||
float var17 = 1.0F;
|
||||
float var18 = 0.0F;
|
||||
public static final void setListenerPos(float x, float y, float z, float vx, float vy, float vz, float pitch, float yaw) {
|
||||
float var2 = MathHelper.cos(-yaw * 0.017453292F);
|
||||
float var3 = MathHelper.sin(-yaw * 0.017453292F);
|
||||
float var4 = -MathHelper.cos(pitch * 0.017453292F);
|
||||
float var5 = MathHelper.sin(pitch * 0.017453292F);
|
||||
ss.setListenerPosition(x, y, z);
|
||||
ss.setListenerOrientation(var13, var14, var15, var16, var17, var18);
|
||||
ss.setListenerOrientation(-var3 * var4, -var5, -var2 * var4, 0.0f, 1.0f, 0.0f);
|
||||
ss.setListenerVelocity(vx, vy, vz);
|
||||
}
|
||||
|
||||
|
|
|
@ -276,21 +276,7 @@ public class EaglerAdapterGL30 extends EaglerAdapterImpl2 {
|
|||
}
|
||||
|
||||
public static final void glCullFace(int p1) {
|
||||
int f = _wGL_BACK;
|
||||
switch (p1) {
|
||||
case GL_BACK:
|
||||
f = _wGL_BACK;
|
||||
break;
|
||||
case GL_FRONT:
|
||||
f = _wGL_FRONT;
|
||||
break;
|
||||
case GL_FRONT_AND_BACK:
|
||||
f = _wGL_FRONT_AND_BACK;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
_wglCullFace(f);
|
||||
_wglCullFace(p1);
|
||||
}
|
||||
|
||||
public static final void glMatrixMode(int p1) {
|
||||
|
@ -318,14 +304,7 @@ public class EaglerAdapterGL30 extends EaglerAdapterImpl2 {
|
|||
}
|
||||
|
||||
public static final void glClear(int p1) {
|
||||
int f = 0;
|
||||
if ((p1 & GL_COLOR_BUFFER_BIT) == GL_COLOR_BUFFER_BIT) {
|
||||
f = f | _wGL_COLOR_BUFFER_BIT;
|
||||
}
|
||||
if ((p1 & GL_DEPTH_BUFFER_BIT) == GL_DEPTH_BUFFER_BIT) {
|
||||
f = f | _wGL_DEPTH_BUFFER_BIT;
|
||||
}
|
||||
_wglClear(f);
|
||||
_wglClear(p1);
|
||||
}
|
||||
|
||||
public static final void glOrtho(float left, float right, float bottom, float top, float zNear, float zFar) {
|
||||
|
@ -406,14 +385,6 @@ public class EaglerAdapterGL30 extends EaglerAdapterImpl2 {
|
|||
|
||||
public static final int glGetError() {
|
||||
int err = _wglGetError();
|
||||
if (err == _wGL_INVALID_ENUM)
|
||||
return GL_INVALID_ENUM;
|
||||
if (err == _wGL_INVALID_OPERATION)
|
||||
return GL_INVALID_OPERATION;
|
||||
if (err == _wGL_INVALID_VALUE)
|
||||
return GL_INVALID_VALUE;
|
||||
if (err == _wGL_OUT_OF_MEMORY)
|
||||
return GL_OUT_OF_MEMORY;
|
||||
if (err == _wGL_CONTEXT_LOST_WEBGL)
|
||||
return GL_CONTEXT_LOST_WEBGL;
|
||||
return err;
|
||||
|
@ -568,70 +539,8 @@ public class EaglerAdapterGL30 extends EaglerAdapterImpl2 {
|
|||
}
|
||||
|
||||
public static final void glBlendFunc(int p1, int p2) {
|
||||
int pp1 = 0;
|
||||
int pp2 = 0;
|
||||
switch (p1) {
|
||||
default:
|
||||
case GL_SRC_ALPHA:
|
||||
pp1 = _wGL_SRC_ALPHA;
|
||||
break;
|
||||
case GL_ONE_MINUS_SRC_ALPHA:
|
||||
pp1 = _wGL_ONE_MINUS_SRC_ALPHA;
|
||||
break;
|
||||
case GL_DST_ALPHA:
|
||||
pp1 = _wGL_DST_ALPHA;
|
||||
break;
|
||||
case GL_DST_COLOR:
|
||||
pp1 = _wGL_DST_COLOR;
|
||||
break;
|
||||
case GL_SRC_COLOR:
|
||||
pp1 = _wGL_SRC_COLOR;
|
||||
break;
|
||||
case GL_ONE_MINUS_SRC_COLOR:
|
||||
pp1 = _wGL_ONE_MINUS_SRC_COLOR;
|
||||
break;
|
||||
case GL_ONE_MINUS_DST_COLOR:
|
||||
pp1 = _wGL_ONE_MINUS_DST_COLOR;
|
||||
break;
|
||||
case GL_ONE:
|
||||
pp1 = _wGL_ONE;
|
||||
break;
|
||||
case GL_ZERO:
|
||||
pp1 = _wGL_ZERO;
|
||||
break;
|
||||
}
|
||||
switch (p2) {
|
||||
default:
|
||||
case GL_SRC_ALPHA:
|
||||
pp2 = _wGL_SRC_ALPHA;
|
||||
break;
|
||||
case GL_ONE_MINUS_SRC_ALPHA:
|
||||
pp2 = _wGL_ONE_MINUS_SRC_ALPHA;
|
||||
break;
|
||||
case GL_DST_ALPHA:
|
||||
pp2 = _wGL_DST_ALPHA;
|
||||
break;
|
||||
case GL_DST_COLOR:
|
||||
pp2 = _wGL_DST_COLOR;
|
||||
break;
|
||||
case GL_SRC_COLOR:
|
||||
pp2 = _wGL_SRC_COLOR;
|
||||
break;
|
||||
case GL_ONE_MINUS_SRC_COLOR:
|
||||
pp2 = _wGL_ONE_MINUS_SRC_COLOR;
|
||||
break;
|
||||
case GL_ONE_MINUS_DST_COLOR:
|
||||
pp1 = _wGL_ONE_MINUS_DST_COLOR;
|
||||
break;
|
||||
case GL_ONE:
|
||||
pp2 = _wGL_ONE;
|
||||
break;
|
||||
case GL_ZERO:
|
||||
pp2 = _wGL_ZERO;
|
||||
break;
|
||||
}
|
||||
fogPremultiply = (p1 == GL_ONE && p2 == GL_ONE_MINUS_SRC_ALPHA);
|
||||
_wglBlendFunc(pp1, pp2);
|
||||
_wglBlendFunc(p1, p2);
|
||||
}
|
||||
|
||||
public static final void glDepthMask(boolean p1) {
|
||||
|
@ -652,64 +561,7 @@ public class EaglerAdapterGL30 extends EaglerAdapterImpl2 {
|
|||
}
|
||||
|
||||
public static final void glTexParameteri(int p1, int p2, int p3) {
|
||||
int pp1 = 0;
|
||||
switch (p1) {
|
||||
default:
|
||||
case GL_TEXTURE_2D:
|
||||
pp1 = _wGL_TEXTURE_2D;
|
||||
break;
|
||||
// case GL_TEXTURE_3D: pp1 = _wGL_TEXTURE_3D; break;
|
||||
}
|
||||
int pp2 = 0;
|
||||
switch (p2) {
|
||||
default:
|
||||
case GL_TEXTURE_MAG_FILTER:
|
||||
pp2 = _wGL_TEXTURE_MAG_FILTER;
|
||||
break;
|
||||
case GL_TEXTURE_MIN_FILTER:
|
||||
pp2 = _wGL_TEXTURE_MIN_FILTER;
|
||||
break;
|
||||
case GL_TEXTURE_WRAP_S:
|
||||
pp2 = _wGL_TEXTURE_WRAP_S;
|
||||
break;
|
||||
case GL_TEXTURE_WRAP_T:
|
||||
pp2 = _wGL_TEXTURE_WRAP_T;
|
||||
break;
|
||||
case GL_TEXTURE_MAX_LEVEL:
|
||||
pp2 = _wGL_TEXTURE_MAX_LEVEL;
|
||||
break;
|
||||
}
|
||||
int pp3 = 0;
|
||||
switch (p3) {
|
||||
default:
|
||||
pp3 = p3;
|
||||
break;
|
||||
case GL_LINEAR:
|
||||
pp3 = _wGL_LINEAR;
|
||||
break;
|
||||
case GL_NEAREST_MIPMAP_LINEAR:
|
||||
pp3 = _wGL_NEAREST_MIPMAP_LINEAR;
|
||||
break;
|
||||
case GL_LINEAR_MIPMAP_LINEAR:
|
||||
pp3 = _wGL_LINEAR_MIPMAP_LINEAR;
|
||||
break;
|
||||
case GL_LINEAR_MIPMAP_NEAREST:
|
||||
pp3 = _wGL_LINEAR_MIPMAP_NEAREST;
|
||||
break;
|
||||
case GL_NEAREST_MIPMAP_NEAREST:
|
||||
pp3 = _wGL_NEAREST_MIPMAP_NEAREST;
|
||||
break;
|
||||
case GL_NEAREST:
|
||||
pp3 = _wGL_NEAREST;
|
||||
break;
|
||||
case GL_REPEAT:
|
||||
pp3 = _wGL_REPEAT;
|
||||
break;
|
||||
case GL_CLAMP:
|
||||
pp3 = _wGL_CLAMP;
|
||||
break;
|
||||
}
|
||||
_wglTexParameteri(pp1, pp2, pp3);
|
||||
_wglTexParameteri(p1, p2, p3);
|
||||
}
|
||||
|
||||
public static final void glTexParameterf(int p1, int p2, float p3) {
|
||||
|
|
|
@ -7,6 +7,7 @@ package net.minecraft.client;
|
|||
import java.io.*;
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
||||
import net.minecraft.src.*;
|
||||
|
||||
|
@ -557,6 +558,8 @@ public class Minecraft implements Runnable {
|
|||
}
|
||||
}
|
||||
|
||||
private static final TextureLocation terrainTexture = new TextureLocation("/terrain.png");
|
||||
|
||||
public void runTick() {
|
||||
ingameGUI.updateTick();
|
||||
entityRenderer.getMouseOver(1.0F);
|
||||
|
@ -572,9 +575,9 @@ public class Minecraft implements Runnable {
|
|||
if (!isWorldLoaded && theWorld != null) {
|
||||
playerController.updateController();
|
||||
}
|
||||
EaglerAdapter.glBindTexture(3553 /* GL_TEXTURE_2D */, renderEngine.getTexture("/terrain.png"));
|
||||
terrainTexture.bindTexture();
|
||||
if (!isWorldLoaded) {
|
||||
renderEngine.func_1067_a();
|
||||
renderEngine.updateTerrainTextures();
|
||||
}
|
||||
if (currentScreen == null && thePlayer != null) {
|
||||
if (thePlayer.health <= 0) {
|
||||
|
|
|
@ -7,10 +7,15 @@ package net.minecraft.src;
|
|||
import java.util.*;
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
||||
|
||||
public class EffectRenderer {
|
||||
|
||||
private static final TextureLocation particlesTexture = new TextureLocation("/particles.png");
|
||||
private static final TextureLocation terrainTexture = new TextureLocation("/terrain.png");
|
||||
private static final TextureLocation itemsTexture = new TextureLocation("/gui/items.png");
|
||||
|
||||
public EffectRenderer(World world, RenderEngine renderengine) {
|
||||
fxLayers = new List[4];
|
||||
rand = new Random();
|
||||
|
@ -56,17 +61,15 @@ public class EffectRenderer {
|
|||
if (fxLayers[i].size() == 0) {
|
||||
continue;
|
||||
}
|
||||
int j = 0;
|
||||
if (i == 0) {
|
||||
j = renderer.getTexture("/particles.png");
|
||||
particlesTexture.bindTexture();
|
||||
}
|
||||
if (i == 1) {
|
||||
j = renderer.getTexture("/terrain.png");
|
||||
terrainTexture.bindTexture();
|
||||
}
|
||||
if (i == 2) {
|
||||
j = renderer.getTexture("/gui/items.png");
|
||||
itemsTexture.bindTexture();
|
||||
}
|
||||
EaglerAdapter.glBindTexture(3553 /* GL_TEXTURE_2D */, j);
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
tessellator.startDrawingQuads();
|
||||
for (int k = 0; k < fxLayers[i].size(); k++) {
|
||||
|
|
|
@ -14,7 +14,7 @@ public class EntityChicken extends EntityAnimals {
|
|||
field_752_b = 0.0F;
|
||||
field_758_c = 0.0F;
|
||||
field_755_h = 1.0F;
|
||||
texture = "/mob/chicken.png";
|
||||
//texture = "/mob/chicken.png";
|
||||
setSize(0.3F, 0.4F);
|
||||
health = 4;
|
||||
timeUntilNextEgg = rand.nextInt(6000) + 6000;
|
||||
|
|
|
@ -8,7 +8,7 @@ public class EntityCow extends EntityAnimals {
|
|||
|
||||
public EntityCow(World world) {
|
||||
super(world);
|
||||
texture = "/mob/cow.png";
|
||||
//texture = "/mob/cow.png";
|
||||
setSize(0.9F, 1.3F);
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ public class EntityCreeper extends EntityMobs {
|
|||
|
||||
public EntityCreeper(World world) {
|
||||
super(world);
|
||||
texture = "/mob/creeper.png";
|
||||
//texture = "/mob/creeper.png";
|
||||
}
|
||||
|
||||
protected void entityInit() {
|
||||
|
|
|
@ -16,7 +16,7 @@ public class EntityGhast extends EntityFlying implements IMobs {
|
|||
aggroCooldown = 0;
|
||||
prevAttackCounter = 0;
|
||||
attackCounter = 0;
|
||||
texture = "/mob/ghast.png";
|
||||
//texture = "/mob/ghast.png";
|
||||
setSize(4F, 4F);
|
||||
isImmuneToFire = true;
|
||||
}
|
||||
|
@ -90,7 +90,6 @@ public class EntityGhast extends EntityFlying implements IMobs {
|
|||
attackCounter--;
|
||||
}
|
||||
}
|
||||
texture = attackCounter <= 10 ? "/mob/ghast.png" : "/mob/ghast_fire.png";
|
||||
}
|
||||
|
||||
private boolean isCourseTraversable(double d, double d1, double d2, double d3) {
|
||||
|
|
|
@ -15,7 +15,7 @@ public abstract class EntityLiving extends Entity {
|
|||
renderYawOffset = 0.0F;
|
||||
prevRenderYawOffset = 0.0F;
|
||||
field_9358_y = true;
|
||||
texture = "/mob/char.png";
|
||||
//texture = "/mob/char.png";
|
||||
field_9355_A = true;
|
||||
field_9353_B = 0.0F;
|
||||
field_9351_C = null;
|
||||
|
@ -53,10 +53,6 @@ public abstract class EntityLiving extends Entity {
|
|||
Vec3D.createVector(entity.posX, entity.posY + (double) entity.getEyeHeight(), entity.posZ)) == null;
|
||||
}
|
||||
|
||||
public String getEntityTexture() {
|
||||
return texture;
|
||||
}
|
||||
|
||||
public boolean canBeCollidedWith() {
|
||||
return !isDead;
|
||||
}
|
||||
|
@ -735,7 +731,7 @@ public abstract class EntityLiving extends Entity {
|
|||
protected float field_9360_w;
|
||||
protected float field_9359_x;
|
||||
protected boolean field_9358_y;
|
||||
protected String texture;
|
||||
//protected String texture;
|
||||
protected boolean field_9355_A;
|
||||
protected float field_9353_B;
|
||||
protected String field_9351_C;
|
||||
|
|
|
@ -8,7 +8,7 @@ public class EntityPig extends EntityAnimals {
|
|||
|
||||
public EntityPig(World world) {
|
||||
super(world);
|
||||
texture = "/mob/pig.png";
|
||||
//texture = "/mob/pig.png";
|
||||
setSize(0.9F, 0.9F);
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ public class EntityPigZombie extends EntityZombie {
|
|||
super(world);
|
||||
angerLevel = 0;
|
||||
randomSoundDelay = 0;
|
||||
texture = "/mob/pigzombie.png";
|
||||
//texture = "/mob/pigzombie.png";
|
||||
moveSpeed = 0.5F;
|
||||
attackStrength = 5;
|
||||
isImmuneToFire = true;
|
||||
|
|
|
@ -28,7 +28,7 @@ public abstract class EntityPlayer extends EntityLiving {
|
|||
field_9351_C = "humanoid";
|
||||
field_9353_B = 180F;
|
||||
fireResistance = 20;
|
||||
texture = "/mob/char.png";
|
||||
//texture = "/mob/char.png";
|
||||
}
|
||||
|
||||
protected void entityInit() {
|
||||
|
|
|
@ -9,10 +9,13 @@ import java.util.List;
|
|||
import java.util.Random;
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
public class EntityRenderer {
|
||||
|
||||
private static final TextureLocation terrainTexture = new TextureLocation("/terrain.png");
|
||||
|
||||
public EntityRenderer(Minecraft minecraft) {
|
||||
farPlaneDistance = 0.0F;
|
||||
field_1385_k = null;
|
||||
|
@ -421,7 +424,7 @@ public class EntityRenderer {
|
|||
mc.renderGlobal.updateRenderers(entityliving, false);
|
||||
func_4140_a(0);
|
||||
EaglerAdapter.glEnable(2912 /* GL_FOG */);
|
||||
EaglerAdapter.glBindTexture(3553 /* GL_TEXTURE_2D */, mc.renderEngine.getTexture("/terrain.png"));
|
||||
terrainTexture.bindTexture();
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
renderglobal.func_943_a(entityliving, 0, f);
|
||||
EaglerAdapter.glShadeModel(7424 /* GL_FLAT */);
|
||||
|
@ -445,7 +448,7 @@ public class EntityRenderer {
|
|||
func_4140_a(0);
|
||||
EaglerAdapter.glEnable(3042 /* GL_BLEND */);
|
||||
EaglerAdapter.glDisable(2884 /* GL_CULL_FACE */);
|
||||
EaglerAdapter.glBindTexture(3553 /* GL_TEXTURE_2D */, mc.renderEngine.getTexture("/terrain.png"));
|
||||
terrainTexture.bindTexture();
|
||||
if (mc.gameSettings.fancyGraphics) {
|
||||
EaglerAdapter.glColorMask(false, false, false, false);
|
||||
int l = renderglobal.func_943_a(entityliving, 1, f);
|
||||
|
@ -458,7 +461,7 @@ public class EntityRenderer {
|
|||
}
|
||||
}
|
||||
if (l > 0) {
|
||||
renderglobal.func_944_a(1, f);
|
||||
renderglobal.func_943_a(entityliving, 1, f);
|
||||
}
|
||||
} else {
|
||||
renderglobal.func_943_a(entityliving, 1, f);
|
||||
|
|
|
@ -10,7 +10,7 @@ public class EntitySheep extends EntityAnimals {
|
|||
|
||||
public EntitySheep(World world) {
|
||||
super(world);
|
||||
texture = "/mob/sheep.png";
|
||||
//texture = "/mob/sheep.png";
|
||||
setSize(0.9F, 1.3F);
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ public class EntitySkeleton extends EntityMobs {
|
|||
|
||||
public EntitySkeleton(World world) {
|
||||
super(world);
|
||||
texture = "/mob/skeleton.png";
|
||||
//texture = "/mob/skeleton.png";
|
||||
}
|
||||
|
||||
protected String getLivingSound() {
|
||||
|
|
|
@ -12,7 +12,7 @@ public class EntitySlime extends EntityLiving implements IMobs {
|
|||
super(world);
|
||||
field_769_d = 0;
|
||||
slimeSize = 1;
|
||||
texture = "/mob/slime.png";
|
||||
//texture = "/mob/slime.png";
|
||||
slimeSize = 1 << rand.nextInt(3);
|
||||
yOffset = 0.0F;
|
||||
field_769_d = rand.nextInt(20) + 10;
|
||||
|
|
|
@ -10,7 +10,7 @@ public class EntitySpider extends EntityMobs {
|
|||
|
||||
public EntitySpider(World world) {
|
||||
super(world);
|
||||
texture = "/mob/spider.png";
|
||||
//texture = "/mob/spider.png";
|
||||
setSize(1.4F, 0.9F);
|
||||
moveSpeed = 0.8F;
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ public class EntitySquid extends EntityWaterMob {
|
|||
field_21078_n = 0.0F;
|
||||
field_21077_o = 0.0F;
|
||||
field_21076_p = 0.0F;
|
||||
texture = "/mob/squid.png";
|
||||
//texture = "/mob/squid.png";
|
||||
setSize(0.95F, 0.95F);
|
||||
field_21080_l = (1.0F / (rand.nextFloat() + 1.0F)) * 0.2F;
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ public class EntityZombie extends EntityMobs {
|
|||
|
||||
public EntityZombie(World world) {
|
||||
super(world);
|
||||
texture = "/mob/zombie.png";
|
||||
//texture = "/mob/zombie.png";
|
||||
moveSpeed = 0.5F;
|
||||
attackStrength = 5;
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ public class EntityZombieSimple extends EntityMobs {
|
|||
|
||||
public EntityZombieSimple(World world) {
|
||||
super(world);
|
||||
texture = "/mob/zombie.png";
|
||||
//texture = "/mob/zombie.png";
|
||||
moveSpeed = 0.5F;
|
||||
attackStrength = 50;
|
||||
health *= 10;
|
||||
|
|
|
@ -28,7 +28,7 @@ public class GameSettings {
|
|||
keyBindBack = new KeyBinding("key.back", 31);
|
||||
keyBindRight = new KeyBinding("key.right", 32);
|
||||
keyBindJump = new KeyBinding("key.jump", 57);
|
||||
keyBindInventory = new KeyBinding("key.inventory", 13);
|
||||
keyBindInventory = new KeyBinding("key.inventory", 8);
|
||||
keyBindDrop = new KeyBinding("key.drop", 16);
|
||||
keyBindChat = new KeyBinding("key.chat", 20);
|
||||
keyBindToggleFog = new KeyBinding("key.fog", 33);
|
||||
|
|
|
@ -2,6 +2,7 @@ package net.minecraft.src;
|
|||
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
|
||||
// Jad home page: http://www.kpdus.com/jad.html
|
||||
// Decompiler options: packimports(3) braces deadcode
|
||||
|
@ -10,6 +11,8 @@ import net.minecraft.client.Minecraft;
|
|||
|
||||
public class GuiButton extends Gui {
|
||||
|
||||
private static final TextureLocation buttonsTexture = new TextureLocation("/gui/gui.png");
|
||||
|
||||
public GuiButton(int i, int j, int k, String s) {
|
||||
this(i, j, k, 200, 20, s);
|
||||
}
|
||||
|
@ -42,7 +45,7 @@ public class GuiButton extends Gui {
|
|||
return;
|
||||
}
|
||||
FontRenderer fontrenderer = minecraft.fontRenderer;
|
||||
EaglerAdapter.glBindTexture(3553 /* GL_TEXTURE_2D */, minecraft.renderEngine.getTexture("/gui/gui.png"));
|
||||
buttonsTexture.bindTexture();
|
||||
EaglerAdapter.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
boolean flag = i >= xPosition && j >= yPosition && i < xPosition + width && j < yPosition + height;
|
||||
int k = getHoverState(flag);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package net.minecraft.src;
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
|
||||
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
|
||||
// Jad home page: http://www.kpdus.com/jad.html
|
||||
|
@ -8,6 +9,8 @@ import net.lax1dude.eaglercraft.EaglerAdapter;
|
|||
|
||||
public class GuiChest extends GuiContainer {
|
||||
|
||||
private static final TextureLocation containerTexture = new TextureLocation("/gui/container.png");
|
||||
|
||||
public GuiChest(IInventory iinventory, IInventory iinventory1) {
|
||||
super(new CraftingInventoryChestCB(iinventory, iinventory1));
|
||||
inventoryRows = 0;
|
||||
|
@ -26,9 +29,8 @@ public class GuiChest extends GuiContainer {
|
|||
}
|
||||
|
||||
protected void drawGuiContainerBackgroundLayer(float f) {
|
||||
int i = mc.renderEngine.getTexture("/gui/container.png");
|
||||
EaglerAdapter.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
mc.renderEngine.bindTexture(i);
|
||||
containerTexture.bindTexture();
|
||||
int j = (width - xSize) / 2;
|
||||
int k = (height - ySize) / 2;
|
||||
drawTexturedModalRect(j, k, 0, 0, xSize, inventoryRows * 18 + 17);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package net.minecraft.src;
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
|
||||
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
|
||||
// Jad home page: http://www.kpdus.com/jad.html
|
||||
|
@ -9,6 +10,8 @@ import net.lax1dude.eaglercraft.EaglerAdapter;
|
|||
|
||||
public abstract class GuiContainer extends GuiScreen {
|
||||
|
||||
private static final TextureLocation itemTexture = new TextureLocation("/gui/items.png");
|
||||
|
||||
public GuiContainer(CraftingInventoryCB craftinginventorycb) {
|
||||
xSize = 176;
|
||||
ySize = 166;
|
||||
|
@ -92,7 +95,7 @@ public abstract class GuiContainer extends GuiScreen {
|
|||
int k = slot.func_775_c();
|
||||
if (k >= 0) {
|
||||
EaglerAdapter.glDisable(2896 /* GL_LIGHTING */);
|
||||
mc.renderEngine.bindTexture(mc.renderEngine.getTexture("/gui/items.png"));
|
||||
itemTexture.bindTexture();
|
||||
drawTexturedModalRect(i, j, (k % 16) * 16, (k / 16) * 16, 16, 16);
|
||||
EaglerAdapter.glEnable(2896 /* GL_LIGHTING */);
|
||||
return;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package net.minecraft.src;
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
|
||||
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
|
||||
// Jad home page: http://www.kpdus.com/jad.html
|
||||
|
@ -8,6 +9,8 @@ import net.lax1dude.eaglercraft.EaglerAdapter;
|
|||
|
||||
public class GuiCrafting extends GuiContainer {
|
||||
|
||||
private static final TextureLocation containerTexture = new TextureLocation("/gui/crafting.png");
|
||||
|
||||
public GuiCrafting(InventoryPlayer inventoryplayer, World world, int i, int j, int k) {
|
||||
super(new CraftingInventoryWorkbenchCB(inventoryplayer, world, i, j, k));
|
||||
}
|
||||
|
@ -23,9 +26,8 @@ public class GuiCrafting extends GuiContainer {
|
|||
}
|
||||
|
||||
protected void drawGuiContainerBackgroundLayer(float f) {
|
||||
int i = mc.renderEngine.getTexture("/gui/crafting.png");
|
||||
EaglerAdapter.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
mc.renderEngine.bindTexture(i);
|
||||
containerTexture.bindTexture();
|
||||
int j = (width - xSize) / 2;
|
||||
int k = (height - ySize) / 2;
|
||||
drawTexturedModalRect(j, k, 0, 0, xSize, ySize);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package net.minecraft.src;
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
|
||||
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
|
||||
// Jad home page: http://www.kpdus.com/jad.html
|
||||
|
@ -9,6 +10,8 @@ import net.lax1dude.eaglercraft.EaglerAdapter;
|
|||
|
||||
public class GuiDispenser extends GuiContainer {
|
||||
|
||||
private static final TextureLocation containerTexture = new TextureLocation("/gui/trap.png");
|
||||
|
||||
public GuiDispenser(InventoryPlayer inventoryplayer, TileEntityDispenser tileentitydispenser) {
|
||||
super(new CraftingInventoryDispenserCB(inventoryplayer, tileentitydispenser));
|
||||
}
|
||||
|
@ -19,9 +22,8 @@ public class GuiDispenser extends GuiContainer {
|
|||
}
|
||||
|
||||
protected void drawGuiContainerBackgroundLayer(float f) {
|
||||
int i = mc.renderEngine.getTexture("/gui/trap.png");
|
||||
EaglerAdapter.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
mc.renderEngine.bindTexture(i);
|
||||
containerTexture.bindTexture();
|
||||
int j = (width - xSize) / 2;
|
||||
int k = (height - ySize) / 2;
|
||||
drawTexturedModalRect(j, k, 0, 0, xSize, ySize);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package net.minecraft.src;
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
|
||||
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
|
||||
// Jad home page: http://www.kpdus.com/jad.html
|
||||
|
@ -9,6 +10,8 @@ import net.lax1dude.eaglercraft.EaglerAdapter;
|
|||
|
||||
public class GuiFurnace extends GuiContainer {
|
||||
|
||||
private static final TextureLocation containerTexture = new TextureLocation("/gui/furnace.png");
|
||||
|
||||
public GuiFurnace(InventoryPlayer inventoryplayer, TileEntityFurnace tileentityfurnace) {
|
||||
super(new CraftingInventoryFurnaceCB(inventoryplayer, tileentityfurnace));
|
||||
furnaceInventory = tileentityfurnace;
|
||||
|
@ -20,9 +23,8 @@ public class GuiFurnace extends GuiContainer {
|
|||
}
|
||||
|
||||
protected void drawGuiContainerBackgroundLayer(float f) {
|
||||
int i = mc.renderEngine.getTexture("/gui/furnace.png");
|
||||
EaglerAdapter.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
mc.renderEngine.bindTexture(i);
|
||||
containerTexture.bindTexture();
|
||||
int j = (width - xSize) / 2;
|
||||
int k = (height - ySize) / 2;
|
||||
drawTexturedModalRect(j, k, 0, 0, xSize, ySize);
|
||||
|
|
|
@ -8,11 +8,18 @@ import java.util.Random;
|
|||
|
||||
import net.lax1dude.eaglercraft.AWTColor;
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
public class GuiIngame extends Gui {
|
||||
|
||||
private static final TextureLocation guiTexture = new TextureLocation("/gui/gui.png");
|
||||
private static final TextureLocation iconsTexture = new TextureLocation("/gui/icons.png");
|
||||
private static final TextureLocation pumpkinBlur = new TextureLocation("%blur%/misc/pumpkinblur.png");
|
||||
private static final TextureLocation vignette = new TextureLocation("%blur%/misc/vignette.png");
|
||||
private static final TextureLocation terrainTexture = new TextureLocation("/terrain.png");
|
||||
|
||||
public GuiIngame(Minecraft minecraft) {
|
||||
chatMessageList = new ArrayList();
|
||||
rand = new Random();
|
||||
|
@ -44,12 +51,12 @@ public class GuiIngame extends Gui {
|
|||
renderPortalOverlay(f1, k, l);
|
||||
}
|
||||
EaglerAdapter.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
EaglerAdapter.glBindTexture(3553 /* GL_TEXTURE_2D */, mc.renderEngine.getTexture("/gui/gui.png"));
|
||||
guiTexture.bindTexture();
|
||||
InventoryPlayer inventoryplayer = mc.thePlayer.inventory;
|
||||
zLevel = -90F;
|
||||
drawTexturedModalRect(k / 2 - 91, l - 22, 0, 0, 182, 22);
|
||||
drawTexturedModalRect((k / 2 - 91 - 1) + inventoryplayer.currentItem * 20, l - 22 - 1, 0, 22, 24, 22);
|
||||
EaglerAdapter.glBindTexture(3553 /* GL_TEXTURE_2D */, mc.renderEngine.getTexture("/gui/icons.png"));
|
||||
iconsTexture.bindTexture();
|
||||
EaglerAdapter.glEnable(3042 /* GL_BLEND */);
|
||||
EaglerAdapter.glBlendFunc(775, 769);
|
||||
drawTexturedModalRect(k / 2 - 7, l / 2 - 7, 0, 0, 16, 16);
|
||||
|
@ -240,7 +247,7 @@ public class GuiIngame extends Gui {
|
|||
EaglerAdapter.glBlendFunc(770, 771);
|
||||
EaglerAdapter.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
EaglerAdapter.glDisable(3008 /* GL_ALPHA_TEST */);
|
||||
EaglerAdapter.glBindTexture(3553 /* GL_TEXTURE_2D */, mc.renderEngine.getTexture("%blur%/misc/pumpkinblur.png"));
|
||||
pumpkinBlur.bindTexture();
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.addVertexWithUV(0.0D, j, -90D, 0.0D, 1.0D);
|
||||
|
@ -267,7 +274,7 @@ public class GuiIngame extends Gui {
|
|||
EaglerAdapter.glDepthMask(false);
|
||||
EaglerAdapter.glBlendFunc(0, 769);
|
||||
EaglerAdapter.glColor4f(prevVignetteBrightness, prevVignetteBrightness, prevVignetteBrightness, 1.0F);
|
||||
EaglerAdapter.glBindTexture(3553 /* GL_TEXTURE_2D */, mc.renderEngine.getTexture("%blur%/misc/vignette.png"));
|
||||
vignette.bindTexture();
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.addVertexWithUV(0.0D, j, -90D, 0.0D, 1.0D);
|
||||
|
@ -290,7 +297,7 @@ public class GuiIngame extends Gui {
|
|||
EaglerAdapter.glDepthMask(false);
|
||||
EaglerAdapter.glBlendFunc(770, 771);
|
||||
EaglerAdapter.glColor4f(1.0F, 1.0F, 1.0F, f);
|
||||
EaglerAdapter.glBindTexture(3553 /* GL_TEXTURE_2D */, mc.renderEngine.getTexture("/terrain.png"));
|
||||
terrainTexture.bindTexture();
|
||||
float f1 = (float) (Block.portal.blockIndexInTexture % 16) / 16F;
|
||||
float f2 = (float) (Block.portal.blockIndexInTexture / 16) / 16F;
|
||||
float f3 = (float) (Block.portal.blockIndexInTexture % 16 + 1) / 16F;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package net.minecraft.src;
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
|
||||
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
|
||||
// Jad home page: http://www.kpdus.com/jad.html
|
||||
|
@ -8,6 +9,8 @@ import net.lax1dude.eaglercraft.EaglerAdapter;
|
|||
|
||||
public class GuiInventory extends GuiContainer {
|
||||
|
||||
private static final TextureLocation containerTexture = new TextureLocation("/gui/inventory.png");
|
||||
|
||||
public GuiInventory(EntityPlayer entityplayer) {
|
||||
super(entityplayer.inventorySlots);
|
||||
field_948_f = true;
|
||||
|
@ -24,9 +27,8 @@ public class GuiInventory extends GuiContainer {
|
|||
}
|
||||
|
||||
protected void drawGuiContainerBackgroundLayer(float f) {
|
||||
int i = mc.renderEngine.getTexture("/gui/inventory.png");
|
||||
EaglerAdapter.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
mc.renderEngine.bindTexture(i);
|
||||
containerTexture.bindTexture();
|
||||
int j = (width - xSize) / 2;
|
||||
int k = (height - ySize) / 2;
|
||||
drawTexturedModalRect(j, k, 0, 0, xSize, ySize);
|
||||
|
|
|
@ -10,13 +10,19 @@ import java.nio.charset.Charset;
|
|||
import java.util.*;
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
||||
|
||||
public class GuiMainMenu extends GuiScreen {
|
||||
|
||||
private static final TextureLocation logoTexture = new TextureLocation("/gui/logo.png");
|
||||
private static final TextureLocation blackTexture = new TextureLocation("/title/black.png");
|
||||
private static final TextureLocation terrainTexture = new TextureLocation("/terrain.png");
|
||||
|
||||
public GuiMainMenu() {
|
||||
updateCounter = 0.0F;
|
||||
splashText = "missingno";
|
||||
splashText = "Singleplayer!";
|
||||
/*
|
||||
try {
|
||||
ArrayList arraylist = new ArrayList();
|
||||
BufferedReader bufferedreader = new BufferedReader(new InputStreamReader(
|
||||
|
@ -35,6 +41,7 @@ public class GuiMainMenu extends GuiScreen {
|
|||
splashText = (String) arraylist.get(rand.nextInt(arraylist.size()));
|
||||
} catch (Exception exception) {
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
public void updateScreen() {
|
||||
|
@ -56,14 +63,8 @@ public class GuiMainMenu extends GuiScreen {
|
|||
public void initGui() {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(new Date());
|
||||
if (calendar.get(2) + 1 == 11 && calendar.get(5) == 9) {
|
||||
splashText = "Happy birthday, ez!";
|
||||
} else if (calendar.get(2) + 1 == 6 && calendar.get(5) == 1) {
|
||||
splashText = "Happy birthday, Notch!";
|
||||
} else if (calendar.get(2) + 1 == 12 && calendar.get(5) == 24) {
|
||||
splashText = "Merry X-mas!";
|
||||
} else if (calendar.get(2) + 1 == 1 && calendar.get(5) == 1) {
|
||||
splashText = "Happy new year!";
|
||||
if (calendar.get(2) + 1 == 11 && calendar.get(5) == 19) {
|
||||
splashText = "Happy birthday, lax1dude!";
|
||||
}
|
||||
StringTranslate stringtranslate = StringTranslate.getInstance();
|
||||
int i = height / 4 + 48;
|
||||
|
@ -73,10 +74,8 @@ public class GuiMainMenu extends GuiScreen {
|
|||
if (mc.hideQuitButton) {
|
||||
controlList.add(new GuiButton(0, width / 2 - 100, i + 72, stringtranslate.translateKey("menu.options")));
|
||||
} else {
|
||||
controlList.add(new GuiButton(0, width / 2 - 100, i + 72 + 12, 98, 20,
|
||||
stringtranslate.translateKey("menu.options")));
|
||||
controlList.add(
|
||||
new GuiButton(4, width / 2 + 2, i + 72 + 12, 98, 20, stringtranslate.translateKey("menu.quit")));
|
||||
controlList.add(new GuiButton(0, width / 2 - 100, i + 72 + 12, 98, 20, stringtranslate.translateKey("menu.options")));
|
||||
controlList.add(new GuiButton(4, width / 2 + 2, i + 72 + 12, 98, 20, stringtranslate.translateKey("menu.quit")));
|
||||
}
|
||||
if (mc.session == null) {
|
||||
((GuiButton) controlList.get(1)).enabled = false;
|
||||
|
@ -105,20 +104,20 @@ public class GuiMainMenu extends GuiScreen {
|
|||
drawDefaultBackground();
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
drawLogo(f);
|
||||
EaglerAdapter.glBindTexture(3553 /* GL_TEXTURE_2D */, mc.renderEngine.getTexture("/gui/logo.png"));
|
||||
logoTexture.bindTexture();
|
||||
EaglerAdapter.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
tessellator.setColorOpaque_I(0xffffff);
|
||||
EaglerAdapter.glPushMatrix();
|
||||
EaglerAdapter.glTranslatef(width / 2 + 90, 70F, 0.0F);
|
||||
EaglerAdapter.glRotatef(-20F, 0.0F, 0.0F, 1.0F);
|
||||
float f1 = 1.8F - MathHelper
|
||||
.abs(MathHelper.sin(((float) (System.currentTimeMillis() % 1000L) / 1000F) * 3.141593F * 2.0F) * 0.1F);
|
||||
f1 = (f1 * 100F) / (float) (fontRenderer.getStringWidth(splashText) + 32);
|
||||
float f1 = 1.8F - MathHelper.abs(MathHelper.sin(((float) (System.currentTimeMillis() % 1000L) / 1000F) * 3.141593F * 2.0F) * 0.1F);
|
||||
f1 = (f1 * 80F) / (float) (fontRenderer.getStringWidth(splashText) + 32);
|
||||
EaglerAdapter.glScalef(f1, f1, f1);
|
||||
drawCenteredString(fontRenderer, splashText, 0, -8, 0xffff00);
|
||||
EaglerAdapter.glPopMatrix();
|
||||
drawString(fontRenderer, "Minecraft Beta 1.3_01", 2, 2, 0x505050);
|
||||
String s = "Copyright Mojang AB. Do not distribute.";
|
||||
//String s = "Copyright Mojang AB. Do not distribute.";
|
||||
String s = "site resources - Copyright Mojang AB.";
|
||||
drawString(fontRenderer, s, width - fontRenderer.getStringWidth(s) - 2, height - 10, 0xffffff);
|
||||
super.drawScreen(i, j, f);
|
||||
}
|
||||
|
@ -171,9 +170,10 @@ public class GuiMainMenu extends GuiScreen {
|
|||
EaglerAdapter.glScalef(0.89F, 1.0F, 0.4F);
|
||||
EaglerAdapter.glTranslatef((float) (-minecraftLogo[0].length()) * 0.5F, (float) (-minecraftLogo.length) * 0.5F,
|
||||
0.0F);
|
||||
EaglerAdapter.glBindTexture(3553 /* GL_TEXTURE_2D */, mc.renderEngine.getTexture("/terrain.png"));
|
||||
if (l == 0) {
|
||||
EaglerAdapter.glBindTexture(3553 /* GL_TEXTURE_2D */, mc.renderEngine.getTexture("/title/black.png"));
|
||||
blackTexture.bindTexture();
|
||||
}else {
|
||||
terrainTexture.bindTexture();
|
||||
}
|
||||
for (int i1 = 0; i1 < minecraftLogo.length; i1++) {
|
||||
for (int j1 = 0; j1 < minecraftLogo[i1].length(); j1++) {
|
||||
|
@ -219,11 +219,20 @@ public class GuiMainMenu extends GuiScreen {
|
|||
}
|
||||
|
||||
private static final Random rand = new Random();
|
||||
String minecraftLogo[] = { " * * * * * *** *** *** *** *** ***",
|
||||
" ** ** * ** * * * * * * * * * ",
|
||||
" * * * * * * * ** * ** *** ** * ",
|
||||
" * * * * ** * * * * * * * * ",
|
||||
" * * * * * *** *** * * * * * * " };
|
||||
/*
|
||||
String minecraftLogo[] = {
|
||||
" * * * * * *** *** *** *** *** ***",
|
||||
" ** ** * ** * * * * * * * * * ",
|
||||
" * * * * * * * * ** ** *** ** * ",
|
||||
" * * * * ** * * * * * * * * ",
|
||||
" * * * * * *** *** * * * * * * " };
|
||||
*/
|
||||
String minecraftLogo[] = {
|
||||
" ### ### ### # ### ### ### ### ### ### ###",
|
||||
" # # # # # # # # # # # # # # # ",
|
||||
" ## ### # # ## ## # ## ### ## # ",
|
||||
" # # # # # # # # # # # # # # # # ",
|
||||
" ### # # ### ### ### # # ### # # # # # # " };
|
||||
private LogoEffectRandomizer logoEffects[][];
|
||||
private float updateCounter;
|
||||
private String splashText;
|
||||
|
|
|
@ -11,11 +11,14 @@ import java.awt.datatransfer.Transferable;
|
|||
import java.util.ArrayList;
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
public class GuiScreen extends Gui {
|
||||
|
||||
private static final TextureLocation backgroundTexture = new TextureLocation("/gui/background.png");
|
||||
|
||||
public GuiScreen() {
|
||||
controlList = new ArrayList();
|
||||
field_948_f = false;
|
||||
|
@ -136,7 +139,7 @@ public class GuiScreen extends Gui {
|
|||
EaglerAdapter.glDisable(2896 /* GL_LIGHTING */);
|
||||
EaglerAdapter.glDisable(2912 /* GL_FOG */);
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
EaglerAdapter.glBindTexture(3553 /* GL_TEXTURE_2D */, mc.renderEngine.getTexture("/gui/background.png"));
|
||||
backgroundTexture.bindTexture();
|
||||
EaglerAdapter.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
float f = 32F;
|
||||
tessellator.startDrawingQuads();
|
||||
|
|
|
@ -7,11 +7,14 @@ package net.minecraft.src;
|
|||
import java.util.List;
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
public abstract class GuiSlot {
|
||||
|
||||
private static final TextureLocation backgroundTexture = new TextureLocation("/gui/background.png");
|
||||
|
||||
public GuiSlot(Minecraft minecraft, int i, int j, int k, int l, int i1) {
|
||||
field_22254_k = -2F;
|
||||
field_22251_n = -1;
|
||||
|
@ -119,7 +122,7 @@ public abstract class GuiSlot {
|
|||
EaglerAdapter.glDisable(2896 /* GL_LIGHTING */);
|
||||
EaglerAdapter.glDisable(2912 /* GL_FOG */);
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
EaglerAdapter.glBindTexture(3553 /* GL_TEXTURE_2D */, field_22264_a.renderEngine.getTexture("/gui/background.png"));
|
||||
backgroundTexture.bindTexture();
|
||||
EaglerAdapter.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
float f1 = 32F;
|
||||
tessellator.startDrawingQuads();
|
||||
|
@ -226,7 +229,7 @@ public abstract class GuiSlot {
|
|||
|
||||
private void func_22239_a(int i, int j, int k, int l) {
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
EaglerAdapter.glBindTexture(3553 /* GL_TEXTURE_2D */, field_22264_a.renderEngine.getTexture("/gui/background.png"));
|
||||
backgroundTexture.bindTexture();
|
||||
EaglerAdapter.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
float f = 32F;
|
||||
tessellator.startDrawingQuads();
|
||||
|
|
|
@ -1,41 +0,0 @@
|
|||
package net.minecraft.src;
|
||||
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
|
||||
|
||||
// Jad home page: http://www.kpdus.com/jad.html
|
||||
// Decompiler options: packimports(3) braces deadcode
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
|
||||
public class IsoImageBuffer {
|
||||
|
||||
public IsoImageBuffer(World world, int i, int j) {
|
||||
field_1352_e = false;
|
||||
field_1351_f = false;
|
||||
field_1350_g = 0;
|
||||
field_1349_h = false;
|
||||
worldObj = world;
|
||||
func_889_a(i, j);
|
||||
}
|
||||
|
||||
public void func_889_a(int i, int j) {
|
||||
field_1352_e = false;
|
||||
field_1354_c = i;
|
||||
field_1353_d = j;
|
||||
field_1350_g = 0;
|
||||
field_1349_h = false;
|
||||
}
|
||||
|
||||
public void func_888_a(World world, int i, int j) {
|
||||
worldObj = world;
|
||||
func_889_a(i, j);
|
||||
}
|
||||
|
||||
public BufferedImage field_1348_a;
|
||||
public World worldObj;
|
||||
public int field_1354_c;
|
||||
public int field_1353_d;
|
||||
public boolean field_1352_e;
|
||||
public boolean field_1351_f;
|
||||
public int field_1350_g;
|
||||
public boolean field_1349_h;
|
||||
}
|
|
@ -2,6 +2,7 @@ package net.minecraft.src;
|
|||
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
||||
|
||||
// Jad home page: http://www.kpdus.com/jad.html
|
||||
|
@ -11,6 +12,10 @@ import net.minecraft.client.Minecraft;
|
|||
|
||||
public class ItemRenderer {
|
||||
|
||||
private static final TextureLocation terrainTexture = new TextureLocation("/terrain.png");
|
||||
private static final TextureLocation itemsTextures = new TextureLocation("/gui/items.png");
|
||||
private static final TextureLocation waterTexture = new TextureLocation("/misc/water.png");
|
||||
|
||||
public ItemRenderer(Minecraft minecraft) {
|
||||
itemToRender = null;
|
||||
equippedProgress = 0.0F;
|
||||
|
@ -23,13 +28,13 @@ public class ItemRenderer {
|
|||
public void renderItem(ItemStack itemstack) {
|
||||
EaglerAdapter.glPushMatrix();
|
||||
if (itemstack.itemID < 256 && RenderBlocks.func_1219_a(Block.blocksList[itemstack.itemID].getRenderType())) {
|
||||
EaglerAdapter.glBindTexture(3553 /* GL_TEXTURE_2D */, mc.renderEngine.getTexture("/terrain.png"));
|
||||
terrainTexture.bindTexture();
|
||||
field_1357_e.func_1227_a(Block.blocksList[itemstack.itemID], itemstack.getItemDamage());
|
||||
} else {
|
||||
if (itemstack.itemID < 256) {
|
||||
EaglerAdapter.glBindTexture(3553 /* GL_TEXTURE_2D */, mc.renderEngine.getTexture("/terrain.png"));
|
||||
terrainTexture.bindTexture();
|
||||
} else {
|
||||
EaglerAdapter.glBindTexture(3553 /* GL_TEXTURE_2D */, mc.renderEngine.getTexture("/gui/items.png"));
|
||||
itemsTextures.bindTexture();
|
||||
}
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
float f = ((float) ((itemstack.getIconIndex() % 16) * 16) + 0.0F) / 256F;
|
||||
|
@ -202,24 +207,21 @@ public class ItemRenderer {
|
|||
public void renderOverlays(float f) {
|
||||
EaglerAdapter.glDisable(3008 /* GL_ALPHA_TEST */);
|
||||
if (mc.thePlayer.func_21062_U()) {
|
||||
int i = mc.renderEngine.getTexture("/terrain.png");
|
||||
EaglerAdapter.glBindTexture(3553 /* GL_TEXTURE_2D */, i);
|
||||
terrainTexture.bindTexture();
|
||||
renderFireInFirstPerson(f);
|
||||
}
|
||||
if (mc.thePlayer.func_345_I()) {
|
||||
int j = MathHelper.floor_double(mc.thePlayer.posX);
|
||||
int l = MathHelper.floor_double(mc.thePlayer.posY);
|
||||
int i1 = MathHelper.floor_double(mc.thePlayer.posZ);
|
||||
int j1 = mc.renderEngine.getTexture("/terrain.png");
|
||||
EaglerAdapter.glBindTexture(3553 /* GL_TEXTURE_2D */, j1);
|
||||
terrainTexture.bindTexture();
|
||||
int k1 = mc.theWorld.getBlockId(j, l, i1);
|
||||
if (Block.blocksList[k1] != null) {
|
||||
renderInsideOfBlock(f, Block.blocksList[k1].getBlockTextureFromSide(2));
|
||||
}
|
||||
}
|
||||
if (mc.thePlayer.isInsideOfMaterial(Material.water)) {
|
||||
int k = mc.renderEngine.getTexture("/misc/water.png");
|
||||
EaglerAdapter.glBindTexture(3553 /* GL_TEXTURE_2D */, k);
|
||||
waterTexture.bindTexture();
|
||||
renderWarpedTextureOverlay(f);
|
||||
}
|
||||
EaglerAdapter.glEnable(3008 /* GL_ALPHA_TEST */);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package net.minecraft.src;
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
||||
|
||||
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
|
||||
|
@ -11,6 +12,9 @@ import net.lax1dude.eaglercraft.adapter.Tessellator;
|
|||
|
||||
public abstract class Render {
|
||||
|
||||
private static final TextureLocation terrainTexture = new TextureLocation("/terrain.png");
|
||||
private static final TextureLocation shadowTexture = new TextureLocation("%clamp%/misc/shadow.png");
|
||||
|
||||
public Render() {
|
||||
field_195_d = new ModelBiped();
|
||||
field_203_d = new RenderBlocks();
|
||||
|
@ -20,11 +24,15 @@ public abstract class Render {
|
|||
|
||||
public abstract void doRender(Entity entity, double d, double d1, double d2, float f, float f1);
|
||||
|
||||
@Deprecated
|
||||
protected void loadTexture(String s) {
|
||||
RenderEngine renderengine = renderManager.renderEngine;
|
||||
renderengine.bindTexture(renderengine.getTexture(s));
|
||||
}
|
||||
|
||||
protected abstract boolean loadDownloadableImageTexture(String s, String s1);
|
||||
|
||||
/*
|
||||
protected boolean loadDownloadableImageTexture(String s, String s1) {
|
||||
RenderEngine renderengine = renderManager.renderEngine;
|
||||
int i = renderengine.getTextureForDownloadableImage(s, s1);
|
||||
|
@ -35,6 +43,7 @@ public abstract class Render {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
private void renderEntityOnFire(Entity entity, double d, double d1, double d2, float f) {
|
||||
EaglerAdapter.glDisable(2896 /* GL_LIGHTING */);
|
||||
|
@ -49,7 +58,7 @@ public abstract class Render {
|
|||
EaglerAdapter.glTranslatef((float) d, (float) d1, (float) d2);
|
||||
float f5 = entity.width * 1.4F;
|
||||
EaglerAdapter.glScalef(f5, f5, f5);
|
||||
loadTexture("/terrain.png");
|
||||
terrainTexture.bindTexture();
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
float f6 = 1.0F;
|
||||
float f7 = 0.5F;
|
||||
|
@ -78,7 +87,7 @@ public abstract class Render {
|
|||
EaglerAdapter.glEnable(3042 /* GL_BLEND */);
|
||||
EaglerAdapter.glBlendFunc(770, 771);
|
||||
RenderEngine renderengine = renderManager.renderEngine;
|
||||
renderengine.bindTexture(renderengine.getTexture("%clamp%/misc/shadow.png"));
|
||||
shadowTexture.bindTexture();
|
||||
World world = getWorldFromRenderManager();
|
||||
EaglerAdapter.glDepthMask(false);
|
||||
float f2 = shadowSize;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package net.minecraft.src;
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
||||
|
||||
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
|
||||
|
@ -11,11 +12,13 @@ import net.lax1dude.eaglercraft.adapter.Tessellator;
|
|||
|
||||
public class RenderArrow extends Render {
|
||||
|
||||
private static final TextureLocation arrowsTexture = new TextureLocation("/item/arrows.png");
|
||||
|
||||
public RenderArrow() {
|
||||
}
|
||||
|
||||
public void func_154_a(EntityArrow entityarrow, double d, double d1, double d2, float f, float f1) {
|
||||
loadTexture("/item/arrows.png");
|
||||
arrowsTexture.bindTexture();
|
||||
EaglerAdapter.glPushMatrix();
|
||||
EaglerAdapter.glTranslatef((float) d, (float) d1, (float) d2);
|
||||
EaglerAdapter.glRotatef(
|
||||
|
@ -75,4 +78,9 @@ public class RenderArrow extends Render {
|
|||
public void doRender(Entity entity, double d, double d1, double d2, float f, float f1) {
|
||||
func_154_a((EntityArrow) entity, d, d1, d2, f, f1);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean loadDownloadableImageTexture(String s, String s1) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package net.minecraft.src;
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
|
||||
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
|
||||
|
||||
|
@ -10,9 +11,12 @@ import net.lax1dude.eaglercraft.EaglerAdapter;
|
|||
|
||||
public class RenderBiped extends RenderLiving {
|
||||
|
||||
public RenderBiped(ModelBiped modelbiped, float f) {
|
||||
protected TextureLocation texture;
|
||||
|
||||
public RenderBiped(ModelBiped modelbiped, float f, String tex) {
|
||||
super(modelbiped, f);
|
||||
modelBipedMain = modelbiped;
|
||||
texture = new TextureLocation(tex);
|
||||
}
|
||||
|
||||
protected void renderEquippedItems(EntityLiving entityliving, float f) {
|
||||
|
@ -49,4 +53,10 @@ public class RenderBiped extends RenderLiving {
|
|||
}
|
||||
|
||||
protected ModelBiped modelBipedMain;
|
||||
|
||||
@Override
|
||||
protected boolean loadDownloadableImageTexture(String s, String s1) {
|
||||
texture.bindTexture();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package net.minecraft.src;
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
|
||||
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
|
||||
|
||||
|
@ -10,6 +11,9 @@ import net.lax1dude.eaglercraft.EaglerAdapter;
|
|||
|
||||
public class RenderBoat extends Render {
|
||||
|
||||
private static final TextureLocation terrainTexture = new TextureLocation("/terrain.png");
|
||||
private static final TextureLocation boatTexture = new TextureLocation("/item/boat.png");
|
||||
|
||||
public RenderBoat() {
|
||||
shadowSize = 0.5F;
|
||||
modelBoat = new ModelBoat();
|
||||
|
@ -27,11 +31,11 @@ public class RenderBoat extends Render {
|
|||
if (f2 > 0.0F) {
|
||||
EaglerAdapter.glRotatef(((MathHelper.sin(f2) * f2 * f3) / 10F) * (float) entityboat.field_808_c, 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
loadTexture("/terrain.png");
|
||||
terrainTexture.bindTexture();
|
||||
float f4 = 0.75F;
|
||||
EaglerAdapter.glScalef(f4, f4, f4);
|
||||
EaglerAdapter.glScalef(1.0F / f4, 1.0F / f4, 1.0F / f4);
|
||||
loadTexture("/item/boat.png");
|
||||
boatTexture.bindTexture();
|
||||
EaglerAdapter.glScalef(-1F, -1F, 1.0F);
|
||||
modelBoat.render(0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
|
||||
EaglerAdapter.glPopMatrix();
|
||||
|
@ -42,4 +46,9 @@ public class RenderBoat extends Render {
|
|||
}
|
||||
|
||||
protected ModelBase modelBoat;
|
||||
|
||||
@Override
|
||||
protected boolean loadDownloadableImageTexture(String s, String s1) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package net.minecraft.src;
|
||||
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
|
||||
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
|
||||
// Jad home page: http://www.kpdus.com/jad.html
|
||||
// Decompiler options: packimports(3) braces deadcode
|
||||
|
||||
|
@ -31,4 +33,12 @@ public class RenderChicken extends RenderLiving {
|
|||
public void doRender(Entity entity, double d, double d1, double d2, float f, float f1) {
|
||||
func_181_a((EntityChicken) entity, d, d1, d2, f, f1);
|
||||
}
|
||||
|
||||
private static final TextureLocation texture = new TextureLocation("/mob/chicken.png");
|
||||
|
||||
@Override
|
||||
protected boolean loadDownloadableImageTexture(String s, String s1) {
|
||||
texture.bindTexture();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
package net.minecraft.src;
|
||||
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
|
||||
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
|
||||
|
||||
// Jad home page: http://www.kpdus.com/jad.html
|
||||
|
@ -21,4 +24,12 @@ public class RenderCow extends RenderLiving {
|
|||
public void doRender(Entity entity, double d, double d1, double d2, float f, float f1) {
|
||||
func_177_a((EntityCow) entity, d, d1, d2, f, f1);
|
||||
}
|
||||
|
||||
private static final TextureLocation texture = new TextureLocation("/mob/cow.png");
|
||||
|
||||
@Override
|
||||
protected boolean loadDownloadableImageTexture(String s, String s1) {
|
||||
texture.bindTexture();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package net.minecraft.src;
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
|
||||
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
|
||||
|
||||
|
@ -57,4 +58,12 @@ public class RenderCreeper extends RenderLiving {
|
|||
protected int getColorMultiplier(EntityLiving entityliving, float f, float f1) {
|
||||
return updateCreeperColorMultiplier((EntityCreeper) entityliving, f, f1);
|
||||
}
|
||||
|
||||
private static final TextureLocation texture = new TextureLocation("/mob/creeper.png");
|
||||
|
||||
@Override
|
||||
protected boolean loadDownloadableImageTexture(String s, String s1) {
|
||||
texture.bindTexture();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@ import java.util.Set;
|
|||
import javax.imageio.ImageIO;
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
|
||||
public class RenderEngine {
|
||||
|
||||
|
@ -27,7 +28,9 @@ public class RenderEngine {
|
|||
textureMap = new HashMap();
|
||||
textureNameToImageMap = new HashMap();
|
||||
singleIntBuffer = GLAllocation.createDirectIntBuffer(1);
|
||||
imageData = GLAllocation.createDirectByteBuffer(0x100000);
|
||||
imageDataA = GLAllocation.createDirectByteBuffer(0x100000);
|
||||
imageDataB1 = GLAllocation.createDirectByteBuffer(0x100000);
|
||||
imageDataB2 = GLAllocation.createDirectByteBuffer(0x100000);
|
||||
textureList = new ArrayList();
|
||||
urlToImageDataMap = new HashMap();
|
||||
clampTexture = false;
|
||||
|
@ -57,7 +60,11 @@ public class RenderEngine {
|
|||
setupTexture(readTextureImage(texturepackbase.func_6481_a(s.substring(6))), i);
|
||||
blurTexture = false;
|
||||
} else {
|
||||
if(s.equals("/terrain.png")) {
|
||||
useMipmaps = true;
|
||||
}
|
||||
setupTexture(readTextureImage(texturepackbase.func_6481_a(s)), i);
|
||||
useMipmaps = false;
|
||||
}
|
||||
textureMap.put(s, Integer.valueOf(i));
|
||||
return i;
|
||||
|
@ -90,9 +97,9 @@ public class RenderEngine {
|
|||
public void setupTexture(BufferedImage bufferedimage, int i) {
|
||||
EaglerAdapter.glBindTexture(3553 /* GL_TEXTURE_2D */, i);
|
||||
if (useMipmaps) {
|
||||
EaglerAdapter.glTexParameteri(3553 /* GL_TEXTURE_2D */, 10241 /* GL_TEXTURE_MIN_FILTER */,
|
||||
9987 /* GL_LINEAR_MIPMAP_LINEAR */);
|
||||
EaglerAdapter.glTexParameteri(3553 /* GL_TEXTURE_2D */, 10240 /* GL_TEXTURE_MAG_FILTER */, 9729 /* GL_LINEAR */);
|
||||
EaglerAdapter.glTexParameteri(3553 /* GL_TEXTURE_2D */, 10241 /* GL_TEXTURE_MIN_FILTER */, EaglerAdapter.GL_NEAREST_MIPMAP_LINEAR);
|
||||
EaglerAdapter.glTexParameteri(3553 /* GL_TEXTURE_2D */, 10240 /* GL_TEXTURE_MAG_FILTER */, EaglerAdapter.GL_NEAREST /* GL_LINEAR */);
|
||||
EaglerAdapter.glTexParameteri(3553 /* GL_TEXTURE_2D */, EaglerAdapter.GL_TEXTURE_MAX_LEVEL, 4);
|
||||
} else {
|
||||
EaglerAdapter.glTexParameteri(3553 /* GL_TEXTURE_2D */, 10241 /* GL_TEXTURE_MIN_FILTER */, 9728 /* GL_NEAREST */);
|
||||
EaglerAdapter.glTexParameteri(3553 /* GL_TEXTURE_2D */, 10240 /* GL_TEXTURE_MAG_FILTER */, 9728 /* GL_NEAREST */);
|
||||
|
@ -132,30 +139,34 @@ public class RenderEngine {
|
|||
abyte0[l * 4 + 3] = (byte) j1;
|
||||
}
|
||||
|
||||
imageData.clear();
|
||||
imageData.put(abyte0);
|
||||
imageData.position(0).limit(abyte0.length);
|
||||
imageDataB1.clear();
|
||||
imageDataB1.put(abyte0);
|
||||
imageDataB1.position(0).limit(abyte0.length);
|
||||
EaglerAdapter.glTexImage2D(3553 /* GL_TEXTURE_2D */, 0, 6408 /* GL_RGBA */, j, k, 0, 6408 /* GL_RGBA */,
|
||||
5121 /* GL_UNSIGNED_BYTE */, imageData);
|
||||
5121 /* GL_UNSIGNED_BYTE */, imageDataB1);
|
||||
if (useMipmaps) {
|
||||
for (int i1 = 1; i1 <= 4; i1++) {
|
||||
int k1 = j >> i1 - 1;
|
||||
int i2 = j >> i1;
|
||||
int k2 = k >> i1;
|
||||
imageDataB2.clear();
|
||||
for (int i3 = 0; i3 < i2; i3++) {
|
||||
for (int k3 = 0; k3 < k2; k3++) {
|
||||
int i4 = imageData.getInt((i3 * 2 + 0 + (k3 * 2 + 0) * k1) * 4);
|
||||
int k4 = imageData.getInt((i3 * 2 + 1 + (k3 * 2 + 0) * k1) * 4);
|
||||
int l4 = imageData.getInt((i3 * 2 + 1 + (k3 * 2 + 1) * k1) * 4);
|
||||
int i5 = imageData.getInt((i3 * 2 + 0 + (k3 * 2 + 1) * k1) * 4);
|
||||
int j5 = weightedAverageColor(weightedAverageColor(i4, k4), weightedAverageColor(l4, i5));
|
||||
imageData.putInt((i3 + k3 * i2) * 4, j5);
|
||||
int i4 = imageDataB1.getInt((i3 * 2 + 0 + (k3 * 2 + 0) * k1) * 4);
|
||||
int k4 = imageDataB1.getInt((i3 * 2 + 1 + (k3 * 2 + 0) * k1) * 4);
|
||||
int l4 = imageDataB1.getInt((i3 * 2 + 1 + (k3 * 2 + 1) * k1) * 4);
|
||||
int i5 = imageDataB1.getInt((i3 * 2 + 0 + (k3 * 2 + 1) * k1) * 4);
|
||||
int j5 = averageColor(averageColor(i4, k4), averageColor(l4, i5));
|
||||
imageDataB2.putInt((i3 + k3 * i2) * 4, j5);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
EaglerAdapter.glTexImage2D(3553 /* GL_TEXTURE_2D */, i1, 6408 /* GL_RGBA */, i2, k2, 0, 6408 /* GL_RGBA */,
|
||||
5121 /* GL_UNSIGNED_BYTE */, imageData);
|
||||
5121 /* GL_UNSIGNED_BYTE */, imageDataB2);
|
||||
ByteBuffer tmp = imageDataB1;
|
||||
imageDataB1 = imageDataB2;
|
||||
imageDataB2 = tmp;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -178,7 +189,7 @@ public class RenderEngine {
|
|||
}
|
||||
if (threaddownloadimagedata == null || threaddownloadimagedata.textureName < 0) {
|
||||
if (s1 == null) {
|
||||
return -1;
|
||||
return getTexture("/mob/char.png");
|
||||
} else {
|
||||
return getTexture(s1);
|
||||
}
|
||||
|
@ -215,98 +226,106 @@ public class RenderEngine {
|
|||
texturefx.onTick();
|
||||
}
|
||||
|
||||
public void func_1067_a() {
|
||||
public void updateTerrainTextures() {
|
||||
for (int i = 0; i < textureList.size(); i++) {
|
||||
TextureFX texturefx = (TextureFX) textureList.get(i);
|
||||
texturefx.anaglyphEnabled = options.anaglyph;
|
||||
texturefx.onTick();
|
||||
imageData.clear();
|
||||
imageData.put(texturefx.imageData);
|
||||
imageData.position(0).limit(texturefx.imageData.length);
|
||||
int tileSize = 16 * 16 * 4;
|
||||
imageDataA.clear();
|
||||
imageDataA.put(texturefx.imageData);
|
||||
imageDataA.position(0).limit(tileSize);
|
||||
texturefx.bindImage(this);
|
||||
for (int k = 0; k < texturefx.tileSize; k++) {
|
||||
label0: for (int i1 = 0; i1 < texturefx.tileSize; i1++) {
|
||||
EaglerAdapter.glTexSubImage2D(3553 /* GL_TEXTURE_2D */, 0, (texturefx.iconIndex % 16) * 16 + k * 16,
|
||||
(texturefx.iconIndex / 16) * 16 + i1 * 16, 16, 16, 6408 /* GL_RGBA */,
|
||||
5121 /* GL_UNSIGNED_BYTE */, imageData);
|
||||
if (!useMipmaps) {
|
||||
continue;
|
||||
}
|
||||
int k1 = 1;
|
||||
do {
|
||||
if (k1 > 4) {
|
||||
continue label0;
|
||||
}
|
||||
int i2 = 16 >> k1 - 1;
|
||||
int k2 = 16 >> k1;
|
||||
for (int i3 = 0; i3 < k2; i3++) {
|
||||
for (int k3 = 0; k3 < k2; k3++) {
|
||||
int i4 = imageData.getInt((i3 * 2 + 0 + (k3 * 2 + 0) * i2) * 4);
|
||||
int k4 = imageData.getInt((i3 * 2 + 1 + (k3 * 2 + 0) * i2) * 4);
|
||||
int i5 = imageData.getInt((i3 * 2 + 1 + (k3 * 2 + 1) * i2) * 4);
|
||||
int k5 = imageData.getInt((i3 * 2 + 0 + (k3 * 2 + 1) * i2) * 4);
|
||||
int l5 = averageColor(averageColor(i4, k4), averageColor(i5, k5));
|
||||
imageData.putInt((i3 + k3 * k2) * 4, l5);
|
||||
int idx = texturefx.iconIndex + k + i1 * 16;
|
||||
imageDataA.position(0).limit(tileSize);
|
||||
EaglerAdapter.glTexSubImage2D(3553 /* GL_TEXTURE_2D */, 0, (idx % 16) * 16, (idx / 16) * 16, 16, 16, 6408 /* GL_RGBA */,
|
||||
5121 /* GL_UNSIGNED_BYTE */, imageDataA);
|
||||
if(texturefx.tileImage == 0) {
|
||||
imageDataA.position(0).limit(tileSize);
|
||||
imageDataB1.clear();
|
||||
imageDataB1.put(imageDataA);
|
||||
imageDataB1.flip();
|
||||
int k1 = 1;
|
||||
do {
|
||||
if (k1 > 4) {
|
||||
continue label0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
EaglerAdapter.glTexSubImage2D(3553 /* GL_TEXTURE_2D */, k1, (texturefx.iconIndex % 16) * k2,
|
||||
(texturefx.iconIndex / 16) * k2, k2, k2, 6408 /* GL_RGBA */,
|
||||
5121 /* GL_UNSIGNED_BYTE */, imageData);
|
||||
k1++;
|
||||
} while (true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
label1: for (int j = 0; j < textureList.size(); j++) {
|
||||
TextureFX texturefx1 = (TextureFX) textureList.get(j);
|
||||
if (texturefx1.field_1130_d <= 0) {
|
||||
continue;
|
||||
}
|
||||
imageData.clear();
|
||||
imageData.put(texturefx1.imageData);
|
||||
imageData.position(0).limit(texturefx1.imageData.length);
|
||||
EaglerAdapter.glBindTexture(3553 /* GL_TEXTURE_2D */, texturefx1.field_1130_d);
|
||||
EaglerAdapter.glTexSubImage2D(3553 /* GL_TEXTURE_2D */, 0, 0, 0, 16, 16, 6408 /* GL_RGBA */,
|
||||
5121 /* GL_UNSIGNED_BYTE */, imageData);
|
||||
if (!useMipmaps) {
|
||||
continue;
|
||||
}
|
||||
int l = 1;
|
||||
do {
|
||||
if (l > 4) {
|
||||
continue label1;
|
||||
}
|
||||
int j1 = 16 >> l - 1;
|
||||
int l1 = 16 >> l;
|
||||
for (int j2 = 0; j2 < l1; j2++) {
|
||||
for (int l2 = 0; l2 < l1; l2++) {
|
||||
int j3 = imageData.getInt((j2 * 2 + 0 + (l2 * 2 + 0) * j1) * 4);
|
||||
int l3 = imageData.getInt((j2 * 2 + 1 + (l2 * 2 + 0) * j1) * 4);
|
||||
int j4 = imageData.getInt((j2 * 2 + 1 + (l2 * 2 + 1) * j1) * 4);
|
||||
int l4 = imageData.getInt((j2 * 2 + 0 + (l2 * 2 + 1) * j1) * 4);
|
||||
int j5 = averageColor(averageColor(j3, l3), averageColor(j4, l4));
|
||||
imageData.putInt((j2 + l2 * l1) * 4, j5);
|
||||
int i2 = 16 >> k1 - 1;
|
||||
int k2 = 16 >> k1;
|
||||
imageDataB2.clear();
|
||||
for (int i3 = 0; i3 < k2; i3++) {
|
||||
for (int k3 = 0; k3 < k2; k3++) {
|
||||
int i4 = imageDataB1.getInt((i3 * 2 + 0 + (k3 * 2 + 0) * i2) * 4);
|
||||
int k4 = imageDataB1.getInt((i3 * 2 + 1 + (k3 * 2 + 0) * i2) * 4);
|
||||
int i5 = imageDataB1.getInt((i3 * 2 + 1 + (k3 * 2 + 1) * i2) * 4);
|
||||
int k5 = imageDataB1.getInt((i3 * 2 + 0 + (k3 * 2 + 1) * i2) * 4);
|
||||
int l5 = averageColor(averageColor(i4, k4), averageColor(i5, k5));
|
||||
imageDataB2.putInt((i3 + k3 * k2) * 4, l5);
|
||||
}
|
||||
}
|
||||
EaglerAdapter.glTexSubImage2D(3553 /* GL_TEXTURE_2D */, k1, (idx % 16) * k2, (idx / 16) * k2, k2, k2, 6408 /* GL_RGBA */,
|
||||
5121 /* GL_UNSIGNED_BYTE */, imageDataB2);
|
||||
k1++;
|
||||
ByteBuffer tmp = imageDataB1;
|
||||
imageDataB1 = imageDataB2;
|
||||
imageDataB2 = tmp;
|
||||
} while (true);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
EaglerAdapter.glTexSubImage2D(3553 /* GL_TEXTURE_2D */, l, 0, 0, l1, l1, 6408 /* GL_RGBA */,
|
||||
5121 /* GL_UNSIGNED_BYTE */, imageData);
|
||||
l++;
|
||||
} while (true);
|
||||
}
|
||||
|
||||
// label1: for (int j = 0; j < textureList.size(); j++) {
|
||||
// TextureFX texturefx1 = (TextureFX) textureList.get(j);
|
||||
// if (texturefx1.field_1130_d <= 0) {
|
||||
// continue;
|
||||
// }
|
||||
// imageDataA.clear();
|
||||
// imageDataA.put(texturefx1.imageData);
|
||||
// imageDataA.position(0).limit(texturefx1.imageData.length);
|
||||
// EaglerAdapter.glBindTexture(3553 /* GL_TEXTURE_2D */, texturefx1.field_1130_d);
|
||||
// EaglerAdapter.glTexSubImage2D(3553 /* GL_TEXTURE_2D */, 0, 0, 0, 16, 16, 6408 /* GL_RGBA */,
|
||||
// 5121 /* GL_UNSIGNED_BYTE */, imageDataA);
|
||||
// if(texturefx1.tileImage == 0) {
|
||||
// int l = 1;
|
||||
// do {
|
||||
// if (l > 4) {
|
||||
// continue label1;
|
||||
// }
|
||||
// int j1 = 16 >> l - 1;
|
||||
// int l1 = 16 >> l;
|
||||
// for (int j2 = 0; j2 < l1; j2++) {
|
||||
// for (int l2 = 0; l2 < l1; l2++) {
|
||||
// int j3 = imageDataA.getInt((j2 * 2 + 0 + (l2 * 2 + 0) * j1) * 4);
|
||||
// int l3 = imageDataA.getInt((j2 * 2 + 1 + (l2 * 2 + 0) * j1) * 4);
|
||||
// int j4 = imageDataA.getInt((j2 * 2 + 1 + (l2 * 2 + 1) * j1) * 4);
|
||||
// int l4 = imageDataA.getInt((j2 * 2 + 0 + (l2 * 2 + 1) * j1) * 4);
|
||||
// int j5 = averageColor(averageColor(j3, l3), averageColor(j4, l4));
|
||||
// imageDataB.putInt((j2 + l2 * l1) * 4, j5);
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
// EaglerAdapter.glTexSubImage2D(3553 /* GL_TEXTURE_2D */, l, 0, 0, l1, l1, 6408 /* GL_RGBA */,
|
||||
// 5121 /* GL_UNSIGNED_BYTE */, imageDataB);
|
||||
// ByteBuffer tmp = imageDataA;
|
||||
// imageDataA = imageDataB;
|
||||
// imageDataB = tmp;
|
||||
// l++;
|
||||
// } while (true);
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
private int averageColor(int i, int j) {
|
||||
int k = (i & 0xff000000) >> 24 & 0xff;
|
||||
int l = (j & 0xff000000) >> 24 & 0xff;
|
||||
return ((k + l >> 1) << 24) + ((i & 0xfefefe) + (j & 0xfefefe) >> 1);
|
||||
|
||||
}
|
||||
|
||||
private int weightedAverageColor(int i, int j) {
|
||||
|
@ -331,6 +350,7 @@ public class RenderEngine {
|
|||
}
|
||||
|
||||
public void refreshTextures() {
|
||||
TextureLocation.freeTextures();
|
||||
TexturePackBase texturepackbase = field_6527_k.selectedTexturePack;
|
||||
int i;
|
||||
BufferedImage bufferedimage;
|
||||
|
@ -391,7 +411,9 @@ public class RenderEngine {
|
|||
private HashMap textureMap;
|
||||
private HashMap textureNameToImageMap;
|
||||
private IntBuffer singleIntBuffer;
|
||||
private ByteBuffer imageData;
|
||||
private ByteBuffer imageDataA;
|
||||
private ByteBuffer imageDataB1;
|
||||
private ByteBuffer imageDataB2;
|
||||
private java.util.List textureList;
|
||||
private Map urlToImageDataMap;
|
||||
private GameSettings options;
|
||||
|
|
|
@ -19,4 +19,9 @@ public class RenderEntity extends Render {
|
|||
d2 - entity.lastTickPosZ);
|
||||
EaglerAdapter.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean loadDownloadableImageTexture(String s, String s1) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package net.minecraft.src;
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
|
||||
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
|
||||
|
||||
|
@ -10,6 +11,8 @@ import net.lax1dude.eaglercraft.EaglerAdapter;
|
|||
|
||||
public class RenderFallingSand extends Render {
|
||||
|
||||
private static final TextureLocation terrainTexture = new TextureLocation("/terrain.png");
|
||||
|
||||
public RenderFallingSand() {
|
||||
field_197_d = new RenderBlocks();
|
||||
shadowSize = 0.5F;
|
||||
|
@ -18,7 +21,7 @@ public class RenderFallingSand extends Render {
|
|||
public void func_156_a(EntityFallingSand entityfallingsand, double d, double d1, double d2, float f, float f1) {
|
||||
EaglerAdapter.glPushMatrix();
|
||||
EaglerAdapter.glTranslatef((float) d, (float) d1, (float) d2);
|
||||
loadTexture("/terrain.png");
|
||||
terrainTexture.bindTexture();
|
||||
Block block = Block.blocksList[entityfallingsand.blockID];
|
||||
World world = entityfallingsand.func_465_i();
|
||||
EaglerAdapter.glDisable(2896 /* GL_LIGHTING */);
|
||||
|
@ -33,4 +36,9 @@ public class RenderFallingSand extends Render {
|
|||
}
|
||||
|
||||
private RenderBlocks field_197_d;
|
||||
|
||||
@Override
|
||||
protected boolean loadDownloadableImageTexture(String s, String s1) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package net.minecraft.src;
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
||||
|
||||
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
|
||||
|
@ -11,6 +12,8 @@ import net.lax1dude.eaglercraft.adapter.Tessellator;
|
|||
|
||||
public class RenderFireball extends Render {
|
||||
|
||||
private static final TextureLocation itemsTexture = new TextureLocation("/gui/items.png");
|
||||
|
||||
public RenderFireball() {
|
||||
}
|
||||
|
||||
|
@ -21,7 +24,7 @@ public class RenderFireball extends Render {
|
|||
float f2 = 2.0F;
|
||||
EaglerAdapter.glScalef(f2 / 1.0F, f2 / 1.0F, f2 / 1.0F);
|
||||
int i = Item.snowball.getIconIndex(null);
|
||||
loadTexture("/gui/items.png");
|
||||
itemsTexture.bindTexture();
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
float f3 = (float) ((i % 16) * 16 + 0) / 256F;
|
||||
float f4 = (float) ((i % 16) * 16 + 16) / 256F;
|
||||
|
@ -46,4 +49,9 @@ public class RenderFireball extends Render {
|
|||
public void doRender(Entity entity, double d, double d1, double d2, float f, float f1) {
|
||||
func_4012_a((EntityFireball) entity, d, d1, d2, f, f1);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean loadDownloadableImageTexture(String s, String s1) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package net.minecraft.src;
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
||||
|
||||
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
|
||||
|
@ -11,6 +12,8 @@ import net.lax1dude.eaglercraft.adapter.Tessellator;
|
|||
|
||||
public class RenderFish extends Render {
|
||||
|
||||
private static final TextureLocation particlesTexture = new TextureLocation("/particles.png");
|
||||
|
||||
public RenderFish() {
|
||||
}
|
||||
|
||||
|
@ -21,7 +24,7 @@ public class RenderFish extends Render {
|
|||
EaglerAdapter.glScalef(0.5F, 0.5F, 0.5F);
|
||||
int i = 1;
|
||||
byte byte0 = 2;
|
||||
loadTexture("/particles.png");
|
||||
particlesTexture.bindTexture();
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
float f2 = (float) (i * 8 + 0) / 128F;
|
||||
float f3 = (float) (i * 8 + 8) / 128F;
|
||||
|
@ -98,4 +101,9 @@ public class RenderFish extends Render {
|
|||
public void doRender(Entity entity, double d, double d1, double d2, float f, float f1) {
|
||||
func_4011_a((EntityFish) entity, d, d1, d2, f, f1);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean loadDownloadableImageTexture(String s, String s1) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package net.minecraft.src;
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
|
||||
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
|
||||
|
||||
|
@ -10,6 +11,9 @@ import net.lax1dude.eaglercraft.EaglerAdapter;
|
|||
|
||||
public class RenderGhast extends RenderLiving {
|
||||
|
||||
private static final TextureLocation ghastTexture = new TextureLocation("/mob/ghast.png");
|
||||
private static final TextureLocation ghastFireTexture = new TextureLocation("/mob/ghast_fire.png");
|
||||
|
||||
public RenderGhast() {
|
||||
super(new ModelGhast(), 0.5F);
|
||||
}
|
||||
|
@ -18,6 +22,11 @@ public class RenderGhast extends RenderLiving {
|
|||
EntityGhast entityghast1 = entityghast;
|
||||
float f1 = ((float) entityghast1.prevAttackCounter
|
||||
+ (float) (entityghast1.attackCounter - entityghast1.prevAttackCounter) * f) / 20F;
|
||||
if(f1 <= 10) {
|
||||
ghastTexture.bindTexture();
|
||||
}else {
|
||||
ghastFireTexture.bindTexture();
|
||||
}
|
||||
if (f1 < 0.0F) {
|
||||
f1 = 0.0F;
|
||||
}
|
||||
|
@ -31,4 +40,9 @@ public class RenderGhast extends RenderLiving {
|
|||
protected void preRenderCallback(EntityLiving entityliving, float f) {
|
||||
func_4014_a((EntityGhast) entityliving, f);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean loadDownloadableImageTexture(String s, String s1) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ import java.nio.IntBuffer;
|
|||
import java.util.*;
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
|
@ -545,6 +546,9 @@ public class RenderGlobal implements IWorldAccess {
|
|||
field_1435_x++;
|
||||
}
|
||||
|
||||
private static final TextureLocation terrainSun = new TextureLocation("/terrain/sun.png");
|
||||
private static final TextureLocation terrainMoon = new TextureLocation("/terrain/moon.png");
|
||||
|
||||
public void func_4142_a(float f) {
|
||||
if (mc.theWorld.worldProvider.field_4220_c) {
|
||||
return;
|
||||
|
@ -607,7 +611,7 @@ public class RenderGlobal implements IWorldAccess {
|
|||
EaglerAdapter.glRotatef(0.0F, 0.0F, 0.0F, 1.0F);
|
||||
EaglerAdapter.glRotatef(worldObj.getCelestialAngle(f) * 360F, 1.0F, 0.0F, 0.0F);
|
||||
float f11 = 30F;
|
||||
EaglerAdapter.glBindTexture(3553 /* GL_TEXTURE_2D */, renderEngine.getTexture("/terrain/sun.png"));
|
||||
terrainSun.bindTexture();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.addVertexWithUV(-f11, 100D, -f11, 0.0D, 0.0D);
|
||||
tessellator.addVertexWithUV(f11, 100D, -f11, 1.0D, 0.0D);
|
||||
|
@ -615,7 +619,7 @@ public class RenderGlobal implements IWorldAccess {
|
|||
tessellator.addVertexWithUV(-f11, 100D, f11, 0.0D, 1.0D);
|
||||
tessellator.draw();
|
||||
f11 = 20F;
|
||||
EaglerAdapter.glBindTexture(3553 /* GL_TEXTURE_2D */, renderEngine.getTexture("/terrain/moon.png"));
|
||||
terrainMoon.bindTexture();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.addVertexWithUV(-f11, -100D, f11, 1.0D, 1.0D);
|
||||
tessellator.addVertexWithUV(f11, -100D, f11, 0.0D, 1.0D);
|
||||
|
@ -640,6 +644,8 @@ public class RenderGlobal implements IWorldAccess {
|
|||
EaglerAdapter.glDepthMask(true);
|
||||
}
|
||||
|
||||
private static final TextureLocation cloudsTexture = new TextureLocation("/environment/clouds.png");
|
||||
|
||||
public void func_4141_b(float f) {
|
||||
if (mc.theWorld.worldProvider.field_4220_c) {
|
||||
return;
|
||||
|
@ -654,7 +660,7 @@ public class RenderGlobal implements IWorldAccess {
|
|||
byte byte0 = 32;
|
||||
int i = 256 / byte0;
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
EaglerAdapter.glBindTexture(3553 /* GL_TEXTURE_2D */, renderEngine.getTexture("/environment/clouds.png"));
|
||||
cloudsTexture.bindTexture();
|
||||
EaglerAdapter.glEnable(3042 /* GL_BLEND */);
|
||||
EaglerAdapter.glBlendFunc(770, 771);
|
||||
Vec3D vec3d = worldObj.func_628_d(f);
|
||||
|
@ -717,7 +723,7 @@ public class RenderGlobal implements IWorldAccess {
|
|||
int j = MathHelper.floor_double(d1 / 2048D);
|
||||
d -= i * 2048 /* GL_EXP */;
|
||||
d1 -= j * 2048 /* GL_EXP */;
|
||||
EaglerAdapter.glBindTexture(3553 /* GL_TEXTURE_2D */, renderEngine.getTexture("/environment/clouds.png"));
|
||||
cloudsTexture.bindTexture();
|
||||
EaglerAdapter.glEnable(3042 /* GL_BLEND */);
|
||||
EaglerAdapter.glBlendFunc(770, 771);
|
||||
Vec3D vec3d = worldObj.func_628_d(f);
|
||||
|
@ -959,6 +965,8 @@ public class RenderGlobal implements IWorldAccess {
|
|||
return l == i1 + l1;
|
||||
}
|
||||
|
||||
private static final TextureLocation terrainTexture = new TextureLocation("/terrain.png");
|
||||
|
||||
public void func_959_a(EntityPlayer entityplayer, MovingObjectPosition movingobjectposition, int i,
|
||||
ItemStack itemstack, float f) {
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
@ -970,8 +978,7 @@ public class RenderGlobal implements IWorldAccess {
|
|||
if (i == 0) {
|
||||
if (field_1450_i > 0.0F) {
|
||||
EaglerAdapter.glBlendFunc(774, 768);
|
||||
int j = renderEngine.getTexture("/terrain.png");
|
||||
EaglerAdapter.glBindTexture(3553 /* GL_TEXTURE_2D */, j);
|
||||
terrainTexture.bindTexture();
|
||||
EaglerAdapter.glColor4f(1.0F, 1.0F, 1.0F, 0.5F);
|
||||
EaglerAdapter.glPushMatrix();
|
||||
int k = worldObj.getBlockId(movingobjectposition.blockX, movingobjectposition.blockY,
|
||||
|
@ -1003,8 +1010,7 @@ public class RenderGlobal implements IWorldAccess {
|
|||
EaglerAdapter.glBlendFunc(770, 771);
|
||||
float f1 = MathHelper.sin((float) System.currentTimeMillis() / 100F) * 0.2F + 0.8F;
|
||||
EaglerAdapter.glColor4f(f1, f1, f1, MathHelper.sin((float) System.currentTimeMillis() / 200F) * 0.2F + 0.5F);
|
||||
int l = renderEngine.getTexture("/terrain.png");
|
||||
EaglerAdapter.glBindTexture(3553 /* GL_TEXTURE_2D */, l);
|
||||
terrainTexture.bindTexture();
|
||||
int i1 = movingobjectposition.blockX;
|
||||
int j1 = movingobjectposition.blockY;
|
||||
int k1 = movingobjectposition.blockZ;
|
||||
|
|
|
@ -7,10 +7,14 @@ package net.minecraft.src;
|
|||
import java.util.Random;
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
||||
|
||||
public class RenderItem extends Render {
|
||||
|
||||
private static final TextureLocation terrainTexture = new TextureLocation("/terrain.png");
|
||||
private static final TextureLocation itemsTexture = new TextureLocation("/gui/items.png");
|
||||
|
||||
public RenderItem() {
|
||||
renderBlocks = new RenderBlocks();
|
||||
random = new Random();
|
||||
|
@ -38,7 +42,7 @@ public class RenderItem extends Render {
|
|||
EaglerAdapter.glEnable(32826 /* GL_RESCALE_NORMAL_EXT */);
|
||||
if (itemstack.itemID < 256 && RenderBlocks.func_1219_a(Block.blocksList[itemstack.itemID].getRenderType())) {
|
||||
EaglerAdapter.glRotatef(f3, 0.0F, 1.0F, 0.0F);
|
||||
loadTexture("/terrain.png");
|
||||
terrainTexture.bindTexture();
|
||||
float f4 = 0.25F;
|
||||
if (!Block.blocksList[itemstack.itemID].renderAsNormalBlock()
|
||||
&& itemstack.itemID != Block.stairSingle.blockID) {
|
||||
|
@ -61,9 +65,9 @@ public class RenderItem extends Render {
|
|||
EaglerAdapter.glScalef(0.5F, 0.5F, 0.5F);
|
||||
int i = itemstack.getIconIndex();
|
||||
if (itemstack.itemID < 256) {
|
||||
loadTexture("/terrain.png");
|
||||
terrainTexture.bindTexture();
|
||||
} else {
|
||||
loadTexture("/gui/items.png");
|
||||
itemsTexture.bindTexture();
|
||||
}
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
float f6 = (float) ((i % 16) * 16 + 0) / 256F;
|
||||
|
@ -104,7 +108,7 @@ public class RenderItem extends Render {
|
|||
}
|
||||
if (itemstack.itemID < 256 && RenderBlocks.func_1219_a(Block.blocksList[itemstack.itemID].getRenderType())) {
|
||||
int k = itemstack.itemID;
|
||||
renderengine.bindTexture(renderengine.getTexture("/terrain.png"));
|
||||
terrainTexture.bindTexture();
|
||||
Block block = Block.blocksList[k];
|
||||
EaglerAdapter.glPushMatrix();
|
||||
EaglerAdapter.glTranslatef(i - 2, j + 3, 0.0F);
|
||||
|
@ -119,9 +123,9 @@ public class RenderItem extends Render {
|
|||
} else if (itemstack.getIconIndex() >= 0) {
|
||||
EaglerAdapter.glDisable(2896 /* GL_LIGHTING */);
|
||||
if (itemstack.itemID < 256) {
|
||||
renderengine.bindTexture(renderengine.getTexture("/terrain.png"));
|
||||
terrainTexture.bindTexture();
|
||||
} else {
|
||||
renderengine.bindTexture(renderengine.getTexture("/gui/items.png"));
|
||||
itemsTexture.bindTexture();
|
||||
}
|
||||
renderTexturedQuad(i, j, (itemstack.getIconIndex() % 16) * 16, (itemstack.getIconIndex() / 16) * 16, 16,
|
||||
16);
|
||||
|
@ -193,4 +197,9 @@ public class RenderItem extends Render {
|
|||
|
||||
private RenderBlocks renderBlocks;
|
||||
private Random random;
|
||||
|
||||
@Override
|
||||
protected boolean loadDownloadableImageTexture(String s, String s1) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ import net.lax1dude.eaglercraft.adapter.Tessellator;
|
|||
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
public class RenderLiving extends Render {
|
||||
public abstract class RenderLiving extends Render {
|
||||
|
||||
public RenderLiving(ModelBase modelbase, float f) {
|
||||
mainModel = modelbase;
|
||||
|
|
|
@ -18,15 +18,16 @@ public class RenderManager {
|
|||
entityRenderMap.put(EntityCow.class, new RenderCow(new ModelCow(), 0.7F));
|
||||
entityRenderMap.put(EntityChicken.class, new RenderChicken(new ModelChicken(), 0.3F));
|
||||
entityRenderMap.put(EntityCreeper.class, new RenderCreeper());
|
||||
entityRenderMap.put(EntitySkeleton.class, new RenderBiped(new ModelSkeleton(), 0.5F));
|
||||
entityRenderMap.put(EntityZombie.class, new RenderBiped(new ModelZombie(), 0.5F));
|
||||
entityRenderMap.put(EntitySkeleton.class, new RenderBiped(new ModelSkeleton(), 0.5F, "/mob/skeleton.png"));
|
||||
entityRenderMap.put(EntityPigZombie.class, new RenderBiped(new ModelZombie(), 0.5F, "/mob/pigzombie.png"));
|
||||
entityRenderMap.put(EntityZombie.class, new RenderBiped(new ModelZombie(), 0.5F, "/mob/zombie.png"));
|
||||
entityRenderMap.put(EntitySlime.class, new RenderSlime(new ModelSlime(16), new ModelSlime(0), 0.25F));
|
||||
entityRenderMap.put(EntityPlayer.class, new RenderPlayer());
|
||||
entityRenderMap.put(EntityZombieSimple.class, new RenderZombieSimple(new ModelZombie(), 0.5F, 6F));
|
||||
entityRenderMap.put(EntityGhast.class, new RenderGhast());
|
||||
entityRenderMap.put(EntitySquid.class, new RenderSquid(new ModelSquid(), 0.7F));
|
||||
entityRenderMap.put(EntityLiving.class, new RenderLiving(new ModelBiped(), 0.5F));
|
||||
entityRenderMap.put(Entity.class, new RenderEntity());
|
||||
//entityRenderMap.put(EntityLiving.class, new RenderLiving(new ModelBiped(), 0.5F));
|
||||
//entityRenderMap.put(Entity.class, new RenderEntity());
|
||||
entityRenderMap.put(EntityPainting.class, new RenderPainting());
|
||||
entityRenderMap.put(EntityArrow.class, new RenderArrow());
|
||||
entityRenderMap.put(EntitySnowball.class, new RenderSnowball(Item.snowball.getIconIndex(null)));
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package net.minecraft.src;
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
|
||||
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
|
||||
|
||||
|
@ -10,6 +11,9 @@ import net.lax1dude.eaglercraft.EaglerAdapter;
|
|||
|
||||
public class RenderMinecart extends Render {
|
||||
|
||||
private static final TextureLocation terrainTexture = new TextureLocation("/terrain.png");
|
||||
private static final TextureLocation minecartTexture = new TextureLocation("/item/cart.png");
|
||||
|
||||
public RenderMinecart() {
|
||||
shadowSize = 0.5F;
|
||||
modelMinecart = new ModelMinecart();
|
||||
|
@ -56,7 +60,7 @@ public class RenderMinecart extends Render {
|
|||
0.0F);
|
||||
}
|
||||
if (entityminecart.minecartType != 0) {
|
||||
loadTexture("/terrain.png");
|
||||
terrainTexture.bindTexture();
|
||||
float f5 = 0.75F;
|
||||
EaglerAdapter.glScalef(f5, f5, f5);
|
||||
EaglerAdapter.glTranslatef(0.0F, 0.3125F, 0.0F);
|
||||
|
@ -70,7 +74,7 @@ public class RenderMinecart extends Render {
|
|||
EaglerAdapter.glTranslatef(0.0F, -0.3125F, 0.0F);
|
||||
EaglerAdapter.glScalef(1.0F / f5, 1.0F / f5, 1.0F / f5);
|
||||
}
|
||||
loadTexture("/item/cart.png");
|
||||
minecartTexture.bindTexture();
|
||||
EaglerAdapter.glScalef(-1F, -1F, 1.0F);
|
||||
modelMinecart.render(0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
|
||||
EaglerAdapter.glPopMatrix();
|
||||
|
@ -81,4 +85,9 @@ public class RenderMinecart extends Render {
|
|||
}
|
||||
|
||||
protected ModelBase modelMinecart;
|
||||
|
||||
@Override
|
||||
protected boolean loadDownloadableImageTexture(String s, String s1) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,10 +7,13 @@ package net.minecraft.src;
|
|||
import java.util.Random;
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
||||
|
||||
public class RenderPainting extends Render {
|
||||
|
||||
private static final TextureLocation paintingTexture = new TextureLocation("/art/kz.png");
|
||||
|
||||
public RenderPainting() {
|
||||
rand = new Random();
|
||||
}
|
||||
|
@ -21,7 +24,7 @@ public class RenderPainting extends Render {
|
|||
EaglerAdapter.glTranslatef((float) d, (float) d1, (float) d2);
|
||||
EaglerAdapter.glRotatef(f, 0.0F, 1.0F, 0.0F);
|
||||
EaglerAdapter.glEnable(32826 /* GL_RESCALE_NORMAL_EXT */);
|
||||
loadTexture("/art/kz.png");
|
||||
paintingTexture.bindTexture();
|
||||
EnumArt enumart = entitypainting.art;
|
||||
float f2 = 0.0625F;
|
||||
EaglerAdapter.glScalef(f2, f2, f2);
|
||||
|
@ -122,4 +125,9 @@ public class RenderPainting extends Render {
|
|||
}
|
||||
|
||||
private Random rand;
|
||||
|
||||
@Override
|
||||
protected boolean loadDownloadableImageTexture(String s, String s1) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,22 +1,33 @@
|
|||
package net.minecraft.src;
|
||||
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
|
||||
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
|
||||
// Jad home page: http://www.kpdus.com/jad.html
|
||||
// Decompiler options: packimports(3) braces deadcode
|
||||
|
||||
public class RenderPig extends RenderLiving {
|
||||
|
||||
private static final TextureLocation saddleTexture = new TextureLocation("/mob/saddle.png");
|
||||
private static final TextureLocation pigTexture = new TextureLocation("/mob/pig.png");
|
||||
|
||||
public RenderPig(ModelBase modelbase, ModelBase modelbase1, float f) {
|
||||
super(modelbase, f);
|
||||
setRenderPassModel(modelbase1);
|
||||
}
|
||||
|
||||
protected boolean renderSaddledPig(EntityPig entitypig, int i, float f) {
|
||||
loadTexture("/mob/saddle.png");
|
||||
saddleTexture.bindTexture();
|
||||
return i == 0 && entitypig.func_21068_q();
|
||||
}
|
||||
|
||||
protected boolean shouldRenderPass(EntityLiving entityliving, int i, float f) {
|
||||
return renderSaddledPig((EntityPig) entityliving, i, f);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean loadDownloadableImageTexture(String s, String s1) {
|
||||
pigTexture.bindTexture();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package net.minecraft.src;
|
|||
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
||||
|
||||
// Jad home page: http://www.kpdus.com/jad.html
|
||||
|
@ -11,6 +12,16 @@ import net.minecraft.client.Minecraft;
|
|||
|
||||
public class RenderPlayer extends RenderLiving {
|
||||
|
||||
private static final String[] armorFilenamePrefix = { "cloth", "chain", "iron", "diamond", "gold" };
|
||||
private static final TextureLocation[][] armorTextures = new TextureLocation[armorFilenamePrefix.length][2];
|
||||
|
||||
static {
|
||||
for(int i = 0; i < armorFilenamePrefix.length; ++i) {
|
||||
armorTextures[i][0] = new TextureLocation("/armor/" + armorFilenamePrefix[i] + "_1.png");
|
||||
armorTextures[i][1] = new TextureLocation("/armor/" + armorFilenamePrefix[i] + "_2.png");
|
||||
}
|
||||
}
|
||||
|
||||
public RenderPlayer() {
|
||||
super(new ModelBiped(0.0F), 0.5F);
|
||||
modelBipedMain = (ModelBiped) mainModel;
|
||||
|
@ -24,8 +35,7 @@ public class RenderPlayer extends RenderLiving {
|
|||
Item item = itemstack.getItem();
|
||||
if (item instanceof ItemArmor) {
|
||||
ItemArmor itemarmor = (ItemArmor) item;
|
||||
loadTexture((new StringBuilder()).append("/armor/").append(armorFilenamePrefix[itemarmor.renderIndex])
|
||||
.append("_").append(i != 2 ? 1 : 2).append(".png").toString());
|
||||
armorTextures[itemarmor.renderIndex][i != 2 ? 0 : 1].bindTexture();
|
||||
ModelBiped modelbiped = i != 2 ? modelArmorChestplate : modelArmor;
|
||||
modelbiped.bipedHead.showModel = i == 0;
|
||||
modelbiped.bipedHeadwear.showModel = i == 0;
|
||||
|
@ -279,6 +289,13 @@ public class RenderPlayer extends RenderLiving {
|
|||
private ModelBiped modelBipedMain;
|
||||
private ModelBiped modelArmorChestplate;
|
||||
private ModelBiped modelArmor;
|
||||
private static final String armorFilenamePrefix[] = { "cloth", "chain", "iron", "diamond", "gold" };
|
||||
|
||||
private static final TextureLocation defaultPlayerSkin = new TextureLocation("/mob/char.png");
|
||||
|
||||
@Override
|
||||
protected boolean loadDownloadableImageTexture(String s, String s1) {
|
||||
defaultPlayerSkin.bindTexture();
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package net.minecraft.src;
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
|
||||
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
|
||||
|
||||
|
@ -10,6 +11,9 @@ import net.lax1dude.eaglercraft.EaglerAdapter;
|
|||
|
||||
public class RenderSheep extends RenderLiving {
|
||||
|
||||
private static final TextureLocation sheepTexture = new TextureLocation("/mob/sheep.png");
|
||||
private static final TextureLocation sheepFurTexture = new TextureLocation("/mob/sheep_fur.png");
|
||||
|
||||
public RenderSheep(ModelBase modelbase, ModelBase modelbase1, float f) {
|
||||
super(modelbase, f);
|
||||
setRenderPassModel(modelbase1);
|
||||
|
@ -17,7 +21,7 @@ public class RenderSheep extends RenderLiving {
|
|||
|
||||
protected boolean func_176_a(EntitySheep entitysheep, int i, float f) {
|
||||
if (i == 0 && !entitysheep.func_21072_p()) {
|
||||
loadTexture("/mob/sheep_fur.png");
|
||||
sheepFurTexture.bindTexture();
|
||||
float f1 = entitysheep.getEntityBrightness(f);
|
||||
int j = entitysheep.getFleeceColor();
|
||||
EaglerAdapter.glColor3f(f1 * EntitySheep.field_21075_a[j][0], f1 * EntitySheep.field_21075_a[j][1],
|
||||
|
@ -31,4 +35,10 @@ public class RenderSheep extends RenderLiving {
|
|||
protected boolean shouldRenderPass(EntityLiving entityliving, int i, float f) {
|
||||
return func_176_a((EntitySheep) entityliving, i, f);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean loadDownloadableImageTexture(String s, String s1) {
|
||||
sheepTexture.bindTexture();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package net.minecraft.src;
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
|
||||
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
|
||||
// Jad home page: http://www.kpdus.com/jad.html
|
||||
|
@ -8,6 +9,8 @@ import net.lax1dude.eaglercraft.EaglerAdapter;
|
|||
|
||||
public class RenderSlime extends RenderLiving {
|
||||
|
||||
private static final TextureLocation slimeTexture = new TextureLocation("/mob/slime.png");
|
||||
|
||||
public RenderSlime(ModelBase modelbase, ModelBase modelbase1, float f) {
|
||||
super(modelbase, f);
|
||||
scaleAmount = modelbase1;
|
||||
|
@ -45,4 +48,10 @@ public class RenderSlime extends RenderLiving {
|
|||
}
|
||||
|
||||
private ModelBase scaleAmount;
|
||||
|
||||
@Override
|
||||
protected boolean loadDownloadableImageTexture(String s, String s1) {
|
||||
slimeTexture.bindTexture();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package net.minecraft.src;
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
||||
|
||||
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
|
||||
|
@ -11,6 +12,8 @@ import net.lax1dude.eaglercraft.adapter.Tessellator;
|
|||
|
||||
public class RenderSnowball extends Render {
|
||||
|
||||
private static final TextureLocation itemTexture = new TextureLocation("/gui/items.png");
|
||||
|
||||
public RenderSnowball(int i) {
|
||||
field_20003_a = i;
|
||||
}
|
||||
|
@ -20,7 +23,7 @@ public class RenderSnowball extends Render {
|
|||
EaglerAdapter.glTranslatef((float) d, (float) d1, (float) d2);
|
||||
EaglerAdapter.glEnable(32826 /* GL_RESCALE_NORMAL_EXT */);
|
||||
EaglerAdapter.glScalef(0.5F, 0.5F, 0.5F);
|
||||
loadTexture("/gui/items.png");
|
||||
itemTexture.bindTexture();
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
float f2 = (float) ((field_20003_a % 16) * 16 + 0) / 256F;
|
||||
float f3 = (float) ((field_20003_a % 16) * 16 + 16) / 256F;
|
||||
|
@ -43,4 +46,9 @@ public class RenderSnowball extends Render {
|
|||
}
|
||||
|
||||
private int field_20003_a;
|
||||
|
||||
@Override
|
||||
protected boolean loadDownloadableImageTexture(String s, String s1) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package net.minecraft.src;
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
|
||||
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
|
||||
|
||||
|
@ -10,6 +11,9 @@ import net.lax1dude.eaglercraft.EaglerAdapter;
|
|||
|
||||
public class RenderSpider extends RenderLiving {
|
||||
|
||||
private static final TextureLocation spiderTexture = new TextureLocation("/mob/spider.png");
|
||||
private static final TextureLocation spiderEyesTexture = new TextureLocation("/mob/spider_eyes.png");
|
||||
|
||||
public RenderSpider() {
|
||||
super(new ModelSpider(), 1.0F);
|
||||
setRenderPassModel(new ModelSpider());
|
||||
|
@ -26,7 +30,7 @@ public class RenderSpider extends RenderLiving {
|
|||
if (i != 0) {
|
||||
return false;
|
||||
} else {
|
||||
loadTexture("/mob/spider_eyes.png");
|
||||
spiderEyesTexture.bindTexture();
|
||||
float f1 = (1.0F - entityspider.getEntityBrightness(1.0F)) * 0.5F;
|
||||
EaglerAdapter.glEnable(3042 /* GL_BLEND */);
|
||||
EaglerAdapter.glDisable(3008 /* GL_ALPHA_TEST */);
|
||||
|
@ -43,4 +47,10 @@ public class RenderSpider extends RenderLiving {
|
|||
protected boolean shouldRenderPass(EntityLiving entityliving, int i, float f) {
|
||||
return func_190_a((EntitySpider) entityliving, i, f);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean loadDownloadableImageTexture(String s, String s1) {
|
||||
spiderTexture.bindTexture();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package net.minecraft.src;
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
|
||||
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
|
||||
|
||||
|
@ -10,6 +11,8 @@ import net.lax1dude.eaglercraft.EaglerAdapter;
|
|||
|
||||
public class RenderSquid extends RenderLiving {
|
||||
|
||||
private static final TextureLocation squidTexture = new TextureLocation("/mob/squid.png");
|
||||
|
||||
public RenderSquid(ModelBase modelbase, float f) {
|
||||
super(modelbase, f);
|
||||
}
|
||||
|
@ -55,4 +58,10 @@ public class RenderSquid extends RenderLiving {
|
|||
public void doRender(Entity entity, double d, double d1, double d2, float f, float f1) {
|
||||
func_21008_a((EntitySquid) entity, d, d1, d2, f, f1);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean loadDownloadableImageTexture(String s, String s1) {
|
||||
squidTexture.bindTexture();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package net.minecraft.src;
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
|
||||
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
|
||||
|
||||
|
@ -10,6 +11,8 @@ import net.lax1dude.eaglercraft.EaglerAdapter;
|
|||
|
||||
public class RenderTNTPrimed extends Render {
|
||||
|
||||
private static final TextureLocation terrainTexture = new TextureLocation("/terrain.png");
|
||||
|
||||
public RenderTNTPrimed() {
|
||||
field_196_d = new RenderBlocks();
|
||||
shadowSize = 0.5F;
|
||||
|
@ -32,7 +35,7 @@ public class RenderTNTPrimed extends Render {
|
|||
EaglerAdapter.glScalef(f4, f4, f4);
|
||||
}
|
||||
float f3 = (1.0F - (((float) entitytntprimed.fuse - f1) + 1.0F) / 100F) * 0.8F;
|
||||
loadTexture("/terrain.png");
|
||||
terrainTexture.bindTexture();
|
||||
field_196_d.func_1227_a(Block.tnt, 0);
|
||||
if ((entitytntprimed.fuse / 5) % 2 == 0) {
|
||||
EaglerAdapter.glDisable(3553 /* GL_TEXTURE_2D */);
|
||||
|
@ -54,4 +57,9 @@ public class RenderTNTPrimed extends Render {
|
|||
}
|
||||
|
||||
private RenderBlocks field_196_d;
|
||||
|
||||
@Override
|
||||
protected boolean loadDownloadableImageTexture(String s, String s1) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package net.minecraft.src;
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
|
||||
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
|
||||
|
||||
|
@ -10,6 +11,8 @@ import net.lax1dude.eaglercraft.EaglerAdapter;
|
|||
|
||||
public class RenderZombieSimple extends RenderLiving {
|
||||
|
||||
private static final TextureLocation zombieTexture = new TextureLocation("/mob/zombie.png");
|
||||
|
||||
public RenderZombieSimple(ModelBase modelbase, float f, float f1) {
|
||||
super(modelbase, f * f1);
|
||||
scale = f1;
|
||||
|
@ -24,4 +27,10 @@ public class RenderZombieSimple extends RenderLiving {
|
|||
}
|
||||
|
||||
private float scale;
|
||||
|
||||
@Override
|
||||
protected boolean loadDownloadableImageTexture(String s, String s1) {
|
||||
zombieTexture.bindTexture();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,138 +65,6 @@ public class TerrainTextureManager {
|
|||
|
||||
}
|
||||
|
||||
public void func_799_a(IsoImageBuffer isoimagebuffer) {
|
||||
World world = isoimagebuffer.worldObj;
|
||||
if (world == null) {
|
||||
isoimagebuffer.field_1351_f = true;
|
||||
isoimagebuffer.field_1352_e = true;
|
||||
return;
|
||||
}
|
||||
int i = isoimagebuffer.field_1354_c * 16;
|
||||
int j = isoimagebuffer.field_1353_d * 16;
|
||||
int k = i + 16;
|
||||
int l = j + 16;
|
||||
Chunk chunk = world.getChunkFromChunkCoords(isoimagebuffer.field_1354_c, isoimagebuffer.field_1353_d);
|
||||
if (chunk.func_21167_h()) {
|
||||
isoimagebuffer.field_1351_f = true;
|
||||
isoimagebuffer.field_1352_e = true;
|
||||
return;
|
||||
}
|
||||
isoimagebuffer.field_1351_f = false;
|
||||
Arrays.fill(field_1186_c, 0);
|
||||
Arrays.fill(field_1185_d, 0);
|
||||
Arrays.fill(field_1183_f, 160);
|
||||
for (int i1 = l - 1; i1 >= j; i1--) {
|
||||
for (int j1 = k - 1; j1 >= i; j1--) {
|
||||
int k1 = j1 - i;
|
||||
int l1 = i1 - j;
|
||||
int i2 = k1 + l1;
|
||||
boolean flag = true;
|
||||
for (int j2 = 0; j2 < 128; j2++) {
|
||||
int k2 = ((l1 - k1 - j2) + 160) - 16;
|
||||
if (k2 >= field_1183_f[i2] && k2 >= field_1183_f[i2 + 1]) {
|
||||
continue;
|
||||
}
|
||||
Block block = Block.blocksList[world.getBlockId(j1, j2, i1)];
|
||||
if (block == null) {
|
||||
flag = false;
|
||||
continue;
|
||||
}
|
||||
if (block.blockMaterial == Material.water) {
|
||||
int l2 = world.getBlockId(j1, j2 + 1, i1);
|
||||
if (l2 != 0 && Block.blocksList[l2].blockMaterial == Material.water) {
|
||||
continue;
|
||||
}
|
||||
float f1 = ((float) j2 / 127F) * 0.6F + 0.4F;
|
||||
float f2 = world.getLightBrightness(j1, j2 + 1, i1) * f1;
|
||||
if (k2 < 0 || k2 >= 160) {
|
||||
continue;
|
||||
}
|
||||
int i4 = i2 + k2 * 32;
|
||||
if (i2 >= 0 && i2 <= 32 && field_1185_d[i4] <= j2) {
|
||||
field_1185_d[i4] = j2;
|
||||
field_1184_e[i4] = (int) (f2 * 127F);
|
||||
}
|
||||
if (i2 >= -1 && i2 <= 31 && field_1185_d[i4 + 1] <= j2) {
|
||||
field_1185_d[i4 + 1] = j2;
|
||||
field_1184_e[i4 + 1] = (int) (f2 * 127F);
|
||||
}
|
||||
flag = false;
|
||||
continue;
|
||||
}
|
||||
if (flag) {
|
||||
if (k2 < field_1183_f[i2]) {
|
||||
field_1183_f[i2] = k2;
|
||||
}
|
||||
if (k2 < field_1183_f[i2 + 1]) {
|
||||
field_1183_f[i2 + 1] = k2;
|
||||
}
|
||||
}
|
||||
float f = ((float) j2 / 127F) * 0.6F + 0.4F;
|
||||
if (k2 >= 0 && k2 < 160) {
|
||||
int i3 = i2 + k2 * 32;
|
||||
int k3 = field_1182_g[block.blockID * 3 + 0];
|
||||
float f3 = (world.getLightBrightness(j1, j2 + 1, i1) * 0.8F + 0.2F) * f;
|
||||
int j4 = k3;
|
||||
if (i2 >= 0) {
|
||||
float f5 = f3;
|
||||
if (field_1186_c[i3] <= j2) {
|
||||
field_1186_c[i3] = j2;
|
||||
field_1180_b[i3] = 0xff000000 | (int) (field_1181_a[j4 * 3 + 0] * f5) << 16
|
||||
| (int) (field_1181_a[j4 * 3 + 1] * f5) << 8
|
||||
| (int) (field_1181_a[j4 * 3 + 2] * f5);
|
||||
}
|
||||
}
|
||||
if (i2 < 31) {
|
||||
float f6 = f3 * 0.9F;
|
||||
if (field_1186_c[i3 + 1] <= j2) {
|
||||
field_1186_c[i3 + 1] = j2;
|
||||
field_1180_b[i3 + 1] = 0xff000000 | (int) (field_1181_a[j4 * 3 + 0] * f6) << 16
|
||||
| (int) (field_1181_a[j4 * 3 + 1] * f6) << 8
|
||||
| (int) (field_1181_a[j4 * 3 + 2] * f6);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (k2 < -1 || k2 >= 159) {
|
||||
continue;
|
||||
}
|
||||
int j3 = i2 + (k2 + 1) * 32;
|
||||
int l3 = field_1182_g[block.blockID * 3 + 1];
|
||||
float f4 = world.getLightBrightness(j1 - 1, j2, i1) * 0.8F + 0.2F;
|
||||
int k4 = field_1182_g[block.blockID * 3 + 2];
|
||||
float f7 = world.getLightBrightness(j1, j2, i1 + 1) * 0.8F + 0.2F;
|
||||
if (i2 >= 0) {
|
||||
float f8 = f4 * f * 0.6F;
|
||||
if (field_1186_c[j3] <= j2 - 1) {
|
||||
field_1186_c[j3] = j2 - 1;
|
||||
field_1180_b[j3] = 0xff000000 | (int) (field_1181_a[l3 * 3 + 0] * f8) << 16
|
||||
| (int) (field_1181_a[l3 * 3 + 1] * f8) << 8
|
||||
| (int) (field_1181_a[l3 * 3 + 2] * f8);
|
||||
}
|
||||
}
|
||||
if (i2 >= 31) {
|
||||
continue;
|
||||
}
|
||||
float f9 = f7 * 0.9F * f * 0.4F;
|
||||
if (field_1186_c[j3 + 1] <= j2 - 1) {
|
||||
field_1186_c[j3 + 1] = j2 - 1;
|
||||
field_1180_b[j3 + 1] = 0xff000000 | (int) (field_1181_a[k4 * 3 + 0] * f9) << 16
|
||||
| (int) (field_1181_a[k4 * 3 + 1] * f9) << 8 | (int) (field_1181_a[k4 * 3 + 2] * f9);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func_800_a();
|
||||
if (isoimagebuffer.field_1348_a == null) {
|
||||
isoimagebuffer.field_1348_a = new BufferedImage(32, 160, 2);
|
||||
}
|
||||
isoimagebuffer.field_1348_a.setRGB(0, 0, 32, 160, field_1180_b, 0, 32);
|
||||
isoimagebuffer.field_1352_e = true;
|
||||
}
|
||||
|
||||
private void func_800_a() {
|
||||
for (int i = 0; i < 32; i++) {
|
||||
for (int j = 0; j < 160; j++) {
|
||||
|
|
|
@ -4,9 +4,13 @@ package net.minecraft.src;
|
|||
// Decompiler options: packimports(3) braces deadcode
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
|
||||
public class TextureFX {
|
||||
|
||||
private static final TextureLocation terrainTexture = new TextureLocation("/terrain.png");
|
||||
private static final TextureLocation itemsTexture = new TextureLocation("/gui/items.png");
|
||||
|
||||
public TextureFX(int i) {
|
||||
imageData = new byte[1024 /* GL_FRONT_LEFT */];
|
||||
anaglyphEnabled = false;
|
||||
|
@ -21,9 +25,9 @@ public class TextureFX {
|
|||
|
||||
public void bindImage(RenderEngine renderengine) {
|
||||
if (tileImage == 0) {
|
||||
EaglerAdapter.glBindTexture(3553 /* GL_TEXTURE_2D */, renderengine.getTexture("/terrain.png"));
|
||||
terrainTexture.bindTexture();
|
||||
} else if (tileImage == 1) {
|
||||
EaglerAdapter.glBindTexture(3553 /* GL_TEXTURE_2D */, renderengine.getTexture("/gui/items.png"));
|
||||
itemsTexture.bindTexture();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,10 +10,13 @@ import java.util.zip.ZipFile;
|
|||
import javax.imageio.ImageIO;
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
public class TexturePackCustom extends TexturePackBase {
|
||||
|
||||
private static final TextureLocation unknownPack = new TextureLocation("/gui/unknown_pack.png");
|
||||
|
||||
public TexturePackCustom(File file) {
|
||||
texturePackName = -1;
|
||||
texturePackFileName = file.getName();
|
||||
|
@ -76,7 +79,7 @@ public class TexturePackCustom extends TexturePackBase {
|
|||
if (texturePackThumbnail != null) {
|
||||
minecraft.renderEngine.bindTexture(texturePackName);
|
||||
} else {
|
||||
EaglerAdapter.glBindTexture(3553 /* GL_TEXTURE_2D */, minecraft.renderEngine.getTexture("/gui/unknown_pack.png"));
|
||||
unknownPack.bindTexture();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -9,10 +9,13 @@ import java.io.IOException;
|
|||
import javax.imageio.ImageIO;
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
public class TexturePackDefault extends TexturePackBase {
|
||||
|
||||
private static final TextureLocation unknownPack = new TextureLocation("/gui/unknown_pack.png");
|
||||
|
||||
public TexturePackDefault() {
|
||||
texturePackName = -1;
|
||||
texturePackFileName = "Default";
|
||||
|
@ -37,7 +40,7 @@ public class TexturePackDefault extends TexturePackBase {
|
|||
if (texturePackThumbnail != null) {
|
||||
minecraft.renderEngine.bindTexture(texturePackName);
|
||||
} else {
|
||||
EaglerAdapter.glBindTexture(3553 /* GL_TEXTURE_2D */, minecraft.renderEngine.getTexture("/gui/unknown_pack.png"));
|
||||
unknownPack.bindTexture();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package net.minecraft.src;
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
|
||||
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
|
||||
|
||||
|
@ -10,6 +11,8 @@ import net.lax1dude.eaglercraft.EaglerAdapter;
|
|||
|
||||
public class TileEntitySignRenderer extends TileEntitySpecialRenderer {
|
||||
|
||||
private static final TextureLocation signTexture = new TextureLocation("/item/sign.png");
|
||||
|
||||
public TileEntitySignRenderer() {
|
||||
signModel = new SignModel();
|
||||
}
|
||||
|
@ -40,7 +43,7 @@ public class TileEntitySignRenderer extends TileEntitySpecialRenderer {
|
|||
EaglerAdapter.glTranslatef(0.0F, -0.3125F, -0.4375F);
|
||||
signModel.field_1345_b.showModel = false;
|
||||
}
|
||||
bindTextureByName("/item/sign.png");
|
||||
signTexture.bindTexture();
|
||||
EaglerAdapter.glPushMatrix();
|
||||
EaglerAdapter.glScalef(f1, -f1, -f1);
|
||||
signModel.func_887_a();
|
||||
|
|
|
@ -11,6 +11,7 @@ public abstract class TileEntitySpecialRenderer {
|
|||
|
||||
public abstract void renderTileEntityAt(TileEntity tileentity, double d, double d1, double d2, float f);
|
||||
|
||||
@Deprecated
|
||||
protected void bindTextureByName(String s) {
|
||||
RenderEngine renderengine = tileEntityRenderer.renderEngine;
|
||||
renderengine.bindTexture(renderengine.getTexture(s));
|
||||
|
|
Loading…
Reference in New Issue
Block a user