Everything posted by Draco18s
-
Loading textures, models, and translations on the fly....
The class is responsible for loading a texture and adding it to the sprite sheet. The method to override is the load method. Mind, it can get complicated. For example, I had one in 1.7.10 that would take two textures out of the assets directory and merge them into a single texture. https://github.com/Draco18s/HarderStuff/blob/master/src/main/java/com/draco18s/hardlib/client/TextureAtlasDynamic.java#L53 rawBase is the texture (rawOverlay being the second) represented as a 1 dimensional array of integers (each integer being a single pixel, the value representing color). aint is the 2D array for each mipmap version of the texture. I didn't do anything about downscaling, I just shoved the combined texture into each index. (Not good practice, but I wasn't really sure what I was doing and just wanted something that worked).
-
[1.11.2] Make item stay in crafting and decrease durability
Override hasContainerItem and getContainerItem
- [1.11] Power Capability
-
Loading textures, models, and translations on the fly....
I think this could be accomplished with a custom TextureAtlasSprite class and you'd re-use the same 10 (or however many) textures for these blocks/items and just swap out what's actually there based on the world seed. I'm not sure the sprite class has access to the world information, but you could probably hack something together. Reloading based on refreshing texture pack (and forcing a refresh) is likely the way to go, as well.
-
1.11 - Custom Mob - NullPointerException: Ticking entity
Look at PathNavigate.java line 65. It's likely referencing something in the Entity class that your class conveniently forgot to ever give a value to, so it's null.
-
[1.8.9] OkHttp crushing the client?
You mean, register an event handler?
-
[Solved] Trying to save values to chunks
Or more clearly: ChunkDataEvent.Save - save your data to NBT ChunkDataEvent.Load - load your data from NBT ChunkEvent.Unload - remove unused data from your runtime storage (likely a Map) You need to do all three. Save can happen any time, so it's not safe to purge runtime data at that point, and ChunkEvent.Load doesn't give you access to the NBT data.
-
[1.9.4] Registering Blocks - Back to square one
GameRegistry.register(block); //still needed GameRegistry.register(new ModLeavesItem(block).setRegistryName(block.getRegistryName())); //non-deprecated version
-
[1.11.2] Can you guys please update Forge to 1.11.2 and stop disguising it as 1.10.2, Thanks.
Yeah, I don't like it much either.
-
The New Forums
For reference, here's the script I have that's causing the problem: // ==UserScript== // @name Remove Chekov // @namespace minecraftforge.net // @include http://www.minecraftforge.net/forum/* // @version 1 // @grant none // @require https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js // ==/UserScript== //(function () { //alert($(".signature>img").length); // $(".signature>img").each(function(index) { //alert(index); //if($(this).attr("src") == "http://www.startrek.com/uploads/assets/articles/61c89a9d73c284bda486afaeaf01cdb27180359b.jpg") { //alert("true"); //$(this).attr("src",""); //} //}); //})(); The commented functional code was done line by line to see what it was that was breaking stuff. End result, even this broke things. And its not even in global scope (that needs @grant unsafewindow, IIRC). I've got GM 3.9 on Firefox 50.1.0 Oh, and question: Site reputation obviously migrated over, but I don't see any controls to praise/smite people now.
-
[1.8.9] OkHttp crushing the client?
How about you not make a Java Main method and use the Forge init events?
-
[1.8.9] OkHttp crushing the client?
Uh yeah. Because that's a Main function, as in the first method that the JVM invokes, except that the main class that the JVM is invoking is GradleStart, calling Main(args) there. Which means YOUR method is not called. Just because it's public and static doesn't mean it gets invoked.
-
[1.10.2] No damage when colliding with block
The method still takes in an Entity, you have to filter out the other types yourself in the method.
-
[1.10.2] No damage when colliding with block
Removing @Override is never the correct answer. It's ignoring the problem.
-
[1.10.2] No damage when colliding with block
I believe you want to override getCollisionBoundingBox. Ninja'd by Choonster
-
[1.10.2] No damage when colliding with block
The block needs to have a boundary smaller than a full 1x1x1 cube, otherwise the player can't collide with it. I believe the minimum offset is 0.005. Something in around that neighborhood (might be 0.01).
-
The New Forums
It wasn't annoying enough for me to really bother reporting it. It wasn't particularly large, animated, or anything. It was just the only sig anyone on here had that had an image in it. So it stuck out. But duly noted.
-
The New Forums
Ah, so they are still there. I'd gone looking and somehow failed to find it. And no worries about leaving them off by default. Also I figured out the JS problems I was having. Merely having a Greasemonkey script active on the URL breaks spoilers, preview, and new topic stuff. A blank greasemonkey script. I had one to nuke an image out of someone's sig (I didn't mind signatures except that one image) and there's no reason for a GM script to interfere like that, especially one that has @grant: none.
- [1.10.2] Fluids won't render.
-
[1.11] Block with two properties?
That is not how you specify variants. https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/resources/assets/oreflowers/blockstates/oreflowers1.json#L16
-
[1.11.2] Only certain textures missing on block model
No, you like to learn in the "please vomit the answer into my face" method. Which is really annoying for those of us who don't like regurgitating the same answer 47 times. Or put another way: You're doing it in a way such that upon encountering a problem you flail your arms and go "HALP" and never actually try to solve the problem yourself. You had to be told five times how to override a method.
-
[1.11] Block with two properties?
...Add it to the variants list?
-
[1.11.2]Auto-repairing item
Mending intercepts exp pickups. I think he wants it to repair by extracting exp from the player. It's doable. I've done it before (not as a mending item, but as a block that when you touched it would leech your exp away). There were a few edge cases to handle, but it's not that hard.
-
[1.11.2] Only certain textures missing on block model
Mixing opaque geometry and transparent geometry will always be funky unless you know what you're doing. (Tip: you don't).
-
[1.11.2] skipping night in custom dimension
Event methods don't return anything. They need to modify the event object passed to it.
IPS spam blocked by CleanTalk.