-
Posts
1283 -
Joined
-
Last visited
-
Days Won
2
Everything posted by jeffryfisher
-
Random Collection: getTotalWeight
jeffryfisher replied to jeffryfisher's topic in General Discussion
Oh heavens no, I don't expect Forge to correct minor MC inefficiencies. I was just worried that there was something hidden that I needed to understand before deciding what weight to assign to my new animal(s). Thanks for confirming that my myopic impression was close to the mark. -
Do a Google search for a "mod suggestions" forum.
-
Don't vanilla stats already count all kills by each player?
-
Force the Client To Load a Distant Chunk
jeffryfisher replied to thebest108's topic in Modder Support
Very cool. If I understand the mod, a "camera" stands in for a player so that chunks load and run. The real player can see some of what the camera sees (reminds me of the "Wizard Eye" spell in D&D). -
I may be off base here, but I have a few thoughts: 1) The quest (and quest chain) can exist independent of any book(s). In other words, if a psychic player completed a quest before looking at a book, then it would be completed (and have its effects). 2) Initially, a certain written book would be a possible loot item. After completion of a stage of the quest chain, the available written book would advance (presumably to provide new clues to the next stage). Chunks loaded before completing a stage might have chests containing older, now useless clues (too bad). 3) Each stage could necessitate visiting temples etc in virgin territory. However, killing witches etc or trading to villagers could generate fresh clue books in old chunks. I personally wouldn't try to add new clues to old books, but YMMV. One strategic decision you need to make is whether the quest chain is per player or unique to a whole world/server. In other words, if player A completes stage 1 and then I kill a witch to find a clue-book, do I find a clue to stage 1 or stage 2 (and can I still achieve stage 1 for myself?).
-
If you're going to that much trouble, then you might even be able to implement it as a URI-based resource loader that would copy in files from a remote Internet server that you control. Then you could update your skins at home, and your players would get the new versions without updating their mods. Such a setup might also keep the mod installation simple for your players. I'd be interested to see what you end up with, if you care to share later.
-
IIRC, when a TNT block is activated, it is replaced by an activated TNT entity. That entity can fall and be affected by any other mods moving entities (like my fan/blower mod). In any case, it is no longer a block. I don't see any code for your invisible TNT entity, so I can't guess what its problem is. How does your entity compare to the vanilla TNT entity? Also see [urlhttp://www.minecraftforge.net/forum/index.php?topic=38445.0]Problem with rendering entities[/url]. PS: There's no lower case 'n' in "TNT". It stands for Tri-Nitro-Toluene, a semi-stable improvement over the much more temperamental nitroglycerin.
-
Time is kept in ticks, 20 ticks to the second. If you can add a tick counter to your item stack or player entity, then you could count down 300 ticks before allowing the special ability again. See how other cool-downs are implemented.
-
In early versions of MC, the "AI" was not abstracted as tasks. Then some mobs converted to the task paradigm (and returned true for AI enabled). By 1.8, all mobs had made the switch, so I think the method was discarded as unnecessary. Search at Google to find discussions on the subject, but essentially, you should always set it true and use the task paradigm. Does your gargoyle inherit a navigator from somewhere? Maybe that's a 1.8 abstraction, so I might not be able to help. I don't know enough about 1.7.10 AI. Steel yourself for the inevitable suggestion that you should upgrade to 1.9.x. In what context did you experience lag? If it was in the Eclipse debugger, then all bets are off. My last stray thought is to find yourself a "profiler" for Java that will tell you what's consuming your CPU cycles. A good profiler will expose problematic call stacks to investigate.
-
Then get yourself an instance of the world so you can call getPlayers(). You haven't given any code context, so i can't be any more helpful than that.
-
Lookup "extended entity properties" and see if that will let you do what you want.
-
[1.9] Sounds now invoked from client side?
jeffryfisher replied to Purplicious_Cow's topic in Modder Support
At least as far as 1.8.9, playSound was like a client-side renderer for sound (and I didn't know it would send packets when called server-side -- maybe that's new?). PlaySoundEffect was the method to call server-side when you had made a decision that you wanted communicated to all world accesses within earshot. I need to pick a 1.9.x Forge build and upgrade my mods so I can see what's been done to what I thought I knew -
[1.9] Sounds now invoked from client side?
jeffryfisher replied to Purplicious_Cow's topic in Modder Support
Sounds changed in 1.9, and did not work in earlest Forge builds. Search for previous discussion, and make sure you get a relatively recent Forge build that will let you customize sound (see change log). -
[1.9] Sounds now invoked from client side?
jeffryfisher replied to Purplicious_Cow's topic in Modder Support
Sounds changed in 1.9, and did not work in earlest Forge builds. Search for previous discussion, and make sure you get a relatively recent Forge build that will let you customize sound (see change log). -
No, you pretty much need to register everything that has a vanilla equivalent, even if you feel as if you wrote the code that adds it. That's because somewhere, somehow, there will be list or map in the guts of mc or Forge that won't include your object unless registered through Forge. Entities, tile entities, recipes, enchantments, achievements, renderers etc... and biomes.
-
No, you pretty much need to register everything that has a vanilla equivalent, even if you feel as if you wrote the code that adds it. That's because somewhere, somehow, there will be list or map in the guts of mc or Forge that won't include your object unless registered through Forge. Entities, tile entities, recipes, enchantments, achievements, renderers etc... and biomes.
-
Where is the class "BlocClearInventory"? Doesn't your parent class already have a PropertyBool POWERED? And a sensitivity? You don't use yours; why is it there? If you need help rendering, then start by posting your JSON files. Depending on what you want to do, you might be able to use vanilla models and textures. The mesher is deprecated. Search for past discussions on what to use instead.
-
Where is the class "BlocClearInventory"? Doesn't your parent class already have a PropertyBool POWERED? And a sensitivity? You don't use yours; why is it there? If you need help rendering, then start by posting your JSON files. Depending on what you want to do, you might be able to use vanilla models and textures. The mesher is deprecated. Search for past discussions on what to use instead.
-
What are you trying to do? And what do you mean by "getServer() doesn't work any more"? Did it crash? Did you step through it in the debugger? Where are you hoping to use the player list? On the client? Do you need player data, or just a sense of logged-in presences? A client is already able to display player names at the touch of a key, so at least some info is there somewhere. On the server, among other things, each player is represented by a worldAccess. The coding direction you take will depend on what you need to do with the answer. For example, when the server "plays" a sound effect (at least in 1.8 when I worked with sound), it scanned through the world accesses to send a packet to each client within hearing range.
-
What are you trying to do? And what do you mean by "getServer() doesn't work any more"? Did it crash? Did you step through it in the debugger? Where are you hoping to use the player list? On the client? Do you need player data, or just a sense of logged-in presences? A client is already able to display player names at the touch of a key, so at least some info is there somewhere. On the server, among other things, each player is represented by a worldAccess. The coding direction you take will depend on what you need to do with the answer. For example, when the server "plays" a sound effect (at least in 1.8 when I worked with sound), it scanned through the world accesses to send a packet to each client within hearing range.
-
[1.9.4] Using Item - Trying to Call to a Separate Class
jeffryfisher replied to HalestormXV's topic in Modder Support
What he said, plus it looks as if your using reflection to try to implement your own runtime polymorphism. You don't need to do that; Java already does this for you when you use inheritance correctly. Find a Java tutorial online and read about runtime polymorphism. -
[1.9.4] Using Item - Trying to Call to a Separate Class
jeffryfisher replied to HalestormXV's topic in Modder Support
What he said, plus it looks as if your using reflection to try to implement your own runtime polymorphism. You don't need to do that; Java already does this for you when you use inheritance correctly. Find a Java tutorial online and read about runtime polymorphism. -
After re-reading the OP, I have to ask: Are you trying to inject a 1.9.4 mod into a 1.9 server? You might get away with running a 1.9.4 mod on a client and then logging into a 1.9 server, but the server should only run mods built from the same MC version as itself. You chopped your crash logs, so I can't see what versions are there. Make sure that they're identical.
-
After re-reading the OP, I have to ask: Are you trying to inject a 1.9.4 mod into a 1.9 server? You might get away with running a 1.9.4 mod on a client and then logging into a 1.9 server, but the server should only run mods built from the same MC version as itself. You chopped your crash logs, so I can't see what versions are there. Make sure that they're identical.