1
0
Fork 0

help the pain is unbrearable

This commit is contained in:
HoosierTransfer 2024-05-01 13:50:54 -04:00
parent 85502571ca
commit f921826413
7 changed files with 1349999 additions and 135 deletions

1349804
javascript/classes.js Normal file

File diff suppressed because it is too large Load Diff

View File

@ -4,13 +4,14 @@ import net.minecraft.block.Block;
import net.minecraft.block.BlockSlab;
public class EaglerCustomBlock {
private Block block;
private BlockSlab slabDouble;
private boolean isSlab;
private final Block block;
private final BlockSlab slabDouble;
private final boolean isSlab;
public EaglerCustomBlock(Block block) {
this.block = block;
this.isSlab = false;
this.slabDouble = null;
}
public EaglerCustomBlock(BlockSlab slabHalf, BlockSlab slabDouble) {
@ -23,11 +24,11 @@ public class EaglerCustomBlock {
return block;
}
public boolean isSlab() {
return isSlab;
}
public BlockSlab getSlabDouble() {
return slabDouble;
}
public boolean isSlab() {
return isSlab;
}
}

View File

@ -1,5 +1,6 @@
package net.hoosiertransfer;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
@ -9,8 +10,8 @@ import net.minecraft.block.BlockSlab;
import net.minecraft.item.Item;
public class EaglerItems {
private static Map<String, EaglerCustomBlock> blockMap = new HashMap<String, EaglerCustomBlock>();
private static Map<String, Item> itemMap = new HashMap<String, Item>();
protected static Map<String, EaglerCustomBlock> blockMap = new HashMap<>();
protected static Map<String, Item> itemMap = new HashMap<>();
public static void registerEaglerBlock(String id, Block block) {
blockMap.put(id, new EaglerCustomBlock(block));
@ -20,39 +21,40 @@ public class EaglerItems {
blockMap.put(id, new EaglerCustomBlock(block, slabDouble));
}
public static void registerEaglerItem(String id, Item item) {
itemMap.put(id, item);
}
public static EaglerCustomBlock getEaglerCustomBlock(String id) {
return blockMap.get(id);
}
public static Block getEaglerBlock(String id) {
return blockMap.get(id).getBlock();
}
public static void registerEaglerItem(String id, Item item) {
itemMap.put(id, item);
EaglerCustomBlock customBlock = blockMap.get(id);
return customBlock != null ? customBlock.getBlock() : null;
}
public static List<EaglerCustomBlock> getEaglerCustomBlocks() {
return (List<EaglerCustomBlock>) blockMap.values();
return new ArrayList<>(blockMap.values());
}
public static List<Item> getEaglerItems() {
return (List<Item>) itemMap.values();
return new ArrayList<>(itemMap.values());
}
public static List<String> getEaglerBlockIds() {
return (List<String>) blockMap.keySet();
return new ArrayList<>(blockMap.keySet());
}
public static List<String> getEaglerItemIds() {
return (List<String>) itemMap.keySet();
return new ArrayList<>(itemMap.keySet());
}
public static List<Map.Entry<String, EaglerCustomBlock>> getEaglerCustomBlockEntries() {
return (List<Map.Entry<String, EaglerCustomBlock>>) blockMap.entrySet();
return new ArrayList<>(blockMap.entrySet());
}
public static List<Map.Entry<String, Item>> getEaglerItemEntries() {
return (List<Map.Entry<String, Item>>) itemMap.entrySet();
return new ArrayList<>(itemMap.entrySet());
}
}

View File

@ -156,7 +156,7 @@ public class Block implements ILitBlock {
public float slipperiness;
protected final BlockState blockState;
private IBlockState defaultBlockState;
private String unlocalizedName;
public String unlocalizedName;
public static int getIdFromBlock(Block blockIn) {
return blockRegistry.getIDForObject(blockIn);
@ -1654,7 +1654,8 @@ public class Block implements ILitBlock {
// registerEaglerBlock(205, "purpur_slab", (new
// BlockPurpurSlab.Half()).setHardness(2.0F).setResistance(10.0F)
// .setStepSound(soundTypeStone).setUnlocalizedName("purpurSlab"));
registerEaglerSlab(204, "purpur_double_slab", new BlockPurpurSlab.Double(), 205, "purpur_slab",
registerEaglerSlab(204, "purpur_double_slab", new BlockPurpurSlab.Double(),
205, "purpur_slab",
new BlockPurpurSlab.Half());
registerEaglerBlock(206, "end_bricks", (new Block(Material.rock)).setStepSound(soundTypeStone).setHardness(0.8F)
.setCreativeTab(CreativeTabs.tabBlock).setUnlocalizedName("endBricks"));

View File

@ -185,22 +185,31 @@ import net.minecraft.world.WorldProviderHell;
import net.minecraft.world.WorldSettings;
import net.minecraft.world.storage.ISaveFormat;
/**+
/**
* +
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
*
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
*
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights
* Reserved.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED.
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
@ -260,11 +269,13 @@ public class Minecraft implements IThreadListener {
private final boolean jvm64bit;
private EaglercraftNetworkManager myNetworkManager;
private boolean integratedServerIsRunning;
/**+
/**
* +
* The profiler instance
*/
public final Profiler mcProfiler = new Profiler();
/**+
/**
* +
* Keeps track of how long the debug crash keycombo (F3+C) has
* been pressed for, in order to crash after 10 seconds.
*/
@ -284,12 +295,14 @@ public class Minecraft implements IThreadListener {
private final Thread mcThread = Thread.currentThread();
private ModelManager modelManager;
private BlockRendererDispatcher blockRenderDispatcher;
/**+
/**
* +
* Set to true to keep the game loop running. Set to false by
* shutdown() to allow the game loop to exit cleanly.
*/
volatile boolean running = true;
/**+
/**
* +
* String that shows the debug information
*/
public String debug = "";
@ -300,7 +313,8 @@ public class Minecraft implements IThreadListener {
long debugUpdateTime = getSystemTime();
int fpsCounter;
long prevFrameTime = -1L;
/**+
/**
* +
* Profiler currently displayed in the debug screen pie chart
*/
private String debugProfilerName = "root";
@ -387,7 +401,8 @@ public class Minecraft implements IThreadListener {
}
/**+
/**
* +
* Starts the game: initializes the canvas, the title, the
* settings, etcetera.
*/
@ -543,7 +558,8 @@ public class Minecraft implements IThreadListener {
this.crashReporter = crash;
}
/**+
/**
* +
* Wrapper around displayCrashReportInternal
*/
public void displayCrashReport(CrashReport crashReportIn) {
@ -681,7 +697,8 @@ public class Minecraft implements IThreadListener {
Tessellator.getInstance().draw();
}
/**+
/**
* +
* Sets the argument GuiScreen as the main (topmost visible)
* screen.
*/
@ -726,7 +743,8 @@ public class Minecraft implements IThreadListener {
}
}
/**+
/**
* +
* Checks for an OpenGL error. If there is one, prints the error
* ID and error string.
*/
@ -743,7 +761,8 @@ public class Minecraft implements IThreadListener {
}
}
/**+
/**
* +
* Shuts down the minecraft applet by stopping the resource
* downloads, and clearing up GL stuff; called when the
* application (or web page) is exited.
@ -769,7 +788,8 @@ public class Minecraft implements IThreadListener {
}
}
/**+
/**
* +
* Called repeatedly from run()
*/
private void runGameLoop() throws IOException {
@ -921,7 +941,8 @@ public class Minecraft implements IThreadListener {
return (float) this.getLimitFramerate() < GameSettings.Options.FRAMERATE_LIMIT.getValueMax();
}
/**+
/**
* +
* Update debugProfilerName in response to number keys in debug
* screen
*/
@ -952,7 +973,8 @@ public class Minecraft implements IThreadListener {
}
}
/**+
/**
* +
* Parameter appears to be unused
*/
private void displayDebugInfo(long elapsedTicksTime) {
@ -1068,7 +1090,8 @@ public class Minecraft implements IThreadListener {
}
}
/**+
/**
* +
* Called when the window is closing. Sets 'running' to false
* which allows the game loop to exit cleanly.
*/
@ -1076,7 +1099,8 @@ public class Minecraft implements IThreadListener {
this.running = false;
}
/**+
/**
* +
* Will set the focus to ingame if the Minecraft window is the
* active with focus. Also clears any GUI screen currently
* displayed
@ -1092,7 +1116,8 @@ public class Minecraft implements IThreadListener {
}
}
/**+
/**
* +
* Resets the player keystate, disables the ingame focus, and
* ungrabs the mouse cursor.
*/
@ -1104,7 +1129,8 @@ public class Minecraft implements IThreadListener {
}
}
/**+
/**
* +
* Displays the ingame menu
*/
public void displayInGameMenu() {
@ -1145,27 +1171,28 @@ public class Minecraft implements IThreadListener {
} else {
switch (this.objectMouseOver.typeOfHit) {
case ENTITY:
this.playerController.attackEntity(this.thePlayer, this.objectMouseOver.entityHit);
break;
case BLOCK:
BlockPos blockpos = this.objectMouseOver.getBlockPos();
if (this.theWorld.getBlockState(blockpos).getBlock().getMaterial() != Material.air) {
this.playerController.clickBlock(blockpos, this.objectMouseOver.sideHit);
case ENTITY:
this.playerController.attackEntity(this.thePlayer, this.objectMouseOver.entityHit);
break;
}
case MISS:
default:
if (this.playerController.isNotCreative()) {
this.leftClickCounter = 10;
}
case BLOCK:
BlockPos blockpos = this.objectMouseOver.getBlockPos();
if (this.theWorld.getBlockState(blockpos).getBlock().getMaterial() != Material.air) {
this.playerController.clickBlock(blockpos, this.objectMouseOver.sideHit);
break;
}
case MISS:
default:
if (this.playerController.isNotCreative()) {
this.leftClickCounter = 10;
}
}
}
}
}
/**+
/**
* +
* Called when user clicked he's mouse right button (place)
*/
private void rightClickMouse() {
@ -1177,35 +1204,36 @@ public class Minecraft implements IThreadListener {
logger.warn("Null returned as \'hitResult\', this shouldn\'t happen!");
} else {
switch (this.objectMouseOver.typeOfHit) {
case ENTITY:
if (this.playerController.func_178894_a(this.thePlayer, this.objectMouseOver.entityHit,
this.objectMouseOver)) {
flag = false;
} else if (this.playerController.interactWithEntitySendPacket(this.thePlayer,
this.objectMouseOver.entityHit)) {
flag = false;
}
break;
case BLOCK:
BlockPos blockpos = this.objectMouseOver.getBlockPos();
if (this.theWorld.getBlockState(blockpos).getBlock().getMaterial() != Material.air) {
int i = itemstack != null ? itemstack.stackSize : 0;
if (this.playerController.onPlayerRightClick(this.thePlayer, this.theWorld, itemstack, blockpos,
this.objectMouseOver.sideHit, this.objectMouseOver.hitVec)) {
case ENTITY:
if (this.playerController.func_178894_a(this.thePlayer, this.objectMouseOver.entityHit,
this.objectMouseOver)) {
flag = false;
} else if (this.playerController.interactWithEntitySendPacket(this.thePlayer,
this.objectMouseOver.entityHit)) {
flag = false;
this.thePlayer.swingItem();
}
break;
case BLOCK:
BlockPos blockpos = this.objectMouseOver.getBlockPos();
if (this.theWorld.getBlockState(blockpos).getBlock().getMaterial() != Material.air) {
int i = itemstack != null ? itemstack.stackSize : 0;
if (this.playerController.onPlayerRightClick(this.thePlayer, this.theWorld, itemstack,
blockpos,
this.objectMouseOver.sideHit, this.objectMouseOver.hitVec)) {
flag = false;
this.thePlayer.swingItem();
}
if (itemstack == null) {
return;
}
if (itemstack == null) {
return;
}
if (itemstack.stackSize == 0) {
this.thePlayer.inventory.mainInventory[this.thePlayer.inventory.currentItem] = null;
} else if (itemstack.stackSize != i || this.playerController.isInCreativeMode()) {
this.entityRenderer.itemRenderer.resetEquippedProgress();
if (itemstack.stackSize == 0) {
this.thePlayer.inventory.mainInventory[this.thePlayer.inventory.currentItem] = null;
} else if (itemstack.stackSize != i || this.playerController.isInCreativeMode()) {
this.entityRenderer.itemRenderer.resetEquippedProgress();
}
}
}
}
}
@ -1220,14 +1248,16 @@ public class Minecraft implements IThreadListener {
}
}
/**+
/**
* +
* Toggles fullscreen mode.
*/
public void toggleFullscreen() {
Display.toggleFullscreen();
}
/**+
/**
* +
* Called to resize the current screen.
*/
private void resize(int width, int height) {
@ -1247,7 +1277,8 @@ public class Minecraft implements IThreadListener {
return this.mcMusicTicker;
}
/**+
/**
* +
* Runs the current tick.
*/
public void runTick() throws IOException {
@ -1652,7 +1683,7 @@ public class Minecraft implements IThreadListener {
}
this.mcProfiler.endStartSection("processRenderGlobalLightUpdates");
if (!isGamePaused)
((ILightUpdatesProcessor) renderGlobal).alfheim$processLightUpdates();
((ILightUpdatesProcessor) renderGlobal).alfheim$processLightUpdates();
this.mcProfiler.endStartSection("level");
if (!this.isGamePaused) {
@ -1672,7 +1703,7 @@ public class Minecraft implements IThreadListener {
this.mcSoundHandler.update();
}
if (this.theWorld != null) {
if (this.theWorld != null) {
if (!this.isGamePaused) {
this.theWorld.setAllowedSpawnTypes(this.theWorld.getDifficulty() != EnumDifficulty.PEACEFUL, true);
@ -1693,8 +1724,9 @@ public class Minecraft implements IThreadListener {
// just comment this out for now
// this.mcProfiler.endStartSection("animateTick");
// if (!this.isGamePaused && this.theWorld != null && Config.animateTick()) {
// this.theWorld.doVoidFogParticles(MathHelper.floor_double(this.thePlayer.posX),
// MathHelper.floor_double(this.thePlayer.posY), MathHelper.floor_double(this.thePlayer.posZ));
// this.theWorld.doVoidFogParticles(MathHelper.floor_double(this.thePlayer.posX),
// MathHelper.floor_double(this.thePlayer.posY),
// MathHelper.floor_double(this.thePlayer.posZ));
// }
this.mcProfiler.endStartSection("particles");
@ -1731,9 +1763,9 @@ public class Minecraft implements IThreadListener {
ingameGUI.getChatGUI().printChatMessage((new ChatComponentText(pfx + " Click: "))
.appendSibling((new ChatComponentText("" + EnumChatFormatting.GREEN
+ EnumChatFormatting.UNDERLINE + EaglerXBungeeVersion.getPluginButton()))
.setChatStyle((new ChatStyle()).setChatClickEvent(
new ClickEvent(ClickEvent.Action.EAGLER_PLUGIN_DOWNLOAD,
"plugin_download.zip")))));
.setChatStyle((new ChatStyle()).setChatClickEvent(
new ClickEvent(ClickEvent.Action.EAGLER_PLUGIN_DOWNLOAD,
"plugin_download.zip")))));
ingameGUI.getChatGUI().printChatMessage(
new ChatComponentText(pfx + " ---------------------------------------"));
}
@ -1754,7 +1786,8 @@ public class Minecraft implements IThreadListener {
this.systemTime = getSystemTime();
}
/**+
/**
* +
* Arguments: World foldername, World ingame name, WorldSettings
*/
public void launchIntegratedServer(String folderName, String worldName, WorldSettings worldSettingsIn) {
@ -1772,14 +1805,16 @@ public class Minecraft implements IThreadListener {
}));
}
/**+
/**
* +
* unloads the current world first
*/
public void loadWorld(WorldClient worldClientIn) {
this.loadWorld(worldClientIn, "");
}
/**+
/**
* +
* unloads the current world first
*/
public void loadWorld(WorldClient worldClientIn, String loadingMessage) {
@ -1871,7 +1906,8 @@ public class Minecraft implements IThreadListener {
}
/**+
/**
* +
* Gets whether this is a demo or not.
*/
public final boolean isDemo() {
@ -1890,7 +1926,8 @@ public class Minecraft implements IThreadListener {
return theMinecraft != null && theMinecraft.gameSettings.fancyGraphics;
}
/**+
/**
* +
* Returns if ambient occlusion is enabled
*/
public static boolean isAmbientOcclusionEnabled() {
@ -1900,7 +1937,8 @@ public class Minecraft implements IThreadListener {
return g.ambientOcclusion != 0 && !g.shadersAODisable;
}
/**+
/**
* +
* Called when user clicked he's mouse middle button (pick
* block)
*/
@ -1955,23 +1993,23 @@ public class Minecraft implements IThreadListener {
} else if (this.objectMouseOver.entityHit instanceof EntityMinecart) {
EntityMinecart entityminecart = (EntityMinecart) this.objectMouseOver.entityHit;
switch (entityminecart.getMinecartType()) {
case FURNACE:
object = Items.furnace_minecart;
break;
case CHEST:
object = Items.chest_minecart;
break;
case TNT:
object = Items.tnt_minecart;
break;
case HOPPER:
object = Items.hopper_minecart;
break;
case COMMAND_BLOCK:
object = Items.command_block_minecart;
break;
default:
object = Items.minecart;
case FURNACE:
object = Items.furnace_minecart;
break;
case CHEST:
object = Items.chest_minecart;
break;
case TNT:
object = Items.tnt_minecart;
break;
case HOPPER:
object = Items.hopper_minecart;
break;
case COMMAND_BLOCK:
object = Items.command_block_minecart;
break;
default:
object = Items.minecart;
}
} else if (this.objectMouseOver.entityHit instanceof EntityBoat) {
object = Items.boat;
@ -2024,7 +2062,8 @@ public class Minecraft implements IThreadListener {
}
}
/**+
/**
* +
* adds core server Info (GL version , Texture pack, isModded,
* type), and the worldInfo to the crash report
*/
@ -2091,7 +2130,8 @@ public class Minecraft implements IThreadListener {
return theCrash;
}
/**+
/**
* +
* Return the singleton Minecraft instance for the game
*/
public static Minecraft getMinecraft() {
@ -2112,14 +2152,16 @@ public class Minecraft implements IThreadListener {
return this.currentServerData != null ? "multiplayer" : "out_of_game";
}
/**+
/**
* +
* Returns whether snooping is enabled or not.
*/
public boolean isSnooperEnabled() {
return this.gameSettings.snooperEnabled;
}
/**+
/**
* +
* Set the current ServerData instance.
*/
public void setServerData(ServerData serverDataIn) {
@ -2134,7 +2176,8 @@ public class Minecraft implements IThreadListener {
return SingleplayerServerController.isWorldRunning();
}
/**+
/**
* +
* Returns true if there is only one player playing, and the
* current server is the integrated one.
*/
@ -2146,14 +2189,16 @@ public class Minecraft implements IThreadListener {
}
/**+
/**
* +
* Gets the system time in milliseconds.
*/
public static long getSystemTime() {
return System.currentTimeMillis();
}
/**+
/**
* +
* Returns whether we're in full screen or not.
*/
public boolean isFullScreen() {
@ -2281,7 +2326,8 @@ public class Minecraft implements IThreadListener {
this.field_181541_X = parFlag;
}
/**+
/**
* +
* Used in the usage snooper.
*/
public static int getGLMaximumTextureSize() {
@ -2296,7 +2342,8 @@ public class Minecraft implements IThreadListener {
return modelManager;
}
/**+
/**
* +
* Returns the save loader that is currently being used
*/
public ISaveFormat getSaveLoader() {

View File

@ -1,9 +1,5 @@
package net.minecraft.init;
import java.util.HashMap;
import java.util.Map;
import net.hoosiertransfer.EaglerItems;
import net.minecraft.block.Block;
import net.minecraft.block.BlockBeacon;
import net.minecraft.block.BlockBush;

View File

@ -1087,7 +1087,7 @@ public class Item {
registerItem(2258, (String) "record_blocks", (new ItemRecord("blocks")).setUnlocalizedName("record"));
registerItem(2259, (String) "record_chirp", (new ItemRecord("chirp")).setUnlocalizedName("record"));
for (EaglerCustomBlock block : EaglerItems.getEaglerCustomBlocks()) {
if (!block.isSlab()) {
if (block.isSlab()) {
registerItemBlock(block.getBlock(),
(new ItemSlab(block.getBlock(), (BlockSlab) block.getBlock(), block.getSlabDouble()))
.setUnlocalizedName(block.getBlock().getUnlocalizedName()));
@ -1095,13 +1095,26 @@ public class Item {
registerItemBlock(block.getBlock());
}
}
// List<String> blockIds = EaglerItems.getEaglerBlockIds();
// for (int i = 0; i < blockIds.size(); i++) {
// String blockId = blockIds.get(i);
// EaglerCustomBlock block = EaglerItems.getEaglerCustomBlock(blockId);
// Block block1 = block.block;
// if (block.isSlab) {
// registerItemBlock(block.block,
// (new ItemSlab(block.block, (BlockSlab) block.block, block.slabDouble))
// .setUnlocalizedName(block1.getUnlocalizedName()));
// } else {
// registerItemBlock(block.block);
// }
// }
}
/**
* +
* Register the given Item as the ItemBlock for the given Block.
*/
private static void registerItemBlock(Block blockIn) {
protected static void registerItemBlock(Block blockIn) {
registerItemBlock(blockIn, new ItemBlock(blockIn));
}
@ -1123,7 +1136,7 @@ public class Item {
itemRegistry.register(id, textualID, itemIn);
}
private static void registerEaglerItem(int id, String textualID, Item itemIn) {
protected static void registerEaglerItem(int id, String textualID, Item itemIn) {
EaglerItems.registerEaglerItem(textualID, itemIn);
registerItem(id, textualID, itemIn);
}