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.

Leaderboard

Popular Content

Showing content with the highest reputation on 05/12/21 in all areas

  1. should work... show the complete class Edit: Do you use DeferredRegister to register your items? if yes add .get() behind ModItems.SNG_INGOT
  2. The process requires a bit more work then. All worldgen stuff is handled through jsons now. You could probably find how they need to be formatted on the mc wiki. So, just format them according to that. You can also look at slicedlime's vanilla world gen extraction for examples. As for getting it in the overworld. You need to do a few things. Existing dimensions use entries hardcoded to be in code instead of through json making them inaccessible from pure json. To get around this, you have to supply a dummy entry and handle it that way. So, register the biome using any forge registry process and supply some dummy biome to the instance. It will be replaced by the json when the server is loaded. Finally, you will need to call BiomeManager#addAdditionalOverworldBiomes within the synchronous work queue of FMLCommonSetupEvent. This adds your biome to the overworld biomes. Note, that this takes a registry key which can be gotten using RegistryKey#get and supplying Registry#BIOME_REGISTRY as the first parameter and the resource location of your biome as the second. In summary: 1. Create biome json. 2. Registry dummy biome to forge registry. 3. Add biome to overworld biomes within common setup. Any other information can be derived from the primer.
  3. List<EntityType<?>> MONSTERS = new ArrayList<>(); void summonRandomMonster() { if (MONSTERS.isEmpty()) MONSTERS.addAll(ForgeRegistries.ENTITIES.getValues().filter((type) -> is type classification monster)) Entity entity = (random EntityType from MONSTERS).create(world); if (entity != null) { entity.setPosition(x, y, z); world.addEntity(entity); } }
  4. 1 point
    After tonnes of testings it seems like you CAN'T edit the config file through notepad++, try windows notepad or some other text editor as this works on my side. Hopefully this works for people who has the same problem!
  5. It seem that I solve my problem in someway. I still don't know how IModelConfiguration#resolveTexture worked, and I can't get a Material from it now too. But, now I found I can directly call new Material to solve my need. I tried new Material before but it fail at that point in time, because I missed a thing. I need to subscribe TextureStitchEvent, so that I can add my texture to AtlasTexture. @SubscribeEvent public static void onTextureStitch(TextureStitchEvent.Pre event){ if(event.getMap().func_229223_g_().equals(AtlasTexture.LOCATION_BLOCKS_TEXTURE)){ event.addSprite(new ResourceLocation(FoodPower.MODID, "meals/salad/salad_base")); } } So now directly new a Material and transform it to TextureAtlasSprite will work. Material m = new Material(AtlasTexture.LOCATION_BLOCKS_TEXTURE, new ResourceLocation(FoodPower.MODID, "meals/salad/salad_base")); Thx from everyone who replied this post. But I still open for any better suggestion

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.