Compare commits
10 Commits
f82f9a6758
...
3f9ff320b8
Author | SHA1 | Date | |
---|---|---|---|
|
3f9ff320b8 | ||
|
51af5040eb | ||
|
ff233945dc | ||
|
554f270734 | ||
|
301f840019 | ||
|
106c876660 | ||
|
8250da4ba0 | ||
|
8c9a3ba5c5 | ||
|
6581f557ee | ||
|
7ee99e5bfe |
|
@ -6,12 +6,7 @@
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
<attribute name="gradle_used_by_scope" value="main,test"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/">
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
|
||||||
<attributes>
|
|
||||||
<attribute name="module" value="true"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
|
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/TeaVM"/>
|
|
||||||
<classpathentry kind="output" path="bin/default"/>
|
<classpathentry kind="output" path="bin/default"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
4
.project
4
.project
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<projectDescription>
|
<projectDescription>
|
||||||
<name>Alpha v1.2.6</name>
|
<name>Indev</name>
|
||||||
<comment>Project Alpha v1.2.6 created by Buildship.</comment>
|
<comment>Project Indev created by Buildship.</comment>
|
||||||
<projects>
|
<projects>
|
||||||
</projects>
|
</projects>
|
||||||
<buildSpec>
|
<buildSpec>
|
||||||
|
|
4994
Indev.html
Normal file
4994
Indev.html
Normal file
File diff suppressed because one or more lines are too long
31
Offline_Download_Template.txt
Normal file
31
Offline_Download_Template.txt
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Minecraft Indev</title>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
window.addEventListener("load", function() {
|
||||||
|
window.classicConfig = [
|
||||||
|
"game_frame",createAssetURI("assets"),
|
||||||
|
]; main();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
function createAssetURI(el) {
|
||||||
|
var eee = document.getElementById(el);
|
||||||
|
var str = eee.innerText;
|
||||||
|
eee.remove();
|
||||||
|
return "data:application/octet-stream;base64," + str.trim();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
//app.js
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<body style="margin:0px;width:100vw;height:100vh;" id="game_frame">
|
||||||
|
<div style="display:none;" id="assets">
|
||||||
|
//Base64 encoded resources
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
30
README.md
30
README.md
|
@ -1 +1,29 @@
|
||||||
# Minecraft-Indev-WebGL
|
# Minecraft Indev WebGL
|
||||||
|
|
||||||
|
This project aims to be a 1:1 replica of Minecraft Indev 20100223 made using TeaVM and WebGL. This project can be played on almost any device and can be played in the web browser on low-end devices like Chromebooks.
|
||||||
|
|
||||||
|
# Project Takedown
|
||||||
|
This project is just for fun, If this project has to be taken down for any legal reasons please email me at PeytonPlayz585@gmail.com
|
||||||
|
|
||||||
|
# Playing in the Web Browser
|
||||||
|
To play in the web browser please [click here](https://peytonplayz595.github.io/Minecraft-Indev-WebGL/js/). If for some reason it doesn't work please open an issue [here](https://github.com/PeytonPlayz595/Minecraft-Indev-WebGL/issues).
|
||||||
|
|
||||||
|
Here are a few reasons that it might not work:
|
||||||
|
- Your browser doesn't support [HTML5](https://developer.mozilla.org/en-US/docs/Glossary/HTML5), at this point there is no valid excuses...
|
||||||
|
- Your browser doesn't support [WebGL 2.0](https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API)
|
||||||
|
- Your browser doesn't support [Pointer Lock API](https://developer.mozilla.org/en-US/docs/Web/API/Pointer_Lock_API)
|
||||||
|
- Your browser doesn't support [IndexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API)
|
||||||
|
|
||||||
|
Try using the latest versions of Chrome, Edge, Opera, or Safari to see if it will work, if it doesn't it might be a driver glitch so just open an issue.
|
||||||
|
|
||||||
|
# Pros and Cons
|
||||||
|
Pros:
|
||||||
|
- No download, it's playable in your Web Browser for free
|
||||||
|
- Get's decant FPS on low-end devices like Chromebooks
|
||||||
|
|
||||||
|
Cons:
|
||||||
|
- It's technically a pirated version of the game
|
||||||
|
- There will be unexpected bugs and glitches
|
||||||
|
- Probably will be removed due to a DMCA
|
||||||
|
|
||||||
|
# Screenshots
|
||||||
|
|
|
@ -37,7 +37,7 @@ dependencies {
|
||||||
teavm {
|
teavm {
|
||||||
|
|
||||||
compileScopes = null;
|
compileScopes = null;
|
||||||
minifying = false;
|
minifying = true;
|
||||||
maxTopLevelNames = 10000;
|
maxTopLevelNames = 10000;
|
||||||
properties = null;
|
properties = null;
|
||||||
debugInformationGenerated = false;
|
debugInformationGenerated = false;
|
||||||
|
|
BIN
jars/jzliib/jzlib-1.1.3.jar
Normal file
BIN
jars/jzliib/jzlib-1.1.3.jar
Normal file
Binary file not shown.
BIN
jars/teavm/teavm-interop-0.6.1.jar
Normal file
BIN
jars/teavm/teavm-interop-0.6.1.jar
Normal file
Binary file not shown.
BIN
jars/teavm/teavm-jso-0.6.1.jar
Normal file
BIN
jars/teavm/teavm-jso-0.6.1.jar
Normal file
Binary file not shown.
BIN
jars/teavm/teavm-jso-apis-0.6.1.jar
Normal file
BIN
jars/teavm/teavm-jso-apis-0.6.1.jar
Normal file
Binary file not shown.
File diff suppressed because one or more lines are too long
|
@ -1,7 +1,7 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Main page</title>
|
<title>Indev</title>
|
||||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
||||||
<script type="text/javascript" charset="utf-8" src="app.js"></script>
|
<script type="text/javascript" charset="utf-8" src="app.js"></script>
|
||||||
<script type = text/javascript>
|
<script type = text/javascript>
|
||||||
|
@ -17,4 +17,4 @@
|
||||||
</head>
|
</head>
|
||||||
<body style="margin:0px;width:100vw;height:100vh;" id="game_frame">
|
<body style="margin:0px;width:100vw;height:100vh;" id="game_frame">
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,40 +1,55 @@
|
||||||
package net.PeytonPlayz585.minecraft;
|
package net.PeytonPlayz585.minecraft;
|
||||||
|
|
||||||
|
import java.nio.IntBuffer;
|
||||||
|
|
||||||
public class MinecraftImage {
|
public class MinecraftImage {
|
||||||
|
|
||||||
public final int[] data;
|
public final IntBuffer data;
|
||||||
public final int w;
|
public final int w;
|
||||||
public final int h;
|
public final int h;
|
||||||
public final boolean alpha;
|
public final boolean alpha;
|
||||||
|
private final int wh;
|
||||||
|
|
||||||
public MinecraftImage(int pw, int ph, boolean palpha) {
|
public MinecraftImage(int pw, int ph, boolean palpha) {
|
||||||
this.w = pw;
|
this.w = pw;
|
||||||
this.h = ph;
|
this.h = ph;
|
||||||
this.alpha = palpha;
|
this.alpha = palpha;
|
||||||
this.data = new int[pw * ph];
|
this.data = IntBuffer.allocate(pw * ph);
|
||||||
}
|
this.wh = pw * ph;
|
||||||
|
}
|
||||||
|
|
||||||
public MinecraftImage(int[] pdata, int pw, int ph, boolean palpha) {
|
public MinecraftImage(IntBuffer pdata, int pw, int ph, boolean palpha) {
|
||||||
if (pdata.length != pw * ph) {
|
if (pdata.capacity() != pw * ph) {
|
||||||
throw new IllegalArgumentException("array size does not equal image size");
|
throw new IllegalArgumentException("buffer capacity does not equal image size");
|
||||||
}
|
}
|
||||||
this.w = pw;
|
w = pw;
|
||||||
this.h = ph;
|
h = ph;
|
||||||
this.alpha = palpha;
|
alpha = palpha;
|
||||||
if (!palpha) {
|
wh = pw * ph;
|
||||||
for (int i = 0; i < pdata.length; ++i) {
|
if (!alpha) {
|
||||||
pdata[i] = pdata[i] | 0xFF000000;
|
for (int i = 0; i < wh; ++i) {
|
||||||
}
|
pdata.put(i, pdata.get(i) | 0xFF000000);
|
||||||
}
|
}
|
||||||
this.data = pdata;
|
pdata.rewind();
|
||||||
}
|
}
|
||||||
|
data = pdata;
|
||||||
|
}
|
||||||
|
|
||||||
public MinecraftImage getSubImage(int x, int y, int pw, int ph) {
|
public MinecraftImage getSubImage(int x, int y, int pw, int ph) {
|
||||||
int[] img = new int[pw * ph];
|
int start = y * w + x;
|
||||||
for (int i = 0; i < ph; ++i) {
|
IntBuffer subBuffer = data.slice();
|
||||||
System.arraycopy(data, (i + y) * this.w + x, img, i * pw, pw);
|
subBuffer.position(start);
|
||||||
}
|
subBuffer.limit(start + pw * ph);
|
||||||
return new MinecraftImage(img, pw, ph, alpha);
|
int[] temp = new int[pw * ph];
|
||||||
}
|
subBuffer.get(temp);
|
||||||
|
IntBuffer newBuffer = IntBuffer.wrap(temp);
|
||||||
|
return new MinecraftImage(newBuffer, pw, ph, alpha);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int[] data() {
|
||||||
|
int[] array = new int[wh];
|
||||||
|
data.rewind();
|
||||||
|
data.get(array);
|
||||||
|
return array;
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
package net.minecraft.client;
|
package net.minecraft.client;
|
||||||
|
|
||||||
|
import java.nio.FloatBuffer;
|
||||||
import java.nio.IntBuffer;
|
import java.nio.IntBuffer;
|
||||||
|
|
||||||
import net.PeytonPlayz585.storage.LevelStorageManager;
|
import net.PeytonPlayz585.storage.LevelStorageManager;
|
||||||
|
@ -35,9 +36,11 @@ import net.minecraft.game.level.World;
|
||||||
import net.minecraft.game.level.block.Block;
|
import net.minecraft.game.level.block.Block;
|
||||||
import net.minecraft.game.level.generator.LevelGenerator;
|
import net.minecraft.game.level.generator.LevelGenerator;
|
||||||
import net.minecraft.game.physics.MovingObjectPosition;
|
import net.minecraft.game.physics.MovingObjectPosition;
|
||||||
|
import net.minecraft.game.physics.Vec3D;
|
||||||
import util.IProgressUpdate;
|
import util.IProgressUpdate;
|
||||||
|
|
||||||
import org.lwjgl.BufferUtils;
|
import org.lwjgl.BufferUtils;
|
||||||
|
import org.lwjgl.GLAllocation;
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
public final class Minecraft implements Runnable {
|
public final class Minecraft implements Runnable {
|
||||||
|
@ -697,4 +700,32 @@ public final class Minecraft implements Runnable {
|
||||||
public static Minecraft getMinecraft() {
|
public static Minecraft getMinecraft() {
|
||||||
return mc;
|
return mc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final void setLighting(boolean var1) {
|
||||||
|
if(!var1) {
|
||||||
|
GL11.glDisable(2896);
|
||||||
|
GL11.glDisable(16384);
|
||||||
|
} else {
|
||||||
|
GL11.glEnable(2896);
|
||||||
|
GL11.glEnable(16384);
|
||||||
|
GL11.glEnable(2903);
|
||||||
|
GL11.glColorMaterial(1032, 5634);
|
||||||
|
float var4 = 0.7F;
|
||||||
|
float var2 = 0.3F;
|
||||||
|
Vec3D var3 = (new Vec3D(0.0F, -1.0F, 0.5F)).normalize();
|
||||||
|
GL11.glLight(16384, 4611, this.createBuffer(var3.xCoord, var3.yCoord, var3.zCoord, 0.0F));
|
||||||
|
GL11.glLight(16384, 4609, this.createBuffer(var2, var2, var2, 1.0F));
|
||||||
|
GL11.glLight(16384, 4608, this.createBuffer(0.0F, 0.0F, 0.0F, 1.0F));
|
||||||
|
GL11.glLightModel(2899, this.createBuffer(var4, var4, var4, 1.0F));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private FloatBuffer createBuffer(float var1, float var2, float var3, float var4) {
|
||||||
|
buffer.clear();
|
||||||
|
buffer.put(var1).put(var2).put(var3).put(var4);
|
||||||
|
buffer.flip();
|
||||||
|
return buffer;
|
||||||
|
}
|
||||||
|
|
||||||
|
private FloatBuffer buffer = GLAllocation.createDirectFloatBuffer(16);
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ public class FontRenderer {
|
||||||
MinecraftImage bufferedimage = GL11.loadPNG(GL11.loadResourceBytes(s));
|
MinecraftImage bufferedimage = GL11.loadPNG(GL11.loadResourceBytes(s));
|
||||||
int i = bufferedimage.w;
|
int i = bufferedimage.w;
|
||||||
int j = bufferedimage.h;
|
int j = bufferedimage.h;
|
||||||
int ai[] = bufferedimage.data;
|
int ai[] = bufferedimage.data();
|
||||||
for (int k = 0; k < 256; k++) {
|
for (int k = 0; k < 256; k++) {
|
||||||
int l = k % 16;
|
int l = k % 16;
|
||||||
int k1 = k / 16;
|
int k1 = k / 16;
|
||||||
|
|
|
@ -211,39 +211,6 @@ public final class ItemRenderer {
|
||||||
Tessellator var3;
|
Tessellator var3;
|
||||||
float var7;
|
float var7;
|
||||||
float var9;
|
float var9;
|
||||||
if(this.mc.thePlayer.fire > 0) {
|
|
||||||
var2 = this.mc.renderEngine.getTexture("/terrain.png");
|
|
||||||
GL11.glBindTexture(GL11.GL_TEXTURE_2D, var2);
|
|
||||||
var3 = Tessellator.instance;
|
|
||||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.9F);
|
|
||||||
GL11.glEnable(GL11.GL_BLEND);
|
|
||||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
|
||||||
|
|
||||||
for(var2 = 0; var2 < 2; ++var2) {
|
|
||||||
GL11.glPushMatrix();
|
|
||||||
int var4 = Block.fire.blockIndexInTexture + (var2 << 4);
|
|
||||||
int var5 = (var4 & 15) << 4;
|
|
||||||
var4 &= 240;
|
|
||||||
float var6 = (float)var5 / 256.0F;
|
|
||||||
float var10 = ((float)var5 + 15.99F) / 256.0F;
|
|
||||||
var7 = (float)var4 / 256.0F;
|
|
||||||
var9 = ((float)var4 + 15.99F) / 256.0F;
|
|
||||||
GL11.glTranslatef((float)(-((var2 << 1) - 1)) * 0.24F, -0.3F, 0.0F);
|
|
||||||
GL11.glRotatef((float)((var2 << 1) - 1) * 10.0F, 0.0F, 1.0F, 0.0F);
|
|
||||||
var3.startDrawingQuads();
|
|
||||||
var3.addVertexWithUV(-0.5F, -0.5F, -0.5F, var10, var9);
|
|
||||||
var3.addVertexWithUV(0.5F, -0.5F, -0.5F, var6, var9);
|
|
||||||
var3.addVertexWithUV(0.5F, 0.5F, -0.5F, var6, var7);
|
|
||||||
var3.addVertexWithUV(-0.5F, 0.5F, -0.5F, var10, var7);
|
|
||||||
GL11.flipLightMatrix();
|
|
||||||
var3.draw();
|
|
||||||
GL11.flipLightMatrix();
|
|
||||||
GL11.glPopMatrix();
|
|
||||||
}
|
|
||||||
|
|
||||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
|
||||||
GL11.glDisable(GL11.GL_BLEND);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(this.mc.thePlayer.isInsideOfWater()) {
|
if(this.mc.thePlayer.isInsideOfWater()) {
|
||||||
var2 = this.mc.renderEngine.getTexture("/water.png");
|
var2 = this.mc.renderEngine.getTexture("/water.png");
|
||||||
|
|
|
@ -2,14 +2,19 @@ package net.minecraft.client.render;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
|
import java.nio.FloatBuffer;
|
||||||
import java.nio.IntBuffer;
|
import java.nio.IntBuffer;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
import org.lwjgl.BufferUtils;
|
import org.lwjgl.BufferUtils;
|
||||||
|
import org.lwjgl.GLAllocation;
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
import net.minecraft.game.physics.Vec3D;
|
||||||
|
|
||||||
import net.PeytonPlayz585.minecraft.MinecraftImage;
|
import net.PeytonPlayz585.minecraft.MinecraftImage;
|
||||||
import net.minecraft.client.GameSettings;
|
import net.minecraft.client.GameSettings;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
|
||||||
public class RenderEngine {
|
public class RenderEngine {
|
||||||
|
|
||||||
|
@ -18,6 +23,7 @@ public class RenderEngine {
|
||||||
textureNameToImageMap = new HashMap<Integer, MinecraftImage>();
|
textureNameToImageMap = new HashMap<Integer, MinecraftImage>();
|
||||||
singleIntBuffer = BufferUtils.createIntBuffer(1);
|
singleIntBuffer = BufferUtils.createIntBuffer(1);
|
||||||
imageDataB1 = BufferUtils.createByteBuffer(0x100000);
|
imageDataB1 = BufferUtils.createByteBuffer(0x100000);
|
||||||
|
imageDataB2 = BufferUtils.createByteBuffer(0x100000);
|
||||||
clampTexture = false;
|
clampTexture = false;
|
||||||
blurTexture = false;
|
blurTexture = false;
|
||||||
options = gamesettings;
|
options = gamesettings;
|
||||||
|
@ -76,8 +82,9 @@ public class RenderEngine {
|
||||||
|
|
||||||
public void setupTexture(MinecraftImage bufferedimage, int i) {
|
public void setupTexture(MinecraftImage bufferedimage, int i) {
|
||||||
bindTexture(i);
|
bindTexture(i);
|
||||||
GL11.glTexParameteri(3553 /* GL_TEXTURE_2D */, 10241 /* GL_TEXTURE_MIN_FILTER */, 9728 /* GL_NEAREST */);
|
GL11.glTexParameteri(3553 /* GL_TEXTURE_2D */, 10241 /* GL_TEXTURE_MIN_FILTER */, GL11.GL_NEAREST_MIPMAP_LINEAR);
|
||||||
GL11.glTexParameteri(3553 /* GL_TEXTURE_2D */, 10240 /* GL_TEXTURE_MAG_FILTER */, 9728 /* GL_NEAREST */);
|
GL11.glTexParameteri(3553 /* GL_TEXTURE_2D */, 10240 /* GL_TEXTURE_MAG_FILTER */, GL11.GL_NEAREST /* GL_LINEAR */);
|
||||||
|
GL11.glTexParameteri(3553 /* GL_TEXTURE_2D */, GL11.GL_TEXTURE_MAX_LEVEL, 4);
|
||||||
if (blurTexture) {
|
if (blurTexture) {
|
||||||
GL11.glTexParameteri(3553 /* GL_TEXTURE_2D */, 10241 /* GL_TEXTURE_MIN_FILTER */, 9729 /* GL_LINEAR */);
|
GL11.glTexParameteri(3553 /* GL_TEXTURE_2D */, 10241 /* GL_TEXTURE_MIN_FILTER */, 9729 /* GL_LINEAR */);
|
||||||
GL11.glTexParameteri(3553 /* GL_TEXTURE_2D */, 10240 /* GL_TEXTURE_MAG_FILTER */, 9729 /* GL_LINEAR */);
|
GL11.glTexParameteri(3553 /* GL_TEXTURE_2D */, 10240 /* GL_TEXTURE_MAG_FILTER */, 9729 /* GL_LINEAR */);
|
||||||
|
@ -91,7 +98,7 @@ public class RenderEngine {
|
||||||
}
|
}
|
||||||
int j = bufferedimage.w;
|
int j = bufferedimage.w;
|
||||||
int k = bufferedimage.h;
|
int k = bufferedimage.h;
|
||||||
int ai[] = bufferedimage.data;
|
int ai[] = bufferedimage.data();
|
||||||
byte abyte0[] = new byte[j * k * 4];
|
byte abyte0[] = new byte[j * k * 4];
|
||||||
for (int l = 0; l < ai.length; l++) {
|
for (int l = 0; l < ai.length; l++) {
|
||||||
int j1 = ai[l] >> 24 & 0xff;
|
int j1 = ai[l] >> 24 & 0xff;
|
||||||
|
@ -116,6 +123,28 @@ public class RenderEngine {
|
||||||
imageDataB1.position(0).limit(abyte0.length);
|
imageDataB1.position(0).limit(abyte0.length);
|
||||||
GL11.glTexImage2D(3553 /* GL_TEXTURE_2D */, 0, 6408 /* GL_RGBA */, j, k, 0, 6408 /* GL_RGBA */,
|
GL11.glTexImage2D(3553 /* GL_TEXTURE_2D */, 0, 6408 /* GL_RGBA */, j, k, 0, 6408 /* GL_RGBA */,
|
||||||
5121 /* GL_UNSIGNED_BYTE */, imageDataB1);
|
5121 /* GL_UNSIGNED_BYTE */, imageDataB1);
|
||||||
|
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 = 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
GL11.glTexImage2D(3553 /* GL_TEXTURE_2D */, i1, 6408 /* GL_RGBA */, i2, k2, 0, 6408 /* GL_RGBA */,
|
||||||
|
5121 /* GL_UNSIGNED_BYTE */, imageDataB2);
|
||||||
|
ByteBuffer tmp = imageDataB1;
|
||||||
|
imageDataB1 = imageDataB2;
|
||||||
|
imageDataB2 = tmp;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteTexture(int i) {
|
public void deleteTexture(int i) {
|
||||||
|
@ -130,19 +159,28 @@ public class RenderEngine {
|
||||||
return GL11.loadPNG(inputstream);
|
return GL11.loadPNG(inputstream);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
public static void bindTexture(int i) {
|
public static void bindTexture(int i) {
|
||||||
|
Minecraft.getMinecraft().setLighting(true);
|
||||||
if (i < 0) {
|
if (i < 0) {
|
||||||
|
Minecraft.getMinecraft().setLighting(false);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
GL11.glBindTexture(3553 /* GL_TEXTURE_2D */, i);
|
GL11.glBindTexture(3553 /* GL_TEXTURE_2D */, i);
|
||||||
|
Minecraft.getMinecraft().setLighting(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private HashMap<String, Integer> textureMap;
|
private HashMap<String, Integer> textureMap;
|
||||||
private HashMap<Integer, MinecraftImage> textureNameToImageMap;
|
private HashMap<Integer, MinecraftImage> textureNameToImageMap;
|
||||||
private IntBuffer singleIntBuffer;
|
private IntBuffer singleIntBuffer;
|
||||||
private ByteBuffer imageDataB1;
|
private ByteBuffer imageDataB1;
|
||||||
|
private ByteBuffer imageDataB2;
|
||||||
private GameSettings options;
|
private GameSettings options;
|
||||||
private boolean clampTexture;
|
private boolean clampTexture;
|
||||||
private boolean blurTexture;
|
private boolean blurTexture;
|
||||||
|
|
|
@ -265,5 +265,6 @@ public class Tessellator {
|
||||||
int var5 = (int)((par2 / len) * 125.0F) + 125;
|
int var5 = (int)((par2 / len) * 125.0F) + 125;
|
||||||
int var6 = (int)((par3 / len) * 125.0F) + 125;
|
int var6 = (int)((par3 / len) * 125.0F) + 125;
|
||||||
this.normal = var4 & 255 | (var5 & 255) << 8 | (var6 & 255) << 16;
|
this.normal = var4 & 255 | (var5 & 255) << 8 | (var6 & 255) << 16;
|
||||||
|
GL11.glNormal3f(par1, par2, par3);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,5 +1,7 @@
|
||||||
package net.minecraft.client.render.entity;
|
package net.minecraft.client.render.entity;
|
||||||
|
|
||||||
|
import net.PeytonPlayz585.math.MathHelper;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.model.ModelBiped;
|
import net.minecraft.client.model.ModelBiped;
|
||||||
import net.minecraft.client.render.RenderBlocks;
|
import net.minecraft.client.render.RenderBlocks;
|
||||||
import net.minecraft.client.render.RenderEngine;
|
import net.minecraft.client.render.RenderEngine;
|
||||||
|
@ -76,106 +78,129 @@ public abstract class Render {
|
||||||
public final void setRenderManager(RenderManager var1) {
|
public final void setRenderManager(RenderManager var1) {
|
||||||
this.renderManager = var1;
|
this.renderManager = var1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void renderEntityOnFire(Entity var1, double var2, double var4, double var6, float var8) {
|
||||||
|
GL11.glDisable(GL11.GL_LIGHTING);
|
||||||
|
int var9 = Block.fire.blockIndexInTexture;
|
||||||
|
int var10 = (var9 & 15) << 4;
|
||||||
|
int var11 = var9 & 240;
|
||||||
|
float var12 = (float)var10 / 256.0F;
|
||||||
|
float var13 = ((float)var10 + 15.99F) / 256.0F;
|
||||||
|
float var14 = (float)var11 / 256.0F;
|
||||||
|
float var15 = ((float)var11 + 15.99F) / 256.0F;
|
||||||
|
GL11.glPushMatrix();
|
||||||
|
GL11.glTranslatef((float)var2, (float)var4, (float)var6);
|
||||||
|
float var16 = var1.width * 1.4F;
|
||||||
|
GL11.glScalef(var16, var16, var16);
|
||||||
|
this.loadTexture("/terrain.png");
|
||||||
|
Tessellator var17 = Tessellator.instance;
|
||||||
|
float var18 = 1.0F;
|
||||||
|
float var19 = 0.5F;
|
||||||
|
float var20 = 0.0F;
|
||||||
|
float var21 = var1.height / var1.width;
|
||||||
|
GL11.glRotatef(-this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
|
||||||
|
GL11.glTranslatef(0.0F, 0.0F, 0.4F + (float)((int)var21) * 0.02F);
|
||||||
|
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
|
var17.startDrawingQuads();
|
||||||
|
|
||||||
public final void renderShadow(Entity var1, float var2, float var3, float var4, float var5) {
|
while(var21 > 0.0F) {
|
||||||
float var12;
|
var17.addVertexWithUV((double)(var18 - var19), (double)(0.0F - var20), 0.0D, (double)var13, (double)var15);
|
||||||
float var18;
|
var17.addVertexWithUV((double)(0.0F - var19), (double)(0.0F - var20), 0.0D, (double)var12, (double)var15);
|
||||||
float var19;
|
var17.addVertexWithUV((double)(0.0F - var19), (double)(1.4F - var20), 0.0D, (double)var12, (double)var14);
|
||||||
int var29;
|
var17.addVertexWithUV((double)(var18 - var19), (double)(1.4F - var20), 0.0D, (double)var13, (double)var14);
|
||||||
float var34;
|
--var21;
|
||||||
float var36;
|
--var20;
|
||||||
if(this.shadowSize > 0.0F) {
|
var18 *= 0.9F;
|
||||||
var5 = this.renderManager.getDistanceToCamera(var2, var3, var4);
|
GL11.glTranslatef(0.0F, 0.0F, -0.04F);
|
||||||
var5 = (1.0F - var5 / 256.0F) * this.shadowOpaque;
|
}
|
||||||
if(var5 > 0.0F) {
|
|
||||||
float var9 = var5;
|
|
||||||
float var8 = var4;
|
|
||||||
float var7 = var3;
|
|
||||||
float var6 = var2;
|
|
||||||
Render var27 = this;
|
|
||||||
GL11.glAlphaFunc(516, 0.1F);
|
|
||||||
RenderEngine var10 = this.renderManager.renderEngine;
|
|
||||||
RenderEngine.bindTexture(var10.getTexture("%clamp%/shadow.png"));
|
|
||||||
World var11 = this.renderManager.worldObj;
|
|
||||||
GL11.glDepthMask(false);
|
|
||||||
var12 = this.shadowSize;
|
|
||||||
|
|
||||||
for(var29 = (int)(var2 - var12); var29 <= (int)(var6 + var12); ++var29) {
|
var17.draw();
|
||||||
for(int var13 = (int)(var7 - 2.0F); var13 <= (int)var7; ++var13) {
|
GL11.glPopMatrix();
|
||||||
for(int var14 = (int)(var8 - var12); var14 <= (int)(var8 + var12); ++var14) {
|
GL11.glEnable(GL11.GL_LIGHTING);
|
||||||
int var15 = var11.getBlockId(var29, var13 - 1, var14);
|
}
|
||||||
if(var15 > 0 && var11.getBlockLightValue(var29, var13, var14) > 3) {
|
|
||||||
Block var16 = Block.blocksList[var15];
|
private void renderShadow(Entity var1, float var2, float var4, float var6, float var8, float var9) {
|
||||||
Tessellator var25 = Tessellator.instance;
|
GL11.glEnable(GL11.GL_BLEND);
|
||||||
var34 = (var9 - (var7 - (float)var13) / 2.0F) * 0.5F * var27.renderManager.worldObj.getLightBrightness(var29, var13, var14);
|
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||||
if(var34 >= 0.0F) {
|
RenderEngine var10 = this.renderManager.renderEngine;
|
||||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, var34);
|
var10.bindTexture(var10.getTexture("%clamp%/shadow.png"));
|
||||||
var25.startDrawingQuads();
|
World var11 = this.getWorldFromRenderManager();
|
||||||
var34 = (float)var29 + var16.minX;
|
GL11.glDepthMask(false);
|
||||||
var18 = (float)var29 + var16.maxX;
|
float var12 = this.shadowSize;
|
||||||
float var20 = (float)var13 + var16.minY;
|
double var13 = var1.lastTickPosX + (var1.posX - var1.lastTickPosX) * (double)var9;
|
||||||
float var21 = (float)var14 + var16.minZ;
|
double var15 = var1.lastTickPosY + (var1.posY - var1.lastTickPosY) * (double)var9;
|
||||||
var36 = (float)var14 + var16.maxZ;
|
double var17 = var1.lastTickPosZ + (var1.posZ - var1.lastTickPosZ) * (double)var9;
|
||||||
float var22 = (var6 - var34) / 2.0F / var12 + 0.5F;
|
int var19 = MathHelper.floor_double(var13 - (double)var12);
|
||||||
float var17 = (var6 - var18) / 2.0F / var12 + 0.5F;
|
int var20 = MathHelper.floor_double(var13 + (double)var12);
|
||||||
float var23 = (var8 - var21) / 2.0F / var12 + 0.5F;
|
int var21 = MathHelper.floor_double(var15 - (double)var12);
|
||||||
var19 = (var8 - var36) / 2.0F / var12 + 0.5F;
|
int var22 = MathHelper.floor_double(var15);
|
||||||
var25.addVertexWithUV(var34, var20, var21, var22, var23);
|
int var23 = MathHelper.floor_double(var17 - (double)var12);
|
||||||
var25.addVertexWithUV(var34, var20, var36, var22, var19);
|
int var24 = MathHelper.floor_double(var17 + (double)var12);
|
||||||
var25.addVertexWithUV(var18, var20, var36, var17, var19);
|
double var25 = var2 - var13;
|
||||||
var25.addVertexWithUV(var18, var20, var21, var17, var23);
|
double var27 = var4 - var15;
|
||||||
var25.draw();
|
double var29 = var6 - var17;
|
||||||
}
|
Tessellator var31 = Tessellator.instance;
|
||||||
}
|
var31.startDrawingQuads();
|
||||||
}
|
|
||||||
|
for(int var32 = var19; var32 <= var20; ++var32) {
|
||||||
|
for(int var33 = var21; var33 <= var22; ++var33) {
|
||||||
|
for(int var34 = var23; var34 <= var24; ++var34) {
|
||||||
|
int var35 = var11.getBlockId(var32, var33 - 1, var34);
|
||||||
|
if(var35 > 0 && var11.getBlockLightValue(var32, var33, var34) > 3) {
|
||||||
|
this.renderShadowOnBlock(Block.blocksList[var35], var2, var4, var6, var32, var33, var34, var8, var12, var25, var27, var29);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
var31.draw();
|
||||||
GL11.glDisable(GL11.GL_BLEND);
|
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
GL11.glDepthMask(true);
|
GL11.glDisable(GL11.GL_BLEND);
|
||||||
|
GL11.glDepthMask(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
private World getWorldFromRenderManager() {
|
||||||
|
return this.renderManager.worldObj;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void renderShadowOnBlock(Block var1, double var2, double var4, double var6, int var8, int var9, int var10, float var11, float var12, double var13, double var15, double var17) {
|
||||||
|
Tessellator var19 = Tessellator.instance;
|
||||||
|
if(var1.renderAsNormalBlock()) {
|
||||||
|
double var20 = ((double)var11 - (var4 - ((double)var9 + var15)) / 2.0D) * 0.5D * (double)this.getWorldFromRenderManager().getLightBrightness(var8, var9, var10);
|
||||||
|
if(var20 >= 0.0D) {
|
||||||
|
if(var20 > 1.0D) {
|
||||||
|
var20 = 1.0D;
|
||||||
|
}
|
||||||
|
|
||||||
|
var19.setColorRGBA_F(1.0F, 1.0F, 1.0F, (float)var20);
|
||||||
|
double var22 = (double)var8 + var1.minX + var13;
|
||||||
|
double var24 = (double)var8 + var1.maxX + var13;
|
||||||
|
double var26 = (double)var9 + var1.minY + var15 + 1.0D / 64.0D;
|
||||||
|
double var28 = (double)var10 + var1.minZ + var17;
|
||||||
|
double var30 = (double)var10 + var1.maxZ + var17;
|
||||||
|
float var32 = (float)((var2 - var22) / 2.0D / (double)var12 + 0.5D);
|
||||||
|
float var33 = (float)((var2 - var24) / 2.0D / (double)var12 + 0.5D);
|
||||||
|
float var34 = (float)((var6 - var28) / 2.0D / (double)var12 + 0.5D);
|
||||||
|
float var35 = (float)((var6 - var30) / 2.0D / (double)var12 + 0.5D);
|
||||||
|
var19.addVertexWithUV(var22, var26, var28, (double)var32, (double)var34);
|
||||||
|
var19.addVertexWithUV(var22, var26, var30, (double)var32, (double)var35);
|
||||||
|
var19.addVertexWithUV(var24, var26, var30, (double)var33, (double)var35);
|
||||||
|
var19.addVertexWithUV(var24, var26, var28, (double)var33, (double)var34);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void doRenderShadowAndFire(Entity var1, float var2, float var4, float var6, float var8, float var9) {
|
||||||
|
if(Minecraft.getMinecraft().options.fancyGraphics && this.shadowSize > 0.0F) {
|
||||||
|
double var10 = this.renderManager.getDistanceToCamera(var1.posX, var1.posY, var1.posZ);
|
||||||
|
float var12 = (float)((1.0D - var10 / 256.0D) * (double)this.shadowOpaque);
|
||||||
|
if(var12 > 0.0F) {
|
||||||
|
this.renderShadow(var1, var2, var4, var6, var12, var9);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(var1.fire > 0) {
|
if(var1.fire > 0) {
|
||||||
GL11.glDisable(GL11.GL_LIGHTING);
|
this.renderEntityOnFire(var1, var2, var4, var6, var9);
|
||||||
int var26 = Block.fire.blockIndexInTexture;
|
|
||||||
var29 = (var26 & 15) << 4;
|
|
||||||
int var30 = var26 & 240;
|
|
||||||
var12 = (float)var29 / 256.0F;
|
|
||||||
float var31 = ((float)var29 + 15.99F) / 256.0F;
|
|
||||||
float var32 = (float)var30 / 256.0F;
|
|
||||||
float var33 = ((float)var30 + 15.99F) / 256.0F;
|
|
||||||
GL11.glPushMatrix();
|
|
||||||
GL11.glTranslatef(var2, var3, var4);
|
|
||||||
var34 = var1.width * 1.4F;
|
|
||||||
GL11.glScalef(var34, var34, var34);
|
|
||||||
this.loadTexture("/terrain.png");
|
|
||||||
Tessellator var35 = Tessellator.instance;
|
|
||||||
var36 = 1.0F;
|
|
||||||
var18 = 0.0F;
|
|
||||||
var19 = var1.height / var1.width;
|
|
||||||
GL11.glRotatef(-this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
|
|
||||||
GL11.glTranslatef(0.0F, 0.0F, 0.4F + (float)((int)var19) * 0.02F);
|
|
||||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
|
||||||
var35.startDrawingQuads();
|
|
||||||
|
|
||||||
while(var19 > 0.0F) {
|
|
||||||
var35.addVertexWithUV(var36 - 0.5F, 0.0F - var18, 0.0F, var31, var33);
|
|
||||||
var35.addVertexWithUV(-0.5F, 0.0F - var18, 0.0F, var12, var33);
|
|
||||||
var35.addVertexWithUV(-0.5F, 1.4F - var18, 0.0F, var12, var32);
|
|
||||||
var35.addVertexWithUV(var36 - 0.5F, 1.4F - var18, 0.0F, var31, var32);
|
|
||||||
--var19;
|
|
||||||
--var18;
|
|
||||||
var36 *= 0.9F;
|
|
||||||
GL11.glTranslatef(0.0F, 0.0F, -0.04F);
|
|
||||||
}
|
|
||||||
|
|
||||||
var35.draw();
|
|
||||||
GL11.flipLightMatrix();
|
|
||||||
GL11.glPopMatrix();
|
|
||||||
GL11.flipLightMatrix();
|
|
||||||
GL11.glEnable(GL11.GL_LIGHTING);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,11 +91,11 @@ public final class RenderManager {
|
||||||
this.renderEntityWithPosYaw(var1, var3, var4, var5, var6, var2);
|
this.renderEntityWithPosYaw(var1, var3, var4, var5, var6, var2);
|
||||||
}
|
}
|
||||||
|
|
||||||
public final void renderEntityWithPosYaw(Entity var1, float var2, float var3, float var4, float var5, float var6) {
|
public void renderEntityWithPosYaw(Entity var1, float var2, float var4, float var6, float var8, float var9) {
|
||||||
Render var7 = this.getEntityRenderObject(var1);
|
Render var10 = this.getEntityRenderObject(var1);
|
||||||
if(var7 != null) {
|
if(var10 != null) {
|
||||||
var7.doRender(var1, var2, var3, var4, var5, var6);
|
var10.doRender(var1, var2, var4, var6, var8, var9);
|
||||||
var7.renderShadow(var1, var2, var3, var4, var6);
|
var10.doRenderShadowAndFire(var1, var2, var4, var6, var8, var9);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
package net.minecraft.client.render.entity;
|
package net.minecraft.client.render.entity;
|
||||||
|
|
||||||
|
import java.nio.FloatBuffer;
|
||||||
|
|
||||||
|
import org.lwjgl.GLAllocation;
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.model.ModelBiped;
|
import net.minecraft.client.model.ModelBiped;
|
||||||
import net.minecraft.game.entity.Entity;
|
import net.minecraft.game.entity.Entity;
|
||||||
import net.minecraft.game.entity.EntityLiving;
|
import net.minecraft.game.entity.EntityLiving;
|
||||||
|
@ -8,6 +14,7 @@ import net.minecraft.game.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.game.item.Item;
|
import net.minecraft.game.item.Item;
|
||||||
import net.minecraft.game.item.ItemArmor;
|
import net.minecraft.game.item.ItemArmor;
|
||||||
import net.minecraft.game.item.ItemStack;
|
import net.minecraft.game.item.ItemStack;
|
||||||
|
import net.minecraft.game.physics.Vec3D;
|
||||||
|
|
||||||
public final class RenderPlayer extends RenderLiving {
|
public final class RenderPlayer extends RenderLiving {
|
||||||
private ModelBiped modelBipedMain = (ModelBiped)this.mainModel;
|
private ModelBiped modelBipedMain = (ModelBiped)this.mainModel;
|
||||||
|
@ -20,7 +27,9 @@ public final class RenderPlayer extends RenderLiving {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void renderPlayer(EntityPlayer var1, float var2, float var3, float var4, float var5, float var6) {
|
private void renderPlayer(EntityPlayer var1, float var2, float var3, float var4, float var5, float var6) {
|
||||||
|
Minecraft.getMinecraft().setLighting(true);
|
||||||
super.a(var1, var2, var3 - var1.yOffset, var4, var5, var6);
|
super.a(var1, var2, var3 - var1.yOffset, var4, var5, var6);
|
||||||
|
Minecraft.getMinecraft().setLighting(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public final void drawFirstPersonHand() {
|
public final void drawFirstPersonHand() {
|
||||||
|
|
|
@ -27,9 +27,7 @@ import net.minecraft.game.level.block.tileentity.TileEntityFurnace;
|
||||||
public class LevelLoader {
|
public class LevelLoader {
|
||||||
|
|
||||||
public final World load() {
|
public final World load() {
|
||||||
String[] randomText = new String[]{"Hi from PeytonPlayz585", "You Eagler!", "Setting up World", ":)", "Isn't Indev the best version?", "I hate Microsoft!", "Notch is the best!", "PeytonPlayz585!", "Random text lol...", "Spam ping Winix!", "Ghost ping Winix!", "DM Winix for no reason!", "Spam ping Winix lol!", "Ghost ping Winix!", "DM Winix for no reason!", "PeytonPlayz585's Birthday is 10/11", "Yee!", "WebGL 2.0!", "ShadowCraft!"};
|
|
||||||
Minecraft.getMinecraft().loadingScreen.displayProgressMessage("Loading level");
|
Minecraft.getMinecraft().loadingScreen.displayProgressMessage("Loading level");
|
||||||
Minecraft.getMinecraft().loadingScreen.displayLoadingString(randomText[(int)(Math.random() * (double)randomText.length)]);
|
|
||||||
Minecraft.getMinecraft().loadingScreen.setLoadingProgress(25);
|
Minecraft.getMinecraft().loadingScreen.setLoadingProgress(25);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -937,7 +937,8 @@ public class WebGL {
|
||||||
for(int i = 0; i < pixels.length; ++i) {
|
for(int i = 0; i < pixels.length; ++i) {
|
||||||
pixels[i] = (pxls.get(i * 4) << 16) | (pxls.get(i * 4 + 1) << 8) | pxls.get(i * 4 + 2) | (pxls.get(i * 4 + 3) << 24);
|
pixels[i] = (pxls.get(i * 4) << 16) | (pxls.get(i * 4 + 1) << 8) | pxls.get(i * 4 + 2) | (pxls.get(i * 4 + 3) << 24);
|
||||||
}
|
}
|
||||||
ret.complete(new MinecraftImage(pixels, pxlsDat.getWidth(), pxlsDat.getHeight(), true));
|
IntBuffer buffer = IntBuffer.wrap(pixels);
|
||||||
|
ret.complete(new MinecraftImage(buffer, pxlsDat.getWidth(), pxlsDat.getHeight(), true));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
toLoad.addEventListener("error", new EventListener<Event>() {
|
toLoad.addEventListener("error", new EventListener<Event>() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user