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; import net.minecraft.block.BlockSlab;
public class EaglerCustomBlock { public class EaglerCustomBlock {
private Block block; private final Block block;
private BlockSlab slabDouble; private final BlockSlab slabDouble;
private boolean isSlab; private final boolean isSlab;
public EaglerCustomBlock(Block block) { public EaglerCustomBlock(Block block) {
this.block = block; this.block = block;
this.isSlab = false; this.isSlab = false;
this.slabDouble = null;
} }
public EaglerCustomBlock(BlockSlab slabHalf, BlockSlab slabDouble) { public EaglerCustomBlock(BlockSlab slabHalf, BlockSlab slabDouble) {
@ -23,11 +24,11 @@ public class EaglerCustomBlock {
return block; return block;
} }
public boolean isSlab() {
return isSlab;
}
public BlockSlab getSlabDouble() { public BlockSlab getSlabDouble() {
return slabDouble; return slabDouble;
} }
public boolean isSlab() {
return isSlab;
}
} }

View File

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

View File

@ -1,9 +1,5 @@
package net.minecraft.init; 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.Block;
import net.minecraft.block.BlockBeacon; import net.minecraft.block.BlockBeacon;
import net.minecraft.block.BlockBush; 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(2258, (String) "record_blocks", (new ItemRecord("blocks")).setUnlocalizedName("record"));
registerItem(2259, (String) "record_chirp", (new ItemRecord("chirp")).setUnlocalizedName("record")); registerItem(2259, (String) "record_chirp", (new ItemRecord("chirp")).setUnlocalizedName("record"));
for (EaglerCustomBlock block : EaglerItems.getEaglerCustomBlocks()) { for (EaglerCustomBlock block : EaglerItems.getEaglerCustomBlocks()) {
if (!block.isSlab()) { if (block.isSlab()) {
registerItemBlock(block.getBlock(), registerItemBlock(block.getBlock(),
(new ItemSlab(block.getBlock(), (BlockSlab) block.getBlock(), block.getSlabDouble())) (new ItemSlab(block.getBlock(), (BlockSlab) block.getBlock(), block.getSlabDouble()))
.setUnlocalizedName(block.getBlock().getUnlocalizedName())); .setUnlocalizedName(block.getBlock().getUnlocalizedName()));
@ -1095,13 +1095,26 @@ public class Item {
registerItemBlock(block.getBlock()); 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. * 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)); registerItemBlock(blockIn, new ItemBlock(blockIn));
} }
@ -1123,7 +1136,7 @@ public class Item {
itemRegistry.register(id, textualID, itemIn); 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); EaglerItems.registerEaglerItem(textualID, itemIn);
registerItem(id, textualID, itemIn); registerItem(id, textualID, itemIn);
} }