Jump to content

jeffryfisher

Members
  • Posts

    1283
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by jeffryfisher

  1. Look at the vanilla fence-gate for an example of open and close (but ignore the in-wall property). You will need to override several methods pertaining to properties.
  2. Right -- Those vanilla states are very literal; they need to be EXACT (even to the point of putting all of the properties in alpha order). If you want parts, then use the Forge advanced json format. On the other hand, if a property such as "powered" is superfluous, then use a custom state mapper (or 1.11.2's equivalent) to ignore it.
  3. What you do depends on your situation and the foreign-mod: If you are modding solely for yourself, running on your own machine(s), then anything goes. If you are hosting a server for an invited group of friends, then first try reflection. If that doesn't work, then try to contact the foreign mod's developer(s) for source-code and support / collaboration. In extremis, you might try ASM, but back up everything first, and have your friends sign waivers. If you're going to publish a mod at Curse, then forget about ASM, and carefully document any reflection that does anything more inside other mods besides reading protected/private data. Beware of dependencies. Either insist that users install them or else encapsulate features so that they side-step missing mods gracefully. If I recall correctly, the postInit event is where you should detect other mods, possibly communicate with them, and decide what to do about the context in which your mod finds itself.
  4. Wow, over 150 posts with no karma, plus or minus ? That takes some special skill. Here, have a point
  5. Look in class VillagerRegistry to see what the addExtraVillageComponents method's arguments really are. Also look at the method's visibility to see if you're even allowed to call it. If you find yourself in a "close but no cigar" position, then you might be able cheat your way to victory using reflection (qv). BTW, If you solve this and are still ambitious, please consider expanding your mod to build a fence around each village (adding at least one gate for each compass point, perhaps where a road goes through). If you published such a mod, I would use it
  6. And use a syntax validator such as http://jsonlint.com/ (bookmark it)
  7. Strangely? There are many display things that only the client can or should do. Some confusions can be masked inside an IDE and/or SP because the client classes are present. I suggest that you step into and through the TextComponentTranslation constructor (and any calls it might make to other methods). If/when you start to see it grabbing client-side data, then its place client-side should make more sense. I suspect that it is designed to let each client translate in its own way (e.g. into client-specific language), something the server can't do for multiple players. Even looking at the way you call it, I can see that you expect it to do the same translation for every player before handing the message to a player-specific method. That alone is fishy.
  8. Right -- You might not stop it from firing twice, but you can act on only the call from a hand you care about.
  9. You mention a crash, so a crash report would help us know where to start.
  10. If you really thought Java was broken enough to execute both branches of an if-else statement, you should have stepped through it in the debugger to see what was really happening. You could have become famous throughout the Java programming community for being the first to discover this major bug! Most likely, the server is clobbering whatever data your client is trying to save. Things will clear up after you have wrapped your head around client-server architecture: Client is for I/O, server holds the authoritative data of the world and makes decisions. Another way to look at it is that each client is one player's perception, and the server is "reality".
  11. Yeah, it would be rare for a random coord to hit iron ore to replace it. In overworld, you'll almost always want to specify stone as the replaceable block. In nether, normally specify netherrack. If you have an unusual purpose, then you might want to add some search logic to one of your methods (like if you wanted to replace some lava). If you really want to replace something like iron ore, then there might be an ore-spawn event that you can harness to detect each impending iron-ore body and substitute your own ore block in its place
  12. This might be a stupid question, but where is the "scan" happening? Is there a way to determine a priori whether one is a source or recipient? Could mod versions contain the scans? What I am suggesting is that there are many ways to skin such a cat, including custom resources located on external servers and fetched/updated at client load time. If you search these forums you should find similar file-distribution discussions within the past year.
  13. The key line in the crash report is: Somebody somewhere is apologizing for the inconvenience...
  14. This is where you need a debugger. Set breakpoints both inside and outside your loops, then step through a couple iterations looking at the variable values. After convincing yourself that the variables are being assigned in the right places and used in the right tests, remove the outer breakpoints and set one inside the approval branch. Run until the method hits it. Look at the conditions that got you there. If those are sane, then look at how your approved coords are translated/transmitted to the construction method. Somewhere along the way, palm should hit face. You'll see it live in the debugger much more easily than we can in dry code.
  15. If it's the class I used, then ItemMultiTexture would already be an extension of ItemBlock. So, you can either declare your item block to be a new ItemMultiTexture or you may first extend ItemMultiTexture and then declare a new one of those.
  16. Do a Google search on Minecraft Forge crop seed crash and count the hits (and be chagrined -- I got 402,000+, which is just a few more than the number of threads I've seen in the last three years).
  17. And the subject line should be less generic.
  18. So the defaults from the blockstates file don't come through... irritating. At this point I need to sign off because my experience is with 1.10.2, and 1.11 has changed a couple things about the JSON handling as it matures.
  19. What if you just don't mention the banner_top & bottom textures in the model file?
  20. Enums are stored as numbers. ARRYN is zero. Basestate is all zeroes. Your meta methods get and set nothing but zero. You'll end up defining 14 blockstates but using only state zero. Why bother? For that matter, with 14 houses, why not store and retrieve them normally? I'm missing something here, which makes it difficult to see what the problem is. Well that's why you see blocks/debug.
  21. You posted a compiler failure, not a game crash. If you had read it yourself, you would have seen "Compile failed; see the compiler error output for details." Go back to Eclipse and hunt down the red X's and underlines. Fix your compilation errors before trying to compile.
  22. If the Minecraft server crashes, then there is a crash log. If the JVM hangs, then you have a deeper problem (and saying that Minecraft crashed will just mislead some of us). You might need to go to a Java forum and show it a JVM log (if there's a way to generate one). Good luck
  23. You'll find that a decomp workspace is more useful than the dev workspace, so I'd recommend that you do the set up again, replacing 'dev' with 'decomp'. What do you mean, "not there"? Not where? Not in the creative menu? Not visible when summoned successfully? Unable to summon or give? To appear in the creative menu, items must not only be registered, but they must set a menu-tab (which may sometimes be done by a parent class). For blocks, each block needs to explicitly define its ItemBlock and register that too (or else it will never exist as an item, which is okay for some blocks such as lava and air). It's probably something with the code.
  24. How do you know that Minecraft crashed? I'm looking at the logs, but I don't see any crash. Did the server crash? If so, then maybe you could show us the crash report so we have some hope of helping?
  25. Aha! Try pasting each JSON file into jsonlint.
×
×
  • Create New...

Important Information

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