Everything posted by samjviana
-
[1.16.5] Block being placed with rotation
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.
-
[1.16.5] Block being placed with rotation
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
-
[1.16.5] Block being placed with rotation
can i override this? or at least get what is the current rotation.
-
[1.16.5] Block being placed with rotation
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 } ] } }
-
[1.16.5] Block being placed with rotation
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:
-
[1.16.5] Detect block below entity
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.
-
[1.16.5] Detect block below entity
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.
-
Custom Ore Generation help
As from the integer "6" you asked ... it represent the vein size that the ore will try to generate.
-
Custom Ore Generation help
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)
-
Custom Ore Generation help
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) ) ); }
-
Custom Ore Generation help
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.
-
AL lib: (EE) alc_cleanup: 1 device not closed when opening a GUI
In which moment the game crashes? on you interact with a block?
-
Custom Ore Generation help
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)
-
AL lib: (EE) alc_cleanup: 1 device not closed when opening a GUI
The error is happening when it tries to get the Player inventoty but it seems to get an empty Array right?🤔
-
Custom Ore Generation help
You would need to listen to BiomeLoadingEvent (), you could register an function to it like this: MinecraftForge.EVENT_BUS.addListener(EventPriority.HIGH, onBiomeLoading); As from the javadocs of the event: "This event fires when a Biome is created from json or when a registered biome is re-created for worldgen" With this done you would just need to "treat" the biome in the listener and add any feature (like ore generation) you need. An exemple of listener: public static void onBiomeLoading(final BiomeLoadingEvent event) { /* Check which biome are being loaded, example: if the biome is TAIGA or SWAMP */ if (event.getCategory() == Biome.Category.TAIGA || event.getCategory() == Biome.Category.SWAMP) { /* Get UNDERGROUND_ORES features of the biome */ event.getGeneration().getFeatures(GenerationStage.Decoration.UNDERGROUND_ORES ).add( /* adding COAL_ORE with some configuration */ () -> Blocks.COAL_ORE.withConfiguration(...) ); } } As from the configuration you could look at the Vanilla default ore generation features to get what you want.
-
Custom Ore Generation help
which version of forge are you using?
-
AL lib: (EE) alc_cleanup: 1 device not closed when opening a GUI
Can you show this function? com.putopug.combat7.objects.blocks.CraftoxBlock$BlockCus.onBlockActivated(CraftoxBlock.java:176)
-
When I try to run my mod after I just added Deferred Registries it crashes
oh, my bad ... didn't see that XD them he could just delete those entries, no?
-
When I try to run my mod after I just added Deferred Registries it crashes
Maybe he could do something like this, if i'm not mistaken: @SubscribeEvent public static void onRegisterItem(final RegistryEvent.Register<Item> event) { final IForgeRegistry<Item> registry = event.getRegistry(); ModBlocks.BLOCKS.getEntries().stream().map(RegistryObject::get).forEach(block -> { if (!isInFilter(block)) { return; } else { final BlockItem blockItem = new BlockItem(block, properties); blockItem.setRegistryName(block.getRegistryName()); registry.register(blockItem); } }); }
-
When I try to run my mod after I just added Deferred Registries it crashes
I think that those "Item" Registry Entries aren't even necessary, you could subscribe the RegistryEvent.Register<Item> and them register an BlockItem for those Blocks, unlesse you need something specific.
-
When I try to run my mod after I just added Deferred Registries it crashes
what @Draco18s is saying is that the "tutorial_slab", "tutorial_stairs" and "lime_linoleum" are repeated you need to change those as well, as said before, every item, block, entity, etc had to have an unique name.
-
When I try to run my mod after I just added Deferred Registries it crashes
the log file can be found in the "run/logs/debug.log" or "run/logs/latest.log". also, the code that @Luis_ST asked would be usefull.
-
When I try to run my mod after I just added Deferred Registries it crashes
could you send the latest.log or the debug.log files?
-
[1.16.5] How to make EnchantedBook go to Custom ItemGroup
Oh ... such a simple thing LOL, pretty dumb of me by not realizing that. Thanks for the help ... i'll remove this line.
-
[1.16.5] How to make EnchantedBook go to Custom ItemGroup
i have other entries in the lang file that work well ... https://github.com/samjviana/bunchofthings
IPS spam blocked by CleanTalk.