mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-17 10:55:17 +00:00
More cleanup, brews now average their potion colors instead picking the first
This commit is contained in:
10 files changed
+26
-40
No files matched your search
@@ -28,14 +28,14 @@ import vazkii.botania.client.integration.jei.puredaisy.PureDaisyRecipeHandler;
|
||||
import vazkii.botania.client.integration.jei.runicaltar.RunicAltarRecipeCategory;
|
||||
import vazkii.botania.client.integration.jei.runicaltar.RunicAltarRecipeHandler;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
@JEIPlugin
|
||||
public class JEIBotaniaPlugin implements IModPlugin {
|
||||
|
||||
private IJeiHelpers jeiHelpers;
|
||||
|
||||
@Override
|
||||
public void register(IModRegistry registry) {
|
||||
jeiHelpers = registry.getJeiHelpers();
|
||||
public void register(@Nonnull IModRegistry registry) {
|
||||
IJeiHelpers jeiHelpers = registry.getJeiHelpers();
|
||||
|
||||
registry.addRecipeCategories(
|
||||
new BreweryRecipeCategory(jeiHelpers.getGuiHelper()),
|
||||
@@ -64,6 +64,6 @@ public class JEIBotaniaPlugin implements IModPlugin {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRuntimeAvailable(IJeiRuntime jeiRuntime) {}
|
||||
public void onRuntimeAvailable(@Nonnull IJeiRuntime jeiRuntime) {}
|
||||
|
||||
}
|
||||
+2
-2
@@ -53,11 +53,11 @@ public class BreweryRecipeCategory implements IRecipeCategory {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawExtras(Minecraft minecraft) {
|
||||
public void drawExtras(@Nonnull Minecraft minecraft) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawAnimations(Minecraft minecraft) {
|
||||
public void drawAnimations(@Nonnull Minecraft minecraft) {
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
||||
+2
-2
@@ -60,7 +60,7 @@ public class ElvenTradeRecipeCategory implements IRecipeCategory {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawExtras(Minecraft minecraft) {
|
||||
public void drawExtras(@Nonnull Minecraft minecraft) {
|
||||
GlStateManager.enableAlpha();
|
||||
GlStateManager.enableBlend();
|
||||
overlay.draw(minecraft, 0, 4);
|
||||
@@ -69,7 +69,7 @@ public class ElvenTradeRecipeCategory implements IRecipeCategory {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawAnimations(Minecraft minecraft) {
|
||||
public void drawAnimations(@Nonnull Minecraft minecraft) {
|
||||
minecraft.renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
||||
TextureAtlasSprite sprite = MiscellaneousIcons.INSTANCE.alfPortalTex;
|
||||
Tessellator tess = Tessellator.getInstance();
|
||||
|
||||
+3
-2
@@ -58,7 +58,7 @@ public class ManaPoolRecipeCategory implements IRecipeCategory {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawExtras(Minecraft minecraft) {
|
||||
public void drawExtras(@Nonnull Minecraft minecraft) {
|
||||
GlStateManager.enableAlpha();
|
||||
GlStateManager.enableBlend();
|
||||
overlay.draw(minecraft, 48, 0);
|
||||
@@ -67,9 +67,10 @@ public class ManaPoolRecipeCategory implements IRecipeCategory {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawAnimations(Minecraft minecraft) {
|
||||
public void drawAnimations(@Nonnull Minecraft minecraft) {
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper) {
|
||||
if(!(recipeWrapper instanceof ManaPoolRecipeWrapper))
|
||||
|
||||
+3
-2
@@ -57,7 +57,7 @@ public class PetalApothecaryRecipeCategory implements IRecipeCategory {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawExtras(Minecraft minecraft) {
|
||||
public void drawExtras(@Nonnull Minecraft minecraft) {
|
||||
GlStateManager.enableAlpha();
|
||||
GlStateManager.enableBlend();
|
||||
overlay.draw(minecraft);
|
||||
@@ -66,9 +66,10 @@ public class PetalApothecaryRecipeCategory implements IRecipeCategory {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawAnimations(Minecraft minecraft) {
|
||||
public void drawAnimations(@Nonnull Minecraft minecraft) {
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper) {
|
||||
if(!(recipeWrapper instanceof PetalApothecaryRecipeWrapper))
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ public class PetalApothecaryRecipeWrapper implements IRecipeWrapper {
|
||||
private final ItemStack output;
|
||||
|
||||
public PetalApothecaryRecipeWrapper(RecipePetals recipe) {
|
||||
ImmutableList.Builder builder = ImmutableList.builder();
|
||||
ImmutableList.Builder<Object> builder = ImmutableList.builder();
|
||||
for(Object o : recipe.getInputs()) {
|
||||
if(o instanceof ItemStack) {
|
||||
builder.add(o);
|
||||
|
||||
+3
-2
@@ -56,7 +56,7 @@ public class PureDaisyRecipeCategory implements IRecipeCategory {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawExtras(Minecraft minecraft) {
|
||||
public void drawExtras(@Nonnull Minecraft minecraft) {
|
||||
GlStateManager.enableAlpha();
|
||||
GlStateManager.enableBlend();
|
||||
overlay.draw(minecraft, 48, 0);
|
||||
@@ -65,9 +65,10 @@ public class PureDaisyRecipeCategory implements IRecipeCategory {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawAnimations(Minecraft minecraft) {
|
||||
public void drawAnimations(@Nonnull Minecraft minecraft) {
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper) {
|
||||
if(!(recipeWrapper instanceof PureDaisyRecipeWrapper))
|
||||
|
||||
+3
-2
@@ -56,7 +56,7 @@ public class RunicAltarRecipeCategory implements IRecipeCategory {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawExtras(Minecraft minecraft) {
|
||||
public void drawExtras(@Nonnull Minecraft minecraft) {
|
||||
GlStateManager.enableAlpha();
|
||||
GlStateManager.enableBlend();
|
||||
overlay.draw(minecraft);
|
||||
@@ -65,9 +65,10 @@ public class RunicAltarRecipeCategory implements IRecipeCategory {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawAnimations(Minecraft minecraft) {
|
||||
public void drawAnimations(@Nonnull Minecraft minecraft) {
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper) {
|
||||
if(!(recipeWrapper instanceof RunicAltarRecipeWrapper))
|
||||
|
||||
@@ -65,18 +65,12 @@ public final class LibResources {
|
||||
public static final String ENTRY_METAMORPHIC_STONES = PREFIX_ENTRIES + "metamorphicStones.png";
|
||||
public static final String ENTRY_BANNERS = PREFIX_ENTRIES + "banners.png";
|
||||
|
||||
public static final String MODEL_ALTAR = PREFIX_MODEL + "altar.png";
|
||||
public static final String MODEL_ALTAR_META = PREFIX_MODEL + "altarMeta%d.png";
|
||||
public static final String MODEL_ALTAR_MOSSY = PREFIX_MODEL + "altarMossy.png";
|
||||
public static final String MODEL_SPREADER = PREFIX_MODEL + "spreader.png";
|
||||
public static final String MODEL_SPREADER_REDSTONE = PREFIX_MODEL + "spreaderRedstone.png";
|
||||
public static final String MODEL_SPREADER_DREAMWOOD = PREFIX_MODEL + "spreaderDreamwood.png";
|
||||
public static final String MODEL_SPREADER_HALLOWEEN = PREFIX_MODEL + "spreader_halloween.png";
|
||||
public static final String MODEL_SPREADER_REDSTONE_HALLOWEEN = PREFIX_MODEL + "spreaderRedstone_halloween.png";
|
||||
public static final String MODEL_SPREADER_DREAMWOOD_HALLOWEEN = PREFIX_MODEL + "spreaderDreamwood_halloween.png";
|
||||
public static final String MODEL_POOL = PREFIX_MODEL + "pool.png";
|
||||
public static final String MODEL_INFINITE_POOL = PREFIX_MODEL + "infinitePool.png";
|
||||
public static final String MODEL_DILUTED_POOL = PREFIX_MODEL + "dilutedPool.png";
|
||||
public static final String MODEL_PYLON_OLD = PREFIX_MODEL + "pylonOld.png";
|
||||
public static final String MODEL_PYLON = PREFIX_MODEL + "pylon.png";
|
||||
public static final String MODEL_PYLON_GREEN_OLD = PREFIX_MODEL + "pylonOld1.png";
|
||||
@@ -104,7 +98,6 @@ public final class LibResources {
|
||||
public static final String MODEL_TINY_POTATO = PREFIX_MODEL + "tinyPotato.png";
|
||||
public static final String MODEL_TINY_POTATO_GS = PREFIX_MODEL + "tinyPotatoGray.png";
|
||||
public static final String MODEL_TINY_POTATO_HALLOWEEN = PREFIX_MODEL + "tinyPotato_halloween.png";
|
||||
public static final String MODEL_SPAWNER_CLAW = PREFIX_MODEL + "spawnerClaw.png";
|
||||
public static final String MODEL_BREWERY = PREFIX_MODEL + "brewery.png";
|
||||
public static final String MODEL_TRAVEL_BELT = PREFIX_MODEL + "travelBelt.png";
|
||||
public static final String MODEL_SUPER_TRAVEL_BELT = PREFIX_MODEL + "superTravelBelt.png";
|
||||
@@ -114,20 +107,8 @@ public final class LibResources {
|
||||
public static final String MODEL_UNHOLY_CLOAK = PREFIX_MODEL + "unholyCloak.png";
|
||||
public static final String MODEL_CORPOREA_INDEX = PREFIX_MODEL + "corporeaIndex.png";
|
||||
public static final String MODEL_INVISIBLE_ARMOR = PREFIX_MODEL + "invisibleArmor.png";
|
||||
public static final String MODEL_PUMP = PREFIX_MODEL + "pump.png";
|
||||
public static final String MODEL_MINI_ISLAND = PREFIX_MODEL + "miniIsland.png";
|
||||
public static final String MODEL_MINI_ISLAND_PODZOL = PREFIX_MODEL + "miniIslandPodzol.png";
|
||||
public static final String MODEL_MINI_ISLAND_MYCEL = PREFIX_MODEL + "miniIslandMycelium.png";
|
||||
public static final String MODEL_MINI_ISLAND_SNOW = PREFIX_MODEL + "miniIslandSnow.png";
|
||||
public static final String MODEL_MINI_ISLAND_DRY = PREFIX_MODEL + "miniIslandDry.png";
|
||||
public static final String MODEL_MINI_ISLAND_GOLDEN = PREFIX_MODEL + "miniIslandGolden.png";
|
||||
public static final String MODEL_MINI_ISLAND_VIVID = PREFIX_MODEL + "miniIslandVivid.png";
|
||||
public static final String MODEL_MINI_ISLAND_SCORCHED = PREFIX_MODEL + "miniIslandScorched.png";
|
||||
public static final String MODEL_MINI_ISLAND_INFUSED = PREFIX_MODEL + "miniIslandInfused.png";
|
||||
public static final String MODEL_MINI_ISLAND_MUTATED = PREFIX_MODEL + "miniIslandMutated.png";
|
||||
public static final String MODEL_PINK_WITHER = PREFIX_MODEL + "pinkWither.png";
|
||||
public static final String MODEL_CRYSTAL_CUBE = PREFIX_MODEL + "crystalCube.png";
|
||||
public static final String MODEL_INCENSE_PLATE = PREFIX_MODEL + "incensePlate.png";
|
||||
public static final String MODEL_HOURGLASS = PREFIX_MODEL + "hourglass.png";
|
||||
public static final String MODEL_COCOON = PREFIX_MODEL + "cocoon.png";
|
||||
public static final String MODEL_BELLOWS = PREFIX_MODEL + "bellows.png";
|
||||
@@ -151,8 +132,6 @@ public final class LibResources {
|
||||
public static final String MISC_RAINBOW = PREFIX_MISC + "rainbow.png";
|
||||
public static final String MISC_PLANET = PREFIX_MISC + "planet";
|
||||
|
||||
public static final String OBJ_MODEL_PYLON = PREFIX_OBJ_MODEL + "pylon.obj";
|
||||
|
||||
public static final String CATEGORY_INDEX = PREFIX_CATEGORIES + "index.png";
|
||||
|
||||
public static final String SHADER_PYLON_GLOW_FRAG = PREFIX_SHADER + "pylon_glow.frag";
|
||||
|
||||
@@ -11,11 +11,14 @@
|
||||
package vazkii.botania.common.brew;
|
||||
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.potion.PotionUtils;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
public class BrewModPotion extends BrewMod {
|
||||
|
||||
public BrewModPotion(String key, int cost, PotionEffect... effects) {
|
||||
super(key, effects[0].getPotion().getLiquidColor(), cost, effects);
|
||||
super(key, PotionUtils.getPotionColorFromEffectList(Arrays.asList(effects)), cost, effects);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user