Commit Graph

15 Commits

Author SHA1 Message Date
LexManos cdc86e9af6 Update mappoings snapshot to 20160518 2016-05-18 05:23:30 -07:00
LexManos b9ac73b0f1 1.9.4 Update.
Major things to note:
Class renames: https://gist.github.com/LexManos/44dd211f90f498ad4015279b103dff86
Tile Entities are now packed in the ChunkData packet.
Forge intends to work around this to better support large moded worlds, but for the time being modders should implement the new function carefully and only send what data they need to!
Minecraft's codebase now has annotations, these are directly from Mojang and should be adheared to!
Added support for package-info.java's containing @Nullable information for all MC code base.
2016-05-18 03:29:10 -07:00
bloodmc 5a20950902 Call markDirty when restoring blocks with TileEntities. (#2809)
This change makes sure the updated tileentity is saved properly within the
chunk.
2016-05-02 15:21:59 -07:00
cpw 6e04a6c572 Squashed commit of the following:
commit b3b290aec9d3010a134859da6001ea28a96c2fdc
Merge: c6ce6a0 d803f7d
Author: cpw <cpw@weeksfamily.ca>
Date:   Fri Mar 25 13:28:04 2016 -0400

    Merge branch 'RegistryRework' of https://github.com/LexManos/MinecraftForge into LexManos-RegistryRework

    Implement proper registry slaves. Should help with rollback related issues.

    Missing patch

commit d803f7db76f65db9d27302c9804a643bc853dc22
Author: LexManos <LexManos@gmail.com>
Date:   Tue Mar 22 03:36:14 2016 -0700

    Update VillagerRegistry and use it. Should in theory make custom villagers work now. Using string version instead of int id for networking.

commit eb5e5b4b42fdca26d2a104e4dc1e6a3ea3051a7b
Author: LexManos <LexManos@gmail.com>
Date:   Tue Mar 22 02:14:16 2016 -0700

    More cleanup.

commit edbc56b2ff314629d0e402709f3cf29fc79c4a3d
Author: LexManos <LexManos@gmail.com>
Date:   Tue Mar 22 02:05:23 2016 -0700

    More cleanups, removed deprecated UniqueIdentifier {ResourceLocation now}

commit e2df8d1be3c97601508f83dc97b0e8853fa1e271
Author: LexManos <LexManos@gmail.com>
Date:   Tue Mar 22 01:29:19 2016 -0700

    Stupid generics....

commit 46d57dc4677fa5ff3923e64eaccfb33d7e5aad8d
Author: LexManos <LexManos@gmail.com>
Date:   Tue Mar 22 01:00:25 2016 -0700

    Some registry tweaking to provde a non-complicated API modders can use.
2016-04-01 20:56:06 -04:00
kashike 45881d1c90 Replace Forge's `BlockPos#getImmutable` method with the included `BlockPos#toImmutable` (func_185334_h), while keeping the override in PooledMutableBlockPos to prevent mutable leaks.
Also prevent a mutable blockpos leak in World#setTileEntity
2016-03-27 09:43:56 -07:00
RainWarrior 75032ebf9c Made some more public fields either private or final. 2016-03-24 22:22:21 +03:00
RainWarrior a9d23f5e78 Cleanup: removed IEEP, removed redundant casts, fixed imports, fixed typos. 2016-03-24 22:22:20 +03:00
RainWarrior 4650ee2789 Updated to latest mappings. Exc is broken, some anonymous classes didn't map to srg names. 2016-03-13 04:40:03 +03:00
cpw fffbc0f078 Some more forge code fixes 2016-03-08 16:23:54 -05:00
RainWarrior befbb45522 Most of ItemInWorldManager reject, various small error fixes. 2016-03-08 23:33:28 +03:00
LexManos ac7c4d2f6c Some import renames and compile error fixes, killed ~800. 2016-03-01 04:58:03 -08:00
LexManos 06130912c5 Protect BlockSnapshot and Chunk.getTileEntity from mutible BlockPos instances. Closes #2438 2016-02-11 16:48:32 -08:00
LexManos 5549b06f96 Compiler warnings pass, undeprecated SplashProgress related stuff. 2015-11-26 19:38:21 -08:00
Lex Manos 53659fca06 Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 00:00:54 -08:00
bloodshot 37f91681d9 Added PlaceEvent and MultiPlaceEvent which fires before placing a block.
Before calling "ItemStack.tryPlaceItemInWorld", a recording flag is turned on for
setBlock to capture a blocksnapshot for each block that attempts to be placed.

If 1 block is captured, a "BlockEvent.PlaceEvent" is fired to notify mods.
If 2 or more blocks are captured, a "BlockEvent.PlaceEvent" is fired first with the first block
captured followed by a "BlockEvent.MultiPlaceEvent" with all captured blocks. This extra event
is required for items that have the ability to place 2 or more blocks such as a BlockBed.

If either event is cancelled, the recorded block snapshot(s), item stacksize, and item meta will
revert back to the captured snapshot(s).
If the events are not cancelled, a notification will be sent to clients and block physics will be updated.

What this means for mods is Forge will be able to capture all player block placement automatically and fire
a PlaceEvent and/or MultiPlaceEvent.
If for whatever reason your mod does not use the standard placement methods then you will need to fire the
appropriate placement events in order to notify mods/servers.

This commit also includes a new utility class called BlockSnapshot which is serializable. This new class is used in conjunction with
both PlaceEvent and MultiPlaceEvent in order to record a snapshot of block space before it is altered. This
allows us to restore the block(s) if an event is cancelled. The class also provides the ability to restore a snapshot
to any location using the restoreToLocation method. This should be helpful to many mods that are looking to be able
to capture block data then restore it to back to any location required.
2014-10-02 11:33:25 -04:00