Jump to content

Animefan8888

Forge Modder
  • Posts

    6157
  • Joined

  • Last visited

  • Days Won

    59

Everything posted by Animefan8888

  1. Yes if you want just the output return something like recipe.getOutput(). (Returns an ItemStack) If you want it to return the whole recipe you are fine, assuming your ItemUtil.areItemsEqual() method works.
  2. What I like to do is add them to a List in a base classes constructor. Then loop through it for registry and model binding. Check out episode 1 or 2 of my tutorials for an example.
  3. You pass it to the Wrapper and if the inputs are the same get the output that was passed into the constructor. IE what your third stack was.
  4. What are you referring to? Passing two ItemStacks into the constructor? Yes. His wrapper object currently also contains the output, which makes it hard to construct a search-object from two arbitrary inputs and locate the output. He is using a list of his wrapper, there would be no way for him to find the output from that.
  5. What are you referring to? Passing two ItemStacks into the constructor?
  6. No keep the ItemStacks add a new instance to your list, your list should ask for your wrapper.
  7. IBlockColor.colorMultiplier I feel like it will be mostly an instance of World, other than that you are screwed.
  8. It appears to me that it is only accessible from a World. I assume I am screwed then? Seems like it, what method passes an IBlockAccess that you are using?
  9. Yes you will have to create your own capability. The forge documentation is a little low, but there are examples out there Choonster has some example on his github. There is also this which helped me understand what I need for a capability specifically. https://github.com/Choonster?tab=repositories http://www.planetminecraft.com/blog/forge-tutorial-capability-system/
  10. You can check to see if it is an instance of World, or any other instance that you can get it from.
  11. Yes in the @Mod annotation serverSide = true. Thank you very much Animefan8888. Also. The mod I made has a set of translated messages in the assets folder. I noticed if I didn't reopen the client while in development, the messages didn't work well because it shows the "id" of the message. So that means that the translation happens in the client and the client is which has the language files. Is there a way to do the same but server side? I don't know if I should create another post for this question... No there is not another way to do this, as the server doesn't need to know the translations it is only server side, I suppose you could make a translator your self.
  12. I think you will want to create a new one and then in the methods you need to call the super if it doesn't match yours. IE @Override public ICapabilityProvider initCapabilities(ItemStack stack, NBTTagCompound nbt) { ICapabilityProvider superProvider = super.initCapabilities(stack, nbt); return new ICapabilityProvider() { @Override public boolean hasCapability(Capability<?> capability, EnumFacing facing) { return capability == yourCapability ? true : superProvider.hasCapability(capability, facing); } @Override public <T> T getCapability(Capability<T> capability, EnumFacing facing) { return capability == yourCapability ? yourCapability : superProvider.getCapability(capability, facing); } }; } I don't see how you could incorporate facing into an Item, but...ehh.
  13. how can i do that? player.fallDistance = 0; ? Two ways either Subscribe to the LivingFallEvent or litterally in your onArmorTick constantly set it to 0. All right ill take care of that in a bit, but running into a bit of a problem, when i charge up the jetpack in my inventory it also charges all the jetpacks in the world, how do i fix that? Make a ItemStack capability for energy items.
  14. how can i do that? player.fallDistance = 0; ? Two ways either Subscribe to the LivingFallEvent or litterally in your onArmorTick constantly set it to 0.
  15. nah that is good, but i would add an if else statement like if (player.motionY >= someVelocity) { // Do stuff } else { // Add velocity }
  16. Could you post code so I can see what you tried.
  17. player.addVelocity(0, 0.2/** Running speed 0.1 walking speed*/, 0); Also you may want to add a cap, y velocity.
  18. No x, y, z are different from velocity. Velocity is speed and direction, x, y, z are positions.
  19. Actually it would probably be better to detect when the button is pressed, then set a boolean to true and send a packet to make the boolean true on the server, this way you don't have the Player moved wrongly or some other alert message going in the server console. And then when it is released send a packet setting it to false and set it to false.
  20. You need to override TileEntity#getUpdatePacket(), TileEntity#getUpdateTag(), TileEntity#onDataPacket(), and TileEntity#handleUpdateTag(). And you should switch fromusing ISIdedInventory to the IItemHandler capability.
×
×
  • Create New...

Important Information

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