-
Posts
1283 -
Joined
-
Last visited
-
Days Won
2
Everything posted by jeffryfisher
-
onBlockActivated not changing the blockstate
jeffryfisher replied to Branone's topic in Modder Support
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. -
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.
-
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.
-
Minecraft Forge vs Bukkit, what does Forge have what Bukkit dont?
jeffryfisher replied to terraya's topic in Modder Support
Wow, over 150 posts with no karma, plus or minus ? That takes some special skill. Here, have a point -
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
-
And use a syntax validator such as http://jsonlint.com/ (bookmark it)
-
1.11 Messages don't translate outside of development environment.
jeffryfisher replied to Raycoms's topic in Modder Support
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. -
[1.10]How to spawn the particles for other players?
jeffryfisher replied to WildHeart's topic in Modder Support
You mention a crash, so a crash report would help us know where to start. -
IF / ELSE Statement Appears to be ignored
jeffryfisher replied to Maitredetoi's topic in Modder Support
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". -
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
-
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.
-
The key line in the crash report is: Somebody somewhere is apologizing for the inconvenience...
-
[1.10.2/1.11] Structures Are Not Spawning Correctly
jeffryfisher replied to LogicTechCorp's topic in Modder Support
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. -
[Solved]Enum blocks not placing corectly
jeffryfisher replied to shane020482's topic in Modder Support
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. -
I'm having some problems creating crops (1.8)
jeffryfisher replied to Stinkycow8's topic in Modder Support
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). -
Can someone help resolve my problem?
jeffryfisher replied to GandalfWolf's topic in Support & Bug Reports
And the subject line should be less generic. -
[1.11] [Solved] How do I use BlockStates without metadata?
jeffryfisher replied to SuperHB's topic in Modder Support
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. -
[1.11] [Solved] How do I use BlockStates without metadata?
jeffryfisher replied to SuperHB's topic in Modder Support
What if you just don't mention the banner_top & bottom textures in the model file? -
[1.11] [Solved] How do I use BlockStates without metadata?
jeffryfisher replied to SuperHB's topic in Modder Support
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. -
[SOLVED][1.11.2] Crashing when updating from 1.10.2
jeffryfisher replied to MCrafterzz's topic in Modder Support
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. -
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.
-
[1.10.2] MalformedJsonException with valid JSON in lang file
jeffryfisher replied to Flawedspirit's topic in Modder Support
Aha! Try pasting each JSON file into jsonlint.