Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- b.settings={}; -- The general table for the block. This just makes editing the variables easier and much more convenient.
- b.settings.id=500; -- Id.
- b.settings.texture_slot=0;
- b.settings.material=material.wood;
- b.settings.texture_path='/textures.png';
- b.settings.name="Tommy's Block";
- b.settings.internal_name="demo";
- b=b.createBlock(b.settings.id,b.settings.texture_slot,b.settings.material,b.settings.texture_path,b.settings.name,b.settings.internal_name)
- b.setLightLevel("demo",0.7)
- if b then -- If the block was created succesfully, add it to the misc tab. Otherwise, log a severe warning on the server console.
- b.setCreativeTab("demo", creativeTabs.misc)
- else
- log.severe("Tommy's block has failed to initiate.")
- end
- -- About the block.setLightLevel() function.
- -- [19:24] <samrg472> Theres an undocumented function you know for block
- -- [19:24] <samrg472> block.setLightLevel(String blockname, int n)
- -- [19:26] <Sledger721> Ooh, cool :D
- -- [19:27] <samrg472> n is > 0 and <= 1 just for reference
- -- [19:27] <samrg472> use things like 0.1 to 1.0
- -- [19:27] <Sledger721> Ok
- -- [19:27] <samrg472> and just plain 0 for no light
- -- [19:27] <Sledger721> Alright. Thanks man :D
Advertisement
Add Comment
Please, Sign In to add comment