Compare commits

..
202 Commits
Author SHA1 Message Date
Space Toad 7305783e14 tagged 1.3.1 2012-01-22 01:28:49 +00:00
Space Toad 224597aa3a bumped version number 2012-01-22 01:28:22 +00:00
LexManos 9f31de24aa Install.cmd now tries to add the system folder to the current path. 2012-01-21 19:45:03 +00:00
LexManos 86a5cfd48b Disabled updatenames int he isntall scripts till MCP fixes the reobf issue.
Updated to MLMP 1.1v2, Which says it fixes bugs it doesn't But it does fix the packet bug.
Fixed a bug in Packet 250.
2012-01-20 18:44:00 +00:00
LexManos 52a18ab02b Updated MCP mappings 2012-01-19 19:21:48 +00:00
LexManos a560c7bf9a Fixed the Minecart Drop bug 2012-01-19 00:53:18 +00:00
Eloraam b767ce84ab Fixed a bug that caused snowballs to drop incorrectly. 2012-01-18 03:03:34 +00:00
LexManos 3bb04f70ca Small update to ContainerCreative hook for better compatibility with mods that extend block IDs. 2012-01-17 21:03:08 +00:00
LexManos 2319eec68b Fixed getCartClassForItem and getCartTypeForItem 2012-01-17 16:48:09 +00:00
LexManos 3b5b9c5d1e Bug Fix for Chests staying open on MP Servers
Implemented reach distance variable
2012-01-17 03:44:52 +00:00
LexManos 43a89e61e9 Fixed a few accessors I missed:
Server RailLogic.getNAdjacentTracks public
Server TileEntityFurnace.getItemBurnTime static

New GUIControls change, Made it into a scroll panel instead of a static position window.
This just makes things look better when multiple mods with KeyBindings are installed
2012-01-17 02:03:29 +00:00
LexManos 078d3c2750 Fixed a mapping issue with client side TileEntityFurnace patch 2012-01-16 02:13:08 +00:00
Space Toad 0be5c34f01 added missing files 2012-01-15 23:40:23 +00:00
Space Toad 779d34372b removed files from previous version 2012-01-15 23:39:28 +00:00
Space Toad 5190e0c927 bumped version number 2012-01-15 19:28:53 +00:00
Space Toad bfd0cfe506 merged with 1.1 branch 2012-01-15 19:16:08 +00:00
LexManos 87d4c2134c Bumped version number
Added initialization to ModLoader's log
2012-01-14 03:57:01 +00:00
Eloraam dda5880360 Fixed an unroll from the MCL merge. Updated MCP mappings. 2012-01-13 19:21:01 +00:00
LexManos 2309163d92 Fixed NPE on some JVM's 2012-01-12 07:43:55 +00:00
LexManos e5a16e25df Merged in MCL branch 2012-01-12 07:38:23 +00:00
Eloraam ad378151cf Improved the ladder hook. Added a new hook for sustained-use items. 2012-01-11 19:40:04 +00:00
Eloraam bdda88d74e Fixed MCP mappings again. Fixed the Entity NBT code.
Added a new hook to support custom enchantments.
2012-01-11 18:39:42 +00:00
Eloraam 61d9b78704 Updated MCP Mappings. 2012-01-11 18:13:35 +00:00
LexManos f3e56e0273 Fixed faces for BlockFire 2012-01-01 09:30:42 +00:00
LexManos e26f1ab671 Refactored a bit of the TileEntity code so that ANY block may now have a tile entity.
This is to allow modders the ability to extend blocks other then BlockContainer, and still be able to have a TileEntity.

Also added a NBTTagCompound to the base EntityClass, this allows any entity to be given arbitrary data that will persist across world saves.
This data is NOT sent over the wire in a MP situation, to have data sent over the wire automatically use the built in data watcher.
2012-01-01 07:42:21 +00:00
Space Toad dda9f474af bumbed version number 2011-12-28 21:22:07 +00:00
LexManos df3449534f Changed Block.setBurnRate to public and Block.setBurnProperties
Re-added bounce functions to BlockFire for non-forge mods.
Should fix Optifine compatibility.
2011-12-24 05:07:55 +00:00
LexManos 906cb8ee39 Fixed a re-name that somehow missed the commit.
Serverside chanceToEncourageFire -> getFireSpreadSpeed
2011-12-24 00:35:41 +00:00
Eloraam d541e492c4 Fixed some rendering issues. 2011-12-23 00:23:01 +00:00
Eloraam d7d0f241ff Another mapping update. 2011-12-22 20:11:38 +00:00
LexManos c8fca39895 Updated mapping for last commit 2011-12-22 02:17:40 +00:00
Eloraam dd1eb6924d Mapping updates. 2011-12-21 23:09:18 +00:00
LexManos 3f8d830899 Re-added BlockFire's properties, apparently some people access this by reflection. 2011-12-21 14:10:05 +00:00
Eloraam a4475c9e9a Bumping the version number. 2011-12-21 10:22:37 +00:00
Eloraam 90a4744130 Fixed some strange behavior in snow blocks. Fixed a missing patch checkin. 2011-12-21 10:15:38 +00:00
Eloraam f4eec04eba A minimalistic hook for rendering world effect overlays or other 3D overlay
data.
2011-12-21 09:57:10 +00:00
Eloraam dbb5a37449 Major rework of the rendering core. Added support for custom render context
handling.
2011-12-21 09:01:45 +00:00
LexManos 348a6fe03c Added Item.onDroppedByPlayer hook 2011-12-21 07:44:01 +00:00
Eloraam 6e1442e8e6 Deprecated IUseItemFirst, and made onUseItemFirst work in Creative. 2011-12-21 06:34:57 +00:00
LexManos b91eb1ceac Added server side prototypes for addCreativeItems()s They are unused, but declared for compiling compatibility. 2011-12-21 04:38:59 +00:00
LexManos a38c8bd427 Added hooks to BlockFire for setting block flame interaction properties. 2011-12-21 04:30:53 +00:00
LexManos 2936697302 Replaced dropBlockAsItemWithChance in BlockNetherStalk with getBlockDropped. 2011-12-21 00:44:53 +00:00
Eloraam 52de732b8e Fixed a minor crop fortune bug. 2011-12-20 21:39:53 +00:00
LexManos c2f165f211 Commit of a hook for adding items into world dungeon generation.
Uses a weighted random selection scheme.
Also a hook for adding custom mobs to the dungeon generation list.
2011-12-20 07:00:43 +00:00
LexManos 4c6e03e4ad Updated mappings 2011-12-20 06:58:29 +00:00
LexManos c84b8740b4 Implemented ISidedInventory for Brewing Stands.
Top is input, 1 slot
All other sides are output, 3 slots.
2011-12-19 06:33:20 +00:00
LexManos 8c9762fd9a Added missing native library path to forge_client project.
Added harvest levels/effectiveness for Axes and Shovels.
2011-12-16 10:06:57 +00:00
LexManos d8a14ee928 Fixed a zLevel bug with custom item renderers. 2011-12-14 10:45:37 +00:00
Space Toad 8bb73671ba bumped version numbers 2011-12-13 19:33:37 +00:00
LexManos 46a9ba178f Fixed seeds/wheat not dropping from Crops/TallGrass.
All future Forge code should use proper annotations when Overriding.
2011-12-11 21:55:35 +00:00
LexManos 5c60c2246c Small fix to decrease the number of glBindTexture calls that are immediately overridden. 2011-12-11 11:50:55 +00:00
LexManos e79b5d1937 The install scripts will now only patch the client/server if they are there.
This allows for people to only worry about getting one side setup correctly if they don't care about the other.
2011-12-11 07:37:54 +00:00
LexManos 9bf4f67d9d Fixed a infinite recursion loop in spacetoad's commit to Block.java.patch
Added @Deprecated annotations to the 'backwards compatible' functions spacetoad re-added.

Made changes to the install scripts:
-Will overwrite the current MCP mappings and use the ones that ship with forge, this 
    should eliminate all the issues of people not being able to install it because they updated there mcp.cfg
-Will now move fernflower.jar if it is found, so that MCP will not decompile using it.
    Should fix the issues of people trying to use forge with fernflower installed.
-Will call updatemcp/updatenames so that users get the latest mappings for unmapped items.
-Also calls updatemd5s so that the forge API is skipped when spitting out reobfusicated files.

Update the readme to be more accurate.
Added my name to the credits :P
Updated the update_patches/package scripts to account for grabbing the conf folder.
Added GnuWin32's grep
2011-12-11 07:04:21 +00:00
Space Toad c726e219d7 bumped version number 2011-12-10 11:07:51 +00:00
Space Toad 707a07511f further backward compatibility fixes 2011-12-10 11:05:49 +00:00
LexManos d64c332266 Added my EnumHelper classes, this allows for dynamic creation of Enum values at runtime.
See My post for a example:
http://www.minecraftforum.net/topic/514000-api-minecraft-forge/page__view__findpost__p__10948540
2011-12-09 07:58:32 +00:00
LexManos 800bb21bc8 Missed some mappings 2011-12-09 06:51:31 +00:00
LexManos 1931d4fc09 For for updated mappings. 2011-12-09 04:40:32 +00:00
Space Toad 17c9f9bf9b added server side of the previous commit 2011-12-08 07:51:17 +00:00
Space Toad db1f438c2d fixed backwards compatibility 2011-12-07 21:30:48 +00:00
LexManos d67cda76b8 Fixed fortune enchant.
This breaks forge's quantityDropped signature, be careful when updating mods.
2011-12-06 07:41:59 +00:00
LexManos b883254220 Cleaned up a few things related to MLProp
Deleted unmaintained fernflower patch.
2011-12-05 08:30:07 +00:00
Eloraam 8a4636cba3 Added a hoe handler for advanced farming. 2011-12-02 04:32:10 +00:00
Eloraam 9c6f5bd8ee Added new tool harvest intercept hook. Removed mlprop.patch. 2011-12-02 04:08:15 +00:00
LexManos a2c606e98c Moved dye creative adds to the ItemDye class. 2011-12-02 03:57:11 +00:00
LexManos 6c578cd84d Creative Container population hook. 2011-12-02 03:37:48 +00:00
Eloraam e35435abd5 Fixed missing CraftingManager patches for the repair disable hook.
Fixed smp mlprop.
2011-12-02 02:26:15 +00:00
LexManos 5c7978d347 Added MLprop.java that ST forgot when he merged.
Fixed EntityPlayer.getPlayerStrVsBlock metadata function for 1.0.0 changes in Enchantments/Potions.
2011-12-01 07:29:06 +00:00
Space Toad 68cc1d315b bumped version number 2011-11-30 19:02:10 +00:00
Space Toad 96c05bbd25 merged with pre-1.9p5 branch, for 1.0.0 release 2011-11-30 19:00:43 +00:00
Space Toad d2cf70f8d5 fixed mapping 2011-11-15 18:46:42 +00:00
Eloraam f1a6f45353 New block destruction hook. Deprecated IOverrideReplace. 2011-10-31 20:07:31 +00:00
Eloraam 8acaaa0e53 Updated MCP mapping, backed out a useless patch. 2011-10-31 19:24:45 +00:00
Eloraam 384da1b222 Added some IC2 items. 2011-10-27 02:05:43 +00:00
Eloraam 2be3e5845a Changed a field permission for MFR. 2011-10-26 04:42:37 +00:00
Eloraam 600b2b86a6 Small TileEntity fix. 2011-10-25 19:28:47 +00:00
Eloraam 6fb7b777ce Added a few more known ingots. 2011-10-25 17:15:12 +00:00
Eloraam 28345bf839 Bugfix for numeric range of mob and window IDs. 2011-10-22 11:53:00 +00:00
Eloraam 56f612c186 Fixed TileEntity caching. 2011-10-21 21:00:44 +00:00
Eloraam 80882bec9c Patch for a small activation glitch in doors. 2011-10-19 02:45:51 +00:00
Eloraam f1f672b5fd MCP update.
Fixed a problem with TileEntity sending.
2011-10-19 02:00:50 +00:00
Eloraam bf5e706f06 Rolled in a critical MLMP fix, because MLMP is virtually unmaintained. 2011-10-18 19:11:57 +00:00
Eloraam c12b2c5b11 Added ore dictionary. 2011-10-18 18:56:10 +00:00
Eloraam a64a47b24c Fix for new MCP mappings.
Fixed the distribution of flowers with bonemeal.
Fixed accidentally making obsidian easy to mine.
2011-10-13 07:10:43 +00:00
LexManos 8a7c087e34 Fixed line endings in install.sh 2011-10-11 22:38:39 +00:00
LexManos 756c3ce812 Updated the package.sh script to include the patches, the new install.sh, and modLoaderMP/mlprop.patch 2011-10-11 22:23:39 +00:00
LexManos b8a84f2c29 Changed the windows setup to use del instead of remove.
Both update patches scripts no longer remove svn entries.
Added the forge_client\bin and forge_server\bin folders to the svn ignore.
2011-10-10 23:47:30 +00:00
Space Toad ebc09a72db bumbed forge minor version 2011-10-10 19:21:41 +00:00
Space Toad 579f4de295 reactivated special armor code 2011-10-10 19:16:11 +00:00
LexManos 9f56b1cc03 Made the windows setup script a bit more robust, also made both scripts filter out non-patch files. {Issue with svn files} 2011-10-10 00:09:48 +00:00
LexManos 141805d5bb Fixed a bug in forge_client project that had a hard link to E:/MCP/jars/bin/paul.jar now points to MCP/jars/bin/minecraft.jar {has the same paulsound libraries}
Major refactoring of the patches, now each modified file gets its own patch file.
Rewrote all the scripts to use new multi-patch system.
Added linux install.sh using new system.
Added some required libraries from GNUWin32 for the windows side of the new setup.bat/update_patches.bat http://gnuwin32.sourceforge.net/
2011-10-09 04:21:29 +00:00
Eloraam d00a837635 Changed a field permission. 2011-10-05 22:54:20 +00:00
Eloraam da695e774f Fixed another TileEntity bug. 2011-10-04 21:46:00 +00:00
Space Toad b3d605cd9d ISidedInventory is now explicitely an inventory 2011-10-02 19:14:20 +00:00
Eloraam 56438eb585 Fixed the MCP mappings. 2011-10-02 18:42:15 +00:00
Eloraam b763c73b74 - Added an ItemStack parameter to IArmorTextureProvider
- Added ISidedInventory
- Added IBonemealHandler
- Added hooks in grow-on-grass and in break tall grass.
- Fixed furnace output of multiple items.
- Added getBlockDropped().
- Bumped version number to 1.1.1.
2011-10-02 08:55:31 +00:00
Eloraam ff7055fdb2 Hopefully fixed the major TileEntity bugs. 2011-09-30 12:32:27 +00:00
Eloraam 07dfc35e0e Fixed TileEntities, bumped version number. 2011-09-28 23:35:31 +00:00
Eloraam d290970b49 Fixed digging particles. 2011-09-26 19:37:28 +00:00
Eloraam 47749d454a Added a fix for onItemUse regression. 2011-09-22 10:12:05 +00:00
Eloraam ed7c343647 More MCP mapping fixes. 2011-09-22 03:01:10 +00:00
Eloraam a386d0a8dc Undid that. Whoops. 2011-09-22 02:49:33 +00:00
Eloraam 1a8d32f7de Code to remove a single block effectiveness. 2011-09-22 02:45:47 +00:00
Eloraam 7a242e9562 Metadata-sensitive quantity dropped. 2011-09-21 08:08:58 +00:00
Eloraam afdbc4064b Fixed up a few bugs in the tool path. 2011-09-21 07:14:53 +00:00
Eloraam 0392ecd8da Fixed another bug in the furnace patch. Works now. 2011-09-21 01:05:44 +00:00
Eloraam cab70ce17a Small bugfix for furnace patch. 2011-09-21 00:59:37 +00:00
Eloraam 9fa40cb432 Metadata-sensitive smelting patch. 2011-09-21 00:55:09 +00:00
Eloraam c9b6cdef1f Fixes for MCP updates. 2011-09-19 20:40:07 +00:00
Eloraam 5ecff4e5a1 Fixed the 1.8.1 version for MLMP support. 2011-09-19 20:30:34 +00:00
Eloraam 115de819b3 A bunch of little patches to make it actually build for 1.8.1. 2011-09-19 01:44:40 +00:00
Eloraam bb6751cc59 First attempt at a 1.8.1 version. May not work. 2011-09-19 01:30:41 +00:00
Eloraam 0a874de91d Unrolled a mistaken fix. 2011-09-11 04:46:16 +00:00
Eloraam 3b61068a3c Another try for osx. 2011-09-11 04:05:39 +00:00
Eloraam cfe5a542fc A small fix to hopefully make the script work on a mac. 2011-09-11 03:49:01 +00:00
Eloraam 4f4a75d865 Redesigned TileEntity handling. 2011-09-08 21:33:03 +00:00
Space Toad 5c74f5efb9 fixed SMP bug related to BuildCraft issue #226 2011-09-07 19:57:53 +00:00
Eloraam 878cac2697 A few small patches to fix obscure piston rendering bugs. 2011-09-07 15:14:01 +00:00
Eloraam 8b5440b351 Optifine compatibility patch. 2011-09-07 14:58:08 +00:00
Space Toad 71c77d9e9a updated to latest MCP, and added custom item rendering facilities 2011-09-03 11:46:59 +00:00
Eloraam 8ced84d8d3 Improved trapdoor hook. 2011-09-01 08:01:47 +00:00
Eloraam 3e09d92cd4 New lighting hook. 2011-08-30 10:32:14 +00:00
Eloraam 17132962c9 Fixed new MCP mappings. 2011-08-30 06:18:32 +00:00
Space Toad e7ca40009e bumped forge version # to 1.0.6 2011-08-28 12:54:47 +00:00
Space Toad 62e7bdf805 added ArmorProperties constructors, remove deprecated subprograms (supposedly not used by anyone) 2011-08-28 12:33:16 +00:00
Space Toad 705e5e62a0 fixed headers, implemented new armor computation for IC2 2011-08-27 11:42:48 +00:00
Eloraam a6ed5709ef Fixed the permissions on a couple fields in ItemTool. 2011-08-27 05:49:09 +00:00
Space Toad aead41197f temporary reverted to r61 2011-08-27 01:12:20 +00:00
Space Toad e9cd63abf7 updated credits 2011-08-25 19:47:34 +00:00
Eloraam d2878faa33 Patched the installer again. 2011-08-25 17:15:02 +00:00
Eloraam 1c11f0eeb0 Fixed a typo. 2011-08-25 07:19:49 +00:00
Eloraam 33bd0947e3 Small RedPower-specific patch. 2011-08-25 07:17:10 +00:00
Eloraam 0457d8057f Added armor texture hook. 2011-08-25 00:23:31 +00:00
Eloraam b0efd106bd New install script for Windows. 2011-08-24 04:18:57 +00:00
Eloraam 9d22e76927 Fixed the version number. 2011-08-21 07:50:09 +00:00
Eloraam 6ac2161f36 Changed some field permissions. 2011-08-20 22:23:29 +00:00
Eloraam 4cdb1cb3d0 Handler for custom block highlight. 2011-08-20 10:35:14 +00:00
Eloraam 651af86795 Version control logic, improved the destroy handling hook. 2011-08-20 08:59:05 +00:00
Eloraam 622f536f80 Improved BTW compatibility.
Finished the placement hook changes.
Added a sleep handler.
Added a current item destroyed handler.
2011-08-18 00:14:09 +00:00
Eloraam 231c65da06 Checking in the new crafting hook. 2011-08-17 16:05:38 +00:00
Eloraam 72864e4bc2 Added a little support for two-pass rendering. 2011-08-17 10:23:10 +00:00
Eloraam 1d19069203 Forgot the forge hooks. 2011-08-13 18:26:31 +00:00
Eloraam 12b64fa287 Updates:
- Added warning message for non-preloaded textures.
- Documentation
- Ladder fix for SMP.
- Obsoleted IBlockSecondaryProperties
- Added hooks for place-by-side.
- Fixed texture 3 and piston texture bug.
- Added new tool system.
2011-08-12 23:53:30 +00:00
FlowerChild fb5f9373c5 Added patches for decompiled by fernflower source. Client only, and not tested enough. Using is currently not recommended. 2011-08-12 13:52:53 +00:00
Eloraam 08b0913f04 Uploaded new install file. 2011-08-12 04:17:33 +00:00
Eloraam 8d9e0879d8 Fixed for the new version of MCP. 2011-08-11 21:10:52 +00:00
Eloraam adf31e33fd Uploaded install fix. 2011-08-08 19:50:09 +00:00
Eloraam 61b8107ba4 The ladder hook. 2011-08-08 16:55:50 +00:00
Eloraam cfda01b9ff Fixed a typo in isBoundingBoxBurning. 2011-08-07 21:37:05 +00:00
Space Toad 4c259ce5d5 updated list of contributers 2011-08-06 21:54:56 +00:00
Space Toad 53dd73f2a5 updated release and package script to take into account credit file 2011-08-06 21:23:38 +00:00
Space Toad 691b87e876 renamed file 2011-08-06 21:18:31 +00:00
Space Toad b813f609a6 initial revision of the credit file, to be completed 2011-08-06 21:16:53 +00:00
Eloraam cbcdfbcfdb Added a comment. 2011-08-06 18:29:58 +00:00
Eloraam 6c19a22244 Added a small patch to MovingObjectPosition. 2011-08-06 18:22:24 +00:00
Eloraam f530d9f2b2 Not really a change. 2011-08-05 14:58:18 +00:00
Eloraam 6accd6dfee Added a texture preloader to avoid render glitches on the first render. 2011-08-05 11:58:14 +00:00
Eloraam f54eecb455 New multiple-tessellator texture renderer. 2011-08-05 11:07:03 +00:00
Eloraam 4bc2f86ea8 New install script for Linux users. 2011-08-05 00:32:56 +00:00
Space Toad 6d0e031989 improved installation and setup scripts 2011-08-04 06:10:38 +00:00
Eloraam d23812cb4c Added secondary block properties patch. 2011-08-03 05:15:31 +00:00
Eloraam ee1f04bd58 Fixed a little path bug. 2011-08-02 05:18:52 +00:00
Eloraam 98fbe565b3 Improved the setup scripts. 2011-08-02 03:54:59 +00:00
Eloraam 197c847a5f Fixed bugs in the pickaxe code. 2011-08-01 02:06:00 +00:00
Eloraam 73365fcbe4 Improved some documentation. 2011-07-31 18:52:19 +00:00
Space Toad e6cc73ce55 removed inner classes, remove redundant biome control 2011-07-31 12:01:23 +00:00
Space Toad c9685426b2 fixed files for release 2011-07-30 21:25:39 +00:00
Space Toad c35f8e5ddb additional comments 2011-07-30 21:10:42 +00:00
Space Toad b892916d6f added comments 2011-07-30 21:01:03 +00:00
Space Toad 18f822a8d2 fixed exceptions in minecraft code 2011-07-30 19:05:28 +00:00
Space Toad 5717e3e979 fixed previous checkin 2011-07-30 16:13:31 +00:00
Space Toad e6dff0bfc6 added sources packaging 2011-07-30 16:13:14 +00:00
Space Toad 0490d22992 add custom armor, for #13 2011-07-30 07:13:10 +00:00
Space Toad 5975944963 first batch of documentation + minor reformatings 2011-07-30 06:42:15 +00:00
Eloraam 58f3084074 Added explosion resistance hook. 2011-07-29 22:00:08 +00:00
Space Toad 59e7645d61 fixed addPixaxeBlockEffectiveAgainst 2011-07-29 21:25:22 +00:00
Eloraam 7f0d588e62 Added the four new hooks from RedPower, and the TileEntity bugfix. 2011-07-29 21:15:21 +00:00
Space Toad 8c19143961 added missing copyright header 2011-07-29 20:59:01 +00:00
Space Toad f2a1b244e8 added missing file 2011-07-29 20:58:31 +00:00
Space Toad 14b6dbe4f5 added mineable block configuration, for #6 2011-07-29 17:55:34 +00:00
Space Toad 5af89543d3 added missing graphical features, added configuration management, for #5 2011-07-20 19:58:59 +00:00
Space Toad b11e534f88 improved previous patch, extracted internal class 2011-07-19 18:41:51 +00:00
Space Toad c9f7fc3475 fixed compilation errors 2011-07-19 18:19:45 +00:00
Space Toad f15ff6b925 fixed setup file 2011-07-19 17:58:23 +00:00
FlowerChild 1f78ce8b25 Removed MCForgeEffectRenderer, patched MC EffectRenderer 2011-07-19 11:24:36 +00:00
Space Toad 9584d7d2ad removed OBE file 2011-07-18 06:18:14 +00:00
Space Toad 11c81cc91f fixed setup script for windows and patch 2011-07-17 12:16:26 +00:00
Space Toad 5477f767b3 fixed packaging script 2011-07-16 22:39:55 +00:00
Space Toad eba740b4ce fixed patch script and added release scripts 2011-07-16 22:32:57 +00:00
FlowerChild 1b7e8b6179 Added OnGameStart hook, added custom effect render to fulfill infinite sprite support. Render needs to be changed a little to cover items also, though. 2011-07-16 16:37:37 +00:00
Space Toad cd9d101e06 added headers 2011-07-15 23:13:09 +00:00
Space Toad 69a16fad9c added support for infinite sprites, for #4 2011-07-15 23:04:10 +00:00
Space Toad c7fb93c4f9 implement infinite terrain sprites, for #3 2011-07-15 22:40:53 +00:00
Space Toad 955a056015 fixed style, added biome population support, for #2 2011-07-15 21:17:33 +00:00
Space Toad 86612c1450 initial revision of the license 2011-07-15 18:26:33 +00:00
Space Toad 987ad5acd2 fixed previous checkin 2011-07-14 11:19:22 +00:00
Space Toad 7385d80298 added basic build script for windows 2011-07-14 11:18:25 +00:00
Space Toad f9e5cdc9ab added missing patch step 2011-07-14 11:15:07 +00:00
Space Toad 859a0d1dee made initial setup, implemented custom bucket, for #1 2011-07-14 11:10:21 +00:00
Space Toad b858205145 added main project directories 2011-07-12 21:03:55 +00:00
Space Toad f0c6f089b4 added main source directory 2011-07-12 21:02:53 +00:00
Space Toad 999ef3817a added base directories 2011-07-12 21:02:20 +00:00
233 changed files with 21872 additions and 17145 deletions

No files matched your search

-1591
View File
File diff suppressed because it is too large. Load diff
-5999
View File
File diff suppressed because it is too large. Load diff
-4880
View File
File diff suppressed because it is too large. Load diff
-4
View File
@@ -1,4 +0,0 @@
[VERSION]
MCPVersion = 5.0
ClientVersion = 1.0.0
ServerVersion = 1.0.1
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
File diff suppressed because it is too large. Load diff
@@ -213,6 +213,8 @@ net/minecraft/src/Packet8UpdateHealth.func_322_a(Ljava/io/DataOutputStream;)V=ja
net/minecraft/src/Packet8UpdateHealth.func_327_a(Ljava/io/DataInputStream;)V=java/io/IOException
net/minecraft/src/Packet9Respawn.func_322_a(Ljava/io/DataOutputStream;)V=java/io/IOException
net/minecraft/src/Packet9Respawn.func_327_a(Ljava/io/DataInputStream;)V=java/io/IOException
net/minecraft/src/Packet250CustomPayload.func_322_a(Ljava/io/DataOutputStream;)V=java/io/IOException
net/minecraft/src/Packet250CustomPayload.func_327_a(Ljava/io/DataInputStream;)V=java/io/IOException
net/minecraft/src/RegionFile.func_22196_b()V=java/io/IOException
net/minecraft/src/RegionFile.func_22198_a(III)V=java/io/IOException
net/minecraft/src/RegionFile.func_22200_a(I[BI)V=java/io/IOException
@@ -226,3 +228,4 @@ net/minecraft/src/ThreadDownloadResources.func_1212_a(Ljava/net/URL;Ljava/io/Fil
net/minecraft/src/ThreadedChunkLoader.func_40551_a(Lnet/minecraft/src/ThreadedChunkLoaderPending;)V=java/io/IOException
net/minecraft/src/ThreadedChunkLoader.func_813_a(Lnet/minecraft/src/World;II)Lnet/minecraft/src/Chunk;=java/io/IOException
net/minecraft/src/ThreadedFileIOBase.func_40566_a()V=java/lang/InterruptedException
net/minecraft/src/StringTranslate.func_44025_a(Ljava/util/Properties;Ljava/lang/String;)V=java/io/IOException
File diff suppressed because it is too large. Load diff
+37 -35
View File
@@ -9,6 +9,9 @@ DirConf = conf
DirRuntime = runtime
DirLib = lib
DirFFOut = temp/ffout
DirBinOut = temp/bin
DirModSrc = modsrc
DirEclipse = eclipse
[CSV]
Classes = %(DirConf)s/classes.csv
@@ -23,8 +26,8 @@ Server = %(DirTemp)s/server_rg.srg
DirNatives = %(DirJars)s/bin/natives
Client = %(DirJars)s/bin/minecraft.jar
Server = %(DirJars)s/minecraft_server.jar
MD5Client = 3820d222b95d0b8c520d9596a756a6e6
MD5Server = 934b6010999daa1f1b1ccdf4cb77e052
MD5Client = e92302d2acdba7c97e0d8df1e10d2006
MD5Server = b0f4fb91f9723104adf35944bbf3d3cf
[RETROGUARD]
Location = %(DirRuntime)s/bin/retroguard.jar
@@ -50,8 +53,6 @@ XClientLog = %(DirLogs)s/client_exc.log
XServerLog = %(DirLogs)s/server_exc.log
[DECOMPILE]
FFClientConf = -rbr=0 -dgs=1 -asc=1
FFServerConf = -rbr=0 -dgs=1 -asc=1
FFClientOut = %(DirFFOut)s/client
FFServerOut = %(DirFFOut)s/server
FFClientSrc = %(DirFFOut)s/minecraft_exc.jar
@@ -59,15 +60,12 @@ FFServerSrc = %(DirFFOut)s/minecraft_server_exc.jar
FFSource = net
[OUTPUT]
BinOut = %(DirTemp)s/bin
BinClient = %(DirTemp)s/bin/minecraft
BinServer = %(DirTemp)s/bin/minecraft_server
BinClient = %(DirBinOut)s/minecraft
BinServer = %(DirBinOut)s/minecraft_server
SrcClient = %(DirSrc)s/minecraft
SrcServer = %(DirSrc)s/minecraft_server
[PACKAGES]
PkgClient = net/minecraft/src,net/minecraft/client
PkgServer = net/minecraft/src,net/minecraft/server
TestClient = net/minecraft/client/Minecraft
TestServer = net/minecraft/server/MinecraftServer
[PATCHES]
PatchClient = %(DirConf)s/patches/minecraft.patch
@@ -75,6 +73,8 @@ PatchServer = %(DirConf)s/patches/minecraft_server.patch
PatchTemp = %(DirTemp)s/temp.patch
FFPatchClient = %(DirConf)s/patches/minecraft_ff.patch
FFPatchServer = %(DirConf)s/patches/minecraft_server_ff.patch
PatchClient_osx = %(DirConf)s/patches/minecraft_osx.patch
PatchServer_osx = %(DirConf)s/patches/minecraft_server_osx.patch
[RECOMPILE]
BinClient = %(DirBin)s/minecraft
@@ -84,8 +84,6 @@ ClassPathServer = %(DirLib)s/,%(DirLib)s/*,%(DirJars)s/minecraft_server.jar
ClientFixes = %(DirConf)s/patches
[REOBF]
SAFFXClient = %(DirTemp)s/minecraft.saffx
SAFFXServer = %(DirTemp)s/minecraft_server.saffx
MD5Client = %(DirTemp)s/client.md5
MD5Server = %(DirTemp)s/server.md5
MD5PreReobfClient = %(DirTemp)s/client_reobf.md5
@@ -98,42 +96,46 @@ ObfJarClient = %(DirTemp)s/client_reobf.jar
ObfJarServer = %(DirTemp)s/server_reobf.jar
ReobfDirClient = %(DirReobf)s/minecraft
ReobfDirServer = %(DirReobf)s/minecraft_server
ClientRoLog = %(DirLogs)s/client_ro.log
ServerRoLog = %(DirLogs)s/server_ro.log
ReobfClientLog = %(DirLogs)s/client_reob.log
ReobfServerLog = %(DirLogs)s/server_reob.log
FixSound = minecraft/me.class
FixStart = minecraft/Start.class
FixSound = ga
FixStart = Start
NullPkg = net/minecraft/src
IgnorePkg = paulscode,com/jcraft,isom,ibxm,de/matthiasmann/twl,org/xmlpull,javax/xml
[GETMODSOURCE]
OutSRCClient = modsrc/client
OutSRCServer = modsrc/server
OutSRC = modsrc
OutSRCClient = %(DirModSrc)s/minecraft
OutSRCServer = %(DirModSrc)s/minecraft_server
[MCP]
LogFile = %(DirLogs)s/mcp.log
LogFileErr = %(DirLogs)s/mcperr.log
UpdateUrl = http://mcp.ocean-labs.de/files/mcprolling_{version}/
IgnoreUpdate = %(DirBin)s,%(DirLib)s,%(DirLogs)s,%(DirModSrc)s,%(DirReobf)s,%(DirSrc)s,%(DirTemp)s,%(DirEclipse)s/Client/bin,%(DirEclipse)s/Server/bin,%(DirJars)s/world,%(DirJars)s/saves,%(DirJars)s/resources
[COMMANDS]
Patcher = %(DirRuntime)s/bin/applydiff.exe
Patcher_win = %(DirRuntime)s/bin/applydiff.exe
Patcher_linux = patch
Patcher_osx = patch
Jad_win = %(DirRuntime)s/bin/jad.exe
Jad_linux = wine %(DirRuntime)s/bin/jad.exe
Jad_osx = %(DirRuntime)s/bin/jad-osx
AStyle_win = %(DirRuntime)s/bin/astyle.exe
AStyle_linux = wine %(DirRuntime)s/bin/astyle.exe
AStyle_osx = %(DirRuntime)s/bin/astyle-osx
JadRetro = %(DirRuntime)s/bin/jadretro.jar
Fernflower = %(DirRuntime)s/bin/fernflower.jar
Jadwin = %(DirRuntime)s/bin/jad.exe
Jadlinux = %(DirRuntime)s/bin/jad.exe
Jadosx = %(DirRuntime)s/bin/jad-osx
Exceptor = %(DirRuntime)s/bin/exceptor.jar
CmdRG = %s -cp {classpath} RetroGuard -searge {conffile}
CmdRGReobf = %s -cp {classpath} RetroGuard -notch {conffile}
CmdJadretro = %s -jar {jarjr} {targetdir}
CmdRecompClt = %s -g -source 1.6 -target 1.6 -classpath "{classpath}" -sourcepath {sourcepath} -d {outpath} {pkgs} {fixes}/*.java
CmdRecompSrv = %s -g -source 1.6 -target 1.6 -classpath "{classpath}" -sourcepath {sourcepath} -d {outpath} {pkgs}
CmdPatch = %s -p1 -u -i {patchfile} -d {srcdir}
CmdJad = %s -b -d {outdir} -dead -o -r -s .java -stat -ff {classes}
CmdAStyle = %s -A1s4CSKYm1M1pHjcnqz2 {classes}
CmdRG = %s -cp "{classpath}" RetroGuard -searge {conffile}
CmdRGReobf = %s -cp "{classpath}" RetroGuard -notch {conffile}
CmdJadretro = %s -jar %s {targetdir}
CmdFernflower = %s -jar %s -rbr=0 -dgs=1 -asc=1 -log=WARN {jarin} {jarout}
CmdExceptor = %s -jar %s {input} {output} {conf} {log}
CmdRecomp = %s -g -source 1.6 -target 1.6 -classpath "{classpath}" -sourcepath {sourcepath} -d {outpath} {pkgs}
CmdStartSrv = %s -Xincgc -Xms1024M -Xmx1024M -cp "{classpath}" net.minecraft.server.MinecraftServer
CmdStartClt = %s -Xincgc -Xms1024M -Xmx1024M -cp "{classpath}" -Djava.library.path={natives} Start
CmdJadwin = .\{binjad} -b -d {outdir} -dead -o -r -s .java -stat -v -ff {classes}
CmdJadlinux = wine {binjad} -b -d {outdir} -dead -o -r -s .java -stat -v -ff "{classes}"
CmdJadosx = {binjad} -b -d {outdir} -dead -o -r -s .java -stat -v -ff {classes}
CmdPatchwin = .\%(Patcher)s --binary -p1 -u -i ..\..\{patchfile} -d {srcdir}
CmdPatchlinux = patch --binary -p1 -u -i ../../{patchfile} -d {srcdir}
CmdPatchosx = patch --binary -p1 -u -i ../../{patchfile} -d {srcdir}
CmdFernflower = %s -jar {jarff} {conf} {jarin} {jarout}
CmdExceptor = %s -jar {jarexc} {input} {output} {conf} {log}
File diff suppressed because it is too large. Load diff
File renamed without changes.
@@ -1,6 +1,6 @@
// this is needed for the sound engine to work with deobfuscated sourcecode without crashing
public class me
public class ga
{
public static int c(double d)
{
File diff suppressed because it is too large. Load diff
@@ -1,7 +1,7 @@
diff -r -U 3 minecraft\net\minecraft\client\Minecraft.java minecraft_patched\net\minecraft\client\Minecraft.java
--- minecraft\net\minecraft\client\Minecraft.java Tue Nov 22 23:21:44 2011
+++ minecraft_patched\net\minecraft\client\Minecraft.java Wed Nov 23 00:09:14 2011
@@ -1600,11 +1600,13 @@
--- minecraft\net\minecraft\client\Minecraft.java Fri Jan 13 17:44:46 2012
+++ minecraft_patched\net\minecraft\client\Minecraft.java Fri Jan 13 17:35:06 2012
@@ -1609,11 +1609,13 @@
this.field_6324_e.func_600_a(var6.field_22395_a + var10, 64, var6.field_22396_c + var8);
if(!this.field_6327_b.func_35643_e()) {
@@ -16,8 +16,8 @@ diff -r -U 3 minecraft\net\minecraft\client\Minecraft.java minecraft_patched\net
}
}
diff -r -U 3 minecraft\net\minecraft\src\CodecMus.java minecraft_patched\net\minecraft\src\CodecMus.java
--- minecraft\net\minecraft\src\CodecMus.java Tue Nov 22 23:21:36 2011
+++ minecraft_patched\net\minecraft\src\CodecMus.java Wed Nov 23 00:09:14 2011
--- minecraft\net\minecraft\src\CodecMus.java Fri Jan 13 17:44:20 2012
+++ minecraft_patched\net\minecraft\src\CodecMus.java Fri Jan 13 17:35:06 2012
@@ -1,5 +1,6 @@
package net.minecraft.src;
@@ -39,8 +39,8 @@ diff -r -U 3 minecraft\net\minecraft\src\CodecMus.java minecraft_patched\net\min
}
}
diff -r -U 3 minecraft\net\minecraft\src\ItemMap.java minecraft_patched\net\minecraft\src\ItemMap.java
--- minecraft\net\minecraft\src\ItemMap.java Tue Nov 22 23:21:24 2011
+++ minecraft_patched\net\minecraft\src\ItemMap.java Wed Nov 23 00:09:14 2011
--- minecraft\net\minecraft\src\ItemMap.java Fri Jan 13 17:43:42 2012
+++ minecraft_patched\net\minecraft\src\ItemMap.java Fri Jan 13 17:35:06 2012
@@ -19,7 +19,6 @@
}
@@ -58,8 +58,8 @@ diff -r -U 3 minecraft\net\minecraft\src\ItemMap.java minecraft_patched\net\mine
if(var4 == null) {
var1.func_28156_b(var2.func_28101_b("map"));
diff -r -U 3 minecraft\net\minecraft\src\MusInputStream.java minecraft_patched\net\minecraft\src\MusInputStream.java
--- minecraft\net\minecraft\src\MusInputStream.java Tue Nov 22 23:21:24 2011
+++ minecraft_patched\net\minecraft\src\MusInputStream.java Wed Nov 23 00:09:14 2011
--- minecraft\net\minecraft\src\MusInputStream.java Fri Jan 13 17:42:36 2012
+++ minecraft_patched\net\minecraft\src\MusInputStream.java Fri Jan 13 17:35:06 2012
@@ -1,5 +1,6 @@
package net.minecraft.src;
@@ -82,8 +82,8 @@ diff -r -U 3 minecraft\net\minecraft\src\MusInputStream.java minecraft_patched\n
for(int var4 = 0; var4 < var3; ++var4) {
byte var5 = var1[var2 + var4] = (byte)(var1[var2 + var4] ^ this.field_1516_c >> 8);
diff -r -U 3 minecraft\net\minecraft\src\RenderGlobal.java minecraft_patched\net\minecraft\src\RenderGlobal.java
--- minecraft\net\minecraft\src\RenderGlobal.java Tue Nov 22 23:21:20 2011
+++ minecraft_patched\net\minecraft\src\RenderGlobal.java Wed Nov 23 00:10:20 2011
--- minecraft\net\minecraft\src\RenderGlobal.java Fri Jan 13 17:43:24 2012
+++ minecraft_patched\net\minecraft\src\RenderGlobal.java Fri Jan 13 17:35:06 2012
@@ -1466,7 +1466,7 @@
double var15 = this.field_1439_t.field_22009_h.field_611_ak - var2;
double var17 = this.field_1439_t.field_22009_h.field_610_al - var4;
@@ -94,8 +94,8 @@ diff -r -U 3 minecraft\net\minecraft\src\RenderGlobal.java minecraft_patched\net
this.field_1439_t.field_6321_h.func_1192_a(var21 = new EntityHugeExplodeFX(this.field_1448_k, var2, var4, var6, var8, var10, var12));
} else if(var1.equals("largeexplode")) {
diff -r -U 3 minecraft\net\minecraft\src\ThreadedFileIOBase.java minecraft_patched\net\minecraft\src\ThreadedFileIOBase.java
--- minecraft\net\minecraft\src\ThreadedFileIOBase.java Tue Nov 22 23:21:30 2011
+++ minecraft_patched\net\minecraft\src\ThreadedFileIOBase.java Wed Nov 23 00:09:14 2011
--- minecraft\net\minecraft\src\ThreadedFileIOBase.java Fri Jan 13 17:43:00 2012
+++ minecraft_patched\net\minecraft\src\ThreadedFileIOBase.java Fri Jan 13 17:35:06 2012
@@ -21,7 +21,9 @@
}
+54
View File
@@ -0,0 +1,54 @@
diff -r -U 3 minecraft\net\minecraft\src\EntityMinecart.java minecraft_patched\net\minecraft\src\EntityMinecart.java
--- minecraft\net\minecraft\src\EntityMinecart.java Sat Jan 14 16:05:10 2012
+++ minecraft_patched\net\minecraft\src\EntityMinecart.java Sat Jan 14 16:07:41 2012
@@ -811,7 +811,7 @@
double d = entity.field_611_ak - field_611_ak;
double d1 = entity.field_609_am - field_609_am;
double d2 = d * d + d1 * d1;
- if(d2 >= 9.9999997473787516E-05D)
+ if(d2 >= 9.9999997473787516E-005D)
{
d2 = MathHelper.func_1109_a(d2);
d /= d2;
diff -r -U 3 minecraft\net\minecraft\src\RenderGlobal.java minecraft_patched\net\minecraft\src\RenderGlobal.java
--- minecraft\net\minecraft\src\RenderGlobal.java Sat Jan 14 16:05:10 2012
+++ minecraft_patched\net\minecraft\src\RenderGlobal.java Sat Jan 14 16:07:41 2012
@@ -968,7 +968,7 @@
f3 = f7;
f4 = f8;
}
- float f6 = 0.0004882812F;
+ float f6 = 0.0004882813F;
double d = (float)field_1435_x + f;
double d1 = field_1439_t.field_22009_h.field_9285_at + (field_1439_t.field_22009_h.field_611_ak - field_1439_t.field_22009_h.field_9285_at) * (double)f + d * 0.029999999329447746D;
double d2 = field_1439_t.field_22009_h.field_9283_av + (field_1439_t.field_22009_h.field_609_am - field_1439_t.field_22009_h.field_9283_av) * (double)f;
diff -r -U 3 minecraft\net\minecraft\src\Vec3D.java minecraft_patched\net\minecraft\src\Vec3D.java
--- minecraft\net\minecraft\src\Vec3D.java Sat Jan 14 16:05:10 2012
+++ minecraft_patched\net\minecraft\src\Vec3D.java Sat Jan 14 16:07:41 2012
@@ -137,7 +137,7 @@
double d1 = vec3d.field_1776_a - field_1776_a;
double d2 = vec3d.field_1775_b - field_1775_b;
double d3 = vec3d.field_1779_c - field_1779_c;
- if(d1 * d1 < 1.0000000116860974E-07D)
+ if(d1 * d1 < 1.0000000116860974E-007D)
{
return null;
}
@@ -156,7 +156,7 @@
double d1 = vec3d.field_1776_a - field_1776_a;
double d2 = vec3d.field_1775_b - field_1775_b;
double d3 = vec3d.field_1779_c - field_1779_c;
- if(d2 * d2 < 1.0000000116860974E-07D)
+ if(d2 * d2 < 1.0000000116860974E-007D)
{
return null;
}
@@ -175,7 +175,7 @@
double d1 = vec3d.field_1776_a - field_1776_a;
double d2 = vec3d.field_1775_b - field_1775_b;
double d3 = vec3d.field_1779_c - field_1779_c;
- if(d3 * d3 < 1.0000000116860974E-07D)
+ if(d3 * d3 < 1.0000000116860974E-007D)
{
return null;
}
File diff suppressed because it is too large. Load diff
@@ -1,6 +1,6 @@
diff -r -U 3 minecraft_server\net\minecraft\src\ItemMap.java minecraft_server_patched\net\minecraft\src\ItemMap.java
--- minecraft_server\net\minecraft\src\ItemMap.java Tue Nov 22 23:21:56 2011
+++ minecraft_server_patched\net\minecraft\src\ItemMap.java Wed Nov 23 00:09:45 2011
--- minecraft_server\net\minecraft\src\ItemMap.java Fri Jan 13 17:46:22 2012
+++ minecraft_server_patched\net\minecraft\src\ItemMap.java Fri Jan 13 17:37:00 2012
@@ -22,7 +22,6 @@
}
@@ -11,8 +11,8 @@ diff -r -U 3 minecraft_server\net\minecraft\src\ItemMap.java minecraft_server_pa
var1.func_28145_b(var2.func_28104_b("map"));
diff -r -U 3 minecraft_server\net\minecraft\src\RConThreadClient.java minecraft_server_patched\net\minecraft\src\RConThreadClient.java
diff -r -U 3 minecraft_server\net\minecraft\src\ThreadedFileIOBase.java minecraft_server_patched\net\minecraft\src\ThreadedFileIOBase.java
--- minecraft_server\net\minecraft\src\ThreadedFileIOBase.java Tue Nov 22 23:22:10 2011
+++ minecraft_server_patched\net\minecraft\src\ThreadedFileIOBase.java Wed Nov 23 00:09:45 2011
--- minecraft_server\net\minecraft\src\ThreadedFileIOBase.java Fri Jan 13 17:45:20 2012
+++ minecraft_server_patched\net\minecraft\src\ThreadedFileIOBase.java Fri Jan 13 17:37:00 2012
@@ -21,7 +21,9 @@
}
@@ -0,0 +1,60 @@
diff -r -U 3 minecraft_server\net\minecraft\src\EntityMinecart.java minecraft_server_patched\net\minecraft\src\EntityMinecart.java
--- minecraft_server\net\minecraft\src\EntityMinecart.java Sat Jan 14 16:05:25 2012
+++ minecraft_server_patched\net\minecraft\src\EntityMinecart.java Sat Jan 14 16:07:50 2012
@@ -751,7 +751,7 @@
double d = entity.field_322_l - field_322_l;
double d1 = entity.field_320_n - field_320_n;
double d2 = d * d + d1 * d1;
- if(d2 >= 9.9999997473787516E-05D)
+ if(d2 >= 9.9999997473787516E-005D)
{
d2 = MathHelper.func_583_a(d2);
d /= d2;
diff -r -U 3 minecraft_server\net\minecraft\src\GuiStatsComponent.java minecraft_server_patched\net\minecraft\src\GuiStatsComponent.java
--- minecraft_server\net\minecraft\src\GuiStatsComponent.java Sat Jan 14 16:05:25 2012
+++ minecraft_server_patched\net\minecraft\src\GuiStatsComponent.java Sat Jan 14 16:07:50 2012
@@ -43,12 +43,12 @@
System.gc();
field_768_c[0] = (new StringBuilder()).append("Memory use: ").append(l / 1024L / 1024L).append(" mb (").append((Runtime.getRuntime().freeMemory() * 100L) / Runtime.getRuntime().maxMemory()).append("% free)").toString();
field_768_c[1] = (new StringBuilder()).append("Threads: ").append(NetworkManager.field_1052_b).append(" + ").append(NetworkManager.field_1051_c).toString();
- field_768_c[2] = (new StringBuilder()).append("Avg tick: ").append(field_40573_a.format(func_40571_a(field_40572_e.field_40027_f) * 9.9999999999999995E-07D)).append(" ms").toString();
+ field_768_c[2] = (new StringBuilder()).append("Avg tick: ").append(field_40573_a.format(func_40571_a(field_40572_e.field_40027_f) * 9.9999999999999995E-007D)).append(" ms").toString();
i = 0;
_L3:
if(i >= field_40572_e.field_6034_e.length) goto _L2; else goto _L1
_L1:
- field_768_c[3 + i] = (new StringBuilder()).append("Lvl ").append(i).append(" tick: ").append(field_40573_a.format(func_40571_a(field_40572_e.field_40028_g[i]) * 9.9999999999999995E-07D)).append(" ms").toString();
+ field_768_c[3 + i] = (new StringBuilder()).append("Lvl ").append(i).append(" tick: ").append(field_40573_a.format(func_40571_a(field_40572_e.field_40028_g[i]) * 9.9999999999999995E-007D)).append(" ms").toString();
if(field_40572_e.field_6034_e[i] == null || field_40572_e.field_6034_e[i].field_20911_y == null)
{
continue; /* Loop/switch isn't completed */
diff -r -U 3 minecraft_server\net\minecraft\src\Vec3D.java minecraft_server_patched\net\minecraft\src\Vec3D.java
--- minecraft_server\net\minecraft\src\Vec3D.java Sat Jan 14 16:05:25 2012
+++ minecraft_server_patched\net\minecraft\src\Vec3D.java Sat Jan 14 16:07:50 2012
@@ -121,7 +121,7 @@
double d1 = vec3d.field_1055_a - field_1055_a;
double d2 = vec3d.field_1054_b - field_1054_b;
double d3 = vec3d.field_1058_c - field_1058_c;
- if(d1 * d1 < 1.0000000116860974E-07D)
+ if(d1 * d1 < 1.0000000116860974E-007D)
{
return null;
}
@@ -140,7 +140,7 @@
double d1 = vec3d.field_1055_a - field_1055_a;
double d2 = vec3d.field_1054_b - field_1054_b;
double d3 = vec3d.field_1058_c - field_1058_c;
- if(d2 * d2 < 1.0000000116860974E-07D)
+ if(d2 * d2 < 1.0000000116860974E-007D)
{
return null;
}
@@ -159,7 +159,7 @@
double d1 = vec3d.field_1055_a - field_1055_a;
double d2 = vec3d.field_1054_b - field_1054_b;
double d3 = vec3d.field_1058_c - field_1058_c;
- if(d3 * d3 < 1.0000000116860974E-07D)
+ if(d3 * d3 < 1.0000000116860974E-007D)
{
return null;
}
File renamed without changes.
@@ -182,6 +182,8 @@ net/minecraft/src/Packet8UpdateHealth.func_68_a(Ljava/io/DataOutputStream;)V=jav
net/minecraft/src/Packet8UpdateHealth.func_70_a(Ljava/io/DataInputStream;)V=java/io/IOException
net/minecraft/src/Packet9Respawn.func_68_a(Ljava/io/DataOutputStream;)V=java/io/IOException
net/minecraft/src/Packet9Respawn.func_70_a(Ljava/io/DataInputStream;)V=java/io/IOException
net/minecraft/src/Packet250CustomPayload.func_68_a(Ljava/io/DataOutputStream;)V=java/io/IOException
net/minecraft/src/Packet250CustomPayload.func_70_a(Ljava/io/DataInputStream;)V=java/io/IOException
net/minecraft/src/RConOutputStream.func_40393_a(I)V=java/io/IOException
net/minecraft/src/RConOutputStream.func_40394_a(S)V=java/io/IOException
net/minecraft/src/RConOutputStream.func_40396_a([B)V=java/io/IOException
@@ -200,3 +202,4 @@ net/minecraft/src/RegionFile.func_22138_b(III)V=java/io/IOException
net/minecraft/src/ThreadedChunkLoader.func_40325_a(Lnet/minecraft/src/ThreadedChunkLoaderPending;)V=java/io/IOException
net/minecraft/src/ThreadedChunkLoader.func_659_a(Lnet/minecraft/src/World;II)Lnet/minecraft/src/Chunk;=java/io/IOException
net/minecraft/src/ThreadedFileIOBase.func_40508_a()V=java/lang/InterruptedException
net/minecraft/src/StringTranslate.func_44011_a(Ljava/util/Properties;Ljava/lang/String;)V=java/io/IOException
+4
View File
@@ -0,0 +1,4 @@
[VERSION]
MCPVersion = 5.6
ClientVersion = 1.1
ServerVersion = 1.1
File renamed without changes.
File renamed without changes.
@@ -106,6 +106,7 @@ public class ForgeHooksClient {
Tessellator.instance=t;
}
static IRenderContextHandler unbindContext=null;
protected static void bindTexture(String name, int sub) {
Integer n;
n=textures.get(name);
@@ -115,12 +116,20 @@ public class ForgeHooksClient {
textures.put(name,n);
}
if(!inWorld) {
if(unbindContext!=null) {
unbindContext.afterRenderContext();
unbindContext=null;
}
if(Tessellator.instance.isDrawing) {
int mode=Tessellator.instance.drawMode;
Tessellator.instance.draw();
Tessellator.instance.startDrawing(mode);
}
GL11.glBindTexture(3553 /* GL_TEXTURE_2D */,n);
unbindContext=renderHandlers.get(new TesKey(n,sub));
if(unbindContext!=null) {
unbindContext.beforeRenderContext();
}
return;
}
bindTessellator(n,sub);
@@ -133,6 +142,10 @@ public class ForgeHooksClient {
if(Tessellator.instance.isDrawing) {
int mode=Tessellator.instance.drawMode;
Tessellator.instance.draw();
if(unbindContext!=null) {
unbindContext.afterRenderContext();
unbindContext=null;
}
Tessellator.instance.startDrawing(mode);
}
GL11.glBindTexture(3553 /* GL_TEXTURE_2D */, ModLoader
@@ -0,0 +1,123 @@
package net.minecraft.src.forge;
import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.GL11;
import net.minecraft.client.Minecraft;
import net.minecraft.src.GameSettings;
import net.minecraft.src.GuiControls;
import net.minecraft.src.GuiSlot;
import net.minecraft.src.KeyBinding;
import net.minecraft.src.Tessellator;
public class GuiControlsScrollPanel extends GuiSlot
{
private GuiControls controls;
private GameSettings options;
private Minecraft mc;
private String[] message;
private int mouseX;
private int mouseY;
private int selected = -1;
public GuiControlsScrollPanel(GuiControls controls, GameSettings options, Minecraft mc)
{
super(mc, controls.width, controls.height, 16, (controls.height - 32) + 4, 25);
this.controls = controls;
this.options = options;
this.mc = mc;
}
@Override
protected int getSize() {
return options.keyBindings.length;
}
@Override
protected void elementClicked(int i, boolean flag)
{
if (!flag)
{
if (selected == -1)
{
selected = i;
}
else
{
options.setKeyBinding(selected, -100);
selected = -1;
KeyBinding.resetKeyBindingArrayAndHash();
}
}
}
@Override
protected boolean isSelected(int i)
{
return false;
}
@Override
protected void drawBackground() {}
@Override
public void drawScreen(int mX, int mY, float f)
{
mouseX = mX;
mouseY = mY;
if (selected != -1 && !Mouse.isButtonDown(0) && Mouse.getDWheel() == 0)
{
if (Mouse.next() && Mouse.getEventButtonState())
{
System.out.println(Mouse.getEventButton());
options.setKeyBinding(selected, -100 + Mouse.getEventButton());
selected = -1;
KeyBinding.resetKeyBindingArrayAndHash();
}
}
super.drawScreen(mX, mY, f);
}
@Override
protected void drawSlot(int index, int xPosition, int yPosition, int l, Tessellator tessellator)
{
int width = 70;
int height = 20;
xPosition -= 20;
boolean flag = mouseX >= xPosition && mouseY >= yPosition && mouseX < xPosition + width && mouseY < yPosition + height;
int k = (flag ? 2 : 1);
GL11.glBindTexture(3553 /*GL_TEXTURE_2D*/, mc.renderEngine.getTexture("/gui/gui.png"));
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
controls.drawTexturedModalRect(xPosition, yPosition, 0, 46 + k * 20, width / 2, height);
controls.drawTexturedModalRect(xPosition + width / 2, yPosition, 200 - width / 2, 46 + k * 20, width / 2, height);
controls.drawString(mc.fontRenderer, options.getKeyBindingDescription(index), xPosition + width + 4, yPosition + 6, 0xFFFFFFFF);
boolean conflict = false;
for (int x = 0; x < options.keyBindings.length; x++)
{
if (x != index && options.keyBindings[x].keyCode == options.keyBindings[index].keyCode)
{
conflict = true;
break;
}
}
String str = (conflict ? "\247c" : "") + options.getOptionDisplayString(index);
str = (index == selected ? "\247f> \247e??? \247f<" : str);
controls.drawCenteredString(mc.fontRenderer, str, xPosition + (width / 2), yPosition + (height - 8) / 2, 0xFFFFFFFF);
}
public boolean keyTyped(char c, int i)
{
if (selected != -1)
{
options.setKeyBinding(selected, i);
selected = -1;
KeyBinding.resetKeyBindingArrayAndHash();
return false;
}
return true;
}
}
@@ -309,7 +309,7 @@ public class EnumHelper {
else
{
if ((field.getModifiers() & flags) == flags &&
field.getType().getName().equals(valueType))
field.getType().getName().replace('.', '/').equals(valueType)) //Apparently some JVMs return .'s and some don't..
{
valuesField = field;
break;
@@ -6,11 +6,14 @@
package net.minecraft.src.forge;
import net.minecraft.src.Block;
import net.minecraft.src.Entity;
import net.minecraft.src.EntityMinecart;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.IInventory;
import net.minecraft.src.ItemStack;
import net.minecraft.src.Item;
import net.minecraft.src.EnumStatus;
import net.minecraft.src.ModLoader;
import net.minecraft.src.World;
import java.util.*;
@@ -70,6 +73,36 @@ public class ForgeHooks {
}
static LinkedList<ISleepHandler> sleepHandlers = new LinkedList<ISleepHandler>();
public static void onMinecartUpdate(EntityMinecart minecart, int x, int y, int z)
{
for (IMinecartHandler handler : minecartHandlers)
{
handler.onMinecartUpdate(minecart, x, y, z);
}
}
public static void onMinecartEntityCollision(EntityMinecart minecart, Entity entity)
{
for (IMinecartHandler handler : minecartHandlers)
{
handler.onMinecartEntityCollision(minecart, entity);
}
}
public static boolean onMinecartInteract(EntityMinecart minecart, EntityPlayer player)
{
boolean canceled = true;
for (IMinecartHandler handler : minecartHandlers)
{
boolean tmp = handler.onMinecartInteract(minecart, player, canceled);
canceled = canceled && tmp;
}
return canceled;
}
static LinkedList<IMinecartHandler> minecartHandlers = new LinkedList<IMinecartHandler>();
// Plant Management
// ------------------------------------------------------------
@@ -268,10 +301,11 @@ public class ForgeHooks {
}
public static final int majorVersion=1;
public static final int minorVersion=2;
public static final int revisionVersion=3;
public static final int minorVersion=3;
public static final int revisionVersion=1;
static {
System.out.printf("MinecraftForge V%d.%d.%d Initialized\n", majorVersion, minorVersion, revisionVersion);
ModLoader.getLogger().info(String.format("MinecraftForge V%d.%d.%d Initialized\n", majorVersion, minorVersion, revisionVersion));
}
static boolean toolInit=false;
@@ -0,0 +1,50 @@
package net.minecraft.src.forge;
import net.minecraft.src.AxisAlignedBB;
import net.minecraft.src.Entity;
import net.minecraft.src.EntityMinecart;
/**
* This class defines a replacement for the default minecart collision code.
* Only one handler can be registered at a time. It it registered with EntityMinecart.registerCollisionHandler().
* If you use this, make it a configuration option.
* @author CovertJaguar
*/
public interface IMinecartCollisionHandler
{
/**
* This basically replaces the function of the same name in EnityMinecart.
* Code in IMinecartHooks.applyEntityCollisionHook is still run.
* @param cart The cart that called the collision.
* @param other The object it collided with.
*/
public void onEntityCollision(EntityMinecart cart, Entity other);
/**
* This function replaced the function of the same name in EntityMinecart.
* It is used to define whether minecarts collide with specific entities,
* for example items.
* @param cart The cart for which the collision box was requested.
* @param other The entity requesting the collision box.
* @return The collision box or null.
*/
public AxisAlignedBB getCollisionBox(EntityMinecart cart, Entity other);
/**
* This function is used to define the box used for detecting minecart collisions.
* It is generally bigger that the normal collision box.
* @param cart The cart for which the collision box was requested.
* @return The collision box, cannot be null.
*/
public AxisAlignedBB getMinecartCollisionBox(EntityMinecart cart);
/**
* This function replaces the function of the same name in EntityMinecart.
* It defines whether minecarts are solid to the player.
* @param cart The cart for which the bounding box was requested.
* @return The bounding box or null.
*/
public AxisAlignedBB getBoundingBox(EntityMinecart cart);
}
@@ -0,0 +1,38 @@
package net.minecraft.src.forge;
import net.minecraft.src.Entity;
import net.minecraft.src.EntityMinecart;
import net.minecraft.src.EntityPlayer;
public interface IMinecartHandler {
/**
* This functions is called at the end of every minecart's doUpdate loop.
* If you override EntityMinecart.doUpdate(), is recommended that you retain the code that calls this function.
* @param cart The cart that called the function.
* @param i X coordinate of the rail
* @param j Y coordinate of the rail
* @param k Z coordinate of the rail
*/
public void onMinecartUpdate(EntityMinecart minecart, int x, int y, int z);
/**
* This function allows several mods to add code into the collision routine at the same time regardless of the collision handler registered.
* If you override EntityMinecart.applyEntityCollision(), is recommended that you retain the code that calls this function.
* @param cart The cart that called the function.
* @param other
*/
public void onMinecartEntityCollision(EntityMinecart minecart, Entity entity);
/**
* This function is called whenever a player attempts to interact with a minecart.
* The primary reason for this hook is to fix a few bugs and put restrictions on how a minecart can be used under certain circumstances.
* If you override EntityMinecart.interact(), is recommended that you retain the code that calls this function.
* @param cart The cart that called the function.
* @param player The player that tried to interact with the minecart.
* @param canceled Wither or not a pervious hook has canceled the interaction of a player.
* @return Whether the player can interact with the minecart.
*/
public boolean onMinecartInteract(EntityMinecart minecart, EntityPlayer player, boolean canceled);
}
@@ -0,0 +1,49 @@
package net.minecraft.src.forge;
import net.minecraft.src.EntityMinecart;
/**
* Used to create hashmap values for Minecart/type pairs
* Written by CovertJaguar
*/
public class MinecartKey {
public final Class<? extends EntityMinecart> minecart;
public final int type;
public MinecartKey(Class<? extends EntityMinecart> c, int t)
{
minecart = c;
type = t;
}
@Override
public boolean equals(Object obj)
{
if(obj == null)
{
return false;
}
if(getClass() != obj.getClass())
{
return false;
}
final MinecartKey other = (MinecartKey)obj;
if(this.minecart != other.minecart && (this.minecart == null || !this.minecart.equals(other.minecart)))
{
return false;
}
return (this.type == other.type);
}
@Override
public int hashCode()
{
int hash = 7;
hash = 59 * hash + (this.minecart != null ? this.minecart.hashCode() : 0);
hash = 59 * hash + this.type;
return hash;
}
}
@@ -6,6 +6,7 @@
package net.minecraft.src.forge;
import net.minecraft.src.Block;
import net.minecraft.src.EntityMinecart;
import net.minecraft.src.Item;
import net.minecraft.src.ItemStack;
import net.minecraft.src.World;
@@ -56,6 +57,15 @@ public class MinecraftForge {
public static void registerCraftingHandler(ICraftingHandler handler) {
ForgeHooks.craftingHandlers.add(handler);
}
/**
* Registers a new minecart handler
* @param handler The Handler to be registered
*/
public static void registerMinecartHandler(IMinecartHandler handler)
{
ForgeHooks.minecartHandlers.add(handler);
}
/**
* This is not supposed to be called outside of Minecraft internals.
@@ -559,7 +569,6 @@ public class MinecraftForge {
return rarity;
}
/**
* Gets a random item stack to place in a dungeon chest during world generation
@@ -586,6 +595,165 @@ public class MinecraftForge {
return null;
}
//Minecart Dictionary --------------------------------------
private static Map<MinecartKey, ItemStack> itemForMinecart = new HashMap<MinecartKey, ItemStack>();
private static Map<ItemStack, MinecartKey> minecartForItem = new HashMap<ItemStack, MinecartKey>();
/**
* Registers a custom minecart and its corresponding item.
* This should be the item used to place the minecart by the user,
* not the item dropped by the cart.
* @param cart The minecart.
* @param item The item used to place the cart.
*/
public static void registerMinecart(Class<? extends EntityMinecart> cart, ItemStack item)
{
registerMinecart(cart, 0, item);
}
/**
* Registers a minecart and its corresponding item.
* This should be the item used to place the minecart by the user,
* not the item dropped by the cart.
* @param minecart The minecart.
* @param type The minecart type, used to differentiate carts that have the same class.
* @param item The item used to place the cart.
*/
public static void registerMinecart(Class<? extends EntityMinecart> minecart, int type, ItemStack item)
{
MinecartKey k = new MinecartKey(minecart, type);
itemForMinecart.put(k, item);
minecartForItem.put(item, k);
}
/**
* Removes a previously registered Minecart. Useful for replacing the vanilla minecarts.
* @param minecart
* @param type
*/
public static void removeMinecart(Class<? extends EntityMinecart> minecart, int type)
{
MinecartKey k = new MinecartKey(minecart, type);
ItemStack item = itemForMinecart.remove(k);
if(item != null)
{
minecartForItem.remove(item);
}
}
/**
* This function returns an ItemStack that represents this cart.
* The player should be able to use this item to place the minecart.
* This is the item that was registered with the cart via the registerMinecart function,
* but is not necessary the item the cart drops when destroyed.
* @param minecart The cart class
* @return An ItemStack that can be used to place the cart.
*/
public static ItemStack getItemForCart(Class<? extends EntityMinecart> minecart)
{
return getItemForCart(minecart, 0);
}
/**
* This function returns an ItemStack that represents this cart.
* The player should be able to use this item to place the minecart.
* This is the item that was registered with the cart via the registerMinecart function,
* but is not necessary the item the cart drops when destroyed.
* @param minecart The cart class
* @param type The minecartType value
* @return An ItemStack that can be used to place the cart.
*/
public static ItemStack getItemForCart(Class<? extends EntityMinecart> minecart, int type)
{
ItemStack item = itemForMinecart.get(new MinecartKey(minecart, type));
if (item == null)
{
return null;
}
return item.copy();
}
/**
* This function returns an ItemStack that represents this cart.
* The player should be able to use this item to place the minecart.
* This is the item that was registered with the cart via the registerMinecart function,
* but is not necessary the item the cart drops when destroyed.
* @param cart The cart entity
* @return An ItemStack that can be used to place the cart.
*/
public static ItemStack getItemForCart(EntityMinecart cart)
{
if(cart.getClass() == EntityMinecart.class)
{
return getItemForCart(cart.getClass(), cart.getMinecartType());
}
return getItemForCart(cart.getClass(), 0);
}
/**
* The function will return the cart class for a given item.
* If the item was not registered via the registerMinecart function it will return null.
* @param item The item to test.
* @return Cart if mapping exists, null if not.
*/
public static Class<? extends EntityMinecart> getCartClassForItem(ItemStack item)
{
MinecartKey k = null;
for (ItemStack key : minecartForItem.keySet())
{
if (key.isItemEqual(item))
{
k = minecartForItem.get(k);
break;
}
}
if(k != null)
{
return k.minecart;
}
return null;
}
/**
* The function will return the cart type for a given item.
* Will return -1 if the mapping doesn't exist.
* If the item was not registered via the registerMinecart function it will return null.
* @param item The item to test.
* @return the cart minecartType value.
*/
public static int getCartTypeForItem(ItemStack item)
{
MinecartKey k = null;
for (ItemStack key : minecartForItem.keySet())
{
if (key.isItemEqual(item))
{
k = minecartForItem.get(k);
break;
}
}
if(k != null)
{
return k.type;
}
return -1;
}
/**
* Will return a set of all registered minecart items.
* @return a copy of the set of all minecart items
*/
public static Set<ItemStack> getAllCartItems()
{
Set<ItemStack> ret = new HashSet<ItemStack>();
for(ItemStack item : minecartForItem.keySet())
{
ret.add(item.copy());
}
return ret;
}
static
{
@@ -605,6 +773,10 @@ public class MinecraftForge {
addDungeonLoot(new ItemStack(Item.record13), 0.05f );
addDungeonLoot(new ItemStack(Item.recordCat), 0.05f );
addDungeonLoot(new ItemStack(Item.dyePowder, 1, 3), 1.00f );
registerMinecart(EntityMinecart.class, 0, new ItemStack(Item.minecartEmpty));
registerMinecart(EntityMinecart.class, 1, new ItemStack(Item.minecartCrate));
registerMinecart(EntityMinecart.class, 2, new ItemStack(Item.minecartPowered));
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -3,6 +3,8 @@ echo off
echo MinecraftForge Windows Setup Program
echo:
set PATH=%PATH%;%SystemDir%\system32;%SystemRoot%\System32
pushd .. >nul
xcopy /Y /E /I forge\conf\* conf
@@ -49,6 +51,7 @@ popd >nul
xcopy /Y /E forge\src\* src
cmd /C updatemcp.bat
cmd /C updatenames.bat
rem Removed until MCP's Update Names is fixed
rem cmd /C updatemcp.bat
rem cmd /C updatenames.bat
cmd /C updatemd5.bat
@@ -53,7 +53,7 @@ popd > /dev/null
cp -r forge/src/* src
./updatemcp.sh
./updatenames.sh
# Removed until MCP's UpdateNames Is fixed
#./updatemcp.sh
#./updatenames.sh
./updatemd5.sh
View File
File renamed without changes.
View File
File renamed without changes.
File renamed without changes.
+6 -22
View File
@@ -1,33 +1,18 @@
diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/server/MinecraftServer.java ../src_work/minecraft_server/net/minecraft/server/MinecraftServer.java
--- ../src_base/minecraft_server/net/minecraft/server/MinecraftServer.java 2011-07-17 00:28:07.755771900 +0200
+++ ../src_work/minecraft_server/net/minecraft/server/MinecraftServer.java 2011-07-17 00:28:09.485870900 +0200
@@ -333,41 +333,22 @@
}
finally
@@ -397,38 +397,7 @@
{
- System.exit(0);
+ try
+ {
+ stopServer();
+ serverStopped = true;
+ }
+ catch(Throwable throwable2)
+ {
+ throwable2.printStackTrace();
+ }
+ finally
+ {
+ System.exit(0);
+ }
System.exit(0);
}
- break MISSING_BLOCK_LABEL_350;
- }
}
- try
- {
- stopServer();
- serverStopped = true;
- }
- catch(Throwable throwable)
- catch (Throwable throwable)
- {
- throwable.printStackTrace();
- }
@@ -43,7 +28,7 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/server
- stopServer();
- serverStopped = true;
- }
- catch(Throwable throwable3)
- catch (Throwable throwable3)
- {
- throwable3.printStackTrace();
- }
@@ -53,10 +38,9 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/server
- }
- throw exception2;
}
+}
private void doTick()
{
diff U3 ../src_base/minecraft_server/net/minecraft/src/MLProp.java ../src_work/minecraft_server/net/minecraft/src/MLProp.java
--- ../src_base/minecraft_server/net/minecraft/src/MLProp.java Wed Nov 30 22:27:22 2011
+++ ../src_work/minecraft_server/net/minecraft/src/MLProp.java Sun Dec 04 14:31:04 2011
View File
File renamed without changes.
@@ -1,137 +1,89 @@
--- ../src_base/minecraft/net/minecraft/src/Block.java 0000-00-00 00:00:00.000000000 -0000
+++ ../src_work/minecraft/net/minecraft/src/Block.java 0000-00-00 00:00:00.000000000 -0000
@@ -4,6 +4,7 @@
@@ -1,5 +1,6 @@
package net.minecraft.src;
+import net.minecraft.src.forge.ForgeHooks;
import java.util.ArrayList;
import java.util.Random;
@@ -312,12 +313,14 @@
@@ -277,12 +278,12 @@
public float getBlockBrightness(IBlockAccess iblockaccess, int i, int j, int k)
{
- return iblockaccess.getBrightness(i, j, k, lightValue[blockID]);
+ return iblockaccess.getBrightness(i, j, k,
+ getLightValue(iblockaccess,i,j,k));
+ return iblockaccess.getBrightness(i, j, k, getLightValue(iblockaccess,i,j,k));
}
public int getMixedBrightnessForBlock(IBlockAccess iblockaccess, int i, int j, int k)
{
- return iblockaccess.getLightBrightnessForSkyBlocks(i, j, k, lightValue[blockID]);
+ return iblockaccess.getLightBrightnessForSkyBlocks(i, j, k,
+ getLightValue(iblockaccess,i,j,k));
+ return iblockaccess.getLightBrightnessForSkyBlocks(i, j, k, getLightValue(iblockaccess,i,j,k));
}
public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
@@ -438,25 +441,70 @@
{
return 1;
}
-
+
+ /* FORGE: Metadata-sensitive version.
+ */
+ public int quantityDropped(int meta, int fortune, Random random)
+ {
+ return func_40198_a(fortune, random);
+ }
+
+ /* FORGE: Metadata-sensitive version.
+ *
+ * This is deprecated in MC 1.0+ versions because of the new Enchantment
+ * system requiring a new argument. Will be removed unless a valid reason
+ * for it to remain is brought to light.
+ *
+ * Implementing this in your mod will not do anything!
+ */
+ @Deprecated
+ public int quantityDropped(int meta, Random random)
+ {
+ return quantityDropped(meta, 0, random);
+ }
+
public int idDropped(int i, Random random, int j)
{
@@ -410,20 +411,15 @@
return blockID;
}
+ /* FORGE: This function isnt called by Minecraft anymore. Use
+ * blockStrength(EntityPlayer,int) instead.
+ /**
+ * Deprecated in favor of a metadata sensitive version
+ * @param entityplayer Entity attacking the block
+ * @return
+ */
+ @Deprecated
public float blockStrength(EntityPlayer entityplayer)
{
- if(blockHardness < 0.0F)
- if (blockHardness < 0.0F)
- {
- return 0.0F;
- }
- if(!entityplayer.canHarvestBlock(this))
- if (!entityplayer.canHarvestBlock(this))
- {
- return 1.0F / blockHardness / 100F;
- } else
- }
- else
- {
- return entityplayer.getCurrentPlayerStrVsBlock(this) / blockHardness / 30F;
- }
+ return blockStrength(entityplayer,0);
+ }
+
+ /* FORGE: This function returns the complete list of drops for a block.
+ */
+ public ArrayList<ItemStack> getBlockDropped(World world,
+ int i, int j, int k, int md, int fortune) {
+
+ ArrayList<ItemStack> tr = new ArrayList<ItemStack>();
+
+ int q = quantityDropped(md, fortune, world.rand);
+ for (int n = 0; n < q; n++) {
+ int id = idDropped(md, world.rand, 0);
+ if(id > 0) {
+ tr.add(new ItemStack(id, 1, damageDropped(md)));
+ }
+ }
+ return tr;
+ }
+
+ /* FORGE: This function returns the complete list of drops for a block.
+ *
+ * This is deprecated in MC 1.0+ versions because of the new Enchantment
+ * system requiring a new argument. Will be removed unless a valid reason
+ * for it to remain is brought to light.
+ *
+ * Implementing this in your mod will not do anything!
+ */
+ @Deprecated
+ public ArrayList<ItemStack> getBlockDropped(World world,
+ int i, int j, int k, int md) {
+ return getBlockDropped (world, i, j, k, md, 0);
+ return blockStrength(entityplayer, 0);
}
public final void dropBlockAsItem(World world, int i, int j, int k, int l, int i1)
@@ -470,18 +518,13 @@
@@ -437,18 +433,15 @@
{
return;
}
- int j1 = func_40198_a(i1, world.rand);
- for(int k1 = 0; k1 < j1; k1++)
- {
+ ArrayList<ItemStack> ar = getBlockDropped(world, i, j, k, l, i1);
+ for (ItemStack ist : ar) {
if(world.rand.nextFloat() > f)
- int j1 = quantityDroppedWithBonus(i1, world.rand);
- for (int k1 = 0; k1 < j1; k1++)
+
+ ArrayList<ItemStack> items = getBlockDropped(world, i, j, k, l, i1);
+ for(ItemStack item : items)
{
if (world.rand.nextFloat() > f)
{
continue;
}
- int l1 = idDropped(l, world.rand, i1);
- if(l1 > 0)
- if (l1 > 0)
- {
- dropBlockAsItem_do(world, i, j, k, new ItemStack(l1, 1, damageDropped(l)));
- }
+ dropBlockAsItem_do(world, i, j, k, ist);
+ dropBlockAsItem_do(world, i, j, k, item);
}
}
@@ -805,6 +848,200 @@
return iblockaccess.isBlockNormalCube(i, j, k) ? 0.2F : 1.0F;
@@ -696,7 +689,7 @@
{
entityplayer.addStat(StatList.mineBlockStatArray[blockID], 1);
entityplayer.addExhaustion(0.025F);
- if (renderAsNormalBlock() && !isBlockContainer[blockID] && EnchantmentHelper.getSilkTouchModifier(entityplayer.inventory))
+ if (renderAsNormalBlock() && !hasTileEntity(l) && EnchantmentHelper.getSilkTouchModifier(entityplayer.inventory))
{
ItemStack itemstack = createStackedBlock(l);
if (itemstack != null)
@@ -780,6 +773,273 @@
{
}
+ /* FORGE: Allow a block to set illumination on a coordinate basis.
@@ -143,8 +95,8 @@
+ /* FORGE: Implement and return true if you wish this block to behave
+ * like a ladder when the player is inside.
+ */
+ public boolean isLadder() {
+ return false;
+ public boolean isLadder(World world, int i, int j, int k) {
+ return false;
+ }
+
+ /* FORGE: Return true if the block is a normal, solid cube. This
@@ -235,8 +187,8 @@
+ {
+ }
+
+ private static int blockFireSpreadSpeed[] = new int[256];
+ private static int blockFlammability[] = new int[256];
+ protected static int blockFireSpreadSpeed[] = new int[256];
+ protected static int blockFlammability[] = new int[256];
+
+ /**
+ * Chance that fire will spread and consume this block.
@@ -321,12 +273,85 @@
+ * @param encouragement How much the block encourages fire to spread
+ * @param flammability how easy a block is to catch fire
+ */
+ protected static void setBurnRate(int id, int encouragement, int flammability)
+ public static void setBurnProperties(int id, int encouragement, int flammability)
+ {
+ blockFireSpreadSpeed[id] = encouragement;
+ blockFlammability[id] = flammability;
+ }
+
+ /**
+ * Called throughout the code as a replacement for block instanceof BlockContainer
+ * Moving this to the Block base class allows for mods that wish to extend vinella
+ * blocks, and also want to have a tile entity on that block, may.
+ *
+ * Return true from this function to specify this block has a tile entity.
+ *
+ * @param metadata Metadata of the current block
+ * @return True if block has a tile entity, false otherwise
+ */
+ public boolean hasTileEntity(int metadata)
+ {
+ return isBlockContainer[blockID];
+ }
+
+ /**
+ * Called throughout the code as a replacement for BlockContainer.getBlockEntity
+ * Return the same thing you would from that function.
+ * This will fall back to BlockContainer.getBlockEntity if this block is a BlockContainer.
+ *
+ * @param metadata The Metadata of the current block
+ * @return A instance of a class extending TileEntity
+ */
+ public TileEntity getTileEntity(int metadata)
+ {
+ if (this instanceof BlockContainer)
+ {
+ return ((BlockContainer)this).getBlockEntity(metadata);
+ }
+ return null;
+ }
+
+ /**
+ * Metadata and fortune sensitive version, this replaces the old (int meta, Random rand)
+ * version in 1.1.
+ *
+ * @param meta Blocks Metadata
+ * @param fortune Current item fortune level
+ * @param random Random number generator
+ * @return The number of items to drop
+ */
+ public int quantityDropped(int meta, int fortune, Random random)
+ {
+ return quantityDroppedWithBonus(fortune, random);
+ }
+
+ /**
+ * This returns a complete list of items dropped from this block.
+ *
+ * @param world The current world
+ * @param X X Position
+ * @param Y Y Position
+ * @param Z Z Position
+ * @param metadata Current metadata
+ * @param fortune Breakers fortune level
+ * @return A ArrayList containing all items this block drops
+ */
+ public ArrayList<ItemStack> getBlockDropped(World world, int X, int Y, int Z, int metadata, int fortune)
+ {
+ ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
+
+ int count = quantityDropped(metadata, fortune, world.rand);
+ for(int i = 0; i < count; i++)
+ {
+ int id = idDropped(metadata, world.rand, 0);
+ if (id > 0)
+ {
+ ret.add(new ItemStack(id, 1, damageDropped(metadata)));
+ }
+ }
+ return ret;
+ }
+
+
static Class _mthclass$(String s)
{
@@ -0,0 +1,119 @@
--- ../src_base/minecraft/net/minecraft/src/BlockButton.java 0000-00-00 00:00:00.000000000 -0000
+++ ../src_work/minecraft/net/minecraft/src/BlockButton.java 0000-00-00 00:00:00.000000000 -0000
@@ -32,36 +32,36 @@
public boolean canPlaceBlockOnSide(World world, int i, int j, int k, int l)
{
- if (l == 2 && world.isBlockNormalCube(i, j, k + 1))
+ if (l == 2 && world.isBlockSolidOnSide(i, j, k + 1, 2))
{
return true;
}
- if (l == 3 && world.isBlockNormalCube(i, j, k - 1))
+ if (l == 3 && world.isBlockSolidOnSide(i, j, k - 1, 3))
{
return true;
}
- if (l == 4 && world.isBlockNormalCube(i + 1, j, k))
+ if (l == 4 && world.isBlockSolidOnSide(i + 1, j, k, 4))
{
return true;
}
- return l == 5 && world.isBlockNormalCube(i - 1, j, k);
+ return l == 5 && world.isBlockSolidOnSide(i - 1, j, k, 5);
}
public boolean canPlaceBlockAt(World world, int i, int j, int k)
{
- if (world.isBlockNormalCube(i - 1, j, k))
+ if (world.isBlockSolidOnSide(i - 1, j, k, 5))
{
return true;
}
- if (world.isBlockNormalCube(i + 1, j, k))
+ if (world.isBlockSolidOnSide(i + 1, j, k, 4))
{
return true;
}
- if (world.isBlockNormalCube(i, j, k - 1))
+ if (world.isBlockSolidOnSide(i, j, k - 1, 3))
{
return true;
}
- return world.isBlockNormalCube(i, j, k + 1);
+ return world.isBlockSolidOnSide(i, j, k + 1, 2);
}
public void onBlockPlaced(World world, int i, int j, int k, int l)
@@ -69,19 +69,19 @@
int i1 = world.getBlockMetadata(i, j, k);
int j1 = i1 & 8;
i1 &= 7;
- if (l == 2 && world.isBlockNormalCube(i, j, k + 1))
+ if (l == 2 && world.isBlockSolidOnSide(i, j, k + 1, 2))
{
i1 = 4;
}
- else if (l == 3 && world.isBlockNormalCube(i, j, k - 1))
+ else if (l == 3 && world.isBlockSolidOnSide(i, j, k - 1, 3))
{
i1 = 3;
}
- else if (l == 4 && world.isBlockNormalCube(i + 1, j, k))
+ else if (l == 4 && world.isBlockSolidOnSide(i + 1, j, k, 4))
{
i1 = 2;
}
- else if (l == 5 && world.isBlockNormalCube(i - 1, j, k))
+ else if (l == 5 && world.isBlockSolidOnSide(i - 1, j, k, 5))
{
i1 = 1;
}
@@ -94,19 +94,19 @@
private int getOrientation(World world, int i, int j, int k)
{
- if (world.isBlockNormalCube(i - 1, j, k))
+ if (world.isBlockSolidOnSide(i - 1, j, k, 5))
{
return 1;
}
- if (world.isBlockNormalCube(i + 1, j, k))
+ if (world.isBlockSolidOnSide(i + 1, j, k, 4))
{
return 2;
}
- if (world.isBlockNormalCube(i, j, k - 1))
+ if (world.isBlockSolidOnSide(i, j, k - 1, 3))
{
return 3;
}
- return !world.isBlockNormalCube(i, j, k + 1) ? 1 : 4;
+ return !world.isBlockSolidOnSide(i, j, k + 1, 2) ? 1 : 4;
}
public void onNeighborBlockChange(World world, int i, int j, int k, int l)
@@ -115,19 +115,19 @@
{
int i1 = world.getBlockMetadata(i, j, k) & 7;
boolean flag = false;
- if (!world.isBlockNormalCube(i - 1, j, k) && i1 == 1)
+ if (!world.isBlockSolidOnSide(i - 1, j, k, 5) && i1 == 1)
{
flag = true;
}
- if (!world.isBlockNormalCube(i + 1, j, k) && i1 == 2)
+ if (!world.isBlockSolidOnSide(i + 1, j, k, 4) && i1 == 2)
{
flag = true;
}
- if (!world.isBlockNormalCube(i, j, k - 1) && i1 == 3)
+ if (!world.isBlockSolidOnSide(i, j, k - 1, 3) && i1 == 3)
{
flag = true;
}
- if (!world.isBlockNormalCube(i, j, k + 1) && i1 == 4)
+ if (!world.isBlockSolidOnSide(i, j, k + 1, 2) && i1 == 4)
{
flag = true;
}
@@ -0,0 +1,31 @@
--- ../src_base/minecraft/net/minecraft/src/BlockChest.java 0000-00-00 00:00:00.000000000 -0000
+++ ../src_work/minecraft/net/minecraft/src/BlockChest.java 0000-00-00 00:00:00.000000000 -0000
@@ -424,23 +424,23 @@
{
return true;
}
- if (world.isBlockNormalCube(i, j + 1, k))
+ if (world.isBlockSolidOnSide(i, j + 1, k, 0))
{
return true;
}
- if (world.getBlockId(i - 1, j, k) == blockID && world.isBlockNormalCube(i - 1, j + 1, k))
+ if (world.getBlockId(i - 1, j, k) == blockID && world.isBlockSolidOnSide(i - 1, j + 1, k, 0))
{
return true;
}
- if (world.getBlockId(i + 1, j, k) == blockID && world.isBlockNormalCube(i + 1, j + 1, k))
+ if (world.getBlockId(i + 1, j, k) == blockID && world.isBlockSolidOnSide(i + 1, j + 1, k, 0))
{
return true;
}
- if (world.getBlockId(i, j, k - 1) == blockID && world.isBlockNormalCube(i, j + 1, k - 1))
+ if (world.getBlockId(i, j, k - 1) == blockID && world.isBlockSolidOnSide(i, j + 1, k - 1, 0))
{
return true;
}
- if (world.getBlockId(i, j, k + 1) == blockID && world.isBlockNormalCube(i, j + 1, k + 1))
+ if (world.getBlockId(i, j, k + 1) == blockID && world.isBlockSolidOnSide(i, j + 1, k + 1, 0))
{
return true;
}
@@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/src/BlockContainer.java 0000-00-00 00:00:00.000000000 -0000
+++ ../src_work/minecraft/net/minecraft/src/BlockContainer.java 0000-00-00 00:00:00.000000000 -0000
@@ -26,7 +26,7 @@
@@ -17,7 +17,7 @@
public void onBlockAdded(World world, int i, int j, int k)
{
super.onBlockAdded(world, i, j, k);
@@ -9,13 +9,19 @@
}
public void onBlockRemoval(World world, int i, int j, int k)
@@ -37,6 +37,12 @@
@@ -28,6 +28,18 @@
public abstract TileEntity getBlockEntity();
+ /* FORGE: Metadata-sensitive version, to fix 1.8.1 regression.
+ */
+ public TileEntity getBlockEntity(int md) {
+ /**
+ * Metadata-sensitive version, to fix 1.8.1 regression.
+ * @param metadata The current Metadata
+ * @return And instance of the TileEntity class for this block
+ */
+ public TileEntity getBlockEntity(int md)
+ {
+ return getBlockEntity();
+ }
+
@@ -1,36 +1,36 @@
--- ../src_base/minecraft/net/minecraft/src/BlockCrops.java 0000-00-00 00:00:00.000000000 -0000
+++ ../src_work/minecraft/net/minecraft/src/BlockCrops.java 0000-00-00 00:00:00.000000000 -0000
@@ -5,6 +5,7 @@
@@ -1,6 +1,7 @@
package net.minecraft.src;
import java.util.Random;
+import java.util.ArrayList;
// Referenced classes of package net.minecraft.src:
// BlockFlower, Block, World, EntityItem,
@@ -108,28 +109,22 @@
public class BlockCrops extends BlockFlower
{
@@ -98,27 +99,23 @@
return 6;
}
- public void dropBlockAsItemWithChance(World world, int i, int j, int k, int l, float f, int i1)
- {
- super.dropBlockAsItemWithChance(world, i, j, k, l, f, 0);
- if(world.multiplayerWorld)
+ @Override
+ public ArrayList<ItemStack> getBlockDropped(World world, int i, int j, int k, int md, int fortune) {
+ ArrayList<ItemStack> tr = new ArrayList<ItemStack>();
+ if (md == 7)
+ public ArrayList<ItemStack> getBlockDropped(World world, int i, int j, int k, int meta, int fortune)
{
- super.dropBlockAsItemWithChance(world, i, j, k, l, f, 0);
- if (world.isRemote)
+ ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
+ if (meta == 7)
{
- return;
+ tr.add(new ItemStack(Item.wheat));
+ ret.add(new ItemStack(Item.wheat));
}
- int j1 = 3 + i1;
- for(int k1 = 0; k1 < j1; k1++)
+
+ for(int n = 0; n < 3+fortune; n++)
- for (int k1 = 0; k1 < j1; k1++)
+
+ for (int n = 0; n < 3 + fortune; n++)
{
- if(world.rand.nextInt(15) <= l)
+ if (world.rand.nextInt(15) <= md)
- if (world.rand.nextInt(15) <= l)
+ if (world.rand.nextInt(15) <= meta)
{
- float f1 = 0.7F;
- float f2 = world.rand.nextFloat() * f1 + (1.0F - f1) * 0.5F;
@@ -38,12 +38,11 @@
- float f4 = world.rand.nextFloat() * f1 + (1.0F - f1) * 0.5F;
- EntityItem entityitem = new EntityItem(world, (float)i + f2, (float)j + f3, (float)k + f4, new ItemStack(Item.seeds));
- entityitem.delayBeforeCanPickup = 10;
- world.entityJoinedWorld(entityitem);
+ tr.add(new ItemStack(Item.seeds));
- world.spawnEntityInWorld(entityitem);
+ ret.add(new ItemStack(Item.seeds));
}
}
-
+ return tr;
+ return ret;
}
public int idDropped(int i, Random random, int j)
@@ -1,29 +1,29 @@
--- ../src_base/minecraft/net/minecraft/src/BlockDoor.java 0000-00-00 00:00:00.000000000 -0000
+++ ../src_work/minecraft/net/minecraft/src/BlockDoor.java 0000-00-00 00:00:00.000000000 -0000
@@ -111,7 +111,7 @@
@@ -101,7 +101,7 @@
{
if(blockMaterial == Material.iron)
if (blockMaterial == Material.iron)
{
- return true;
+ return false;
}
int l = world.getBlockMetadata(i, j, k);
if((l & 8) != 0)
@@ -178,7 +178,7 @@
if ((l & 8) != 0)
@@ -169,7 +169,7 @@
world.setBlockWithNotify(i, j, k, 0);
flag = true;
}
- if(!world.isBlockNormalCube(i, j - 1, k))
+ if(!world.isBlockSolidOnSide(i, j - 1, k,1))
- if (!world.isBlockNormalCube(i, j - 1, k))
+ if (!world.isBlockSolidOnSide(i, j - 1, k, 1))
{
world.setBlockWithNotify(i, j, k, 0);
flag = true;
@@ -241,7 +241,7 @@
return false;
} else
@@ -238,7 +238,7 @@
}
else
{
- return world.isBlockNormalCube(i, j - 1, k) && super.canPlaceBlockAt(world, i, j, k) && super.canPlaceBlockAt(world, i, j + 1, k);
+ return world.isBlockSolidOnSide(i, j - 1, k,1) && super.canPlaceBlockAt(world, i, j, k) && super.canPlaceBlockAt(world, i, j + 1, k);
+ return world.isBlockSolidOnSide(i, j - 1, k, 1) && super.canPlaceBlockAt(world, i, j, k) && super.canPlaceBlockAt(world, i, j + 1, k);
}
}
@@ -1,61 +1,54 @@
--- ../src_base/minecraft/net/minecraft/src/BlockFire.java 0000-00-00 00:00:00.000000000 -0000
+++ ../src_work/minecraft/net/minecraft/src/BlockFire.java 0000-00-00 00:00:00.000000000 -0000
@@ -14,14 +14,9 @@
public class BlockFire extends Block
{
- private int chanceToEncourageFire[];
- private int abilityToCatchFire[];
-
@@ -10,8 +10,8 @@
protected BlockFire(int i, int j)
{
super(i, j, Material.fire);
- chanceToEncourageFire = new int[256];
- abilityToCatchFire = new int[256];
+ chanceToEncourageFire = Block.blockFireSpreadSpeed;
+ abilityToCatchFire = Block.blockFlammability;
setTickOnLoad(true);
}
@@ -39,12 +34,6 @@
@@ -28,11 +28,10 @@
setBurnRate(Block.cloth.blockID, 30, 60);
setBurnRate(Block.vine.blockID, 15, 100);
}
- private void setBurnRate(int i, int j, int k)
- {
-
+
private void setBurnRate(int i, int j, int k)
{
- chanceToEncourageFire[i] = j;
- abilityToCatchFire[i] = k;
- }
-
+ Block.setBurnProperties(i, j, k);
}
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int i, int j, int k)
{
return null;
@@ -77,11 +66,9 @@
@@ -67,7 +66,9 @@
public void updateTick(World world, int i, int j, int k, Random random)
{
- boolean flag = world.getBlockId(i, j - 1, k) == Block.netherrack.blockID;
- if((world.worldProvider instanceof WorldProviderEnd) && world.getBlockId(i, j - 1, k) == Block.bedrock.blockID)
- {
- flag = true;
- }
+ Block base = Block.blocksList[world.getBlockId(i, j - 1, k)];
+ Block base = Block.blocksList[world.getBlockId(i, j - 1, k)];
+ boolean flag = (base != null && base.isFireSource(world, i, j - 1, k, world.getBlockMetadata(i, j - 1, k), 0));
+
if(!canPlaceBlockAt(world, i, j, k))
+
if ((world.worldProvider instanceof WorldProviderEnd) && world.getBlockId(i, j - 1, k) == Block.bedrock.blockID)
{
world.setBlockWithNotify(i, j, k, 0);
@@ -99,23 +86,23 @@
flag = true;
@@ -89,23 +90,23 @@
world.scheduleBlockUpdate(i, j, k, blockID, tickRate());
if(!flag && !func_263_h(world, i, j, k))
if (!flag && !canNeighborBurn(world, i, j, k))
{
- if(!world.isBlockNormalCube(i, j - 1, k) || l > 3)
+ if(!world.isBlockSolidOnSide(i, j - 1, k, 0) || l > 3)
- if (!world.isBlockNormalCube(i, j - 1, k) || l > 3)
+ if (!world.isBlockSolidOnSide(i, j - 1, k, 1) || l > 3)
{
world.setBlockWithNotify(i, j, k, 0);
}
return;
}
- if(!flag && !canBlockCatchFire(world, i, j - 1, k) && l == 15 && random.nextInt(4) == 0)
+ if(!flag && !canBlockCatchFire(world, i, j - 1, k, 0) && l == 15 && random.nextInt(4) == 0)
- if (!flag && !canBlockCatchFire(world, i, j - 1, k) && l == 15 && random.nextInt(4) == 0)
+ if (!flag && !canBlockCatchFire(world, i, j - 1, k, 1) && l == 15 && random.nextInt(4) == 0)
{
world.setBlockWithNotify(i, j, k, 0);
return;
@@ -68,56 +61,65 @@
- tryToCatchBlockOnFire(world, i, j, k + 1, 300, random, l);
+ tryToCatchBlockOnFire(world, i + 1, j, k, 300, random, l, 4);
+ tryToCatchBlockOnFire(world, i - 1, j, k, 300, random, l, 5);
+ tryToCatchBlockOnFire(world, i, j - 1, k, 250, random, l, 0);
+ tryToCatchBlockOnFire(world, i, j + 1, k, 250, random, l, 1);
+ tryToCatchBlockOnFire(world, i, j - 1, k, 250, random, l, 1);
+ tryToCatchBlockOnFire(world, i, j + 1, k, 250, random, l, 0);
+ tryToCatchBlockOnFire(world, i, j, k - 1, 300, random, l, 3);
+ tryToCatchBlockOnFire(world, i, j, k + 1, 300, random, l, 2);
for(int i1 = i - 1; i1 <= i + 1; i1++)
for (int i1 = i - 1; i1 <= i + 1; i1++)
{
for(int j1 = k - 1; j1 <= k + 1; j1++)
@@ -155,9 +142,14 @@
for (int j1 = k - 1; j1 <= k + 1; j1++)
@@ -142,9 +143,24 @@
}
}
- private void tryToCatchBlockOnFire(World world, int i, int j, int k, int l, Random random, int i1)
+ private void tryToCatchBlockOnFire(World world, int i, int j, int k, int l, Random random, int i1, int face)
+ /**
+ * Deprecated for a side-sensitive version
+ */
+ @Deprecated
private void tryToCatchBlockOnFire(World world, int i, int j, int k, int l, Random random, int i1)
{
- int j1 = abilityToCatchFire[world.getBlockId(i, j, k)];
+ Block block = Block.blocksList[world.getBlockId(i, j, k)];
+ int j1 = 0;
+ if (block != null)
+ {
+ j1 = block.getFlammability(world, i, j, k, world.getBlockMetadata(i, j, k), face);
+ }
if(random.nextInt(l) < j1)
+ tryToCatchBlockOnFire(world, i, j, k, l, random, i1, 0);
+ }
+
+ private void tryToCatchBlockOnFire(World world, int i, int j, int k, int l, Random random, int i1, int face)
+ {
+ int j1 = 0;
+ Block block = Block.blocksList[world.getBlockId(i, j, k)];
+ if (block != null)
+ {
+ j1 = block.getFlammability(world, i, j, k, world.getBlockMetadata(i, j, k), face);
+ }
+
if (random.nextInt(l) < j1)
{
boolean flag = world.getBlockId(i, j, k) == Block.tnt.blockID;
@@ -182,27 +174,27 @@
@@ -170,27 +186,27 @@
private boolean func_263_h(World world, int i, int j, int k)
private boolean canNeighborBurn(World world, int i, int j, int k)
{
- if(canBlockCatchFire(world, i + 1, j, k))
+ if(canBlockCatchFire(world, i + 1, j, k, 4))
- if (canBlockCatchFire(world, i + 1, j, k))
+ if (canBlockCatchFire(world, i + 1, j, k, 4))
{
return true;
}
- if(canBlockCatchFire(world, i - 1, j, k))
+ if(canBlockCatchFire(world, i - 1, j, k, 5))
- if (canBlockCatchFire(world, i - 1, j, k))
+ if (canBlockCatchFire(world, i - 1, j, k, 5))
{
return true;
}
- if(canBlockCatchFire(world, i, j - 1, k))
+ if(canBlockCatchFire(world, i, j - 1, k, 0))
- if (canBlockCatchFire(world, i, j - 1, k))
+ if (canBlockCatchFire(world, i, j - 1, k, 1))
{
return true;
}
- if(canBlockCatchFire(world, i, j + 1, k))
+ if(canBlockCatchFire(world, i, j + 1, k, 1))
- if (canBlockCatchFire(world, i, j + 1, k))
+ if (canBlockCatchFire(world, i, j + 1, k, 0))
{
return true;
}
- if(canBlockCatchFire(world, i, j, k - 1))
+ if(canBlockCatchFire(world, i, j, k - 1, 3))
- if (canBlockCatchFire(world, i, j, k - 1))
+ if (canBlockCatchFire(world, i, j, k - 1, 3))
{
return true;
}
@@ -126,9 +128,9 @@
}
private int getChanceOfNeighborsEncouragingFire(World world, int i, int j, int k)
@@ -213,12 +205,12 @@
return 0;
} else
@@ -202,12 +218,12 @@
}
else
{
- l = getChanceToEncourageFire(world, i + 1, j, k, l);
- l = getChanceToEncourageFire(world, i - 1, j, k, l);
@@ -136,28 +138,133 @@
- l = getChanceToEncourageFire(world, i, j + 1, k, l);
- l = getChanceToEncourageFire(world, i, j, k - 1, l);
- l = getChanceToEncourageFire(world, i, j, k + 1, l);
+ l = getChanceToEncourageFire(world, i + 1, j, k, l, 5);
+ l = getChanceToEncourageFire(world, i - 1, j, k, l, 4);
+ l = getChanceToEncourageFire(world, i, j - 1, k, l, 0);
+ l = getChanceToEncourageFire(world, i, j + 1, k, l, 1);
+ l = getChanceToEncourageFire(world, i + 1, j, k, l, 4);
+ l = getChanceToEncourageFire(world, i - 1, j, k, l, 5);
+ l = getChanceToEncourageFire(world, i, j - 1, k, l, 1);
+ l = getChanceToEncourageFire(world, i, j + 1, k, l, 0);
+ l = getChanceToEncourageFire(world, i, j, k - 1, l, 3);
+ l = getChanceToEncourageFire(world, i, j, k + 1, l, 2);
return l;
}
}
@@ -228,14 +220,25 @@
@@ -217,32 +233,32 @@
return false;
}
- public boolean canBlockCatchFire(IBlockAccess iblockaccess, int i, int j, int k)
- {
+ /**
+ * Deprecated for a side-sensitive version
+ */
+ @Deprecated
public boolean canBlockCatchFire(IBlockAccess iblockaccess, int i, int j, int k)
{
- return chanceToEncourageFire[iblockaccess.getBlockId(i, j, k)] > 0;
- }
+ return canBlockCatchFire(iblockaccess, i, j, k, 0);
}
- public int getChanceToEncourageFire(World world, int i, int j, int k, int l)
+ public boolean canBlockCatchFire(IBlockAccess world, int i, int j, int k, int face)
+ /**
+ * Deprecated for a side-sensitive version
+ */
+ @Deprecated
public int getChanceToEncourageFire(World world, int i, int j, int k, int l)
{
- int i1 = chanceToEncourageFire[world.getBlockId(i, j, k)];
- if (i1 > l)
- {
- return i1;
- }
- else
- {
- return l;
- }
+ return getChanceToEncourageFire(world, i, j, k, l, 0);
}
public boolean canPlaceBlockAt(World world, int i, int j, int k)
{
- return world.isBlockNormalCube(i, j - 1, k) || canNeighborBurn(world, i, j, k);
+ return world.isBlockSolidOnSide(i, j - 1, k, 1) || canNeighborBurn(world, i, j, k);
}
public void onNeighborBlockChange(World world, int i, int j, int k, int l)
{
- if (!world.isBlockNormalCube(i, j - 1, k) && !canNeighborBurn(world, i, j, k))
+ if (!world.isBlockSolidOnSide(i, j - 1, k, 1) && !canNeighborBurn(world, i, j, k))
{
world.setBlockWithNotify(i, j, k, 0);
return;
@@ -259,7 +275,7 @@
{
return;
}
- if (!world.isBlockNormalCube(i, j - 1, k) && !canNeighborBurn(world, i, j, k))
+ if (!world.isBlockSolidOnSide(i, j - 1, k, 1) && !canNeighborBurn(world, i, j, k))
{
world.setBlockWithNotify(i, j, k, 0);
return;
@@ -277,7 +293,7 @@
{
world.playSoundEffect((float)i + 0.5F, (float)j + 0.5F, (float)k + 0.5F, "fire.fire", 1.0F + random.nextFloat(), random.nextFloat() * 0.7F + 0.3F);
}
- if (world.isBlockNormalCube(i, j - 1, k) || Block.fire.canBlockCatchFire(world, i, j - 1, k))
+ if (world.isBlockSolidOnSide(i, j - 1, k, 1) || Block.fire.canBlockCatchFire(world, i, j - 1, k, 1))
{
for (int l = 0; l < 3; l++)
{
@@ -289,7 +305,7 @@
}
else
{
- if (Block.fire.canBlockCatchFire(world, i - 1, j, k))
+ if (Block.fire.canBlockCatchFire(world, i - 1, j, k, 5))
{
for (int i1 = 0; i1 < 2; i1++)
{
@@ -299,7 +315,7 @@
world.spawnParticle("largesmoke", f1, f7, f13, 0.0D, 0.0D, 0.0D);
}
}
- if (Block.fire.canBlockCatchFire(world, i + 1, j, k))
+ if (Block.fire.canBlockCatchFire(world, i + 1, j, k, 4))
{
for (int j1 = 0; j1 < 2; j1++)
{
@@ -309,7 +325,7 @@
world.spawnParticle("largesmoke", f2, f8, f14, 0.0D, 0.0D, 0.0D);
}
}
- if (Block.fire.canBlockCatchFire(world, i, j, k - 1))
+ if (Block.fire.canBlockCatchFire(world, i, j, k - 1, 3))
{
for (int k1 = 0; k1 < 2; k1++)
{
@@ -319,7 +335,7 @@
world.spawnParticle("largesmoke", f3, f9, f15, 0.0D, 0.0D, 0.0D);
}
}
- if (Block.fire.canBlockCatchFire(world, i, j, k + 1))
+ if (Block.fire.canBlockCatchFire(world, i, j, k + 1, 2))
{
for (int l1 = 0; l1 < 2; l1++)
{
@@ -329,7 +345,7 @@
world.spawnParticle("largesmoke", f4, f10, f16, 0.0D, 0.0D, 0.0D);
}
}
- if (Block.fire.canBlockCatchFire(world, i, j + 1, k))
+ if (Block.fire.canBlockCatchFire(world, i, j + 1, k, 0))
{
for (int i2 = 0; i2 < 2; i2++)
{
@@ -341,4 +357,39 @@
}
}
}
+
+ /**
+ * Forge: Side sensitive version
+ */
+ public boolean canBlockCatchFire(IBlockAccess world, int i, int j, int k, int face)
+ {
+ Block block = Block.blocksList[world.getBlockId(i, j, k)];
+ if (block != null)
+ {
@@ -166,6 +273,9 @@
+ return false;
+ }
+
+ /**
+ * Forge: Side sensitive version
+ */
+ public int getChanceToEncourageFire(World world, int i, int j, int k, int l, int face)
+ {
+ int i1 = 0;
@@ -174,84 +284,14 @@
+ {
+ i1 = block.getFireSpreadSpeed(world, i, j, k, world.getBlockMetadata(i, j, k), face);
+ }
if(i1 > l)
{
return i1;
@@ -247,12 +250,12 @@
public boolean canPlaceBlockAt(World world, int i, int j, int k)
{
- return world.isBlockNormalCube(i, j - 1, k) || func_263_h(world, i, j, k);
+ return world.isBlockSolidOnSide(i, j - 1, k, 0) || func_263_h(world, i, j, k);
}
public void onNeighborBlockChange(World world, int i, int j, int k, int l)
{
- if(!world.isBlockNormalCube(i, j - 1, k) && !func_263_h(world, i, j, k))
+ if(!world.isBlockSolidOnSide(i, j - 1, k, 0) && !func_263_h(world, i, j, k))
{
world.setBlockWithNotify(i, j, k, 0);
return;
@@ -268,7 +271,7 @@
{
return;
}
- if(!world.isBlockNormalCube(i, j - 1, k) && !func_263_h(world, i, j, k))
+ if(!world.isBlockSolidOnSide(i, j - 1, k, 0) && !func_263_h(world, i, j, k))
{
world.setBlockWithNotify(i, j, k, 0);
return;
@@ -285,7 +288,7 @@
{
world.playSoundEffect((float)i + 0.5F, (float)j + 0.5F, (float)k + 0.5F, "fire.fire", 1.0F + random.nextFloat(), random.nextFloat() * 0.7F + 0.3F);
}
- if(world.isBlockNormalCube(i, j - 1, k) || Block.fire.canBlockCatchFire(world, i, j - 1, k))
+ if(world.isBlockSolidOnSide(i, j - 1, k, 0) || Block.fire.canBlockCatchFire(world, i, j - 1, k, 0))
{
for(int l = 0; l < 3; l++)
{
@@ -297,7 +300,7 @@
} else
{
- if(Block.fire.canBlockCatchFire(world, i - 1, j, k))
+ if(Block.fire.canBlockCatchFire(world, i - 1, j, k, 4))
{
for(int i1 = 0; i1 < 2; i1++)
{
@@ -308,7 +311,7 @@
}
}
- if(Block.fire.canBlockCatchFire(world, i + 1, j, k))
+ if(Block.fire.canBlockCatchFire(world, i + 1, j, k, 5))
{
for(int j1 = 0; j1 < 2; j1++)
{
@@ -319,7 +322,7 @@
}
}
- if(Block.fire.canBlockCatchFire(world, i, j, k - 1))
+ if(Block.fire.canBlockCatchFire(world, i, j, k - 1, 3))
{
for(int k1 = 0; k1 < 2; k1++)
{
@@ -330,7 +333,7 @@
}
}
- if(Block.fire.canBlockCatchFire(world, i, j, k + 1))
+ if(Block.fire.canBlockCatchFire(world, i, j, k + 1, 2))
{
for(int l1 = 0; l1 < 2; l1++)
{
@@ -341,7 +344,7 @@
}
}
- if(Block.fire.canBlockCatchFire(world, i, j + 1, k))
+ if(Block.fire.canBlockCatchFire(world, i, j + 1, k, 1))
{
for(int i2 = 0; i2 < 2; i2++)
{
+
+ if (i1 > l)
+ {
+ return i1;
+ }
+ else
+ {
+ return l;
+ }
+ }
}
@@ -0,0 +1,93 @@
--- ../src_base/minecraft/net/minecraft/src/BlockLadder.java 0000-00-00 00:00:00.000000000 -0000
+++ ../src_work/minecraft/net/minecraft/src/BlockLadder.java 0000-00-00 00:00:00.000000000 -0000
@@ -35,7 +35,7 @@
setBlockBounds(0.0F, 0.0F, 0.0F, f, 1.0F, 1.0F);
}
return super.getSelectedBoundingBoxFromPool(world, i, j, k);
- }
+ }
public boolean isOpaqueCube()
{
@@ -54,37 +54,37 @@
public boolean canPlaceBlockAt(World world, int i, int j, int k)
{
- if (world.isBlockNormalCube(i - 1, j, k))
+ if (world.isBlockSolidOnSide(i - 1, j, k, 5))
{
return true;
}
- if (world.isBlockNormalCube(i + 1, j, k))
+ if (world.isBlockSolidOnSide(i + 1, j, k, 4))
{
return true;
}
- if (world.isBlockNormalCube(i, j, k - 1))
+ if (world.isBlockSolidOnSide(i, j, k - 1, 3))
{
return true;
}
- return world.isBlockNormalCube(i, j, k + 1);
+ return world.isBlockSolidOnSide(i, j, k + 1, 2);
}
public void onBlockPlaced(World world, int i, int j, int k, int l)
{
int i1 = world.getBlockMetadata(i, j, k);
- if ((i1 == 0 || l == 2) && world.isBlockNormalCube(i, j, k + 1))
+ if ((i1 == 0 || l == 2) && world.isBlockSolidOnSide(i, j, k + 1, 2))
{
i1 = 2;
}
- if ((i1 == 0 || l == 3) && world.isBlockNormalCube(i, j, k - 1))
+ if ((i1 == 0 || l == 3) && world.isBlockSolidOnSide(i, j, k - 1, 3))
{
i1 = 3;
}
- if ((i1 == 0 || l == 4) && world.isBlockNormalCube(i + 1, j, k))
+ if ((i1 == 0 || l == 4) && world.isBlockSolidOnSide(i + 1, j, k, 4))
{
i1 = 4;
}
- if ((i1 == 0 || l == 5) && world.isBlockNormalCube(i - 1, j, k))
+ if ((i1 == 0 || l == 5) && world.isBlockSolidOnSide(i - 1, j, k, 5))
{
i1 = 5;
}
@@ -95,19 +95,19 @@
{
int i1 = world.getBlockMetadata(i, j, k);
boolean flag = false;
- if (i1 == 2 && world.isBlockNormalCube(i, j, k + 1))
+ if (i1 == 2 && world.isBlockSolidOnSide(i, j, k + 1, 2))
{
flag = true;
}
- if (i1 == 3 && world.isBlockNormalCube(i, j, k - 1))
+ if (i1 == 3 && world.isBlockSolidOnSide(i, j, k - 1, 3))
{
flag = true;
}
- if (i1 == 4 && world.isBlockNormalCube(i + 1, j, k))
+ if (i1 == 4 && world.isBlockSolidOnSide(i + 1, j, k, 4))
{
flag = true;
}
- if (i1 == 5 && world.isBlockNormalCube(i - 1, j, k))
+ if (i1 == 5 && world.isBlockSolidOnSide(i - 1, j, k, 5))
{
flag = true;
}
@@ -123,4 +123,11 @@
{
return 1;
}
+
+ /* FORGE: Implemented base method, see Block.isLadder */
+ @Override
+ public boolean isLadder(World world, int X, int Y, int Z)
+ {
+ return true;
+ }
}
@@ -0,0 +1,120 @@
--- ../src_base/minecraft/net/minecraft/src/BlockLever.java 0000-00-00 00:00:00.000000000 -0000
+++ ../src_work/minecraft/net/minecraft/src/BlockLever.java 0000-00-00 00:00:00.000000000 -0000
@@ -31,44 +31,44 @@
public boolean canPlaceBlockOnSide(World world, int i, int j, int k, int l)
{
- if (l == 1 && world.isBlockNormalCube(i, j - 1, k))
+ if (l == 1 && world.isBlockSolidOnSide(i, j - 1, k, 1))
{
return true;
}
- if (l == 2 && world.isBlockNormalCube(i, j, k + 1))
+ if (l == 2 && world.isBlockSolidOnSide(i, j, k + 1, 2))
{
return true;
}
- if (l == 3 && world.isBlockNormalCube(i, j, k - 1))
+ if (l == 3 && world.isBlockSolidOnSide(i, j, k - 1, 3))
{
return true;
}
- if (l == 4 && world.isBlockNormalCube(i + 1, j, k))
+ if (l == 4 && world.isBlockSolidOnSide(i + 1, j, k, 4))
{
return true;
}
- return l == 5 && world.isBlockNormalCube(i - 1, j, k);
+ return l == 5 && world.isBlockSolidOnSide(i - 1, j, k, 5);
}
public boolean canPlaceBlockAt(World world, int i, int j, int k)
{
- if (world.isBlockNormalCube(i - 1, j, k))
+ if (world.isBlockSolidOnSide(i - 1, j, k, 5))
{
return true;
}
- if (world.isBlockNormalCube(i + 1, j, k))
+ if (world.isBlockSolidOnSide(i + 1, j, k, 4))
{
return true;
}
- if (world.isBlockNormalCube(i, j, k - 1))
+ if (world.isBlockSolidOnSide(i, j, k - 1, 3))
{
return true;
}
- if (world.isBlockNormalCube(i, j, k + 1))
+ if (world.isBlockSolidOnSide(i, j, k + 1, 2))
{
return true;
}
- return world.isBlockNormalCube(i, j - 1, k);
+ return world.isBlockSolidOnSide(i, j - 1, k, 1);
}
public void onBlockPlaced(World world, int i, int j, int k, int l)
@@ -77,23 +77,23 @@
int j1 = i1 & 8;
i1 &= 7;
i1 = -1;
- if (l == 1 && world.isBlockNormalCube(i, j - 1, k))
+ if (l == 1 && world.isBlockSolidOnSide(i, j - 1, k, 1))
{
i1 = 5 + world.rand.nextInt(2);
}
- if (l == 2 && world.isBlockNormalCube(i, j, k + 1))
+ if (l == 2 && world.isBlockSolidOnSide(i, j, k + 1, 2))
{
i1 = 4;
}
- if (l == 3 && world.isBlockNormalCube(i, j, k - 1))
+ if (l == 3 && world.isBlockSolidOnSide(i, j, k - 1, 3))
{
i1 = 3;
}
- if (l == 4 && world.isBlockNormalCube(i + 1, j, k))
+ if (l == 4 && world.isBlockSolidOnSide(i + 1, j, k, 4))
{
i1 = 2;
}
- if (l == 5 && world.isBlockNormalCube(i - 1, j, k))
+ if (l == 5 && world.isBlockSolidOnSide(i - 1, j, k, 5))
{
i1 = 1;
}
@@ -116,27 +116,27 @@
{
int i1 = world.getBlockMetadata(i, j, k) & 7;
boolean flag = false;
- if (!world.isBlockNormalCube(i - 1, j, k) && i1 == 1)
+ if (!world.isBlockSolidOnSide(i - 1, j, k, 5) && i1 == 1)
{
flag = true;
}
- if (!world.isBlockNormalCube(i + 1, j, k) && i1 == 2)
+ if (!world.isBlockSolidOnSide(i + 1, j, k, 4) && i1 == 2)
{
flag = true;
}
- if (!world.isBlockNormalCube(i, j, k - 1) && i1 == 3)
+ if (!world.isBlockSolidOnSide(i, j, k - 1, 3) && i1 == 3)
{
flag = true;
}
- if (!world.isBlockNormalCube(i, j, k + 1) && i1 == 4)
+ if (!world.isBlockSolidOnSide(i, j, k + 1, 2) && i1 == 4)
{
flag = true;
}
- if (!world.isBlockNormalCube(i, j - 1, k) && i1 == 5)
+ if (!world.isBlockSolidOnSide(i, j - 1, k, 1) && i1 == 5)
{
flag = true;
}
- if (!world.isBlockNormalCube(i, j - 1, k) && i1 == 6)
+ if (!world.isBlockSolidOnSide(i, j - 1, k, 1) && i1 == 6)
{
flag = true;
}
@@ -0,0 +1,43 @@
--- ../src_base/minecraft/net/minecraft/src/BlockNetherStalk.java 0000-00-00 00:00:00.000000000 -0000
+++ ../src_work/minecraft/net/minecraft/src/BlockNetherStalk.java 0000-00-00 00:00:00.000000000 -0000
@@ -1,5 +1,6 @@
package net.minecraft.src;
+import java.util.ArrayList;
import java.util.Random;
public class BlockNetherStalk extends BlockFlower
@@ -57,25 +58,24 @@
return 6;
}
- public void dropBlockAsItemWithChance(World world, int i, int j, int k, int l, float f, int i1)
+ @Override
+ public ArrayList<ItemStack> getBlockDropped(World world, int i, int j, int k, int meta, int fortune)
{
- if (world.isRemote)
- {
- return;
- }
+ ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
int j1 = 1;
- if (l >= 3)
+ if (meta >= 3)
{
j1 = 2 + world.rand.nextInt(3);
- if (i1 > 0)
+ if (fortune > 0)
{
- j1 += world.rand.nextInt(i1 + 1);
+ j1 += world.rand.nextInt(fortune + 1);
}
}
for (int k1 = 0; k1 < j1; k1++)
{
- dropBlockAsItem_do(world, i, j, k, new ItemStack(Item.netherStalkSeeds));
+ ret.add(new ItemStack(Item.netherStalkSeeds));
}
+ return ret;
}
public int idDropped(int i, Random random, int j)
@@ -0,0 +1,11 @@
--- ../src_base/minecraft/net/minecraft/src/BlockPistonBase.java 0000-00-00 00:00:00.000000000 -0000
+++ ../src_work/minecraft/net/minecraft/src/BlockPistonBase.java 0000-00-00 00:00:00.000000000 -0000
@@ -355,7 +355,7 @@
return false;
}
}
- return !(Block.blocksList[i] instanceof BlockContainer);
+ return !(Block.blocksList[i] != null && Block.blocksList[i].hasTileEntity(world.getBlockMetadata(j, k, l)));
}
private static boolean canExtend(World world, int i, int j, int k, int l)
@@ -1,22 +1,20 @@
--- ../src_base/minecraft/net/minecraft/src/BlockPressurePlate.java 0000-00-00 00:00:00.000000000 -0000
+++ ../src_work/minecraft/net/minecraft/src/BlockPressurePlate.java 0000-00-00 00:00:00.000000000 -0000
@@ -48,7 +48,8 @@
@@ -38,7 +38,7 @@
public boolean canPlaceBlockAt(World world, int i, int j, int k)
{
- return world.isBlockNormalCube(i, j - 1, k) || world.getBlockId(i, j - 1, k) == Block.fence.blockID;
+ return world.isBlockSolidOnSide(i, j - 1, k,1)
+ || world.getBlockId(i, j - 1, k) == Block.fence.blockID;
+ return world.isBlockSolidOnSide(i, j - 1, k, 1) || world.getBlockId(i, j - 1, k) == Block.fence.blockID;
}
public void onBlockAdded(World world, int i, int j, int k)
@@ -58,7 +59,8 @@
@@ -48,7 +48,7 @@
public void onNeighborBlockChange(World world, int i, int j, int k, int l)
{
boolean flag = false;
- if(!world.isBlockNormalCube(i, j - 1, k) && world.getBlockId(i, j - 1, k) != Block.fence.blockID)
+ if(!world.isBlockSolidOnSide(i, j - 1, k,1)
+ && world.getBlockId(i, j - 1, k) != Block.fence.blockID)
- if (!world.isBlockNormalCube(i, j - 1, k) && world.getBlockId(i, j - 1, k) != Block.fence.blockID)
+ if (!world.isBlockSolidOnSide(i, j - 1, k, 1) && world.getBlockId(i, j - 1, k) != Block.fence.blockID)
{
flag = true;
}
@@ -0,0 +1,201 @@
--- ../src_base/minecraft/net/minecraft/src/BlockRail.java 0000-00-00 00:00:00.000000000 -0000
+++ ../src_work/minecraft/net/minecraft/src/BlockRail.java 0000-00-00 00:00:00.000000000 -0000
@@ -5,16 +5,29 @@
public class BlockRail extends Block
{
private final boolean isPowered;
+
+ /**
+ * Forge: Moved render type to a field and a setter.
+ * This allows for a mod to change the render type
+ * for vanilla rails, and any mod rails that extend
+ * this class.
+ */
+ private int renderType = 9;
+
+ public void setRenderType(int value)
+ {
+ renderType = value;
+ }
public static final boolean isRailBlockAt(World world, int i, int j, int k)
{
int l = world.getBlockId(i, j, k);
- return l == Block.rail.blockID || l == Block.railPowered.blockID || l == Block.railDetector.blockID;
+ return Block.blocksList[l] instanceof BlockRail;
}
public static final boolean isRailBlock(int i)
{
- return i == Block.rail.blockID || i == Block.railPowered.blockID || i == Block.railDetector.blockID;
+ return Block.blocksList[i] instanceof BlockRail;
}
protected BlockRail(int i, int j, boolean flag)
@@ -81,7 +94,7 @@
public int getRenderType()
{
- return 9;
+ return renderType;
}
public int quantityDropped(Random random)
@@ -91,7 +104,7 @@
public boolean canPlaceBlockAt(World world, int i, int j, int k)
{
- return world.isBlockNormalCube(i, j - 1, k);
+ return world.isBlockSolidOnSide(i, j - 1, k, 1);
}
public void onBlockAdded(World world, int i, int j, int k)
@@ -119,23 +132,23 @@
j1 &= 7;
}
boolean flag = false;
- if (!world.isBlockNormalCube(i, j - 1, k))
+ if (!world.isBlockSolidOnSide(i, j - 1, k, 1))
{
flag = true;
}
- if (j1 == 2 && !world.isBlockNormalCube(i + 1, j, k))
+ if (j1 == 2 && !world.isBlockSolidOnSide(i + 1, j, k, 1))
{
flag = true;
}
- if (j1 == 3 && !world.isBlockNormalCube(i - 1, j, k))
+ if (j1 == 3 && !world.isBlockSolidOnSide(i - 1, j, k, 1))
{
flag = true;
}
- if (j1 == 4 && !world.isBlockNormalCube(i, j, k - 1))
+ if (j1 == 4 && !world.isBlockSolidOnSide(i, j, k - 1, 1))
{
flag = true;
}
- if (j1 == 5 && !world.isBlockNormalCube(i, j, k + 1))
+ if (j1 == 5 && !world.isBlockSolidOnSide(i, j, k + 1, 1))
{
flag = true;
}
@@ -317,8 +330,119 @@
return 0;
}
+ /**
+ * This function is no longer called by Minecraft
+ */
+ @Deprecated
static boolean isPoweredBlockRail(BlockRail blockrail)
{
return blockrail.isPowered;
}
+
+ /**
+ * Return true if the rail can make corners.
+ * Used by placement logic.
+ * @param world The world.
+ * @param i The rail X coordinate.
+ * @param j The rail Y coordinate.
+ * @param k The rail Z coordinate.
+ * @return True if the rail can make corners.
+ */
+ public boolean isFlexibleRail(World world, int i, int j, int k)
+ {
+ return !isPowered;
+ }
+
+ /**
+ * Returns true if the rail can make up and down slopes.
+ * Used by placement logic.
+ * @param world The world.
+ * @param i The rail X coordinate.
+ * @param j The rail Y coordinate.
+ * @param k The rail Z coordinate.
+ * @return True if the rail can make slopes.
+ */
+ public boolean canMakeSlopes(World world, int i, int j, int k)
+ {
+ return true;
+ }
+
+ /**
+ * Return the rails metadata (without the power bit if the rail uses one).
+ * Can be used to make the cart think the rail something other than it is,
+ * for example when making diamond junctions or switches.
+ * The cart parameter will often be null unless it it called from EntityMinecart.
+ *
+ * Valid rail metadata is defined as follows:
+ * 0x0: flat track going North-South
+ * 0x1: flat track going West-East
+ * 0x2: track ascending to the East
+ * 0x3: track ascending to the West
+ * 0x4: track ascending to the North
+ * 0x5: track ascending to the South
+ * 0x6: WestNorth corner (connecting East and South)
+ * 0x7: EastNorth corner (connecting West and South)
+ * 0x8: EastSouth corner (connecting West and North)
+ * 0x9: WestSouth corner (connecting East and North)
+ *
+ * All directions are Notch defined.
+ * In MC Beta 1.8.3 the Sun rises in the North.
+ * In MC 1.0.0 the Sun rises in the East.
+ * @param world The world.
+ * @param cart The cart asking for the metadata, null if it is not called by EntityMinecart.
+ * @param i The rail X coordinate.
+ * @param j The rail Y coordinate.
+ * @param k The rail Z coordinate.
+ * @return The metadata.
+ */
+ public int getBasicRailMetadata(IBlockAccess world, EntityMinecart cart, int i, int j, int k)
+ {
+ int meta = world.getBlockMetadata(i, j, k);
+ if(isPowered) {
+ meta = meta & 7;
+ }
+ return meta;
+ }
+
+ /**
+ * Returns the max speed of the rail at [i, j, k].
+ * @param world The world.
+ * @param cart The cart on the rail, may be null.
+ * @param i The rail X coordinate.
+ * @param j The rail Y coordinate.
+ * @param k The rail Z coordinate.
+ * @return The max speed of the current rail.
+ */
+ public float getRailMaxSpeed(World world, EntityMinecart cart, int i, int j, int k)
+ {
+ return 0.4f;
+ }
+
+ /**
+ * This function is called by any minecart that passes over this rail.
+ * It is called once per update tick that the minecart is on the rail.
+ * @param world The world.
+ * @param cart The cart on the rail.
+ * @param i The rail X coordinate.
+ * @param j The rail Y coordinate.
+ * @param k The rail Z coordinate.
+ */
+ public void onMinecartPass(World world, EntityMinecart cart, int i, int j, int k)
+ {
+ }
+
+ /**
+ * Return true if this rail uses the 4th bit as a power bit.
+ * Avoid using this function when getBasicRailMetadata() can be used instead.
+ * The only reason to use this function is if you wish to change the rails metadata.
+ * @param world The world.
+ * @param i The rail X coordinate.
+ * @param j The rail Y coordinate.
+ * @param k The rail Z coordinate.
+ * @return True if the 4th bit is a power bit.
+ */
+ public boolean hasPowerBit(World world, int i, int j, int k)
+ {
+ return isPowered;
+ }
}
@@ -1,20 +1,20 @@
--- ../src_base/minecraft/net/minecraft/src/BlockRedstoneRepeater.java 0000-00-00 00:00:00.000000000 -0000
+++ ../src_work/minecraft/net/minecraft/src/BlockRedstoneRepeater.java 0000-00-00 00:00:00.000000000 -0000
@@ -35,7 +35,7 @@
@@ -28,7 +28,7 @@
public boolean canPlaceBlockAt(World world, int i, int j, int k)
{
- if(!world.isBlockNormalCube(i, j - 1, k))
+ if(!world.isBlockSolidOnSide(i, j - 1, k,1))
- if (!world.isBlockNormalCube(i, j - 1, k))
+ if (!world.isBlockSolidOnSide(i, j - 1, k, 1))
{
return false;
} else
@@ -46,7 +46,7 @@
}
@@ -40,7 +40,7 @@
public boolean canBlockStay(World world, int i, int j, int k)
{
- if(!world.isBlockNormalCube(i, j - 1, k))
+ if(!world.isBlockSolidOnSide(i, j - 1, k,1))
- if (!world.isBlockNormalCube(i, j - 1, k))
+ if (!world.isBlockSolidOnSide(i, j - 1, k, 1))
{
return false;
} else
}
@@ -0,0 +1,33 @@
--- ../src_base/minecraft/net/minecraft/src/BlockRedstoneWire.java 0000-00-00 00:00:00.000000000 -0000
+++ ../src_work/minecraft/net/minecraft/src/BlockRedstoneWire.java 0000-00-00 00:00:00.000000000 -0000
@@ -2,6 +2,8 @@
import java.util.*;
+import net.minecraft.src.forge.IConnectRedstone;
+
public class BlockRedstoneWire extends Block
{
private boolean wiresProvidePower;
@@ -47,7 +49,7 @@
public boolean canPlaceBlockAt(World world, int i, int j, int k)
{
- return world.isBlockNormalCube(i, j - 1, k);
+ return world.isBlockSolidOnSide(i, j - 1, k, 1);
}
private void updateAndPropagateCurrentStrength(World world, int i, int j, int k)
@@ -467,6 +469,12 @@
int j1 = iblockaccess.getBlockMetadata(i, j, k);
return l == (j1 & 3) || l == Direction.footInvisibleFaceRemap[j1 & 3];
}
+
+ if (Block.blocksList[i1] instanceof IConnectRedstone)
+ {
+ return ((IConnectRedstone)Block.blocksList[i1]).canConnectRedstone(iblockaccess, i, j, k, l);
+ }
+
return Block.blocksList[i1].canProvidePower() && l != -1;
}
@@ -1,6 +1,14 @@
--- ../src_base/minecraft/net/minecraft/src/BlockSnow.java 0000-00-00 00:00:00.000000000 -0000
+++ ../src_work/minecraft/net/minecraft/src/BlockSnow.java 0000-00-00 00:00:00.000000000 -0000
@@ -82,15 +82,8 @@
@@ -63,7 +63,6 @@
{
if (!canPlaceBlockAt(world, i, j, k))
{
- dropBlockAsItem(world, i, j, k, world.getBlockMetadata(i, j, k), 0);
world.setBlockWithNotify(i, j, k, 0);
return false;
}
@@ -75,15 +74,7 @@
public void harvestBlock(World world, EntityPlayer entityplayer, int i, int j, int k, int l)
{
@@ -11,14 +19,13 @@
- double d2 = (double)(world.rand.nextFloat() * f) + (double)(1.0F - f) * 0.5D;
- EntityItem entityitem = new EntityItem(world, (double)i + d, (double)j + d1, (double)k + d2, new ItemStack(i1, 1, 0));
- entityitem.delayBeforeCanPickup = 10;
- world.entityJoinedWorld(entityitem);
- world.spawnEntityInWorld(entityitem);
- world.setBlockWithNotify(i, j, k, 0);
+
+ dropBlockAsItem(world,i,j,k,l,0);
+ dropBlockAsItem(world, i, j, k, l, 0);
entityplayer.addStat(StatList.mineBlockStatArray[blockID], 1);
}
@@ -101,7 +94,7 @@
@@ -94,14 +85,13 @@
public int quantityDropped(Random random)
{
@@ -27,3 +34,10 @@
}
public void updateTick(World world, int i, int j, int k, Random random)
{
if (world.getSavedLightValue(EnumSkyBlock.Block, i, j, k) > 11)
{
- dropBlockAsItem(world, i, j, k, world.getBlockMetadata(i, j, k), 0);
world.setBlockWithNotify(i, j, k, 0);
}
}
Loaded 100 of 233 files, more files were not shown because too many files have changed in this diff. Show more