mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-24 16:18:33 +01:00
Compare commits
2 commits
08112ea11c
...
f4c7ea0605
Author | SHA1 | Date | |
---|---|---|---|
|
f4c7ea0605 | ||
|
e0c049f900 |
10 changed files with 74 additions and 105 deletions
|
@ -10,7 +10,7 @@ game_version=1.16.5
|
||||||
forge_version=36.2.2
|
forge_version=36.2.2
|
||||||
|
|
||||||
# Parchment (Mappings)
|
# Parchment (Mappings)
|
||||||
parchment_version=2021.08.08
|
parchment_version=2021.10.17
|
||||||
|
|
||||||
# Other mods
|
# Other mods
|
||||||
jei_version=1.16.4:7.6.1.71
|
jei_version=1.16.4:7.6.1.71
|
||||||
|
|
|
@ -7,8 +7,10 @@
|
||||||
*
|
*
|
||||||
* © 2015-2017 Ellpeck
|
* © 2015-2017 Ellpeck
|
||||||
*/
|
*/
|
||||||
|
/*
|
||||||
@API(owner = ActuallyAdditionsAPI.MOD_ID, apiVersion = ActuallyAdditionsAPI.API_VERSION, provides = ActuallyAdditionsAPI.API_ID)
|
@API(owner = ActuallyAdditionsAPI.MOD_ID, apiVersion = ActuallyAdditionsAPI.API_VERSION, provides = ActuallyAdditionsAPI.API_ID)
|
||||||
package de.ellpeck.actuallyadditions.api;
|
package de.ellpeck.actuallyadditions.api;
|
||||||
|
|
||||||
import net.minecraftforge.fml.common.API;
|
import net.minecraftforge.fml.common.API;
|
||||||
|
|
||||||
|
*/
|
|
@ -12,8 +12,8 @@ package de.ellpeck.actuallyadditions.mod.blocks.render;
|
||||||
|
|
||||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
||||||
import de.ellpeck.actuallyadditions.api.recipe.EmpowererRecipe;
|
|
||||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||||
|
import de.ellpeck.actuallyadditions.mod.crafting.EmpowererRecipe;
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityEmpowerer;
|
import de.ellpeck.actuallyadditions.mod.tile.TileEntityEmpowerer;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
|
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||||
|
@ -56,7 +56,7 @@ public class RenderEmpowerer extends TileEntityRenderer<TileEntityEmpowerer> {
|
||||||
|
|
||||||
matrices.popPose();
|
matrices.popPose();
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
int index = tile.recipeForRenderIndex;
|
int index = tile.recipeForRenderIndex;
|
||||||
if (index >= 0 && ActuallyAdditionsAPI.EMPOWERER_RECIPES.size() > index) {
|
if (index >= 0 && ActuallyAdditionsAPI.EMPOWERER_RECIPES.size() > index) {
|
||||||
EmpowererRecipe recipe = ActuallyAdditionsAPI.EMPOWERER_RECIPES.get(index);
|
EmpowererRecipe recipe = ActuallyAdditionsAPI.EMPOWERER_RECIPES.get(index);
|
||||||
|
@ -69,5 +69,7 @@ public class RenderEmpowerer extends TileEntityRenderer<TileEntityEmpowerer> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,8 +30,6 @@ import de.ellpeck.actuallyadditions.mod.booklet.page.*;
|
||||||
import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues;
|
import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues;
|
||||||
import de.ellpeck.actuallyadditions.mod.crafting.*;
|
import de.ellpeck.actuallyadditions.mod.crafting.*;
|
||||||
import de.ellpeck.actuallyadditions.mod.fluids.InitFluids;
|
import de.ellpeck.actuallyadditions.mod.fluids.InitFluids;
|
||||||
import de.ellpeck.actuallyadditions.mod.gen.AAWorldGen;
|
|
||||||
import de.ellpeck.actuallyadditions.mod.gen.WorldGenLushCaves;
|
|
||||||
import de.ellpeck.actuallyadditions.mod.items.ActuallyItems;
|
import de.ellpeck.actuallyadditions.mod.items.ActuallyItems;
|
||||||
import de.ellpeck.actuallyadditions.mod.items.ItemWingsOfTheBats;
|
import de.ellpeck.actuallyadditions.mod.items.ItemWingsOfTheBats;
|
||||||
import de.ellpeck.actuallyadditions.mod.items.lens.LensDisenchanting;
|
import de.ellpeck.actuallyadditions.mod.items.lens.LensDisenchanting;
|
||||||
|
@ -47,6 +45,7 @@ import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.Items;
|
import net.minecraft.item.Items;
|
||||||
import net.minecraft.item.crafting.IRecipe;
|
import net.minecraft.item.crafting.IRecipe;
|
||||||
import net.minecraft.item.crafting.Ingredient;
|
import net.minecraft.item.crafting.Ingredient;
|
||||||
|
import net.minecraftforge.fluids.FluidAttributes;
|
||||||
import net.minecraftforge.fluids.FluidStack;
|
import net.minecraftforge.fluids.FluidStack;
|
||||||
import net.minecraftforge.fluids.FluidUtil;
|
import net.minecraftforge.fluids.FluidUtil;
|
||||||
|
|
||||||
|
@ -152,10 +151,10 @@ public final class InitBooklet {
|
||||||
//Miscellaneous
|
//Miscellaneous
|
||||||
new BookletChapter("worms", ActuallyAdditionsAPI.entryMisc, new ItemStack(ActuallyItems.WORM.get()), new PageTextOnly(1).addItemsToPage(new ItemStack(ActuallyItems.WORM.get())), new PagePicture(2, "page_worms", 145)).setImportant();
|
new BookletChapter("worms", ActuallyAdditionsAPI.entryMisc, new ItemStack(ActuallyItems.WORM.get()), new PageTextOnly(1).addItemsToPage(new ItemStack(ActuallyItems.WORM.get())), new PagePicture(2, "page_worms", 145)).setImportant();
|
||||||
new BookletChapter("lushCaves", ActuallyAdditionsAPI.entryMisc, new ItemStack(Blocks.STONE), new PageTextOnly(1), new PagePicture(2, "page_lush_caves", 0).setNoText());
|
new BookletChapter("lushCaves", ActuallyAdditionsAPI.entryMisc, new ItemStack(Blocks.STONE), new PageTextOnly(1), new PagePicture(2, "page_lush_caves", 0).setNoText());
|
||||||
new BookletChapter("crystalClusters", ActuallyAdditionsAPI.entryMisc, new ItemStack(ActuallyBlocks.CRYSTAL_CLUSTER_EMERALD.get()), new PageTextOnly(1).addItemsToPage(WorldGenLushCaves.CRYSTAL_CLUSTERS), new PageCrafting(2, MiscCrafting.RECIPES_CRYSTAL_SHARDS).setNoText(), new PageCrafting(3, MiscCrafting.RECIPES_CRYSTAL_SHARDS_BACK).setNoText()).setSpecial();
|
new BookletChapter("crystalClusters", ActuallyAdditionsAPI.entryMisc, new ItemStack(ActuallyBlocks.EMERADIC_CRYSTAL_CLUSTER.get()), new PageTextOnly(1).addItemsToPage(WorldGenLushCaves.CRYSTAL_CLUSTERS), new PageCrafting(2, MiscCrafting.RECIPES_CRYSTAL_SHARDS).setNoText(), new PageCrafting(3, MiscCrafting.RECIPES_CRYSTAL_SHARDS_BACK).setNoText()).setSpecial();
|
||||||
new BookletChapter("banners", ActuallyAdditionsAPI.entryMisc, new ItemStack(Items.BLUE_BANNER, 1), new PageTextOnly(1));
|
new BookletChapter("banners", ActuallyAdditionsAPI.entryMisc, new ItemStack(Items.BLUE_BANNER, 1), new PageTextOnly(1));
|
||||||
new BookletChapter("miscDecorStuffsAndThings", ActuallyAdditionsAPI.entryMisc, new ItemStack(ActuallyBlocks.ETHETIC_GREEN_BLOCK.get()), new PageTextOnly(1), new PageReconstructor(2, LensRecipeHandler.recipeWhiteWall).setNoText(), new PageReconstructor(3, LensRecipeHandler.recipeGreenWall).setNoText());
|
new BookletChapter("miscDecorStuffsAndThings", ActuallyAdditionsAPI.entryMisc, new ItemStack(ActuallyBlocks.ETHETIC_GREEN_BLOCK.get()), new PageTextOnly(1), new PageReconstructor(2, LensRecipeHandler.recipeWhiteWall).setNoText(), new PageReconstructor(3, LensRecipeHandler.recipeGreenWall).setNoText());
|
||||||
chaptersIntroduction[3] = new BookletChapter("quartz", ActuallyAdditionsAPI.entryMisc, new ItemStack(ActuallyItems.itemBlackQuartz.get()), new PageTextOnly(1).addItemsToPage(new ItemStack(ActuallyBlocks.blockMisc, 1, TheMiscBlocks.ORE_QUARTZ.ordinal())).addTextReplacement("<lowest>", AAWorldGen.QUARTZ_MIN).addTextReplacement("<highest>", AAWorldGen.QUARTZ_MAX), new PageTextOnly(2).addItemsToPage(new ItemStack(ActuallyItems.itemBlackQuartz.get())), new PageCrafting(3, BlockCrafting.recipeQuartzBlock).setNoText(), new PageCrafting(4, BlockCrafting.recipeQuartzPillar).setNoText(), new PageCrafting(5, BlockCrafting.recipeQuartzChiseled).setNoText());
|
chaptersIntroduction[3] = new BookletChapter("quartz", ActuallyAdditionsAPI.entryMisc, new ItemStack(ActuallyItems.BLACK_QUARTZ.get()), new PageTextOnly(1).addItemsToPage(new ItemStack(ActuallyBlocks.blockMisc, 1, TheMiscBlocks.ORE_QUARTZ.ordinal())).addTextReplacement("<lowest>", AAWorldGen.QUARTZ_MIN).addTextReplacement("<highest>", AAWorldGen.QUARTZ_MAX), new PageTextOnly(2).addItemsToPage(new ItemStack(ActuallyItems.itemBlackQuartz.get())), new PageCrafting(3, BlockCrafting.recipeQuartzBlock).setNoText(), new PageCrafting(4, BlockCrafting.recipeQuartzPillar).setNoText(), new PageCrafting(5, BlockCrafting.recipeQuartzChiseled).setNoText());
|
||||||
// new BookletChapter("cloud", ActuallyAdditionsAPI.entryMisc, new ItemStack(ActuallyBlocks.blockSmileyCloud), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeSmileyCloud).setWildcard()).setSpecial();
|
// new BookletChapter("cloud", ActuallyAdditionsAPI.entryMisc, new ItemStack(ActuallyBlocks.blockSmileyCloud), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeSmileyCloud).setWildcard()).setSpecial();
|
||||||
new BookletChapter("coalStuff", ActuallyAdditionsAPI.entryMisc, new ItemStack(ActuallyItems.TINY_COAL.get()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeTinyCoal).setNoText(), new PageCrafting(3, ItemCrafting.recipeTinyChar).setNoText(), new PageCrafting(4, BlockCrafting.recipeBlockChar).setNoText());
|
new BookletChapter("coalStuff", ActuallyAdditionsAPI.entryMisc, new ItemStack(ActuallyItems.TINY_COAL.get()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeTinyCoal).setNoText(), new PageCrafting(3, ItemCrafting.recipeTinyChar).setNoText(), new PageCrafting(4, BlockCrafting.recipeBlockChar).setNoText());
|
||||||
ArrayList<BookletPage> lampPages = new ArrayList<>();
|
ArrayList<BookletPage> lampPages = new ArrayList<>();
|
||||||
|
@ -205,9 +204,7 @@ public final class InitBooklet {
|
||||||
new BookletChapter("esd", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(ActuallyBlocks.INPUTTER_ADVANCED.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeESD).setNoText(), new PageCrafting(3, BlockCrafting.recipeAdvancedESD).setNoText()).setSpecial();
|
new BookletChapter("esd", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(ActuallyBlocks.INPUTTER_ADVANCED.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeESD).setNoText(), new PageCrafting(3, BlockCrafting.recipeAdvancedESD).setNoText()).setSpecial();
|
||||||
new BookletChapter("xpSolidifier", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(ActuallyBlocks.XP_SOLIDIFIER.get()), new PageTextOnly(1).addItemsToPage(new ItemStack(ActuallyItems.SOLIDIFIED_EXPERIENCE.get())), new PageCrafting(2, BlockCrafting.recipeSolidifier).setNoText()).setImportant();
|
new BookletChapter("xpSolidifier", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(ActuallyBlocks.XP_SOLIDIFIER.get()), new PageTextOnly(1).addItemsToPage(new ItemStack(ActuallyItems.SOLIDIFIED_EXPERIENCE.get())), new PageCrafting(2, BlockCrafting.recipeSolidifier).setNoText()).setImportant();
|
||||||
new BookletChapter("greenhouseGlass", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(ActuallyBlocks.GREENHOUSE_GLASS.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeGlass));
|
new BookletChapter("greenhouseGlass", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(ActuallyBlocks.GREENHOUSE_GLASS.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeGlass));
|
||||||
// new BookletChapter("fishingNet", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockFishingNet.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeFisher).setNoText());
|
|
||||||
new BookletChapter("feeder", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(ActuallyBlocks.FEEDER.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeFeeder).setNoText());
|
new BookletChapter("feeder", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(ActuallyBlocks.FEEDER.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeFeeder).setNoText());
|
||||||
// new BookletChapter("compost", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockCompost.get()), new PageTextOnly(1).addItemsToPage(new ItemStack(InitItems.itemFertilizer.get())), new PageCrafting(2, BlockCrafting.recipeCompost).setNoText(), new PageTextOnly(3).addItemsToPage(new ItemStack(InitItems.itemMisc.get(), 1, TheMiscItems.MASHED_FOOD.ordinal())));
|
|
||||||
new BookletChapter("crate", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(ActuallyBlocks.blockGiantChest.get()), new PageCrafting(1, BlockCrafting.recipeCrate), new PageCrafting(2, BlockCrafting.recipeCrateMedium).setNoText(), new PageCrafting(3, BlockCrafting.recipeCrateLarge).setNoText(), new PageCrafting(4, ItemCrafting.recipeCrateKeeper), new PageCrafting(5, ItemCrafting.recipeChestToCrateUpgrade), new PageCrafting(6, ItemCrafting.recipeSmallToMediumCrateUpgrade), new PageCrafting(7, ItemCrafting.recipeMediumToLargeCrateUpgrade));
|
new BookletChapter("crate", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(ActuallyBlocks.blockGiantChest.get()), new PageCrafting(1, BlockCrafting.recipeCrate), new PageCrafting(2, BlockCrafting.recipeCrateMedium).setNoText(), new PageCrafting(3, BlockCrafting.recipeCrateLarge).setNoText(), new PageCrafting(4, ItemCrafting.recipeCrateKeeper), new PageCrafting(5, ItemCrafting.recipeChestToCrateUpgrade), new PageCrafting(6, ItemCrafting.recipeSmallToMediumCrateUpgrade), new PageCrafting(7, ItemCrafting.recipeMediumToLargeCrateUpgrade));
|
||||||
new BookletChapter("rangedCollector", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(ActuallyBlocks.RANGED_COLLECTOR.get()), new PageTextOnly(1).addTextReplacement("<range>", TileEntityRangedCollector.RANGE), new PageCrafting(2, BlockCrafting.recipeRangedCollector).setNoText());
|
new BookletChapter("rangedCollector", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(ActuallyBlocks.RANGED_COLLECTOR.get()), new PageTextOnly(1).addTextReplacement("<range>", TileEntityRangedCollector.RANGE), new PageCrafting(2, BlockCrafting.recipeRangedCollector).setNoText());
|
||||||
|
|
||||||
|
@ -232,7 +229,7 @@ public final class InitBooklet {
|
||||||
list.add(new PageCrusherRecipe(6, CrusherCrafting.recipeDiamondHorseArmor).setNoText());
|
list.add(new PageCrusherRecipe(6, CrusherCrafting.recipeDiamondHorseArmor).setNoText());
|
||||||
}
|
}
|
||||||
|
|
||||||
new BookletChapterCrusher("crusher", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(ActuallyBlocks.GRINDER_DOUBLE.get()), list.toArray(new IBookletPage[0]));
|
new BookletChapterCrusher("crusher", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(ActuallyBlocks.CRUSHER_DOUBLE.get()), list.toArray(new IBookletPage[0]));
|
||||||
new BookletChapter("furnaceDouble", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(ActuallyBlocks.POWERED_FURNACE.get()), new PageCrafting(1, BlockCrafting.recipeFurnace).setWildcard().addTextReplacement("<rf>", TileEntityPoweredFurnace.ENERGY_USE));
|
new BookletChapter("furnaceDouble", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(ActuallyBlocks.POWERED_FURNACE.get()), new PageCrafting(1, BlockCrafting.recipeFurnace).setWildcard().addTextReplacement("<rf>", TileEntityPoweredFurnace.ENERGY_USE));
|
||||||
new BookletChapter("lavaFactory", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(ActuallyBlocks.LAVA_FACTORY_CONTROLLER.get()), new PageTextOnly(1).addTextReplacement("<rf>", TileEntityLavaFactoryController.ENERGY_USE), new PagePicture(2, "page_lava_factory", 0).setNoText(), new PageCrafting(3, BlockCrafting.recipeLavaFactory).setNoText(), new PageCrafting(4, BlockCrafting.recipeCasing).setNoText());
|
new BookletChapter("lavaFactory", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(ActuallyBlocks.LAVA_FACTORY_CONTROLLER.get()), new PageTextOnly(1).addTextReplacement("<rf>", TileEntityLavaFactoryController.ENERGY_USE), new PagePicture(2, "page_lava_factory", 0).setNoText(), new PageCrafting(3, BlockCrafting.recipeLavaFactory).setNoText(), new PageCrafting(4, BlockCrafting.recipeCasing).setNoText());
|
||||||
new BookletChapter("energizer", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(ActuallyBlocks.ENERGIZER.get()), new PageCrafting(1, BlockCrafting.recipeEnergizer), new PageCrafting(2, BlockCrafting.recipeEnervator));
|
new BookletChapter("energizer", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(ActuallyBlocks.ENERGIZER.get()), new PageCrafting(1, BlockCrafting.recipeEnergizer), new PageCrafting(2, BlockCrafting.recipeEnervator));
|
||||||
|
@ -271,7 +268,6 @@ public final class InitBooklet {
|
||||||
potionRingPages.add(new PageCrafting(potionRingPages.size() + 1, recipe).setNoText());
|
potionRingPages.add(new PageCrafting(potionRingPages.size() + 1, recipe).setNoText());
|
||||||
}
|
}
|
||||||
new BookletChapter("potionRings", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(ActuallyItems.POTION_RING.get()), potionRingPages.toArray(new BookletPage[potionRingPages.size()]));
|
new BookletChapter("potionRings", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(ActuallyItems.POTION_RING.get()), potionRingPages.toArray(new BookletPage[potionRingPages.size()]));
|
||||||
new BookletChapter("spawnerChanger", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(ActuallyItems.SPAWNER_CHANGER.get()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeSpawnerChanger).setNoText());
|
|
||||||
new BookletChapter("itemFilter", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(ActuallyItems.FILTER.get()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeFilter).setNoText()).setImportant();
|
new BookletChapter("itemFilter", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(ActuallyItems.FILTER.get()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeFilter).setNoText()).setImportant();
|
||||||
|
|
||||||
//RF Using Items
|
//RF Using Items
|
||||||
|
@ -293,9 +289,9 @@ public final class InitBooklet {
|
||||||
chaptersIntroduction[10] = new BookletChapter("trialsIntro", ActuallyAdditionsAPI.entryTrials, new ItemStack(Items.GOLD_INGOT), new PageTextOnly(1), new PageTextOnly(2)).setSpecial();
|
chaptersIntroduction[10] = new BookletChapter("trialsIntro", ActuallyAdditionsAPI.entryTrials, new ItemStack(Items.GOLD_INGOT), new PageTextOnly(1), new PageTextOnly(2)).setSpecial();
|
||||||
new BookletChapterTrials("crystalProduction", new ItemStack(ActuallyItems.EMERADIC_CRYSTAL.get()), false);
|
new BookletChapterTrials("crystalProduction", new ItemStack(ActuallyItems.EMERADIC_CRYSTAL.get()), false);
|
||||||
new BookletChapterTrials("leatherProduction", new ItemStack(Items.LEATHER), false);
|
new BookletChapterTrials("leatherProduction", new ItemStack(Items.LEATHER), false);
|
||||||
new BookletChapterTrials("crystalOil", FluidUtil.getFilledBucket(new FluidStack(InitFluids.fluidCrystalOil, Fluid.BUCKET_VOLUME)), false);
|
new BookletChapterTrials("crystalOil", FluidUtil.getFilledBucket(new FluidStack(InitFluids.fluidCrystalOil, FluidAttributes.BUCKET_VOLUME)), false);
|
||||||
new BookletChapterTrials("autoDisenchanter", new ItemStack(ActuallyItems.DISENCHANTING_LENS.get()), false);
|
new BookletChapterTrials("autoDisenchanter", new ItemStack(ActuallyItems.DISENCHANTING_LENS.get()), false);
|
||||||
new BookletChapterTrials("empoweredOil", FluidUtil.getFilledBucket(new FluidStack(InitFluids.fluidEmpoweredOil, Fluid.BUCKET_VOLUME)), false);
|
new BookletChapterTrials("empoweredOil", FluidUtil.getFilledBucket(new FluidStack(InitFluids.fluidEmpoweredOil, FluidAttributes.BUCKET_VOLUME)), false);
|
||||||
new BookletChapterTrials("mobFarm", new ItemStack(Items.ROTTEN_FLESH), false);
|
new BookletChapterTrials("mobFarm", new ItemStack(Items.ROTTEN_FLESH), false);
|
||||||
new BookletChapterTrials("empowererAutomation", new ItemStack(ActuallyBlocks.EMPOWERER.get()), false);
|
new BookletChapterTrials("empowererAutomation", new ItemStack(ActuallyBlocks.EMPOWERER.get()), false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
package de.ellpeck.actuallyadditions.mod.booklet.gui;
|
package de.ellpeck.actuallyadditions.mod.booklet.gui;
|
||||||
|
|
||||||
|
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter;
|
import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter;
|
||||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry;
|
import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry;
|
||||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
|
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
|
||||||
|
@ -18,6 +19,7 @@ import de.ellpeck.actuallyadditions.mod.booklet.button.EntryButton;
|
||||||
import de.ellpeck.actuallyadditions.mod.booklet.entry.BookletEntryTrials;
|
import de.ellpeck.actuallyadditions.mod.booklet.entry.BookletEntryTrials;
|
||||||
import de.ellpeck.actuallyadditions.mod.booklet.misc.BookletUtils;
|
import de.ellpeck.actuallyadditions.mod.booklet.misc.BookletUtils;
|
||||||
import net.minecraft.client.gui.screen.Screen;
|
import net.minecraft.client.gui.screen.Screen;
|
||||||
|
import net.minecraft.client.gui.widget.button.Button;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||||
|
@ -64,11 +66,11 @@ public class GuiEntry extends GuiBooklet {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawScreenPre(int mouseX, int mouseY, float partialTicks) {
|
public void drawScreenPre(MatrixStack matrices, int mouseX, int mouseY, float partialTicks) {
|
||||||
super.drawScreenPre(mouseX, mouseY, partialTicks);
|
super.drawScreenPre(matrices, mouseX, mouseY, partialTicks);
|
||||||
|
|
||||||
String name = this.entry.getLocalizedName();
|
String name = this.entry.getLocalizedName();
|
||||||
this.fontRenderer.drawString(name, this.guiLeft + this.xSize / 2 - this.fontRenderer.getStringWidth(name) / 2, this.guiTop - 1, 0xFFFFFF, true);
|
this.font.draw(matrices, name, this.guiLeft + this.xSize / 2 - this.font.width(name) / 2, this.guiTop - 1, 0xFFFFFF);
|
||||||
|
|
||||||
for (int i = 0; i < 2; i++) {
|
for (int i = 0; i < 2; i++) {
|
||||||
String pageStrg = "Page " + (this.entryPage * 2 + i + 1) + "/" + this.pageAmount * 2;
|
String pageStrg = "Page " + (this.entryPage * 2 + i + 1) + "/" + this.pageAmount * 2;
|
||||||
|
@ -83,7 +85,7 @@ public class GuiEntry extends GuiBooklet {
|
||||||
if (this.hasSearchBar() && this.searchText != null) {
|
if (this.hasSearchBar() && this.searchText != null) {
|
||||||
this.searchField.setValue(this.searchText);
|
this.searchField.setValue(this.searchText);
|
||||||
if (this.focusSearch) {
|
if (this.focusSearch) {
|
||||||
this.searchField.setFocused(true);
|
this.searchField.setFocus(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,9 +102,9 @@ public class GuiEntry extends GuiBooklet {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
@Override
|
@Override
|
||||||
protected void actionPerformed(GuiButton button) throws IOException {
|
protected void actionPerformed(Button button) throws IOException {
|
||||||
if (button instanceof EntryButton) {
|
if (button instanceof EntryButton) {
|
||||||
int actualId = button.id + this.entryPage * BUTTONS_PER_PAGE * 2;
|
int actualId = button.id + this.entryPage * BUTTONS_PER_PAGE * 2;
|
||||||
|
|
||||||
|
@ -111,7 +113,7 @@ public class GuiEntry extends GuiBooklet {
|
||||||
if (chapter != null) {
|
if (chapter != null) {
|
||||||
IBookletPage[] pages = chapter.getAllPages();
|
IBookletPage[] pages = chapter.getAllPages();
|
||||||
if (pages != null && pages.length > 0) {
|
if (pages != null && pages.length > 0) {
|
||||||
this.mc.displayGuiScreen(BookletUtils.createPageGui(this.previousScreen, this, pages[0]));
|
this.minecraft.setScreen(BookletUtils.createPageGui(this.previousScreen, this, pages[0]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -120,6 +122,8 @@ public class GuiEntry extends GuiBooklet {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addOrModifyItemRenderer(ItemStack renderedStack, int x, int y, float scale, boolean shouldTryTransfer) {
|
public void addOrModifyItemRenderer(ItemStack renderedStack, int x, int y, float scale, boolean shouldTryTransfer) {
|
||||||
|
|
||||||
|
@ -132,7 +136,7 @@ public class GuiEntry extends GuiBooklet {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPageLeftButtonPressed() {
|
public void onPageLeftButtonPressed() {
|
||||||
this.mc.displayGuiScreen(new GuiEntry(this.previousScreen, this.parentPage, this.entry, this.entryPage - 1, this.searchText, this.searchField.isFocused()));
|
this.minecraft.setScreen(new GuiEntry(this.previousScreen, this.parentPage, this.entry, this.entryPage - 1, this.searchText, this.searchField.isFocused()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -142,7 +146,7 @@ public class GuiEntry extends GuiBooklet {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPageRightButtonPressed() {
|
public void onPageRightButtonPressed() {
|
||||||
this.mc.displayGuiScreen(new GuiEntry(this.previousScreen, this.parentPage, this.entry, this.entryPage + 1, this.searchText, this.searchField.isFocused()));
|
this.minecraft.setScreen(new GuiEntry(this.previousScreen, this.parentPage, this.entry, this.entryPage + 1, this.searchText, this.searchField.isFocused()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -152,8 +156,8 @@ public class GuiEntry extends GuiBooklet {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBackButtonPressed() {
|
public void onBackButtonPressed() {
|
||||||
if (!isShiftKeyDown()) {
|
if (!hasShiftDown()) {
|
||||||
this.mc.displayGuiScreen(this.parentPage);
|
this.minecraft.setScreen(this.parentPage);
|
||||||
} else {
|
} else {
|
||||||
super.onBackButtonPressed();
|
super.onBackButtonPressed();
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,12 +10,12 @@
|
||||||
|
|
||||||
package de.ellpeck.actuallyadditions.mod.booklet.gui;
|
package de.ellpeck.actuallyadditions.mod.booklet.gui;
|
||||||
|
|
||||||
|
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
||||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry;
|
import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry;
|
||||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||||
import de.ellpeck.actuallyadditions.mod.booklet.InitBooklet;
|
import de.ellpeck.actuallyadditions.mod.booklet.InitBooklet;
|
||||||
import de.ellpeck.actuallyadditions.mod.booklet.button.EntryButton;
|
import de.ellpeck.actuallyadditions.mod.booklet.button.EntryButton;
|
||||||
import de.ellpeck.actuallyadditions.mod.config.GuiConfiguration;
|
|
||||||
import de.ellpeck.actuallyadditions.mod.data.PlayerData;
|
import de.ellpeck.actuallyadditions.mod.data.PlayerData;
|
||||||
import de.ellpeck.actuallyadditions.mod.data.PlayerData.PlayerSave;
|
import de.ellpeck.actuallyadditions.mod.data.PlayerData.PlayerSave;
|
||||||
import de.ellpeck.actuallyadditions.mod.inventory.gui.TexturedButton;
|
import de.ellpeck.actuallyadditions.mod.inventory.gui.TexturedButton;
|
||||||
|
@ -81,7 +81,7 @@ public class GuiMainPage extends GuiBooklet {
|
||||||
String usedQuote = QUOTES[this.getMinecraft().level.random.nextInt(QUOTES.length)];
|
String usedQuote = QUOTES[this.getMinecraft().level.random.nextInt(QUOTES.length)];
|
||||||
String[] quoteSplit = usedQuote.split("@");
|
String[] quoteSplit = usedQuote.split("@");
|
||||||
if (quoteSplit.length == 2) {
|
if (quoteSplit.length == 2) {
|
||||||
this.quote = this.font.listFormattedStringToWidth(quoteSplit[0], 120);
|
//this.quote = this.font.listFormattedStringToWidth(quoteSplit[0], 120); //TODO wut
|
||||||
this.quoteGuy = quoteSplit[1];
|
this.quoteGuy = quoteSplit[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,14 +134,14 @@ public class GuiMainPage extends GuiBooklet {
|
||||||
|
|
||||||
List<String> configText = new ArrayList<>();
|
List<String> configText = new ArrayList<>();
|
||||||
configText.add(TextFormatting.GOLD + StringUtil.localize("booklet." + ActuallyAdditions.MODID + ".configButton.name"));
|
configText.add(TextFormatting.GOLD + StringUtil.localize("booklet." + ActuallyAdditions.MODID + ".configButton.name"));
|
||||||
configText.addAll(this.font.listFormattedStringToWidth(StringUtil.localizeFormatted("booklet." + ActuallyAdditions.MODID + ".configButton.desc", ActuallyAdditions.NAME).replaceAll("\\\\n", "\n"), 200));
|
//configText.addAll(this.font.listFormattedStringToWidth(StringUtil.localizeFormatted("booklet." + ActuallyAdditions.MODID + ".configButton.desc", ActuallyAdditions.NAME).replaceAll("\\\\n", "\n"), 200)); //TODO wut
|
||||||
this.configButton = new TexturedButton(RES_LOC_GADGETS, this.guiLeft + 16, this.guiTop + this.ySize - 30, 188, 14, 16, 16, configText, btn -> {
|
this.configButton = new TexturedButton(RES_LOC_GADGETS, this.guiLeft + 16, this.guiTop + this.ySize - 30, 188, 14, 16, 16, configText, btn -> {
|
||||||
});
|
});
|
||||||
this.addButton(this.configButton);
|
this.addButton(this.configButton);
|
||||||
|
|
||||||
List<String> achievementText = new ArrayList<>();
|
List<String> achievementText = new ArrayList<>();
|
||||||
achievementText.add(TextFormatting.GOLD + StringUtil.localize("booklet." + ActuallyAdditions.MODID + ".achievementButton.name"));
|
achievementText.add(TextFormatting.GOLD + StringUtil.localize("booklet." + ActuallyAdditions.MODID + ".achievementButton.name"));
|
||||||
achievementText.addAll(this.font.listFormattedStringToWidth(StringUtil.localizeFormatted("booklet." + ActuallyAdditions.MODID + ".achievementButton.desc", ActuallyAdditions.NAME), 200));
|
//achievementText.addAll(this.font.listFormattedStringToWidth(StringUtil.localizeFormatted("booklet." + ActuallyAdditions.MODID + ".achievementButton.desc", ActuallyAdditions.NAME), 200)); //TODO wut
|
||||||
//this.achievementButton = new TexturedButton(RES_LOC_GADGETS, -389, this.guiLeft+36, this.guiTop+this.ySize-30, 204, 14, 16, 16, achievementText);
|
//this.achievementButton = new TexturedButton(RES_LOC_GADGETS, -389, this.guiLeft+36, this.guiTop+this.ySize-30, 204, 14, 16, 16, achievementText);
|
||||||
//this.addButton(this.achievementButton);
|
//this.addButton(this.achievementButton);
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ public class GuiMainPage extends GuiBooklet {
|
||||||
if (!data.didBookTutorial) {
|
if (!data.didBookTutorial) {
|
||||||
this.showTutorial = true;
|
this.showTutorial = true;
|
||||||
|
|
||||||
this.tutorialButton = new GuiButton(666666, this.guiLeft + 140 / 2 - 50, this.guiTop + 146, 100, 20, "Please click me <3");
|
//this.tutorialButton = new GuiButton(666666, this.guiLeft + 140 / 2 - 50, this.guiTop + 146, 100, 20, "Please click me <3");
|
||||||
this.addButton(this.tutorialButton);
|
this.addButton(this.tutorialButton);
|
||||||
|
|
||||||
this.configButton.visible = false;
|
this.configButton.visible = false;
|
||||||
|
@ -166,7 +166,7 @@ public class GuiMainPage extends GuiBooklet {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
@Override
|
@Override
|
||||||
protected void actionPerformed(GuiButton button) throws IOException {
|
protected void actionPerformed(GuiButton button) throws IOException {
|
||||||
if (button instanceof EntryButton) {
|
if (button instanceof EntryButton) {
|
||||||
|
@ -182,6 +182,7 @@ public class GuiMainPage extends GuiBooklet {
|
||||||
GuiScreen achievements = new GuiAAAchievements(this, this.getMinecraft().player.getStatFileWriter());
|
GuiScreen achievements = new GuiAAAchievements(this, this.getMinecraft().player.getStatFileWriter());
|
||||||
this.getMinecraft().displayGuiScreen(achievements);
|
this.getMinecraft().displayGuiScreen(achievements);
|
||||||
}*/
|
}*/
|
||||||
|
/*
|
||||||
else if (button == this.configButton) {
|
else if (button == this.configButton) {
|
||||||
GuiScreen config = new GuiConfiguration(this);
|
GuiScreen config = new GuiConfiguration(this);
|
||||||
this.getMinecraft().setScreen(config);
|
this.getMinecraft().setScreen(config);
|
||||||
|
@ -206,18 +207,18 @@ public class GuiMainPage extends GuiBooklet {
|
||||||
super.actionPerformed(button);
|
super.actionPerformed(button);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void drawScreenPre(int mouseX, int mouseY, float partialTicks) {
|
public void drawScreenPre(MatrixStack stack, int mouseX, int mouseY, float partialTicks) {
|
||||||
super.drawScreenPre(mouseX, mouseY, partialTicks);
|
super.drawScreenPre(stack, mouseX, mouseY, partialTicks);
|
||||||
|
|
||||||
String strg = TextFormatting.DARK_GREEN + StringUtil.localize(this.bookletName);
|
String strg = TextFormatting.DARK_GREEN + StringUtil.localize(this.bookletName);
|
||||||
this.font.draw(strg, this.guiLeft + 72 - this.font.width(strg) / 2 - 3, this.guiTop + 19, 0);
|
this.font.draw(stack, strg, this.guiLeft + 72 - this.font.width(strg) / 2 - 3, this.guiTop + 19, 0);
|
||||||
strg = TextFormatting.DARK_GREEN + StringUtil.localize("info." + ActuallyAdditions.MODID + ".booklet.manualName.2");
|
strg = TextFormatting.DARK_GREEN + StringUtil.localize("info." + ActuallyAdditions.MODID + ".booklet.manualName.2");
|
||||||
this.font.draw(strg, this.guiLeft + 72 - this.font.width(strg) / 2 - 3, this.guiTop + 19 + this.font.lineHeight, 0);
|
this.font.draw(stack, strg, this.guiLeft + 72 - this.font.width(strg) / 2 - 3, this.guiTop + 19 + this.font.lineHeight, 0);
|
||||||
|
|
||||||
strg = TextFormatting.GOLD + TextFormatting.ITALIC.toString() + this.bookletEdition;
|
strg = TextFormatting.GOLD + TextFormatting.ITALIC.toString() + this.bookletEdition;
|
||||||
this.font.draw(strg, this.guiLeft + 72 - this.font.width(strg) / 2 - 3, this.guiTop + 40, 0);
|
this.font.draw(stack, strg, this.guiLeft + 72 - this.font.width(strg) / 2 - 3, this.guiTop + 40, 0);
|
||||||
|
|
||||||
if (this.showTutorial) {
|
if (this.showTutorial) {
|
||||||
String text = TextFormatting.BLUE + "It looks like this is the first time you are using this manual. \nIf you click the button below, some useful bookmarks will be stored at the bottom of the GUI. You should definitely check them out to get started with " + ActuallyAdditions.NAME + "! \nIf you don't want this, shift-click the button.";
|
String text = TextFormatting.BLUE + "It looks like this is the first time you are using this manual. \nIf you click the button below, some useful bookmarks will be stored at the bottom of the GUI. You should definitely check them out to get started with " + ActuallyAdditions.NAME + "! \nIf you don't want this, shift-click the button.";
|
||||||
|
|
|
@ -10,7 +10,9 @@
|
||||||
|
|
||||||
package de.ellpeck.actuallyadditions.mod.booklet.gui;
|
package de.ellpeck.actuallyadditions.mod.booklet.gui;
|
||||||
|
|
||||||
|
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
import com.mojang.blaze3d.platform.GlStateManager;
|
import com.mojang.blaze3d.platform.GlStateManager;
|
||||||
|
import com.mojang.blaze3d.systems.RenderSystem;
|
||||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter;
|
import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter;
|
||||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
|
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
|
||||||
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
|
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
|
||||||
|
@ -85,7 +87,7 @@ public class GuiPage extends GuiBooklet {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(GuiButton button) throws IOException {
|
public void actionPerformed(GuiButton button) throws IOException {
|
||||||
if (button == this.buttonViewOnline) {
|
if (button == this.buttonViewOnline) {
|
||||||
|
@ -109,7 +111,7 @@ public class GuiPage extends GuiBooklet {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void init() {
|
public void init() {
|
||||||
this.itemDisplays.clear();
|
this.itemDisplays.clear();
|
||||||
|
@ -146,8 +148,8 @@ public class GuiPage extends GuiBooklet {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateScreen() {
|
public void tick() {
|
||||||
super.updateScreen();
|
super.tick();
|
||||||
|
|
||||||
for (int i = 0; i < this.pages.length; i++) {
|
for (int i = 0; i < this.pages.length; i++) {
|
||||||
IBookletPage page = this.pages[i];
|
IBookletPage page = this.pages[i];
|
||||||
|
@ -160,13 +162,13 @@ public class GuiPage extends GuiBooklet {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawScreenPre(int mouseX, int mouseY, float partialTicks) {
|
public void drawScreenPre(MatrixStack stack, int mouseX, int mouseY, float partialTicks) {
|
||||||
super.drawScreenPre(mouseX, mouseY, partialTicks);
|
super.drawScreenPre(stack, mouseX, mouseY, partialTicks);
|
||||||
|
|
||||||
if (this.pages[0] != null) {
|
if (this.pages[0] != null) {
|
||||||
IBookletChapter chapter = this.pages[0].getChapter();
|
IBookletChapter chapter = this.pages[0].getChapter();
|
||||||
String name = chapter.getLocalizedName();
|
String name = chapter.getLocalizedName();
|
||||||
this.fontRenderer.drawString(name, this.guiLeft + this.xSize / 2 - this.fontRenderer.getStringWidth(name) / 2, this.guiTop - 1, 0xFFFFFF, true);
|
this.font.draw(stack, name, this.guiLeft + this.xSize / 2 - this.font.width(name) / 2, this.guiTop - 1, 0xFFFFFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < this.pages.length; i++) {
|
for (int i = 0; i < this.pages.length; i++) {
|
||||||
|
@ -176,7 +178,7 @@ public class GuiPage extends GuiBooklet {
|
||||||
String pageStrg = "Page " + (chapter.getPageIndex(this.pages[i]) + 1) + "/" + chapter.getAllPages().length;
|
String pageStrg = "Page " + (chapter.getPageIndex(this.pages[i]) + 1) + "/" + chapter.getAllPages().length;
|
||||||
this.renderScaledAsciiString(pageStrg, this.guiLeft + 25 + i * 136, this.guiTop + this.ySize - 7, 0xFFFFFF, false, this.getLargeFontSize());
|
this.renderScaledAsciiString(pageStrg, this.guiLeft + 25 + i * 136, this.guiTop + this.ySize - 7, 0xFFFFFF, false, this.getLargeFontSize());
|
||||||
|
|
||||||
GlStateManager.color1arg(1F, 1F, 1F);
|
RenderSystem.color3f(1f, 1f, 1f);
|
||||||
page.drawScreenPre(this, this.guiLeft + 6 + i * 142, this.guiTop + 7, mouseX, mouseY, partialTicks);
|
page.drawScreenPre(this, this.guiLeft + 6 + i * 142, this.guiTop + 7, mouseX, mouseY, partialTicks);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -186,13 +188,13 @@ public class GuiPage extends GuiBooklet {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawScreenPost(int mouseX, int mouseY, float partialTicks) {
|
public void drawScreenPost(MatrixStack stack, int mouseX, int mouseY, float partialTicks) {
|
||||||
super.drawScreenPost(mouseX, mouseY, partialTicks);
|
super.drawScreenPost(stack, mouseX, mouseY, partialTicks);
|
||||||
|
|
||||||
for (int i = 0; i < this.pages.length; i++) {
|
for (int i = 0; i < this.pages.length; i++) {
|
||||||
IBookletPage page = this.pages[i];
|
IBookletPage page = this.pages[i];
|
||||||
if (page != null) {
|
if (page != null) {
|
||||||
GlStateManager.color1arg(1F, 1F, 1F);
|
RenderSystem.color3f(1F, 1F, 1F);
|
||||||
page.drawScreenPost(this, this.guiLeft + 6 + i * 142, this.guiTop + 7, mouseX, mouseY, partialTicks);
|
page.drawScreenPost(this, this.guiLeft + 6 + i * 142, this.guiTop + 7, mouseX, mouseY, partialTicks);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -235,7 +237,7 @@ public class GuiPage extends GuiBooklet {
|
||||||
|
|
||||||
int pageNumToOpen = chapter.getPageIndex(page) - 1;
|
int pageNumToOpen = chapter.getPageIndex(page) - 1;
|
||||||
if (pageNumToOpen >= 0 && pageNumToOpen < pages.length) {
|
if (pageNumToOpen >= 0 && pageNumToOpen < pages.length) {
|
||||||
this.mc.displayGuiScreen(BookletUtils.createPageGui(this.previousScreen, this.parentPage, pages[pageNumToOpen]));
|
this.minecraft.setScreen(BookletUtils.createPageGui(this.previousScreen, this.parentPage, pages[pageNumToOpen]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -265,7 +267,7 @@ public class GuiPage extends GuiBooklet {
|
||||||
|
|
||||||
int pageNumToOpen = chapter.getPageIndex(page) + 1;
|
int pageNumToOpen = chapter.getPageIndex(page) + 1;
|
||||||
if (pageNumToOpen >= 0 && pageNumToOpen < pages.length) {
|
if (pageNumToOpen >= 0 && pageNumToOpen < pages.length) {
|
||||||
this.mc.displayGuiScreen(BookletUtils.createPageGui(this.previousScreen, this.parentPage, pages[pageNumToOpen]));
|
this.minecraft.setScreen(BookletUtils.createPageGui(this.previousScreen, this.parentPage, pages[pageNumToOpen]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -278,8 +280,8 @@ public class GuiPage extends GuiBooklet {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBackButtonPressed() {
|
public void onBackButtonPressed() {
|
||||||
if (!isShiftKeyDown()) {
|
if (!hasShiftDown()) {
|
||||||
this.mc.displayGuiScreen(this.parentPage);
|
this.minecraft.setScreen(this.parentPage);
|
||||||
} else {
|
} else {
|
||||||
super.onBackButtonPressed();
|
super.onBackButtonPressed();
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,9 +11,9 @@
|
||||||
package de.ellpeck.actuallyadditions.mod.booklet.page;
|
package de.ellpeck.actuallyadditions.mod.booklet.page;
|
||||||
|
|
||||||
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
|
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
|
||||||
import de.ellpeck.actuallyadditions.api.recipe.EmpowererRecipe;
|
|
||||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||||
import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiBooklet;
|
import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiBooklet;
|
||||||
|
import de.ellpeck.actuallyadditions.mod.crafting.EmpowererRecipe;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
|
|
|
@ -20,6 +20,7 @@ import de.ellpeck.actuallyadditions.mod.material.ArmorMaterials;
|
||||||
import de.ellpeck.actuallyadditions.mod.material.ToolMaterials;
|
import de.ellpeck.actuallyadditions.mod.material.ToolMaterials;
|
||||||
import net.minecraft.inventory.EquipmentSlotType;
|
import net.minecraft.inventory.EquipmentSlotType;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.ItemTier;
|
import net.minecraft.item.ItemTier;
|
||||||
import net.minecraft.item.Items;
|
import net.minecraft.item.Items;
|
||||||
import net.minecraftforge.fml.RegistryObject;
|
import net.minecraftforge.fml.RegistryObject;
|
||||||
|
@ -45,8 +46,18 @@ public final class ActuallyItems {
|
||||||
public static final RegistryObject<Item> COIL = ITEMS.register("coil", ItemBase::new);
|
public static final RegistryObject<Item> COIL = ITEMS.register("coil", ItemBase::new);
|
||||||
public static final RegistryObject<Item> COIL_ADVANCED = ITEMS.register("coil_advanced", ItemBase::new);
|
public static final RegistryObject<Item> COIL_ADVANCED = ITEMS.register("coil_advanced", ItemBase::new);
|
||||||
public static final RegistryObject<Item> RICE_DOUGH = ITEMS.register("rice_dough", ItemBase::new);
|
public static final RegistryObject<Item> RICE_DOUGH = ITEMS.register("rice_dough", ItemBase::new);
|
||||||
public static final RegistryObject<Item> TINY_COAL = ITEMS.register("tiny_coal", ItemBase::new);
|
public static final RegistryObject<Item> TINY_COAL = ITEMS.register("tiny_coal", () -> new ItemBase() {
|
||||||
public static final RegistryObject<Item> TINY_CHARCOAL = ITEMS.register("tiny_charcoal", ItemBase::new);
|
@Override
|
||||||
|
public int getBurnTime(ItemStack stack) {
|
||||||
|
return 200;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
public static final RegistryObject<Item> TINY_CHARCOAL = ITEMS.register("tiny_charcoal", () -> new ItemBase() {
|
||||||
|
@Override
|
||||||
|
public int getBurnTime(ItemStack stack) {
|
||||||
|
return 200;
|
||||||
|
}
|
||||||
|
});
|
||||||
public static final RegistryObject<Item> RICE_SLIME = ITEMS.register("rice_slime", ItemBase::new);
|
public static final RegistryObject<Item> RICE_SLIME = ITEMS.register("rice_slime", ItemBase::new);
|
||||||
public static final RegistryObject<Item> CUP = ITEMS.register("cup", ItemBase::new);
|
public static final RegistryObject<Item> CUP = ITEMS.register("cup", ItemBase::new);
|
||||||
public static final RegistryObject<Item> BAT_WING = ITEMS.register("bat_wing", ItemBase::new);
|
public static final RegistryObject<Item> BAT_WING = ITEMS.register("bat_wing", ItemBase::new);
|
||||||
|
|
|
@ -1,49 +0,0 @@
|
||||||
/*
|
|
||||||
* This file ("FluidStateMapper.java") is part of the Actually Additions mod for Minecraft.
|
|
||||||
* It is created and owned by Ellpeck and distributed
|
|
||||||
* under the Actually Additions License to be found at
|
|
||||||
* http://ellpeck.de/actaddlicense
|
|
||||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
|
||||||
*
|
|
||||||
* © 2015-2017 Ellpeck
|
|
||||||
*/
|
|
||||||
|
|
||||||
package de.ellpeck.actuallyadditions.mod.util;
|
|
||||||
|
|
||||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
|
||||||
import net.minecraft.block.BlockState;
|
|
||||||
import net.minecraft.client.renderer.ItemMeshDefinition;
|
|
||||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
|
||||||
import net.minecraft.client.renderer.block.statemap.StateMapperBase;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.util.ResourceLocation;
|
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
|
||||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
|
||||||
import net.minecraftforge.fluids.Fluid;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* (Excerpted from Tinkers' Construct with permission, thanks guys!)
|
|
||||||
*/
|
|
||||||
@OnlyIn(Dist.CLIENT)
|
|
||||||
public class FluidStateMapper extends StateMapperBase implements ItemMeshDefinition {
|
|
||||||
|
|
||||||
public final Fluid fluid;
|
|
||||||
public final ModelResourceLocation location;
|
|
||||||
|
|
||||||
public FluidStateMapper(Fluid fluid) {
|
|
||||||
this.fluid = fluid;
|
|
||||||
|
|
||||||
this.location = new ModelResourceLocation(new ResourceLocation(ActuallyAdditions.MODID, "fluids"), fluid.getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected ModelResourceLocation getModelResourceLocation(BlockState state) {
|
|
||||||
return this.location;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ModelResourceLocation getModelLocation(ItemStack stack) {
|
|
||||||
return this.location;
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in a new issue