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

Libraries/Dependencies in META-INF not being accessed after build


Recommended Posts

I've been trying to add some external libraries to my project and everything works fine inside the IDE when I runClient, but when I build the jar and run it I get classNotDefFoundError which obviously means that the jars are not being accessed from the META-INF but im not sure how to fix that...


configurations {

dependencies {

jar {
    from(configurations.inJar) {

this is currently how I am importing the libraries, and they do show inside the jar when I decompile it, but im still not sure how to access them.

Link to comment
Share on other sites

8 hours ago, sciwhiz12 said:

What version of Minecraft and Forge is this for?

I know it’s not supported, but I am developing a 1.8 client mod and have a pretty good hang on things except for getting these dependencies to load outside of my IDE.

Link to comment
Share on other sites

This topic is now closed to further replies.

  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • Hello, Sorry for writing back again but despite several attempts I did not manage to change/create the tags. They always have the value 0.0 here's my code: package net.the_goldbeards.lootdebugs.Items.Weapons.Drills; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.TextComponent; import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.sounds.SoundSource; import net.minecraft.tags.BlockTags; import net.minecraft.tags.Tag; import net.minecraft.util.Mth; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.InteractionResultHolder; import net.minecraft.world.entity.EquipmentSlot; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.*; import net.minecraft.world.item.context.UseOnContext; import net.minecraft.world.item.enchantment.Enchantment; import net.minecraft.world.level.ItemLike; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.TorchBlock; import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.Tags; import net.the_goldbeards.lootdebugs.util.ModSounds; import net.the_goldbeards.lootdebugs.util.ModTags; import org.jetbrains.annotations.Nullable; import java.util.List; public class DrillsItem extends Item { @Override public int getItemStackLimit(ItemStack stack) { return 1; } public DrillsItem(Properties pProperties, float FUELAMMOUNT) { super(pProperties); ItemStack pStack = new ItemStack(this); pStack.getOrCreateTag().putFloat("lootdebugs.drillfuel", FUELAMMOUNT); } @Override public InteractionResult useOn(UseOnContext pContext) { ItemStack pStack = new ItemStack(pContext.getPlayer().getItemInHand(pContext.getHand()).getItem()); pStack.getOrCreateTag().putFloat("lootdebugs.drillfuel", 12f);//Debug return InteractionResult.PASS; } @Override public void appendHoverText(ItemStack pStack, @Nullable Level pLevel, List<Component> pTooltipComponents, TooltipFlag pIsAdvanced) { Float val = pStack.getOrCreateTag().getFloat("lootdebugs.drillfuel"); pTooltipComponents.add(new TextComponent(val.toString())); } }   Thanks
    • Just a gradle plugin that can use yarn mapping for forge developing
    • Well, it's ok. Caused by the modid shouldn't include "-". Replaced with "_"
    • You registered something to the event bus, but it has no event handler methods. So nothing happens. Use OverlayRegistry to add something to the HUD.
    • I wanted to implement mana values, so I first tried to run it using Bosshealth, but nothing shows up! I think it's not being called, but is it impossible to call it in init?   Mana health public class ManaHealthOverlay extends GuiComponent { private final Minecraft minecraft; private static final ResourceLocation GUI_MANA_LOCATION = new ResourceLocation("textures/gui/bars.png"); private static final int BAR_WIDTH = 182; private static final int BAR_HEIGHT = 5; private static final int OVERLAY_OFFSET = 80; final Map<UUID, LerpingBossEvent> events = Maps.newLinkedHashMap(); private static final ManaHealthOverlay INSTANCE = new ManaHealthOverlay(); public static void init() { MinecraftForge.EVENT_BUS.register(INSTANCE); } public ManaHealthOverlay() { this.minecraft = Minecraft.getInstance(); } public void render(PoseStack p_93705_) { //if (!this.events.isEmpty()) { int i = this.minecraft.getWindow().getGuiScaledWidth(); int j = 12; for(LerpingBossEvent lerpingbossevent : this.events.values()) { int k = i / 2 - 91; ...... main public Mod() { ManaHealthOverlay.init();
  • Topics

  • Who's Online (See full list)

  • Create New...

Important Information

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