Jump to content
  • Home
  • Files
  • Docs
Status Updates
  • All Content

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Talp1

Talp1

Members
 View Profile  See their activity
  • Content Count

    12
  • Joined

    August 7, 2020
  • Last visited

    Saturday at 12:42 PM

Community Reputation

0 Neutral

About Talp1

  • Rank
    Tree Puncher

Recent Profile Visitors

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

  1. Talp1

    [Solved] [1.16.1] Vines Generation Help

    Talp1 replied to Talp1's topic in Modder Support

    If somebody would ever need this, after a bit of testing I got a pretty good result, here's what I ended up with. Feature: public class FlorealVineFeature extends Feature<NoFeatureConfig> { public FlorealVineFeature(Codec<NoFeatureConfig> p_i232002_1_) { super(p_i232002_1_); } public boolean func_230362_a_(ISeedReader worldIn, StructureManager strucManager, ChunkGenerator chucnkGen, Random rand, BlockPos pos, NoFeatureConfig config) { BlockPos.Mutable blockPos = new BlockPos.Mutable().setPos(pos.getX(), pos.getY(), pos.getZ()); BlockState currentBlockState = worldIn.getBlockState(blockPos); for (Direction direction : Direction.Plane.HORIZONTAL) { if (blockPos.getY()>63 && currentBlockState==Blocks.AIR.getDefaultState()){ checkSorroundingBlocks(blockPos, worldIn, rand, direction); } } return true; } private boolean checkValidSpot(Direction dir, BlockPos pos, ISeedReader worldIn,BlockPos originalPos){ if(worldIn.getBlockState(pos).getBlock() instanceof LeavesBlock){ return RegistryHandler.floreal_vines.get().isValidPosition(RegistryHandler.floreal_vines.get().getDefaultState().with(VineBlock.getPropertyFor(dir), Boolean.TRUE),worldIn,originalPos); } return false; } private void checkSorroundingBlocks(BlockPos blockPos, ISeedReader worldIn, Random rand, Direction dir){ if (checkValidSpot(dir, blockPos.east(),worldIn,blockPos)){ worldIn.setBlockState(blockPos, RegistryHandler.floreal_vines.get().getDefaultState().with(VineBlock.getPropertyFor(dir), Boolean.TRUE), 2); for (int i=0; i<=rand.nextInt(3);i++) { if (worldIn.getBlockState(blockPos.add(0, -(i), 0)) == Blocks.AIR.getDefaultState()) { worldIn.setBlockState(blockPos.add(0, -(i), 0), RegistryHandler.floreal_vines.get().getDefaultState().with(VineBlock.getPropertyFor(dir), Boolean.TRUE), 2); } } } if (checkValidSpot(dir, blockPos.west(),worldIn,blockPos)){ worldIn.setBlockState(blockPos, RegistryHandler.floreal_vines.get().getDefaultState().with(VineBlock.getPropertyFor(dir), Boolean.TRUE), 2); for (int i=0; i<=rand.nextInt(3);i++) { if (worldIn.getBlockState(blockPos.add(0, -(i), 0)) == Blocks.AIR.getDefaultState()) { worldIn.setBlockState(blockPos.add(0, -(i), 0), RegistryHandler.floreal_vines.get().getDefaultState().with(VineBlock.getPropertyFor(dir), Boolean.TRUE), 2); } } } if (checkValidSpot(dir, blockPos.north(),worldIn,blockPos)){ worldIn.setBlockState(blockPos, RegistryHandler.floreal_vines.get().getDefaultState().with(VineBlock.getPropertyFor(dir), Boolean.TRUE), 2); for (int i=0; i<=rand.nextInt(3);i++) { if (worldIn.getBlockState(blockPos.add(0, -(i), 0)) == Blocks.AIR.getDefaultState()) { worldIn.setBlockState(blockPos.add(0, -(i), 0), RegistryHandler.floreal_vines.get().getDefaultState().with(VineBlock.getPropertyFor(dir), Boolean.TRUE), 2); } } } if (checkValidSpot(dir, blockPos.south(),worldIn,blockPos)){ worldIn.setBlockState(blockPos, RegistryHandler.floreal_vines.get().getDefaultState().with(VineBlock.getPropertyFor(dir), Boolean.TRUE), 2); for (int i=0; i<=rand.nextInt(3);i++) { if (worldIn.getBlockState(blockPos.add(0, -(i), 0)) == Blocks.AIR.getDefaultState()) { worldIn.setBlockState(blockPos.add(0, -(i), 0), RegistryHandler.floreal_vines.get().getDefaultState().with(VineBlock.getPropertyFor(dir), Boolean.TRUE), 2); } } } } } Gen: @Mod.EventBusSubscriber(modid = Main.MODID, bus = Mod.EventBusSubscriber.Bus.MOD) public class VinesGen { @SubscribeEvent public static void generateVines(FMLLoadCompleteEvent event){ for (Biome biome : ForgeRegistries.BIOMES){ if (biome.getCategory()== Biome.Category.SWAMP||biome== Biomes.FLOWER_FOREST||biome.getCategory()== Biome.Category.JUNGLE){ biome.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, RegistryHandler.floreal_vine_feature.get().withConfiguration(IFeatureConfig.NO_FEATURE_CONFIG).withPlacement(Placement.COUNT_HEIGHTMAP.configure(new FrequencyConfig(600)))); } } } }
    • August 22, 2020
    • 4 replies
  2. Talp1

    [1.15.1] How to make a Block with a GUI (like a furnace)?

    Talp1 replied to DragonITA's topic in Modder Support

    You may also find useful the 2nd and 3rd episode of McJty's tut series. If you never tried, of course you won't be able to do it. Just research before asking for help! Devi avere pazienza
    • August 18, 2020
    • 14 replies
  3. Talp1

    recipe with any tipe of wood

    Talp1 replied to BlakeBrad's topic in Modder Support

    Just look at how vanilla does that. (It's good practice to make some research before opening topics, so maybe also try to look up about Tags, I think you'll need it. I dont think that just copying minecraft:planks in your json will get your recipe works with your wood type.) That's how Vanilla handle chest crafting (you may found it useful later): { "type": "minecraft:crafting_shaped", "pattern": [ "###", "# #", "###" ], "key": { "#": { "tag": "minecraft:planks" } }, "result": { "item": "minecraft:chest" } }
    • August 17, 2020
    • 2 replies
  4. Talp1

    My block isnt getting the atributes that i want

    Talp1 replied to BlakeBrad's topic in Modder Support

    No! .setRequiresTool() does not take any parameter, just add it.
    • August 17, 2020
    • 5 replies
  5. Talp1

    My block isnt getting the atributes that i want

    Talp1 replied to BlakeBrad's topic in Modder Support

    Try to add .setRequiresTool()
    • August 17, 2020
    • 5 replies
  6. Talp1

    Learn mod programming

    Talp1 replied to erword_'s topic in General Discussion

    I found @ChampionAsh5357 and @tcode2k16 guides pretty helpful, here's the links: https://championash5357.github.io/ChampionAsh5357/tutorial/minecraft/ https://thebookofmodding.ml/ Also keep in mind that some of the code for 1.14/1.15 works in 1.16 as well. If you prefer some YT tutorials, I suggest the ones form McJty, here's the playlist and his wiki: https://www.youtube.com/playlist?list=PLmaTwVFUUXiDRjPTbDmBgJZN4MeQ5uYby https://wiki.mcjty.eu/modding/index.php?title=YouTube-Tutorials#Introduction
    • August 11, 2020
    • 1 reply
  7. Talp1

    [1.16.1] Sweet Berry Bush Block Drop not Changing

    Talp1 replied to Pickle_Face5's topic in Modder Support

    Glad to be of help
    • August 11, 2020
    • 4 replies
  8. Talp1

    [1.16.1] Sweet Berry Bush Block Drop not Changing

    Talp1 replied to Pickle_Face5's topic in Modder Support

    If I'm not wrong, you actually need to override the method onBlockActivated as well. Just keep it identical as vanilla and replace the Sweetberry Item in spawnAsEntity with your blue berry. I did this in my own Blueberry bush and it's working just fine!
    • August 11, 2020
    • 4 replies
  9. Talp1

    what does this crash report mean? i installed a dark theme mod and now i cant open my world

    Talp1 replied to Chane Scrambled's topic in Support & Bug Reports

    I'm not an expert and I dont have a really good knowledge about crash reports and minecraft/forge code, but judging by those lines, it seems that VoxelMap is generating a NullPointerException (I assume, looking at the error, during some rendering process for the Waypoint labels, or something similar). Try to remove VoxelMap or maybe the dark theme mod that you installed. Keep in mind that I might be wrong. Hope to be of help anyways.
    • August 10, 2020
    • 2 replies
  10. Talp1

    [Solved] [1.16.1] Vines Generation Help

    Talp1 replied to Talp1's topic in Modder Support

    So... since I need my gen to do the exact same as the vanilla vine's one, I pretty much created a new identical feature changing the vanilla vine block with mine: public class FlorealVineFeature extends Feature<NoFeatureConfig> { private static final Direction[] DIRECTIONS = Direction.values(); public FlorealVineFeature(Codec<NoFeatureConfig> p_i232002_1_) { super(p_i232002_1_); } public boolean func_230362_a_(ISeedReader p_230362_1_, StructureManager p_230362_2_, ChunkGenerator p_230362_3_, Random p_230362_4_, BlockPos p_230362_5_, NoFeatureConfig p_230362_6_) { BlockPos.Mutable blockpos$mutable = p_230362_5_.toMutable(); for(int i = p_230362_5_.getY(); i < 256; ++i) { blockpos$mutable.setPos(p_230362_5_); blockpos$mutable.move(p_230362_4_.nextInt(4) - p_230362_4_.nextInt(4), 0, p_230362_4_.nextInt(4) - p_230362_4_.nextInt(4)); blockpos$mutable.setY(i); if (p_230362_1_.isAirBlock(blockpos$mutable)) { for(Direction direction : DIRECTIONS) { if (direction != Direction.DOWN && VineBlock.canAttachTo(p_230362_1_, blockpos$mutable, direction)) { p_230362_1_.setBlockState(blockpos$mutable, RegistryHandler.floreal_vines.get().getDefaultState().with(VineBlock.getPropertyFor(direction), Boolean.TRUE), 2); break; } } } } return true; } } I then registered my feature like this: (Obviously I registered my FEATURES register as well, in an init() method) public static final RegistryObject<Feature<NoFeatureConfig>> floreal_vine_feature = FEATURES.register("floreal_vine_feature", ()->new FlorealVineFeature(NoFeatureConfig.field_236558_a_)); and finally, I used this code for the generation itself: @Mod.EventBusSubscriber(modid = Main.MODID, bus = Mod.EventBusSubscriber.Bus.MOD) public class VinesGen { @SubscribeEvent public static void generateVines(FMLLoadCompleteEvent event){ for (Biome biome : ForgeRegistries.BIOMES){ if (biome.getCategory()== Biome.Category.SWAMP||biome== Biomes.FLOWER_FOREST||biome.getCategory()== Biome.Category.JUNGLE){ biome.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, RegistryHandler.floreal_vine_feature.get().withConfiguration(IFeatureConfig.NO_FEATURE_CONFIG).withPlacement(Placement.COUNT_HEIGHT_64.configure(new FrequencyConfig(25)))); } } } } I tried to stick as vanilla style as much as possible, but yet no luck: my vines are not generating in the world, no errors or warns in the console tho, the registrations seems to happen just fine. What am I missing? I apologize if I made a stupid error... but i cant really find out where I messed up
    • August 10, 2020
    • 4 replies
  11. Talp1

    [Solved] [1.16.1] Vines Generation Help

    Talp1 replied to Talp1's topic in Modder Support

    First of all, thanks for answeing! Yup, I think I'm gonna try to create somethig that check that if a block is a leaf/log then it places my custom vine on it. It's gonna be a challenge but I'll eventually figure it out, I hope. I'll relpy on this topic in case I need help with that. Thank you for the hint!
    • August 8, 2020
    • 4 replies
  12. Talp1 Talp1 changed their profile photo August 7, 2020
  13. Talp1 started following [Solved] [1.16.1] Vines Generation Help August 7, 2020
  14. Talp1

    [Solved] [1.16.1] Vines Generation Help

    Talp1 posted a topic in Modder Support

    Hi everyone! I'm pretty new to modding and I'm trying to figure out how to generate custom vines in certains biomes. So far i have created the vine block and the item to place that block, but i can't figure out how to make this block generate in the world. Thats what i have started with: @Mod.EventBusSubscriber(modid = Main.MODID, bus = Mod.EventBusSubscriber.Bus.MOD) public class VinesGen { @SubscribeEvent public static void generateVines(FMLLoadCompleteEvent event){ for (Biome biome : ForgeRegistries.BIOMES){ if (biome.getCategory()== Biome.Category.SWAMP||biome== Biomes.FLOWER_FOREST) } } } I noticed that there's a feature for vines, but it takes in NoFeatureConfig, causing my block to not be "selected" for the generation. Here's the code i'm talking about: biome.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.VINES.withConfiguration(new NoFeatureConfig())); So, how could i make my vines to generate? Have I to create a custom gen?
    • August 7, 2020
    • 4 replies
  • All Activity
  • Home
  • Talp1
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community