Jump to content

jeffryfisher

Members
  • Posts

    1283
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by jeffryfisher

  1. Returns? That could lead to the same sort of reference to a missing class. I recommend a proxy method that uses the Minecraft class to do what needs doing client-side (if indeed that's even the best way to design this mod). Looking at that design, it doesn't fit with "proper" client-server purposes. The server is the authority, and the client is the UI. Therefore, if the "stun" effect is to prevent player movement, it should do its work on the server (the authority). It should not hack the keys (or even trust a player to be limited by them). In theory, a devious player could have a second set of movement controls (e.g. a joystick mod) to continue moving, and your server-side would not be enforcing the stun. I hate to say it, but it looks like you should go back to the drawing board and find a hook server side to do what you want.
  2. You said it yourself up above: You had both server and client running on the same machine, so the client was there to load the Minecraft class. As long as the class is loaded in the JVM, the server can load with a reference to a class that it would not load for itself (because class Minecraft is client side-only). It's probably the most common source of "My mod worked in Eclipse and SP but blew a gasket as soon as I tried it in true MP" threads that run like a rash throughout this help forum. I myself tripped over class Minecraft's client-only restriction in my first mod and found help in threads going back to 1.6.2 and earlier. Someday this forum will have a dynamic FAQ AI that detects that predictable error text in the crash report and sends a stock reply plus an admonition to Google the error message to see the thousands (ok, hundreds) of identical past threads. Until then, each newbie has the privilege of repeating the lore to the next who comes along -- so you're now the officer of the watch, please field the next instance (which will probably come within the next week or two).
  3. If that's the case, then even before trying a simple mod, you should sign up for a class that teaches any object-oriented language (e.g. C++, Java etc). You may find that even doing that may require a prerequisite of a simpler intro-to-programming class or simpler language. Either that, or completing the O-O programming aspects of the O-O language requires two terms. I say this because modding means working around some unusual constraints, and that means often doing or understanding some uncommon / advanced techniques (similar to hacking). This is not how you want to be introduced to programming. Not only is it akin to being thrown into the deep end of the pool, but it will teach you bad habits -- either because good practice would require a Mojang design change or because you'd be learning from a mixed bag that includes amateurs peddling wretched coding practices. So go to school and get some basic training supported by a professional teacher who can answer all your beginner questions. Come back here in about six months ready to add Forge and Minecraft knowledge on top of a solid programming foundation.
  4. "Debugger" depends on what IDE you're using. If Eclipse, then search the web for Eclipse tutorials. Teaching Eclipse (and Java and other tools) is outside the scope of this forum. Come back here when you've narrowed your problem to a specific question about Forge and its decompiled, deobfuscated Minecraft code.
  5. In that case, you'll need to set a breakpoint in the vanilla renderer and step through until you spot the interference. BTW, What does that even mean? You still haven't given us a pic, so we don't know what you are seeing. "Textureless" has no meaning. Are you seeing the purple and black checker pattern (the "missing" texture)? Or are you seeing something else (e.g. plain unwritten book, or untextured model polygons)? Get yourself into the debugger to find out what's happening.
  6. Is it private? Look for a getRegistry method.
  7. Scholarship and Research: Search for definitions of unknown words and phrases. Run experiments. Reverse-engineering and Debugging: Each means using your IDE to explore code, especially the vanilla code. Walking through idle code shows how it is connected, but even better is stepping through code as it runs so you can see data move through the system. Entering the debugger is like advancing from radio to color TV. Without the debugger, you are flying blind.
  8. Many modders here have posted pointers to mod source code at github. Google is your friend -- some simple searches (minecraft + forge + mod + github) should reveal many examples of mods. The Grey Ghost's Minecraft By Example might also be a good place to start.
  9. If a texture is missing, then there should be a warning on load, but it may only show in the log file, not console output. Post the client log file (not console output) and JSON files. Also: Clearly describe what you expected to see and what you actually saw (a pic might be helpful).
  10. Uh-oh, that's "lock my thread" bait. I'm surprised we're still talking here. Would-be modders are responsible for acquiring Java ability (and programming skill in general) on their own. Community members will volunteer Forge knowledge, but it's up to you to then research what all of the programming jargon means... ... Such as preinit. Start searching. To make better use of this forum, you need to raise your level of scholarship.
  11. Looks like your recipe is too big
  12. After your TE updates the block state at pos on the server, doesn't the server communicate the new block state to the client automatically? As for the TE itself, I think you just need to mark it dirty. The server should then take care of it (presuming that your NBT write and read are coherent). At least my TE's all worked up to version 1.10.2 without need for manual packet sending.
  13. Set a breakpoint and step through your code in the debugger. Then you'll see what's happening (and probably why).
  14. I probably should have added that you should develop your idea for this complex mod as a background task while doing a basic "beginner mod" to learn Forge first. Maybe create a new kind of block, successfully put a texture on it, and put its ItemBlock into the creative-mode menu. It could even become your seed block later. You just need to get a grip on the basics before adding complications.
  15. By this point, you should know how to interpret this error already. Add your missing file, rinse, repeat.
  16. If the sound system hasn't changed too much, then I think that a moving sound remembers its entity and then ticks periodically to correct its position to wherever the entity has moved. I remember triggering a sound on the server (which handled the sending of packets to all players within earshot), but then my mod on the client-side needed to use a Forge event to replace the default sound renderer (also called a "sound", adding to the confusion) with my my own custom renderer because the server's packets could only spawn the default. One of the confusing things about sound (at least up to MC v 1,10.2) was the confusability between server-side and client-side processing (and multiple methods having the same name but subtly different purposes).
  17. I didn't understand this at first... You want the word "radius". Radios are wireless communication devices. Don't worry about matching the radius when setting it in the GUI. All you need is for the radius of a swap to be determined by the seed that was triggered (so if a matched pair of seeds have unequal radius settings, the radius in the triggered block is the radius used at both ends). In fact, you don't even need to set the radius in a GUI. If you want, you could just use the redstone signal strength that triggers the swap. Your tile entity is going to be tricky. If you choose an ID for a seed, then it must somehow detect whether there are already two seeds with that ID, even if they might be in chunks (and dimensions) that are not currently loaded. Therefore, you will probably need an obduction ID list in dimension or game level data. You need to decide whether to make the IDs unique to each game-world or only unique within each dimension. I recommend treating dimensions separately. When an ID search is complete, if exactly one seed is matched, then each seed's TE should store info (e.g. location) about the other so the search need not be repeated. Pointers can't be trusted because chunks might not remain loaded. Decide what to do if a piston tries to move a seed. Likewise breaking. Don't allow the swap to move/replace bedrock. There may be other perils, so you will probably want to loop all positions around your swapping seeds, testing the block at each end of each potential swap before swapping them. Ironically, you won't want or need to swap the seeds themselves (think about it). Write as much of this mod as you can using pseudo-code. Then replace as much pseudo-code with Java as you can do yourself. Then search for prior threads on each unknown Forge concept in turn, teaching yourself how to do new things. Also use the full power of your IDE. You should be able to teleport into vanilla classes to see what they require. You should also be able to hunt down vanilla examples of how to accomplish many of the actions you want to do. Finally, come back to this forum when you are stuck on all fronts (can't find a thread that has asked and answered your question before). Start a fresh thread for each Forge concept, and use an informative subject line (including MC version number) so future modders can find it when they have the same question.
  18. Actually, that chat message looks like a clever workaround. The server will decide whether the player has the power to use the command, so you don't need to reinvent that wheel. Between setblock and fill, you ought to be able to encode quite a bit of power into your keystroke(s).
  19. Beware of core mods (I saw the word "core" in at least one of the mod names listed above). Forge doesn't play nice with other core mods, so you could still have problems even if you do everything "right".
  20. If you need help with a crash, find the log file (not console) and post it. If there's a client issue, post its log too. Since the debugger seems to be giving you difficulty, you may need to insert some statements to produce more informative text output.
  21. You'll need to dive into the AI functions to see if any of them make assumptions that make them blind to non-vanilla classes. If you don't see anything obvious, then set breakpoints and step through your alpha spider's thinking in the debugger.
  22. getEntitiesWithinAABBForEntity Does the error always have the same stack trace? If so, how big is the AABB that that is checked for bounding box collisions during the move? I agree that stepping through this process, even when not in error, could alert you to a potential pitfall. You might also try adding a temporary exception handler so you can break within it and poke at more variables surrounding the error.
  23. My lang file assignments omit my mod name from the middle . Try deleting "modtest:" from your test case to see if it works. Example: tile.ruby_block.name=Block of Ruby Also, my last lang filename (for mc 1.10.2) capitalized the US (imitating vanilla). Is that changing in 1.11+? I suppose I'll find out in a hurry when I do my next upgrade cycle.
  24. If you have a type mismatch, then it looks as if you have a Java problem. You must seek Java help elsewhere.
×
×
  • Create New...

Important Information

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