mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-17 10:55:17 +00:00
Delete old challenge code
This commit is contained in:
1 parent
cbe7ec5082
commit
8f1139348c
5 files changed
-150
No files matched your search
@@ -1,37 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the Botania Mod. Get the Source Code in github:
|
||||
* https://github.com/Vazkii/Botania
|
||||
*
|
||||
* Botania is Open Source and distributed under the
|
||||
* Botania License: http://botaniamod.net/license.php
|
||||
*
|
||||
* File Created @ [Jun 29, 2015, 4:45:25 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.client.challenge;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
|
||||
public class Challenge {
|
||||
|
||||
public final String unlocalizedName;
|
||||
public final ItemStack icon;
|
||||
public final EnumChallengeLevel level;
|
||||
public boolean complete = false;
|
||||
|
||||
public Challenge(String unlocalizedName, ItemStack icon, EnumChallengeLevel level) {
|
||||
this.unlocalizedName = unlocalizedName;
|
||||
this.icon = icon;
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
public void writeToNBT(CompoundNBT cmp) {
|
||||
cmp.putBoolean(unlocalizedName, complete);
|
||||
}
|
||||
|
||||
public void readFromNBT(CompoundNBT cmp) {
|
||||
complete = cmp.getBoolean(unlocalizedName);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the Botania Mod. Get the Source Code in github:
|
||||
* https://github.com/Vazkii/Botania
|
||||
*
|
||||
* Botania is Open Source and distributed under the
|
||||
* Botania License: http://botaniamod.net/license.php
|
||||
*
|
||||
* File Created @ [Jun 29, 2015, 4:46:16 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.client.challenge;
|
||||
|
||||
public enum EnumChallengeLevel {
|
||||
|
||||
EASY("botania.challengelevel.easy"),
|
||||
NORMAL("botania.challengelevel.normal"),
|
||||
HARD("botania.challengelevel.hard"),
|
||||
LUNATIC("botania.challengelevel.lunatic");
|
||||
|
||||
final String name;
|
||||
|
||||
private EnumChallengeLevel(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the Botania Mod. Get the Source Code in github:
|
||||
* https://github.com/Vazkii/Botania
|
||||
*
|
||||
* Botania is Open Source and distributed under the
|
||||
* Botania License: http://botaniamod.net/license.php
|
||||
*
|
||||
* File Created @ [Jun 29, 2015, 4:44:49 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.client.challenge;
|
||||
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Items;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.block.ModSubtiles;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.EnumMap;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public final class ModChallenges {
|
||||
|
||||
public static final Map<EnumChallengeLevel, List<Challenge>> challenges = new EnumMap<>(EnumChallengeLevel.class);
|
||||
public static final Map<String, Challenge> challengeLookup = new HashMap<>();
|
||||
|
||||
public static void init() {
|
||||
for(EnumChallengeLevel level : EnumChallengeLevel.class.getEnumConstants())
|
||||
challenges.put(level, new ArrayList<>());
|
||||
|
||||
addChallenge(EnumChallengeLevel.EASY, "flowerFarm", new ItemStack(ModBlocks.pinkFlower));
|
||||
addChallenge(EnumChallengeLevel.EASY, "recordFarm", new ItemStack(Items.MUSIC_DISC_13));
|
||||
addChallenge(EnumChallengeLevel.EASY, "reedFarm", new ItemStack(Blocks.SUGAR_CANE));
|
||||
addChallenge(EnumChallengeLevel.EASY, "cobbleGen", new ItemStack(Blocks.COBBLESTONE));
|
||||
addChallenge(EnumChallengeLevel.EASY, "pureDaisy", new ItemStack(ModSubtiles.pureDaisy));
|
||||
addChallenge(EnumChallengeLevel.EASY, "battery", new ItemStack(ModBlocks.manaPool));
|
||||
|
||||
addChallenge(EnumChallengeLevel.NORMAL, "apothecaryRefill", new ItemStack(ModBlocks.defaultAltar));
|
||||
addChallenge(EnumChallengeLevel.NORMAL, "treeFarm", new ItemStack(Blocks.OAK_SAPLING));
|
||||
addChallenge(EnumChallengeLevel.NORMAL, "fullCropFarm", new ItemStack(Items.WHEAT_SEEDS));
|
||||
addChallenge(EnumChallengeLevel.NORMAL, "animalFarm", new ItemStack(Items.LEATHER));
|
||||
addChallenge(EnumChallengeLevel.NORMAL, "boneMealFarm", new ItemStack(Items.BONE_MEAL));
|
||||
addChallenge(EnumChallengeLevel.NORMAL, "orechid", new ItemStack(ModSubtiles.orechid));
|
||||
|
||||
addChallenge(EnumChallengeLevel.HARD, "mobTower", new ItemStack(Items.BONE));
|
||||
addChallenge(EnumChallengeLevel.HARD, "entropinnyumSetup", new ItemStack(ModSubtiles.entropinnyum));
|
||||
addChallenge(EnumChallengeLevel.HARD, "spectrolusSetup", new ItemStack(ModSubtiles.spectrolus));
|
||||
addChallenge(EnumChallengeLevel.HARD, "shulkMeNotSetup", new ItemStack(ModSubtiles.shulkMeNot));
|
||||
addChallenge(EnumChallengeLevel.HARD, "potionBrewer", new ItemStack(ModBlocks.brewery));
|
||||
|
||||
addChallenge(EnumChallengeLevel.LUNATIC, "kekimurusSetup", new ItemStack(ModSubtiles.kekimurus));
|
||||
addChallenge(EnumChallengeLevel.LUNATIC, "autoQuarry", new ItemStack(Items.DIAMOND_PICKAXE));
|
||||
addChallenge(EnumChallengeLevel.LUNATIC, "runeCrafter", new ItemStack(ModItems.runeWater));
|
||||
}
|
||||
|
||||
private static void addChallenge(EnumChallengeLevel level, String name, ItemStack icon) {
|
||||
Challenge c = new Challenge("botania.challenge." + name, icon, level);
|
||||
challenges.get(level).add(c);
|
||||
challengeLookup.put(c.unlocalizedName, c);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -12,8 +12,6 @@ package vazkii.botania.client.core.handler;
|
||||
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.nbt.CompressedStreamTools;
|
||||
import vazkii.botania.client.challenge.Challenge;
|
||||
import vazkii.botania.client.challenge.ModChallenges;
|
||||
import vazkii.botania.common.lib.LibMisc;
|
||||
|
||||
import java.io.File;
|
||||
@@ -26,7 +24,6 @@ public final class PersistentVariableHelper {
|
||||
|
||||
private static final String TAG_FIRST_LOAD = "firstLoad";
|
||||
private static final String TAG_DOG = "dog";
|
||||
private static final String TAG_CHALLENGES = "challenges";
|
||||
private static final String TAG_LEXICON_NOTES = "lexiconNotes";
|
||||
private static final String TAG_LAST_BOTANIA_VERSION = "lastBotaniaVersion";
|
||||
|
||||
@@ -39,11 +36,6 @@ public final class PersistentVariableHelper {
|
||||
public static void save() throws IOException {
|
||||
CompoundNBT cmp = new CompoundNBT();
|
||||
|
||||
CompoundNBT challengesCmp = new CompoundNBT();
|
||||
for(Challenge c : ModChallenges.challengeLookup.values())
|
||||
c.writeToNBT(challengesCmp);
|
||||
cmp.put(TAG_CHALLENGES, challengesCmp);
|
||||
|
||||
/*
|
||||
CompoundNBT notesCmp = new CompoundNBT();
|
||||
for(String s : GuiLexicon.notes.keySet()) {
|
||||
@@ -64,12 +56,6 @@ public final class PersistentVariableHelper {
|
||||
public static void load() throws IOException {
|
||||
CompoundNBT cmp = getCacheCompound();
|
||||
|
||||
if(cmp.contains(TAG_CHALLENGES)) {
|
||||
CompoundNBT challengesCmp = cmp.getCompound(TAG_CHALLENGES);
|
||||
for(Challenge c : ModChallenges.challengeLookup.values())
|
||||
c.readFromNBT(challengesCmp);
|
||||
}
|
||||
|
||||
if(cmp.contains(TAG_LEXICON_NOTES)) {
|
||||
CompoundNBT notesCmp = cmp.getCompound(TAG_LEXICON_NOTES);
|
||||
Set<String> keys = notesCmp.keySet();
|
||||
|
||||
@@ -29,7 +29,6 @@ import net.minecraftforge.fml.event.lifecycle.FMLLoadCompleteEvent;
|
||||
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import vazkii.botania.api.boss.IBotaniaBoss;
|
||||
import vazkii.botania.client.challenge.ModChallenges;
|
||||
import vazkii.botania.client.core.handler.BaubleRenderHandler;
|
||||
import vazkii.botania.client.core.handler.BossBarHandler;
|
||||
import vazkii.botania.client.core.handler.BoundTileRenderer;
|
||||
@@ -91,8 +90,6 @@ public class ClientProxy implements IProxy {
|
||||
Botania.LOGGER.fatal("Persistent Variables couldn't load!!");
|
||||
}
|
||||
|
||||
ModChallenges.init();
|
||||
|
||||
if(ConfigHandler.CLIENT.boundBlockWireframe.get())
|
||||
MinecraftForge.EVENT_BUS.register(BoundTileRenderer.class);
|
||||
|
||||
|
||||
Reference in new issue
Block a user