Jump to content

Pinary

Members
  • Posts

    14
  • Joined

  • Last visited

Converted

  • Gender
    Male

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Pinary's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I was trying to fix an issue where my class related to rendering colors wasn't working because I didn't specify that it should load on just the client side and not the server. I'm currently at a point where it's not crashing nor giving me any errors, but it's also not functioning as intended in that the ferns in the pots aren't being colored according to the biome they're in and I seem to be stuck lol. Anyway, here's the code I'm working with: https://gist.github.com/Pinary-Pi/96acbbbd6edf4a767c333c69fa3b3f5b Any help would be strongly appreciated.
  2. I have found that doing what the title says doesn't work, so here's how to fix it and make it work. You need to add your blocks to the proper tag for it to work. So, for example if you want your blocks to be mined with a pickaxe you need to add the tag "#minecraft:minable/pickaxe" to your block.
  3. The solution was to delete client:extra jar from ~/.gradle/caches/forge_gradle/minecraft_repo/versions/1.17.1
  4. I was actually able to figure it out with the help of some people on a discord server! Thanks for trying to help though.
  5. I also got the exact same error running the 1.17 mdk
  6. I'm trying to upgrade my 1.16 mod to 1.17, and after updating my code, I get this error. Exception in thread "main" java.lang.RuntimeException: java.lang.StringIndexOutOfBoundsException: begin 0, end -1, length 3 at MC-BOOTSTRAP/cpw.mods.modlauncher@9.0.7/cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:39) at MC-BOOTSTRAP/cpw.mods.modlauncher@9.0.7/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) at MC-BOOTSTRAP/cpw.mods.modlauncher@9.0.7/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) at MC-BOOTSTRAP/cpw.mods.modlauncher@9.0.7/cpw.mods.modlauncher.Launcher.run(Launcher.java:106) at MC-BOOTSTRAP/cpw.mods.modlauncher@9.0.7/cpw.mods.modlauncher.Launcher.main(Launcher.java:77) at MC-BOOTSTRAP/cpw.mods.modlauncher@9.0.7/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) at MC-BOOTSTRAP/cpw.mods.modlauncher@9.0.7/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) at cpw.mods.bootstraplauncher@0.1.16/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:89) Caused by: java.lang.StringIndexOutOfBoundsException: begin 0, end -1, length 3 at java.base/java.lang.String.checkBoundsBeginEnd(String.java:3751) at java.base/java.lang.String.substring(String.java:1907) at cpw.mods.securejarhandler@0.9.46/cpw.mods.cl.ModuleClassLoader.loadClass(ModuleClassLoader.java:128) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:519) at java.base/java.lang.Class.getDeclaredMethods0(Native Method) at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3334) at java.base/java.lang.Class.getMethodsRecursive(Class.java:3475) at java.base/java.lang.Class.getMethod0(Class.java:3461) at java.base/java.lang.Class.getMethod(Class.java:2193) at MC-BOOTSTRAP/fmlloader@1.17.1-37.0.25/net.minecraftforge.fml.loading.targets.ForgeClientUserdevLaunchHandler.lambda$launchService$0(ForgeClientUserdevLaunchHandler.java:38) at MC-BOOTSTRAP/cpw.mods.modlauncher@9.0.7/cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) ... 7 more I can't for the life of me, figure out why it is giving me this error.
  7. Tysm! This will save me so much time.
  8. Is it possible to make a furnace recipe with data generators? Sorta like this ShapedRecipeBuilder.shapedRecipe(ModBlocks.CHISELED_BRICKS.get()) .key('#', Blocks.BRICK_SLAB) .patternLine("#") .patternLine("#") .addCriterion("has item", hasItem(Blocks.BRICK_SLAB)) .build(consumer); But for furnaces.
  9. Tysm! Whoops, I thought I posted it under Modder Support. Sorry about that...
  10. I am able to create the wall block and it can connect to other blocks. My problem is they won't connect to themselves. The picture shows the problem. I also can't get the item to look correct. My code: Makes Wall Block public static final RegistryObject<WallBlock> WHITE_BRICK_WALL = register("white_brick_wall", () -> new WallBlock(AbstractBlock.Properties.create(Material.ROCK).hardnessAndResistance(2, 6).sound(SoundType.STONE))); Block State wallBlock(ModBlocks.WHITE_BRICK_WALL.get(), modLoc("block/white_bricks")); Item Model withExistingParent("white_bricks", modLoc("block/white_bricks")); Thanks for look at the problem
  11. Tysm! I was able to get it working
  12. Is there a way to generate stonecutter recipes using data generators like this? ShapelessRecipeBuilder.shapelessRecipe(ModItems.WHITE_BRICK.get()) .addIngredient(Tags.Items.INGOTS_BRICK) .addIngredient(Tags.Items.DYES_WHITE) .addCriterion("has item", hasItem(Tags.Items.INGOTS_BRICK)) .build(consumer); I've looked around but can't seem to find one
  13. TYSSSM!! It means a lot to me that you helped!
  14. I'm very new to modding (this is my first mod), so sorry if this seem stupid. I'm using data generators to generate my recipes and whenever I run them it doesn't give any errors, but it also fails to generate the recipes. My Code: package net.Pinary_Pi.my1stmod.data.recipes; import java.util.function.Consumer; import net.minecraft.data.IFinishedRecipe; import net.minecraft.data.RecipeProvider; import net.Pinary_Pi.gear.item.CraftingItems; import net.Pinary_Pi.my1stmod.setup.ModItems import net.Pinary_Pi.my1stmod.setup.ModTags; import net.minecraft.data.DataGenerator; import net.minecraft.data.ShapedRecipeBuilder; public class ModRecipesProvider extends RecipeProvider { public ModRecipesProvider(DataGenerator generatorIn) { super(generatorIn); } @Override protected void registerRecipes(Consumer<IFinishedRecipe> consumer) { ShapedRecipeBuilder.shapedRecipe(CraftingItems.STORAGE_BLOCKS_SILVER) .key('#', ModTags.Items.INGOTS_SILVER) .patternLine("###") .patternLine("###") .patternLine("###") .addCriterion("has item", hasItem(ModTags.Items.INGOTS_SILVER)) .build(consumer); ShapedRecipeBuilder.shapedRecipe(CraftingItems.INGOTS_SILVER, 9) .key('#', ModTags.Items.STORAGE_BLOCKS_SILVER) .patternLine("#") .addCriterion("has item", hasItem(ModTags.Items.STORAGE_BLOCKS_SILVER)) .build(consumer); } } I'm pretty sure I need to change the CraftingItems to something different, but everything else I put there causes an error that says "The method shapedRecipe(IItemProvider, int) in the type ShapedRecipeBuilder is not applicable for the arguments (RegistryObject<Item>, int). " I know I need to do something with IItemProvider, but I don't know how. CraftingItems is a library that someone named SilentChaos512 made that I saw him using in his mods; I tried to copy what he did with it and put it in my mod. I'm pretty sure I'm not using it correctly.
×
×
  • Create New...

Important Information

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