Commit graph

561 commits

Author SHA1 Message Date
RainWarrior
7b7d18f676 Provide original armor model in the custom armor model hook. 2016-01-28 07:43:55 +03:00
RainWarrior
be6c2bd588 Fixed small bug in item extraction code. 2016-01-27 13:29:07 +03:00
RainWarrior
a0bf0155ac Fix NoSuchElementException in ModelBlockAnimation caused by empty event list. 2016-01-26 01:22:21 +03:00
LexManos
e45d111685 Bump version in prep for new Recomended Build. 2016-01-25 11:32:41 -08:00
LexManos
7a0a801740 Merge pull request #2336 from VikeStep/master
[1.8.9] Add EntityTravelToDimensionEvent
2016-01-25 11:07:19 -08:00
RainWarrior
960717eb0c Fixed minor race condition between mouse clicks and TESR in the animation example. 2016-01-25 17:39:43 +03:00
VikeStep
026d179c0d Add EntityTravelToDimensionEvent
Resolve Merge Conflict

Move event call inside conditional
2016-01-25 17:57:52 +10:00
RainWarrior
e929199758 Sometimes I forget how much trivial things are missing from Java 6. 2016-01-24 10:10:21 +03:00
Fry
e9be24700e Merge pull request #2331 from RainWarrior/model-animation
Model animation system
2016-01-24 10:01:58 +03: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
01919e4eed Fix J6 compile error in IItemHandler PR. 2016-01-23 22:52:32 -08:00
LexManos
e9a86f27fb Merge pull request #2385 from rwtema/master
Add IItemHandler capability
2016-01-23 22:06:29 -08:00
rwtema
a1e41f5464 Add IItemHandler capability
Add the actual patches that I forgot.

Add simple implementations of IStorage and the factory methods.

Add ItemStackHandler. A simple IItemHandler implementaton.

return nulls, not throw nulls.

Move the vanilla wrappers to a separate class for now.

Minor clean ups of VanillaWrapper code.

Inline static methods.

Add comments.

Minor cleanup of code.

Remove redundant size field and add a validate slot index method.

Minor formatting issues.

Break early If stacksize to insert is 0.

Remove setByte() methods.

Throw exception if IItemHandler can't be modifyed in NBT loading.

Replace event handler with patches

Add capability to mine cart inventory entities.

Change formatting and registration of capability.

Make InventoryPlayer implements IItemHandler because why not. Also added a field to allow mods that add additional player inventory space to publicly expose them.

Reduce patch sizes

Lazy initialization of the item handler for vanilla tiles.

Minor formatting changes.

Create a single vanilla chest item handler that will merge with adjacent chests when detected. Added hooks to reset the cached adjacent value when a block update is detected and when a chunk loads.

Revert "Make InventoryPlayer implements IItemHandler because why not. Also added a field to allow mods that add additional player inventory space to publicly expose them."

This reverts commit 306d4a37fd0e8c8a0754411c013b750dfe8e2c87.

Fix furnace derp

Replace double chest code with a simpler method.

Vanilla wrappers implement IItemHandlerModifiable (since they are modifiable)

Minor code cleanups

Add an onContentsChanged() and onLoad() callback methods.to the default implementation.

Add slot as a parameter in the callback method.

Change IItemHandlerModifiable.setStackInSlot() to void, and added a note about not being intended for cross-mod use.

Improve ItemStackHandler handling of errored NBT.

Make the stacks array protected.

Fix a lot of derps in SlotItemHandler.

Fix derp in ItemStackHandler

Clarify comments on IItemHandler

ItemStackHandler no longer caches the stack array in local variable.

Clean up the Chests code to make intentions clearer

Vanilla hoppers have their cooldown activated when an item is inserted. Made this behavior part of an item handler (rather than the insertion code)

Fix mistake in ItemStackHandler

More documentation of potential edge cases in getStackInSlot()

Make limit checking more resiliant.
2016-01-24 05:20:58 +00:00
LexManos
82647f5b66 Restore OreDictionary.getOres(String, boolean) and doeOreNameExist(String) functions that went MIA in git merge issue.
Original Commit: cd3bbfb02c
2016-01-21 13:41:26 -08:00
iLexiconn
a3d4fe5d25 Fixed makeItemStack ignoring stackSize
Fixes #2376
2016-01-21 15:31:39 +01:00
RainWarrior
17e8de8a3a Fixed error detection login in ModelLoader, reduced the maximum number of printed stack traces to 5 per domain. 2016-01-20 01:20:26 +03:00
LexManos
f3c2eb8e9c Fix Deobfusication transformer throwing verification errores in Eclipse development environments. 2016-01-19 02:14:22 -08:00
RainWarrior
968b7cae40 Correctly handle error caused by missing/malformed bucket model definition file. 2016-01-18 21:35:23 +03:00
LexManos
3c5103acfb Fix ItemStacks not getting the parent capability provider from items. Closes #2383 2016-01-17 13:37:57 -08:00
Bartek Bok
fae5ff67ed Allow sleeping without bed 2016-01-17 00:43:29 +01:00
RainWarrior
accf6cf218 Fixed missing model error reporting, made block and item variants sort before loading, to make the splash screen info more useful. 2016-01-17 01:57:06 +03:00
cpw
cc593d4b54 Fixed problem with LAN connections seeing the original ProxyPacket and consuming the first byte. Closes #2373 2016-01-16 16:34:02 -05:00
LexManos
7b92a27908 Clone FML packet indexes if channel is not open. Fixes potential threading issue. 2016-01-14 13:35:19 -08:00
Bernhard Bonigl
2857b710f8 Default bucket model is empty, allow bucket model without fluid.
This allows capsules, cans, bottles,... to use the same item model for their item variant. Also it's makes much more sense.
2016-01-14 22:13:31 +01:00
mezz
aee1bd6014 Add GuiScreenEvent.BackgroundDrawnEvent 2016-01-13 13:01:16 -08:00
cpw
9a737b0c90 Fix problem which meant runtime deobf to MCP names wasn't working. SRG named mods located in the mods dir of a dev
environment will now load normally.
2016-01-13 00:26:52 -05: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
2594196c15 Fixed GuiWrongMinecraft having wrong Log file name. Closes #2348 2016-01-10 20:31:55 -08:00
LexManos
afc46fa59a Made WrongMinecraftVersionException and ModSortingException a bit easier to read in log files. Closes: #2345 2016-01-10 11:07:12 -08:00
LexManos
76c40896e4 Remove dead code in JarDiscoverer. Closes #2346 2016-01-10 11:06:37 -08:00
RainWarrior
f42137907e Implemented face culling for item models, improves performance slightly. Closes #2326 2016-01-09 19:05:18 +03:00
RainWarrior
5c5d946ff5 Made block model loading bar more robust, and fixed the count. 2016-01-07 02:09:29 +03:00
RainWarrior
95615cb4bf Added progress bar for the ModelLoader. 2016-01-06 22:53:34 +03:00
RainWarrior
68339f51cf Derp. 2016-01-06 22:06:36 +03:00
RainWarrior
949e77b46a Model loader improvements: adding custom data/textures to models that don't need them doesn't cause a error now, since it's common to put those in the defaults section of the blockstate json; you can get IModel associated with the variant now - using ModelLoaderRegistry.getModel; MultiLayerModel should now respect transformations applied to it, and respect part transformations. 2016-01-06 22:00:43 +03:00
cpw
632d8e553d STFU I know how to code. *shouts* get off my lawn! 2016-01-04 16:18:44 -05:00
cpw
035dd4c245 Make the parent dir tree for the dep extractor 2016-01-04 09:07:28 -05:00
RainWarrior
4732acc1c4 Java6 + Eclipse + Gradle strike again. 2016-01-04 15:18:36 +03:00
RainWarrior
b8dd4c54e1 Fixed implementation if IRetexturableModel in ItemLayerModel. Closes #2244. 2016-01-04 14:21:31 +03:00
RainWarrior
f562579054 Don't crash on exception during loading of item variants from blockstate jsons. 2016-01-04 14:08:52 +03:00
RainWarrior
856a9c3cdd Fixed perspective transformation handling for fluid models, changed inventory fluid model to use unrotated still texture. 2016-01-04 13:54:45 +03:00
RainWarrior
826b1d20f8 Fixed invalid flow vector caching of still fluids. 2016-01-04 12:48:10 +03:00
RainWarrior
686b32bfd0 Fixed random offset not working properly for flatly-lit models. 2016-01-04 12:04:30 +03:00
cpw
3c08c104cc Explicitly close the file. 2016-01-03 10:06:25 -05:00
cpw
dc4dc55dcd Add a simple ContainedDep mechanic- mods can contain other mods or libs, and can specify them using a manifest tag: "ContainedDeps".
This is a space separated (manifest standard) list of jar files that are to be extracted into the version specific directory.

There's also a special system property "fml.skipContainedDeps" that will allow for runtime skipping of extraction of contained deps (a comma separated list, based on the file name).
2016-01-02 17:28:35 -05:00
LexManos
1a31ff9f06 Added new get/setRegistryName functions to Item and Block.
And helper functions in GameRegistry to allow for registering using those names automatically.
This is to simplify registration and get rid of the horrible hacks users are doing now with 'unlocalised names'.
2016-01-02 12:58:57 -08:00
cpw
fb54ea94c0 Move substitution activation after id loading. This should fix the problem of null for existing object. 2016-01-02 12:06:53 -05:00
RainWarrior
d105c444ee SidedProxy now has sensible default values - nested ClientProxy and ServerProxy classes. 2016-01-02 09:59:14 +03:00
RainWarrior
104feb2973 Reverted Render registration changes due to them working. 2016-01-01 08:51:56 +03:00
RainWarrior
a4123580b1 Nobody is left behind. 2016-01-01 02:17:10 +03:00