Jump to content

shadowfacts

Forge Modder
  • Posts

    588
  • Joined

  • Last visited

Everything posted by shadowfacts

  1. 1. Use Swing. 2. Why would you want to do this? 3. It would be better just to print something to console, as it doesn't interrupt the user.
  2. Check out diesieben07's tutorial on packets.
  3. 1. Yes, world generators need to implement IWorldGenerator. 2. Check out this tutorial on world generation. 3. This is the world generator I made.
  4. You don't need the leading /
  5. Do you have your resources folder in the right place? It should be in src/main/resources
  6. 1. Why would you want to do this? 2. As far as I know this cannot be done in the normal Minecraft creative menu. 3. Best way to do this would be to have a custom GUI that is opened when a (that's in creative mode) runs a command, e.g. /primevalforest creative 4. Custom GUIs in 1.7.2/1.7.10: http://www.minecraftforge.net/wiki/Basic_GUI
  7. Go here: http://files.minecraftforge.net/ and download the newest version of Forge for the version of Minecraft that you are using. Make sure to download the "Installer-Win" version, run it, and go through the instructions. Note: You may need to have administrator privileges, as the installer is an executable.
  8. You need to check if it's null. Also, instead of checking if the item is equal to Items.shears you should be checking if it is an instance of ItemShears, this way someone can use shears from other mods. You should also be using || (or) not && (and) because something can never be both shears and a sword.
  9. 1. You can use if (Loader.isModLoaded(modId)) {...} where modId is a string with the name of the mod. Inside of the if block you would have the code to add aspects to the block. 2. Inside of the if block you would have something like: Block modBlock = GameRegistry.findBlock(modId, blockName); Again where the modId is the id of the mod you want to load the block from, and blockName is the unlocalized name of the block you want to access. 3. To add the mod to your development environment just add it to eclipse/mods/ and FML will load it like normal (you may need to use a special dev/deobfuscated version of the mod).
  10. 1. Why do you have the grenade effect in a separate class? There is no reason to do this, just spawn the particle effects in the onImpact method of EntityGrenade. 2. Like Eternaldoom said, you need to set the position of the grenade effect entity (this doesn't matter if you've just removed EntityGrenadeEffect altogether)
  11. Draco18s, I no longer get the error in the console but the data is not being loaded. Update: Pushed the latest code to GitHub: http://github.com/shadowfacts/EnFusion/
  12. In my mod, EnFusion (http://github.com/shadowfacts/enfusion), I have a RF generating block which is a solar panel. For some unknown reason the data in my TileEntity won't get saved to NBT. Here's the TileEntitySolarPanel class: http://github.com/shadowfacts/EnFusion/blob/master/src/main/java/net/shadowfacts/enfusion/machine/generator/solar/TileEntitySolarPanel.java. Every time the addDataToNBT is called, Minecraft spews out this message to the log: [21:33:53] [server thread/ERROR] [FML]: A TileEntity type net.shadowfacts.enfusion.machine.generator.solar.TileEntitySolarPanel has throw an exception trying to write state. It will not persist. Report this to the mod author java.lang.RuntimeException: class net.shadowfacts.enfusion.machine.generator.solar.TileEntitySolarPanel is missing a mapping! This is a bug! at net.minecraft.tileentity.TileEntity.writeToNBT(TileEntity.java:96) ~[TileEntity.class:?] at net.shadowfacts.shadowcore.tileentity.BaseModTileEntity.writeToNBT(BaseModTileEntity.java:20) ~[baseModTileEntity.class:?] at net.minecraft.world.chunk.storage.AnvilChunkLoader.writeChunkToNBT(AnvilChunkLoader.java:395) [AnvilChunkLoader.class:?] at net.minecraft.world.chunk.storage.AnvilChunkLoader.saveChunk(AnvilChunkLoader.java:204) [AnvilChunkLoader.class:?] at net.minecraft.world.gen.ChunkProviderServer.safeSaveChunk(ChunkProviderServer.java:287) [ChunkProviderServer.class:?] at net.minecraft.world.gen.ChunkProviderServer.saveChunks(ChunkProviderServer.java:340) [ChunkProviderServer.class:?] at net.minecraft.world.WorldServer.saveAllChunks(WorldServer.java:862) [WorldServer.class:?] at net.minecraft.server.MinecraftServer.saveAllWorlds(MinecraftServer.java:370) [MinecraftServer.class:?] at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:113) [integratedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) [MinecraftServer$2.class:?] Note: My tile entity class extends a custom modified TileEntity which is here: https://github.com/shadowfacts/ShadowCore/blob/master/src/main/java/net/shadowfacts/shadowcore/tileentity/BaseModTileEntity.java. I'm not sure but I think the problem is when Minecraft tries to turn the name of my tile entity into a string at line 92 of the default TileEntity.java. If anyone knows what I'm doing wrong, help would be greatly appreciated . P.S. Feel free to submit a pull request on GitHub (http://github.com/shadowfacts/EnFusion/pulls).
×
×
  • Create New...

Important Information

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