-
Posts
1283 -
Joined
-
Last visited
-
Days Won
2
Everything posted by jeffryfisher
-
There's a (World?) method that will give you the top-most solid Y for any X,Z. With that you can check an area. There are several strategies for flattening. One is to choose flat biomes, build up from the highest Y, fill down where the area is lower, and hope it comes out looking good. Another is to scrape a foundation (with room to walk around the outside) down to some median level (but keep it above sea-level). What you choose will depend on what look you want, whether you need to "force" the building at each proposed site etc.
-
Set some break points and run in the debugger. You'll probably run into a place where you're setting a state to its default properties (forgot to append a withProperty? This method is suspicious: @Override public IBlockState getStateFromMeta(int meta) { if(!this.isDouble()) { return this.getDefaultState().withProperty(HALF, EnumBlockHalf.values()[meta % EnumBlockHalf.values().length]); } return this.getDefaultState(); } Why ignore meta and return default?
-
java.lang.NoClassDefFoundError: net/minecraft/client/Minecraft Like the message says, the Minecraft class isn't found on the server, so don't put code onto the server that refers to the Minecraft class. Even if your server code would never execute anything using elements of the class, the loader doesn't know that, so it will still try to load the class and spawn that crash. Get thee to a client proxy.
-
Getting hundreds of missing class errors from forge
jeffryfisher replied to Silly511's topic in Modder Support
Aha... In that case, maybe one of the mods will move this thread to one of the other forums (such as Support & Bug Reports ) -
I recommend right-clicking on "EnumFacing" in your code and then using the context menu to jump into the class so you can read it. That'll answer most of your questions.
-
Getting hundreds of missing class errors from forge
jeffryfisher replied to Silly511's topic in Modder Support
I haven't seen this command before. Did Forge stop using setupDecompWorkspace? If you're getting so many missing classes, then the deobfuscation didn't happen. Install again. -
Did you mess with the gradle file? You can get errors like this if you mess up the reobfuscation (or if you "export" from Eclipse instead of running gradlew build).
-
@Override public ActionResult<ItemStack> onItemRightClick(Itemstack Stack, World worldIn, EntityPlayer playerIn, EnumHand handIn) This doesn't look right. Do you get a complaint about the Override? If so, then you need to revise the method profile until the complaint goes away. I know, Eclipse will always suggest that you cut the Override, but that's because Eclipse is too stupid to know if it really belongs there. If it does, then you need to keep it there and make it work, that's what the annotation is for -- to irritate you until you fix the broken method profile. I suggest copying the profile of the method you're overriding. return new ActionResult(EnumActionResult.SUCCESS, new ItemStack(this)); Why are you returning a new stack? What's wrong with the one you were given (and to which you added damage)? You should set some breakpoints around your code and then step through it and into method calls and out to the surrounding vanilla code to see how your result is used. Only then will you see what's happening and why.
-
New at modding, need help with nullPointerException
jeffryfisher replied to Buudeluu's topic in Modder Support
Admitting that here is just begging to get your thread locked (see Draco's signature). Go find yourself some Java resources and lean on them until nobody here can detect a lack of Java awareness in your work or questions. Do the same for Eclipse if that's new too. -
How to Metadata with Blocks / minecraft 1.9.4-1.12+
jeffryfisher replied to leplopp's topic in Modder Support
In case you haven't read it elsewhere: Because a Minecraft world has millions of blocks in play at any given time (view distance in blocks squared x 256 height; do the math), block data is extremely limited. Instead of instantiating and saving an entire class object for each block in the world, there is only one instantiation of each class (what you'll see called a singleton around here). In effect, all block-class fields are static even if they're not declared as such. What's stored (in chunks) in the world are arrays of short (16-bit) integers, one archaic short per block. Of each 16-bit short, 12 bits are used for block ID (0..4095) and 4 bits become "metadata" (0..15). Having coded satellite telemetry back in the stone-knives & bear-skins dark ages of the 1980s, I feel right at home. YMMV. This 16-bit system may change someday, maybe as soon as MC v1.13, but for now that's what we have. Whenever a block class is put to work, it needs to be handed its context (its world and position therein). Vanilla coding already handles the translation from metadata to properties and back again. I recommend stepping through those processes at least once to become familiar with what's being done for you (and wrap your head around the virtually static nature of block classes in everything except properties). Note: If you design a block subclass to use a property for a non-display purpose (e.g. behavior), then you should research the code for telling the renderer to ignore your property. -
[1.12] Any detailed Information on Block Animation?
jeffryfisher replied to 28Smiles's topic in Modder Support
Just look at how the sea-lantern's texture works. -
I still like the randomness of ticking the block like a crop waiting to grow.
-
Looks like you're using a client-side class in common code. You need to identify it and then quarantine all references in your client proxy. PS: You built your jar using gradlew build, right?
-
It's time to set breakpoints in related methods and then step through the breaking of your block in the test case that baffles you.
-
Try changing a neighboring block. Is it called then?
-
Understanding texture/model of blocks in inventory
jeffryfisher replied to indemnity83's topic in Modder Support
The whole JSON resource paradigm is extremely fragile. Strings must be matched exactly. Your IDE isn't there to flag typos. Just one misplaced underscore or mixed-case string (semantic error) in either your JSON or the variable that must match it) can derail a JSON file, even if the JSON passes json lint (which you should be using to prove your JSON files are at least syntactically kosher). Therefore, sometimes it helps to have your text editor search for all occurrences of identifiers related to a nonfunctional object. What it fails to find might surprise you. If that doesn't trip anything, then set break points in your methods that concatenate strings so you can examine them in the debugger. -
Yes, please edit your OP to put spoiler or code tags around your console text Click on the 288 to see what FML was trying to do there. Post your main mod class (bracketed by code tags or in a git repo).
-
[1.8.9] Mod Working in IDE, Not when compiled
jeffryfisher replied to BallsOfBedrock's topic in Modder Support
SP or MP? Have you tried both? Did you look at the logs? I am suspicious of anything with "Client" in its name that is not hidden inside a client proxy. Beware of client-server issues. One issue that sometimes crops up in jar files is re-obfuscation. Have you done anything to your gradle file? The other common issue with jars is that they're case sensitive where the windows OS isn't, but I don't see you referencing any resource files. -
[1.11.2] (UNSOLVED) How to make a block a gif/animated?
jeffryfisher replied to BlockExpert's topic in Modder Support
Study the coding and resources of the sea lantern, then imitate the parts you want. -
How you have your block detect an entity depends on what area of effect you want. Do you want the effect if a player walks on top of a carpet laid on top of your block? If so, then you need to look beyond collision. If your block is going to be rare (not spawning by the thousands or millions in the world), then you could use a tile entity to do a short-range living entity search and apply the status effect to those you deem worthy. Alternatively, you could add randomness (and avoid using a TE) by setting your block to tick randomly and doing your short-range search then. You might find other ideas by looking at vanilla coding for beacons.
-
Error when trying to run Minecraft client in Java Eclipse
jeffryfisher replied to LeadedJester's topic in Modder Support
As Forge has grown, the setup requires ever more RAM. You might need to set a cmd-line option to offer more RAM to the JVM. However, you should not make promises that your hardware can't keep. Some people have success by reducing the value in the option, protecting the job from trying to use RAM that isn't there. -
[1.10.2] Rendering Armor throws NullPointerException
jeffryfisher replied to FilipZocktan's topic in Modder Support
The mesher was called in init. The new model loader call belongs in preInit. Is that where you put it? Note: The log will contain warnings that the console does not show. Learn to read the logs. -
Error when trying to run Minecraft client in Java Eclipse
jeffryfisher replied to LeadedJester's topic in Modder Support
Put your json files through a json syntax checker such as jsonLint online. -
[1.11.2] How to generate structures bigger than a chunk
jeffryfisher replied to GooberGunter's topic in Modder Support
And that "structure" can include the air you want as a buffer around and/or above.