Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

axilirate

Members
  • Posts

    10
  • Joined

  • Last visited

axilirate's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  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.
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.