Jump to content

Boy132

Members
  • Posts

    54
  • Joined

  • Last visited

Posts posted by Boy132

  1. 9 minutes ago, warjort said:

    Anyway, make sure you specify a dependecy on the forge mod in your mods.toml and that it says it should be loaded AFTER it.

    That way your mod will be placed above forge in the datapacks when creating new worlds.

    Where obviously you need to replace the $x bits with the real values.

    Thank you! Changing the ordering did the trick.

      

    9 minutes ago, warjort said:

    It's not a good idea to replace vanilla recipes or other vanilla datapack data by default in mods.

    What do you think happens when 2 different mods try to do this.

    Don't worry. I'm going to use conditional recipes and config values later. The example above was basically just for testing.

  2. Hello!

     

    I'm trying to overwrite the vanilla recipes for the wooden tools. I have this "wooden_sword.json" inside "resources/data/minecraft/recipes", for example. When checking ingame the recipe hasn't changed. (wooden sword is still crafted with wood instead of the new dirt)

    I'm also overwriting the recipe for bread the exact same way (created a file "resources/data/minecraft/recipes/bread.json") and for bread it works.

    I also tried it with the stone tools and it also didn't work.

     

    No errors or hints in the logs. I'm using Forge 43.1.1. If you need more information let me know.

    Thanks in advance.

  3. 5 hours ago, urbanxx001 said:

    The darkness is associated with ambient occlusion, in your block class you can modify this with:

    
    @Override
    public float getAmbientOcclusionLightValue(BlockState state, IBlockReader worldIn, BlockPos pos) {
    	return (some float);
    }

    I've found that small values (usually around 0.1F) reduce the dark. Alternatively in your block model json you can disable or enable occlusion with:

    
    "ambientocclusion": true/false

     

    Thank you for your answer! Sadly none of that worked for me, I tried it with 0f, 0.05f, 0.1f and 0.2f (and editing the model json) and the result were the same as before.

  4. So I've made a multiblock structure (and basically followed this video: https://www.youtube.com/watch?v=GQRxeJSoUI4) and everything works fine but there are some lighting problems because the model of the controller is bigger than one block (it is 2x2 blocks):

    image.png.845b4d8b99aa2b8d8c02816d4d50f29d.png

    I know that you used to fix this by overriding isFullBlock and later getRenderLayer but both of these methods don't exist anymore. Using

    RenderTypeLookup.setRenderLayer(block, RenderType.getCutout())

     didn't work either.

  5. First of all this is the wrong section. You would need to post this under "Modding Support". ;)

     

    2 minutes ago, Weirdo said:

    So i followed a tutorial for custom items for 1.15 (whish is the version i use) and he said to do this in the en_US text file under the lang package:

    {
        "item.testmod.test_item": "Test Item"
    }

    Make sure it's a .json file and not a normal .txt file. Check if you modid is really testmod and that the registryname of your item is set to test_item.

  6. 2 minutes ago, Scholler said:
    
    @SubscribeEvent
                public void onKb(LivingKnockBackEvent e) {
                    System.out.println("event called atleast");

     

    Show your whole class and/ or where you register the event.

  7. 9 minutes ago, Miqhtie said:

    sounds.json which is located in resources/assets/memesounds

    
    {
      "giornos_theme": {"category": "ambient","sounds": [{"name": "giornos_theme","stream": false}]}
    }

     

    You need to put your modid in front of name. ("name": "memesounds:giornos_theme")

     

      

    9 minutes ago, Miqhtie said:

    Code to play sound:

    
    player.addChatMessage(new ChatComponentText("New Message >> " + message));

    You play your sound by adding a chat message? Okay

  8. 7 hours ago, superminerJG said:

    However, do you have an example (maybe from an existing mod) that I can look at?

    This should work:

    @Override
    public boolean hasContainerItem()
    {
      return true;
    }
    
    @Override
    public ItemStack getContainerItem(ItemStack itemStack)
    {
      ItemStack stack = itemStack.copy();
      if(stack.attemptDamageItem(1, random, null))
      {
        stack.shrink(1);
        stack.setDamage(0);
      }
      return stack;
    }

     

     

    EDIT: And of course set the max damage in your item's properties. (maxDamage)

×
×
  • Create New...

Important Information

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