Xhamolk_
-
Posts
15 -
Joined
-
Last visited
Posts posted by Xhamolk_
-
-
Hmm... i'm looking at the changes on IInventory for MC 1.5... I'll have to update this framework accordingly.
-
I've been looking through mods that (like Buildcraft) can manipulate the inventories of the TileEntity's marked as IInventory.
It occurred to me that IInventory is simply a static (passive) inventory; this theory was then supported with the fact that vanilla uses IInventory for slot-based containers (GUIs).
But how come there is not an inventory variation designed for dynamic (active) TileEntitys? We can't just assume that all the IInventory implementations are basic chests. This feature is not available on vanilla, and neither through Forge.
In order to have active inventories, first there needs to be a standard manipulation model. As of now, every inventory-manipulator mod do it they way they want. Downside of this is that there is not even a guarantee that IInventory.onInventoryChanged() will be called.
For that matter, I've created a very small framework that offers the following features:
- A unified inventory-manipulation model.
- An easy way to insert/extract/count items in inventories. Basically does the dirty work for you.
- Get's rid of the paradigm that all inventories are slot-based, but still maintains backwards compatibility.
- Introduces the concept of dynamic inventory, which can decide on what types/amounts of items go in or out
- Opens the possibilities to create any kind of self-handled inventories, through the ICustomInventory interface.
This framework will allow mod-makers (inventory-implementations) to be more creative when creating new types of inventories. Some mods (like factorization) have figured a way to restrict what kinds of items can go inside... but that is not the best way to go.
The benefits for inventory manipulators are pretty much that they no longer need to do the heavy lifting.
The possibilities, really, are endless.
Unfortunately, even if this framework is accepted into forge, inventory-manipulators would require to take this model into account. (For testing purposes, I've patched Buildcraft and ThermalExpansion. It works like a charm).
Please consider the addition of this framework into forge. I'm open to feedback.
I believe the 1.5 update is a very good time to throw this in, as mods will need to update anyway.
---
The framework can be found at my GitHub repo: https://github.com/Xhamolk/InventoryAPI
For this matter, I have opened a Pull Request on Forge's repo. It can be found here: https://github.com/MinecraftForge/MinecraftForge/pull/435
- A unified inventory-manipulation model.
-
I'm just going to leave this link here.
A mod spotlight by GamingStylez on the 0.1.6 version of my mod.
[embed=500,349]
[/embed](so yeah, the videos is a bit outdated).
-
Never mind.. I realized it was referencing Minecraft.getInstance().theWorld, which is WorldClient...
-
I don't even know why that happens...
That's a crash report provided by one of the users of my mod, which is running on an dedicated server.
I checked the MCP mappings and found that ayh is WorldClient, which makes sense that it's not present on the server.
But... there's no explicit reference to class on my mod. Makes no sense to me why that's happening.
I tested it on my integrated server (single player) and never got that issue, it must be something on the multiplayer servers.
My mod is for 1.4.5, requires forge #401+
The source code is all here: https://github.com/Xhamolk/XACT/tree/master/xact
Please help me, because I don't know what else to do.
-
Mod updated to version 0.1.7.
Released 0.1.7 for MC 1.4.5 and Forge #401+
Get it from here.
Change log:
- Removed the encoder, because I didn't like it.
- Added the Chip Case: which stores up to 30 chips.
- Added the Craft Pad: can encode/clear chips. tier 1 xact crafter and portable crafting table.
- Ore Dictionary support (finally!)
Edit: updated the links, because it had a bug that would crash servers.. so yeah, re-download
- Removed the encoder, because I didn't like it.
-
Yeah... you where faster than me.
I'll test it. Forge #401+, right?
your link is wrong..
---
The mod works fine, though.
-
#1: It can be done but you need to make your own crafting table, because the default implementation ( ItemStack.onCrafting(World, EntityPlayer,int) ) doesn't pass the crafting grid.
#2: yeah, you only need to add a new IRecipe.
#3: Unfortunately, no. the methods on ItemStack are final. However, you can override getItemStackLimit() on your Item class, but it won't be ItemStack-sensitive
#4: sorry, never used that. can't tell.
-
I decided I won't do that backport for 1.3.2, as my mod benefits from the new feature on forge 6.x
-
I will do a backport for 1.3.2 maybe tomorrow.
Already have a 1.4.4 versions as well: v0.1.6-beta for 1.4.4
-
Updated to version beta-0.1.6.
Mostly bug fixes, but also improved the shift-clicking functionality.
Btw, if you guys like it, make sure to leave a comment.
-
Xhamolk_'s Advanced Crafting Table v0.1.6 (currently beta)
Since I am a lazy and absent-minded person, I created a mod that would ease myself from having to learn recipes for crafting stuff. So here it is:
XACT Features:
- Lets you craft items without you having to manually place the ingredients in the grid.
- Stores up to 4 recipes on each Crafter block.
- Medium sized Resources Buffer.
- Easy transportation of the stored recipes.
- The Crafter tells you if you have enough items to craft your items (green/red overlay)
- The Crafter tells you how many ingredients you are missing.
- Shift-clicking.
- The Encoder might also work as a vanilla crafting table.
Upcoming Features:
- Another use for the Recipe Chips
Mod Walkthrough
- Get yourself some Recipe Chips and a XACT Encoder.
- Open the Encoder's GUI.
- Put your items on the crafting table, just as you would on the vanilla Workbench.
- Put and pick the Recipe Chip on the green slot.
- Place a XACT Crafter
- Open the Crafter's GUI and put the Recipe Chip on any green slot.
- Supply the ingredients and you are ready to craft.
Note: you can reuse your encoded Recipe Chips. You only need to place them on the Encoder again.
Recipes:
Recipe Chip (shapeless)
Encoder
Crafter
---> Looking for Beta Testers <---
Please PM me if you are interested and have beta-tested before, or find me at irc.esper.net #mcp-modding.
Please report bugs at my GitHub.
Downloads
Keep in mind it's BETA. Therefore, there will be bugs. I'm releasing this so it can be tested.
Please don't do bug reports on this thread. I wan't to keep it as clean as possible.
Beta-0.1.7: Requires MC 1.4.5, Forge 6.4.1.401 or later.
Beta-0.1.6: Requires MC 1.4.2, Forge 6.0.1.355
Old versions:
Beta-0.1.5: Requires MC 1.4.2, Forge 6.0.1.355
Screenshots
Credits:
Special thanks to Asajev for creating the machine's textures.
- Lets you craft items without you having to manually place the ingredients in the grid.
-
Well, how are you changing it's metadata anyway?
I mean, right after you do that you can call
world.markBlockNeedsUpdate ( x, y, z);
that'd update the block's texture. This is for when the block has been placed into the world, tho.
Also:
if( metadata == 5 ) setBlockBounds(0.4f,0.0f,0.4f, 0.6f,0.9f,0.6f); else setBlockBounds(0f,0f,0f, 1f,1f,1f); // example
Bug: reobfuscation breaks overriding.
in Support & Bug Reports
Posted
My mod overrides drawSlotInventory(), from GuiContainer, in GuiCrafter (subclass of GuiContainer).
The method currently looks like this:
This is just for testing purposes. Of course that would imply that once the method is called, minecraft would crash.
The method works as intended in a deobfuscated environment (running from IntelliJ IDEA). However, after reobfuscating, it won't get called. In both cases, the same forge version is used (#602, but tested before with #592).
So most likely the problem has something to do with reobfuscation (in other words, after the @Override annotation is removed by the compiler). Btw, this worked fine in 1.4.7.