Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Draco18s

Members
  • Joined

  • Last visited

Everything posted by Draco18s

  1. 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).
  2. Override hasContainerItem and getContainerItem
  3. Draco18s replied to a post in a topic in Modder Support
    Yes
  4. 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.
  5. 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.
  6. You mean, register an event handler?
  7. 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.
  8. GameRegistry.register(block); //still needed GameRegistry.register(new ModLeavesItem(block).setRegistryName(block.getRegistryName())); //non-deprecated version
  9. 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.
  10. How about you not make a Java Main method and use the Forge init events?
  11. 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.
  12. The method still takes in an Entity, you have to filter out the other types yourself in the method.
  13. Removing @Override is never the correct answer. It's ignoring the problem.
  14. I believe you want to override getCollisionBoundingBox. Ninja'd by Choonster
  15. 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).
  16. 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.
  17. 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.
  18. That is not how you specify variants. https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/resources/assets/oreflowers/blockstates/oreflowers1.json#L16
  19. 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.
  20. ...Add it to the variants list?
  21. 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.
  22. Mixing opaque geometry and transparent geometry will always be funky unless you know what you're doing. (Tip: you don't).
  23. Event methods don't return anything. They need to modify the event object passed to it.

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.