Jump to content

jeffryfisher

Members
  • Posts

    1283
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by jeffryfisher

  1. That 30M number is set in the server.properties file (max-world-size). So, if you're really only interested in having a small world (that can be square instead of round), then your job is easy.
  2. If that's the case, then perhaps your item class should extend class ItemTool.
  3. Try moving assignments such as "EntityRegistration registration = ..." into methods whose timing assures that they'll get values other than null at the time of assignment. You might be far enough along in this that you need more general help to understand the differences between preinit, init etc, so you might want to start a new thread.
  4. I don't know if it's the best way, but I hunted around and found a world client instance in FML: WorldClient wc = FMLClientHandler.instance ().getWorldClient (); Everything else I needed for my constructor came out of EntitySpawnMessage m.
  5. C'mon Clow, put in some effort. Don't shut down and come running to the forum the instant you get a crash. Please read the darn thing to see what it's complaining about. F'rinstance, what part of [16:17:20] [Client thread/ERROR] [FML]: Attempted to load a proxy type com.clowcadia.test.ClientProxy into com.clowcadia.test.TestModHandler.proxy, but the types don't match is so mysterious that you couldn't even post your client proxy class to help us solve this? If you had just tried to do that much, then you might even have stumbled on the answer before you clicked "Submit".
  6. I make simple mods that don't need lots of compartmentalization.
  7. The apply method gets parameter m (message). See what that gives you. When I make a mod, I put everything in one package. You might want to replace "Some" with a word pertaining to what you're working on (e.g. "Camera"). Sorry 'bout the local "registration" variable. Here's what I used in 1.8 - 1.10.2: container = Loader.instance ().getIndexedModList ().get (modId); EntityRegistration registration = EntityRegistry.instance ().lookupModSpawn (container, 0); I think you want to instantiate each new camera inside the callback. Then return a new entity every time. The parameters for the constructor are whatever your camera needs plus what HangingEntity needs. If you're lucky, you'll find what you need inside the message m.
  8. In 1.10.2, to stop MC from trying to spawn a vanilla painting, I needed to provide a callback class to a custom spawning registration that was called from client proxy init. Client Proxy line in init: registration.setCustomSpawning (new SomeSpawnCallback (), false); Excerpt from Callback Class: import com.google.common.base.Function; @SideOnly(Side.CLIENT) public class SomeSpawnCallback implements Function<EntitySpawnMessage, Entity> { ... @Override public Entity apply(EntitySpawnMessage m) { // read message and call your hanging entity's client-side constructor } } Forge reflection will call your "apply" method.
  9. You might get a lot of mileage out of detecting mob-spawners. Each stronghold generates at least the silverfish spawner, and each mine complex usually generates a couple spider spawners. And of course there are "dungeons". Since these are very specific blocks, they might be easier to work with. If there's some other structure you want to detect, then think whether it generates a block that doesn't occur in nature (e.g. gold blocks in a sea temple).
  10. I've added custom paintings, creating new item and entity classes for them. I added a bunch of texture files and left the existing one alone. Because my custom painting class is not identical to EntityPainting, the client-side message handler would not cooperate. The message was ok, but I needed to jump through some hoops on the client side to spawn my entity.
  11. There might be some corner cases where your block's shouldRefresh is called when your block is not even there (or when one instance is replaced by another, depending on how your mod functions and how you might extend the block class later). Therefore, rather than just checking for a changed block, you might check whether the old and new blocks are your block (or instanceof).
  12. Lower case mod ID has been SoP since at least 1.7.2 (spring 2014) when I started modding.
  13. Did you miss yet another "tut" versus "tutorial" change? I thought we solved all of those in one of your many other threads. If I can recognize a repeat problem, then you should too. Please learn from these exchanges so you can read your own crash reports and at least TRY to see what your problem is before instantly posting here.
  14. There was another multiblock thread just last week, hunt it down and read it. You may also reduce call frequency by creating a special item to activate your structure (the way a flint-steel lights a nether-portal).
  15. I suggest that you browse these forums for modders who've posted links to their work in github (or search github for Minecraft Forge mods). Look at several, finding relatively simple ones, and take note of what goes where (esp if the modder's thread here shows that the mod ended up fixed and working). Also look up the modding by example. Finally, disregard all tutorials that mention the model mesher. Delete all links to those old things.
  16. It means you need to search the web for how to handle networking and port numbers. The problem has probably been encountered before, so the answer is probably searchable. You have a sysadin problem, not a Forge problem, so take it elsewhere. This thread should be locked.
  17. Right... You need a type-mark and an object identifier. Maybe replace the dot with a blank space?
  18. You now have a sys-admin issue beyond Forge, so you should take it to experts in that arena.
  19. Glad I could help. Now you just need to track down why each of those errors is happening (filename spelling? Placed in wrong directory?). The whole JSON paradigm is fragile because something as subtle as an errant underscore can foul the load without the IDE being able to finger the error (whereas syntactic elements in code can be underlined for your immediate attention). JSON debugging makes me feel like I am coding in the 1980's again, and no, it's not nostalgic.
  20. When you test your AI task, besides succeeding at tracking when you want,also check that it doesn't track when it shouldn't (e.g. spawn a chicken or sheep to see if they now flock to your custom mob too).
  21. Hint: When debugging textures, the log file will sometimes have more info than the console.
  22. Open the GUI? What do you mean? Freezing can mean a couple of things. One is that you ran in the debugger and hit a breakpoint. Try kicking your IDE to take you to its debugger panel. The other is that your code sank into an infinite loop. If you wait long enough, the stack will exhaust available memory and crash out with a memory error. The call trace will then show you the recursive calling loop (again and again and again). Another (that you should never do) is that a modder wants to delay some action, so he calls some system level wait method that hangs the JRE. In-game delays need to be implemented with tick handlers so that the rest of the game can continue to run.
  23. After reading this thread, I miss the smite button (Picard, head in hand).
  24. I think that there are many methods that should only run on the server (where world is not remote). However, I do not think that there are any classes that are loaded only on the server, and that's what proxies guard against: The mere mention of an undefined class can blow mod injection sky high even if execution would never have tried to call anything in the missing class. So, the client proxy is needed to contain all references to classes loaded only client-side. The server can use the common proxy because it doesn't need anything but its trivial method stubs as placeholders. There is no server proxy because there's no need to contain any toxic reference on the server.
×
×
  • Create New...

Important Information

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