Jump to content

RealTheUnderTaker11

Members
  • Posts

    66
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • URL
    https://github.com/TheUnderTaker11
  • Personal Text
    I am the real one, sadly.

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

RealTheUnderTaker11's Achievements

Stone Miner

Stone Miner (3/8)

0

Reputation

  1. Sorry to take so long to reply (been pretty busy), but all that seems like more trouble than it's worth, and I found this handy helper class that lets me register them almost exactly as I was. I might change it later but for right now it doesn't seem worth it.
  2. I have a magnet mod that has a Boolean in the config to change the recipes for every magnet in the mod (so there can be easy mode recipes or normal recipes). Before 1.12, this was easy. How would I now be able to give the player a config option to change the recipes of each item? Sorry if this has been asked or explained before, it's hard to find good information on this new JSON recipe system.
  3. I don't know why you would want to extend it, but by default BlockContainer has this method. public EnumBlockRenderType getRenderType(IBlockState state) { return EnumBlockRenderType.INVISIBLE; } Which does just about what it looks like. Just override that.
  4. I had this problem as well first time I tried, just don't extend block container. You don't say what version you are on, but you can either implement ITileEntityProvider or in your constructor set isBlockContainer to true, then override the createTileEntity() and hasTileEntity() methods in your block class.
  5. The three classes directly relating to the block ModelBlockBase I have a pedestal I am using to render whatever item is stored inside of it, and it works fine when I right click the block and put the item in. But as soon as I exit the world and come back, it won't render until I pull the item out and put it back in again. I traced it to the fact that the TESR thinks the ItemStack is null until I pull it out and put it back in manually. (The isItemStackEmpty() is just my own method that does a null check to make updating to 1.11 easier.) I have tried getting the capability from the tile entity which didn't help.Then I tried using the onLoad() method to remove and put back in the ItemStack inside, but that only crashed the game. Lastly I tried using the update() method to do the same thing as the onLoad(), and that did nothing at all. What can I change to make it so they TESR/client doesn't think the pedestal is empty every time the world loads?
  6. How would I get the stack the player has picked up with his mouse in an inventory and remove it?
  7. Alright, now how would I somehow detect that that FOV change was caused by my modifier? All I see is old FOV, new FOV, and the EntityPlayer. Should I somehow add some info to the player that I can remove right away with that event or what?
  8. I was going to use attribute modifiers in hopes it would do better than speed potions in changing a players speed, but I found out that it also changes the FOV of the player. How would I go about changing the players speed without changing his FOV?
  9. Thank you, I made a the result equal a copy of the getSmeltingResultForItem and it worked perfect.
  10. So I'm trying to make a furnace, and I got everything set up but I'm having one problem, when I try and smelt items, I put some cobblestone/raw porkchop in and the smelting result is 1 item, 4 items, 16 items, 32 items, then 64 items. (Instead of 1 item, 2 items, 3 items, 4 items, etc. as it should be.) So that makes it when you put 5 items in it smelts them all into a stack of whatever the result is. Another problem is a lot of times if I try and pull it out before it is a full stack, the items will disappear. Last problem is after it smelts the first stack(Or I pull items out early) it won't put ANY more items into the result slot, it just uses up the input without putting anything into the output. Now I have narrowed it down to this one function I have. public static ItemStack getSmeltingResultForItem(ItemStack stack) { else return FurnaceRecipes.instance().getSmeltingResult(stack); } That is returning the crazy doubling numbers I'm seeing. Even more so, when I replace the above code with this. public static ItemStack getSmeltingResultForItem(ItemStack stack) { if(stack.getItem()==Item.getItemFromBlock(Blocks.COBBLESTONE)) { return new ItemStack(Item.getItemFromBlock(Blocks.STONE), 1); } else return FurnaceRecipes.instance().getSmeltingResult(stack); } It works perfect for cobblestone, but then has the same problem with raw pork-chop or anything else I put in. For a better view of my code I will put all related classes in KSTileEntityBlessedFurnace TileEntityContainerBase ContainerBlessedFurnace BlockBlessedFurnace I wouldn't think you would need all this code to figure out the problem, but just in case I put it all there. (It also has a gui I just didn't put that here)
  11. Then you should of asked that in the first place, I used this to make a capability handler for players/Entity's. It should be something very similar for ItemStacks. I don't know how it will work for ItemHandlers though since those are already a thing in forge EDIT: Yea what Draco said too.
  12. The ItemStack is what has the hasCapability, and I have never set up an item that holds inventory, but since they don't have sides I wouldn't think you would need to override the hasCapability and getCapability. Have you tried setting up the capability handler and seeing what happens? Like I said I've never tested it before though. I could be completely wrong about this.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.