-
Posts
176 -
Joined
-
Last visited
Everything posted by Skyriis
-
[1.18.2] Change value in BlockEntity using Button on MenuScreen
Skyriis replied to Skyriis's topic in Modder Support
updated the code above -
[1.18.2] Change value in BlockEntity using Button on MenuScreen
Skyriis replied to Skyriis's topic in Modder Support
Okay my client get's updated now but for some reason the value resets if i close and reopen the menu -
[1.18.2] Change value in BlockEntity using Button on MenuScreen
Skyriis replied to Skyriis's topic in Modder Support
Do i need to send another packet to the client? -
[1.18.2] Change value in BlockEntity using Button on MenuScreen
Skyriis replied to Skyriis's topic in Modder Support
If i check it in the Packet (using the menu.isPlaying method) it'll show the correct value but if i check it in the menu screen it shows the old / default value. -
[1.18.2] Change value in BlockEntity using Button on MenuScreen
Skyriis replied to Skyriis's topic in Modder Support
It should change "isPlaying" variable too. (in the play / stop method of the blockentity) -
[1.18.2] Change value in BlockEntity using Button on MenuScreen
Skyriis replied to Skyriis's topic in Modder Support
They where unused anyway. I've removed them from the Packet and updated the code above. My Problem still remains -
[1.18.2] Using JSON from other Mod in runData Task
Skyriis replied to Skyriis's topic in Modder Support
oh --existing-mod should do what i need. Thank you -
[1.18.2] Using JSON from other Mod in runData Task
Skyriis replied to Skyriis's topic in Modder Support
i've already added the other mod as dependency but how do i add the assets of the mod to my runData task? If i try to use it in my data generator i'll get a exception: java.lang.IllegalStateException: Model at manascore:block/overlay_stairs does not exist -
Hey Guys, i got a library mod which provides some parent json files for my blocks and i would love to use them in my other mods. The problem is that my other mods need to know about the existing json files. So... How do i add the files of a dependency to the runData environment?
-
[1.18.2] Crash when adding custom Tree to Biome
Skyriis replied to Skyriis's topic in Modder Support
I ran into another Problem. My Trees now generate on top of each other: How do i fix that? -
[1.18.2] Crash when adding custom Tree to Biome
Skyriis replied to Skyriis's topic in Modder Support
Okay that was the issue. Thank you a lot! -
[1.18.2] Crash when adding custom Tree to Biome
Skyriis replied to Skyriis's topic in Modder Support
ConfiguredFeature: PlacedFeatures: Biome Registry: -
[1.18.2] Crash when adding custom Tree to Biome
Skyriis replied to Skyriis's topic in Modder Support
I've moved the DeferredRegister fields into the same classes as their registry objects but i still crash with the same message -
[1.18.2] Crash when adding custom Tree to Biome
Skyriis replied to Skyriis's topic in Modder Support
why not? -
[1.18.2] Crash when adding custom Tree to Biome
Skyriis replied to Skyriis's topic in Modder Support
My DeferredRegister fields are in a seperate class. public class TensuraRegistry { private static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, Tensura.MOD_ID); private static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, Tensura.MOD_ID); private static final DeferredRegister<SoundEvent> SOUND_EVENTS = DeferredRegister.create(ForgeRegistries.SOUND_EVENTS, Tensura.MOD_ID); private static final DeferredRegister<BlockEntityType<?>> BLOCK_ENTITY_TYPES = DeferredRegister.create(ForgeRegistries.BLOCK_ENTITIES, Tensura.MOD_ID); private static final DeferredRegister<Motive> MOTIVE = DeferredRegister.create(ForgeRegistries.PAINTING_TYPES, Tensura.MOD_ID); private static final DeferredRegister<Biome> BIOMES = DeferredRegister.create(ForgeRegistries.BIOMES, Tensura.MOD_ID); private static final DeferredRegister<ConfiguredFeature<?, ?>> CONFIGURED_FEATURES = DeferredRegister.create(Registry.CONFIGURED_FEATURE_REGISTRY, Tensura.MOD_ID); private static final DeferredRegister<PlacedFeature> PLACED_FEATURE = DeferredRegister.create(Registry.PLACED_FEATURE_REGISTRY, Tensura.MOD_ID); public static void register(IEventBus modEventBus) { BlockRegistry.register(ITEMS, BLOCKS); //Register Blocks with their BlockItems ItemRegistry.register(ITEMS); //Register Items to our Registry BlockEntityTypeRegistry.register(ITEMS, BLOCKS, BLOCK_ENTITY_TYPES); //Registers Block Entities including their Blocks and Items SoundEventRegistry.register(SOUND_EVENTS); //Register Sound Events MotiveRegistry.register(MOTIVE); //Register Motives for custom paintings ConfiguredFeatureRegistry.register(CONFIGURED_FEATURES); PlacedFeatureRegistry.register(PLACED_FEATURE); BiomeRegistry.register(BIOMES); //Register Biomes // Add our Registries to Forge BLOCKS.register(modEventBus); ITEMS.register(modEventBus); BLOCK_ENTITY_TYPES.register(modEventBus); SOUND_EVENTS.register(modEventBus); MOTIVE.register(modEventBus); BIOMES.register(modEventBus); CONFIGURED_FEATURES.register(modEventBus); PLACED_FEATURE.register(modEventBus); } } -
[1.18.2] Crash when adding custom Tree to Biome
Skyriis replied to Skyriis's topic in Modder Support
ConfiguredFeature: PlacedFeatures: Biome Registry: Full crash report: https://pastebin.com/EJaHMYFR -
[1.18.2] Crash when adding custom Tree to Biome
Skyriis replied to Skyriis's topic in Modder Support
Okay instead of a NPE, i get a "Registry Object not present: tensura:sakura_forest_trees_checked" message when registering my biome. I'm registering my biome using a DeferredRegister<Biome> What did i wrong now? -
[1.18.2] Crash when adding custom Tree to Biome
Skyriis replied to Skyriis's topic in Modder Support
the registry object is a DeferredRegister of Registry.CONFIGURED_FEATURE_REGISTRY -
[1.18.2] Crash when adding custom Tree to Biome
Skyriis replied to Skyriis's topic in Modder Support
i'm still running into a small problem with my object holder. java.lang.IllegalStateException: The ObjectHolder annotation cannot apply to a field that does not map to a registry. Ensure the registry was created during the RegistryEvent.NewRegistry event. (found : net.minecraft.world.level.levelgen.feature.ConfiguredFeature at com.borniuus.tensura.world.gen.TensuraFeatures.SAKURA_FOREST_TREES) @ObjectHolder(Tensura.MOD_ID) public class TensuraFeatures { @ObjectHolder("sakura_forest_trees") public static final ConfiguredFeature<RandomFeatureConfiguration, Feature<RandomFeatureConfiguration>> SAKURA_FOREST_TREES = null; } //registered using registry.register("sakura_forest_trees", () -> new ConfiguredFeature<>(Feature.RANDOM_SELECTOR, new RandomFeatureConfiguration(List.of( new WeightedPlacedFeature(Holder.direct(TensuraPlacements.SAKURA_TREE_LARGE_CHECKED), 0.15F) ), Holder.direct(TensuraPlacements.SAKURA_TREE_CHECKED)))); -
[1.18.2] Crash when adding custom Tree to Biome
Skyriis replied to Skyriis's topic in Modder Support
How do i register those? i've tried to register them like that: class FeatureRegistry { static void register(final DeferredRegister<Feature<?>> registry) { registry.register("sakura_tree", () -> new ConfiguredFeature<>(Feature.TREE, basicTree(TensuraBlocks.SAKURA_LOG, TensuraBlocks.SAKURA_LEAVES))); } private static TreeConfiguration basicTree(Block logBlock, Block leavesBlock) { return createStraightBlobTree(logBlock, leavesBlock, 4, 2, 0, 2).ignoreVines().build(); } private static TreeConfiguration.TreeConfigurationBuilder createStraightBlobTree(Block logBlock, Block leavesBlock, int baseHeight, int p_195150_, int p_195151_, int leavesRadius) { return new TreeConfiguration.TreeConfigurationBuilder(BlockStateProvider.simple(logBlock), new StraightTrunkPlacer(baseHeight, p_195150_, p_195151_), BlockStateProvider.simple(leavesBlock), new BlobFoliagePlacer(ConstantInt.of(leavesRadius), ConstantInt.of(0), 3), new TwoLayersFeatureSize(1, 0, 1)); } } but ConfiguredFeature isn't a Featue. Do i need to use an other registy instead of ForgeRegistries.FEATURES? -
[1.18.2] Crash when adding custom Tree to Biome
Skyriis replied to Skyriis's topic in Modder Support
Oh well. I guess i did the whole thing wrong. I basically just want to add a Tree with 2 different structures (normal and big) and a small change that a bee hive spawns on the naturally generated trees. What do i need to do for that? -
Hey Guys, i've created a custom Tree and would love to spawn it in my Biome. But crashes when clicking on the single player button after adding the Tree to the Biome. My Code: public class TensuraTreeFeatures { public static final Holder<ConfiguredFeature<TreeConfiguration, ?>> SAKURA = FeatureUtils.register("sakura", Feature.TREE, basicTree(TensuraBlocks.SAKURA_LOG, TensuraBlocks.SAKURA_LEAVES)); public static final Holder<PlacedFeature> SAKURA_CHECKED = PlacementUtils.register("sakura_tree", TensuraTreeFeatures.SAKURA, PlacementUtils.filteredByBlockSurvival(TensuraBlocks.SAKURA_SAPLING)); private static TreeConfiguration basicTree(Block logBlock, Block leavesBlock) { return createStraightBlobTree(logBlock, leavesBlock, 4, 2, 0, 2).ignoreVines().build(); } private static TreeConfiguration.TreeConfigurationBuilder createStraightBlobTree(Block logBlock, Block leavesBlock, int baseHeight, int p_195150_, int p_195151_, int leavesRadius) { return new TreeConfiguration.TreeConfigurationBuilder(BlockStateProvider.simple(logBlock), new StraightTrunkPlacer(baseHeight, p_195150_, p_195151_), BlockStateProvider.simple(leavesBlock), new BlobFoliagePlacer(ConstantInt.of(leavesRadius), ConstantInt.of(0), 3), new TwoLayersFeatureSize(1, 0, 1)); } }
-
Hey Guys, i'm working in a Multi-Module-Project with a Forge, Fabric and Spring Boot Module. The Fabric and Spring Boot Modules work just fine but the Forge Module somehow doesn't want to be imported. I'm getting this Error Message on importing the Forge Module: build.gradle: https://pastebin.com/WJ29Rd5W settings.gradle: https://pastebin.com/DQ2yb0Bg I've never heard of a "ideaSyncTask" tbh. Could anyone help me?