-
-
Notifications
You must be signed in to change notification settings - Fork 21
Virtual Furnace
VirtualFurnaces allow you to create fully functioning portable furnaces... as items.
Let's go over some of the main elements of this system.
VirtualFurnaces have their own fuel setup separate from vanilla Minecraft. You can register your own fuels or you can even just register fuels which mimic vanilla MC's fuels.
Registering a fuel is simple.
Syntax:
register furnace fuel %itemtype% with burn time %timespan%ItemType = the item you want to use as a fuel (note: this will only support items which MC currently allows as fuels, this is due to a limitation of MC only allowing certain items to enter the fuel slot)
TimeSpan = the time this fuel will burn for.
Example:
on load:
register furnace fuel coal with burn time 10 minutesInstead of registering your fuels individually, if you choose you can just register all the vanilla fuels as virtual furnace fuels.
Usage:
register all vanilla furnace fuelsThis will essentially copy all of Minecraft's fuels as virtual furnace fuels.
Since virtual furnaces operate independently from vanilla furnaces, we can create our own recipes.
This is super simple.
Syntax:
register virtual furnace recipe for %itemtype% using %itemtype% [with cooktime %-timespan%]for ItemType = This will be the result of the recipe
using ItemType = This will be the item that will smelt
cooktime TimeSpan = This optional value will allow you to adjust how long it takes for this item to cook. If left out the default will be 10 seconds.
Example:
on load:
register virtual furnace recipe for cooked chicken using raw chicken with cooktime 20 secondsSo you don't want to type out each individual recipe? Thats fair, neither do I.
We have a simple effect to register all vanilla-like recipes quickly and easily.
Syntax:
register all virtual (furnace|smoker|blast furnace) recipesThis will allow us to register recipes that mimic vanilla furnace, smoker or blast furnace recipes. Example:
on load:
register all virtual furnace recipesNow that we have our virtual furnaces set up, let's create an item.
This is a bit more complicated so let's break it down.
Syntax:
[a] [(glowing)] virtual furnace item as %itemtype% with (inventory|gui) name %string% [[and ]with cook speed multiplier %number%] [[and ]with fuel speed multiplier %number%]Glowing = If the item will glow like an enchanted item.
item as ItemType = This will determine the item we use as our virtual furnace item. This accepts any item type Skript allows, including items with names, lore, etc.
gui Name = This will be the name that appears in the GUI when the player opens their virtual furnace.
Cook speed multiplier = This optional value will determine the cook speed multiplier for this virtual furnace. Default value = 1.0, meaning it will cook based on your recipes. IF you use a value such as 2.0, the item will cook twice as fast as determined by your recipe.
Fuel speed multiplier = This optional value will determine the fuel speed multiplier for this virtual furnace. Default value = 1.0, meaning the fuel will burn as fast as determined by your registered fuel. IF you use a value such as 2.0, the fuel will burn twice as fast.
Example:
set {_a} to a diamond named "MyPortableFurnace" with lore "Right-Click to access your personal furnace"
set {_b} to a glowing virtual furnace item as {_a} with gui name "Portable Furnace"
set {_c} to a glowing virtual furnace item as {_a} with gui name "Portable Furnace (x2)" with cook speed multiplier 2.0
give player {_b}
give player {_c}