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.

axilirate

Members
  • Joined

  • Last visited

Everything posted by axilirate

  1. Read this: https://cadiboo.github.io/tutorials/1.15.1/forge/1.1-importing-project/intellij-2018.3.4/
  2. Like change zombie detection range, change the spawn level of certain mobs (ex: spider can only spawn below y30) or zombies can see you through blocks.
  3. So what do I do exactly?, I'm not that good with the forge API where I can understand 100% of the code, the tutorial I used to follow was short and unfinished.
  4. package com.mod.axilirate_mobs; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import net.minecraft.item.Food; import net.minecraft.item.Food.Builder; import net.minecraft.item.Item; import net.minecraft.item.ItemGroup; import net.minecraft.util.ResourceLocation; import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventBusSubscriber; import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus; import net.minecraftforge.registries.IForgeRegistryEntry; import net.minecraftforge.registries.ObjectHolder; @Mod("axilirate_mobs") @EventBusSubscriber(modid = "axilirate_mobs", bus = Bus.MOD) public class main { public Logger LOGGER = LogManager.getLogger("axilirate_mobs"); public main() { LOGGER.debug("Working!"); } @ObjectHolder("axilirate_mobs"+"example_item"+"example_item_black") public Item example_item; public Item example_item_black; @SubscribeEvent public static void onRegisterItems(RegistryEvent.Register<Item> event) { event.getRegistry().registerAll( setup(new Item(new Item.Properties().group(ItemGroup.MISC)),"example_item"), >>>>>>>>>>> setup(new Item(new Item.Properties().group(ItemGroup.MISC).food(new Food.Builder().setAlwaysEdible().hunger(6).meat())),"example_item_black") ); } public static <T extends IForgeRegistryEntry<T>> T setup(final T entry, final String name) { return setup(entry, new ResourceLocation("axilirate_mobs", name)); } public static <T extends IForgeRegistryEntry<T>> T setup(final T entry, final ResourceLocation registryName) { entry.setRegistryName(registryName); return entry; } } I am getting this "The method food(Food) in the type Item.Properties is not applicable for the arguments (Food.Builder)" and "The method setup(T, String) in the type main is not applicable for the arguments (Item, String)". What is the problem? Edit: can be fixed by adding build() at the end. setup(new Item(new Item.Properties().group(ItemGroup.MISC).food(new Food.Builder().setAlwaysEdible().hunger(6).meat().build())),"example_item_black")
  5. Will I be able to add my own item to the drop and if so, how do I do that? Also it was on the documentation of 1.15.x version.
  6. Sorry I'll be more clear, I wonder how to change Vanilla mobs item drop and that's what they say in the documentation. I wanted to see an example of how to modify or remove vanilla mobs loot table.
  7. Subclasses of EntityLiving automatically support drawing from a loot table upon death. This is done by overriding the getLootTable method to return a ResourceLocation to the desired table. This serves as the mob’s default table; the tables of both your and other mods’ mobs can be overridden for a single entity by setting the deathLootTable field of the entity. Example code would be welcome.

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.