Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

NoVaGaming

Members
  • Joined

  • Last visited

Everything posted by NoVaGaming

  1. if (container.getTagCompound() == null) { container.setTagCompound(new NBTTagCompound ()); } i see now
  2. Please Just get me through this little thing that im doing rn and then i will go watch the entire siries you gave me
  3. Because thats what the rest of the API Uses
  4. Thats what i learned during the video but when i put it to use i get it wrong. if (container.getTagCompound() == null) { container.setTegCompound(nbt) new NBTTagCompound(); } What am i doing wrong
  5. http://docs.oracle.com/javaee/6/tutorial/doc/gjbbp.html http://stackoverflow.com/questions/2036970/how-do-getters-and-setters-work
  6. if (container.getTagCompound() == null) { container.setTegCompound(nbt) new NBTTagCompound(); } Ive watched 3 tutorials and could not figure it out
  7. if (container.getTagCompound() == null) { container.setTagCompound(nbt) new NBTTagCompound(); }
  8. I do understand im just not getting the way your saying it What Line Is the = wrong Line One Or 2 And How many = does it need?
  9. if (container.getTagCompound() == null) { container.setTagCompound(nbt) = new NBTTagCompound(); } So Set Goes on first or second line. ?
  10. Ok so what i got from that i i need to put the arument into my method but when i put this is does not want to work if (container.setTagCompound(nbt) == null) { container.getTagCompound() = new NBTTagCompound(); }
  11. So with the set method ive tried both of those and it wont work
  12. /** * Assigns a NBTTagCompound to the ItemStack, minecraft validates that only non-stackable items can have it. */ public void setTagCompound(NBTTagCompound nbt) { this.stackTagCompound = nbt; } Thats what i found and i see the string and value but do not understand how to use them in the set mothod.
  13. if (container.setTagCompound() == null) { container.getTagCompound()) = new NBTTagCompound(); } Dude im so sorry if im wasting your time. I think i might just try figuring this stuff out by myself after this questions but is this right If not i think i might go slit my wrist and put it in bleach and then call myself an idiot 60000 times
  14. if (container.setTagCompound() == null) { container.setTagCompound() = new NBTTagCompound(); The method setTagCompound(NBTTagCompound) in the type ItemStack is not applicable for the arguments ()
  15. Haha FML i cant belive i didnt relize that I think i might be the dumbest person on this planet
  16. Not Much Im Learning
  17. Even if i do that i get errors saying setTagCompound cannot be resolved or is not a field Or getTagCompound cannot be resolved or is not a field
  18. if you see the code with the stackTagCompound what do i do with that i dont know where to put set and get
  19. @Override public NBTTagCompound writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); return storage.NBTTagCompound (nbt); } Thats right correct?
  20. Ok so i set everything else but i tryied fixing these 2 and i cant figure it our i didnt want to bother u guys again package cofh.api.energy; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; /** * Reference implementation of {@link IEnergyContainerItem}. Use/extend this or implement your own. * * @author King Lemming * */ public class ItemEnergyContainer extends Item implements IEnergyContainerItem { protected int capacity; protected int maxReceive; protected int maxExtract; public ItemEnergyContainer() { } public ItemEnergyContainer(int capacity) { this(capacity, capacity, capacity); } public ItemEnergyContainer(int capacity, int maxTransfer) { this(capacity, maxTransfer, maxTransfer); } public ItemEnergyContainer(int capacity, int maxReceive, int maxExtract) { this.capacity = capacity; this.maxReceive = maxReceive; this.maxExtract = maxExtract; } public ItemEnergyContainer setCapacity(int capacity) { this.capacity = capacity; return this; } public void setMaxTransfer(int maxTransfer) { setMaxReceive(maxTransfer); setMaxExtract(maxTransfer); } public void setMaxReceive(int maxReceive) { this.maxReceive = maxReceive; } public void setMaxExtract(int maxExtract) { this.maxExtract = maxExtract; } /* IEnergyContainerItem */ @Override public int receiveEnergy(ItemStack container, int maxReceive, boolean simulate) { if (container.stackTagCompound == null) { container.stackTagCompound = new NBTTagCompound(); } int energy = container.stackTagCompound.getInteger("Energy"); int energyReceived = Math.min(capacity - energy, Math.min(this.maxReceive, maxReceive)); if (!simulate) { energy += energyReceived; container.stackTagCompound.setInteger("Energy", energy); } return energyReceived; } @Override public int extractEnergy(ItemStack container, int maxExtract, boolean simulate) { if (container.stackTagCompound == null || !container.stackTagCompound.hasKey("Energy")) { return 0; } int energy = container.stackTagCompound.getInteger("Energy"); int energyExtracted = Math.min(energy, Math.min(this.maxExtract, maxExtract)); if (!simulate) { energy -= energyExtracted; container.stackTagCompound.setInteger("Energy", energy); } return energyExtracted; } @Override public int getEnergyStored(ItemStack container) { if (container.stackTagCompound == null || !container.stackTagCompound.hasKey("Energy")) { return 0; } return container.stackTagCompound.getInteger("Energy"); } @Override public int getMaxEnergyStored(ItemStack container) { return capacity; } } stackTagCompound Is the problem there and @Override public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); storage.writeToNBT(nbt); } Im getting an error at void and i have no idea why
  21. boolean canConnectEnergy(ForgeDirection from); ForgeDirection is most of the errors and stackTagCompound and @API(apiVersion = CoFHAPIProps.VERSION, owner = "CoFHLib", provides = "CoFHAPI") package cofh.api; import cpw.mods.fml.common.API;
  22. Alright ill try right now
  23. Yes but the problem is im not that good at coding and i do not know how im sorry i know i need basic java knowlage but i would not know how to update cofh any tutorials on it that i can follow im trying to learn and im just starting and im reaching out for help thank you
  24. Is there any other Energy API's Besides Tesla because i dont know how to make my own
  25. Heres the problem C:\Users\willa\Desktop\1.10 Modding>gradlew eclipse This mapping 'snapshot_20160518' was designed for MC 1.9.4! Use at your own peril. ################################################# ForgeGradle 2.2-SNAPSHOT-c438b06 https://github.com/MinecraftForge/ForgeGradle ################################################# Powered by MCP unknown http://modcoderpack.com by: Searge, ProfMobius, Fesh0r, R4wk, ZeuX, IngisKahn, bspkrs ################################################# :deobfCompileDummyTask :deobfProvidedDummyTask :eclipseClasspath :eclipseJdt :eclipseProject :getVersionJson :extractNatives SKIPPED :extractUserdev Download http://files.minecraftforge.net/maven/net/minecraftforge/forge/1.10.2-12.18.1.2066/forge-1.10.2-12.18.1.2066.pom Download http://files.minecraftforge.net/maven/net/minecraftforge/forge/1.10.2-12.18.1.2066/forge-1.10.2-12.18.1.2066-userdev.jar :getAssetIndex UP-TO-DATE :getAssets Current status: 39/1112 3% Current status: 79/1112 7% Current status: 130/1112 11% Current status: 196/1112 17% Current status: 245/1112 22% Current status: 313/1112 28% Current status: 388/1112 34% Current status: 487/1112 43% Current status: 559/1112 50% Current status: 617/1112 55% Current status: 698/1112 62% Current status: 824/1112 74% Current status: 896/1112 80% Current status: 967/1112 86% Current status: 1037/1112 93% Current status: 1101/1112 99% :makeStart FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':makeStart'. > Compile failed; see the compiler error output for details. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED Total time: 2 mins 27.475 secs

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.