-
Posts
6157 -
Joined
-
Last visited
-
Days Won
59
Everything posted by Animefan8888
-
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.
-
[1.11] is it possible to crate an item array?
Animefan8888 replied to Frost2779's topic in Modder Support
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. -
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.
-
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.
-
What are you referring to? Passing two ItemStacks into the constructor?
-
No keep the ItemStacks add a new instance to your list, your list should ask for your wrapper.
-
You created a wrapper for a reason.
-
[1.10.2] Get WorldSavedData from IBlockAccess
Animefan8888 replied to Selim_042's topic in Modder Support
IBlockColor.colorMultiplier I feel like it will be mostly an instance of World, other than that you are screwed. -
[1.10.2] Get WorldSavedData from IBlockAccess
Animefan8888 replied to Selim_042's topic in Modder Support
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? -
Add a new entry to your list.
-
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/
-
[1.10.2] Get WorldSavedData from IBlockAccess
Animefan8888 replied to Selim_042's topic in Modder Support
You can check to see if it is an instance of World, or any other instance that you can get it from. -
[1.10.2][Resolved] Server-side only mod
Animefan8888 replied to DorekoNeko's topic in Modder Support
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. -
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.
-
Post your whole class.
-
[1.10.2][Resolved] Server-side only mod
Animefan8888 replied to DorekoNeko's topic in Modder Support
Yes in the @Mod annotation serverSide = true. -
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.
-
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.
-
nah that is good, but i would add an if else statement like if (player.motionY >= someVelocity) { // Do stuff } else { // Add velocity }
-
Could you post code so I can see what you tried.
-
player.addVelocity(0, 0.2/** Running speed 0.1 walking speed*/, 0); Also you may want to add a cap, y velocity.
-
No x, y, z are different from velocity. Velocity is speed and direction, x, y, z are positions.
-
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.
-
[1.10.2] Rendering after a join of the world
Animefan8888 replied to grossik's topic in Modder Support
You need to override TileEntity#getUpdatePacket(), TileEntity#getUpdateTag(), TileEntity#onDataPacket(), and TileEntity#handleUpdateTag(). And you should switch fromusing ISIdedInventory to the IItemHandler capability. -
How do I create a mountable block (for a chair)?
Animefan8888 replied to Skullmassarce7's topic in Modder Support
You need a mountable entity that is invisible.