Last active
February 25, 2020 18:15
-
-
Save hanleybrand/50055b569f8530c4e88ceca3505d8f77 to your computer and use it in GitHub Desktop.
WIP ContentTweaker script to create glowing, reinforced and glowing-reinforced variants of the various glass blocks.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#loader contenttweaker | |
import mods.contenttweaker.VanillaFactory; | |
import mods.contenttweaker.Block; | |
import mods.contenttweaker.Item; | |
// ref values | |
// glass/glowstone 0.3 hardness, 1.5 resistance | |
// hardened glass (education edition), 10 hardness, unknown resistance | |
// metal block 5 hardness, 30 resistance | |
// obsidian 50 hardness, 6000 resistance | |
function addGlassProps(block as Block) as Block { | |
block.setLightOpacity(0); | |
block.setTranslucent(true); | |
block.setFullBlock(false); | |
block.setBlockLayer("TRANSLUCENT"); | |
block.setBlockSoundType(<soundtype:glass>); | |
block.setBlockHardness(0.3); | |
block.setBlockResistance(1.5); | |
return block; | |
} | |
function addGlowProps(block as Block) as Block { | |
block.setLightValue(1.0f); | |
block.setEntitySpawnable(false); | |
return block; | |
} | |
function addReinforcedProps(block as Block) as Block { | |
block.setBlockHardness(5); | |
block.setBlockResistance(100); | |
block.setToolLevel(1); | |
return block; | |
} | |
function makeGlowGlass(block as Block) as Block { | |
addGlassProps(block); | |
addGlowProps(block); | |
return block; | |
} | |
function makeReinforcedGlass(block as Block) as Block { | |
addGlassProps(block); | |
addReinforcedProps(block); | |
return block; | |
} | |
function makeReinforcedGlowGlass(block as Block) as Block { | |
addGlassProps(block); | |
addGlowProps(block); | |
addReinforcedProps(block); | |
return block; | |
} | |
var glowglass = VanillaFactory.createBlock("glowglass", <blockmaterial:glass>); | |
makeGlowGlass(glowglass); | |
glowglass.register(); | |
var reinforced_glass = VanillaFactory.createBlock("reinforced_glass", <blockmaterial:glass>); | |
makeReinforcedGlass(reinforced_glass); | |
reinforced_glass.register(); | |
var reinforced_glowglass = VanillaFactory.createBlock("reinforced_glowglass", <blockmaterial:glass>); | |
makeReinforcedGlowGlass(reinforced_glowglass); | |
reinforced_glowglass.register(); | |
var glowglass_mixture = VanillaFactory.createItem("glowglass_mixture"); | |
glowglass_mixture.register(); | |
var reinforced_glass_mixture = VanillaFactory.createItem("reinforced_glass_mixture"); | |
reinforced_glass_mixture.register(); | |
var reinforced_glowglass_mixture = VanillaFactory.createItem("reinforced_glowglass_mixture"); | |
reinforced_glowglass_mixture.creativeTab = <creativetab:misc>; | |
reinforced_glowglass_mixture.glowing = true; | |
reinforced_glowglass_mixture.maxStackSize = 64; | |
reinforced_glowglass_mixture.register(); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tile.contenttweaker.glowglass.name=Glowglass | |
tile.contenttweaker.reinforced_glass.name=Reinforced Glass | |
tile.contenttweaker.reinforced_glowglass.name=Reinforced Glowglass | |
item.contenttweaker.glowglass_mixture.name=Glowglass Mixture | |
item.contenttweaker.reinforced_glass_mixture.name=Reinforced Glass Mixture | |
item.contenttweaker.reinforced_glowglass_mixture.name=Reinforced Glowglass Mixture |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//This file was created via CT-GUI! Editing it is not advised! | |
//Don't touch me! | |
//#Remove | |
//Don't touch me! | |
//#Add | |
furnace.addRecipe(<contenttweaker:reinforced_glass>, <contenttweaker:reinforced_glass_mixture>, 2.0); | |
furnace.addRecipe(<contenttweaker:glowglass>, <contenttweaker:glowglass_mixture>, 2.0); | |
recipes.addShapeless(<contenttweaker:reinforced_glowglass_mixture> * 4, [<minecraft:iron_ingot>,<minecraft:sand>,<minecraft:glowstone_dust>]); | |
recipes.addShapeless(<contenttweaker:reinforced_glass_mixture> * 2, [<minecraft:iron_ingot>,<minecraft:sand>]); | |
recipes.addShapeless(<contenttweaker:glowglass_mixture>, [<minecraft:glowstone_dust>,<minecraft:sand>]); | |
//File End |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment