Commit Graph

83 Commits

Author SHA1 Message Date
Ben Staddon 059605e352 Quick fix for another ItemStack null check (#3426) 2016-11-27 01:49:06 -08:00
mezz c22382d12e Fix using the wrong Pair implementation (#3449) 2016-11-24 20:15:32 -08:00
mezz 969a75154f Fix #3432 Hopper and Dropper item moving does not exactly match vanilla (#3442) 2016-11-23 12:45:07 -08:00
LexManos f12a4b5c1e Fix Item transfers related to Hoppers. 2016-11-18 14:42:22 -08:00
Shadowfacts 9cf74914e7 Initial annotations/nullability changes (#3392) 2016-11-18 13:24:03 -08:00
mezz eb6b3ea228 Implement fluid item capabilities without item swapping 2016-11-16 16:17:21 -08:00
LexManos 42a7036393 Fix ItemStackHandler's constructor ignoring size. Closes #3386 2016-11-16 16:06:52 -08:00
cpw 4e6a774075 Initial 1.11-pre1 update 2016-11-13 17:09:55 -05:00
Draco18s dc871ea273 Made default slot implementation respect inventory stack size limit. 2016-11-01 13:41:14 -07:00
RWTema a1bbcf8a0b Improve the default isItemValid() and getItemStackLimit() implementations in SlotItemHandler. You can now properly swap the player's held itemstack with the slot's itemstack. (#3273) 2016-10-24 12:44:56 -07:00
LexManos 3e6099055e Fix hopper extract behavior being broken on edge cases due to IItemHandler capability. Closes #3062 2016-07-03 13:45:26 -07: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
Matti Ruohonen 13ed510fcf Add a Slot#isSameInventory() method (#2884)
This fixes shift + double clicking items in Containers that use
SlotItemHandler slots.
2016-06-03 17:26:51 -07:00
LexManos cdc86e9af6 Update mappoings snapshot to 20160518 2016-05-18 05:23:30 -07:00
boni 8fdd76bae1 Fix SidedInvWrapper accessing wrong slots for setStackInSlot. (#2797)
Fix DoubleChestItemHandler not implementing IItemHandlerModifiable
2016-05-02 12:19:54 -07:00
Katrina Swales 8d50c9e988 Corrected CapabilityItemHandler.readNBT ignoring anything in slot 0 in 1.9 2016-04-06 01:43:23 +01:00
LexManos ce4bb8fe93 Fix improper logic in ItemHandlerHelper.giveItemToPlayer causing some items to not be added. Closes #2705 2016-04-04 15:44:03 -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
Vincent Lee dabb17f869 Update according to suggestions 2016-03-21 20:31:33 -05:00
Vincent Lee 30db41be9a Expose IItemHandler on vanilla entities 2016-03-21 09:24:36 -05:00
cpw ce8a758667 Merge branch 'master' into 1.9 2016-03-19 21:19:19 -04: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
Bernhard Bonigl bcab92daf6 Fix CombinedInvWrapper accessing incorrect slots
Closes #2533
2016-03-12 22:17:57 +01:00
LexManos 7b7156e87f Interaction hooks need to be re-added but compiles {Doesn't run} 2016-03-09 14:11:56 -08:00
LexManos 206a21d563 Fixed errrors in Fluids package. TODO: Make BlockLiquid implement IFluidBlock and REMOVE FluidContainerRegsitry. Everything *should* be able to use IFluidContainer directly. 2016-03-06 16:54:47 -08:00
LexManos ac7c4d2f6c Some import renames and compile error fixes, killed ~800. 2016-03-01 04:58:03 -08:00
LexManos f654157adb net.minecraft.block.* patches 2016-03-01 00:31:58 -08:00
Bernhard Bonigl 1055206ba8 Add universal bucket 2016-02-16 00:49:01 +01:00
RainWarrior e611162de5 Fix droppers not dropping. 2016-02-03 19:11:33 +03:00
RainWarrior be6c2bd588 Fixed small bug in item extraction code. 2016-01-27 13:29:07 +03:00
LexManos 01919e4eed Fix J6 compile error in IItemHandler PR. 2016-01-23 22:52:32 -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