Created
September 16, 2018 02:04
-
-
Save Lemonszz/8c5009c5d9085d3b6a6aa086c9eacec6 to your computer and use it in GitHub Desktop.
Set Effect Examples
This file contains 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
import crafttweaker.data.IData; | |
val helm = <minecraft:diamond_helmet>.withDisplayName("test"); | |
val armor = mods.SetEffect.newSet() | |
.setName("argh") | |
.withHead(helm) | |
.withChest(<minecraft:diamond_chestplate>) | |
.addEffect(<potion:minecraft:strength>.makePotionEffect(40, 2)) | |
.addEffect(<potion:minecraft:night_vision>.makePotionEffect(40, 1)) | |
.register(); | |
val iron_set = mods.SetEffect.newSet() | |
.withHead(<minecraft:iron_helmet>) | |
.withChest(<minecraft:iron_chestplate>) | |
.withLegs(<minecraft:iron_leggings>) | |
.withFeet(<minecraft:iron_boots>) | |
.withMainhand(<minecraft:iron_sword>) | |
.withOffhand(<minecraft:shield>) | |
.addEffect(<potion:minecraft:weakness>.makePotionEffect(100, 1)) | |
.setName("Iron_Set_Name") | |
.register(); | |
val diamond_set = mods.SetEffect.getSetFromMaterial("diamond") | |
.addEffect(<potion:minecraft:weakness>.makePotionEffect(100, 1)); | |
mods.SetEffect.register(diamond_set); | |
val heavy_boots = <minecraft:iron_boots>.withDisplayName("Heavy Boots").withLore(["These boots are very heavy!"]); | |
val heavy_boots_set = mods.SetEffect.newSet() | |
.setName("heavy_boots") | |
.withFeet(heavy_boots) | |
.addEffect(<potion:minecraft:slowness>.makePotionEffect(100, 3, true, false)) | |
.addParticle("totem", 0, 0, 0, 1, 1, 1, -1, -1, -1, 1, 2, 1, -0.2, 0.2, 10) | |
.register(); | |
val color = { | |
"display": | |
{ | |
"color": 16007918 | |
} | |
} as IData; | |
val lhelm = <minecraft:leather_helmet>.withTag(color); | |
val lchest = <minecraft:leather_chestplate>.withTag(color); | |
val lleg = <minecraft:leather_leggings>.withTag(color); | |
val lfeet = <minecraft:leather_boots>.withTag(color); | |
val leather = mods.SetEffect.newSet() | |
.withHead(lhelm) | |
.withChest(lchest) | |
.withLegs(lleg) | |
.withFeet(lfeet) | |
.setName("love") | |
.addParticle("heart", 0, 3, 0, 1, 4, 1, 0, -1, 0, 0, -1, 0, -0.2, 0.2, 3) | |
.addAttackerEffect(<potion:minecraft:levitation>.makePotionEffect(100, 3, true, false)) | |
.register(); | |
val stage_test = mods.SetEffect.newSet().requireGamestage("only").addParticle("heart", 0, 3, 0, 1, 4, 1, 0, -1, 0, 0, -1, 0, -0.2, 0.2, 3).register(); | |
var gold_set = mods.SetEffect.newSet() | |
.setName("gold") | |
.withHead(<minecraft:golden_helmet>) | |
.withChest(<minecraft:golden_chestplate>) | |
.withLegs(<minecraft:golden_leggings>) | |
.withFeet(<minecraft:golden_boots>) | |
.addEffect(<potion:minecraft:fire_resistance>.makePotionEffect(100, 0)) | |
.addEffect(<potion:minecraft:resistance>.makePotionEffect(100, 1)) | |
.addEffect(<potion:minecraft:absorption>.makePotionEffect(100, 0)); | |
mods.SetEffect.register(gold_set); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment