Script Excavator 1.3.2

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

Do not disable the script while excavators are placed and looping!

For some reason at the moment, if this script is disabled while there are excavators placed and looping, it seems to just brick any server. No idea why this happens currently (I would've assumed that the while loops are stopped on disable), but I'll release a new version as soon as I can. To my knowledge, breaking all excavators before disabling should prevent the server from dying, but I say that with only 1 test having been done.

This is an especially big deal for Minehut server owners! Due to the way that Minehut is set up, you won't be able to access your server at all if the same thing happens to you.
  • Forgot to change references to the renamed use-fuel option.
Small fixes:
  • Changed the name of the use-fuel option to require-fuel, for clarity.
  • Changed how block damage was sent. Players will now see block damage from all excavators.
  • Changed check for valid fuel type in inventory click event for future updates.
  • Changed storageToOpen metadata maintaining across excavators. Will now always reset to 1.
  • Fixed new storage price not being displayed in Options GUI after buying a storage.
The Fuel Update:
  • Excavators now require fuel to mine blocks.
  • You can add fuel to your excavator by opening its Options GUI, clicking the furnace, and dropping your fuel in the middle slot.
  • Fuel sources (currently coal or charcoal), can add different amounts of fuel to an excavator
    • For example, coal is currently set to add 2 to the fuel of the excavator, while charcoal is set to add 1.
    • These values are changeable in the on load structure of the script.
  • There are 2 new options available: have-fuel-on-get and use-fuel
    • have-fuel-on-get is how much fuel an excavator should have in it after using the /excavator get command. This option must be kept as an integer.
    • use-fuel is as simple as it sounds. If set to true, the excavator will burn through its fuel and require more to be added to keep it going. If set to false, the excavator will still burn through its fuel until its left at 1, and then continuously add to itself, never running out.
Fuel Sources:
  • Currently there are only 2 valid fuel sources
    • Coal - has a fuel amount of 2
    • Charcoal - has a fuel amount of 1
    • The fuel amountis the number of blocks the excavator will be able to mine using 1 of the respective fuel source
      • For example, if 1 coal is dropped in the GUI, the excavator will be able to mine 2 blocks before it needs to be topped up again.
    • As stated above, the fuel amounts for these fuel sources can be changed in the on load structure.
The Fuel GUI:
  • The Fuel GUI is simple, but the following is a guide if its confusing to you at first:
    • The middle slot is where you drop your fuel sources
    • You can right click to add only 1, or left click to add the whole stack (of your cursor slot)
    • Additionally, you can shift + left click to add the whole clicked stack.
Other changes:
  • Made changes to the excavator loop to accomodate for the fuel addition. Now loops according to fuel instead of whether its alive or not.
  • Changed the placement of some items in the Options GUI.
  • Added comments to parts which should have had them already. The options and on load structures now have brief descriptions of each part.
  • The autoswitcher is a purchaseable upgrade for any excavator which costs 10000 by default, but this price is configurable as an option.
  • It's in the name, but the autoswitcher checks to see if the current tool of the excavator is the preferred tool for the next block its going to mine.
    • For example, if the next block to be mined is dirt, and the current tool is a pickaxe, it will automatically switch the tool to a shovel for the dirt block.
Haven't done the most in-depth testing of this yet, so if you find any issues with it then let me know at @cheezburga on Discord.
New tool system
  • The tool system now supports both pickaxes and shovels.
  • To use the new feature, right click the tool in the Options GUI. This will switch the tool to the equivalent shovel or pickaxe, respective to which was previously in use.
    • For example, a gold pickaxe with efficiency 3 will turn into a gold shovel with efficiency 3
  • This allows the excavator to not get stuck on dirt, gravel, etc. All you need to do is switch the tool by right clicking in the GUI.
Changes and fixes:
  • Removed debug broadcast which was accidentally left in v1.0.1
  • Added option for enchants per tool before moving to next tool
  • Added option for exponent increase per tool upgrade
  • Changed particle line to draw to 2 under excavator, instead of 3
  • Changed tool upgrades and pricing
  • Changed action bar message when trying to buy already maxed tool
  • Changed names of items in the Options GUI
  • Fixed cycling and opening storages
New tool upgrades and pricing system:
  • Tools can now be enchanted with efficiency, up to the level of the enchants-per-tool option.
  • Each level of efficiency counts as an upgrade.
  • The pricing now increases exponentially according to how many upgrades are already on the tool. This exponent is set by default to 1.25, but can be changed using the exponent option.
  • Fixed cluttering of excavators variable, caused due to some interesting Skript nuances.
  • Fixed excavator loop function being called twice on every placed excavator.