Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Luis_ST

Members
  • Joined

  • Last visited

Everything posted by Luis_ST

  1. the ConfiguredFeature works i copied your code and i found the feature, but it's very rare, rare than the pumpkin feature private void setup(final FMLCommonSetupEvent event) { MINT = register("mint", Feature.RANDOM_PATCH.configured((new BlockClusterFeatureConfig.Builder(new SimpleBlockStateProvider(Blocks.BARREL.defaultBlockState()), SimpleBlockPlacer.INSTANCE)) .tries(64).noProjection().whitelist(Sets.newHashSet(Blocks.GRASS_BLOCK)).build()).decorated(Features.Placements.HEIGHTMAP_DOUBLE_SQUARE).chance(24)); } private static <FC extends IFeatureConfig> ConfiguredFeature<FC, ?> register(String name, ConfiguredFeature<FC, ?> configuredFeature) { return Registry.register(WorldGenRegistries.CONFIGURED_FEATURE, new ResourceLocation("examplemod", name), configuredFeature); } public static ConfiguredFeature<?, ?> MINT; @SubscribeEvent(priority = EventPriority.HIGH) public static void name(BiomeLoadingEvent event) { if (MINT != null) { event.getGeneration().addFeature(Decoration.VEGETAL_DECORATION, MINT); } } and (I had to scale down the picture because it was too big)
  2. okay first of all you need to create a Capability which contains a value (a boolean), then you need an interface with two methods a get and a set method for the value, register the Capability as described in the forge doc and Attach the Capability to the player via AttachCapabilitiesEvent<Entity>. use the PlayerEvent.PlayerLoggedInEvent and check inside the if your Capability is present (you get it via PlayerEntity#getCapability), then get the value from the Capability and check if its false, if its the case give the player the sword and set the value to true
  3. use the vanilla registry of ConfiguredFeature inside the FMLCommonSetupEvent
  4. first of all you can't create the ConfiguredFeature inside the event because you need to register them second, take a look at the vanilla Features class how to create ConfiguredFeature, then copy the vanilla registry and do this for your ConfiguredFeature inside FMLCommonSetupEvent
  5. try without optifine
  6. in .minecraft/logs/debug.log
  7. post debug log
  8. did you know how the Biome Layer works, did you looked at the vanilla code, sounds like you don't knw much about the biome layer they still use the ids which is why i hate this system, but forge dosen't has a BiomeProvider/BiomeSource which make this easly forge has biome IDs?
  9. you also need to set the field you only get the field from the class
  10. 1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  11. 1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  12. you get the same error beacuse you never call setAccessible for the Field
  13. then you need to store a value for each player you have given the sword, using a Capability
  14. PlayerEntity#position returns the current player pos as an Vec3 PlayerEntity#teleportToWithTicket teleports the player to the given position
  15. is is an example how to check, if the player has or has not an item in his inventory
  16. no the normal registration is via json or DeferredRegister but you should register an id for your biome use Refection or an Access Transformers do this in FMLCommonSetupEvent
  17. thats the wrong class and the wrong object type its: net.minecraft.world.biome.BiomeRegistry.idToKeyMap or net.minecraft.world.biome.BiomeRegistry.TO_NAME which is a Int2ObjectMap
  18. 1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  19. did you using mcp or moj mappings?
  20. this is an practical example
  21. no not register with DeferredRegister you need to add your Biome to BiomeRegistry.TO_NAME

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.