HomeJavaModsLogLib
LogLib

LogLib banner

What is this?

Just something I made while making a log, which I thought would be good to make a library so other people could do it more easily

How to use:

1. Make your log strippable

Just add your log to the LogMap list in commonSetup like so:

  private void commonSetup(final FMLCommonSetupEvent event) {
    event.enqueueWork(() -> {
      LogEvents.LogMap.put(YOUR_MOD.YOUR_LOG.get(), YOUR_MOD.YOUR_STRIPPED_LOG.get())
    });
  }

2. Optional: Add a loot table for bark

1.Add your bark to a log

  private void commonSetup(final FMLCommonSetupEvent event) {
    event.enqueueWork(() -> {
        LogEvents.BarkMap.put(YOUR_MOD.YOUR_LOG.get() /*Can actually be any log*/, The resource location of your loot table);
    });
  }

2.Add a loot table In datagen, add this:

  this.add(YOUR_MOD.YOUR_LOG.get()
      () -> BarkLootMethods.CreateDefaultLootTable(YOUR_MOD.YOUR_BARK.get()));

Or alternatively, this:

  this.add(YOUR_MOD.YOUR_LOG.get()
      () -> BarkLootMethods.CreareRangeLootTable(YOUR_MOD.YOUR_BARK.get(), MinimumAmount, MaximumAmount));

And you're done!

This mod also has a datagen method for log models. In datagen:

LogMethods.logBlockWithItem(this, (RotatedPillarBlock) YOUR_MOD.YOUR_LOG,
    Name of the texture for the side of the block (usually just the block's name),
    Name of the texture for the tip of the block (usually "[block's name]_top"),
    the name of the block)
Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more