Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

shadowfacts

Forge Modder
  • Posts

    588
  • Joined

  • Last visited

Everything posted by shadowfacts

  1. Yes, exactly what diesieben07 said. When your block breaks, you need to add NBT to the dropped ItemStack based on the value stored in the tile entity. You can then access those values from the addInformation method.
  2. So the ItemBlock has three different metadata values? In the addInformation method, just switch on stack.getMetadata() and add a different string to the list depending on the value.
  3. As I said before items and item blocks in inventories don't have tile entities. You can use NBT data to store arbitrary data in a tile entity.
  4. No, not at all. If your computer has 8GB, or more, of memory, you'll almost certainly be fine with allocating 4GB for Minecraft. That would leave the operating system and other running programs with 4GB, which is fine for most stuff. There is no one universal value for memory allocation that applies to everybody, because everybody has different computers with varying amounts of memory. My computer as 16GB of RAM, so I can afford to allocate 4GB of memory to Minecraft and have many other programs running simultaneously. If OP's had only 4GB of RAM, they wouldn't be able to allocate all 4GB to Minecraft, because that would leave the operating system with none. If, however, they had 8 or more, they'd be fine with allocating 4 to MC.
  5. Well if you were to use EU, you'd have to modify the FE value to match the FE to EU ratio. Both Mekanism and AE2 use their own internal energy systems and have a way of configuring what unit the energy is displayed to the user as.
  6. I'm not sure what you mean. Blocks in the world don't have tooltips (at least in vanilla) and item stacks in an inventory don't have tile entities.
  7. What are your computer's specs? If possible, you may want to increase your memory allocation to 4GB since you have so many blocks (and therefore models).
  8. The ratio of Forge Energy to RF to Tesla is 1:1:1 so you can use any name you like for the number. One thing that several mods do is have a client-side config setting which determines which unit is used to display energy.
  9. Uhm, no. If you want to use a Maven classifier for your dependency, you need to add a local repository: repositories { flatDir { dirs "libs" } } dependencies { compile "ru.ivansteklow.isdev:1.0.0:dev" } Then Gradle will look for the isdev-1.0.0-dev.jar file in your libs folder. Also, using compile files("isdev-src.jar") should work, as long as your jar is named isdev-src.jar and not anything else.
  10. Well of course there's a ConcurrentModificationException, you're trying to remove something from a list you're currently iterating over. You can manually use the list's Iterator so you have access to the Iterator.remove function: Iterator<TileEntity> iterator = energyUsers.iterator(); while (iterator.hasNext()) { TileEntity te = iterator.next(); if (te != null && world.getTileEntity(te.getPos()) == null) { iterator.remove(); } } Additionally, you shouldn't need that te != null check and you probably shouldn't be storing null in your list. Also you could probably use TileEntity.isInvalid instead of the weird null-check stuff you're currently doing.
  11. Show your model. You're probably only adding a quad for one side. Quads are only rendered from one side, from the opposite side they'll be invisible, so if you want your block to have the same texture on both sides, you'll need to quads.
  12. Of course it doesn't work. In writeToNBT, you store the NBTTagCompound created by this.container.serializeNBT() in the root TileEntity tag but in the readFromNBT method, you try to deserialize it from the root tag instead of the sub tag. You need to change the line in readFromNBT to: this.container.deserializeNBT(compound.getCompoundTag("StoredJAE"));
  13. bsprks' server is currently down, so building mods won't work because ForgeGradle is trying to connect to the server to get mapping information.
  14. Well you've got the World and the BlockPos so just use World.getBlockState....
  15. If you know the X coordinate, Y coordinate, width, and height of your GUI element, it's a simple matter of a couple less than/greater than checks. You need to check that: mouse X >= element X mouse Y >= element Y mouse X <= element X + element Width mouse Y <= element Y + element Height
  16. You definitely did not get an ISBRH working in 1.10.2 seeing as that interface doesn't even exist anymore, let alone the hooks necessary to make it work.
  17. No, you don't need to start over from scratch. Just change the Minecraft version, Forge version, and mappings versions in your build.gradle file and re-run the gradlew setupDecompWorkspace eclipse command.
  18. FYI, the "Fluid Tank units" are milliBuckets (thousandths of a bucket) or mB.
  19. In your build.gradle file, you should change the mappings version to the latest. MCP mappings snapshots are published daily with the form of snapshot_YYYYMMDD, so today's would be snapshot_20161202.
  20. If you own the getResult method, you can change it yourself to return an ItemStack[] or a List<ItemStack> and update the usages of the method accordingly.
  21. Why on earth do you want to modify a JDK class?!?! That's a terrible, terrible idea.
  22. Many mods are open source, and you can search their names on GitHub to find the repositories. The repo for Psi is https://github.com/vazkii/psi/. You'll want to find the main mod class (typically named the same thing as the mod itself) and follow the code from there.
  23. ResourceLocation is used incredibly frequently in Minecraft/Forge/mods, it's used all over the place as a general mod ID + name identifier. If you can't look at the code for the class itself and the contexts in which it's used and understand it, you should probably spend some more time learning Java.
  24. Why on earth are you using id++ as your mod ID?!? Do you know what a ResourceLocation is? The first parameter should be your mod ID and the second parameter should be the name of your entity, which can be the same as the String you're passing to register for simplicity's sake.
  25. If you have a PacketBuffer instance, you can use PacketBuffer.writeCompoundTag and PacketBuffer.readCompoundTag, otherwise if you just have a ByteBuf you can use ByteBufUtils.writeTag and ByteBufUtils.readTag.
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.