Merge branch 'main' of https://github.com/LAX1DUDE/eaglercraft into LAX1DUDE-main

This commit is contained in:
ayunami2000 2022-01-25 18:28:18 -05:00
commit b08e48ac88
10 changed files with 45615 additions and 184442 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,65 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<title>ayuncraft</title>
<script type="text/javascript" src="jsbn/jsbn.js"></script>
<script type="text/javascript" src="jsbn/jsbn2.js"></script>
<script type="text/javascript" src="jsbn/base64.js"></script>
<script type="text/javascript" src="jsbn/prng4.js"></script>
<script type="text/javascript" src="jsbn/rng.js"></script>
<script type="text/javascript" src="jsbn/rsa.js"></script>
<script type="text/javascript" src="jsbn/rsa2.js"></script>
<script type="text/javascript" src="asn1-parser.js"></script>
<script type="text/javascript" src="music.js"></script>
<script type="text/javascript" src="classes.js?t=updateme1"></script>
<title>eagler</title>
<script type="text/javascript" src="classes.js"></script>
<script type="text/javascript">
var name="PixelCraft",motd="A public 1.5.2 server",ip="pixelcraft.me";
window.addEventListener("load", function(){
document.requestPointerLock=document.requestPointerLock||function(){};
document.exitPointerLock=document.exitPointerLock||function(){};
window.minecraftOpts = [
window.addEventListener("load", function(){ window.minecraftOpts = [
"game_frame","assets.epk",
btoa(atob("CgAACQAHc2VydmVycwoAAAABCAAKZm9yY2VkTU9URABtb3RkaGVyZQEAC2hpZGVBZGRyZXNzAQgAAmlwAGlwaGVyZQgABG5hbWUAbmFtZWhlcmUAAA==").replace("motdhere",String.fromCharCode(motd.length)+motd).replace("namehere",String.fromCharCode(name.length)+name).replace("iphere",String.fromCharCode(ip.length)+ip))
"CgAACQAHc2VydmVycwoAAAABCAACaXAAJHdzczovL2cuZWFncy51cy9lYWdsZXJjcmFmdC9jcmVhdGl2ZQgABG5hbWUAFGVhZ2xlcmNyYWZ0IGNyZWF0aXZlAQALaGlkZUFkZHJlc3MACAAKZm9yY2VkTU9URAAhdGhpcyBpcyBtZWFudCB0byBiZSBhIGRlbW8gc2VydmVyAAA="
]; main(); });
//modified from https://gist.github.com/GlauberF/d8278ce3aa592389e6e3d4e758e6a0c2
function simulateKey (key, type) {
var keyCode = key.charCodeAt(0);
var evtName = (typeof(type) === "string") ? "key" + type : "keydown";
var event = document.createEvent("HTMLEvents");
event.initEvent(evtName, true, false);
event.keyCode = event.which = keyCode;
event.key = key;
event.shiftKey = false;
event.ctrlKey = false;
event.metaKey = false;
document.dispatchEvent(event);
}
if(window.navigator.clipboard&&window.isSecureContext&&navigator.userAgent.toLowerCase().indexOf('firefox')==-1){
window.addEventListener("keydown",function(e){
if((e.ctrlKey||e.metaKey)&&e.keyCode==86&&!e.altKey){
window.navigator.clipboard.readText().then(clipdata=>{
if(clipdata==null||clipdata=="")return;
simulateKey("\u0011","up");
simulateKey("\u0011","press");
simulateKey("\b","down");
simulateKey("\b","up");
simulateKey("\b","press");
var clipchars=clipdata.split("");
for(var clipchar of clipchars){
simulateKey(clipchar,"down");
simulateKey(clipchar,"up");
simulateKey(clipchar,"press");
}
});
}
});
}
</script>
</head>
<body style="margin:0px;width:100vw;height:100vh;" id="game_frame">

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@ -4,7 +4,7 @@ public class ConfigConstants {
public static boolean profanity = false;
public static final String version = "22w03c";
public static final String version = "22w04b";
public static final String mainMenuString = "eaglercraft " + version;
public static final String forkMe = "https://github.com/ayunami2000/ayuncraft";

View File

@ -48,15 +48,18 @@ public class EntityList {
*/
public static Entity createEntityByName(String par0Str, World par1World) {
Entity var2 = null;
Class var3 = (Class) stringToClassMapping.get(par0Str);
try {
Class var3 = (Class) stringToClassMapping.get(par0Str);
if (var3 != null) {
if (var3 != null) {
try {
var2 = (Entity) var3.getConstructor(new Class[] { World.class }).newInstance(new Object[] { par1World });
} catch (Exception var4) {
try {
var2 = (Entity) var3.getConstructor(new Class[0]).newInstance(new Object[0]);
} catch (Exception e) {
e.printStackTrace();
}
}
} catch (Exception var4) {
var4.printStackTrace();
}
return var2;

View File

@ -4,6 +4,7 @@ import net.lax1dude.eaglercraft.EaglerAdapter;
import net.lax1dude.eaglercraft.TextureLocation;
import net.lax1dude.eaglercraft.adapter.Tessellator;
import net.minecraft.client.Minecraft;
public class TileEntityBeaconRenderer extends TileEntitySpecialRenderer {
@ -23,9 +24,10 @@ public class TileEntityBeaconRenderer extends TileEntitySpecialRenderer {
EaglerAdapter.glDisable(EaglerAdapter.GL_LIGHTING);
EaglerAdapter.glDisable(EaglerAdapter.GL_CULL_FACE);
EaglerAdapter.glDisable(EaglerAdapter.GL_BLEND);
EaglerAdapter.glDisable(EaglerAdapter.GL_ALPHA_TEST);
EaglerAdapter.glDepthMask(true);
EaglerAdapter.glBlendFunc(EaglerAdapter.GL_SRC_ALPHA, EaglerAdapter.GL_ONE);
float var11 = (float) par1TileEntityBeacon.getWorldObj().getTotalWorldTime() + par8;
float var11 = ((System.currentTimeMillis() % 200000) / 50.0f);//par1TileEntityBeacon.getWorldObj().getWorldTime() + par8;
float var12 = -var11 * 0.2F - (float) MathHelper.floor_float(-var11 * 0.1F);
byte var13 = 1;
double var14 = (double) var11 * 0.025D * (1.0D - (double) (var13 & 1) * 2.5D);
@ -99,6 +101,7 @@ public class TileEntityBeaconRenderer extends TileEntitySpecialRenderer {
var10.draw();
EaglerAdapter.glEnable(EaglerAdapter.GL_LIGHTING);
EaglerAdapter.glEnable(EaglerAdapter.GL_TEXTURE_2D);
EaglerAdapter.glEnable(EaglerAdapter.GL_ALPHA_TEST);
EaglerAdapter.glDepthMask(true);
}
}

View File

@ -2,10 +2,16 @@ package net.minecraft.src;
public class TileEntityMobSpawner extends TileEntity {
public String mobID = "Pig";
public Entity mobObject = null;
public int rotateTicks = 0;
/**
* Reads a tile entity from NBT.
*/
public void readFromNBT(NBTTagCompound par1NBTTagCompound) {
this.mobID = par1NBTTagCompound.getString("EntityId");
this.mobObject = null;
super.readFromNBT(par1NBTTagCompound);
}
@ -21,16 +27,15 @@ public class TileEntityMobSpawner extends TileEntity {
worldObj.spawnParticle("flame", this.xCoord + worldObj.rand.nextFloat(), this.yCoord + worldObj.rand.nextFloat(), this.zCoord + worldObj.rand.nextFloat(), 0.0D, 0.0D, 0.0D);
worldObj.spawnParticle("flame", this.xCoord + worldObj.rand.nextFloat(), this.yCoord + worldObj.rand.nextFloat(), this.zCoord + worldObj.rand.nextFloat(), 0.0D, 0.0D, 0.0D);
}
++rotateTicks;
}
/**
* Overriden in a sign to provide the text.
*/
public Packet getDescriptionPacket() {
NBTTagCompound var1 = new NBTTagCompound();
this.writeToNBT(var1);
var1.removeTag("SpawnPotentials");
return new Packet132TileEntityData(this.xCoord, this.yCoord, this.zCoord, 1, var1);
return null;
}
}

View File

@ -0,0 +1,30 @@
package net.minecraft.src;
import net.lax1dude.eaglercraft.EaglerAdapter;
public class TileEntityMobSpawnerRenderer extends TileEntitySpecialRenderer {
@Override
public void renderTileEntityAt(TileEntity var1, double var2, double var4, double var6, float var8) {
TileEntityMobSpawner spawner = (TileEntityMobSpawner) var1;
if(spawner.mobObject == null) {
spawner.mobObject = EntityList.createEntityByName(spawner.mobID, spawner.worldObj);
if(spawner.mobObject != null) {
spawner.mobObject.setWorld(spawner.worldObj);
}
}
if(spawner.mobObject != null) {
EaglerAdapter.glPushMatrix();
EaglerAdapter.glTranslatef((float)var2 + 0.5F, (float)var4 + 0.4f, (float)var6 + 0.5F);
EaglerAdapter.glRotatef((spawner.rotateTicks + var8) * 50.0f, 0.0f, 1.0f, 0.0f);
EaglerAdapter.glRotatef(-30.0f, 1.0f, 0.0f, 0.0f);
EaglerAdapter.glTranslatef(0.0f, -0.4f, 0.0f);
float var9 = 0.4375F;
EaglerAdapter.glScalef(var9, var9, var9);
spawner.mobObject.setLocationAndAngles(var2, var4, var6, 0.0f, 0.0f);
RenderManager.instance.renderEntityWithPosYaw(spawner.mobObject, 0.0D, 0.0D, 0.0D, 0.0F, var8);
EaglerAdapter.glPopMatrix();
}
}
}

View File

@ -54,6 +54,7 @@ public class TileEntityRenderer {
this.specialRendererMap.put(TileEntityEndPortal.class, new RenderEndPortal());
this.specialRendererMap.put(TileEntityBeacon.class, new TileEntityBeaconRenderer());
this.specialRendererMap.put(TileEntitySkull.class, new TileEntitySkullRenderer());
this.specialRendererMap.put(TileEntityMobSpawner.class, new TileEntityMobSpawnerRenderer());
Iterator var1 = this.specialRendererMap.values().iterator();
while (var1.hasNext()) {

File diff suppressed because one or more lines are too long