changed Item to be an enum abstract
This commit is contained in:
parent
4e69bda3c8
commit
757d7098cf
@ -3,7 +3,7 @@ package lib;
|
||||
/**
|
||||
Represents an item in the game.
|
||||
**/
|
||||
abstract Item(String) to String {
|
||||
enum abstract Item(String) to String {
|
||||
public inline function new(name:String) {
|
||||
// Check if the name is valid. in the format `mod:item_name` e.g. `minecraft:apple`
|
||||
// TODO: implement
|
||||
@ -19,4 +19,7 @@ abstract Item(String) to String {
|
||||
function getBase():String {
|
||||
return this.split(":")[0];
|
||||
}
|
||||
|
||||
var Coal = "minecraft:coal";
|
||||
var Charcoal = "minecraft:charcoal";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user