Jump to content

Skyriis

Members
  • Posts

    176
  • Joined

  • Last visited

Everything posted by Skyriis

  1. Okay my client get's updated now but for some reason the value resets if i close and reopen the menu
  2. Do i need to send another packet to the client?
  3. 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.
  4. It should change "isPlaying" variable too. (in the play / stop method of the blockentity)
  5. They where unused anyway. I've removed them from the Packet and updated the code above. My Problem still remains
  6. Hey Guys, i'm trying to create a custom Jukebox which allows starting and stopping the current disc. I've added a play and stop button in my Menu Screen to controll the play state but for some reason nothing happens if i click my buttons. Menu: MenuScreen: Packet: BlockEntity:
  7. oh --existing-mod should do what i need. Thank you
  8. 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
  9. 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?
  10. I ran into another Problem. My Trees now generate on top of each other: How do i fix that?
  11. Okay that was the issue. Thank you a lot!
  12. ConfiguredFeature: PlacedFeatures: Biome Registry:
  13. I've moved the DeferredRegister fields into the same classes as their registry objects but i still crash with the same message
  14. 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); } }
  15. ConfiguredFeature: PlacedFeatures: Biome Registry: Full crash report: https://pastebin.com/EJaHMYFR
  16. 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?
  17. the registry object is a DeferredRegister of Registry.CONFIGURED_FEATURE_REGISTRY
  18. 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))));
  19. 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?
  20. 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?
  21. 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)); } }
  22. Okay it looks like i'm able to workaround this my adding a "ideaSyncTask" to my build.gradle file. Now i'm getting an "Invalid value: -1" Message but this seems to be an issue with Intellij 2022.1 :')
  23. 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?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.