#packmode challenge import crafttweaker.item.IItemStack; import crafttweaker.item.IIngredient; import thaumcraft.aspect.CTAspectStack; import crafttweaker.entity.IEntityEquipmentSlot; import crafttweaker.events.IEventManager; import crafttweaker.event.EntityLivingUseItemEvent.Start; import mods.mekanism.infuser; import mods.thermalexpansion.InductionSmelter; import mods.roots.Fey; import mods.thaumcraft.ArcaneWorkbench; import mods.thaumcraft.Infusion; #MC Eternal Scripts print("--- Loading /challenge/ChallengeModeMisc.zs ---"); /* Deprecates: Mekanism.zs RFTools.zs Thermal.zs Adjusts: ExtraUtils.zs */ //EnderIO // Ender Armor basicDisable(, "", false, true); basicDisable(, "", false, true); basicDisable(, "", false, true); basicDisable(, "", false, true); //Gate Witherproofing behind Beneath :> val thermalGlass = { "thermalfoundation:glass" : [1, 2, 3, 4, 5, 6, 7, 8, 9], "thermalfoundation:glass_alloy": [1, 2, 3, 4, 5, 6, 7] } as int[][string]; for id,values in thermalGlass { for value in values { recipes.removeByRecipeName(id +"_"+ value); } } //Lead Glass crafting from scratch recipes.removeByRecipeName("thermalfoundation:glass"); //Steel Glass crafting by hand recipes.removeByRecipeName("thermalfoundation:glass_alloy"); InductionSmelter.removeRecipe(, ); InductionSmelter.addRecipe(, *4, , 8000); //Reinforced Obsidian recipes.removeByRecipeName("enderio:reinforced_obsidian"); recipes.addShaped("mce_challengemode_reinforced_obsidian", *2, [ [, , ], [, , ], [, , ] ]); //Shield Projector recipes.removeByRecipeName("rftools:shield_block1"); recipes.addShaped("mce_challengemode_shield_projector_1", , [ [, , ], [, , ], [, , ] ]); //Block Protector recipes.removeByRecipeName("rftools:block_protector"); recipes.addShaped("mce_challengemode_block_protector", , [ [, , ], [, , ], [, , ] ]); //Runed Obsidian Fey.removeRecipe(); Fey.addRecipe("runed_obsidian", *4, [, , , , ]); //Warding Sigil ArcaneWorkbench.removeRecipe(); ArcaneWorkbench.registerShapedRecipe("warding_sigil", "WARDED_ARCANA", 10, [, , , ], *3, [ [null, , ], [, , ], [, ] ] ); //Witherproof Gating end //Make Cropsticks slightly harder (and funnier) recipes.removeByRecipeName("agricraft:crop_sticks"); //Ancient Wood Rod recipes.addShaped("mce_challengemode_ancient_wood_cropsticks", *2, [ [, ], [, ] ]); //AA Storage Crate stuff // big, and only just a bunch of wood, needs more evil //Small Storage Crate (evil version) recipes.remove(); recipes.addShaped("mce_challengemode_small_storage_crate", , [ [, , ], [, , ], [, , ] ]); //Small Storage Crate Upgrade (rude version) recipes.addShaped("mce_challengemode_small_storage_crate_upgrade", , [ [, , ], [, , ], [, , ] ]); //Wood Casing (slightly evil version) recipes.remove(); recipes.addShaped("mce_challengemode_wood_casing", , [ [, , ], [, , ], [, , ] ]); //Yeet Infinite Range + Crafting SSN remotes for num in 1 to 3 { val remote = itemUtils.getItem("storagenetwork:remote", num); basicDisable(remote, "", false, true); } //Keep the no craft one tho, but price it up recipes.remove(); recipes.addShaped("mce_challengemode_nocraft_ssn_remote", , [ [, , ], [, , ], [, , ] ]); //no small plate press basicDisable(, "", false, true); //remove Enchanted Grave key // very dumb op, basically allows you to negate death recipes.removeByRecipeName("tombstone:enchanted_grave_key"); // disenchant keys when they are used events.onEntityLivingUseItemStart(function(event as crafttweaker.event.EntityLivingUseItemEvent.Start){ if(event.isPlayer && !event.player.world.remote && event.item.definition.id == "tombstone:grave_key" && event.item.hasTag){ if(isNull(event.item.tag.enchant) || event.item.tag.enchant.asBool() == false) return; val unenchantedKey = event.item.updateTag({enchant: false}); for hand in [IEntityEquipmentSlot.mainHand(), IEntityEquipmentSlot.offhand()] as IEntityEquipmentSlot[] { if(event.player.hasItemInSlot(hand) && event.player.getItemInSlot(hand).definition.id == "tombstone:grave_key"){ event.player.setItemToSlot(hand, unenchantedKey); event.player.sendChat(game.localize("mce.challengemode.tombstone.message.grave_key_teleport_fail")); event.player.setCooldown(, 20); event.cancel(); } } } }); //Deny Wither cheese such as sticking its face in Bedrock static okWitherDimensions as int[] = [ 0, 7, -8, -23 ]; events.onEntityJoinWorld(function(event as crafttweaker.event.EntityJoinWorldEvent){ if(!isNull(event.entity.definition) && event.entity.definition.id == "minecraft:wither" && !(okWitherDimensions has event.entity.dimension)){ event.entity.setDead(); event.cancel(); } }); //Tooltips addMultilineLocalizedTooltip(, "mce.challengemode.thermal.tip.hardened_glass_needs_osmium"); .addTooltip(format.red(game.localize("mce.challengemode.tombstone.tip.grave_key_cant_teleport"))); val witherTooltipShift as string[] = game.localize("mce.challengemode.minecraft.tip.wither_only_in_some_dims.shift").split("
"); val witherTooltip as string[] = game.localize("mce.challengemode.minecraft.tip.wither_only_in_some_dims").split("
"); .addShiftTooltip(format.gold(witherTooltipShift[0]), format.gold(witherTooltip[0])); .addShiftTooltip(format.green(witherTooltipShift[1]), format.gold(witherTooltip[1])); .addShiftTooltip(format.green(witherTooltipShift[2]), format.gold(witherTooltip[2])); .addShiftTooltip(format.green(witherTooltipShift[3])); .addShiftTooltip(format.green(witherTooltipShift[4])); print("--- /challenge/ChallengeModeMisc.zs initialized ---");