-
Posts
6157 -
Joined
-
Last visited
-
Days Won
59
Everything posted by Animefan8888
-
You also need to override another method that has a similar name to sendProgressBarUpdate.
-
You need to sync it to the client, if it can be converted to a number then look at ContainerFurnace. Other wise you need to use packets.
-
[SOLVED] [1.10.2] Rendering the inside of a block
Animefan8888 replied to Tschipp's topic in Modder Support
You override getActualState in your Block class. This will return the default state with 6 values; boolean values. Each one will represent if there is a block that is not air. If there is a block that is not air it will add to the model using forges submodel system. Meaning you will use a forge style BlockState. You will also have to override getMetaFromState, getStateFromMeta, createBlockState. What do you mean? I know Blockstates would probably be better but I find it a pain setting up the blockstates and all... I think I found it! I just had to set a cullface for the elements! But now the planes of the block below and my block are z-fighting (I think that's the right word). How do I fix that? You will have to make one face slightly closer to the middle of the block or slightly farther from the block. -
[SOLVED] [1.10.2] Rendering the inside of a block
Animefan8888 replied to Tschipp's topic in Modder Support
There would be a way... "north": { "texture": "#all", "uv": [ 0.0, 0.0, 0.0, 16.0 ] }, You specify the face in the model. But the BlockState part is definitely the correct way to go. -
You need a container for the players inventory.
-
[SOLVED] [1.10.2] Rendering the inside of a block
Animefan8888 replied to Tschipp's topic in Modder Support
How did you do it before? -
[SOLVED] [1.10.2] Rendering the inside of a block
Animefan8888 replied to Tschipp's topic in Modder Support
You need to edit your model and add planes for the inside. -
[1.10.2] {Solved} Preventing putting an item in itself
Animefan8888 replied to EscapeMC's topic in Modder Support
To use the instanceof check do stack.getItem() instanceof bagClassName -
[1.10.2] {Solved} Preventing putting an item in itself
Animefan8888 replied to EscapeMC's topic in Modder Support
What can/should/do I use here then? (I was just experimenting with instanceof and no good, so that's why I ask) How did you use instanceof and you could also use stack.getItem() != bagItemField. -
[1.10.2] {Solved} Preventing putting an item in itself
Animefan8888 replied to EscapeMC's topic in Modder Support
Just in case he wants to make more Bags than just one. This way you can't put any bag inside a bag. -
[1.10.2] {Solved} Preventing putting an item in itself
Animefan8888 replied to EscapeMC's topic in Modder Support
Ok just asking, you know what an ItemStack is, right? And do you know what an instanceof check is? -
[1.10.2] {Solved} Preventing putting an item in itself
Animefan8888 replied to EscapeMC's topic in Modder Support
What would I be overriding here? canTakeStack? or what else? EDIT: NEVERMIND I found isItemValid. Now, how do I say "test_bag is a no-no"? if(__ = test_bag) return false? Quick question, how much Java do you know, how much Minecraft/Forge do you know? -
[1.11.2] [SOLVED] Destroy Item after right click
Animefan8888 replied to Bektor's topic in Modder Support
I'm not quite sure, but maybe return new ActionResult(EnumActionResult.PASS, ItemStack.EMPTY); If not then you need to set the players current hand to ItemStack.EMPTY during the process. Also for the boolean you need to save it to the stack and not store it in the Item class. -
[1.10.2 | 1.11.2] [SOLVED] Energy Capability
Animefan8888 replied to Bektor's topic in Modder Support
You dont read and write it in your TE. -
[1.10.2 | 1.11.2] [SOLVED] Energy Capability
Animefan8888 replied to Bektor's topic in Modder Support
You do not need to do anything capability related. Well, the Forge energy system stuff uses capabilities, so I want to use them, too. I'm just wondering when I'm creating my own EnergyStorage class which is actually a slightly modified version (so it's using IEnergyStorage, but offers also more methods) of EnergyStorage (but does not extend it, it implements the same interface however), if I have to create in that case a new capability and a new interface or not........... If you are using the forge capability system and that Capability is already registered you do not need to do any capability registering stuff. You can create new implementations whenever you want and use them as long as it ultimately implements IEnergyStorage. -
[1.10.2 | 1.11.2] [SOLVED] Energy Capability
Animefan8888 replied to Bektor's topic in Modder Support
You do not need to do anything capability related. -
[1.10.2] {Solved!!!} Right-Click Item for Chest-like GUI
Animefan8888 replied to EscapeMC's topic in Modder Support
NBTTagCompound NBTBase = new NBTTagCompound(); And @Override public ICapabilityProvider initCapabilities(ItemStack stack, NBTTagCompound nbt) { return new CustomCapabilityProvider... } Please use your IDE. -
[1.10.2] {Solved!!!} Right-Click Item for Chest-like GUI
Animefan8888 replied to EscapeMC's topic in Modder Support
Global is a field created in the class, while local field is a field created in {} which can only be used inside of those "{}". public void initCapabilities() { } Not the correct method; we told you to override the method called initCapabilities. -
[1.10.2] {Solved!!!} Right-Click Item for Chest-like GUI
Animefan8888 replied to EscapeMC's topic in Modder Support
Alright, so I do that, but it says I then need to add unimplemented methods, and that method is the same thing. serialize nbt. I added @Override, but it then says remove it. I updated github: https://github.com/EscapeMC/ThingsMod-1.10.2 Remove the parameter in serializeNBT and create a local field of NBTBase and use that one and set it equal to a new NBTTagCompound. Ok, it took some figuring out, (and some sleep) but I think I've got the NBT part of this: https://github.com/EscapeMC/ThingsMod-1.10.2/blob/master/src/main/java/com/github/escapemc/thingsmod/items/TestBagCapabilities.java#L35 Then also, on that link, look up slightly. Would that be correct for both the hasCapability and getCapability? getCapability and hasCapability are indeed correct, but your serializeNBT is not you need a local field not a global field for your NBTBase. -
[1.11] Is it possible to change the font size of a string?
Animefan8888 replied to Kander16's topic in Modder Support
GlStateManager.scale(x, y, z); -
[1.10.2] {Solved!!!} Right-Click Item for Chest-like GUI
Animefan8888 replied to EscapeMC's topic in Modder Support
Alright, so I do that, but it says I then need to add unimplemented methods, and that method is the same thing. serialize nbt. I added @Override, but it then says remove it. I updated github: https://github.com/EscapeMC/ThingsMod-1.10.2 Remove the parameter in serializeNBT and create a local field of NBTBase and use that one and set it equal to a new NBTTagCompound. -
[1.10.2] {Solved!!!} Right-Click Item for Chest-like GUI
Animefan8888 replied to EscapeMC's topic in Modder Support
Not quite you need to do ((NBTTagCompound)nbt).setTag("inputSlot", inputSlot.serialize()); -
[1.10.2] {Solved!!!} Right-Click Item for Chest-like GUI
Animefan8888 replied to EscapeMC's topic in Modder Support
No your serialize needs to write to the NBTBase not read from it. -
[1.10.2] {Solved!!!} Right-Click Item for Chest-like GUI
Animefan8888 replied to EscapeMC's topic in Modder Support
Yes. Deserialize and Serialize are your read and write. So you load and save your ItemStackHandler with those. The hasCapability you had before works. The getCapability needs to check if the capability parameter is CapabilityItemHandler.ITEM_HANDLER_CAPABILITY and then return your ItemStackHandler. -
[1.10.2] {Solved!!!} Right-Click Item for Chest-like GUI
Animefan8888 replied to EscapeMC's topic in Modder Support
Remove public NBTTagCompound serializeNBT(NBTBase nbt) { super.serializeNBT(); compound.setTag("inputSlot", inputSlot.serializeNBT()); return compound; } @Override public void deserializeNBT(NBTBase nbt) { inputSlot.deserializeNBT(nbt.getCompoundTag("inputSlot")); } From your item_bag. Move protected ItemStackHandler inputSlot; from your item_bag to your TestBagCapabilities