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


  • Posts

  • Joined

  • Last visited

  • Days Won


samjviana last won the day on March 7

samjviana had the most liked content!

1 Follower

Recent Profile Visitors

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

samjviana's Achievements

Stone Miner

Stone Miner (3/8)



  1. Don't know if i am missing something but i spent the last hours trying to understand how to use getWeightedItem(List<T> p_146315_, int p_146316_) (as in 1.17.1), by looking in 1.16 i can assume that are the models and p_146316_ are the weight. The thing is that i could figure out how to get those values, but anyway, i'll give this up, and intead i'll rewrite the blockstate to use FACING, i think ... and HOPE, i will be better to work out. thanks anyway
  2. Sorry for bringing back this topic but can you explain better how i can get the current rotation of the block? I looked at WeightedBakedModel but i couldn't find/understand how can i get the current rotated baked model.
  3. Oohhh, now i understand what you're mean with "multiple models" lol, the answer was on my face. I'll edit to 1 model only, thanks
  4. can i override this? or at least get what is the current rotation.
  5. Sorry, i'm creating a mod. The block has multiple models, with 1, 2 and 3 mushrooms, like so: but i still does'n get why is it that it appears in diferent directions when placed, i'll post the blockstate.json below. Actually was started to think that is some default mechanic of minecraft even the grass block has some "randomness" when placed, you can see this pushing it with an piston, right when it change it position, the block "rotates": { "variants": { "mushrooms=1": [ { "model": "bunchofthings:block/yellow_mushroom" }, { "model": "bunchofthings:block/yellow_mushroom", "y": 90 }, { "model": "bunchofthings:block/yellow_mushroom", "y": 180 }, { "model": "bunchofthings:block/yellow_mushroom", "y": 270 } ], "mushrooms=2": [ { "model": "bunchofthings:block/two_yellow_mushroom" }, { "model": "bunchofthings:block/two_yellow_mushroom", "y": 90 }, { "model": "bunchofthings:block/two_yellow_mushroom", "y": 180 }, { "model": "bunchofthings:block/two_yellow_mushroom", "y": 270 } ], "mushrooms=3": [ { "model": "bunchofthings:block/three_yellow_mushroom" }, { "model": "bunchofthings:block/three_yellow_mushroom", "y": 90 }, { "model": "bunchofthings:block/three_yellow_mushroom", "y": 180 }, { "model": "bunchofthings:block/three_yellow_mushroom", "y": 270 } ] } }
  6. So i have this mushroom block, that should be the same when placed, but event without any facing or direction property set it appears pointing to an direction:
  7. Thanks... I was implementing your idea, then i realized that if i check the block using the height 0 (kinda like "the block that the entity is in") it will always detect air when the player is standing in any full block (OF COURSE), including an full block of slabs but when the entity is standing in an half slab block, the block detected will be the slab, the entity is above the half salb, but is inside the block containing the slab, pretty confuse hahaha. With that in mind i verify if the block that the player is inserted in, is an slab, and if it's not than i verify the block below with world.getBlockState(entity.getPosition().down()), worked like a charm.
  8. Is there a way to detect which block is below and given entity, in a way that it work for full blocks, slabs, and fences/walls. Actually i can detect the block below the entity using world.getBlockState(entity.getPosition().down()), but then it won't work for half slabs, and if i write an "verification" if the Y pos is .5 (half slab) then it won't detect if it is above an wall.
  9. As from the integer "6" you asked ... it represent the vein size that the ore will try to generate.
  10. Only of it is something specific that the default vanilla features can't solve. For ore generation you could use Feature.ORE (default ore generation), Feature.EMERALD_ORE (which generates only in mountain biome) or Feature.No_SURFACE_ORE (ancient debris feature, an ore that has no contact with air blocks)
  11. The add function needs an "Supplier<ConfiguredFeature<?, ?>>" your lambda function is returning a type Ingredient you would need to return an ConfiguredFeature, like so: if (event.getCategory() != Biome.Category.NETHER && event.getCategory() != Biome.Category.THEEND) { event.getGeneration().getFeatures(GenerationStage.Decoration.UNDERGROUND_ORES).add( () -> Feature.ORE.withConfiguration( new OreFeatureConfig(OreFeatureConfig.FillerBlockType.BASE_STONE_OVERWORLD, RegistryHandler.MY_ORE.get().getDefaultState(), 6) ) ); }
  12. You can use your IDE to look the source code of Vanilla Classes ... The classes you would like to see are net.minecraft.world.gen.feature.Feature and net.minecraft.world.gen.feature.Features.
  13. In which moment the game crashes? on you interact with a block?
  14. It might have an better way to do this by checking the dimension of the biome, but i have to admit that i don't know how to check the dimension XD So ... you could check if the biome is NOT NETHER or THEEND Category, something like: if (event.getCategory() != Biome.Category.NETHER && event.getCategory() != Biome.Category.THEEND)
  15. The error is happening when it tries to get the Player inventoty but it seems to get an empty Array right?🤔
  • Create New...

Important Information

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