-
Posts
107 -
Joined
-
Last visited
Everything posted by Cleverpanda
-
[1.10.2] Render Item 2d in inventory, 3d json model in hand?
Cleverpanda replied to Cleverpanda's topic in Modder Support
I'll go look up a guide -
Hello. I'm trying to render an item with a 2d sprite in the inventory and a 3d json model while in hand, on ground, etc. I think this is possible through the json system but either I can't figure out the tag structure, or it's not possible with the normal json system. Google/forums searches have not given me any results. Any help would be great, thanks
-
Nah. nothing else in ItemTool would be relevant
-
Solved! public boolean isItemEnchantable() { return !this.getItem().isItemTool(this) ? false : !this.isItemEnchanted(); } was false so I overrode isItemTool to be true. Not sure what adverse effects this may have, but it solves the issue
-
My item just extends Item and overrides getItemEnchantability
-
Could it be my enchantment constructor? super(Enchantment.Rarity.RARE, EnumEnchantmentType.ALL, new EntityEquipmentSlot[] {EntityEquipmentSlot.MAINHAND});
-
Yes I have, it returns 3
-
Neither functon is even being called when I put my item in there
-
It does; returns canApply(stack)
-
*Facepalm* wow, of course. and Any number that's larger should work, yeah? I just did 4. make the min 2 just to be sure. canApply(stack) is being called for other enchantable items (Pickaxe) but not for my item when I put it in the table
-
currently my item ovverrides getItemEnchantability() and returns 3. My enchantment is registered with GameRegistry.register(new DummyEnchantment()); in preInit and the enchantment class is http://pastebin.com/m1fXCkcm And nothing is showing up when I put the item in the enchantment table
-
Item#canApplyAtEnchantingTable doesn't seem to exist?
-
Hello. I'd like to have an item that as part of it's crafting process, needs to be put in the enchantment table and 30 levels applied to it. I can't find any resources or forge hooks that allow me to add an enchantable item or specify a single enchantment it's allowed to have. Can anyone help me on how I can accomplish this? thanks
-
[1.10/1.11] Damage vanilla item during crafting?
Cleverpanda replied to Cleverpanda's topic in Modder Support
Thanks! -
Hello. I'm trying to use shears as a tool in a mod recipe, but they are not being damaged when I craft the item. Doing a bit of research, it looks like I need to use an ShapedOreRecipe that implements IRecipe. Can anyone confirm? Also, I know basically I want to increase damage by 1 and then return the shears in the grid, but I can't find any code examples of how to accomplish this, like what goes in what method and what the minimum code I need is. Any help there would be great too. or an easier method. Thanks!
-
[1.10.2] Cannot remove items from custom GUI slot
Cleverpanda replied to Cleverpanda's topic in Modder Support
Bump. Still can't solve. -
[1.10.2] Cannot remove items from custom GUI slot
Cleverpanda replied to Cleverpanda's topic in Modder Support
unfortunately, it did not work. -
[1.10.2] Cannot remove items from custom GUI slot
Cleverpanda replied to Cleverpanda's topic in Modder Support
New debug info: shift clicking the item puts the result into my inventory correctly but only for a split second again. -
[1.10.2] Cannot remove items from custom GUI slot
Cleverpanda replied to Cleverpanda's topic in Modder Support
My output slot is an instance of the custom InventoryResult() whose class starts at line 273 in the container paste -
Agreed. Knowing what you can pull from vanilla code is very useful. But basically you're gonna have a block with states and say states 0-3 are 1 block tall, you're gonna check when you grow, that its the top block (bottom block with air above or top block) and then if its state 3, set the space above it to the block with state 4.
-
Hello. I've got a gui and container but I cannot remove an item from the output slot for more than a tick. My output slot is an instance of the custom InventoryResult() whose class starts at line 273 in the paste, and its added like this: this.addSlotToContainer(new Slot(this.outputSlot, 1, 138, 22)); Container: http://pastebin.com/xekn3Xix Gui: http://pastebin.com/cYxjktrh I just don't see any method that looks like its called when the item is removed and put into the player's cursor,which is where i'd expect the problem to be. I did put a print statement on slotClick() in my container to see what item is in the cursor and it returns null, but I assumed that gets called before the item is set because It does look like the item goes into the cursor. I've tried a couple searches, but none of those solutions apply. I've registered a guihandler. Can anyone help?
-
[1.10] SOLVED Remove apples from leaf drops?
Cleverpanda replied to Cleverpanda's topic in Modder Support
Because you told me to search the list manually and this is what I thought you meant? I've had formal classes in Java. I thought that get() returned an itemStack, but I had actually checked getDrops(), which does. I fixed that statement. -
[1.10] SOLVED Remove apples from leaf drops?
Cleverpanda replied to Cleverpanda's topic in Modder Support
if(event.getDrops().contains(new ItemStack(Items.APPLE))) { int s = event.getDrops().size(); for(int i=0;i<s;i++) { if(event.getDrops().get(i) == new ItemStack(Items.APPLE)) { event.getDrops().remove(i); } } } Why does this not work? -
[1.10] SOLVED Remove apples from leaf drops?
Cleverpanda replied to Cleverpanda's topic in Modder Support
So adding event.getDrops().remove(new ItemStack(Items.APPLE)); to my event handler that looks for leaf blocks should work fine? -
Hello. I need a way to remove apples from vanilla tree drops because I have added an apple tree and want it to be the only natural source of apples. However, apples are not added to the list in getDrops() and use spawnEntityInorld() directly so it doesn't seem that I can remove it with a simple harvest event. Does anyone know what I need to do?