Jump to content

trollworkout

Members
  • Posts

    300
  • Joined

Posts posted by trollworkout

  1. There's a few issues some of which are known or WIP and I know forge 1.11 is beta atm. So question is where and when can we post bugs?

     

    There's a few odd things like for example the

    onBlockActivated return true does not wave the hand if you're holding an item is a bug (forge or MC side) . normally hand should always wave

     

    when you're holding  furnace and right click on another Furnace it will actually place it then immediately delete which I think might cause some issues

     

    and so forth.

     

    Since I'm on 1.11 and using it now I wanna start posting these bugs I see somewhere

  2. ...which nobody knows how to use.

    Have you taken a look at this?

    http://mcforge.readthedocs.io/en/latest/blockstates/forgeBlockstates/

     

    ??  :'( yes but is missing the information i need. i need real example of using multiple layers in one model. There's more to it than just json. You also need to edit the java in specific way to return ModelLayer.SOLID && ModelLayer.TRANSPARENT something like that . Plus there's something where you can choose which part of the model renders on which layer which is not shown there.  there's a part of the json where you can choose something like solid : "model.json" transparent: "water.json" blah blah. none of that is in there. I sortof figured all this myself but I never been successful at it. I just read about how MC renders transparency and I learned there are various layers and saw that forge can actually control which layer to render on based on an oldder forge model spec  for version 1 it shows all the functions you can use but no actual example.

    Final resort if no documentation has been found look through the code that reads the json...yeah sounds like a wonderful idea huh?...I wish you the best of luck if you choose to go down that path.

     

    I gave it up cause i could not figure it out. Im just letting people know the multi layers rendering for one model is possible if someone is lucky enough to bump into the right resource or smart enough to figure it out it will fix all these half transparent half opaque model problems.

     

    However everything else suggested above even my hacky erase all hidden faces will make the model WAY more functional than what it is right now.

  3. ...which nobody knows how to use.

    Have you taken a look at this?

    http://mcforge.readthedocs.io/en/latest/blockstates/forgeBlockstates/

     

    ??  :'( yes but is missing the information i need. i need real example of using multiple layers in one model. There's more to it than just json. You also need to edit the java in specific way to return ModelLayer.SOLID && ModelLayer.TRANSPARENT something like that . Plus there's something where you can choose which part of the model renders on which layer which is not shown there.  there's a part of the json where you can choose something like solid : "model.json" transparent: "water.json" blah blah. none of that is in there. I sortof figured all this myself but I never been successful at it. I just read about how MC renders transparency and I learned there are various layers and saw that forge can actually control which layer to render on based on an oldder forge model spec  for version 1 it shows all the functions you can use but no actual example.

  4. There are a few ways to fix this .

     

    I'd personally only do it on armor tick on the boots. Then on boots side you can check if you also wearing a chestplate then increase the chance of trample or something like that.

     

    Boots are what people use to connect to the ground so if you don't wanna trample at all walk bearfoot which nobody will do :D 

     

    Another way to do this is to have some kind of player weight stat and whenever you add or remove armor (certain armors) you add or remove weight. or turn weight on and off.

  5. HOWEVER! if you do that was suggested above  it alleviates the problem you are having and makes it like 90% OK. But not 100% . to go 100% you need to use custom multi-layer forge block state + model which nobody knows how to use.  With this forge model technique you don't need to remove hidden faces it will just work transparent + opaque + whatever.

     

    My method was simply to remove all the hidden faces. Just simply delete them out of the model . For example a shelf side is never visible delete erase that face leave nothing there but only what you see. Almost same effect as above suggestion just easier although probably the z-fighting one seems more advanced and might give you better success than my remove all faces you don't see method :D

     

     

    Also note that I am no expert so anyone please correct me if I am wrong so I can learn too. Don't just delete post and I don't know why or what's going on.

  6. That's not the problem is not z-fighting

     

    The problem is you probably set your model to transparent so you can get that window see thru. The problem you don't know is it messes up the whole model because transparent renders backwards and on a different layer than opaque.

     

    You need to use custom forge model and create some components transparent and some opaque. In that forge custom model you can actually choose which models render on which layer. You wanna put the door on transparent layer and everything else on opaque . In Java you wanna choose the model on opaque and transparent layer mode . There's a choice which layer to use for model.

     

    I have tried this and there is no tutorial  so I have failed miserably and given up.

  7. Wait so that means func_190916_E returns 0 if the stack is invalid? ie it uses the _b one to check if stack is valid and if the _b returns 0 it will also return 0 which is now AIR . Seems Mojang is trying to get rid of null for some reason.

     

    So I am wondering if I can now use _E for null check AND stack size AT THE SAME TIME

     

    no longer need to use stack != null && stack.func_190916_E > 10

    just saying if func_190916_E > 10 is automatically valid ie not null?

  8. this.setRegistryName(new ResourceLocation("plentifulmisc", name));

     

    this looks weird to me because setRegistryName appends modid to whatever you give it so essentially you're saying plentifulmisc:plentifulmisc:name

     

     

    .setRegistryName(name) is enough

     

    Trust me if you do System.out.println(this.getRegistryName()) just below you will see plentifulmisc:name even tho you just set name. it auto appends modid to the getter or something dunno but it does

  9. I am running into a few issues where sometimes a block needs to know an item BEFORE the item is defnined or even BlockA needs to know BlockB but BlockB needs BlockA defined also. So since I'm defining them one at a time it makes for messy code where I have to either use enums or return to one block and add some manual setters and getters etc.

     

    I understand RegistryEvent simply fixes all this stuff and anything can be registered at any time . or is that wrong info?

  10. No you got it 100% incorrect.

     

    blockstate

    {

        "variants": {

            "normal": { "model": "plentifulmisc:xianite" }

        }

    }

     

    item

    {

        "parent": "plentifulmisc:block/xianite"

    }

     

    block

    {

        "parent": "block/cube_all",

        "textures":

        {

            "all": "plentifulmisc:blocks/xianite"

        }

    }

     

    block/cube_all defines 1st person, 3rd person, 1st person offhand and inventory which the item will read as it has the block as parent. so essentially you're making the item the 3d block instead of a custom 16x16 texture.

  11. You need to understand how it actually works.  Look in item/generated or block/cube_all see what's going on  how a json model is set up to display stuff.

     

    You need to define first person hand, 1st person left hand, 3rd person, inventory properties otherwise the item or block will displayed same size everywhere.  Extending any vanilla MC parent generally will have all this done for you.

  12. So how would I get what I'm right clicking on, and to check if its a plant or not?

     

    I have somewhat of an idea on how to update the ticks more often.

     

    You get the object you are aiming at and check if is instaceof BlockCrop  or instance of BlockBush something like that  then you just do a bonemeal like effect on it  or whatver idea you got.

     

    to get the block is actually already provited for you there's a function called onItemUsed in Item class. You need to figure out how to use that. It has some variables that you can use to get the block you're aiming at but I think you can only point at things you can reach so not too far.

  13. Feel free to also have a look over my project on github as I have created a fully working wood set: log, leaves, sapling with tree gen, plank, door, slab and stairs.

    https://github.com/trollworkout/technorcery

     

    Well almost fully the only missing piece of the puzzle is fence and gate.

     

    I understand my methods are different from what most people do. I like to reduce the amount of clutter by using  multipurpose classes and avoid using sub blocks or packing sub blocks into one block like for ex Log or NewLog does this. I use a custom WoodType enum found in my custom plank class and is used by everything wood including doors. 

     

    For ex my Sapling block class

    https://github.com/trollworkout/technorcery/blob/master/src/main/java/com/technorcery/common/blocks/SaplingBlock.java

     

    I think I could not extend original Sapling class because it had a constructor for VARIANT or TYPE meta in the sapling which contractor cannot be overriden so I had to make my own. is been a few weeks so I don't fully remember now. but it works!

  14. While the advice trollworkout is mostly correct, I would make one small change:

     

    Rather than

    item.setUnlocalizedName("ingot_copper").setRegistryName("ingot_copper")

    I would do:

     

    item.setRegistryName("ingot_copper");
    item.setUnlocalizedName(getRegistryName();

     

    This puts your modID in your unlocalized name string, which avoids conflicts, should another mod use the same unlocalized name (which for an item like "ingot_copper" is non-zero).

     

    Thank you that is a good point.

×
×
  • Create New...

Important Information

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