summaryrefslogtreecommitdiffstats
path: root/cwd/assets/altcraft/scripts/blocks.lua
diff options
context:
space:
mode:
Diffstat (limited to 'cwd/assets/altcraft/scripts/blocks.lua')
-rw-r--r--cwd/assets/altcraft/scripts/blocks.lua22
1 files changed, 20 insertions, 2 deletions
diff --git a/cwd/assets/altcraft/scripts/blocks.lua b/cwd/assets/altcraft/scripts/blocks.lua
index ad00742..07a1f77 100644
--- a/cwd/assets/altcraft/scripts/blocks.lua
+++ b/cwd/assets/altcraft/scripts/blocks.lua
@@ -1,2 +1,20 @@
-print("Hello from altcraft/blocks!")
-return "CONTENT OF ac/blocks" \ No newline at end of file
+local function GetBlockInfo(blockPos)
+ print("Request data for "..blockPos)
+ local bi = BlockInfo.new()
+ bi.collides = true
+ bi.blockstate = ""
+ bi.variant = ""
+ return bi
+end
+
+local function RegisterBlocks()
+ AC.RegisterBlock(BlockId.new(1,0), true, "stone", "normal")
+ AC.RegisterBlock(BlockId.new(2,0), true, "grass", "snowy=false")
+ AC.RegisterBlock(BlockId.new(3,0), true, "dirt", "normal")
+ AC.RegisterBlock(BlockId.new(31,1), false, "tall_grass", "normal")
+end
+
+return {
+ GetBlockInfo = GetBlockInfo,
+ RegisterBlocks = RegisterBlocks,
+} \ No newline at end of file