• 0

    posted a message on so, levitation effect in 1.8.9...
    Quote from Choonster»

    TEM_potions.levitation is null.

    Events should only be used when there's no corresponding callback method or when dealing with things created by outside code. In this case, you should override Potion#isReady and Potion#performEffect instead of using LivingUpdateEvent.

    alrighty, it works as intended now. thanks.
    Posted in: Modification Development
  • 0

    posted a message on so, levitation effect in 1.8.9...

    so uh i tried and i got a crash upon trying. what am i doing wrong?

    Posted in: Modification Development
  • 0

    posted a message on so, levitation effect in 1.8.9...

    (watch me get a whole lotta hate for even attempting to do this instead of updating to 1.10.2)


    ok, so i'm working on backporting certain stuff from 1.9+ (using 1.10.2) to 1.8.9. the first real subject of my attention that i can't figure out is the levitation effect. i've found where the actual effect is handled within 1.10.2's code (entityLivingBase, specifically) and wish to backport the same functionality to 1.8.9. however, what's got me riddled is that i can't actually modify the class itself in eclipse to put this in 1.8.9.


    my original idea to solve this would be to take the class and make an extended clone of it, but that would require also cloning every mob, calling them as an instance of the extended class, as well as cloning a lot of other classes to account for it...i'd be dead by the time i finish if i did that.


    so my question is, is there a better way to handle the levitation effect without actually modifying entityLivingBase? i've read up and modifying base classes can actually break compatibility with other mods, so...that's kinda the last thing i wanna do.

    Posted in: Modification Development
  • 0

    posted a message on [Solved] How to create a custom potion effect?

    ...i'm honestly shocked you didn't notice this: if you set the main class to protected, eclipse will notify you that it shouldn't be protected; it should be public so that the separate registration class can see it and use it.


    aside from that, though, i've got it working. yay.

    thank you a bunch. i appreciate your help.

    Posted in: Modification Development
  • 0

    posted a message on [Solved] How to create a custom potion effect?

    the Potion class itself is protected, meaning you cannot refer to it directly from other class...isn't that the reason a separate class needs to exist in the first place? :v


    trust me, if the Potion class and half it methods weren't protected, i'd just have the init class initialize a bunch of potions.

    updated gist with Potion class.

    Posted in: Modification Development
  • 0

    posted a message on [Solved] How to create a custom potion effect?

    ...1.8.9 or i'd have posted this in a different topic.


    errors:

    "Multiple markers at this line
    - Type mismatch: cannot convert from Potion to TEMPotion
    - The method setEffectiveness(double) from the type Potion is
    not visible
    - The method setIconIndex(int, int) from the type Potion is not
    visible"

    Posted in: Modification Development
  • 0

    posted a message on [Solved] How to create a custom potion effect?
    Quote from Spyeedy»

    You should not be putting the annotation override above those 2 methods.


    Edit 1: Post your updated classes



    i think you misunderstood.
    i don't have the override annotation above them.


    edit: proof.

    Posted in: Modification Development
  • 0

    posted a message on [Solved] How to create a custom potion effect?
    Quote from Spyeedy»

    You cannot override the methods, you need to copy the methods over as they have protected as their modifier.

    except it gives me that message whether i choose to override them or not.

    and even if i rename the methods, setIconIndex_alt (the new one in TEMPotion.java) refuses to be recognized at all. eclipse once again yells at me, stating that "the method setIconIndex_alt is undefined for the type Potion" as if i were using the original class.

    am i doing something wrong here?
    Posted in: Modification Development
  • 0

    posted a message on [Solved] How to create a custom potion effect?

    not sure if the method described here works...eclipse yells at me a lot whenever i make a class that extends Potion like so.


    yes, i know the TEMPotion class is more or less incomplete, but eclipse yells at me stating that setIconIndex and setEffectiveness from class Potion are not visible.


    pretty sure that's not supposed to happen when both of them have equivalents in TEMPotion.java.

    Posted in: Modification Development
  • 0

    posted a message on so i'm trying to add leaves for the new cherry tree and
    Quote from UpcraftLP»

    well, now the problem is that it doesn't turn opaque on fast graphics... so you could jsut return false in the Block#isOpaqueCube method....



    depends...is it worth fixing? if it is, i do want to find a proper fix...

    Posted in: Modification Development
  • 0

    posted a message on so i'm trying to add leaves for the new cherry tree and

    edit:

    	public TEMBlockLeafBase() {
    		super(Material.leaves, false);
    		this.setTickRandomly(true);
    		this.setCreativeTab(CreativeTabs.tabDecorations);
    		this.setHardness(0.2F);
    		this.setLightOpacity(1);
    		this.setStepSound(soundTypeGrass);
    		this.setGraphicsLevel(true); // <-- wow i'm dumb for not remembering this worked
    	}


    way to go, me.


    what makes me even more ashamed of myself is that it actually works:

    not to mention i practically said this exact thing out loud just a few posts ago..


    god, i sometimes wish i could slap myself across the face from my own forgetfulness. :v


    anywho, UpcraftLP, thank you for all your assistance.

    Posted in: Modification Development
  • 1

    posted a message on Best Minecraft Version for Modding?

    in my honest opinion, start with either 1.8.9 or 1.9. 1.7.10 is getting a bit old, and 1.10 might as well be an expanded/modded 1.9.

    Posted in: Modification Development
  • 0

    posted a message on so i'm trying to add leaves for the new cherry tree and
    Quote from UpcraftLP»

    Maybe just use this (didn't test if it works, maybe you have to check that this is called on the clientside only):

    @Override
    	public boolean isOpaqueCube(IBlockState state) {
    		return !Minecraft.isFancyGraphicsEnabled();
    	}


    doesn't work either way....

    eh...this is really confusing.
    Posted in: Modification Development
  • 0

    posted a message on so i'm trying to add leaves for the new cherry tree and

    ok, so i've tried calling TEMBlockLeafBase#setGraphicsLevel from like 5 different places and i've gotten a crash with every attempt, and extending BlockLeaves directly as opposed to TEMBlockLeafBase breaks TEMBlockLeaf#getWoodType as mentioned earlier.


    i am officially stumped.

    Posted in: Modification Development
  • 0

    posted a message on so i'm trying to add leaves for the new cherry tree and
    Quote from UpcraftLP»

    Then override getWoodType to use your type instead.



    it yells at me regardless of whether i specifically put an @Override before the function or not, and i'm directly extending BlockLeaves just like you said.

    you sure there isn't a way to just call TEMBlockLeafBase#setGraphicsLevel from TEM_blocks#init or somewhere similar?

    Posted in: Modification Development
  • To post a comment, please or register a new account.