-
Posts
687 -
Joined
-
Last visited
-
Days Won
10
Everything posted by Beethoven92
-
"mods.toml missing metadata for modid examplemod"
Beethoven92 replied to Arnox's topic in Modder Support
At this point, maybe just starting a new fresh project would be a good idea, and see if the problem still appears -
Forge 1.16.1 crashing after startup
Beethoven92 replied to PiscesIscariot's topic in Support & Bug Reports
Post crash logs -
"mods.toml missing metadata for modid examplemod"
Beethoven92 replied to Arnox's topic in Modder Support
Sorry, by "setup your build.gradle" i meant, re run genEclipseRuns. Should have specified that -
"mods.toml missing metadata for modid examplemod"
Beethoven92 replied to Arnox's topic in Modder Support
You should also change those in your build.gradle to the values specific to your mod. If you use "exmod" as your modid, your package name also has to reflect that. So, your com.arnox.ExampleMod should become com.arnox.exmod (you should really put your package names all in lowercase). So change the 'group' and 'archivesBaseName' fields respectively with 'com.arnox.exmod' an 'exmod'. Setup your build.gradle again after changing anything inside it to refresh it with the new values -
"mods.toml missing metadata for modid examplemod"
Beethoven92 replied to Arnox's topic in Modder Support
Show the package explorer in your IDE please -
Block Damage From Specific DamageSource
Beethoven92 replied to Achilleus117's topic in Modder Support
There is a "caster" field inside LightningBoltEntity which stores a ServerPlayerEntity, and you can set this field with the setCaster method. Now...when in your item class you create the bolt entity, you can set its caster to the player that is holding the item. Then you would need to retrieve the caster of the bolt in your event handler. Problem, the "caster" field is private and you would have to use access transformers to make it public. I am not sure if this would work though.. -
You need to put your block in the block tags for campfires. ChampionAsh already gave you the answer for that
-
Are you trying to make this work for vanilla bed or just for your custom bed? If you are trying to cancel the collision with vanilla bed thats not what Override is for. Look here for TER reference: https://mcforge.readthedocs.io/en/latest/tileentities/tesr/ Or just look at the vanilla bed block and BedTileEntityRenderer class to get and idea
-
[1.16.1] Spawning a bush in the nether
Beethoven92 replied to Timebreaker900's topic in Modder Support
I see...it seems that the NetherVegetationFeature is tied to the vegetal biomes, what a surprise ๐ค ...there is another solution if you want your block to spawn also in the Nether Wastes, and thats to use the Decoration#UNDERGROUND_DECORATION (also VEGETATION is fine) stage and Feature#RANDOM_PATCH configured with a BlockClusterFeatureConfig. If you look into the NetherWastesBiome class you will see how mushrooms are generated there. Use a similar code to generate your bush adjusting the values you need. Your initial code for the BlockClusterFeatureConfig was not set up correctly and thats why it wasn't working. There is a function inside BlockClusterFeatureConfig.Builder which is func_227317_b_() which basically sets a boolean field (also not mapped for me) inside the class. I tested and it seems that you need to chain also that method to the Builder, otherwise your block won't show up. This should definitely solve your problems -
[1.16.1] Spawning a bush in the nether
Beethoven92 replied to Timebreaker900's topic in Modder Support
You already had the cycle through biomes. Just check if the biome is a nether biome, and add your feature to it. This if you want your bush to be generated in every nether biome -
[1.16.1] Spawning a bush in the nether
Beethoven92 replied to Timebreaker900's topic in Modder Support
Keep in mind though that your block extends a BushBlock. So you will be able to place you nether bush on overworld blocks too (DIRT, GRASS..). You can also do this with the vanilla nether vegetation since that also extends BushBlock. Not sure if this behaviour is intentional or if it will be changed in the future, because honestly is a bit weird -
[1.16.1] Spawning a bush in the nether
Beethoven92 replied to Timebreaker900's topic in Modder Support
I just did what i suggested you to do. So to mimic the behaviour of other vanilla nether vegetation. Override isValidGround in your block class, delete your implementation of isValidPosition. When adding the feature to your biomes use the NetherVegetationFeature, so the Feature#field_236282_M_ ...this feature requires a BlockStateProvidingFeatureConfig configuration and nothing more. So replace your BlockClusterFeatureConfig with this one (if you look into the DefaultBiomeFeatures class you will see how that config is created, look for NETHER_SPROUTS and CRIMSON_ROOTS_FEATURE_CONFIG)...you should see that your bush is now being generated on nether rack -
[1.16.1] Spawning a bush in the nether
Beethoven92 replied to Timebreaker900's topic in Modder Support
-
[1.16.1] Spawning a bush in the nether
Beethoven92 replied to Timebreaker900's topic in Modder Support
Gonna dig a bit more into that -
[1.16.1] Spawning a bush in the nether
Beethoven92 replied to Timebreaker900's topic in Modder Support
It shouldn't...i tried myself quickly adding an existing feature in a nether biome where it is not supposed to generate and it worked perfectly. What you have to do here in my opinion is to mimic vanilla nether sprout, roots etc generation -
[1.16.1] Spawning a bush in the nether
Beethoven92 replied to Timebreaker900's topic in Modder Support
Oh sorry, i forgot, try deleting your custom isValidPosition method. Let it be handled by the superclass. Only override isValidGround in your class -
[1.16.1] Spawning a bush in the nether
Beethoven92 replied to Timebreaker900's topic in Modder Support
Very weird indeed, this is the exact same way vanilla nether vegetals are handled... -
[1.16.1] Spawning a bush in the nether
Beethoven92 replied to Timebreaker900's topic in Modder Support
Edited out due to author's lack of knowledge ๐ค -
[1.16.1] Spawning a bush in the nether
Beethoven92 replied to Timebreaker900's topic in Modder Support
Just implement your own version of isValidGround in your nether bush class. @Override protected boolean isValidGround -
[1.16.1] Spawning a bush in the nether
Beethoven92 replied to Timebreaker900's topic in Modder Support
protected methods can be overriden by subclasses, did you try to override it in your nether bush block? -
Forge 15.2 not loading properly when I import the project
Beethoven92 replied to LaneG22's topic in ForgeGradle
Try to run "gradlew --refresh-dependencies", then "gradlew clean" and then setup your project again with the genEclipseRuns task -
[1.16.1] Spawning a bush in the nether
Beethoven92 replied to Timebreaker900's topic in Modder Support
Actually...i found this line inside Block#canSustainPlant(BlockState state, IBlockReader world, BlockPos pos, Direction facing, net.minecraftforge.common.IPlantable plantable): if (plantable instanceof BushBlock && ((BushBlock)plantable).isValidGround(state, world, pos)) return true; So, from what i understand, your nether bush block uses the super#isValidGround, which being it in BushBlock it checks for dirt, grass etc. So basically, when the line above is called for nether rack block it will never find that your bush block is compatible with it. So you should just override isValidGround like shown above. This is my theory, might not work but is worth a try, until someone comes out with a better idea ๐ -
[1.16.1] Spawning a bush in the nether
Beethoven92 replied to Timebreaker900's topic in Modder Support
So, i am not sure what the problem is, but i see from your github that your mod also existed in a 1.15.2 version, which i guess did work fine, didn't it? First of all, now Block.Properties is AbstractBlock.Properties, you will have to change those in your blocks registration. Next, looking at how 1.16 nether vegatal decorations are generated, it seems they use this feature here: Feature<BlockStateProvidingFeatureConfig> field_236282_M_ = register("nether_forest_vegetation", new NetherVegetationFeature(BlockStateProvidingFeatureConfig.field_236453_a_)); Have you already tried to use that in your nether bush generation? Also i see that those vegetal block just implements their own version of isValidGround(BlockState state, IBlockReader worldIn, BlockPos pos) instead of isValidPosition, which in the end may not matter because the first is called anyway by the latter...but it may be a little bit more convenient in term of code: boolean isValidGround(BlockState state, IBlockReader worldIn, BlockPos pos) { return state.isIn(BlockTags.NETHERRACK)); } -
Didn't notice the new, sorry ๐
-
You need also to chain the #build() method to #create, so it would be like this TileEntityType#Builder#create(your stuff)#build(null) since its #build() that actually returns the TileEntityType