Sueta
RA

RailMiner

1.4

Automated mining machine

·Plugin

Introduction

RailMiner is based on an old bukkit plugin RailDriver. It allows players to creat e a automated mining machine that will mine tunnels and gather resources for them. By default it consumes coal and all the required materials to make the road and rails, This can be disabled in the config.

Building

The Miners require the following materials:

  • 18-19 Iron blocks
  • 9 Diamond blocks
  • 9 Sticky pistons
  • 4 Redstone dust
  • 2 Dispensers
  • 2 Furnaces
  • 2 Repeaters
  • 1-3 Chest
  • 1 Sign
  • 1 Lever

Layer One

Layer Two

The sign must contain the following lines:

  • [RailMiner]
  • Start

Layer Three

Fuel

If you have fuel enabled both furnaces will require coal to run. If you have recipes enabled the chest must contain the following items:

  • Stone brick
  • Iron ingot
  • Sticks
  • Redstone
  • Coal
  • Gold ingots

Protection System

To enable protection on your miner add [Protected] to the third line of the sign as shown below.

This will protect the miner from other people stopping it while it is mining. You can manage who can access your protected miners by using these commands:
- /railminer friend add <player> - Add a player to your miners
- /railminer friend del <player> - Remove a player from your miners
- /railminer friend list - Show who has access to your miners

Alias: /rm f
Permission: railminer.friends

Upgrades

Upgrades are placed in the center chest in the top layer between the pistons, they are used to improve the performance of the miner. Each recipe has a different crafting recipe that can be changed in the config, the default recipes are shown below.

Speed

Increases how fast it mines/moves

Fortune

Applies the fortune enchantment to a miner

Silk Touch

Applies the silk touch enchantment to a miner

Fuel Efficiency

Decreases the usage of fuel

Liquid Protection

Protect the miner from lava and water

Extra Storage

Allows for extra storage rather then throw the items on the ground

Extra Storage II

When your storage chests are full a miner is spawned with their contents

NOTE:
For extra storage the back two dispensers must be replaced with chests and for storage II storage minecarts must be placed in the back chest

How it works

When the miner first begins it places down two pillars that contain a torch and a redstone torch, a road, and a powered rail. It continues making the road until after 8 blocks it places two more pillars and a powered rail. You are also able to blacklist certain blocks so it does not break them, As well as this you can change it so that certain blocks drop different items/amounts. When a user logs out all of their miners are stopped to prevent easy resource gathering.

Commands and Permissions

railminer.use - Allows user to use miners
railminer.reload - Allows user to do /railminer reload

Configuration

config.yml
#Disable if you don't want Miners to consume coal
enable-fuel: true

#Disable if you don't want Miners to use materials inside chests
enable-recipes: true

#List of blocks that cannot be broken (IDs)
block-blacklist:
- "7"

#Should miners stop at the empty spaces
empty-spaces: true

#Change mined blocks to a certain item e.g "16=263" changes coalore(16) to coal(263)
#You can also define the amount of items it drops e.g lapisore drops multiable lapis, "21=351:4x5"
#Ignored if miner has silktouch
change-drops:
- "16=263" #Coalore to coal
- "15=265" #Ironore to ironingot
- "21=351:4x5" #Lapisore to lapis (drops 5)
- "73=331" #Redstone ore to redstone dust
- "129=388" #Emerald ore to emerald
- "14=266" #Goldore to gold
- "56=264" #Diamond ore to diamond
- "153=406" #Quartz ore to quartz

debug: false
upgrades.yml
#Maxiumum amount of upgrades a miner can have (Odd numbers are better)
upgrade-limit: 5

#Upgrade recipes
recipes:
  speed: #Increases how fast the miner mines
    recipe:
    - "SXS"
    - "XNX"
    - "SAS"
    ingredients:
      #MUST contain AIR if you have empty slots
      A: AIR
      X: REDSTONE_BLOCK
      S: SUGAR
      N: NETHER_STAR
    result: "&cSpeed Upgrade"
  fortune: #Applies fortune enchantment to the miner
    recipe:
    - "DXD"
    - "XNX"
    - "DAD"
    ingredients:
      #MUST contain AIR if you have empty slots
      A: AIR
      X: REDSTONE_BLOCK
      D: DIAMOND
      N: NETHER_STAR
    result: "&cFortune Upgrade"
  storage: #More storage
    recipe:
    - "CXC"
    - "XNX"
    - "CAC"
    ingredients:
      #MUST contain AIR if you have empty slots
      A: AIR
      X: REDSTONE_BLOCK
      C: CHEST
      N: NETHER_STAR
    result: "&cStorage Upgrade"
  silk: #Applies silk touch to the miner
    recipe:
    - "DXD"
    - "XNX"
    - "DAD"
    ingredients:
      #MUST contain AIR if you have empty slots
      A: AIR
      X: REDSTONE_BLOCK
      D: DIAMOND_PICKAXE
      N: NETHER_STAR
    result: "&cSilk Upgrade"
  efficiency: #Decreases fuel usage
    recipe:
    - "CXC"
    - "XNX"
    - "CAC"
    ingredients:
      #MUST contain AIR if you have empty slots
      A: AIR
      X: REDSTONE_BLOCK
      C: COAL_BLOCK
      N: NETHER_STAR
    result: "&cEfficiency Upgrade"
  protection: #This protects the miner from water/lava
    recipe:
    - "GXG"
    - "XNX"
    - "GAG"
    ingredients:
      #MUST contain AIR if you have empty slots
      A: AIR
      X: REDSTONE_BLOCK
      G: GLASS
      N: NETHER_STAR
    result: "&cProtection Upgrade"
messages.yml
prefix: '&e[&5RailMiner&e]'
invalidArguments: '&cInvalid arguments!'
noPermissions: '&cYou do not have the required permissions!'
minerIsProtected: '&cYou cannot use this miner!'
reloadSuccess: '&aSuccessfully reloaded config!'
alreadyRunning: '&cThat Miner is already running!'
incorrectShape: '&cIncorrect shape!'
foundEmptySpace: '&cFound an empty space! Stopping..'
outOfFuel: '&cOut of fuel! Stopping..'
requiresItem: '&cInsufficient items! Missing %item%'
failedToMine: '&cMiner has encountered a problem! Stopping..'
storageChestsFull: '&cYour miners chest is full! Stopping..'
minerProtected: '&aMiner successfully protected!'
failedToProtect: '&cFailed to protect Miner! Is it the right shape?'
blockLimitReached: '&cYou have reached your block limit of %limit%. Stopping miner..'
minerLimitReached: '&cYou have reached your miner limit of %limit%!'
upgradeWhileRunning: '&cYou cannot access upgrades while the miner is running!'
upgradeLimitReached: '&cYou can only have %amount% of upgrades!'
invalidUpgrade: '&cMiner contains invalid upgrade!'
noFriends: '&cNo one else has access to your miners.'
alreadyFriends: '&c%name% already has access to your miners!'
notOnline: '&c%name% is not online!'
friendAdded: '&a%name% can now access your miners!'
friendRemoved: '&a%name% no longer has access to your miners!'
notFriends: '&c%name% does not have access to your miners!'
friendsWith: '&aThe people that have access to your miners are: %list%'


Note: Currently the only protection plugins supported are:

- WorldGuard
- GriefPrevention
- Kingdoms
- RedProtect
- Towny
- Factions (MassiveCore

Need help with the plugin? Click here to join my discord channel or post in the discussion section!




Similar projects

Plugin →