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.

Cadiboo

Members
  • Joined

  • Last visited

Posts posted by Cadiboo

  1. There’s a couple ways:

    1) get the players skin texture and draw the face. (2D, requires a little basic rendering knowledge, best performance)

    2) get the players skin texture and draw a cube. (3D, requires slightly more basic rendering knowledge, good performance)

    3) make an ItemStack with a Skull with the players head and render it with the RenderItem. (3D, requires messing around with UUIDs I think, bad for performance)

     

    use method 1 in the renderOverlay event

  2. 3 hours ago, MrChoke said:

    So yes I agree, it must only be NBT reds/writes that get things saved.  Turns out that path var and many other things actually get re-initialized from scratch when a world is loaded.

     

    So if I want to save my own data to the a save, I guess I use what is explained here:

    https://mcforge.readthedocs.io/en/latest/datastorage/worldsaveddata/

     

    Or capabilities

  3. It is possible but it’s absolutely painful and requires dealing with the raw bytecode of the method. It’s painful, a single wrong thing will instantly crash everything, you need to pretty much learn 2 new languages (ASM & Java Bytecode) and you will have no support from anywhere (online tutorials are also a bit non existent).

    3 hours ago, Animefan8888 said:

    ultimately the absolute last resort

    It shouldn’t even be a last resort. If your using it, your doing something wrong.

    You should try submitting a PR to forge if you want hooks. It’s a slow process, but you will get a lot of feedback.

  4. 4 hours ago, Robin Withes said:

    Is capabilities something originally from Java or from forge, i never heard of it before.

    Capabilities are a concept from Object Oriented Programming (like Objects and Interfaces). They allow for programming in the style “composition over inheritance”. Sorry for the badly worded answer, these articles explain it well.

    https://en.m.wikipedia.org/wiki/Composition_over_inheritance

    https://en.m.wikipedia.org/wiki/Encapsulation_(computer_programming)

     

  5. Most models are created upside down because of how texture coordinates work. It’s easier for humans to create them upside down and then rotate them in the rendering. This is because texture coordinates (UV) have the V axis going down when pretty much every axis ever goes up. Here are a couple diagrams to illustrate this43350675-C0BC-4ECC-8B0E-E5B93730E52D.png.f47a47753bf07c6df5ce6739923055b9.png93E43563-356B-4321-9448-DF1AF11CADC8.thumb.png.d61081d51313dd2fa05182dc8ff71249.png

  6. 18 minutes ago, monkeybee said:

    now the confusing part of telling me this

    ppl say that after u start but the  u have dw20 vaskii amadeus laxmanos?(think notsure) on the minecraft modded pannel at minecraft earth who say modding minecraft is a good place to start so im like.....who the heck do u baleave :s

    Do you understand the basic concepts of Object Oriented Programming? Do you understand basic java? Minecrafts code is badly and confusingly written and forge is complicated. You should have a good basic understanding of both before starting Modding. I’ve been programming for a few years and decided to learn java through modding and it was pretty (very) hard to just jump in and learn the basics, not to mention all the special stuff and intricacies of modding. It’s possible, but you need to be receptive and read a bunch of documentation and take baby steps. 

  7. Posted ·

    Edited by Cadiboo

    I was told that the @ObjectHolder annotation is going away in 1.13 due to Java’s internal reflection being changed from Java 8 to Java 9. I understand how this breaks a lot of code, but I don’t see how it makes it impossible to have the annotation. I think that the annotation is vital so that mods can override other mods items and blocks easily. It also provides support for adding and removing mods without restarting the game.

     

    Edit: I’ve seen this post, and I understand how fields with objectholder might not be allowed to be final, but I don’t see why this would cause @ObjectHolder to be removed entirely.

    On 8/14/2018 at 4:59 AM, diesieben07 said:

    This has nothing to do with security. Doing stuff like changing final (and especially static final) fields breaks the JVM or at least any optimizations it can do.

  8. 18 hours ago, Jack4096 said:

    implements IHasModel

    Don’t use IHasModel or anything like it. All items have models and it leads to you writing code over and over again when you could just solve the entire problem in 3 lines of code.

    for(Item item: ModItems) {

      ModelLoader.setCustomModelLocation(item, meta, model location);

    }

  9. You should have a basic grasp of java before making a mod.

    On 10/11/2018 at 1:39 AM, Animefan8888 said:

    Baby steps are the right way to go. However, instead of starting off with modding minecraft you could have started off with something like a calculator or a very simple game that will teach you the basics of Java itself instead of trying to make a modification to an already existing application via an external API.

     

    onBlockActivated(params...) {

      if(age==fully grown) {

        if (stack.getItem() == ModItems.BANANA_PICKER) {

          drops.add(new ItemStack(ModItems.BANANA));

        } else {

          //tell player they need to use a banana picker

        }

      }

    }

  10. On 10/10/2018 at 6:31 AM, Animefan8888 said:

    Or you could just instantiate the object directly. IE

    RegistryEvent()

    Object o = new Object()

    Event.register(o)

     

    Obviously you could add all of the objects into a set via their constructor for the simplicity of registering. Plus ObjectHolder is broken in Java 9 and will probably not be in the 1.13 release of forge.

    Why won’t they be in 1.13? I think that they’re a great addition, and are vital due to their potential for adding & removing mods ingame

  11. 5 hours ago, Animefan8888 said:

    you can add your own modifier in a player tick event if the item is found and remove the modifier if it isnt.

     

    4 hours ago, Elyon13 said:

    multimap.put(SharedMonsterAttributes.ARMOR.getName(), new AttributeModifier(ARMOR_MODIFIERS[equipmentSlot.getIndex()], "Armor modifier", (double)this.damageReduceAmount, 0));
                multimap.put(SharedMonsterAttributes.ARMOR_TOUGHNESS.getName(), new AttributeModifier(ARMOR_MODIFIERS[equipmentSlot.getIndex()], "Armor toughness", (double)this.toughness, 0));

     

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.