Compare commits
3 Commits
d7ce60ce3b
...
1b974a6b47
Author | SHA1 | Date |
---|---|---|
|
1b974a6b47 | |
|
417e33d21d | |
|
fff3671bc1 |
File diff suppressed because it is too large
Load Diff
34421
javascript/classes.js
34421
javascript/classes.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
150864
javascript/classes_server.js
150864
javascript/classes_server.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
|
@ -535,7 +535,6 @@ public class IntegratedServer {
|
|||
private static native void registerPacketHandler(WorkerBinaryPacketHandler wb);
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Starting integrated server (kinda)");
|
||||
registerPacketHandler(new WorkerBinaryPacketHandlerImpl());
|
||||
isRunning = true;
|
||||
sendIPCPacket(new IPCPacketFFProcessKeepAlive(0xFF));
|
||||
|
|
|
@ -110,6 +110,7 @@ public class VFSSaveHandler implements ISaveHandler, IPlayerFileData {
|
|||
|
||||
@Override
|
||||
public void writePlayerData(EntityPlayer var1) {
|
||||
System.out.println("writing player data...");
|
||||
NBTTagCompound var2 = new NBTTagCompound();
|
||||
var1.writeToNBT(var2);
|
||||
|
||||
|
@ -124,6 +125,10 @@ public class VFSSaveHandler implements ISaveHandler, IPlayerFileData {
|
|||
}
|
||||
|
||||
VFile playerData = new VFile(worldDirectory, "player", var1.username.toLowerCase() + ".dat");
|
||||
|
||||
if(!playerData.canRead() || !playerData.exists()){
|
||||
System.out.println("player data fouled up");
|
||||
}
|
||||
|
||||
if(!playerData.setAllBytes(bin)) {
|
||||
System.err.println("Could not write player data for \"" + var1.username + "\" to file \"" + playerData.toString() + "\"");
|
||||
|
@ -146,7 +151,11 @@ public class VFSSaveHandler implements ISaveHandler, IPlayerFileData {
|
|||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(ret == null){
|
||||
System.out.println("playerdata is null!");
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,11 +8,7 @@ import java.io.IOException;
|
|||
import java.util.LinkedList;
|
||||
import net.lax1dude.eaglercraft.sp.ipc.IPCPacket0CPlayerChannel;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.src.INetworkManager;
|
||||
import net.minecraft.src.NetHandler;
|
||||
import net.minecraft.src.NetLoginHandler;
|
||||
import net.minecraft.src.NetServerHandler;
|
||||
import net.minecraft.src.Packet;
|
||||
import net.minecraft.src.*;
|
||||
|
||||
public class WorkerNetworkManager implements INetworkManager {
|
||||
|
||||
|
@ -93,10 +89,9 @@ public class WorkerNetworkManager implements INetworkManager {
|
|||
//System.out.println("[Server][" + ipcChannel + "]: packet '" + pkt.getClass().getSimpleName() + "' recieved");
|
||||
|
||||
try {
|
||||
//System.out.println("processing packet with nethandler " + theNetHandler.getClass().getSimpleName());
|
||||
pkt.processPacket(theNetHandler); // This is a problem
|
||||
}catch(Throwable t) {
|
||||
System.out.println(theNetHandler.getClass().getSimpleName() + " fucked up");
|
||||
System.out.println("[SP-SERVER]");
|
||||
System.err.println("Could not process minecraft packet 0x" + Integer.toHexString(pkt.getPacketId()) + " class '" + pkt.getClass().getSimpleName() + "' on channel 'NET|" + ipcChannel + "'");
|
||||
t.printStackTrace();
|
||||
}
|
||||
|
|
|
@ -142,6 +142,10 @@ public abstract class MinecraftServer implements ICommandSender, Runnable {
|
|||
*/
|
||||
protected abstract boolean startServer() throws IOException;
|
||||
|
||||
protected void convertMapIfNeeded(String par1Str) {
|
||||
// no
|
||||
}
|
||||
|
||||
/**
|
||||
* Typically "menu.convertingLevel", "menu.loadingLevel" or others.
|
||||
*/
|
||||
|
@ -150,7 +154,7 @@ public abstract class MinecraftServer implements ICommandSender, Runnable {
|
|||
this.logInfo(par1Str);
|
||||
this.userMessage = par1Str;
|
||||
}
|
||||
|
||||
|
||||
protected void setUserMessage(String par1Str, float prog) {
|
||||
IntegratedServer.sendIPCPacket(new IPCPacket0DProgressUpdate(par1Str, prog));
|
||||
this.logInfo(par1Str + ": " + (prog > 1.0f ? "" + (int)prog : "" + (int)(prog * 100.0f) + "%"));
|
||||
|
@ -207,14 +211,14 @@ public abstract class MinecraftServer implements ICommandSender, Runnable {
|
|||
//this.setUserMessage("menu.generatingTerrain");
|
||||
byte var6 = 0;
|
||||
this.setUserMessage("Preparing start region for level " + var6);
|
||||
|
||||
|
||||
// Removed 'spawn chunks' for performance, they are unnecessary
|
||||
|
||||
|
||||
/*
|
||||
WorldServer var7 = this.worldServers[var6];
|
||||
ChunkCoordinates var8 = var7.getSpawnPoint();
|
||||
long var9 = System.currentTimeMillis();
|
||||
|
||||
|
||||
int prepareRadius = 64;
|
||||
|
||||
for (int var11 = -prepareRadius; var11 <= prepareRadius && this.isServerRunning(); var11 += 16) {
|
||||
|
@ -231,7 +235,7 @@ public abstract class MinecraftServer implements ICommandSender, Runnable {
|
|||
}
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
this.clearCurrentTask();
|
||||
}
|
||||
|
||||
|
@ -432,11 +436,11 @@ public abstract class MinecraftServer implements ICommandSender, Runnable {
|
|||
this.receivedPacketSizeArray[this.tickCounter % 100] = Packet.receivedSize - this.lastReceivedSize;
|
||||
this.lastReceivedSize = Packet.receivedSize;
|
||||
}
|
||||
|
||||
|
||||
public List<String> getTPSAndChunkBuffer(int tpsCounter) {
|
||||
ArrayList<String> strs = new ArrayList();
|
||||
strs.add("Ticks/Second: " + tpsCounter + "/20");
|
||||
|
||||
|
||||
int c = 0;
|
||||
int oc = 0;
|
||||
int e = 0;
|
||||
|
@ -511,7 +515,7 @@ public abstract class MinecraftServer implements ICommandSender, Runnable {
|
|||
public void func_82010_a(IUpdatePlayerListBox par1IUpdatePlayerListBox) {
|
||||
this.playersOnline.add(par1IUpdatePlayerListBox);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns a File object from the specified string.
|
||||
*/
|
||||
|
@ -805,7 +809,7 @@ public abstract class MinecraftServer implements ICommandSender, Runnable {
|
|||
var2.flush();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
String dir = this.worldServers[0].getSaveHandler().getWorldDirectoryName();
|
||||
SYS.VFS.deleteFiles(dir);
|
||||
String[] worldsTxt = SYS.VFS.getFile("worlds.txt").getAllLines();
|
||||
|
@ -818,7 +822,7 @@ public abstract class MinecraftServer implements ICommandSender, Runnable {
|
|||
}
|
||||
SYS.VFS.getFile("worlds.txt").setAllChars(String.join("\n", newWorlds));
|
||||
}
|
||||
|
||||
|
||||
this.initiateShutdown();
|
||||
}
|
||||
|
||||
|
@ -972,4 +976,4 @@ public abstract class MinecraftServer implements ICommandSender, Runnable {
|
|||
public static ServerConfigurationManager getServerConfigurationManager(MinecraftServer par0MinecraftServer) {
|
||||
return par0MinecraftServer.serverConfigManager;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -16,7 +16,9 @@ public abstract class NetHandler
|
|||
return true;
|
||||
}
|
||||
|
||||
public void unexpectedPacket(Packet par1Packet) {}
|
||||
public void unexpectedPacket(Packet par1Packet) {
|
||||
System.out.println("unexpected packet " + par1Packet.getClass().getSimpleName());
|
||||
}
|
||||
|
||||
public void handlePackets() {
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ public class NetLoginHandler extends NetHandler {
|
|||
* network packets unless the timeout has occurred.
|
||||
*/
|
||||
public void handlePackets() {
|
||||
//System.out.println("[SP-Server][LOGIN][HANDLE][" + clientUsername + "]");
|
||||
System.out.println("[SP-Server][LOGIN][HANDLE][" + clientUsername + "]");
|
||||
if (this.field_72544_i) { // FIX THIS SHIT!!!
|
||||
this.initializePlayerConnection();
|
||||
return;
|
||||
|
@ -126,6 +126,7 @@ public class NetLoginHandler extends NetHandler {
|
|||
}
|
||||
|
||||
public void handleLogin(Packet1Login par1Packet1Login) {
|
||||
System.out.println("login????");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -543,30 +543,20 @@ public class NetServerHandler extends NetHandler
|
|||
*/
|
||||
public void sendPacketToPlayer(Packet par1Packet)
|
||||
{
|
||||
if (par1Packet instanceof Packet3Chat)
|
||||
{
|
||||
Packet3Chat var2 = (Packet3Chat)par1Packet;
|
||||
if (par1Packet instanceof Packet3Chat) {
|
||||
Packet3Chat var2 = (Packet3Chat) par1Packet;
|
||||
int var3 = this.playerEntity.getChatVisibility();
|
||||
|
||||
if (var3 == 2)
|
||||
{
|
||||
if (var3 == 2) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (var3 == 1 && !var2.getIsServer())
|
||||
{
|
||||
if (var3 == 1 && !var2.getIsServer()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
this.netManager.addToSendQueue(par1Packet); // This is a problem
|
||||
}
|
||||
catch (Exception var10)
|
||||
{
|
||||
var10.printStackTrace();
|
||||
}
|
||||
this.netManager.addToSendQueue(par1Packet);
|
||||
}
|
||||
|
||||
public void handleBlockItemSwitch(Packet16BlockItemSwitch par1Packet16BlockItemSwitch)
|
||||
|
@ -778,6 +768,9 @@ public class NetServerHandler extends NetHandler
|
|||
this.playerEntity = this.mcServer.getConfigurationManager().respawnPlayer(this.playerEntity, 0, false);
|
||||
}
|
||||
}
|
||||
else {
|
||||
System.out.println("this should be processed by netloginhandler!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -199,6 +199,7 @@ public abstract class ServerConfigurationManager
|
|||
*/
|
||||
protected void writePlayerData(EntityPlayerMP par1EntityPlayerMP)
|
||||
{
|
||||
System.out.println("trying to write player data");
|
||||
this.playerNBTManagerObj.writePlayerData(par1EntityPlayerMP);
|
||||
}
|
||||
|
||||
|
@ -810,6 +811,7 @@ public abstract class ServerConfigurationManager
|
|||
*/
|
||||
public void saveAllPlayerData()
|
||||
{
|
||||
System.out.println("saveAllPlayerData");
|
||||
for (int var1 = 0; var1 < this.playerEntityList.size(); ++var1)
|
||||
{
|
||||
this.writePlayerData((EntityPlayerMP)this.playerEntityList.get(var1));
|
||||
|
|
|
@ -5,7 +5,7 @@ import java.util.List;
|
|||
|
||||
public class ConfigConstants {
|
||||
|
||||
public static final String version = "25w13a";
|
||||
public static final String version = "25w13b";
|
||||
public static final String mainMenuString = "Eaglercraft " + version;
|
||||
|
||||
public static final String forkMe = "https://git.zelz.net/catfoolyou/Project164";
|
||||
|
|
|
@ -2,14 +2,7 @@ package net.lax1dude.eaglercraft;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.src.Minecraft;
|
||||
import net.minecraft.src.GuiButton;
|
||||
import net.minecraft.src.GuiDisconnected;
|
||||
import net.minecraft.src.GuiScreen;
|
||||
import net.minecraft.src.NetClientHandler;
|
||||
import net.minecraft.src.Packet250CustomPayload;
|
||||
import net.minecraft.src.Packet2ClientProtocol;
|
||||
import net.minecraft.src.WorldClient;
|
||||
import net.minecraft.src.*;
|
||||
|
||||
public class GuiScreenSingleplayerConnecting extends GuiScreen {
|
||||
|
||||
|
|
|
@ -50,7 +50,6 @@ public class IntegratedServer {
|
|||
public static void begin(String[] locale, String[] stats) {
|
||||
logException = true;
|
||||
if(!isWorkerAlive()) {
|
||||
System.out.println("beginning?");
|
||||
openConnections.clear();
|
||||
exceptions.clear();
|
||||
statusState = IntegratedState.WORLD_WORKER_BOOTING;
|
||||
|
|
|
@ -7,7 +7,7 @@ import net.minecraft.src.RenderEngine;
|
|||
|
||||
public class TextureLocation {
|
||||
|
||||
private String path;
|
||||
public String path;
|
||||
private int glObject;
|
||||
|
||||
public TextureLocation(String path) {
|
||||
|
|
|
@ -5,9 +5,7 @@ import java.io.DataInputStream;
|
|||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.src.INetworkManager;
|
||||
import net.minecraft.src.NetHandler;
|
||||
import net.minecraft.src.Packet;
|
||||
import net.minecraft.src.*;
|
||||
|
||||
public class WorkerNetworkManager implements INetworkManager {
|
||||
|
||||
|
@ -60,6 +58,10 @@ public class WorkerNetworkManager implements INetworkManager {
|
|||
}
|
||||
|
||||
Packet pkt = Packet.getNewPacket(pktId);
|
||||
|
||||
if(pkt instanceof Packet252SharedKey || pkt instanceof Packet205ClientCommand || pkt instanceof Packet2ClientProtocol){
|
||||
System.out.println("Client processing packet " + pkt.getClass().getSimpleName());
|
||||
}
|
||||
|
||||
if(pkt == null) {
|
||||
System.err.println("Recieved invalid '" + pktId + "' packet");
|
||||
|
@ -73,6 +75,7 @@ public class WorkerNetworkManager implements INetworkManager {
|
|||
try {
|
||||
pkt.processPacket(theNetHandler);
|
||||
}catch(Throwable t) {
|
||||
System.out.println("[CLIENT]");
|
||||
System.err.println("Could not process minecraft packet 0x" + Integer.toHexString(pkt.getPacketId()) + " class '" + pkt.getClass().getSimpleName() + "' on channel 'NET|" + ipcChannel + "'");
|
||||
t.printStackTrace();
|
||||
}
|
||||
|
|
|
@ -8,12 +8,12 @@ public class EntityHorse extends EntityAnimal implements IInvBasic
|
|||
private static final IEntitySelector horseBreedingSelector = new EntityHorseBredSelector();
|
||||
private static final Attribute horseJumpStrength = (new RangedAttribute("horse.jumpStrength", 0.7D, 0.0D, 2.0D)).func_111117_a("Jump Strength").setShouldWatch(true);
|
||||
private static final String[] horseArmorTextures = new String[] {null, "textures/entity/horse/armor/horse_armor_iron.png", "textures/entity/horse/armor/horse_armor_gold.png", "textures/entity/horse/armor/horse_armor_diamond.png"};
|
||||
private static final String[] field_110273_bx = new String[] {"", "meo", "goo", "dio"};
|
||||
//private static final String[] field_110273_bx = new String[] {"", "meo", "goo", "dio"};
|
||||
private static final int[] armorValues = new int[] {0, 5, 7, 11};
|
||||
private static final String[] horseTextures = new String[] {"textures/entity/horse/horse_white.png", "textures/entity/horse/horse_creamy.png", "textures/entity/horse/horse_chestnut.png", "textures/entity/horse/horse_brown.png", "textures/entity/horse/horse_black.png", "textures/entity/horse/horse_gray.png", "textures/entity/horse/horse_darkbrown.png"};
|
||||
private static final String[] field_110269_bA = new String[] {"hwh", "hcr", "hch", "hbr", "hbl", "hgr", "hdb"};
|
||||
//private static final String[] field_110269_bA = new String[] {"hwh", "hcr", "hch", "hbr", "hbl", "hgr", "hdb"};
|
||||
private static final String[] horseMarkingTextures = new String[] {null, "textures/entity/horse/horse_markings_white.png", "textures/entity/horse/horse_markings_whitefield.png", "textures/entity/horse/horse_markings_whitedots.png", "textures/entity/horse/horse_markings_blackdots.png"};
|
||||
private static final String[] field_110292_bC = new String[] {"", "wo_", "wmo", "wdo", "bdo"};
|
||||
//private static final String[] field_110292_bC = new String[] {"", "wo_", "wmo", "wdo", "bdo"};
|
||||
private int eatingHaystackCounter;
|
||||
private int openMouthCounter;
|
||||
private int jumpRearingCounter;
|
||||
|
@ -644,7 +644,7 @@ public class EntityHorse extends EntityAnimal implements IInvBasic
|
|||
|
||||
private void setHorseTexturePaths()
|
||||
{
|
||||
this.field_110286_bQ = "horse/";
|
||||
this.field_110286_bQ = "";
|
||||
this.field_110280_bR[0] = null;
|
||||
this.field_110280_bR[1] = null;
|
||||
this.field_110280_bR[2] = null;
|
||||
|
@ -657,19 +657,23 @@ public class EntityHorse extends EntityAnimal implements IInvBasic
|
|||
var3 = var2 & 255;
|
||||
int var4 = (var2 & 65280) >> 8;
|
||||
this.field_110280_bR[0] = horseTextures[var3];
|
||||
this.field_110286_bQ = this.field_110286_bQ + field_110269_bA[var3];
|
||||
this.field_110286_bQ = this.field_110286_bQ + horseTextures[var3];
|
||||
this.field_110280_bR[1] = horseMarkingTextures[var4];
|
||||
this.field_110286_bQ = this.field_110286_bQ + field_110292_bC[var4];
|
||||
if(horseMarkingTextures[var4] != null){
|
||||
//this.field_110286_bQ = this.field_110286_bQ + horseMarkingTextures[var4];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.field_110280_bR[0] = "";
|
||||
this.field_110286_bQ = this.field_110286_bQ + "_" + var1 + "_";
|
||||
this.field_110286_bQ = horseTextures[0];
|
||||
}
|
||||
|
||||
var3 = this.func_110241_cb();
|
||||
this.field_110280_bR[2] = horseArmorTextures[var3];
|
||||
this.field_110286_bQ = this.field_110286_bQ + field_110273_bx[var3];
|
||||
if(horseArmorTextures[var3] != null){
|
||||
this.field_110286_bQ = this.field_110286_bQ + horseArmorTextures[var3];
|
||||
}
|
||||
}
|
||||
|
||||
public String getHorseTexture()
|
||||
|
|
|
@ -140,7 +140,7 @@ public class GuiMainMenu extends GuiScreen {
|
|||
StringTranslate var2 = StringTranslate.getInstance();
|
||||
int var4 = this.height / 4 + 48;
|
||||
|
||||
if(EaglerAdapter.isIntegratedServerAvailable()) { // EaglerAdapter.isIntegratedServerAvailable()
|
||||
if(false) { // EaglerAdapter.isIntegratedServerAvailable()
|
||||
this.buttonList.add(new GuiButton(1, this.width / 2 - 100, var4, var2.translateKey("menu.singleplayer")));
|
||||
this.buttonList.add(new GuiButton(2, this.width / 2 - 100, var4 + 24 * 1, var2.translateKey("menu.multiplayer")));
|
||||
this.buttonList.add(new GuiButton(3, this.width / 2 - 100, var4 + 24 * 2, var2.translateKey("menu.forkme")));
|
||||
|
|
|
@ -88,7 +88,7 @@ public class RenderHorse extends RenderLiving
|
|||
if (var3 == null)
|
||||
{
|
||||
var3 = new TextureLocation(var2);
|
||||
//Minecraft.getMinecraft().getTextureManager().loadTexture(var3, new LayeredTexture(par1EntityHorse.getVariantTexturePaths()));
|
||||
var3.bindTexture();
|
||||
field_110852_a.put(var2, var3);
|
||||
}
|
||||
|
||||
|
@ -114,7 +114,7 @@ public class RenderHorse extends RenderLiving
|
|||
|
||||
@Override
|
||||
protected void bindTexture(EntityLivingBase par1EntityLiving) {
|
||||
|
||||
this.func_110849_a((EntityHorse) par1EntityLiving).bindTexture();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -2867,7 +2867,6 @@ public class EaglerAdapterImpl2 {
|
|||
server.terminate();
|
||||
}
|
||||
workerMessageQueue.put("IPC", new LinkedList<PKT>());
|
||||
System.out.println("doing server worker shit");
|
||||
server = new Worker(integratedServerScript);
|
||||
server.onError(new EventListener<ErrorEvent>() {
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue