Jump to content

shieldbug1

Forge Modder
  • Posts

    404
  • Joined

  • Last visited

Everything posted by shieldbug1

  1. I'm afraid my magical error debugging and code viewing device is out of service for an indefinite amount of time. i.e. post your code, what you have tried to do to fix it, any errors you might be getting, etc.
  2. Why are you constructing an Object array? It's varargs for a reason... Other than that, you forgot to instantiate the ItemStack of the metadata 12 dye.
  3. Use GameData.getItemRegistry() and then get the name for the items and get the items back from names. The names are in the form of modid:unlocalisedName
  4. I think you just have to extend EntityFX and probably override a few methods. Take a look around that class, see if you find anything.
  5. If you're asking how the bukkit scheduler work - I have never used bukkit, but I'd assume it would wrap everything in an instance of Callable which would then get wrapped as a ListenableFuture, added to a queue, and ran at the start of every tick if a tick counter reached 0. Same thing that happens in the Minecraft class pretty much, except with the tick counter. Of course, that's pure speculation.
  6. Alright, thanks (as always )
  7. I was just wondering about where different data structures could be created, etc. For the most part, I create all my data structures during the INITALIZATION and POST-INITIALIZATION states, but I recently found the other hooks and wondered if there were any others that might end up being useful sometime in the future.
  8. I'm just wondering, what entry points does Forge offer for mods, and in what order are they called? I know already of IFMLLoadingPlugin, IFMLCallHook, and of course, the normal @Mod annotation with the FML life-cycle events. Are there any that I'm missing?
  9. The actual downloading of libraries can be done through the build.gradle file, but if you need the library to be installed for your mod as a hard dependency then you're going to need to repackage it somehow.
  10. World#isRemote is equivalent to checking whether you are on the logical client side.
  11. Override Block#getLightValue and safely cast the block access to World. Then you can try using World#isDaytime to return a different light value. If that doesn't work, try World#getWorldTime - it has a value between 0 and 23,999 in ticks.
  12. Just square the difference between the x, y and z coordinates than square root it. This is plain geometry.
  13. You shouldn't have to use any arguments, use the GradleStart class. What version of forge are you running?
  14. What do you mean "it doesn't work"? What do you expect to happen? What happens instead?
  15. Entity#motionX , Entity#motionY , Entity#motionZ .
  16. World#getWorldTime() or something like that returns a number between 0 and 23999 of the current world time in ticks (there are 20 ticks/minute, and 20 minutes per Minecraft day/night cycle).
  17. Seriously? At the top of the website on the right, the big letters that say 'EAQ'.
  18. This is basic java. Look at the set block methods - one of them also takes an integer (or two, I forget). First integer is the metadata. Second if it's there, is the flag. You pretty much always want flags 1 and 2 (3)
  19. Haven't looked into it, but from what it looks like, you're trying to get a block that hasn't generated yet. Minecraft then goes to generate the block, and in doing so, goes to call your class to generate. This results in an 'infinite loop'.
  20. How does this look? public List<net.minecraft.entity.player.EntityPlayer> playersWatchingChunk(int x, int y) { PlayerInstance pi = getOrCreateChunkWatcher(x, y, false); return pi != null ? java.util.Collections.unmodifiableList(pi.playersWatchingChunk) : java.util.Collections.emptyList(); } public void sendPacketToWatching(int x, int y, Packet packet) { PlayerInstance pi = getOrCreateChunkWatcher(x, y, false); if(pi != null) { pi.sendToAllPlayersWatchingChunk(packet); } }
×
×
  • Create New...

Important Information

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