Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

devguydan

Members
  • Posts

    35
  • Joined

  • Last visited

Converted

  • URL
    Https://github.com/djpeach

Recent Profile Visitors

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

devguydan's Achievements

Tree Puncher

Tree Puncher (2/8)

2

Reputation

  1. Read the reply right above yours on how to fix this
  2. Here are a few examples: https://github.com/Cadiboo/Example-Mod/tree/1.15.2/src/main/java/io/github/cadiboo/examplemod/client/gui
  3. Yes, it does. Fairly good example of it's use too. (template_torch.json) { "ambientocclusion": false, "textures": { "particle": "#torch" }, "elements": [ { "from": [ 7, 0, 7 ], "to": [ 9, 10, 9 ], "shade": false, "faces": { "down": { "uv": [ 7, 13, 9, 15 ], "texture": "#torch" }, "up": { "uv": [ 7, 6, 9, 8 ], "texture": "#torch" } } }, ... ] }
  4. No, I don’t think it looks bad at all. It looks proper, if you mean that the base block of your chimney has a shadow. It would, if the flame light is coming from the furnace that is over an edge, the light would cast a shadow at the very base. Is this what you are referring to as “looks horrible”?
  5. Yes! I was trying to get Deferred registers to work based on what I saw in your example mod, but was getting issues with a null registry. I got it all working without deferred registries now, so I plan to revisit it again next time I get a chance to look at it. Also just curious, what are the benefits of the deferred registries over the event hooks? Sounds like they both register things at the correct time.
  6. It sounds like you have not tried much. What have you tried so far? Have you looked at the player class definition for functions that might do what you want? You aren’t going to find a tutorial for everything.
  7. Check out this excellent example mod: https://github.com/Cadiboo/Example-Mod/. Check out the src/main/resources/examplemod/blockstates. Structure your mod similarly. To see how to control blockstates, check out src/main/java/examplemod/block/ModFurnaceBlock. For an example of plant growth blockstates, here is the blockstates for vanilla's carrots.json: { "variants": { "age=0": { "model": "block/carrots_stage0" }, "age=1": { "model": "block/carrots_stage0" }, "age=2": { "model": "block/carrots_stage1" }, "age=3": { "model": "block/carrots_stage1" }, "age=4": { "model": "block/carrots_stage2" }, "age=5": { "model": "block/carrots_stage2" }, "age=6": { "model": "block/carrots_stage2" }, "age=7": { "model": "block/carrots_stage3" } } } Here are the corresponding models for carrots: This is carrots_stage3.json, but obviously the other stages are very similar. { "parent": "block/crop", "textures": { "crop": "block/carrots_stage3" } } You can find all these your self in your External Libraries in Gradle: net.minecraft:client:extra.<version> All this should be more than enough to get you started and more than anyone else here will give you. You'll need to do the rest of the discovery and experimentation yourself. Best of luck.
  8. Just taking a shot in the dark, but would this be block states with different assets? Just give each stage of growth a block state and a corresponding texture.
  9. Yes, either find the func_... function that matches the signature, or update your mappings channel: 'snapshot', '....' in build.gradle
  10. I have been digging through forge, and have not seen how vanilla generates ores yet. I did see the ChunkEvent, which looks promising. Mind pointing me what directories to look in for vanilla world generation? Not too familiar with the code base yet. For anyone in the future, check `DefaultBiomeFeatures` for implementation for structure, entities, ores, blocks, etc
  11. haha Thanks will do Btw the 1.14 version is different. Credit to
  12. biomeIn.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Biome.createDecoratedFeature(Feature.ORE, new OreFeatureConfig(OreFeatureConfig.FillerBlockType.NATURAL_STONE, Blocks.DIAMOND_ORE.getDefaultState(), 8), Placement.COUNT_RANGE, new CountRangeConfig(1, 0, 0, 16))); This is how vanilla registers underground ores. Unfortunately there is no `createDecoratedFeature` function in `Biome` use in `ForgeRegistries.BIOMES`. Vanilla MC has this function in it's Biome class, but Forge's Biome class does not have anything matching this signature. Instead what works is to addFeature with a Underground Ores Decoration, and pass it your ore with a config, giving the config a filler block, your own ore, and the max size to generate the ores in. Then pass a placement config with min and max height, max generation per chunk, etc: @SuppressWarnings({"ConstantConditions"}) @SubscribeEvent public static void FMLLoadCompleteEvent(FMLLoadCompleteEvent event) { for (Biome biome : ForgeRegistries.BIOMES) { biome.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.ORE.withConfiguration(new OreFeatureConfig( OreFeatureConfig.FillerBlockType.NATURAL_STONE, ModBlocks.LOAD_STONE_ORE.getDefaultState(), 8)) .withPlacement(Placement.COUNT_RANGE.configure(new CountRangeConfig(4, 0, 0, 32)))); } } This is in my ModEventSubscriber class obviously. Now I want to make sure I am reading it correctly. Is this saying, that once per chuck (ie, once per 65,536 blocks), it will generate up to 9 ores in a group, and that group may be generated anywhere between levels 0 and 16? If so then the above vanilla example means diamond groups only generate once per 65k blocks? I find that hard to believe. Also for a side note, would updating my snapshot in `build.gradle` give me better names for functions? I am currently using the default 1.15.2 mdk build file with mappings channel: 'snapshot', version: '20190719-1.14.3' Edit: updating this DID resolve some more obsfucated function names.
  13. @SuppressWarnings({"ConstantConditions"}) @SubscribeEvent public static void FMLLoadCompleteEvent(FMLLoadCompleteEvent event) { for (Biome biome : ForgeRegistries.BIOMES) { biome.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.ORE.withConfiguration(new OreFeatureConfig( OreFeatureConfig.FillerBlockType.NATURAL_STONE, ModBlocks.LOAD_STONE_ORE.getDefaultState(), 8)) .withPlacement(Placement.COUNT_RANGE.configure(new CountRangeConfig(4, 0, 0, 32)))); } } Tried this, but unfortunately, withConfiguration is not a function in my case. Note sure why yet. Ok turns out mine was "obsfucated" still? instead of withConfiguration I have func_225566_b_. Anyone know why this happens?
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.