got it to compile to teavm
This commit is contained in:
parent
5c1f65c894
commit
a9881a5a73
18
.classpath
Normal file
18
.classpath
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" output="bin/main" path="src/main/java">
|
||||
<attributes>
|
||||
<attribute name="gradle_scope" value="main"/>
|
||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" output="bin/main" path="src/teavm/java">
|
||||
<attributes>
|
||||
<attribute name="gradle_scope" value="main"/>
|
||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
||||
</attributes>
|
||||
</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.buildship.core.gradleclasspathcontainer"/>
|
||||
<classpathentry kind="output" path="bin/default"/>
|
||||
</classpath>
|
7
.gitattributes
vendored
Normal file
7
.gitattributes
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
#
|
||||
# https://help.github.com/articles/dealing-with-line-endings/
|
||||
#
|
||||
|
||||
*.bat text eol=crlf
|
||||
*.sh text eol=lf
|
||||
gradlew text eol=lf
|
23
.project
Normal file
23
.project
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>eaglercraft-beta</name>
|
||||
<comment>Project eaglercraft-beta created by Buildship.</comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -37,7 +37,7 @@ dependencies {
|
|||
teavm {
|
||||
|
||||
compileScopes = null;
|
||||
minifying = false;
|
||||
minifying = true;
|
||||
maxTopLevelNames = 10000;
|
||||
properties = null;
|
||||
debugInformationGenerated = false;
|
||||
|
|
BIN
epkcompiler/CompilePackage.jar
Normal file
BIN
epkcompiler/CompilePackage.jar
Normal file
Binary file not shown.
12
epkcompiler/readme.txt
Normal file
12
epkcompiler/readme.txt
Normal file
|
@ -0,0 +1,12 @@
|
|||
TO QUICKLY MAKE RESOURCE PACK:
|
||||
1. make your changes to the files in '/lwjgl-rundir/resources'
|
||||
2. double click 'run.bat' on windows, or run './run_unix.sh' in terminal on mac
|
||||
3. copy 'assets.epk from '/javascript' to your web directory
|
||||
|
||||
To manually use the CompilePackage.jar on a custom directory, run the jar file like this:
|
||||
|
||||
java -jar CompilePackage.jar <source directory> <output file>
|
||||
|
||||
To recompile the assets.epk file found in /javascript, run:
|
||||
|
||||
java -jar CompilePackage.jar "../lwjgl-rundir/resources" "../javascript/assets.epk"
|
2
epkcompiler/run.bat
Normal file
2
epkcompiler/run.bat
Normal file
|
@ -0,0 +1,2 @@
|
|||
@echo off
|
||||
java -jar CompilePackage.jar "../lwjgl-rundir/resources" "../javascript/assets.epk"
|
2
epkcompiler/run_unix.sh
Normal file
2
epkcompiler/run_unix.sh
Normal file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
java -jar CompilePackage.jar "../lwjgl-rundir/resources" "../javascript/assets.epk"
|
BIN
javascript/assets.epk
Normal file
BIN
javascript/assets.epk
Normal file
Binary file not shown.
9977
javascript/classes.js
Normal file
9977
javascript/classes.js
Normal file
File diff suppressed because one or more lines are too long
1
javascript/classes.js.map
Normal file
1
javascript/classes.js.map
Normal file
File diff suppressed because one or more lines are too long
26
javascript/index.html
Normal file
26
javascript/index.html
Normal file
|
@ -0,0 +1,26 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>eagler</title>
|
||||
<script type="text/javascript" src="classes.js"></script>
|
||||
<script type="text/javascript">
|
||||
if(document.location.href.startsWith("file:")) {
|
||||
alert("You're not supposed to 'open' this file in your browser. Please upload this folder to your HTTP(s) server and access it via the internet. This is not a bug, please read the documentation");
|
||||
}else {
|
||||
window.addEventListener("load", function(){
|
||||
window.minecraftOpts = ["game_frame","assets.epk"];
|
||||
(function(){
|
||||
var q = window.location.search;
|
||||
if(typeof q === 'string' && q.startsWith("?")) {
|
||||
q = new URLSearchParams(q);
|
||||
var s = q.get("server");
|
||||
if(s) window.minecraftOpts.push(s);
|
||||
}
|
||||
})();
|
||||
main();
|
||||
});}
|
||||
</script>
|
||||
</head>
|
||||
<body style="margin:0px;width:100vw;height:100vh;" id="game_frame">
|
||||
</body>
|
||||
</html>
|
|
@ -1,10 +0,0 @@
|
|||
# This file NEEDS to be in UTF-8 format!
|
||||
!"#$%&'()*+,-./
|
||||
0123456789:;<=>?
|
||||
@ABCDEFGHIJKLMNO
|
||||
PQRSTUVWXYZ[\]^_
|
||||
'abcdefghijklmno
|
||||
pqrstuvwxyz{|}~⌂
|
||||
ÇüéâäàåçêëèïîìÄÅ
|
||||
ÉæÆôöòûùÿÖÜø£Ø׃
|
||||
áíóúñѪº¿®¬½¼¡«»
|
|
@ -12,6 +12,7 @@ menu.multiplayer=Multiplayer
|
|||
menu.mods=Mods and Texture Packs
|
||||
menu.options=Options...
|
||||
menu.quit=Quit Game
|
||||
menu.editProfile=Edit Profile
|
||||
|
||||
selectWorld.title=Select World
|
||||
selectWorld.empty=empty
|
||||
|
|
BIN
lwjgl-rundir/resources/sprite_sheet/clock.png
Normal file
BIN
lwjgl-rundir/resources/sprite_sheet/clock.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
BIN
lwjgl-rundir/resources/sprite_sheet/compass.png
Normal file
BIN
lwjgl-rundir/resources/sprite_sheet/compass.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
BIN
lwjgl-rundir/resources/sprite_sheet/portal.png
Normal file
BIN
lwjgl-rundir/resources/sprite_sheet/portal.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
|
@ -946,6 +946,10 @@ public class EaglerAdapterImpl2 {
|
|||
public static final void mouseSetGrabbed(boolean grabbed) {
|
||||
Mouse.setGrabbed(grabbed);
|
||||
}
|
||||
|
||||
public static final boolean isPointerLocked() {
|
||||
return Mouse.isGrabbed();
|
||||
}
|
||||
|
||||
public static final int mouseGetDX() {
|
||||
return Mouse.getDX();
|
||||
|
@ -1616,14 +1620,6 @@ public class EaglerAdapterImpl2 {
|
|||
return (new File(filesystemBaseDirectory, stripPath(path))).lastModified();
|
||||
}
|
||||
|
||||
public static final void setLastModified(String path, long t) {
|
||||
(new File(filesystemBaseDirectory, stripPath(path))).setLastModified(t);
|
||||
}
|
||||
|
||||
public static final void touchFile(String path) {
|
||||
(new File(filesystemBaseDirectory, stripPath(path))).setLastModified(System.currentTimeMillis());
|
||||
}
|
||||
|
||||
public static final int getFileSize(String path) {
|
||||
return (int)(new File(filesystemBaseDirectory, stripPath(path))).length();
|
||||
}
|
||||
|
@ -1689,18 +1685,18 @@ public class EaglerAdapterImpl2 {
|
|||
ArrayList<FileEntry> ret = new ArrayList<>();
|
||||
File f = new File(filesystemBaseDirectory, path);
|
||||
if(f.isFile()) {
|
||||
ret.add(new FileEntry(path, false, f.lastModified(), (int)f.length()));
|
||||
ret.add(new FileEntry(path, false, f.lastModified()));
|
||||
}else if(f.isDirectory()) {
|
||||
for(File ff : f.listFiles()) {
|
||||
if(ff.isDirectory()) {
|
||||
if(listDirs && !recursiveDirs) {
|
||||
ret.add(new FileEntry(path + "/" + ff.getName(), true, -1l, -1));
|
||||
ret.add(new FileEntry(path + "/" + ff.getName(), true, -1l));
|
||||
}
|
||||
if(recursiveDirs) {
|
||||
recursiveListing(path + "/" + ff.getName(), ff, ret, listDirs, recursiveDirs);
|
||||
}
|
||||
}else {
|
||||
ret.add(new FileEntry(path + "/" + ff.getName(), false, ff.lastModified(), (int)ff.length()));
|
||||
ret.add(new FileEntry(path + "/" + ff.getName(), false, ff.lastModified()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1709,10 +1705,10 @@ public class EaglerAdapterImpl2 {
|
|||
|
||||
private static void recursiveListing(String path, File f, Collection<FileEntry> lst, boolean listDirs, boolean recursiveDirs) {
|
||||
if(f.isFile()) {
|
||||
lst.add(new FileEntry(path, false, f.lastModified(), (int)f.length()));
|
||||
lst.add(new FileEntry(path, false, f.lastModified()));
|
||||
}else if(f.isDirectory()) {
|
||||
if(listDirs) {
|
||||
lst.add(new FileEntry(path, true, -1l, -1));
|
||||
lst.add(new FileEntry(path, true, -1l));
|
||||
}
|
||||
if(recursiveDirs) {
|
||||
for(File ff : f.listFiles()) {
|
||||
|
@ -1735,13 +1731,11 @@ public class EaglerAdapterImpl2 {
|
|||
public final String path;
|
||||
public final boolean isDirectory;
|
||||
public final long lastModified;
|
||||
public final int fileSize;
|
||||
|
||||
protected FileEntry(String path, boolean isDirectory, long lastModified, int fileSize) {
|
||||
protected FileEntry(String path, boolean isDirectory, long lastModified) {
|
||||
this.path = path;
|
||||
this.isDirectory = isDirectory;
|
||||
this.lastModified = lastModified;
|
||||
this.fileSize = fileSize;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
|
|
|
@ -44,6 +44,7 @@ public abstract class Minecraft implements Runnable {
|
|||
systemTime = System.currentTimeMillis();
|
||||
field_6300_ab = 0;
|
||||
hideQuitButton = false;
|
||||
awaitPointerLock = false;
|
||||
field_21900_a = this;
|
||||
}
|
||||
|
||||
|
@ -62,7 +63,7 @@ public abstract class Minecraft implements Runnable {
|
|||
field_22008_V = new EaglercraftSaveManager("saves");
|
||||
}
|
||||
|
||||
gameSettings = new GameSettings();
|
||||
gameSettings = new GameSettings(this);
|
||||
texturePackList = new TexturePackList(this);
|
||||
renderEngine = new RenderEngine(texturePackList, gameSettings);
|
||||
fontRenderer = new FontRenderer(gameSettings, "/font/default.png", renderEngine);
|
||||
|
@ -87,7 +88,7 @@ public abstract class Minecraft implements Runnable {
|
|||
renderEngine.registerTextureFX(new TexturePortalFX());
|
||||
renderEngine.registerTextureFX(new TextureCompassFX(this));
|
||||
renderEngine.registerTextureFX(new TextureWatchFX(this));
|
||||
renderEngine.registerTextureFX(new TexureWaterFlowFX());
|
||||
renderEngine.registerTextureFX(new TextureWaterFlowFX());
|
||||
renderEngine.registerTextureFX(new TextureLavaFlowFX());
|
||||
renderEngine.registerTextureFX(new TextureFlamesFX(0));
|
||||
renderEngine.registerTextureFX(new TextureFlamesFX(1));
|
||||
|
@ -95,6 +96,9 @@ public abstract class Minecraft implements Runnable {
|
|||
EaglerAdapter.glViewport(0, 0, displayWidth, displayHeight);
|
||||
effectRenderer = new EffectRenderer(theWorld, renderEngine);
|
||||
checkGLError("Post startup");
|
||||
|
||||
while(EaglerAdapter.keysNext());
|
||||
while(EaglerAdapter.mouseNext());
|
||||
ingameGUI = new GuiIngame(this);
|
||||
if (serverName != null) {
|
||||
displayGuiScreen(new GuiConnecting(this, serverName, serverPort));
|
||||
|
@ -104,13 +108,14 @@ public abstract class Minecraft implements Runnable {
|
|||
}
|
||||
|
||||
private void loadScreen() {
|
||||
ScaledResolution scaledresolution = new ScaledResolution(displayWidth, displayHeight);
|
||||
int i = scaledresolution.getScaledWidth();
|
||||
int j = scaledresolution.getScaledHeight();
|
||||
int xx = displayWidth;
|
||||
if(xx > displayHeight) {
|
||||
xx = displayHeight;
|
||||
}
|
||||
EaglerAdapter.glClear(16640);
|
||||
EaglerAdapter.glMatrixMode(5889 /* GL_PROJECTION */);
|
||||
EaglerAdapter.glLoadIdentity();
|
||||
EaglerAdapter.glOrtho(0.0F, i, j, 0.0F, 1000F, 3000F);
|
||||
EaglerAdapter.glOrtho(0.0F, displayWidth, displayHeight, 0.0F, 1000F, 3000F);
|
||||
EaglerAdapter.glMatrixMode(5888 /* GL_MODELVIEW0_ARB */);
|
||||
EaglerAdapter.glLoadIdentity();
|
||||
EaglerAdapter.glTranslatef(0.0F, 0.0F, -2000F);
|
||||
|
@ -128,11 +133,16 @@ public abstract class Minecraft implements Runnable {
|
|||
tessellator.addVertexWithUV(displayWidth, 0.0D, 0.0D, 0.0D, 0.0D);
|
||||
tessellator.addVertexWithUV(0.0D, 0.0D, 0.0D, 0.0D, 0.0D);
|
||||
tessellator.draw();
|
||||
char c = '\u0100';
|
||||
char c1 = '\u0100';
|
||||
EaglerAdapter.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setColorOpaque_I(0xffffff);
|
||||
func_6274_a((displayWidth / 2 - c) / 2, (displayHeight / 2 - c1) / 2, 0, 0, c, c1);
|
||||
int marginX = (displayWidth - xx) / 2;
|
||||
int marginY = (displayHeight - xx) / 2;
|
||||
tessellator.addVertexWithUV(marginX, displayHeight - marginY, 0.0D, 0.0D, 1.0D);
|
||||
tessellator.addVertexWithUV(displayWidth - marginX, displayHeight - marginY, 0.0D, 1.0D, 1.0D);
|
||||
tessellator.addVertexWithUV(displayWidth - marginX, marginY, 0.0D, 1.0D, 0.0D);
|
||||
tessellator.addVertexWithUV(marginX, marginY, 0.0D, 0.0D, 0.0D);
|
||||
tessellator.draw();
|
||||
EaglerAdapter.glDisable(2896 /* GL_LIGHTING */);
|
||||
EaglerAdapter.glDisable(2912 /* GL_FOG */);
|
||||
EaglerAdapter.glEnable(3008 /* GL_ALPHA_TEST */);
|
||||
|
@ -170,14 +180,14 @@ public abstract class Minecraft implements Runnable {
|
|||
}
|
||||
currentScreen = guiscreen;
|
||||
if (guiscreen != null) {
|
||||
func_6273_f();
|
||||
ungrabMouseCursor();
|
||||
ScaledResolution scaledresolution = new ScaledResolution(displayWidth, displayHeight);
|
||||
int i = scaledresolution.getScaledWidth();
|
||||
int j = scaledresolution.getScaledHeight();
|
||||
guiscreen.setWorldAndResolution(this, i, j);
|
||||
field_6307_v = false;
|
||||
} else {
|
||||
func_6259_e();
|
||||
grabMouseCursor();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -188,7 +198,6 @@ public abstract class Minecraft implements Runnable {
|
|||
System.out.println("########## GL ERROR ##########");
|
||||
System.out.println((new StringBuilder()).append("@ ").append(s).toString());
|
||||
System.out.println((new StringBuilder()).append(i).append(": ").append(s1).toString());
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -203,7 +212,7 @@ public abstract class Minecraft implements Runnable {
|
|||
} catch (Throwable throwable1) {
|
||||
}
|
||||
EaglerAdapter.destroyContext();
|
||||
System.exit(0);
|
||||
EaglerAdapter.exit();
|
||||
}
|
||||
|
||||
public void run() {
|
||||
|
@ -395,10 +404,11 @@ public abstract class Minecraft implements Runnable {
|
|||
running = false;
|
||||
}
|
||||
|
||||
public void func_6259_e() {
|
||||
public void grabMouseCursor() {
|
||||
if (!EaglerAdapter.isFocused()) {
|
||||
return;
|
||||
}
|
||||
awaitPointerLock = true;
|
||||
if (field_6289_L) {
|
||||
return;
|
||||
} else {
|
||||
|
@ -410,7 +420,7 @@ public abstract class Minecraft implements Runnable {
|
|||
}
|
||||
}
|
||||
|
||||
public void func_6273_f() {
|
||||
public void ungrabMouseCursor() {
|
||||
if (!field_6289_L) {
|
||||
return;
|
||||
}
|
||||
|
@ -422,11 +432,8 @@ public abstract class Minecraft implements Runnable {
|
|||
}
|
||||
|
||||
public void func_6252_g() {
|
||||
if (currentScreen != null) {
|
||||
return;
|
||||
} else {
|
||||
if (currentScreen == null) {
|
||||
displayGuiScreen(new GuiIngameMenu());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -601,7 +608,7 @@ public abstract class Minecraft implements Runnable {
|
|||
}
|
||||
if (currentScreen == null) {
|
||||
if (!field_6289_L && EaglerAdapter.mouseGetEventButtonState()) {
|
||||
func_6259_e();
|
||||
grabMouseCursor();
|
||||
} else {
|
||||
if (EaglerAdapter.mouseGetEventButton() == 0 && EaglerAdapter.mouseGetEventButtonState()) {
|
||||
clickMouse(0);
|
||||
|
@ -668,15 +675,21 @@ public abstract class Minecraft implements Runnable {
|
|||
}
|
||||
} while (true);
|
||||
if (currentScreen == null) {
|
||||
if (EaglerAdapter.mouseIsButtonDown(0) && (float) (ticksRan - field_6302_aa) >= timer.ticksPerSecond / 4F
|
||||
&& field_6289_L) {
|
||||
clickMouse(0);
|
||||
field_6302_aa = ticksRan;
|
||||
}
|
||||
if (EaglerAdapter.mouseIsButtonDown(1) && (float) (ticksRan - field_6302_aa) >= timer.ticksPerSecond / 4F
|
||||
&& field_6289_L) {
|
||||
clickMouse(1);
|
||||
field_6302_aa = ticksRan;
|
||||
if(EaglerAdapter.isPointerLocked()) {
|
||||
awaitPointerLock = false;
|
||||
if (EaglerAdapter.mouseIsButtonDown(0) && (float) (ticksRan - field_6302_aa) >= timer.ticksPerSecond / 4F
|
||||
&& field_6289_L) {
|
||||
clickMouse(0);
|
||||
field_6302_aa = ticksRan;
|
||||
}
|
||||
if (EaglerAdapter.mouseIsButtonDown(1) && (float) (ticksRan - field_6302_aa) >= timer.ticksPerSecond / 4F
|
||||
&& field_6289_L) {
|
||||
clickMouse(1);
|
||||
field_6302_aa = ticksRan;
|
||||
}
|
||||
}else if(!awaitPointerLock) {
|
||||
field_6289_L = false;
|
||||
func_6252_g();
|
||||
}
|
||||
}
|
||||
func_6254_a(0, currentScreen == null && EaglerAdapter.mouseIsButtonDown(0) && field_6289_L);
|
||||
|
@ -1028,6 +1041,7 @@ public abstract class Minecraft implements Runnable {
|
|||
public boolean isRaining;
|
||||
long systemTime;
|
||||
private int field_6300_ab;
|
||||
private boolean awaitPointerLock;
|
||||
|
||||
private static Minecraft instance = null;
|
||||
|
||||
|
|
|
@ -309,8 +309,7 @@ public class Chunk {
|
|||
int i = MathHelper.floor_double(entity.posX / 16D);
|
||||
int j = MathHelper.floor_double(entity.posZ / 16D);
|
||||
if (i != xPosition || j != zPosition) {
|
||||
System.out.println((new StringBuilder()).append("Wrong location! ").append(entity).toString());
|
||||
Thread.dumpStack();
|
||||
System.out.println((new StringBuilder()).append("Wrong entity location! ").append(entity).toString());
|
||||
}
|
||||
int k = MathHelper.floor_double(entity.posY / 16D);
|
||||
if (k < 0) {
|
||||
|
|
|
@ -4,30 +4,28 @@ package net.minecraft.src;
|
|||
// Jad home page: http://www.kpdus.com/jad.html
|
||||
// Decompiler options: packimports(3) braces deadcode
|
||||
|
||||
import java.io.PrintStream;
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
|
||||
public class EntityList {
|
||||
|
||||
public EntityList() {
|
||||
}
|
||||
|
||||
private static void addMapping(Class class1, String s, int i) {
|
||||
stringToClassMapping.put(s, class1);
|
||||
private static void addMapping(Class class1, Function<World, Entity> construct, String s, int i) {
|
||||
stringToConstructorMapping.put(s, construct);
|
||||
classToStringMapping.put(class1, s);
|
||||
IDtoClassMapping.put(Integer.valueOf(i), class1);
|
||||
IDtoConstructorMapping.put(Integer.valueOf(i), construct);
|
||||
classToIDMapping.put(class1, Integer.valueOf(i));
|
||||
}
|
||||
|
||||
public static Entity createEntityInWorld(String s, World world) {
|
||||
Entity entity = null;
|
||||
try {
|
||||
Class class1 = (Class) stringToClassMapping.get(s);
|
||||
Function<World, Entity> class1 = (Function<World, Entity>) stringToConstructorMapping.get(s);
|
||||
if (class1 != null) {
|
||||
entity = (Entity) class1.getConstructor(new Class[] { World.class })
|
||||
.newInstance(new Object[] { world });
|
||||
entity = class1.apply(world);
|
||||
}
|
||||
} catch (Exception exception) {
|
||||
exception.printStackTrace();
|
||||
|
@ -38,10 +36,9 @@ public class EntityList {
|
|||
public static Entity createEntityFromNBT(NBTTagCompound nbttagcompound, World world) {
|
||||
Entity entity = null;
|
||||
try {
|
||||
Class class1 = (Class) stringToClassMapping.get(nbttagcompound.getString("id"));
|
||||
Function<World, Entity> class1 = (Function<World, Entity>) stringToConstructorMapping.get(nbttagcompound.getString("id"));
|
||||
if (class1 != null) {
|
||||
entity = (Entity) class1.getConstructor(new Class[] { World.class })
|
||||
.newInstance(new Object[] { world });
|
||||
entity = class1.apply(world);
|
||||
}
|
||||
} catch (Exception exception) {
|
||||
exception.printStackTrace();
|
||||
|
@ -58,10 +55,9 @@ public class EntityList {
|
|||
public static Entity createEntity(int i, World world) {
|
||||
Entity entity = null;
|
||||
try {
|
||||
Class class1 = (Class) IDtoClassMapping.get(Integer.valueOf(i));
|
||||
Function<World, Entity> class1 = (Function<World, Entity>) IDtoConstructorMapping.get(Integer.valueOf(i));
|
||||
if (class1 != null) {
|
||||
entity = (Entity) class1.getConstructor(new Class[] { World.class })
|
||||
.newInstance(new Object[] { world });
|
||||
entity = class1.apply(world);
|
||||
}
|
||||
} catch (Exception exception) {
|
||||
exception.printStackTrace();
|
||||
|
@ -80,34 +76,32 @@ public class EntityList {
|
|||
return (String) classToStringMapping.get(entity.getClass());
|
||||
}
|
||||
|
||||
private static Map stringToClassMapping = new HashMap();
|
||||
private static Map stringToConstructorMapping = new HashMap();
|
||||
private static Map classToStringMapping = new HashMap();
|
||||
private static Map IDtoClassMapping = new HashMap();
|
||||
private static Map IDtoConstructorMapping = new HashMap();
|
||||
private static Map classToIDMapping = new HashMap();
|
||||
|
||||
static {
|
||||
addMapping(EntityArrow.class, "Arrow", 10);
|
||||
addMapping(EntitySnowball.class, "Snowball", 11);
|
||||
addMapping(EntityItem.class, "Item", 1);
|
||||
addMapping(EntityPainting.class, "Painting", 9);
|
||||
addMapping(EntityLiving.class, "Mob", 48);
|
||||
addMapping(EntityMobs.class, "Monster", 49);
|
||||
addMapping(EntityCreeper.class, "Creeper", 50);
|
||||
addMapping(EntitySkeleton.class, "Skeleton", 51);
|
||||
addMapping(EntitySpider.class, "Spider", 52);
|
||||
addMapping(EntityZombieSimple.class, "Giant", 53);
|
||||
addMapping(EntityZombie.class, "Zombie", 54);
|
||||
addMapping(EntitySlime.class, "Slime", 55);
|
||||
addMapping(EntityGhast.class, "Ghast", 56);
|
||||
addMapping(EntityPigZombie.class, "PigZombie", 57);
|
||||
addMapping(EntityPig.class, "Pig", 90);
|
||||
addMapping(EntitySheep.class, "Sheep", 91);
|
||||
addMapping(EntityCow.class, "Cow", 92);
|
||||
addMapping(EntityChicken.class, "Chicken", 93);
|
||||
addMapping(EntitySquid.class, "Squid", 94);
|
||||
addMapping(EntityTNTPrimed.class, "PrimedTnt", 20);
|
||||
addMapping(EntityFallingSand.class, "FallingSand", 21);
|
||||
addMapping(EntityMinecart.class, "Minecart", 40);
|
||||
addMapping(EntityBoat.class, "Boat", 41);
|
||||
addMapping(EntityArrow.class, (w) -> new EntityArrow(w), "Arrow", 10);
|
||||
addMapping(EntitySnowball.class, (w) -> new EntitySnowball(w), "Snowball", 11);
|
||||
addMapping(EntityItem.class, (w) -> new EntityItem(w), "Item", 1);
|
||||
addMapping(EntityPainting.class, (w) -> new EntityPainting(w), "Painting", 9);
|
||||
addMapping(EntityCreeper.class, (w) -> new EntityCreeper(w), "Creeper", 50);
|
||||
addMapping(EntitySkeleton.class, (w) -> new EntitySkeleton(w), "Skeleton", 51);
|
||||
addMapping(EntitySpider.class, (w) -> new EntitySpider(w), "Spider", 52);
|
||||
addMapping(EntityZombieSimple.class, (w) -> new EntityZombieSimple(w), "Giant", 53);
|
||||
addMapping(EntityZombie.class, (w) -> new EntityZombie(w), "Zombie", 54);
|
||||
addMapping(EntitySlime.class, (w) -> new EntitySlime(w), "Slime", 55);
|
||||
addMapping(EntityGhast.class, (w) -> new EntityGhast(w), "Ghast", 56);
|
||||
addMapping(EntityPigZombie.class, (w) -> new EntityPigZombie(w), "PigZombie", 57);
|
||||
addMapping(EntityPig.class, (w) -> new EntityPig(w), "Pig", 90);
|
||||
addMapping(EntitySheep.class, (w) -> new EntitySheep(w), "Sheep", 91);
|
||||
addMapping(EntityCow.class, (w) -> new EntityCow(w), "Cow", 92);
|
||||
addMapping(EntityChicken.class, (w) -> new EntityChicken(w), "Chicken", 93);
|
||||
addMapping(EntitySquid.class, (w) -> new EntitySquid(w), "Squid", 94);
|
||||
addMapping(EntityTNTPrimed.class, (w) -> new EntityTNTPrimed(w), "PrimedTnt", 20);
|
||||
addMapping(EntityFallingSand.class, (w) -> new EntityFallingSand(w), "FallingSand", 21);
|
||||
addMapping(EntityMinecart.class, (w) -> new EntityMinecart(w), "Minecart", 40);
|
||||
addMapping(EntityBoat.class, (w) -> new EntityBoat(w), "Boat", 41);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -430,7 +430,13 @@ public class EntityRenderer {
|
|||
EaglerAdapter.glEnable(2912 /* GL_FOG */);
|
||||
terrainTexture.bindTexture();
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
if(i == 0) {
|
||||
EaglerAdapter.glAlphaFunc(516, 0.5F);
|
||||
}
|
||||
renderglobal.sortAndRender(entityliving, 0, f);
|
||||
if(i == 0) {
|
||||
EaglerAdapter.glAlphaFunc(516, 0.1F);
|
||||
}
|
||||
EaglerAdapter.glShadeModel(7424 /* GL_FLAT */);
|
||||
RenderHelper.enableStandardItemLighting();
|
||||
renderglobal.func_951_a(entityliving.getPosition(f), frustrum, f);
|
||||
|
@ -453,7 +459,7 @@ public class EntityRenderer {
|
|||
EaglerAdapter.glEnable(3042 /* GL_BLEND */);
|
||||
EaglerAdapter.glDisable(2884 /* GL_CULL_FACE */);
|
||||
terrainTexture.bindTexture();
|
||||
if (mc.gameSettings.fancyGraphics) {
|
||||
//if (mc.gameSettings.fancyGraphics) {
|
||||
EaglerAdapter.glColorMask(false, false, false, false);
|
||||
int l = renderglobal.sortAndRender(entityliving, 1, f);
|
||||
EaglerAdapter.glColorMask(true, true, true, true);
|
||||
|
@ -467,9 +473,9 @@ public class EntityRenderer {
|
|||
if (l > 0) {
|
||||
renderglobal.sortAndRender(entityliving, 1, f);
|
||||
}
|
||||
} else {
|
||||
renderglobal.sortAndRender(entityliving, 1, f);
|
||||
}
|
||||
//} else {
|
||||
// renderglobal.sortAndRender(entityliving, 1, f);
|
||||
//}
|
||||
EaglerAdapter.glDepthMask(true);
|
||||
EaglerAdapter.glEnable(2884 /* GL_CULL_FACE */);
|
||||
EaglerAdapter.glDisable(3042 /* GL_BLEND */);
|
||||
|
|
|
@ -4,37 +4,28 @@ package net.minecraft.src;
|
|||
// Jad home page: http://www.kpdus.com/jad.html
|
||||
// Decompiler options: packimports(3) braces deadcode
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.InputStreamReader;
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
|
||||
public class FontAllowedCharacters {
|
||||
|
||||
public FontAllowedCharacters() {
|
||||
}
|
||||
|
||||
private static String getAllowedCharacters() {
|
||||
String s = "";
|
||||
try {
|
||||
BufferedReader bufferedreader = new BufferedReader(new InputStreamReader(EaglerAdapter.loadResource("/font.txt"), "UTF-8"));
|
||||
String s1 = "";
|
||||
do {
|
||||
String s2;
|
||||
if ((s2 = bufferedreader.readLine()) == null) {
|
||||
break;
|
||||
}
|
||||
if (!s2.startsWith("#")) {
|
||||
s = (new StringBuilder()).append(s).append(s2).toString();
|
||||
}
|
||||
} while (true);
|
||||
bufferedreader.close();
|
||||
} catch (Exception exception) {
|
||||
|
||||
public static int isAllowed(char c) {
|
||||
int cc = (int) c;
|
||||
for(int i = 0; i < allowedChars.length; ++i) {
|
||||
if(cc == allowedChars[i]) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return s;
|
||||
return -1;
|
||||
}
|
||||
|
||||
public static final String allowedCharacters = getAllowedCharacters();
|
||||
|
||||
public static final int[] allowedChars = new int[]{
|
||||
32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,
|
||||
59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,
|
||||
86,87,88,89,90,91,92,93,94,95,39,97,98,99,100,101,102,103,104,105,106,107,108,109,
|
||||
110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,8962,199,252,
|
||||
233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,
|
||||
251,249,255,214,220,248,163,216,215,402,225,237,243,250,241,209,170,186,191,174,
|
||||
172,189,188,161,171,187
|
||||
};
|
||||
|
||||
public static final char field_22286_b[] = { '/', '\n', '\r', '\t', '\0', '\f', '`', '?', '*', '\\', '<', '>', '|', '"', ':' };
|
||||
|
||||
}
|
||||
|
|
|
@ -138,7 +138,7 @@ public class FontRenderer {
|
|||
}
|
||||
|
||||
if (i1 < s.length()) {
|
||||
int k1 = FontAllowedCharacters.allowedCharacters.indexOf(s.charAt(i1));
|
||||
int k1 = FontAllowedCharacters.isAllowed(s.charAt(i1));
|
||||
if (k1 >= 0) {
|
||||
EaglerAdapter.glCallList(fontDisplayLists + k1 + 32);
|
||||
EaglerAdapter.glTranslatef(charWidth[k1 + 32], 0.0F, 0.0F);
|
||||
|
@ -159,7 +159,7 @@ public class FontRenderer {
|
|||
j++;
|
||||
continue;
|
||||
}
|
||||
int k = FontAllowedCharacters.allowedCharacters.indexOf(s.charAt(j));
|
||||
int k = FontAllowedCharacters.isAllowed(s.charAt(j));
|
||||
if (k >= 0) {
|
||||
i += charWidth[k + 32];
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ import net.minecraft.client.Minecraft;
|
|||
|
||||
public class GameSettings {
|
||||
|
||||
public GameSettings() {
|
||||
public GameSettings(Minecraft mcc) {
|
||||
musicVolume = 1.0F;
|
||||
soundVolume = 1.0F;
|
||||
mouseSensitivity = 0.5F;
|
||||
|
@ -46,6 +46,7 @@ public class GameSettings {
|
|||
field_22273_E = false;
|
||||
field_22272_F = 1.0F;
|
||||
field_22271_G = 1.0F;
|
||||
mc = mcc;
|
||||
loadOptions();
|
||||
}
|
||||
|
||||
|
@ -99,11 +100,15 @@ public class GameSettings {
|
|||
}
|
||||
if (enumoptions == EnumOptions.GRAPHICS) {
|
||||
fancyGraphics = !fancyGraphics;
|
||||
mc.renderGlobal.loadRenderers();
|
||||
if(mc.renderGlobal != null) {
|
||||
mc.renderGlobal.loadRenderers();
|
||||
}
|
||||
}
|
||||
if (enumoptions == EnumOptions.AMBIENT_OCCLUSION) {
|
||||
field_22278_j = !field_22278_j;
|
||||
mc.renderGlobal.loadRenderers();
|
||||
if(mc.renderGlobal != null) {
|
||||
mc.renderGlobal.loadRenderers();
|
||||
}
|
||||
}
|
||||
if (enumoptions == EnumOptions.ANTIALIASING) {
|
||||
antialiasing = (antialiasing + i) % 3;
|
||||
|
|
|
@ -7,7 +7,6 @@ import net.lax1dude.eaglercraft.EaglerAdapter;
|
|||
public class GuiChat extends GuiScreen {
|
||||
protected String field_985_a = "";
|
||||
private int field_986_h = 0;
|
||||
private static final String field_20082_i = FontAllowedCharacters.allowedCharacters;
|
||||
|
||||
public void initGui() {
|
||||
EaglerAdapter.enableRepeatEvents(true);
|
||||
|
@ -42,7 +41,7 @@ public class GuiChat extends GuiScreen {
|
|||
if (n == 14 && this.field_985_a.length() > 0) {
|
||||
this.field_985_a = this.field_985_a.substring(0, this.field_985_a.length() - 1);
|
||||
}
|
||||
if (field_20082_i.indexOf(c) >= 0 && this.field_985_a.length() < 100) {
|
||||
if (FontAllowedCharacters.isAllowed(c) >= 0 && this.field_985_a.length() < 100) {
|
||||
this.field_985_a = this.field_985_a + c;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,7 +39,8 @@ public class GuiDisableButton extends Gui {
|
|||
if (!this.field_22081_b || !this.field_22082_a) {
|
||||
return;
|
||||
}
|
||||
if (c == '') {
|
||||
|
||||
if ((int)c == 16) {
|
||||
int n2;
|
||||
String string = GuiScreen.getClipboardString();
|
||||
if (string == null) {
|
||||
|
@ -55,7 +56,7 @@ public class GuiDisableButton extends Gui {
|
|||
if (n == 14 && this.field_22075_h.length() > 0) {
|
||||
this.field_22075_h = this.field_22075_h.substring(0, this.field_22075_h.length() - 1);
|
||||
}
|
||||
if (FontAllowedCharacters.allowedCharacters.indexOf(c) >= 0
|
||||
if (FontAllowedCharacters.isAllowed(c) >= 0
|
||||
&& (this.field_22075_h.length() < this.field_22074_i || this.field_22074_i == 0)) {
|
||||
this.field_22075_h = this.field_22075_h + c;
|
||||
}
|
||||
|
|
|
@ -9,7 +9,6 @@ public class GuiEditSign extends GuiScreen {
|
|||
private TileEntitySign field_1002_h;
|
||||
private int field_4189_i;
|
||||
private int field_1000_j = 0;
|
||||
private static final String field_20083_l = FontAllowedCharacters.allowedCharacters;
|
||||
|
||||
public GuiEditSign(TileEntitySign tileEntitySign) {
|
||||
this.field_1002_h = tileEntitySign;
|
||||
|
@ -54,7 +53,7 @@ public class GuiEditSign extends GuiScreen {
|
|||
this.field_1002_h.signText[this.field_1000_j] = this.field_1002_h.signText[this.field_1000_j].substring(0,
|
||||
this.field_1002_h.signText[this.field_1000_j].length() - 1);
|
||||
}
|
||||
if (field_20083_l.indexOf(c) >= 0 && this.field_1002_h.signText[this.field_1000_j].length() < 15) {
|
||||
if (FontAllowedCharacters.isAllowed(c) >= 0 && this.field_1002_h.signText[this.field_1000_j].length() < 15) {
|
||||
int n2 = this.field_1000_j;
|
||||
this.field_1002_h.signText[n2] = this.field_1002_h.signText[n2] + c;
|
||||
}
|
||||
|
|
|
@ -162,12 +162,13 @@ public class GuiIngame extends Gui {
|
|||
}
|
||||
if (mc.gameSettings.showDebugInfo) {
|
||||
fontrenderer.drawStringWithShadow(
|
||||
(new StringBuilder()).append("Minecraft Beta 1.3_01 (").append(mc.debug).append(")").toString(), 2,
|
||||
(new StringBuilder()).append("Minecraft (Eaglercraft) Beta 1.3_01 (").append(mc.debug).append(")").toString(), 2,
|
||||
2, 0xffffff);
|
||||
fontrenderer.drawStringWithShadow(mc.func_6241_m(), 2, 12, 0xffffff);
|
||||
fontrenderer.drawStringWithShadow(mc.func_6262_n(), 2, 22, 0xffffff);
|
||||
fontrenderer.drawStringWithShadow(mc.func_6245_o(), 2, 32, 0xffffff);
|
||||
fontrenderer.drawStringWithShadow(mc.func_21002_o(), 2, 42, 0xffffff);
|
||||
/*
|
||||
long l2 = Runtime.getRuntime().maxMemory();
|
||||
long l4 = Runtime.getRuntime().totalMemory();
|
||||
long l6 = Runtime.getRuntime().freeMemory();
|
||||
|
@ -178,6 +179,7 @@ public class GuiIngame extends Gui {
|
|||
s = (new StringBuilder()).append("Allocated memory: ").append((l4 * 100L) / l2).append("% (")
|
||||
.append(l4 / 1024L / 1024L).append("MB)").toString();
|
||||
drawString(fontrenderer, s, k - fontrenderer.getStringWidth(s) - 2, 12, 0xe0e0e0);
|
||||
*/
|
||||
drawString(fontrenderer, (new StringBuilder()).append("x: ").append(mc.thePlayer.posX).toString(), 2, 64,
|
||||
0xe0e0e0);
|
||||
drawString(fontrenderer, (new StringBuilder()).append("y: ").append(mc.thePlayer.posY).toString(), 2, 72,
|
||||
|
|
|
@ -38,7 +38,7 @@ public class GuiIngameMenu extends GuiScreen {
|
|||
}
|
||||
if (guibutton.id == 4) {
|
||||
mc.displayGuiScreen(null);
|
||||
mc.func_6259_e();
|
||||
mc.grabMouseCursor();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,8 +4,6 @@ package net.minecraft.src;
|
|||
// Jad home page: http://www.kpdus.com/jad.html
|
||||
// Decompiler options: packimports(3) braces deadcode
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
|
@ -60,11 +58,6 @@ 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) == 19) {
|
||||
splashText = "Happy birthday, lax1dude!";
|
||||
}
|
||||
StringTranslate stringtranslate = StringTranslate.getInstance();
|
||||
int i = height / 4 + 48;
|
||||
controlList.add(new GuiButton(1, width / 2 - 100, i, stringtranslate.translateKey("menu.singleplayer")));
|
||||
|
@ -74,7 +67,7 @@ public class GuiMainMenu extends GuiScreen {
|
|||
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(4, width / 2 + 2, i + 72 + 12, 98, 20, stringtranslate.translateKey("menu.editProfile")));
|
||||
}
|
||||
if (mc.session == null) {
|
||||
((GuiButton) controlList.get(1)).enabled = false;
|
||||
|
@ -95,7 +88,7 @@ public class GuiMainMenu extends GuiScreen {
|
|||
// mc.displayGuiScreen(new GuiTexturePacks(this));
|
||||
//}
|
||||
if (guibutton.id == 4) {
|
||||
mc.shutdown();
|
||||
mc.displayGuiScreen(new GuiNoMultiplayer(this));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,10 +4,6 @@ package net.minecraft.src;
|
|||
// Jad home page: http://www.kpdus.com/jad.html
|
||||
// Decompiler options: packimports(3) braces deadcode
|
||||
|
||||
import java.awt.Toolkit;
|
||||
import java.awt.datatransfer.Clipboard;
|
||||
import java.awt.datatransfer.DataFlavor;
|
||||
import java.awt.datatransfer.Transferable;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
|
@ -36,20 +32,17 @@ public class GuiScreen extends Gui {
|
|||
protected void keyTyped(char c, int i) {
|
||||
if (i == 1) {
|
||||
mc.displayGuiScreen(null);
|
||||
mc.func_6259_e();
|
||||
mc.grabMouseCursor();
|
||||
}
|
||||
}
|
||||
|
||||
public static String getClipboardString() {
|
||||
try {
|
||||
Transferable transferable = Toolkit.getDefaultToolkit().getSystemClipboard().getContents(null);
|
||||
if (transferable != null && transferable.isDataFlavorSupported(DataFlavor.stringFlavor)) {
|
||||
String s = (String) transferable.getTransferData(DataFlavor.stringFlavor);
|
||||
return s;
|
||||
}
|
||||
} catch (Exception exception) {
|
||||
String s = EaglerAdapter.getClipboard();
|
||||
return s == null ? "" : s;
|
||||
}catch(Throwable t) {
|
||||
return "";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
protected void mouseClicked(int i, int j, int k) {
|
||||
|
|
|
@ -4,8 +4,7 @@ package net.minecraft.src;
|
|||
// Jad home page: http://www.kpdus.com/jad.html
|
||||
// Decompiler options: packimports(3) braces deadcode
|
||||
|
||||
import java.util.List;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
|
||||
public class GuiSleepMP extends GuiChat {
|
||||
|
||||
|
@ -13,14 +12,14 @@ public class GuiSleepMP extends GuiChat {
|
|||
}
|
||||
|
||||
public void initGui() {
|
||||
Keyboard.enableRepeatEvents(true);
|
||||
EaglerAdapter.enableRepeatEvents(true);
|
||||
StringTranslate stringtranslate = StringTranslate.getInstance();
|
||||
controlList.add(new GuiButton(1, width / 2 - 100, height - 40,
|
||||
stringtranslate.translateKey("multiplayer.stopSleeping")));
|
||||
}
|
||||
|
||||
public void onGuiClosed() {
|
||||
Keyboard.enableRepeatEvents(false);
|
||||
EaglerAdapter.enableRepeatEvents(false);
|
||||
}
|
||||
|
||||
protected void keyTyped(char c, int i) {
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package net.minecraft.src;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.function.Function;
|
||||
|
||||
import net.lax1dude.eaglercraft.AWTColor;
|
||||
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
||||
|
||||
|
@ -15,10 +19,19 @@ public class MobSpawnerBase {
|
|||
topBlock = (byte) Block.grass.blockID;
|
||||
fillerBlock = (byte) Block.dirt.blockID;
|
||||
field_6502_q = 0x4ee031;
|
||||
biomeMonsters = (new Class[] { EntitySpider.class, EntityZombie.class, EntitySkeleton.class,
|
||||
EntityCreeper.class, EntitySlime.class });
|
||||
biomeCreatures = (new Class[] { EntitySheep.class, EntityPig.class, EntityChicken.class, EntityCow.class });
|
||||
biomeWaterCreatures = (new Class[] { EntitySquid.class });
|
||||
biomeMonsters = new ArrayList();
|
||||
biomeMonsters.add((w) -> new EntitySpider(w));
|
||||
biomeMonsters.add((w) -> new EntityZombie(w));
|
||||
biomeMonsters.add((w) -> new EntitySkeleton(w));
|
||||
biomeMonsters.add((w) -> new EntityCreeper(w));
|
||||
biomeMonsters.add((w) -> new EntitySlime(w));
|
||||
biomeCreatures = new ArrayList();
|
||||
biomeCreatures.add((w) -> new EntitySheep(w));
|
||||
biomeCreatures.add((w) -> new EntityPig(w));
|
||||
biomeCreatures.add((w) -> new EntityChicken(w));
|
||||
biomeCreatures.add((w) -> new EntityCow(w));
|
||||
biomeWaterCreatures = new ArrayList();
|
||||
biomeWaterCreatures.add((w) -> new EntitySquid(w));
|
||||
}
|
||||
|
||||
public static void generateBiomeLookup() {
|
||||
|
@ -115,7 +128,7 @@ public class MobSpawnerBase {
|
|||
return AWTColor.HSBtoRGB(0.6222222F - f * 0.05F, 0.5F + f * 0.1F, 1.0F);
|
||||
}
|
||||
|
||||
public Class[] getEntitiesForType(EnumCreatureType enumcreaturetype) {
|
||||
public List<Function<World, EntityLiving>> getEntitiesForType(EnumCreatureType enumcreaturetype) {
|
||||
if (enumcreaturetype == EnumCreatureType.monster) {
|
||||
return biomeMonsters;
|
||||
}
|
||||
|
@ -153,9 +166,9 @@ public class MobSpawnerBase {
|
|||
public byte topBlock;
|
||||
public byte fillerBlock;
|
||||
public int field_6502_q;
|
||||
protected Class biomeMonsters[];
|
||||
protected Class biomeCreatures[];
|
||||
protected Class biomeWaterCreatures[];
|
||||
protected List<Function<World, EntityLiving>> biomeMonsters;
|
||||
protected List<Function<World, EntityLiving>> biomeCreatures;
|
||||
protected List<Function<World, EntityLiving>> biomeWaterCreatures;
|
||||
private static MobSpawnerBase biomeLookupTable[] = new MobSpawnerBase[4096];
|
||||
|
||||
static {
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
package net.minecraft.src;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
|
||||
|
||||
// Jad home page: http://www.kpdus.com/jad.html
|
||||
|
@ -7,7 +10,9 @@ package net.minecraft.src;
|
|||
public class MobSpawnerHell extends MobSpawnerBase {
|
||||
|
||||
public MobSpawnerHell() {
|
||||
biomeMonsters = (new Class[] { EntityGhast.class, EntityPigZombie.class });
|
||||
biomeCreatures = new Class[0];
|
||||
biomeMonsters = new ArrayList();
|
||||
biomeMonsters.add((w) -> new EntityGhast(w));
|
||||
biomeMonsters.add((w) -> new EntityPigZombie(w));
|
||||
biomeCreatures = new ArrayList();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,20 +4,10 @@ package net.minecraft.src;
|
|||
// Jad home page: http://www.kpdus.com/jad.html
|
||||
// Decompiler options: packimports(3) braces deadcode
|
||||
|
||||
import java.nio.IntBuffer;
|
||||
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
|
||||
public class MouseHelper {
|
||||
|
||||
public MouseHelper() {
|
||||
field_1115_e = 10;
|
||||
IntBuffer intbuffer = GLAllocation.createDirectIntBuffer(1);
|
||||
intbuffer.put(0);
|
||||
intbuffer.flip();
|
||||
IntBuffer intbuffer1 = GLAllocation.createDirectIntBuffer(1024);
|
||||
}
|
||||
|
||||
public void func_774_a() {
|
||||
EaglerAdapter.mouseSetGrabbed(true);
|
||||
deltaX = 0;
|
||||
|
@ -36,5 +26,4 @@ public class MouseHelper {
|
|||
|
||||
public int deltaX;
|
||||
public int deltaY;
|
||||
private int field_1115_e;
|
||||
}
|
||||
|
|
|
@ -232,89 +232,62 @@ public class RenderEngine {
|
|||
imageDataA.put(texturefx.imageData);
|
||||
imageDataA.position(0).limit(tileSize);
|
||||
texturefx.bindImage(this);
|
||||
|
||||
imageDataA.position(0).limit(tileSize);
|
||||
|
||||
for (int k = 0; k < texturefx.tileSize; k++) {
|
||||
label0: for (int i1 = 0; i1 < texturefx.tileSize; i1++) {
|
||||
for (int i1 = 0; i1 < texturefx.tileSize; i1++) {
|
||||
int idx = texturefx.iconIndex + k + i1 * 16;
|
||||
imageDataA.position(0).limit(tileSize);
|
||||
imageDataA.mark();
|
||||
|