Commit Graph

49 Commits

Author SHA1 Message Date
James Mitchell 5165dc52bf Update MCP mappings to snapshot_nodoc_20161220 (#3551) 2016-12-21 15:52:30 -08:00
LexManos 8d20258f3c First pass at exposing data fixers to modders.
Each mod gets its own version number, mods SHOULD NOT rely on other
mod's fixers, just care about yourself.
Walkers can use IDataFixerData to retrieve their version.
2016-11-28 16:05:41 -08:00
LexManos 97ea0c4713 First draft of Entity Registry re-write. 2016-11-17 19:06:42 -08:00
LexManos 648067efc2 Fixed test cases for 1.11 changes. 2016-11-15 20:28:12 -08:00
cpw 4e6a774075 Initial 1.11-pre1 update 2016-11-13 17:09:55 -05:00
cpw 9ab96fbda6 Update to 20161111 mcp names 2016-11-12 10:05:32 -05:00
Abastro dd41990db4 Fixed NPE from missing Capabilities (#3191) 2016-08-14 13:58:54 -07:00
LexManos 0e286f880e Fix World Capabilities NPE when there are no attached capabilities. 2016-08-14 01:48:41 -07:00
Abastro bfddcfb4fc Introduced Capabilities for World (#3069) 2016-08-13 20:42:00 -07:00
cpw 260be68723 Update to 1.10 2016-06-23 02:39:55 -04:00
cpw c8d775c865 In accordance with our stated goal of relicensing Forge to LGPL v2.1, this commit enacts that change. Although it is using the 1.9.4 codebase, it is intended that this branch become public with the 1.10 changes, as such the license will take effect at that time. The three commits from persons who have failed to accept the new license, as documented in #2789, have had their commits reverted. This should complete the license transition. Commits after the commit date of this commit should be considered licensed by LGPLv2.1, as indicated in LICENSE-new.txt. All patches are now considered owned by the Forge project and Forge Development LLC in particular (note that they will not get the license boilerplate, as they are machine generated files). 2016-06-22 23:49:48 -04:00
LexManos b65b2991a4 Fix paramters for addArmorMaterial, addOption and addGameType. 2016-05-24 16:10:47 -07:00
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
LexManos 3177d55579 Remove usage of AsynchronousExecutor library in favor or a simpler implementation. 2016-05-03 19:54:04 -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
LexManos 6fd9a2c00e Rework DimensionManager for new DimensionType enum, replaces the old provider registry. Also fixed save folder issues with dimensions. Closes #2570 2016-03-21 17:12:34 -07:00
Vasco Lavos 05801a74af 1.9: Fixed registering armor materials through EnumHelper exploding
1.9 ArmorMaterial now requires a SoundEvent for the equip sound.
2016-03-15 17:52:58 +00: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
cpw f0e5baa8e5 Few more compile fixups 2016-03-07 00:23:00 -05:00
LexManos 7fadb5aeb8 Small renames before bed. 2016-03-02 01:44:41 -08: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
RainWarrior 0710bdf3f5 Model animation system.
Main things of interest:
  * IAnimationStateMachine - state machine for animations; can load
    from json.
  * AnimationTESR - automatic TESR for animated models.
  * AnimationModelBase - same for entities.
  * ITimeValue - time-varying value, used to control animation
    parameters from code.

  * TESRs can now be batched - look at TESR.renderTileEntityFast +
    TE.hasFastRenderer.
  * RegionRenderCache is not accessible to TESRs and other client-side
    logic - MinecraftForgeClient.getRegionRenderCache.
2016-01-24 09:59:38 +03:00
LexManos 17db34ae31 New Capability system allowing for more manageable world object features.
When combined with @Optional this should address all issues of soft dependancy on mods/apis.
This also addresses the issue of dynamic functionality in TileEntities/Entities.

Current capability providers: TileEntity, Entity, ItemStack

Also added INBTSerializeable, a generic interface for game objects that can be written to/from NBT tags.

Vanilla capabilities will be coming soon, mostly on request and review.
So start requesting capabiliteis on vanilla/Forge features.
2016-01-11 16:04:22 -08:00
LexManos 5549b06f96 Compiler warnings pass, undeprecated SplashProgress related stuff. 2015-11-26 19:38:21 -08:00
cpw 68dfcccd57 Update mappings to 20151122. 2015-11-23 23:18:52 -05:00
Lex Manos f6ca556a38 Hold a weak reference to the Minecraft fake player object. Closes #1705 2015-02-15 13:00:09 -08:00
Lex Manos ecd4a259ec Fix EnumHelper for new ArmorTexture argument. 2014-12-11 16:41:27 -08:00
Lex Manos 59df94bd90 Updated FML:
MinecraftForge/FML@9c8ca4a4e3 Unlink banner block and item id. Mojang should of matched these up but they didn't -.-
MinecraftForge/FML@84a101f344 Update Dev mcp mappings to 11-30 snapshot.
2014-12-01 19:11:17 -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
Lex Manos af9229d3bc Add ability for modders to designate custom biome types. And remove note about automatically registering. Closes #1167 2014-07-07 21:29:37 -07:00
Lex Manos 256d865db6 Update to 1.7.10-pre4. 2014-06-23 21:55:16 -07:00
Travis Watkins e6bbcf6a3d Load chunks asynchronously for players.
When a player triggers a chunk load via walking around or teleporting
there is no need to stop everything and get this chunk on the main thread.
The client is used to having to wait some time for this chunk and the
server doesn't immediately do anything with it except send it to the
player. At the same time chunk loading is the last major source of file IO
that still runs on the main thread.

These two facts make it possible to offload chunks loaded for this reason
to another thread. However, not all parts of chunk loading can happen off
the main thread. For this we use the new AsynchronousExecutor system to
split chunk loading in to three pieces. The first is loading data from
disk, decompressing it, and parsing it in to an NBT structure.  The second
piece is creating entities and tile entities in the chunk and adding them
to the world, this is still done on the main thread. The third piece is
informing everyone who requested a chunk load that the load is finished.
For this we register callbacks and then run them on the main thread once
the previous two stages are finished.

There are still cases where a chunk is needed immediately and these will
still trigger chunk loading entirely on the main thread. The most obvious
case is plugins using the API to request a chunk load. We also must load
the chunk immediately when something in the world tries to access it. In
these cases we ignore any possibly pending or in progress chunk loading
that is happening asynchronously as we will have the chunk loaded by the
time they are finished.

The hope is that overall this system will result in less CPU time and
pauses due to blocking file IO on the main thread thus giving more
consistent performance. Testing so far has shown that this also speeds up
chunk loading client side although some of this is likely to be because
we are sending less chunks at once for the client to process.

Thanks for ammaraskar for help with the implementation of this feature.

This commit is based off the following :

Bukkit/CraftBukkit@b8fc6ab2c1
Bukkit/CraftBukkit@85f5776df2
Bukkit/CraftBukkit@0714971ca2
Bukkit/CraftBukkit@7f49722f45
Bukkit/CraftBukkit@53ad0cf1ab
2014-06-12 16:51:17 -04:00
Lex Manos f2a33ea9f6 Add comment to RotationHelper telling modders where to actually look, closes #1115 2014-06-02 12:20:28 -07:00
Lex Manos 0737601dbf Fix enum helpers for EnumRarity {moved to Commn and changed paramter} and EnumCreatureType {new parameter} and added junit test for them. Closes #1009 2014-05-28 15:28:40 -07:00
Lex Manos b43d63a7ad Cull FakePlayers when worlds are unloaded. 2014-02-11 18:25:33 -08:00
Lex Manos 1e2c63f486 Add the beginnings of a Constants class, to document/clean some of the magic numbers that are in the MC code base. 2014-02-05 01:14:57 -08:00
Lex Manos e68577ffd3 Updated FML:
MinecraftForge/FML@03fb1879d7 Fix obf error when right clicking a Empty Map.
MinecraftForge/FML@6bb9b8b953 Clean up FMLEventChannel. Closes #367.
MinecraftForge/FML@b7b3450dcd Update MCP mapping snapshot to latest crowdsourced names.
MinecraftForge/FML@8c9e8b5270 Fix isRemote, this is integral to so many parts of the code, everyone knows it by this name, People should not change it.
2014-02-05 01:14:24 -08:00
Lex Manos baf95e747a Fix warnings in Forge codebase. 2014-01-17 21:55:48 -08:00
Lex Manos a6c45a7ade Inital patch update for 1.7.2, Doesn't compile, not done yet. 2013-12-22 03:06:10 -08:00
Lex Manos 439dbd8bb3 Killed a few hundred compile errors. 2013-12-12 23:32:36 -08:00