Jump to content

TabulateJarl8

Members
  • Posts

    8
  • Joined

  • Last visited

TabulateJarl8's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I am adding my fish to the fishing loot table. I added it but im not sure if it worked because I can never seem to fish it. (The weight is at 90 right now becuase i was testing it to see if it worked) @SubscribeEvent public void onLootTablesLoaded(LootTableLoadEvent event) { if(event.getName().equals(LootTableList.GAMEPLAY_FISHING_FISH)) { final LootPool pool2 = event.getTable().getPool("pool2"); if(pool2 != null) { pool2.addEntry(new LootEntryItem(ItemInit.BLUE_MACKEREL, 90, 0, new LootFunction[0], new LootCondition[0], "aquaticfoods:blue_mackerel")); } } }
  2. I was wondering if it is possible to edit the vanilla loot tables. If that is possible how would I do that?
  3. Ok, I will.I don't like what he's doing, but I think it's literally the only tutorial on how to make a fishing rod lol
  4. And this is IHasModel: package com.tabulate.aquaticfoods.util; public interface IHasModel { public void registerModels(); }
  5. package com.tabulate.aquaticfoods.objects.items; import com.tabulate.aquaticfoods.Main; import com.tabulate.aquaticfoods.init.ItemInit; import com.tabulate.aquaticfoods.util.IHasModel; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; public class ItemBase extends Item implements IHasModel{ public ItemBase(String name) { setUnlocalizedName(name); setRegistryName(name); setCreativeTab(Main.aquaticfoodstab); ItemInit.ITEMS.add(this); } @Override public void registerModels() { Main.proxy.registerItemRenderer(this, 0, "inventory"); } }
  6. I am making a mod that adds a new fishing rod for catching other fish like swordfish or shark in 1.12.2. I finish making the class for the rod and there is an error. The error says, "Implicit super constructor ItemBase() is undefined. Must explicitly invoke another constructor." I'm fairly new to modding so I don't know what to do. The code is below. Someone help. The error is on this line: public DeepSeaRod(String name) { package com.tabulate.aquaticfoods.objects.items; import com.tabulate.aquaticfoods.Main; import com.tabulate.aquaticfoods.init.ItemInit; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.projectile.EntityFishHook; import net.minecraft.init.SoundEvents; import net.minecraft.item.IItemPropertyGetter; import net.minecraft.item.ItemStack; import net.minecraft.stats.StatList; import net.minecraft.util.ActionResult; import net.minecraft.util.EnumActionResult; import net.minecraft.util.EnumHand; import net.minecraft.util.ResourceLocation; import net.minecraft.util.SoundCategory; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class DeepSeaRod extends ItemBase{ public DeepSeaRod(String name) { setUnlocalizedName(name); setRegistryName(name); setCreativeTab(Main.aquaticfoodstab); setMaxDamage(400); setMaxStackSize(1); this.addPropertyOverride(new ResourceLocation("cast"), new IItemPropertyGetter(){ @SideOnly(Side.CLIENT) public float apply(ItemStack stack, World world, EntityLivingBase entityIn) { if(entityIn == null) { return 0.0f; } else { boolean flag = entityIn.getHeldItemMainhand() == stack; boolean flag1 = entityIn.getHeldItemOffhand() == stack; if(entityIn.getHeldItemMainhand().getItem() instanceof DeepSeaRod) { flag1 = false; } return(flag || flag1)&& entityIn instanceof EntityPlayer && ((EntityPlayer)entityIn).fishEntity != null ? 1.0f : 0.0f; } } }); ItemInit.ITEMS.add(this); } @SideOnly(Side.CLIENT) public boolean isFull3D() { return true; } @SideOnly(Side.CLIENT) public boolean shouldRotateAroundWhenRendering() { return true; } @Override public ActionResult<ItemStack> onItemRightClick(World worldIn, EntityPlayer playerIn, EnumHand handIn){ ItemStack itemStack = playerIn.getHeldItem(handIn); if(playerIn.fishEntity != null) { int i = playerIn.fishEntity.handleHookRetraction(); itemStack.damageItem(1, playerIn); playerIn.swingArm(handIn); worldIn.playSound((EntityPlayer)null, playerIn.posX, playerIn.posY, playerIn.posZ, SoundEvents.ENTITY_BOBBER_RETRIEVE, SoundCategory.NEUTRAL, 1.0f, 0.4f / (itemRand.nextFloat() * 0.4f + 0.8f)); } else { worldIn.playSound((EntityPlayer)null, playerIn.posX, playerIn.posY, playerIn.posZ, SoundEvents.ENTITY_BOBBER_THROW, SoundCategory.NEUTRAL, 0.5f, 0.4f / (itemRand.nextFloat() * 0.4f + 0.8f)); if(!worldIn.isRemote) { EntityFishHook entityFishHook = new EntityFishHook(worldIn, playerIn); int j = EnchantmentHelper.getFishingSpeedBonus(itemStack); if(j > 0) { entityFishHook.setLureSpeed(j); } int k = EnchantmentHelper.getFishingLuckBonus(itemStack); if(k > 0) { entityFishHook.setLuck(k); } worldIn.spawnEntity(entityFishHook); } playerIn.swingArm(handIn); playerIn.addStat(StatList.getObjectUseStats(this)); } return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, itemStack); } @Override public int getItemEnchantability() { return 15; } }
  7. I would like to port and use the Witchery mod in my modpack, as it hasnt been ported past 1.7.10, and the author of the mod says you must PM him to use it in a modpack. There is a slight problem with that, as the author hasnt been online for 3 years. I id PM him but I doubt he will reply. Is there any way to get these 2 permissions since I cant get them from him?
  8. I was loading up my modpack that I made one day, and once it loaded, this happened. (See Video) https://youtu.be/vFnrBTfWEgY The modpack now does this every time I load it. What is wrong and how do I fix it.
×
×
  • Create New...

Important Information

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