update gradle, apply migration mappings, start fixing stuff

This commit is contained in:
Vincent Lee committed 2019-06-08 01:07:26 -07:00
1 parent 2f3a1935cf
commit 7ef12b61d8
650 files changed
+7307 -6234

No files matched your search

@@ -12,12 +12,15 @@ package vazkii.botania.api;
import com.google.common.base.Preconditions;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.block.BlockState;
import net.minecraft.entity.Entity;
import net.minecraft.init.SoundEvents;
import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.EnumDyeColor;
import net.minecraft.item.EnumRarity;
import net.minecraft.inventory.EquipmentSlotType;
import net.minecraft.item.DyeColor;
import net.minecraft.item.Rarity;
import net.minecraft.util.SoundEvents;
import net.minecraft.inventory.EquipmentSlotType;
import net.minecraft.item.DyeColor;
import net.minecraft.item.Rarity;
import net.minecraft.item.IArmorMaterial;
import net.minecraft.item.IItemTier;
import net.minecraft.item.Item;
@@ -25,6 +28,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.Ingredient;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.SoundEvent;
import net.minecraft.util.SoundEvents;
import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.capabilities.CapabilityInject;
@@ -77,19 +81,19 @@ public final class BotaniaAPI {
public static Map<ResourceLocation, Integer> oreWeights = Collections.emptyMap();
public static Map<ResourceLocation, Integer> oreWeightsNether = Collections.emptyMap();
public static Map<IRegistryDelegate<Block>, Function<EnumDyeColor, Block>> paintableBlocks = Collections.emptyMap();
public static Map<IRegistryDelegate<Block>, Function<DyeColor, Block>> paintableBlocks = Collections.emptyMap();
public static final Set<Class<? extends Entity>> gravityRodBlacklist = new LinkedHashSet<>();
private static final int[] MAX_DAMAGE_ARRAY = new int[]{13, 15, 16, 11};
public static final IArmorMaterial MANASTEEL_ARMOR_MAT = new IArmorMaterial() {
private final int[] damageReduction = { 2, 5, 6, 2 };
@Override
public int getDurability(EntityEquipmentSlot slotIn) {
public int getDurability(EquipmentSlotType slotIn) {
return 16 * MAX_DAMAGE_ARRAY[slotIn.getIndex()];
}
@Override
public int getDamageReductionAmount(EntityEquipmentSlot slotIn) {
public int getDamageReductionAmount(EquipmentSlotType slotIn) {
return damageReduction[slotIn.getIndex()];
}
@@ -156,12 +160,12 @@ public final class BotaniaAPI {
public static final IArmorMaterial ELEMENTIUM_ARMOR_MAT = new IArmorMaterial() {
private final int[] damageReduction = { 2, 5, 6, 2 };
@Override
public int getDurability(EntityEquipmentSlot slotIn) {
public int getDurability(EquipmentSlotType slotIn) {
return 18 * MAX_DAMAGE_ARRAY[slotIn.getIndex()];
}
@Override
public int getDamageReductionAmount(EntityEquipmentSlot slotIn) {
public int getDamageReductionAmount(EquipmentSlotType slotIn) {
return damageReduction[slotIn.getIndex()];
}
@@ -228,12 +232,12 @@ public final class BotaniaAPI {
public static final IArmorMaterial TERRASTEEL_ARMOR_MAT = new IArmorMaterial() {
private final int[] damageReduction = { 3, 6, 8, 3 };
@Override
public int getDurability(EntityEquipmentSlot slotIn) {
public int getDurability(EquipmentSlotType slotIn) {
return 34 * MAX_DAMAGE_ARRAY[slotIn.getIndex()];
}
@Override
public int getDamageReductionAmount(EntityEquipmentSlot slotIn) {
public int getDamageReductionAmount(EquipmentSlotType slotIn) {
return damageReduction[slotIn.getIndex()];
}
@@ -299,12 +303,12 @@ public final class BotaniaAPI {
public static final IArmorMaterial MANAWEAVE_ARMOR_MAT = new IArmorMaterial() {
private final int[] damageReduction = { 1, 2, 2, 1 };
@Override
public int getDurability(EntityEquipmentSlot slotIn) {
public int getDurability(EquipmentSlotType slotIn) {
return 5 * MAX_DAMAGE_ARRAY[slotIn.getIndex()];
}
@Override
public int getDamageReductionAmount(EntityEquipmentSlot slotIn) {
public int getDamageReductionAmount(EquipmentSlotType slotIn) {
return damageReduction[slotIn.getIndex()];
}
@@ -335,7 +339,7 @@ public final class BotaniaAPI {
}
};
public static final EnumRarity rarityRelic = EnumRarity.EPIC; // todo 1.13 EnumHelper.addRarity("RELIC", TextFormatting.GOLD, "Relic");
public static final Rarity rarityRelic = Rarity.EPIC; // todo 1.13 EnumHelper.addRarity("RELIC", TextFormatting.GOLD, "Relic");
public static final KnowledgeType basicKnowledge;
public static final KnowledgeType elvenKnowledge;
@@ -436,7 +440,7 @@ public final class BotaniaAPI {
* @param outputState The blockstate to be placed upon recipe completion.
* @return The recipe created.
*/
public static RecipePureDaisy registerPureDaisyRecipe(Object input, IBlockState outputState) {
public static RecipePureDaisy registerPureDaisyRecipe(Object input, BlockState outputState) {
return registerPureDaisyRecipe(input, outputState, RecipePureDaisy.DEFAULT_TIME);
}
@@ -448,7 +452,7 @@ public final class BotaniaAPI {
* The Pure Daisy only ticks one block at a time in a round robin fashion.
* @return The recipe created.
*/
public static RecipePureDaisy registerPureDaisyRecipe(Object input, IBlockState outputState, int time) {
public static RecipePureDaisy registerPureDaisyRecipe(Object input, BlockState outputState, int time) {
RecipePureDaisy recipe = new RecipePureDaisy(input, outputState, time);
pureDaisyRecipes.add(recipe);
return recipe;
@@ -3,113 +3,111 @@ package vazkii.botania.api;
import com.google.common.collect.BiMap;
import com.google.common.collect.HashBiMap;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.item.EnumDyeColor;
import net.minecraft.block.Blocks;
import net.minecraft.item.DyeColor;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.event.lifecycle.FMLModIdMappingEvent;
import java.util.function.Function;
@Mod.EventBusSubscriber(modid = "botania")
public final class ColorHelper {
public static final BiMap<EnumDyeColor, Block> STAINED_GLASS_MAP = HashBiMap.create();
public static final BiMap<EnumDyeColor, Block> STAINED_GLASS_PANE_MAP = HashBiMap.create();
public static final BiMap<EnumDyeColor, Block> TERRACOTTA_MAP = HashBiMap.create();
public static final BiMap<EnumDyeColor, Block> WOOL_MAP = HashBiMap.create();
public static final BiMap<EnumDyeColor, Block> CARPET_MAP = HashBiMap.create();
public static final BiMap<DyeColor, Block> STAINED_GLASS_MAP = HashBiMap.create();
public static final BiMap<DyeColor, Block> STAINED_GLASS_PANE_MAP = HashBiMap.create();
public static final BiMap<DyeColor, Block> TERRACOTTA_MAP = HashBiMap.create();
public static final BiMap<DyeColor, Block> WOOL_MAP = HashBiMap.create();
public static final BiMap<DyeColor, Block> CARPET_MAP = HashBiMap.create();
@SubscribeEvent
public static void idShift(FMLModIdMappingEvent evt) {
STAINED_GLASS_MAP.clear();
STAINED_GLASS_MAP.put(EnumDyeColor.WHITE, Blocks.WHITE_STAINED_GLASS);
STAINED_GLASS_MAP.put(EnumDyeColor.ORANGE, Blocks.ORANGE_STAINED_GLASS);
STAINED_GLASS_MAP.put(EnumDyeColor.MAGENTA, Blocks.MAGENTA_STAINED_GLASS);
STAINED_GLASS_MAP.put(EnumDyeColor.LIGHT_BLUE, Blocks.LIGHT_BLUE_STAINED_GLASS);
STAINED_GLASS_MAP.put(EnumDyeColor.YELLOW, Blocks.YELLOW_STAINED_GLASS);
STAINED_GLASS_MAP.put(EnumDyeColor.LIME, Blocks.LIME_STAINED_GLASS);
STAINED_GLASS_MAP.put(EnumDyeColor.PINK, Blocks.PINK_STAINED_GLASS);
STAINED_GLASS_MAP.put(EnumDyeColor.GRAY, Blocks.GRAY_STAINED_GLASS);
STAINED_GLASS_MAP.put(EnumDyeColor.LIGHT_GRAY, Blocks.LIGHT_GRAY_STAINED_GLASS);
STAINED_GLASS_MAP.put(EnumDyeColor.CYAN, Blocks.CYAN_STAINED_GLASS);
STAINED_GLASS_MAP.put(EnumDyeColor.PURPLE, Blocks.PURPLE_STAINED_GLASS);
STAINED_GLASS_MAP.put(EnumDyeColor.BLUE, Blocks.BLUE_STAINED_GLASS);
STAINED_GLASS_MAP.put(EnumDyeColor.BROWN, Blocks.BROWN_STAINED_GLASS);
STAINED_GLASS_MAP.put(EnumDyeColor.GREEN, Blocks.GREEN_STAINED_GLASS);
STAINED_GLASS_MAP.put(EnumDyeColor.RED, Blocks.RED_STAINED_GLASS);
STAINED_GLASS_MAP.put(EnumDyeColor.BLACK, Blocks.BLACK_STAINED_GLASS);
STAINED_GLASS_MAP.put(DyeColor.WHITE, Blocks.WHITE_STAINED_GLASS);
STAINED_GLASS_MAP.put(DyeColor.ORANGE, Blocks.ORANGE_STAINED_GLASS);
STAINED_GLASS_MAP.put(DyeColor.MAGENTA, Blocks.MAGENTA_STAINED_GLASS);
STAINED_GLASS_MAP.put(DyeColor.LIGHT_BLUE, Blocks.LIGHT_BLUE_STAINED_GLASS);
STAINED_GLASS_MAP.put(DyeColor.YELLOW, Blocks.YELLOW_STAINED_GLASS);
STAINED_GLASS_MAP.put(DyeColor.LIME, Blocks.LIME_STAINED_GLASS);
STAINED_GLASS_MAP.put(DyeColor.PINK, Blocks.PINK_STAINED_GLASS);
STAINED_GLASS_MAP.put(DyeColor.GRAY, Blocks.GRAY_STAINED_GLASS);
STAINED_GLASS_MAP.put(DyeColor.LIGHT_GRAY, Blocks.LIGHT_GRAY_STAINED_GLASS);
STAINED_GLASS_MAP.put(DyeColor.CYAN, Blocks.CYAN_STAINED_GLASS);
STAINED_GLASS_MAP.put(DyeColor.PURPLE, Blocks.PURPLE_STAINED_GLASS);
STAINED_GLASS_MAP.put(DyeColor.BLUE, Blocks.BLUE_STAINED_GLASS);
STAINED_GLASS_MAP.put(DyeColor.BROWN, Blocks.BROWN_STAINED_GLASS);
STAINED_GLASS_MAP.put(DyeColor.GREEN, Blocks.GREEN_STAINED_GLASS);
STAINED_GLASS_MAP.put(DyeColor.RED, Blocks.RED_STAINED_GLASS);
STAINED_GLASS_MAP.put(DyeColor.BLACK, Blocks.BLACK_STAINED_GLASS);
STAINED_GLASS_PANE_MAP.clear();
STAINED_GLASS_PANE_MAP.put(EnumDyeColor.WHITE, Blocks.WHITE_STAINED_GLASS_PANE);
STAINED_GLASS_PANE_MAP.put(EnumDyeColor.ORANGE, Blocks.ORANGE_STAINED_GLASS_PANE);
STAINED_GLASS_PANE_MAP.put(EnumDyeColor.MAGENTA, Blocks.MAGENTA_STAINED_GLASS_PANE);
STAINED_GLASS_PANE_MAP.put(EnumDyeColor.LIGHT_BLUE, Blocks.LIGHT_BLUE_STAINED_GLASS_PANE);
STAINED_GLASS_PANE_MAP.put(EnumDyeColor.YELLOW, Blocks.YELLOW_STAINED_GLASS_PANE);
STAINED_GLASS_PANE_MAP.put(EnumDyeColor.LIME, Blocks.LIME_STAINED_GLASS_PANE);
STAINED_GLASS_PANE_MAP.put(EnumDyeColor.PINK, Blocks.PINK_STAINED_GLASS_PANE);
STAINED_GLASS_PANE_MAP.put(EnumDyeColor.GRAY, Blocks.GRAY_STAINED_GLASS_PANE);
STAINED_GLASS_PANE_MAP.put(EnumDyeColor.LIGHT_GRAY, Blocks.LIGHT_GRAY_STAINED_GLASS_PANE);
STAINED_GLASS_PANE_MAP.put(EnumDyeColor.CYAN, Blocks.CYAN_STAINED_GLASS_PANE);
STAINED_GLASS_PANE_MAP.put(EnumDyeColor.PURPLE, Blocks.PURPLE_STAINED_GLASS_PANE);
STAINED_GLASS_PANE_MAP.put(EnumDyeColor.BLUE, Blocks.BLUE_STAINED_GLASS_PANE);
STAINED_GLASS_PANE_MAP.put(EnumDyeColor.BROWN, Blocks.BROWN_STAINED_GLASS_PANE);
STAINED_GLASS_PANE_MAP.put(EnumDyeColor.GREEN, Blocks.GREEN_STAINED_GLASS_PANE);
STAINED_GLASS_PANE_MAP.put(EnumDyeColor.RED, Blocks.RED_STAINED_GLASS_PANE);
STAINED_GLASS_PANE_MAP.put(EnumDyeColor.BLACK, Blocks.BLACK_STAINED_GLASS_PANE);
STAINED_GLASS_PANE_MAP.put(DyeColor.WHITE, Blocks.WHITE_STAINED_GLASS_PANE);
STAINED_GLASS_PANE_MAP.put(DyeColor.ORANGE, Blocks.ORANGE_STAINED_GLASS_PANE);
STAINED_GLASS_PANE_MAP.put(DyeColor.MAGENTA, Blocks.MAGENTA_STAINED_GLASS_PANE);
STAINED_GLASS_PANE_MAP.put(DyeColor.LIGHT_BLUE, Blocks.LIGHT_BLUE_STAINED_GLASS_PANE);
STAINED_GLASS_PANE_MAP.put(DyeColor.YELLOW, Blocks.YELLOW_STAINED_GLASS_PANE);
STAINED_GLASS_PANE_MAP.put(DyeColor.LIME, Blocks.LIME_STAINED_GLASS_PANE);
STAINED_GLASS_PANE_MAP.put(DyeColor.PINK, Blocks.PINK_STAINED_GLASS_PANE);
STAINED_GLASS_PANE_MAP.put(DyeColor.GRAY, Blocks.GRAY_STAINED_GLASS_PANE);
STAINED_GLASS_PANE_MAP.put(DyeColor.LIGHT_GRAY, Blocks.LIGHT_GRAY_STAINED_GLASS_PANE);
STAINED_GLASS_PANE_MAP.put(DyeColor.CYAN, Blocks.CYAN_STAINED_GLASS_PANE);
STAINED_GLASS_PANE_MAP.put(DyeColor.PURPLE, Blocks.PURPLE_STAINED_GLASS_PANE);
STAINED_GLASS_PANE_MAP.put(DyeColor.BLUE, Blocks.BLUE_STAINED_GLASS_PANE);
STAINED_GLASS_PANE_MAP.put(DyeColor.BROWN, Blocks.BROWN_STAINED_GLASS_PANE);
STAINED_GLASS_PANE_MAP.put(DyeColor.GREEN, Blocks.GREEN_STAINED_GLASS_PANE);
STAINED_GLASS_PANE_MAP.put(DyeColor.RED, Blocks.RED_STAINED_GLASS_PANE);
STAINED_GLASS_PANE_MAP.put(DyeColor.BLACK, Blocks.BLACK_STAINED_GLASS_PANE);
TERRACOTTA_MAP.clear();
TERRACOTTA_MAP.put(EnumDyeColor.WHITE, Blocks.WHITE_TERRACOTTA);
TERRACOTTA_MAP.put(EnumDyeColor.ORANGE, Blocks.ORANGE_TERRACOTTA);
TERRACOTTA_MAP.put(EnumDyeColor.MAGENTA, Blocks.MAGENTA_TERRACOTTA);
TERRACOTTA_MAP.put(EnumDyeColor.LIGHT_BLUE, Blocks.LIGHT_BLUE_TERRACOTTA);
TERRACOTTA_MAP.put(EnumDyeColor.YELLOW, Blocks.YELLOW_TERRACOTTA);
TERRACOTTA_MAP.put(EnumDyeColor.LIME, Blocks.LIME_TERRACOTTA);
TERRACOTTA_MAP.put(EnumDyeColor.PINK, Blocks.PINK_TERRACOTTA);
TERRACOTTA_MAP.put(EnumDyeColor.GRAY, Blocks.GRAY_TERRACOTTA);
TERRACOTTA_MAP.put(EnumDyeColor.LIGHT_GRAY, Blocks.LIGHT_GRAY_TERRACOTTA);
TERRACOTTA_MAP.put(EnumDyeColor.CYAN, Blocks.CYAN_TERRACOTTA);
TERRACOTTA_MAP.put(EnumDyeColor.PURPLE, Blocks.PURPLE_TERRACOTTA);
TERRACOTTA_MAP.put(EnumDyeColor.BLUE, Blocks.BLUE_TERRACOTTA);
TERRACOTTA_MAP.put(EnumDyeColor.BROWN, Blocks.BROWN_TERRACOTTA);
TERRACOTTA_MAP.put(EnumDyeColor.GREEN, Blocks.GREEN_TERRACOTTA);
TERRACOTTA_MAP.put(EnumDyeColor.RED, Blocks.RED_TERRACOTTA);
TERRACOTTA_MAP.put(EnumDyeColor.BLACK, Blocks.BLACK_TERRACOTTA);
TERRACOTTA_MAP.put(DyeColor.WHITE, Blocks.WHITE_TERRACOTTA);
TERRACOTTA_MAP.put(DyeColor.ORANGE, Blocks.ORANGE_TERRACOTTA);
TERRACOTTA_MAP.put(DyeColor.MAGENTA, Blocks.MAGENTA_TERRACOTTA);
TERRACOTTA_MAP.put(DyeColor.LIGHT_BLUE, Blocks.LIGHT_BLUE_TERRACOTTA);
TERRACOTTA_MAP.put(DyeColor.YELLOW, Blocks.YELLOW_TERRACOTTA);
TERRACOTTA_MAP.put(DyeColor.LIME, Blocks.LIME_TERRACOTTA);
TERRACOTTA_MAP.put(DyeColor.PINK, Blocks.PINK_TERRACOTTA);
TERRACOTTA_MAP.put(DyeColor.GRAY, Blocks.GRAY_TERRACOTTA);
TERRACOTTA_MAP.put(DyeColor.LIGHT_GRAY, Blocks.LIGHT_GRAY_TERRACOTTA);
TERRACOTTA_MAP.put(DyeColor.CYAN, Blocks.CYAN_TERRACOTTA);
TERRACOTTA_MAP.put(DyeColor.PURPLE, Blocks.PURPLE_TERRACOTTA);
TERRACOTTA_MAP.put(DyeColor.BLUE, Blocks.BLUE_TERRACOTTA);
TERRACOTTA_MAP.put(DyeColor.BROWN, Blocks.BROWN_TERRACOTTA);
TERRACOTTA_MAP.put(DyeColor.GREEN, Blocks.GREEN_TERRACOTTA);
TERRACOTTA_MAP.put(DyeColor.RED, Blocks.RED_TERRACOTTA);
TERRACOTTA_MAP.put(DyeColor.BLACK, Blocks.BLACK_TERRACOTTA);
WOOL_MAP.clear();
WOOL_MAP.put(EnumDyeColor.WHITE, Blocks.WHITE_WOOL);
WOOL_MAP.put(EnumDyeColor.ORANGE, Blocks.ORANGE_WOOL);
WOOL_MAP.put(EnumDyeColor.MAGENTA, Blocks.MAGENTA_WOOL);
WOOL_MAP.put(EnumDyeColor.LIGHT_BLUE, Blocks.LIGHT_BLUE_WOOL);
WOOL_MAP.put(EnumDyeColor.YELLOW, Blocks.YELLOW_WOOL);
WOOL_MAP.put(EnumDyeColor.LIME, Blocks.LIME_WOOL);
WOOL_MAP.put(EnumDyeColor.PINK, Blocks.PINK_WOOL);
WOOL_MAP.put(EnumDyeColor.GRAY, Blocks.GRAY_WOOL);
WOOL_MAP.put(EnumDyeColor.LIGHT_GRAY, Blocks.LIGHT_GRAY_WOOL);
WOOL_MAP.put(EnumDyeColor.CYAN, Blocks.CYAN_WOOL);
WOOL_MAP.put(EnumDyeColor.PURPLE, Blocks.PURPLE_WOOL);
WOOL_MAP.put(EnumDyeColor.BLUE, Blocks.BLUE_WOOL);
WOOL_MAP.put(EnumDyeColor.BROWN, Blocks.BROWN_WOOL);
WOOL_MAP.put(EnumDyeColor.GREEN, Blocks.GREEN_WOOL);
WOOL_MAP.put(EnumDyeColor.RED, Blocks.RED_WOOL);
WOOL_MAP.put(EnumDyeColor.BLACK, Blocks.BLACK_WOOL);
WOOL_MAP.put(DyeColor.WHITE, Blocks.WHITE_WOOL);
WOOL_MAP.put(DyeColor.ORANGE, Blocks.ORANGE_WOOL);
WOOL_MAP.put(DyeColor.MAGENTA, Blocks.MAGENTA_WOOL);
WOOL_MAP.put(DyeColor.LIGHT_BLUE, Blocks.LIGHT_BLUE_WOOL);
WOOL_MAP.put(DyeColor.YELLOW, Blocks.YELLOW_WOOL);
WOOL_MAP.put(DyeColor.LIME, Blocks.LIME_WOOL);
WOOL_MAP.put(DyeColor.PINK, Blocks.PINK_WOOL);
WOOL_MAP.put(DyeColor.GRAY, Blocks.GRAY_WOOL);
WOOL_MAP.put(DyeColor.LIGHT_GRAY, Blocks.LIGHT_GRAY_WOOL);
WOOL_MAP.put(DyeColor.CYAN, Blocks.CYAN_WOOL);
WOOL_MAP.put(DyeColor.PURPLE, Blocks.PURPLE_WOOL);
WOOL_MAP.put(DyeColor.BLUE, Blocks.BLUE_WOOL);
WOOL_MAP.put(DyeColor.BROWN, Blocks.BROWN_WOOL);
WOOL_MAP.put(DyeColor.GREEN, Blocks.GREEN_WOOL);
WOOL_MAP.put(DyeColor.RED, Blocks.RED_WOOL);
WOOL_MAP.put(DyeColor.BLACK, Blocks.BLACK_WOOL);
CARPET_MAP.clear();
CARPET_MAP.put(EnumDyeColor.WHITE, Blocks.WHITE_CARPET);
CARPET_MAP.put(EnumDyeColor.ORANGE, Blocks.ORANGE_CARPET);
CARPET_MAP.put(EnumDyeColor.MAGENTA, Blocks.MAGENTA_CARPET);
CARPET_MAP.put(EnumDyeColor.LIGHT_BLUE, Blocks.LIGHT_BLUE_CARPET);
CARPET_MAP.put(EnumDyeColor.YELLOW, Blocks.YELLOW_CARPET);
CARPET_MAP.put(EnumDyeColor.LIME, Blocks.LIME_CARPET);
CARPET_MAP.put(EnumDyeColor.PINK, Blocks.PINK_CARPET);
CARPET_MAP.put(EnumDyeColor.GRAY, Blocks.GRAY_CARPET);
CARPET_MAP.put(EnumDyeColor.LIGHT_GRAY, Blocks.LIGHT_GRAY_CARPET);
CARPET_MAP.put(EnumDyeColor.CYAN, Blocks.CYAN_CARPET);
CARPET_MAP.put(EnumDyeColor.PURPLE, Blocks.PURPLE_CARPET);
CARPET_MAP.put(EnumDyeColor.BLUE, Blocks.BLUE_CARPET);
CARPET_MAP.put(EnumDyeColor.BROWN, Blocks.BROWN_CARPET);
CARPET_MAP.put(EnumDyeColor.GREEN, Blocks.GREEN_CARPET);
CARPET_MAP.put(EnumDyeColor.RED, Blocks.RED_CARPET);
CARPET_MAP.put(EnumDyeColor.BLACK, Blocks.BLACK_CARPET);
CARPET_MAP.put(DyeColor.WHITE, Blocks.WHITE_CARPET);
CARPET_MAP.put(DyeColor.ORANGE, Blocks.ORANGE_CARPET);
CARPET_MAP.put(DyeColor.MAGENTA, Blocks.MAGENTA_CARPET);
CARPET_MAP.put(DyeColor.LIGHT_BLUE, Blocks.LIGHT_BLUE_CARPET);
CARPET_MAP.put(DyeColor.YELLOW, Blocks.YELLOW_CARPET);
CARPET_MAP.put(DyeColor.LIME, Blocks.LIME_CARPET);
CARPET_MAP.put(DyeColor.PINK, Blocks.PINK_CARPET);
CARPET_MAP.put(DyeColor.GRAY, Blocks.GRAY_CARPET);
CARPET_MAP.put(DyeColor.LIGHT_GRAY, Blocks.LIGHT_GRAY_CARPET);
CARPET_MAP.put(DyeColor.CYAN, Blocks.CYAN_CARPET);
CARPET_MAP.put(DyeColor.PURPLE, Blocks.PURPLE_CARPET);
CARPET_MAP.put(DyeColor.BLUE, Blocks.BLUE_CARPET);
CARPET_MAP.put(DyeColor.BROWN, Blocks.BROWN_CARPET);
CARPET_MAP.put(DyeColor.GREEN, Blocks.GREEN_CARPET);
CARPET_MAP.put(DyeColor.RED, Blocks.RED_CARPET);
CARPET_MAP.put(DyeColor.BLACK, Blocks.BLACK_CARPET);
}
private ColorHelper() {}
@@ -11,6 +11,7 @@
package vazkii.botania.api.boss;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.ServerBossInfo;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import vazkii.botania.api.internal.ShaderCallback;
@@ -54,7 +55,7 @@ public interface IBotaniaBoss {
public int bossBarRenderCallback(int x, int y);
/**
* Get the serverside UUID of the {@link net.minecraft.world.BossInfoServer} instance tracking this boss
* Get the serverside UUID of the {@link ServerBossInfo} instance tracking this boss
* Note that this is NOT the entity's UUID, nor is it the clientside UUID of the BossInfoServer instance!
* You will most likely need to sync this yourself using the datawatcher
* @return The uuid.
@@ -12,7 +12,7 @@ package vazkii.botania.api.brew;
import com.google.common.collect.ImmutableList;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.PotionEffect;
import net.minecraft.potion.EffectInstance;
import java.util.List;
@@ -25,7 +25,7 @@ public class Brew {
private final String name;
private final int color;
private final int cost;
private final List<PotionEffect> effects;
private final List<EffectInstance> effects;
private boolean canInfuseBloodPendant = true;
private boolean canInfuseIncense = true;
@@ -36,7 +36,7 @@ public class Brew {
* @param cost The cost, in Mana for this brew.
* @param effects A list of effects to apply to the player when they drink it.
*/
public Brew(String key, String name, int color, int cost, PotionEffect... effects) {
public Brew(String key, String name, int color, int cost, EffectInstance... effects) {
this.key = key;
this.name = name;
this.color = color;
@@ -118,7 +118,7 @@ public class Brew {
* Note that for the lexicon, this passes in a botania Managlass
* Vial or an Alfglass Flask at all times.
*/
public List<PotionEffect> getPotionEffects(ItemStack stack) {
public List<EffectInstance> getPotionEffects(ItemStack stack) {
return effects;
}
@@ -9,7 +9,7 @@
*/
package vazkii.botania.api.corporea;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraftforge.eventbus.api.Cancelable;
import net.minecraftforge.eventbus.api.Event;
@@ -19,12 +19,12 @@ import net.minecraftforge.eventbus.api.Event;
* */
@Cancelable
public class CorporeaIndexRequestEvent extends Event {
public final EntityPlayerMP requester;
public final ServerPlayerEntity requester;
public String request;
public int requestCount;
public ICorporeaSpark indexSpark;
public CorporeaIndexRequestEvent(EntityPlayerMP requester, String request, int requestCount, ICorporeaSpark indexSpark) {
public CorporeaIndexRequestEvent(ServerPlayerEntity requester, String request, int requestCount, ICorporeaSpark indexSpark) {
this.requester = requester;
this.request = request;
this.requestCount = requestCount;
@@ -10,7 +10,7 @@
*/
package vazkii.botania.api.corporea;
import net.minecraft.item.EnumDyeColor;
import net.minecraft.item.DyeColor;
import net.minecraft.item.ItemStack;
import java.util.List;
@@ -82,6 +82,6 @@ public interface ICorporeaSpark {
* Gets the network that this spark is on, or the color it's displaying. Sparks may only connect to others
* of the same network, and on changing network should trigger a re-cache of the previous network.
*/
public EnumDyeColor getNetwork();
public DyeColor getNetwork();
}
@@ -1,7 +1,8 @@
package vazkii.botania.api.imc;
import net.minecraft.block.Block;
import net.minecraft.item.EnumDyeColor;
import net.minecraft.item.DyeColor;
import net.minecraft.item.DyeColor;
import net.minecraftforge.registries.IRegistryDelegate;
import java.util.ArrayList;
@@ -10,13 +11,13 @@ import java.util.function.Function;
public class PaintableBlockMessage {
private final IRegistryDelegate<Block> block;
private final Function<EnumDyeColor, Block> transformer;
private final Function<DyeColor, Block> transformer;
/**
* @param transformer Lookup function from color to destination block
* @param block The block being converted
*/
public PaintableBlockMessage(Function<EnumDyeColor, Block> transformer, Block block) {
public PaintableBlockMessage(Function<DyeColor, Block> transformer, Block block) {
this.block = block.delegate;
this.transformer = transformer;
}
@@ -25,7 +26,7 @@ public class PaintableBlockMessage {
return block;
}
public Function<EnumDyeColor, Block> getTransformer() {
public Function<DyeColor, Block> getTransformer() {
return transformer;
}
}
@@ -11,11 +11,12 @@
package vazkii.botania.api.internal;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.Direction;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
@@ -137,7 +138,7 @@ public class DummyMethodHandler implements IInternalMethodHandler {
public void sparkleFX(World world, double x, double y, double z, float r, float g, float b, float size, int m) {}
@Override
public IItemHandlerModifiable getAccessoriesInventory(EntityPlayer player) {
public IItemHandlerModifiable getAccessoriesInventory(PlayerEntity player) {
return null;
}
@@ -162,7 +163,7 @@ public class DummyMethodHandler implements IInternalMethodHandler {
}
@Override
public void breakOnAllCursors(EntityPlayer player, Item item, ItemStack stack, BlockPos pos, EnumFacing side) {}
public void breakOnAllCursors(PlayerEntity player, Item item, ItemStack stack, BlockPos pos, Direction side) {}
@Override
public boolean hasSolegnoliaAround(Entity e) {
@@ -10,7 +10,8 @@
*/
package vazkii.botania.api.internal;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.widget.button.Button;
import net.minecraft.client.gui.widget.button.Button;
import vazkii.botania.api.lexicon.LexiconEntry;
import java.util.List;
@@ -60,7 +61,7 @@ public interface IGuiLexiconEntry {
/**
* Gets the list of buttons in this gui.
*/
public List<GuiButton> getButtonList();
public List<Button> getButtonList();
/**
* Gets the total amount of ticks (+ partial ticks) the player
@@ -12,11 +12,12 @@ package vazkii.botania.api.internal;
import net.minecraft.client.renderer.model.ModelResourceLocation;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.Direction;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
@@ -81,9 +82,9 @@ public interface IInternalMethodHandler {
public int getPassiveFlowerDecay();
public IItemHandlerModifiable getAccessoriesInventory(EntityPlayer player);
public IItemHandlerModifiable getAccessoriesInventory(PlayerEntity player);
public void breakOnAllCursors(EntityPlayer player, Item item, ItemStack stack, BlockPos pos, EnumFacing side);
public void breakOnAllCursors(PlayerEntity player, Item item, ItemStack stack, BlockPos pos, Direction side);
public boolean hasSolegnoliaAround(Entity e);
@@ -10,20 +10,21 @@
*/
package vazkii.botania.api.internal;
import net.minecraft.network.play.server.SPacketUpdateTileEntity;
import net.minecraft.network.play.server.SUpdateTileEntityPacket;
import net.minecraft.network.play.server.SUpdateTileEntityPacket;
import net.minecraft.server.management.PlayerChunkMapEntry;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraft.world.WorldServer;
import net.minecraft.world.ServerWorld;
public final class VanillaPacketDispatcher {
public static void dispatchTEToNearbyPlayers(TileEntity tile) {
SPacketUpdateTileEntity packet = tile.getUpdatePacket();
SUpdateTileEntityPacket packet = tile.getUpdatePacket();
if(packet != null && tile.getWorld() instanceof WorldServer) {
PlayerChunkMapEntry chunk = ((WorldServer) tile.getWorld()).getPlayerChunkMap().getEntry(tile.getPos().getX() >> 4, tile.getPos().getZ() >> 4);
if(packet != null && tile.getWorld() instanceof ServerWorld) {
PlayerChunkMapEntry chunk = ((ServerWorld) tile.getWorld()).getPlayerChunkMap().getEntry(tile.getPos().getX() >> 4, tile.getPos().getZ() >> 4);
if(chunk != null) {
chunk.sendPacket(packet);
}
@@ -1,7 +1,8 @@
package vazkii.botania.api.item;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.EntityLivingBase;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.util.math.MathHelper;
/**
@@ -12,7 +13,7 @@ public final class AccessoryRenderHelper {
/**
* Rotates the render for a bauble correctly if the player is sneaking.
*/
public static void rotateIfSneaking(EntityLivingBase player) {
public static void rotateIfSneaking(LivingEntity player) {
if(player.isSneaking())
applySneakingRotation();
}
@@ -28,7 +29,7 @@ public final class AccessoryRenderHelper {
/**
* Shifts the render for a bauble correctly to the head, including sneaking rotation.
*/
public static void translateToHeadLevel(EntityLivingBase player) {
public static void translateToHeadLevel(LivingEntity player) {
GlStateManager.translatef(0, -player.getEyeHeight(), 0);
if (player.isSneaking())
GlStateManager.translatef(0.25F * MathHelper.sin(player.rotationPitch * (float) Math.PI / 180), 0.25F * MathHelper.cos(player.rotationPitch * (float) Math.PI / 180), 0F);
@@ -36,7 +37,7 @@ public final class AccessoryRenderHelper {
/**
* Shifts the render for a bauble correctly to the face.
* Use for renders after calling {@link AccessoryRenderHelper#translateToHeadLevel(EntityLivingBase)}.
* Use for renders after calling {@link AccessoryRenderHelper#translateToHeadLevel(LivingEntity)}.
*/
public static void translateToFace() {
GlStateManager.rotatef(90F, 0F, 1F, 0F);
@@ -55,7 +56,7 @@ public final class AccessoryRenderHelper {
/**
* Shifts the render for a bauble correctly to the chest.
* Use for renders after calling {@link AccessoryRenderHelper#rotateIfSneaking(EntityLivingBase)}.
* Use for renders after calling {@link AccessoryRenderHelper#rotateIfSneaking(LivingEntity)}.
*/
public static void translateToChest() {
GlStateManager.rotatef(180F, 1F, 0F, 0F);
@@ -10,7 +10,8 @@
*/
package vazkii.botania.api.item;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction;
import net.minecraftforge.items.IItemHandler;
import vazkii.botania.api.mana.IManaReceiver;
@@ -28,7 +29,7 @@ public interface IAvatarTile extends IManaReceiver {
/**
* Gets the avatar's facing.
*/
public EnumFacing getAvatarFacing();
public Direction getAvatarFacing();
/**
* Gets the amount of ticks that have elapsed on this avatar while it's functional
@@ -11,7 +11,8 @@
package vazkii.botania.api.item;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
/**
@@ -27,7 +28,7 @@ public interface IBlockProvider {
* If you need to use calls to ManaItemHandler.requestMana[Exact], use
* the requestor as the ItemStack passed in.
*/
public boolean provideBlock(EntityPlayer player, ItemStack requestor, ItemStack stack, Block block, boolean doit);
public boolean provideBlock(PlayerEntity player, ItemStack requestor, ItemStack stack, Block block, boolean doit);
/**
* Gets the amount of blocks of the type passed stored in this item. You must
@@ -35,6 +36,6 @@ public interface IBlockProvider {
* -1 states that the item can provide infinite of the item passed in (for example,
* the Rod of the Lands would return -1 if the block is dirt).
*/
public int getBlockCount(EntityPlayer player, ItemStack requestor, ItemStack stack, Block block);
public int getBlockCount(PlayerEntity player, ItemStack requestor, ItemStack stack, Block block);
}
@@ -11,9 +11,10 @@
package vazkii.botania.api.item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.INBTBase;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumFacing;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.INBT;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.util.Direction;
import net.minecraftforge.common.capabilities.Capability;
import javax.annotation.Nullable;
@@ -37,16 +38,16 @@ public interface IFloatingFlower {
class Storage implements Capability.IStorage<IFloatingFlower> {
@Nullable
@Override
public INBTBase writeNBT(Capability<IFloatingFlower> capability, IFloatingFlower instance, EnumFacing side) {
NBTTagCompound ret = new NBTTagCompound();
public INBT writeNBT(Capability<IFloatingFlower> capability, IFloatingFlower instance, Direction side) {
CompoundNBT ret = new CompoundNBT();
ret.putString("islandType", instance.getIslandType().typeName);
return ret;
}
@Override
public void readNBT(Capability<IFloatingFlower> capability, IFloatingFlower instance, EnumFacing side, INBTBase nbt) {
if(nbt instanceof NBTTagCompound) {
IslandType t = IslandType.ofType(((NBTTagCompound) nbt).getString("islandType"));
public void readNBT(Capability<IFloatingFlower> capability, IFloatingFlower instance, Direction side, INBT nbt) {
if(nbt instanceof CompoundNBT) {
IslandType t = IslandType.ofType(((CompoundNBT) nbt).getString("islandType"));
if(t != null) {
instance.setIslandType(t);
}
@@ -10,7 +10,8 @@
*/
package vazkii.botania.api.item;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.item.ItemEntity;
import net.minecraft.entity.item.ItemEntity;
import net.minecraft.item.ItemStack;
import vazkii.botania.api.mana.IManaPool;
@@ -24,6 +25,6 @@ public interface IManaDissolvable {
* Called for every tick the item is on a mana pool. If the stack has stack
* size 0 the item is killed. This is called serverside.
*/
public void onDissolveTick(IManaPool pool, ItemStack stack, EntityItem item);
public void onDissolveTick(IManaPool pool, ItemStack stack, ItemEntity item);
}
@@ -10,8 +10,10 @@
*/
package vazkii.botania.api.item;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.EquipmentSlotType;
import net.minecraft.inventory.EquipmentSlotType;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.MinecraftForge;
@@ -26,17 +28,17 @@ import vazkii.botania.api.mana.ManaProficiencyEvent;
*/
public interface IManaProficiencyArmor {
default boolean shouldGiveProficiency(ItemStack armorStack, EntityEquipmentSlot slot, EntityPlayer player, ItemStack rod) {
default boolean shouldGiveProficiency(ItemStack armorStack, EquipmentSlotType slot, PlayerEntity player, ItemStack rod) {
return false;
}
public final static class Helper {
public static boolean hasProficiency(EntityPlayer player, ItemStack rod) {
public static boolean hasProficiency(PlayerEntity player, ItemStack rod) {
boolean proficient = false;
for(EntityEquipmentSlot e: EntityEquipmentSlot.values()) {
if(e.getSlotType() != EntityEquipmentSlot.Type.ARMOR)
for(EquipmentSlotType e: EquipmentSlotType.values()) {
if(e.getSlotType() != EquipmentSlotType.Type.ARMOR)
continue;
ItemStack armor = player.getItemStackFromSlot(e);
if(!armor.isEmpty()) {
@@ -10,9 +10,10 @@
*/
package vazkii.botania.api.item;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.Direction;
import net.minecraft.util.math.BlockPos;
/**
@@ -22,7 +23,7 @@ import net.minecraft.util.math.BlockPos;
*/
public interface ISequentialBreaker {
public void breakOtherBlock(EntityPlayer player, ItemStack stack, BlockPos pos, BlockPos originPos, EnumFacing side);
public void breakOtherBlock(PlayerEntity player, ItemStack stack, BlockPos pos, BlockPos originPos, Direction side);
public boolean disposeOfTrashBlocks(ItemStack stack);
@@ -10,7 +10,8 @@
*/
package vazkii.botania.api.item;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos;
@@ -27,14 +28,14 @@ public interface IWireframeCoordinateListProvider {
* Returns a list of BlockPos for the wireframes to draw.
* Will not be null.
*/
public List<BlockPos> getWireframesToDraw(EntityPlayer player, ItemStack stack);
public List<BlockPos> getWireframesToDraw(PlayerEntity player, ItemStack stack);
/**
* Gets a wireframe to draw thicker than the rest.
* This is useful to indicate the precedence of some position over the others.
* @return The position of a single wireframe to draw thicker than all the others.
*/
public BlockPos getSourceWireframe(EntityPlayer player, ItemStack stack);
public BlockPos getSourceWireframe(PlayerEntity player, ItemStack stack);
}
@@ -10,7 +10,8 @@
*/
package vazkii.botania.api.lexicon;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
@@ -25,6 +26,6 @@ public interface ILexiconable {
/**
* Gets the lexicon entry to open at this location. null works too.
*/
public LexiconEntry getEntry(World world, BlockPos pos, EntityPlayer player, ItemStack lexicon);
public LexiconEntry getEntry(World world, BlockPos pos, PlayerEntity player, ItemStack lexicon);
}
@@ -11,7 +11,7 @@
package vazkii.botania.api.lexicon;
import com.google.common.collect.ImmutableList;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.widget.button.Button;
import net.minecraft.item.ItemStack;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
@@ -11,7 +11,8 @@
package vazkii.botania.api.lexicon.multiblock;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.block.BlockState;
import net.minecraft.block.BlockState;
import net.minecraft.world.IBlockReader;
import vazkii.botania.api.lexicon.multiblock.component.MultiblockComponent;
@@ -25,8 +26,8 @@ public interface IMultiblockRenderHook {
public static Map<Block, IMultiblockRenderHook> renderHooks = new HashMap<>();
public void renderBlockForMultiblock(IBlockReader world, Multiblock mb, IBlockState state, MultiblockComponent comp);
public void renderBlockForMultiblock(IBlockReader world, Multiblock mb, BlockState state, MultiblockComponent comp);
public boolean needsTranslate(IBlockState state);
public boolean needsTranslate(BlockState state);
}
@@ -10,9 +10,10 @@
*/
package vazkii.botania.api.lexicon.multiblock;
import net.minecraft.block.state.IBlockState;
import net.minecraft.block.BlockState;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction;
import net.minecraft.util.math.BlockPos;
import vazkii.botania.api.lexicon.multiblock.component.MultiblockComponent;
@@ -55,7 +56,7 @@ public class Multiblock {
* Constructs and adds a multiblock component to this multiblock. The x y z
* coords should be pivoted to the center of the structure.
*/
public void addComponent(BlockPos pos, IBlockState state) {
public void addComponent(BlockPos pos, BlockState state) {
addComponent(new MultiblockComponent(pos, state));
}
@@ -127,19 +128,19 @@ public class Multiblock {
* to render this multiblock in the world relevant to the 4 cardinal
* orientations.
*/
public Map<EnumFacing, Multiblock> createRotations() {
Map<EnumFacing, Multiblock> ret = new EnumMap<>(EnumFacing.class);
public Map<Direction, Multiblock> createRotations() {
Map<Direction, Multiblock> ret = new EnumMap<>(Direction.class);
ret.put(EnumFacing.SOUTH, this);
ret.put(Direction.SOUTH, this);
ret.put(EnumFacing.WEST, ret.get(EnumFacing.SOUTH).copy());
ret.get(EnumFacing.WEST).rotate(Math.PI / 2);
ret.put(Direction.WEST, ret.get(Direction.SOUTH).copy());
ret.get(Direction.WEST).rotate(Math.PI / 2);
ret.put(EnumFacing.NORTH, ret.get(EnumFacing.WEST).copy());
ret.get(EnumFacing.NORTH).rotate(Math.PI / 2);
ret.put(Direction.NORTH, ret.get(Direction.WEST).copy());
ret.get(Direction.NORTH).rotate(Math.PI / 2);
ret.put(EnumFacing.EAST, ret.get(EnumFacing.NORTH).copy());
ret.get(EnumFacing.EAST).rotate(Math.PI / 2);
ret.put(Direction.EAST, ret.get(Direction.NORTH).copy());
ret.get(Direction.EAST).rotate(Math.PI / 2);
return ret;
}
@@ -11,7 +11,8 @@
package vazkii.botania.api.lexicon.multiblock;
import net.minecraft.entity.Entity;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction;
import java.util.Collections;
import java.util.Map;
@@ -21,7 +22,7 @@ import java.util.Map;
*/
public class MultiblockSet {
private final Map<EnumFacing, Multiblock> mbs;
private final Map<Direction, Multiblock> mbs;
public MultiblockSet(Multiblock mb) {
mbs = Collections.unmodifiableMap(mb.createRotations());
@@ -31,7 +32,7 @@ public class MultiblockSet {
return getForFacing(e.getHorizontalFacing());
}
public Multiblock getForFacing(EnumFacing facing) {
public Multiblock getForFacing(Direction facing) {
return mbs.get(facing);
}
@@ -10,7 +10,7 @@
*/
package vazkii.botania.api.lexicon.multiblock.component;
import net.minecraft.block.state.IBlockState;
import net.minecraft.block.BlockState;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
@@ -19,13 +19,13 @@ import net.minecraft.world.World;
*/
public class AnyComponent extends MultiblockComponent {
public AnyComponent(BlockPos relPos, IBlockState state) {
public AnyComponent(BlockPos relPos, BlockState state) {
super(relPos, state);
}
@Override
public boolean matches(World world, BlockPos pos) {
IBlockState state = world.getBlockState(pos);
BlockState state = world.getBlockState(pos);
return !state.getBlock().isAir(state, world, pos) && !state.getCollisionShape(world, pos).isEmpty();
}
@@ -10,7 +10,7 @@
*/
package vazkii.botania.api.lexicon.multiblock.component;
import net.minecraft.block.state.IBlockState;
import net.minecraft.block.BlockState;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.BlockPos;
@@ -25,23 +25,23 @@ import net.minecraftforge.api.distmarker.OnlyIn;
public class MultiblockComponent {
protected BlockPos relPos;
protected final IBlockState state;
protected final BlockState state;
protected final TileEntity tileEntity;
private final boolean doFancyRender;
public MultiblockComponent(BlockPos relPos, IBlockState state) {
public MultiblockComponent(BlockPos relPos, BlockState state) {
this(relPos, state, null);
}
public MultiblockComponent(BlockPos relPos, IBlockState state, boolean doFancyRender) {
public MultiblockComponent(BlockPos relPos, BlockState state, boolean doFancyRender) {
this(relPos, state, doFancyRender, null);
}
public MultiblockComponent(BlockPos relPos, IBlockState state, TileEntity tileEntity) {
public MultiblockComponent(BlockPos relPos, BlockState state, TileEntity tileEntity) {
this(relPos, state, state.getBlock().hasTileEntity(state) == (tileEntity != null), tileEntity);
}
public MultiblockComponent(BlockPos relPos, IBlockState state, boolean doFancyRender, TileEntity tileEntity) {
public MultiblockComponent(BlockPos relPos, BlockState state, boolean doFancyRender, TileEntity tileEntity) {
this.relPos = relPos;
this.state = state;
this.tileEntity = tileEntity;
@@ -52,7 +52,7 @@ public class MultiblockComponent {
return relPos;
}
public IBlockState getBlockState() {
public BlockState getBlockState() {
return state;
}
@@ -11,7 +11,7 @@
package vazkii.botania.api.lexicon.multiblock.component;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.block.BlockState;
import net.minecraft.tags.Tag;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
@@ -27,7 +27,7 @@ public class TagComponent extends MultiblockComponent {
}
@Override
public IBlockState getBlockState() {
public BlockState getBlockState() {
if (tag.getAllElements().isEmpty()) {
return super.getBlockState();
} else {
@@ -10,7 +10,8 @@
*/
package vazkii.botania.api.mana;
import net.minecraft.entity.projectile.EntityThrowable;
import net.minecraft.entity.projectile.ThrowableEntity;
import net.minecraft.entity.projectile.ThrowableEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.RayTraceResult;
import vazkii.botania.api.internal.IManaBurst;
@@ -49,7 +50,7 @@ public interface ILensEffect {
/**
* Gets the amount of mana to transfer to the passed in mana receiver block.
*/
public default int getManaToTransfer(IManaBurst burst, EntityThrowable entity, ItemStack stack, IManaReceiver receiver) {
public default int getManaToTransfer(IManaBurst burst, ThrowableEntity entity, ItemStack stack, IManaReceiver receiver) {
return burst.getMana();
}
@@ -10,7 +10,8 @@
*/
package vazkii.botania.api.mana;
import net.minecraft.block.state.IBlockState;
import net.minecraft.block.BlockState;
import net.minecraft.block.BlockState;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
@@ -20,6 +21,6 @@ import net.minecraft.world.World;
*/
public interface IManaCollisionGhost {
public boolean isGhost(IBlockState state, World world, BlockPos pos);
public boolean isGhost(BlockState state, World world, BlockPos pos);
}
@@ -10,7 +10,8 @@
*/
package vazkii.botania.api.mana;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import javax.annotation.Nullable;
@@ -28,7 +29,7 @@ public interface IManaDiscountArmor {
* Value is to be from 0.0 to 1.0. 0.1 is 10% discount, as an example.
* You can also return negative values to make tools cost more.
*/
default float getDiscount(ItemStack stack, int slot, EntityPlayer player, @Nullable ItemStack tool) {
default float getDiscount(ItemStack stack, int slot, PlayerEntity player, @Nullable ItemStack tool) {
return 0;
}
}
@@ -10,7 +10,8 @@
*/
package vazkii.botania.api.mana;
import net.minecraft.item.EnumDyeColor;
import net.minecraft.item.DyeColor;
import net.minecraft.item.DyeColor;
/**
* Any TileEntity that implements this is considered a Mana Pool,
@@ -32,12 +33,12 @@ public interface IManaPool extends IManaReceiver {
/**
* @return The color of this pool.
*/
public EnumDyeColor getColor();
public DyeColor getColor();
/**
* Sets the color of this pool.
* @param color The color to set.
*/
public void setColor(EnumDyeColor color);
public void setColor(DyeColor color);
}
@@ -10,17 +10,18 @@
*/
package vazkii.botania.api.mana;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraftforge.eventbus.api.Event;
public class ManaDiscountEvent extends Event {
private final EntityPlayer entityPlayer;
private final PlayerEntity entityPlayer;
private float discount;
private ItemStack tool;
public ManaDiscountEvent(EntityPlayer entityPlayer, float discount, ItemStack tool) {
public ManaDiscountEvent(PlayerEntity entityPlayer, float discount, ItemStack tool) {
this.entityPlayer = entityPlayer;
this.discount = discount;
this.tool = tool;
@@ -30,7 +31,7 @@ public class ManaDiscountEvent extends Event {
return tool;
}
public EntityPlayer getEntityPlayer() {
public PlayerEntity getEntityPlayer() {
return entityPlayer;
}
@@ -10,7 +10,8 @@
*/
package vazkii.botania.api.mana;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.items.CapabilityItemHandler;
@@ -31,7 +32,7 @@ public final class ManaItemHandler {
* their player-associated inventories.
* @return The list of items
*/
public static List<ItemStack> getManaItems(EntityPlayer player) {
public static List<ItemStack> getManaItems(PlayerEntity player) {
if (player == null)
return new ArrayList<>();
@@ -57,7 +58,7 @@ public final class ManaItemHandler {
* Gets a list containing all mana-holding items in a player's accessories inventory.
* @return The list of items
*/
public static Map<Integer, ItemStack> getManaAccesories(EntityPlayer player) {
public static Map<Integer, ItemStack> getManaAccesories(PlayerEntity player) {
if (player == null)
return new HashMap<Integer, ItemStack>();
@@ -87,7 +88,7 @@ public final class ManaItemHandler {
* @param remove If true, the mana will be removed from the target item. Set to false to just check.
* @return The amount of mana received from the request.
*/
public static int requestMana(ItemStack stack, EntityPlayer player, int manaToGet, boolean remove) {
public static int requestMana(ItemStack stack, PlayerEntity player, int manaToGet, boolean remove) {
if(stack.isEmpty())
return 0;
@@ -138,7 +139,7 @@ public final class ManaItemHandler {
* @param remove If true, the mana will be removed from the target item. Set to false to just check.
* @return If the request was succesful.
*/
public static boolean requestManaExact(ItemStack stack, EntityPlayer player, int manaToGet, boolean remove) {
public static boolean requestManaExact(ItemStack stack, PlayerEntity player, int manaToGet, boolean remove) {
if(stack.isEmpty())
return false;
@@ -185,7 +186,7 @@ public final class ManaItemHandler {
* @param add If true, the mana will be added from the target item. Set to false to just check.
* @return The amount of mana actually sent.
*/
public static int dispatchMana(ItemStack stack, EntityPlayer player, int manaToSend, boolean add) {
public static int dispatchMana(ItemStack stack, PlayerEntity player, int manaToSend, boolean add) {
if(stack.isEmpty())
return 0;
@@ -244,7 +245,7 @@ public final class ManaItemHandler {
* @param add If true, the mana will be added from the target item. Set to false to just check.
* @return If an item received the mana sent.
*/
public static boolean dispatchManaExact(ItemStack stack, EntityPlayer player, int manaToSend, boolean add) {
public static boolean dispatchManaExact(ItemStack stack, PlayerEntity player, int manaToSend, boolean add) {
if(stack.isEmpty())
return false;
@@ -292,7 +293,7 @@ public final class ManaItemHandler {
* @param remove If true, the mana will be removed from the target item. Set to false to just check.
* @return The amount of mana received from the request.
*/
public static int requestManaForTool(ItemStack stack, EntityPlayer player, int manaToGet, boolean remove) {
public static int requestManaForTool(ItemStack stack, PlayerEntity player, int manaToGet, boolean remove) {
float multiplier = Math.max(0F, 1F - getFullDiscountForTools(player, stack));
int cost = (int) (manaToGet * multiplier);
return (int) (requestMana(stack, player, cost, remove) / multiplier);
@@ -306,7 +307,7 @@ public final class ManaItemHandler {
* @param remove If true, the mana will be removed from the target item. Set to false to just check.
* @return If the request was succesful.
*/
public static boolean requestManaExactForTool(ItemStack stack, EntityPlayer player, int manaToGet, boolean remove) {
public static boolean requestManaExactForTool(ItemStack stack, PlayerEntity player, int manaToGet, boolean remove) {
float multiplier = Math.max(0F, 1F - getFullDiscountForTools(player, stack));
int cost = (int) (manaToGet * multiplier);
return requestManaExact(stack, player, cost, remove);
@@ -316,7 +317,7 @@ public final class ManaItemHandler {
* Gets the sum of all the discounts on IManaDiscountArmor items equipped
* on the player passed in. This discount can vary based on what the passed tool is.
*/
public static float getFullDiscountForTools(EntityPlayer player, ItemStack tool) {
public static float getFullDiscountForTools(PlayerEntity player, ItemStack tool) {
float discount = 0F;
for(int i = 0; i < player.inventory.armorInventory.size(); i++) {
ItemStack armor = player.inventory.armorInventory.get(i);
@@ -10,7 +10,8 @@
*/
package vazkii.botania.api.mana;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraftforge.eventbus.api.Event;
@@ -18,15 +19,15 @@ import java.util.List;
public class ManaItemsEvent extends Event {
private final EntityPlayer entityPlayer;
private final PlayerEntity entityPlayer;
private List<ItemStack> items;
public ManaItemsEvent(EntityPlayer entityPlayer, List<ItemStack> items) {
public ManaItemsEvent(PlayerEntity entityPlayer, List<ItemStack> items) {
this.entityPlayer = entityPlayer;
this.items = items;
}
public EntityPlayer getEntityPlayer() {
public PlayerEntity getEntityPlayer() {
return entityPlayer;
}
@@ -10,23 +10,24 @@
*/
package vazkii.botania.api.mana;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraftforge.eventbus.api.Event;
public class ManaProficiencyEvent extends Event {
private final EntityPlayer entityPlayer;
private final PlayerEntity entityPlayer;
private ItemStack rod;
private boolean proficient;
public ManaProficiencyEvent(EntityPlayer entityPlayer, ItemStack rod, boolean proficient) {
public ManaProficiencyEvent(PlayerEntity entityPlayer, ItemStack rod, boolean proficient) {
this.entityPlayer = entityPlayer;
this.rod = rod;
this.proficient = proficient;
}
public EntityPlayer getEntityPlayer() {
public PlayerEntity getEntityPlayer() {
return entityPlayer;
}
@@ -11,7 +11,7 @@
package vazkii.botania.api.recipe;
import com.google.common.collect.ImmutableList;
import net.minecraft.init.Items;
import net.minecraft.item.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.Ingredient;
import net.minecraftforge.items.IItemHandler;
@@ -12,7 +12,8 @@ package vazkii.botania.api.recipe;
import com.google.common.base.Preconditions;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.block.BlockState;
import net.minecraft.block.BlockState;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.Ingredient;
import net.minecraft.util.ResourceLocation;
@@ -32,7 +33,7 @@ public class RecipeManaInfusion {
private final Ingredient input;
private final int mana;
@Nullable
private IBlockState catalystState;
private BlockState catalystState;
public static RecipeManaInfusion conjuration(ResourceLocation id, ItemStack output, Ingredient input, int mana) {
RecipeManaInfusion ret = new RecipeManaInfusion(id, output, input, mana);
@@ -63,11 +64,11 @@ public class RecipeManaInfusion {
}
@Nullable
public IBlockState getCatalyst() {
public BlockState getCatalyst() {
return catalystState;
}
public void setCatalyst(IBlockState catalyst) {
public void setCatalyst(BlockState catalyst) {
catalystState = catalyst;
}
@@ -13,7 +13,7 @@ package vazkii.botania.api.recipe;
import com.google.common.collect.ImmutableList;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.Ingredient;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.CompoundNBT;
import net.minecraftforge.items.IItemHandler;
import vazkii.botania.common.core.helper.ItemNBTHelper;
@@ -12,7 +12,7 @@ package vazkii.botania.api.recipe;
import com.google.common.base.Preconditions;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.block.BlockState;
import net.minecraft.tags.Tag;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
@@ -23,19 +23,19 @@ public class RecipePureDaisy {
public static final int DEFAULT_TIME = 150;
private final Object input;
private final IBlockState outputState;
private final BlockState outputState;
private final int time;
public RecipePureDaisy(Object input, IBlockState state) {
public RecipePureDaisy(Object input, BlockState state) {
this(input, state, DEFAULT_TIME);
}
public RecipePureDaisy(Object input, IBlockState state, int time) {
public RecipePureDaisy(Object input, BlockState state, int time) {
Preconditions.checkArgument(time >= 0, "Time must be nonnegative");
this.input = input;
outputState = state;
this.time = time;
if(input != null && !(input instanceof Tag || input instanceof Block || input instanceof IBlockState))
if(input != null && !(input instanceof Tag || input instanceof Block || input instanceof BlockState))
throw new IllegalArgumentException("input must be a Tag<Block>, Block, or IBlockState");
// todo 1.13 find way to throw or enforce Tag<Block>
}
@@ -43,11 +43,11 @@ public class RecipePureDaisy {
/**
* This gets called every tick, please be careful with your checks.
*/
public boolean matches(World world, BlockPos pos, TileEntitySpecialFlower pureDaisy, IBlockState state) {
public boolean matches(World world, BlockPos pos, TileEntitySpecialFlower pureDaisy, BlockState state) {
if(input instanceof Block)
return state.getBlock() == input;
if(input instanceof IBlockState)
if(input instanceof BlockState)
return state == input;
return ((Tag<Block>) input).contains(state.getBlock());
@@ -68,7 +68,7 @@ public class RecipePureDaisy {
return input;
}
public IBlockState getOutputState() {
public BlockState getOutputState() {
return outputState;
}
@@ -10,11 +10,14 @@ package vazkii.botania.api.state;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import net.minecraft.block.state.IBlockState;
import net.minecraft.item.EnumDyeColor;
import net.minecraft.block.BlockState;
import net.minecraft.block.BlockState;
import net.minecraft.item.DyeColor;
import net.minecraft.item.DyeColor;
import net.minecraft.state.BooleanProperty;
import net.minecraft.state.EnumProperty;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockReader;
@@ -34,7 +37,7 @@ public final class BotaniaStateProps {
public static final ModelProperty<IFloatingFlower> FLOATING_DATA = new ModelProperty<>();
// The property for platform held blockstate
public static final ModelProperty<IBlockState> HELD_STATE = new ModelProperty<>();
public static final ModelProperty<BlockState> HELD_STATE = new ModelProperty<>();
// The property for platform world pos
public static final ModelProperty<BlockPos> HELD_POS = new ModelProperty<>();
@@ -42,13 +45,13 @@ public final class BotaniaStateProps {
/** Common properties to all blocks to use **/
// The 16 Minecraft colors
public static final EnumProperty<EnumDyeColor> COLOR = EnumProperty.create("color", EnumDyeColor.class);
public static final EnumProperty<DyeColor> COLOR = EnumProperty.create("color", DyeColor.class);
// The four cardinal directions
public static final EnumProperty<EnumFacing> CARDINALS = EnumProperty.create("facing", EnumFacing.class, EnumFacing.Plane.HORIZONTAL);
public static final EnumProperty<Direction> CARDINALS = EnumProperty.create("facing", Direction.class, Direction.Plane.HORIZONTAL);
// All 6 directions
public static final EnumProperty<EnumFacing> FACING = EnumProperty.create("facing", EnumFacing.class);
public static final EnumProperty<Direction> FACING = EnumProperty.create("facing", Direction.class);
// Redstone power - boolean
// Also for any other simple boolean "on/off" state
@@ -60,7 +63,7 @@ public final class BotaniaStateProps {
public static final EnumProperty<AlfPortalState> ALFPORTAL_STATE = EnumProperty.create("state", AlfPortalState.class);
// BlockEnchanter
public static final EnumProperty<EnumFacing.Axis> ENCHANTER_DIRECTION = EnumProperty.create("facing", EnumFacing.Axis.class, Predicates.not(Predicates.equalTo(EnumFacing.Axis.Y)));
public static final EnumProperty<Direction.Axis> ENCHANTER_DIRECTION = EnumProperty.create("facing", Direction.Axis.class, Predicates.not(Predicates.equalTo(Direction.Axis.Y)));
// BlockCraftyCrate
public static final EnumProperty<CratePattern> CRATE_PATTERN = EnumProperty.create("pattern", CratePattern.class);
@@ -12,12 +12,14 @@ package vazkii.botania.api.subtile;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.tileentity.TileEntityType;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.Direction;
import net.minecraft.util.SoundEvent;
import net.minecraft.util.math.BlockPos;
import net.minecraftforge.api.distmarker.Dist;
@@ -80,7 +82,7 @@ public class TileEntityFunctionalFlower extends TileEntitySpecialFlower {
if(acceptsRedstone()) {
redstoneSignal = 0;
for(EnumFacing dir : EnumFacing.values()) {
for(Direction dir : Direction.values()) {
int redstoneSide = getWorld().getRedstonePower(getPos().offset(dir), dir);
redstoneSignal = Math.max(redstoneSignal, redstoneSide);
}
@@ -136,7 +138,7 @@ public class TileEntityFunctionalFlower extends TileEntitySpecialFlower {
}
@Override
public boolean onWanded(EntityPlayer player, ItemStack wand) {
public boolean onWanded(PlayerEntity player, ItemStack wand) {
if(player == null)
return false;
@@ -157,7 +159,7 @@ public class TileEntityFunctionalFlower extends TileEntitySpecialFlower {
}
@Override
public void readFromPacketNBT(NBTTagCompound cmp) {
public void readFromPacketNBT(CompoundNBT cmp) {
mana = cmp.getInt(TAG_MANA);
int x = cmp.getInt(TAG_POOL_X);
@@ -168,7 +170,7 @@ public class TileEntityFunctionalFlower extends TileEntitySpecialFlower {
}
@Override
public void writeToPacketNBT(NBTTagCompound cmp) {
public void writeToPacketNBT(CompoundNBT cmp) {
cmp.putInt(TAG_MANA, mana);
if(cachedPoolCoordinates != null) {
@@ -194,12 +196,12 @@ public class TileEntityFunctionalFlower extends TileEntitySpecialFlower {
}
@Override
public boolean canSelect(EntityPlayer player, ItemStack wand, BlockPos pos, EnumFacing side) {
public boolean canSelect(PlayerEntity player, ItemStack wand, BlockPos pos, Direction side) {
return true;
}
@Override
public boolean bindTo(EntityPlayer player, ItemStack wand, BlockPos pos, EnumFacing side) {
public boolean bindTo(PlayerEntity player, ItemStack wand, BlockPos pos, Direction side) {
int range = 10;
range *= range;
@@ -11,17 +11,22 @@
package vazkii.botania.api.subtile;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.block.BlockState;
import net.minecraft.block.BlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.block.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.tileentity.TileEntityType;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction;
import net.minecraft.util.SoundEvent;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
@@ -90,7 +95,7 @@ public class TileEntityGeneratingFlower extends TileEntitySpecialFlower {
if(acceptsRedstone()) {
redstoneSignal = 0;
for(EnumFacing dir : EnumFacing.values()) {
for(Direction dir : Direction.values()) {
int redstoneSide = getWorld().getRedstonePower(getPos().offset(dir), dir);
redstoneSignal = Math.max(redstoneSignal, redstoneSide);
}
@@ -113,7 +118,7 @@ public class TileEntityGeneratingFlower extends TileEntitySpecialFlower {
int muhBalance = BotaniaAPI.internalHandler.getPassiveFlowerDecay();
if(passive && muhBalance > 0 && passiveDecayTicks > muhBalance) {
IBlockState state = getWorld().getBlockState(getPos());
BlockState state = getWorld().getBlockState(getPos());
getWorld().playEvent(2001, getPos(), Block.getStateId(state));
if(Blocks.DEAD_BUSH.getDefaultState().isValidPosition(getWorld(), getPos()))
getWorld().setBlockState(getPos(), Blocks.DEAD_BUSH.getDefaultState());
@@ -214,16 +219,16 @@ public class TileEntityGeneratingFlower extends TileEntitySpecialFlower {
}
@Override
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase entity, ItemStack stack) {
public void onBlockPlacedBy(World world, BlockPos pos, BlockState state, LivingEntity entity, ItemStack stack) {
super.onBlockPlacedBy(world, pos, state, entity, stack);
if(isPassiveFlower()) {
NBTTagCompound cmp = stack.getTag();
CompoundNBT cmp = stack.getTag();
passiveDecayTicks = cmp.getInt(TAG_PASSIVE_DECAY_TICKS);
}
}
@Override
public boolean onWanded(EntityPlayer player, ItemStack wand) {
public boolean onWanded(PlayerEntity player, ItemStack wand) {
if(player == null)
return false;
@@ -247,7 +252,7 @@ public class TileEntityGeneratingFlower extends TileEntitySpecialFlower {
}
@Override
public void readFromPacketNBT(NBTTagCompound cmp) {
public void readFromPacketNBT(CompoundNBT cmp) {
mana = cmp.getInt(TAG_MANA);
passiveDecayTicks = cmp.getInt(TAG_PASSIVE_DECAY_TICKS);
@@ -259,7 +264,7 @@ public class TileEntityGeneratingFlower extends TileEntitySpecialFlower {
}
@Override
public void writeToPacketNBT(NBTTagCompound cmp) {
public void writeToPacketNBT(CompoundNBT cmp) {
cmp.putInt(TAG_MANA, mana);
cmp.putInt(TAG_TICKS_EXISTED, ticksExisted);
cmp.putInt(TAG_PASSIVE_DECAY_TICKS, passiveDecayTicks);
@@ -287,12 +292,12 @@ public class TileEntityGeneratingFlower extends TileEntitySpecialFlower {
}
@Override
public boolean canSelect(EntityPlayer player, ItemStack wand, BlockPos pos, EnumFacing side) {
public boolean canSelect(PlayerEntity player, ItemStack wand, BlockPos pos, Direction side) {
return true;
}
@Override
public boolean bindTo(EntityPlayer player, ItemStack wand, BlockPos pos, EnumFacing side) {
public boolean bindTo(PlayerEntity player, ItemStack wand, BlockPos pos, Direction side) {
int range = 6;
range *= range;
@@ -11,24 +11,31 @@
package vazkii.botania.api.subtile;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.block.BlockState;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.model.ModelResourceLocation;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.block.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.network.NetworkManager;
import net.minecraft.network.play.server.SPacketUpdateTileEntity;
import net.minecraft.network.play.server.SUpdateTileEntityPacket;
import net.minecraft.tags.BlockTags;
import net.minecraft.tags.Tag;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.tileentity.TileEntityType;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.ITickable;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction;
import net.minecraft.util.Hand;
import net.minecraft.util.Hand;
import net.minecraft.tileentity.ITickableTileEntity;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
@@ -57,7 +64,7 @@ import java.util.List;
/**
* Common superclass of all magical flower TE's
*/
public class TileEntitySpecialFlower extends TileEntity implements ITickable, IWandBindable {
public class TileEntitySpecialFlower extends TileEntity implements ITickableTileEntity, IWandBindable {
public static final ResourceLocation DING_SOUND_EVENT = new ResourceLocation("botania", "ding");
public static final int SLOWDOWN_FACTOR_PODZOL = 5;
public static final int SLOWDOWN_FACTOR_MYCEL = 10;
@@ -121,7 +128,7 @@ public class TileEntitySpecialFlower extends TileEntity implements ITickable, IW
@Nonnull
@Override
public <T> LazyOptional<T> getCapability(@Nonnull Capability<T> cap, @Nullable EnumFacing side) {
public <T> LazyOptional<T> getCapability(@Nonnull Capability<T> cap, @Nullable Direction side) {
if(cap == BotaniaAPI.FLOATING_FLOWER_CAP) {
if(hasWorld() && getWorld().getBlockState(getPos()).isIn(FLOATING_TAG)) {
return floatingDataCap.cast();
@@ -147,7 +154,7 @@ public class TileEntitySpecialFlower extends TileEntity implements ITickable, IW
}
@Override
public final void read(NBTTagCompound cmp) {
public final void read(CompoundNBT cmp) {
super.read(cmp);
if(cmp.contains(TAG_TICKS_EXISTED))
ticksExisted = cmp.getInt(TAG_TICKS_EXISTED);
@@ -158,7 +165,7 @@ public class TileEntitySpecialFlower extends TileEntity implements ITickable, IW
@Nonnull
@Override
public final NBTTagCompound write(NBTTagCompound cmp) {
public final CompoundNBT write(CompoundNBT cmp) {
cmp.putInt(TAG_TICKS_EXISTED, ticksExisted);
cmp.put(TAG_FLOATING_DATA, BotaniaAPI.FLOATING_FLOWER_CAP.writeNBT(floatingData, null));
writeToPacketNBT(cmp);
@@ -166,14 +173,14 @@ public class TileEntitySpecialFlower extends TileEntity implements ITickable, IW
}
@Override
public SPacketUpdateTileEntity getUpdatePacket() {
NBTTagCompound cmp = new NBTTagCompound();
public SUpdateTileEntityPacket getUpdatePacket() {
CompoundNBT cmp = new CompoundNBT();
writeToPacketNBT(cmp);
return new SPacketUpdateTileEntity(getPos(), -1, cmp);
return new SUpdateTileEntityPacket(getPos(), -1, cmp);
}
@Override
public void onDataPacket(NetworkManager net, SPacketUpdateTileEntity packet) {
public void onDataPacket(NetworkManager net, SUpdateTileEntityPacket packet) {
IFloatingFlower.IslandType oldType = floatingData.getIslandType();
super.onDataPacket(net, packet);
if(oldType != floatingData.getIslandType() && isFloating()) {
@@ -183,8 +190,8 @@ public class TileEntitySpecialFlower extends TileEntity implements ITickable, IW
@Nonnull
@Override
public NBTTagCompound getUpdateTag() {
return write(new NBTTagCompound());
public CompoundNBT getUpdateTag() {
return write(new CompoundNBT());
}
/**
@@ -192,14 +199,14 @@ public class TileEntitySpecialFlower extends TileEntity implements ITickable, IW
* by readFromPacketNBT on the client that receives the packet.
* Note: This method is also used to write to the world NBT.
*/
public void writeToPacketNBT(NBTTagCompound cmp) { }
public void writeToPacketNBT(CompoundNBT cmp) { }
/**
* Reads data from a network packet. This data is written by
* writeToPacketNBT in the server. Note: This method is also used
* to read from the world NBT.
*/
public void readFromPacketNBT(NBTTagCompound cmp) { }
public void readFromPacketNBT(CompoundNBT cmp) { }
public void sync() {
VanillaPacketDispatcher.dispatchTEToNearbyPlayers(this);
@@ -213,29 +220,29 @@ public class TileEntitySpecialFlower extends TileEntity implements ITickable, IW
* Called when a Wand of the Forest is used on this sub tile. Note that the
* player parameter can be null if this is called from a dispenser.
*/
public boolean onWanded(EntityPlayer player, ItemStack wand) {
public boolean onWanded(PlayerEntity player, ItemStack wand) {
return false;
}
/**
* Called when this sub tile is placed in the world (by an entity).
*/
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase entity, ItemStack stack) {}
public void onBlockPlacedBy(World world, BlockPos pos, BlockState state, LivingEntity entity, ItemStack stack) {}
/**
* Called when a player right clicks this sub tile.
*/
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) { return false; }
public boolean onBlockActivated(World world, BlockPos pos, BlockState state, PlayerEntity player, Hand hand, Direction side, float hitX, float hitY, float hitZ) { return false; }
/**
* Called when this sub tile is added to the world.
*/
public void onBlockAdded(World world, BlockPos pos, IBlockState state) {}
public void onBlockAdded(World world, BlockPos pos, BlockState state) {}
/**
* Called when this sub tile is harvested
*/
public void onBlockHarvested(World world, BlockPos pos, IBlockState state, EntityPlayer player) {}
public void onBlockHarvested(World world, BlockPos pos, BlockState state, PlayerEntity player) {}
/**
* Allows additional processing of sub tile drops
@@ -278,18 +285,18 @@ public class TileEntitySpecialFlower extends TileEntity implements ITickable, IW
}
/**
* @see IWandBindable#canSelect(EntityPlayer, ItemStack, net.minecraft.util.math.BlockPos, net.minecraft.util.EnumFacing)
* @see IWandBindable#canSelect(PlayerEntity, ItemStack, net.minecraft.util.math.BlockPos, Direction)
*/
@Override
public boolean canSelect(EntityPlayer player, ItemStack wand, BlockPos pos, EnumFacing side) {
public boolean canSelect(PlayerEntity player, ItemStack wand, BlockPos pos, Direction side) {
return false;
}
/**
* @see IWandBindable#bindTo(EntityPlayer, ItemStack, net.minecraft.util.math.BlockPos, net.minecraft.util.EnumFacing)
* @see IWandBindable#bindTo(PlayerEntity, ItemStack, net.minecraft.util.math.BlockPos, Direction)
*/
@Override
public boolean bindTo(EntityPlayer player, ItemStack wand, BlockPos pos, EnumFacing side) {
public boolean bindTo(PlayerEntity player, ItemStack wand, BlockPos pos, Direction side) {
return false;
}
@@ -317,7 +324,7 @@ public class TileEntitySpecialFlower extends TileEntity implements ITickable, IW
/**
* Gets the redstone power level for this SubTileEntity
*/
public int getPowerLevel(EnumFacing side) {
public int getPowerLevel(Direction side) {
return 0;
}
@@ -10,9 +10,11 @@
*/
package vazkii.botania.api.wand;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction;
import net.minecraft.util.math.BlockPos;
/**
@@ -25,12 +27,12 @@ public interface IWandBindable extends ITileBound {
/**
* Return true if the Wand can select this tile.
*/
public boolean canSelect(EntityPlayer player, ItemStack wand, BlockPos pos, EnumFacing side);
public boolean canSelect(PlayerEntity player, ItemStack wand, BlockPos pos, Direction side);
/**
* Call to bind the TileEntity to where the player clicked. Return true to deselect
* the TileEntity for another bind or false case the TileEntity should stay selected.
*/
public boolean bindTo(EntityPlayer player, ItemStack wand, BlockPos pos, EnumFacing side);
public boolean bindTo(PlayerEntity player, ItemStack wand, BlockPos pos, Direction side);
}
@@ -10,9 +10,11 @@
*/
package vazkii.botania.api.wand;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
@@ -25,6 +27,6 @@ public interface IWandable {
* Called when the block is used by a wand. Note that the player parameter can be null
* if this function is called from a dispenser.
*/
public boolean onUsedByWand(EntityPlayer player, ItemStack stack, World world, BlockPos pos, EnumFacing side);
public boolean onUsedByWand(PlayerEntity player, ItemStack stack, World world, BlockPos pos, Direction side);
}
@@ -10,7 +10,8 @@
*/
package vazkii.botania.api.wiki;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.math.RayTraceResult;
import net.minecraft.world.World;
@@ -24,16 +25,16 @@ public interface IWikiProvider {
/**
* Gets the name of the block being looked at for display.
*/
public String getBlockName(World world, RayTraceResult pos, EntityPlayer player);
public String getBlockName(World world, RayTraceResult pos, PlayerEntity player);
/**
* Gets the URL to open when the block is clicked.
*/
public String getWikiURL(World world, RayTraceResult pos, EntityPlayer player);
public String getWikiURL(World world, RayTraceResult pos, PlayerEntity player);
/**
* Gets the name of the wiki for display.
*/
public String getWikiName(World world, RayTraceResult pos, EntityPlayer player);
public String getWikiName(World world, RayTraceResult pos, PlayerEntity player);
}
@@ -10,8 +10,10 @@
*/
package vazkii.botania.api.wiki;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.block.BlockState;
import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.RayTraceResult;
@@ -47,9 +49,9 @@ public class SimpleWikiProvider implements IWikiProvider {
}
@Override
public String getBlockName(World world, RayTraceResult pos, EntityPlayer player) {
public String getBlockName(World world, RayTraceResult pos, PlayerEntity player) {
BlockPos bPos = pos.getBlockPos();
IBlockState state = world.getBlockState(bPos);
BlockState state = world.getBlockState(bPos);
ItemStack stack = state.getBlock().getPickBlock(state, pos, world, bPos, player);
@@ -63,7 +65,7 @@ public class SimpleWikiProvider implements IWikiProvider {
}
@Override
public String getWikiURL(World world, RayTraceResult pos, EntityPlayer player) {
public String getWikiURL(World world, RayTraceResult pos, PlayerEntity player) {
String name = getBlockName(world, pos, player);
if(name == null)
return null;
@@ -76,7 +78,7 @@ public class SimpleWikiProvider implements IWikiProvider {
}
@Override
public String getWikiName(World world, RayTraceResult pos, EntityPlayer player) {
public String getWikiName(World world, RayTraceResult pos, PlayerEntity player) {
return name;
}
@@ -11,7 +11,7 @@
package vazkii.botania.client.challenge;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.CompoundNBT;
public class Challenge {
@@ -26,11 +26,11 @@ public class Challenge {
this.level = level;
}
public void writeToNBT(NBTTagCompound cmp) {
public void writeToNBT(CompoundNBT cmp) {
cmp.putBoolean(unlocalizedName, complete);
}
public void readFromNBT(NBTTagCompound cmp) {
public void readFromNBT(CompoundNBT cmp) {
complete = cmp.getBoolean(unlocalizedName);
}
@@ -10,9 +10,11 @@
*/
package vazkii.botania.client.challenge;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.block.Blocks;
import net.minecraft.block.Blocks;
import net.minecraft.item.Items;
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;
@@ -11,13 +11,15 @@
package vazkii.botania.client.core.handler;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.block.BlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.BlockRendererDispatcher;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.renderer.texture.AtlasTexture;
import net.minecraft.client.renderer.texture.AtlasTexture;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.block.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
@@ -39,8 +41,8 @@ public final class AstrolabePreviewHandler {
@SubscribeEvent
public static void onWorldRenderLast(RenderWorldLastEvent event) {
World world = Minecraft.getInstance().world;
List<EntityPlayer> playerEntities = world.playerEntities;
for (EntityPlayer player : playerEntities) {
List<PlayerEntity> playerEntities = world.playerEntities;
for (PlayerEntity player : playerEntities) {
ItemStack currentStack = player.getHeldItemMainhand();
if(currentStack.isEmpty() || !(currentStack.getItem() instanceof ItemAstrolabe))
currentStack = player.getHeldItemOffhand();
@@ -53,10 +55,10 @@ public final class AstrolabePreviewHandler {
}
}
private static void renderPlayerLook(EntityPlayer player, ItemStack stack) {
private static void renderPlayerLook(PlayerEntity player, ItemStack stack) {
List<BlockPos> coords = ItemAstrolabe.getBlocksToPlace(stack, player);
if (ItemAstrolabe.hasBlocks(stack, player, coords)) {
IBlockState state = ItemAstrolabe.getBlockState(stack);
BlockState state = ItemAstrolabe.getBlockState(stack);
GL11.glPushMatrix();
GL11.glEnable(GL11.GL_BLEND);
@@ -75,7 +77,7 @@ public final class AstrolabePreviewHandler {
}
}
private static void renderBlockAt(IBlockState state, BlockPos pos) {
private static void renderBlockAt(BlockState state, BlockPos pos) {
double renderPosX = Minecraft.getInstance().getRenderManager().renderPosX;
double renderPosY = Minecraft.getInstance().getRenderManager().renderPosY;
double renderPosZ = Minecraft.getInstance().getRenderManager().renderPosZ;
@@ -88,7 +90,7 @@ public final class AstrolabePreviewHandler {
GlStateManager.enableBlend();
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
Minecraft.getInstance().textureManager.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
Minecraft.getInstance().textureManager.bindTexture(AtlasTexture.LOCATION_BLOCKS_TEXTURE);
BlockRendererDispatcher brd = Minecraft.getInstance().getBlockRendererDispatcher();
GlStateManager.translatef(pos.getX(), pos.getY(), pos.getZ() + 1);
GlStateManager.color4f(1, 1, 1, 1);
@@ -11,13 +11,14 @@
package vazkii.botania.client.core.handler;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GlStateManager;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.entity.layers.LayerRenderer;
import net.minecraft.client.renderer.model.ItemCameraTransforms;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.client.renderer.texture.AtlasTexture;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.EquipmentSlotType;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import top.theillusivec4.curios.api.CuriosAPI;
@@ -31,10 +32,10 @@ import vazkii.botania.common.item.ModItems;
import javax.annotation.Nonnull;
import java.util.Map;
public final class BaubleRenderHandler implements LayerRenderer<EntityPlayer> {
public final class BaubleRenderHandler implements LayerRenderer<PlayerEntity> {
@Override
public void render(@Nonnull EntityPlayer player, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) {
public void render(@Nonnull PlayerEntity player, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) {
dispatchRenders(player, limbSwing, limbSwingAmount, partialTicks, ageInTicks, netHeadYaw, headPitch, scale);
// todo 1.13 recheck what this was checking for (make sure to account for config+invis)
@@ -45,7 +46,7 @@ public final class BaubleRenderHandler implements LayerRenderer<EntityPlayer> {
}
// Like LayerCurios, but with Botania-specific logic
private void dispatchRenders(EntityPlayer player, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) {
private void dispatchRenders(PlayerEntity player, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) {
GlStateManager.pushMatrix();
CuriosAPI.getCuriosHandler(player).ifPresent(handler -> {
Map<String, CurioStackHandler> curios = handler.getCurioMap();
@@ -85,15 +86,15 @@ public final class BaubleRenderHandler implements LayerRenderer<EntityPlayer> {
}
@SuppressWarnings("deprecation")
private void renderManaTablet(EntityPlayer player) {
private void renderManaTablet(PlayerEntity player) {
boolean renderedOne = false;
for(int i = 0; i < player.inventory.getSizeInventory(); i++) {
ItemStack stack = player.inventory.getStackInSlot(i);
if(!stack.isEmpty() && stack.getItem() == ModItems.manaTablet) {
GlStateManager.pushMatrix();
Minecraft.getInstance().textureManager.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
Minecraft.getInstance().textureManager.bindTexture(AtlasTexture.LOCATION_BLOCKS_TEXTURE);
AccessoryRenderHelper.rotateIfSneaking(player);
boolean armor = !player.getItemStackFromSlot(EntityEquipmentSlot.LEGS).isEmpty();
boolean armor = !player.getItemStackFromSlot(EquipmentSlotType.LEGS).isEmpty();
GlStateManager.rotatef(90, 0, 1, 0);
GlStateManager.rotatef(180, 0, 0, 1);
GlStateManager.translated(0, -0.6, 0);
@@ -11,7 +11,7 @@
package vazkii.botania.client.core.handler;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GlStateManager;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.entity.Entity;
@@ -47,7 +47,7 @@ public final class BlockHighlightRenderHandler {
RayTraceResult pos = mc.objectMouseOver;
GlStateManager.pushMatrix();
GlStateManager.disableTexture2D();
GlStateManager.disableTexture();
GL11.glPushAttrib(GL11.GL_LIGHTING_BIT);
GlStateManager.disableLighting();
GlStateManager.enableBlend();
@@ -102,7 +102,7 @@ public final class BlockHighlightRenderHandler {
offY += 0.001;
}
GlStateManager.enableTexture2D();
GlStateManager.enableTexture();
GlStateManager.disableBlend();
GL11.glPopAttrib();
GlStateManager.popMatrix();
@@ -11,7 +11,7 @@
package vazkii.botania.client.core.handler;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GlStateManager;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
@@ -11,14 +11,15 @@
package vazkii.botania.client.core.handler;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.block.BlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GlStateManager;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.Direction;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
@@ -47,10 +48,10 @@ public final class BoundTileRenderer {
GlStateManager.pushMatrix();
GL11.glPushAttrib(GL11.GL_LIGHTING_BIT);
GlStateManager.disableDepthTest();
GlStateManager.disableTexture2D();
GlStateManager.disableTexture();
GlStateManager.enableBlend();
EntityPlayer player = Minecraft.getInstance().player;
PlayerEntity player = Minecraft.getInstance().player;
int color = Color.HSBtoRGB(ClientTickHandler.ticksInGame % 200 / 200F, 0.6F, 1F);
if(!player.getHeldItemMainhand().isEmpty() && player.getHeldItemMainhand().getItem() instanceof ICoordBoundItem) {
@@ -65,7 +66,7 @@ public final class BoundTileRenderer {
renderBlockOutlineAt(coords, color);
}
LazyOptional<IItemHandler> mainInvCap = player.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, EnumFacing.UP);
LazyOptional<IItemHandler> mainInvCap = player.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, Direction.UP);
mainInvCap.ifPresent(mainInv -> {
IItemHandlerModifiable acc = BotaniaAPI.internalHandler.getAccessoriesInventory(player);
IItemHandler joined = acc != null ? new CombinedInvWrapper((IItemHandlerModifiable) mainInv, acc) : mainInv;
@@ -88,7 +89,7 @@ public final class BoundTileRenderer {
GlStateManager.enableDepthTest();
GlStateManager.enableTexture2D();
GlStateManager.enableTexture();
GlStateManager.disableBlend();
GL11.glPopAttrib();
GlStateManager.popMatrix();
@@ -109,7 +110,7 @@ public final class BoundTileRenderer {
GL11.glColor4ub((byte) colorRGB.getRed(), (byte) colorRGB.getGreen(), (byte) colorRGB.getBlue(), (byte) 255);
World world = Minecraft.getInstance().world;
IBlockState state = world.getBlockState(pos);
BlockState state = world.getBlockState(pos);
Block block = state.getBlock();
drawWireframe : {
List<AxisAlignedBB> list;
@@ -12,8 +12,8 @@ package vazkii.botania.client.core.handler;
import com.google.common.collect.ImmutableList;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
@@ -69,12 +69,12 @@ public final class ClientTickHandler {
SubTileVinculotus.existingFlowers.clear();
}
GuiScreen gui = Minecraft.getInstance().currentScreen;
Screen gui = Minecraft.getInstance().currentScreen;
if(gui == null || !gui.doesGuiPauseGame()) {
ticksInGame++;
partialTicks = 0;
EntityPlayer player = Minecraft.getInstance().player;
PlayerEntity player = Minecraft.getInstance().player;
if(player != null) {
if(PlayerHelper.hasHeldItemClass(player, ModItems.twigWand)) {
for(TileSignature sig : ImmutableList.copyOf(ManaNetworkHandler.instance.getAllCollectorsInWorld(Minecraft.getInstance().world))) {
@@ -1,19 +1,22 @@
package vazkii.botania.client.core.handler;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.block.BlockState;
import net.minecraft.block.BlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.color.BlockColors;
import net.minecraft.client.renderer.color.IBlockColor;
import net.minecraft.client.renderer.color.IItemColor;
import net.minecraft.client.renderer.color.ItemColors;
import net.minecraft.init.Blocks;
import net.minecraft.item.EnumDyeColor;
import net.minecraft.block.Blocks;
import net.minecraft.item.DyeColor;
import net.minecraft.item.DyeColor;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.BlockItem;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumHand;
import net.minecraft.util.Hand;
import net.minecraft.util.Hand;
import net.minecraft.util.Util;
import net.minecraft.world.FoliageColors;
import net.minecraft.world.biome.BiomeColors;
@@ -69,7 +72,7 @@ public final class ColorHandler {
return ((TilePool) te).color.colorValue;
}
}
return EnumDyeColor.WHITE.colorValue;
return DyeColor.WHITE.colorValue;
}
},
ModBlocks.manaPool, ModBlocks.creativePool, ModBlocks.dilutedPool, ModBlocks.fabulousPool
@@ -99,7 +102,7 @@ public final class ColorHandler {
TileEntity tile = world.getTileEntity(pos);
if(tile instanceof TileCamo) {
TileCamo camo = (TileCamo) tile;
IBlockState camoState = camo.camoState;
BlockState camoState = camo.camoState;
if(camoState != null)
return camoState.getBlock() instanceof BlockCamo
? 0xFFFFFF
@@ -115,19 +118,19 @@ public final class ColorHandler {
ModItems.lifeEssence, ModItems.gaiaIngot);
items.register((s, t) ->
t == 1 ? EnumDyeColor.byId(ItemTwigWand.getColor1(s)).colorValue
: t == 2 ? EnumDyeColor.byId(ItemTwigWand.getColor2(s)).colorValue
t == 1 ? DyeColor.byId(ItemTwigWand.getColor1(s)).colorValue
: t == 2 ? DyeColor.byId(ItemTwigWand.getColor2(s)).colorValue
: -1,
ModItems.twigWand);
IItemColor petalHandler = (s, t) -> ((ItemPetal) s.getItem()).color.colorValue;
IItemColor dyeHandler = (s, t) -> ((Item16Colors) s.getItem()).color.colorValue;
for(EnumDyeColor color : EnumDyeColor.values()) {
for(DyeColor color : DyeColor.values()) {
items.register(petalHandler, ModItems.getPetal(color));
items.register(dyeHandler, ModItems.getDye(color));
}
items.register((s, t) -> Minecraft.getInstance().getBlockColors().getColor(((ItemBlock)s.getItem()).getBlock().getDefaultState(), null, null, t),
items.register((s, t) -> Minecraft.getInstance().getBlockColors().getColor(((BlockItem)s.getItem()).getBlock().getDefaultState(), null, null, t),
ModBlocks.petalBlockWhite, ModBlocks.petalBlockOrange, ModBlocks.petalBlockMagenta, ModBlocks.petalBlockLightBlue,
ModBlocks.petalBlockYellow, ModBlocks.petalBlockLime, ModBlocks.petalBlockPink, ModBlocks.petalBlockGray,
ModBlocks.petalBlockSilver, ModBlocks.petalBlockCyan, ModBlocks.petalBlockPurple, ModBlocks.petalBlockBlue,
@@ -165,7 +168,7 @@ public final class ColorHandler {
return Minecraft.getInstance().getItemColors().getColor(lens, t);
if(t == 2) {
BurstProperties props = ((ItemManaGun) s.getItem()).getBurstProps(Minecraft.getInstance().player, s, false, EnumHand.MAIN_HAND);
BurstProperties props = ((ItemManaGun) s.getItem()).getBurstProps(Minecraft.getInstance().player, s, false, Hand.MAIN_HAND);
Color color = new Color(props.color);
float mul = (float) (Math.sin((double) ClientTickHandler.ticksInGame / 5) * 0.15F);
@@ -11,15 +11,16 @@
package vazkii.botania.client.core.handler;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GlStateManager;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.layers.LayerRenderer;
import net.minecraft.client.renderer.model.ItemCameraTransforms;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EnumPlayerModelParts;
import net.minecraft.item.EnumDyeColor;
import net.minecraft.client.renderer.texture.AtlasTexture;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerModelPart;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.DyeColor;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
@@ -39,13 +40,13 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
public final class ContributorFancinessHandler implements LayerRenderer<EntityPlayer> {
public final class ContributorFancinessHandler implements LayerRenderer<PlayerEntity> {
public static final Map<String, ItemStack> flowerMap = new HashMap<>();
private static boolean startedLoading = false;
@Override
public void render(@Nonnull EntityPlayer player, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) {
public void render(@Nonnull PlayerEntity player, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) {
String name = player.getDisplayName().getString();
float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * partialTicks;
@@ -63,7 +64,7 @@ public final class ContributorFancinessHandler implements LayerRenderer<EntityPl
firstStart();
name = name.toLowerCase();
if(player.isWearing(EnumPlayerModelParts.CAPE) && flowerMap.containsKey(name))
if(player.isWearing(PlayerModelPart.CAPE) && flowerMap.containsKey(name))
renderFlower(player, flowerMap.get(name));
GlStateManager.popMatrix();
@@ -90,7 +91,7 @@ public final class ContributorFancinessHandler implements LayerRenderer<EntityPl
int i = Integer.parseInt(value);
if(i < 0 || i >= 16)
throw new NumberFormatException();
flowerMap.put(key, new ItemStack(ModBlocks.getFlower(EnumDyeColor.byId(i))));
flowerMap.put(key, new ItemStack(ModBlocks.getFlower(DyeColor.byId(i))));
} catch(NumberFormatException e) {
// todo 1.13 backward compat for camelCase names
Item item = ForgeRegistries.ITEMS.getValue(new ResourceLocation(LibMisc.MOD_ID, value));
@@ -99,7 +100,7 @@ public final class ContributorFancinessHandler implements LayerRenderer<EntityPl
}
}
private static void renderGoldfish(EntityPlayer player) {
private static void renderGoldfish(PlayerEntity player) {
GlStateManager.pushMatrix();
TextureAtlasSprite icon = MiscellaneousIcons.INSTANCE.goldfishIcon;
float f = icon.getMinU();
@@ -111,16 +112,16 @@ public final class ContributorFancinessHandler implements LayerRenderer<EntityPl
GlStateManager.rotatef(90F, 0F, 1F, 0F);
GlStateManager.scalef(0.4F, 0.4F, 0.4F);
GlStateManager.translatef(-0.5F, 1.6F, 0F);
Minecraft.getInstance().textureManager.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
Minecraft.getInstance().textureManager.bindTexture(AtlasTexture.LOCATION_BLOCKS_TEXTURE);
IconHelper.renderIconIn3D(Tessellator.getInstance(), f1, f2, f, f3, icon.getWidth(), icon.getHeight(), 1F / 16F);
GlStateManager.popMatrix();
}
@SuppressWarnings("deprecation")
private static void renderFlower(EntityPlayer player, ItemStack flower) {
private static void renderFlower(PlayerEntity player, ItemStack flower) {
GlStateManager.pushMatrix();
AccessoryRenderHelper.translateToHeadLevel(player);
Minecraft.getInstance().textureManager.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
Minecraft.getInstance().textureManager.bindTexture(AtlasTexture.LOCATION_BLOCKS_TEXTURE);
GlStateManager.rotatef(180, 0, 0, 1);
GlStateManager.translated(0, -0.85, 0);
GlStateManager.rotatef(-90, 0, 1, 0);
@@ -12,15 +12,18 @@ package vazkii.botania.client.core.handler;
import com.google.common.collect.ImmutableList;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiChat;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.GuiTextField;
import net.minecraft.client.gui.screen.ChatScreen;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.widget.TextFieldWidget;
import net.minecraft.client.gui.screen.ChatScreen;
import net.minecraft.client.gui.widget.TextFieldWidget;
import net.minecraft.item.Item;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
import net.minecraft.util.registry.IRegistry;
import net.minecraft.util.text.TextComponentString;
import net.minecraft.util.registry.Registry;
import net.minecraft.util.text.StringTextComponent;
import net.minecraft.util.text.StringTextComponent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent.ClientTickEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent.Phase;
@@ -68,12 +71,12 @@ public class CorporeaAutoCompleteHandler {
public void onTick(ClientTickEvent event) {
if(event.phase != Phase.END)
return;
GuiScreen screen = Minecraft.getInstance().currentScreen;
if(!(screen instanceof GuiChat)) {
Screen screen = Minecraft.getInstance().currentScreen;
if(!(screen instanceof ChatScreen)) {
isAutoCompleted = false;
return;
}
GuiChat chat = (GuiChat) screen;
ChatScreen chat = (ChatScreen) screen;
if(isAutoCompleted) {
boolean valid = false;//ReflectionHelper.getPrivateValue(GuiChat.class, chat, LibObfuscation.COMPLETE_FLAG);
if(!valid)
@@ -97,7 +100,7 @@ public class CorporeaAutoCompleteHandler {
advanceAutoComplete(chat.inputField, chat);
}
private void advanceAutoComplete(GuiTextField inputField, GuiChat chat) {
private void advanceAutoComplete(TextFieldWidget inputField, ChatScreen chat) {
position++;
if(position >= completions.size())
position -= completions.size();
@@ -106,7 +109,7 @@ public class CorporeaAutoCompleteHandler {
inputField.setText(str);
}
private void buildAutoCompletes(GuiTextField inputField, GuiChat chat) {
private void buildAutoCompletes(TextFieldWidget inputField, ChatScreen chat) {
String leftOfCursor;
if(inputField.getCursorPosition() == 0)
leftOfCursor = "";
@@ -127,7 +130,7 @@ public class CorporeaAutoCompleteHandler {
stringbuilder.append(", ");
}
Minecraft.getInstance().ingameGUI.getChatGUI().printChatMessageWithOptionalDeletion(new TextComponentString(stringbuilder.toString()), 1);
Minecraft.getInstance().ingameGUI.getChatGUI().printChatMessageWithOptionalDeletion(new StringTextComponent(stringbuilder.toString()), 1);
isAutoCompleted = true;
originalString = inputField.getText();
}
@@ -11,10 +11,12 @@
package vazkii.botania.client.core.handler;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.screen.inventory.ContainerScreen;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.util.InputMappings;
import net.minecraft.inventory.Slot;
import net.minecraft.inventory.container.Slot;
import net.minecraft.inventory.container.Slot;
import net.minecraft.item.ItemStack;
import net.minecraftforge.client.event.GuiScreenEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
@@ -35,7 +37,7 @@ public class CorporeaInputHandler {
public static Supplier<ItemStack> jeiPanelSupplier = () -> ItemStack.EMPTY;
/** Filter for usable guis to handle requests. Added to in JEIBotaniaPlugin */
public static Predicate<GuiScreen> supportedGuiFilter = gui -> gui instanceof GuiContainer;
public static Predicate<Screen> supportedGuiFilter = gui -> gui instanceof ContainerScreen;
@SubscribeEvent
public static void buttonPressed(GuiScreenEvent.KeyboardKeyPressedEvent.Pre event) {
@@ -50,11 +52,11 @@ public class CorporeaInputHandler {
int count = 1;
int max = stack.getMaxStackSize();
if(GuiScreen.isShiftKeyDown()) {
if(Screen.isShiftKeyDown()) {
count = max;
if(GuiScreen.isCtrlKeyDown())
if(Screen.isCtrlKeyDown())
count /= 4;
} else if(GuiScreen.isCtrlKeyDown())
} else if(Screen.isCtrlKeyDown())
count = max / 2;
if(count > 0) {
@@ -68,9 +70,9 @@ public class CorporeaInputHandler {
}
private static ItemStack getStackUnderMouse() {
GuiScreen screen = Minecraft.getInstance().currentScreen;
if(screen instanceof GuiContainer) {
Slot slotUnderMouse = ((GuiContainer) screen).getSlotUnderMouse();
Screen screen = Minecraft.getInstance().currentScreen;
if(screen instanceof ContainerScreen) {
Slot slotUnderMouse = ((ContainerScreen) screen).getSlotUnderMouse();
if(slotUnderMouse != null)
return slotUnderMouse.getStack();
}
@@ -10,13 +10,15 @@
*/
package vazkii.botania.client.core.handler;
import net.minecraft.block.state.IBlockState;
import net.minecraft.block.BlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.registry.IRegistry;
import net.minecraft.util.registry.Registry;
import net.minecraft.util.registry.Registry;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.world.World;
import net.minecraft.world.dimension.DimensionType;
@@ -61,7 +63,7 @@ public final class DebugHandler {
if (Minecraft.getInstance().isSingleplayer()) {
DimensionType dim = Minecraft.getInstance().world.getDimension().getType();
ResourceLocation dimName = IRegistry.DIMENSION_TYPE.getKey(dim);
ResourceLocation dimName = Registry.DIMENSION_TYPE.getKey(dim);
UUID id = Minecraft.getInstance().player.getUniqueID();
Entity ent = Minecraft.getInstance().getIntegratedServer().getWorld(dim).getEntityFromUuid(id);
if (ent != null) {
@@ -70,7 +72,7 @@ public final class DebugHandler {
}
}
if(GuiScreen.isCtrlKeyDown() && GuiScreen.isShiftKeyDown()) {
if(Screen.isCtrlKeyDown() && Screen.isShiftKeyDown()) {
event.getLeft().add(PREFIX + "Config Context");
event.getLeft().add(" shaders.enabled: " + ConfigHandler.CLIENT.useShaders.get());
event.getLeft().add(" shaders.secondaryUnit: " + ConfigHandler.CLIENT.glSecondaryTextureUnit.get());
@@ -11,15 +11,18 @@
package vazkii.botania.client.core.handler;
import net.minecraft.block.Block;
import net.minecraft.block.BlockFlowingFluid;
import net.minecraft.block.state.IBlockState;
import net.minecraft.block.BlockState;
import net.minecraft.block.FlowingFluidBlock;
import net.minecraft.block.BlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.AbstractGui;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.Gui;
import net.minecraft.client.gui.GuiChat;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.gui.AbstractGui;
import net.minecraft.client.gui.screen.ChatScreen;
import net.minecraft.client.gui.screen.ChatScreen;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.profiler.Profiler;
@@ -120,7 +123,7 @@ public final class HUDHandler {
RayTraceResult pos = mc.objectMouseOver;
if(pos != null) {
IBlockState state = pos.type == RayTraceResult.Type.BLOCK ? mc.world.getBlockState(pos.getBlockPos()) : null;
BlockState state = pos.type == RayTraceResult.Type.BLOCK ? mc.world.getBlockState(pos.getBlockPos()) : null;
Block block = state == null ? null : state.getBlock();
TileEntity tile = pos.type == RayTraceResult.Type.BLOCK ? mc.world.getTileEntity(pos.getBlockPos()) : null;
@@ -149,7 +152,7 @@ public final class HUDHandler {
}
TileCorporeaIndex.getInputHandler();
if(!InputHandler.getNearbyIndexes(mc.player).isEmpty() && mc.currentScreen != null && mc.currentScreen instanceof GuiChat) {
if(!InputHandler.getNearbyIndexes(mc.player).isEmpty() && mc.currentScreen != null && mc.currentScreen instanceof ChatScreen) {
profiler.startSection("nearIndex");
renderNearIndexDisplay();
profiler.endSection();
@@ -192,7 +195,7 @@ public final class HUDHandler {
profiler.startSection("manaBar");
EntityPlayer player = mc.player;
PlayerEntity player = mc.player;
if(!player.isSpectator()) {
int totalMana = 0;
int totalMaxMana = 0;
@@ -352,8 +355,8 @@ public final class HUDHandler {
int w = mc.mainWindow.getScaledWidth();
int h = mc.mainWindow.getScaledHeight();
int boxH = h / 2 + (tile.locked ? 20 : 10);
Gui.drawRect(w / 2 + 8, h / 2 - 12, w / 2 + strlen + 32, boxH, 0x44000000);
Gui.drawRect(w / 2 + 6, h / 2 - 14, w / 2 + strlen + 34, boxH + 2, 0x44000000);
AbstractGui.drawRect(w / 2 + 8, h / 2 - 12, w / 2 + strlen + 32, boxH, 0x44000000);
AbstractGui.drawRect(w / 2 + 6, h / 2 - 14, w / 2 + strlen + 34, boxH + 2, 0x44000000);
mc.fontRenderer.drawStringWithShadow(s1, w / 2 + 30, h / 2 - 10, 0x6666FF);
mc.fontRenderer.drawStringWithShadow(tile.getItemCount() + "x", w / 2 + 30, h / 2, 0xFFFFFF);
@@ -368,7 +371,7 @@ public final class HUDHandler {
profiler.endSection();
}
private static void drawLexiconHUD(ItemStack stack, IBlockState state, RayTraceResult pos) {
private static void drawLexiconHUD(ItemStack stack, BlockState state, RayTraceResult pos) {
Minecraft mc = Minecraft.getInstance();
Block block = state.getBlock();
Profiler profiler = mc.profiler;
@@ -398,7 +401,7 @@ public final class HUDHandler {
if(!ConfigHandler.CLIENT.lexicaOfflineMode.get() && !draw && pos.entity == null) {
profiler.startSection("wikiLookup");
if(!block.isAir(state, mc.world, pos.getBlockPos()) && !(block instanceof BlockFlowingFluid)) {
if(!block.isAir(state, mc.world, pos.getBlockPos()) && !(block instanceof FlowingFluidBlock)) {
IWikiProvider provider = WikiHooks.getWikiFor(block);
String url = provider.getWikiURL(mc.world, pos, mc.player);
if(url != null && !url.isEmpty()) {
@@ -445,8 +448,8 @@ public final class HUDHandler {
int x = mc.mainWindow.getScaledWidth() - l - 20;
int y = mc.mainWindow.getScaledHeight() - 60;
Gui.drawRect(x - 6, y - 6, x + l + 6, y + 37, 0x44000000);
Gui.drawRect(x - 4, y - 4, x + l + 4, y + 35, 0x44000000);
AbstractGui.drawRect(x - 6, y - 6, x + l + 6, y + 37, 0x44000000);
AbstractGui.drawRect(x - 4, y - 4, x + l + 4, y + 35, 0x44000000);
net.minecraft.client.renderer.RenderHelper.enableGUIStandardItemLighting();
GlStateManager.enableRescaleNormal();
mc.getItemRenderer().renderItemAndEffectIntoGUI(new ItemStack(ModBlocks.corporeaIndex), x, y + 10);
@@ -11,9 +11,10 @@
package vazkii.botania.client.core.handler;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GlStateManager;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.api.distmarker.Dist;
@@ -106,7 +107,7 @@ public final class ItemsRemainingRenderHandler {
ticks = stack.isEmpty() ? 0 : maxTicks;
}
public static void set(EntityPlayer player, ItemStack displayStack, Pattern pattern) {
public static void set(PlayerEntity player, ItemStack displayStack, Pattern pattern) {
int count = 0;
for(int i = 0; i < player.inventory.getSizeInventory(); i++) {
ItemStack stack = player.inventory.getStackInSlot(i);
@@ -1,14 +1,15 @@
package vazkii.botania.client.core.handler;
import net.minecraft.client.renderer.GlStateManager;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.renderer.entity.layers.LayerRenderer;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import vazkii.botania.common.item.equipment.armor.terrasteel.ItemTerrasteelHelm;
public class LayerTerraHelmet implements LayerRenderer<EntityPlayer> {
public class LayerTerraHelmet implements LayerRenderer<PlayerEntity> {
@Override
public void render(EntityPlayer player, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) {
public void render(PlayerEntity player, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) {
float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * partialTicks;
float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * partialTicks;
float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * partialTicks;
@@ -11,7 +11,7 @@
package vazkii.botania.client.core.handler;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GlStateManager;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
@@ -10,8 +10,9 @@ package vazkii.botania.client.core.handler;
import net.minecraft.client.renderer.model.IBakedModel;
import net.minecraft.client.renderer.model.ModelResourceLocation;
import net.minecraft.client.renderer.texture.AtlasTexture;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.client.renderer.texture.AtlasTexture;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.event.ModelBakeEvent;
import net.minecraftforge.client.event.TextureStitchEvent;
@@ -238,11 +239,11 @@ public class MiscellaneousIcons {
nimbusGem = get(evt.getMap(), "items/pendant_cloud_super_gem");
}
private void register(TextureMap map, String name) {
private void register(AtlasTexture map, String name) {
map.registerSprite(null, new ResourceLocation(LibMisc.MOD_ID, name));
}
private TextureAtlasSprite get(TextureMap map, String name) {
private TextureAtlasSprite get(AtlasTexture map, String name) {
return map.getSprite(new ResourceLocation(LibMisc.MOD_ID, name));
}
@@ -9,7 +9,8 @@
package vazkii.botania.client.core.handler;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.entity.RenderSprite;
import net.minecraft.client.renderer.entity.SpriteRenderer;
import net.minecraft.client.renderer.entity.SpriteRenderer;
import net.minecraft.client.renderer.model.ModelResourceLocation;
import net.minecraft.item.ItemStack;
import net.minecraftforge.client.event.ModelRegistryEvent;
@@ -103,8 +104,8 @@ public final class ModelHandler {
RenderingRegistry.registerEntityRenderingHandler(EntityThornChakram.class, renderManager -> new RenderSnowballStack<>(renderManager, ModItems.thornChakram, Minecraft.getInstance().getItemRenderer(),
entity -> entity.isFire() ? new ItemStack(ModItems.flareChakram) : new ItemStack(ModItems.thornChakram)));
RenderingRegistry.registerEntityRenderingHandler(EntityVineBall.class, renderManager -> new RenderSprite<>(renderManager, ModItems.vineBall, Minecraft.getInstance().getItemRenderer()));
RenderingRegistry.registerEntityRenderingHandler(EntityEnderAirBottle.class, renderManager -> new RenderSprite<>(renderManager, ModItems.enderAirBottle, Minecraft.getInstance().getItemRenderer()));
RenderingRegistry.registerEntityRenderingHandler(EntityVineBall.class, renderManager -> new SpriteRenderer<>(renderManager, ModItems.vineBall, Minecraft.getInstance().getItemRenderer()));
RenderingRegistry.registerEntityRenderingHandler(EntityEnderAirBottle.class, renderManager -> new SpriteRenderer<>(renderManager, ModItems.enderAirBottle, Minecraft.getInstance().getItemRenderer()));
IMultiblockRenderHook.renderHooks.put(ModBlocks.manaPylon, renderTilePylon);
IMultiblockRenderHook.renderHooks.put(ModBlocks.naturaPylon, renderTilePylon);
@@ -10,10 +10,11 @@
*/
package vazkii.botania.client.core.handler;
import net.minecraft.block.state.IBlockState;
import net.minecraft.block.BlockState;
import net.minecraft.block.BlockState;
import net.minecraft.fluid.IFluidState;
import net.minecraft.init.Blocks;
import net.minecraft.init.Fluids;
import net.minecraft.block.Blocks;
import net.minecraft.fluid.Fluids;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockReader;
@@ -34,7 +35,7 @@ public class MultiblockBlockAccess implements IBlockReader {
@Nonnull
@Override
public IBlockState getBlockState(@Nonnull BlockPos pos) {
public BlockState getBlockState(@Nonnull BlockPos pos) {
MultiblockComponent comp=getComponent(pos);
if(comp != null)
return comp.getBlockState();
@@ -10,20 +10,24 @@
*/
package vazkii.botania.client.core.handler;
import net.minecraft.block.state.IBlockState;
import net.minecraft.block.BlockState;
import net.minecraft.block.BlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.BlockRendererDispatcher;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.entity.player.EntityPlayer;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.renderer.texture.AtlasTexture;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumActionResult;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.RayTraceResult;
import net.minecraft.util.text.Style;
import net.minecraft.util.text.TextComponentTranslation;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.World;
import net.minecraft.world.dimension.DimensionType;
import net.minecraftforge.client.event.RenderWorldLastEvent;
@@ -52,12 +56,12 @@ public final class MultiblockRenderHandler {
public static boolean rendering = false;
public static MultiblockSet currentMultiblock;
public static BlockPos anchor;
public static EnumFacing angle;
public static Direction angle;
public static void setMultiblock(MultiblockSet set) {
currentMultiblock = set;
anchor = null;
angle = EnumFacing.SOUTH;
angle = Direction.SOUTH;
Minecraft mc = Minecraft.getInstance();
if(mc.world != null)
@@ -78,11 +82,11 @@ public final class MultiblockRenderHandler {
anchor = event.getPos();
angle = event.getEntityPlayer().getHorizontalFacing();
event.setCanceled(true);
event.setCancellationResult(EnumActionResult.SUCCESS);
event.setCancellationResult(ActionResultType.SUCCESS);
}
}
private static void renderPlayerLook(EntityPlayer player, RayTraceResult src) {
private static void renderPlayerLook(PlayerEntity player, RayTraceResult src) {
if(currentMultiblock != null && dimension == player.world.getDimension().getType()) {
BlockPos anchorPos = anchor != null ? anchor : src.getBlockPos();
@@ -115,7 +119,7 @@ public final class MultiblockRenderHandler {
if(!didAny) {
setMultiblock(null);
player.sendMessage(new TextComponentTranslation("botaniamisc.structureComplete").setStyle(new Style().setColor(TextFormatting.GREEN)));
player.sendMessage(new TranslationTextComponent("botaniamisc.structureComplete").setStyle(new Style().setColor(TextFormatting.GREEN)));
}
}
}
@@ -151,8 +155,8 @@ public final class MultiblockRenderHandler {
GlStateManager.pushMatrix();
GlStateManager.enableBlend();
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
IBlockState state = comp.getBlockState();
Minecraft.getInstance().textureManager.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
BlockState state = comp.getBlockState();
Minecraft.getInstance().textureManager.bindTexture(AtlasTexture.LOCATION_BLOCKS_TEXTURE);
if(state == null)
return;
if(IMultiblockRenderHook.renderHooks.containsKey(state.getBlock())) {
@@ -10,8 +10,9 @@
*/
package vazkii.botania.client.core.handler;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.CompressedStreamTools;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.CompoundNBT;
import vazkii.botania.client.challenge.Challenge;
import vazkii.botania.client.challenge.ModChallenges;
import vazkii.botania.client.gui.lexicon.GuiLexicon;
@@ -44,26 +45,26 @@ public final class PersistentVariableHelper {
public static int lexiconGuiScale = 0;
public static void save() throws IOException {
NBTTagCompound cmp = new NBTTagCompound();
CompoundNBT cmp = new CompoundNBT();
List<GuiLexicon> bookmarks = GuiLexicon.bookmarks;
int count = bookmarks.size();
cmp.putInt(TAG_BOOKMARK_COUNT, count);
NBTTagCompound bookmarksCmp = new NBTTagCompound();
CompoundNBT bookmarksCmp = new CompoundNBT();
for(int i = 0; i < count; i++) {
GuiLexicon lex = bookmarks.get(i);
NBTTagCompound bookmarkCmp = new NBTTagCompound();
CompoundNBT bookmarkCmp = new CompoundNBT();
lex.serialize(bookmarkCmp);
bookmarksCmp.put(TAG_BOOKMARK_PREFIX + i, bookmarkCmp);
}
cmp.put(TAG_BOOKMARKS, bookmarksCmp);
NBTTagCompound challengesCmp = new NBTTagCompound();
CompoundNBT challengesCmp = new CompoundNBT();
for(Challenge c : ModChallenges.challengeLookup.values())
c.writeToNBT(challengesCmp);
cmp.put(TAG_CHALLENGES, challengesCmp);
NBTTagCompound notesCmp = new NBTTagCompound();
CompoundNBT notesCmp = new CompoundNBT();
for(String s : GuiLexicon.notes.keySet()) {
String note = GuiLexicon.notes.get(s);
if(note != null && !note.trim().isEmpty())
@@ -80,14 +81,14 @@ public final class PersistentVariableHelper {
}
public static void load() throws IOException {
NBTTagCompound cmp = getCacheCompound();
CompoundNBT cmp = getCacheCompound();
int count = cmp.getInt(TAG_BOOKMARK_COUNT);
GuiLexicon.bookmarks.clear();
if(count > 0) {
NBTTagCompound bookmarksCmp = cmp.getCompound(TAG_BOOKMARKS);
CompoundNBT bookmarksCmp = cmp.getCompound(TAG_BOOKMARKS);
for(int i = 0; i < count; i++) {
NBTTagCompound bookmarkCmp = bookmarksCmp.getCompound(TAG_BOOKMARK_PREFIX + i);
CompoundNBT bookmarkCmp = bookmarksCmp.getCompound(TAG_BOOKMARK_PREFIX + i);
GuiLexicon gui = GuiLexicon.create(bookmarkCmp);
if(gui != null) {
GuiLexicon.bookmarks.add(gui);
@@ -97,13 +98,13 @@ public final class PersistentVariableHelper {
}
if(cmp.contains(TAG_CHALLENGES)) {
NBTTagCompound challengesCmp = cmp.getCompound(TAG_CHALLENGES);
CompoundNBT challengesCmp = cmp.getCompound(TAG_CHALLENGES);
for(Challenge c : ModChallenges.challengeLookup.values())
c.readFromNBT(challengesCmp);
}
if(cmp.contains(TAG_LEXICON_NOTES)) {
NBTTagCompound notesCmp = cmp.getCompound(TAG_LEXICON_NOTES);
CompoundNBT notesCmp = cmp.getCompound(TAG_LEXICON_NOTES);
Set<String> keys = notesCmp.keySet();
GuiLexicon.notes.clear();
for(String key : keys)
@@ -139,24 +140,24 @@ public final class PersistentVariableHelper {
return cacheFile;
}
private static NBTTagCompound getCacheCompound() throws IOException {
private static CompoundNBT getCacheCompound() throws IOException {
return getCacheCompound(getCacheFile());
}
private static NBTTagCompound getCacheCompound(File cache) throws IOException {
private static CompoundNBT getCacheCompound(File cache) throws IOException {
if(cache == null)
throw new RuntimeException("No cache file!");
try {
return CompressedStreamTools.readCompressed(new FileInputStream(cache));
} catch(IOException e) {
NBTTagCompound cmp = new NBTTagCompound();
CompoundNBT cmp = new CompoundNBT();
CompressedStreamTools.writeCompressed(cmp, new FileOutputStream(cache));
return getCacheCompound(cache);
}
}
private static void injectNBTToFile(NBTTagCompound cmp, File f) {
private static void injectNBTToFile(CompoundNBT cmp, File f) {
try {
CompressedStreamTools.writeCompressed(cmp, new FileOutputStream(f));
} catch(IOException e) {
@@ -11,11 +11,12 @@
package vazkii.botania.client.core.handler;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GlStateManager;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.EnumFacing;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction;
import net.minecraft.util.math.BlockPos;
import org.lwjgl.opengl.GL11;
import vazkii.botania.common.block.tile.string.TileRedString;
@@ -35,7 +36,7 @@ public final class RedStringRenderer {
public static void renderAll() {
if(!redStringTiles.isEmpty()) {
GlStateManager.pushMatrix();
GlStateManager.disableTexture2D();
GlStateManager.disableTexture();
GlStateManager.enableBlend();
GL11.glPushAttrib(GL11.GL_LIGHTING_BIT);
GlStateManager.disableLighting();
@@ -46,7 +47,7 @@ public final class RedStringRenderer {
while((tile = redStringTiles.poll()) != null)
renderTile(tile);
GlStateManager.enableTexture2D();
GlStateManager.enableTexture();
GlStateManager.disableBlend();
GL11.glPopAttrib();
GlStateManager.popMatrix();
@@ -55,7 +56,7 @@ public final class RedStringRenderer {
}
public static void tick() {
EntityPlayer player = Minecraft.getInstance().player;
PlayerEntity player = Minecraft.getInstance().player;
boolean hasWand = player != null && PlayerHelper.hasHeldItem(player, ModItems.twigWand);
if(sizeAlpha > 0F && !hasWand)
sizeAlpha -= 0.1F;
@@ -68,7 +69,7 @@ public final class RedStringRenderer {
double renderPosY = Minecraft.getInstance().getRenderManager().renderPosY;
double renderPosZ = Minecraft.getInstance().getRenderManager().renderPosZ;
EnumFacing dir = tile.getOrientation();
Direction dir = tile.getOrientation();
BlockPos bind = tile.getBinding();
if(bind != null) {
@@ -102,7 +103,7 @@ public final class RedStringRenderer {
}
}
private static void addVertexAtWithTranslation(Tessellator tess, EnumFacing dir, double xpos, double ypos, double zpos, double rand, double l) {
private static void addVertexAtWithTranslation(Tessellator tess, Direction dir, double xpos, double ypos, double zpos, double rand, double l) {
double freq = 20;
double ampl = (0.15 * (Math.sin(l * 2F) * 0.5 + 0.5) + 0.1) * sizeAlpha;
double randMul = 0.05;
@@ -1,14 +1,18 @@
package vazkii.botania.client.core.handler;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.AbstractClientPlayer;
import net.minecraft.client.entity.player.AbstractClientPlayerEntity;
import net.minecraft.client.entity.player.AbstractClientPlayerEntity;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.entity.model.ModelBook;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.renderer.entity.model.BookModel;
import net.minecraft.client.renderer.entity.model.BookModel;
import net.minecraft.client.resources.I18n;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumHand;
import net.minecraft.util.EnumHandSide;
import net.minecraft.util.Hand;
import net.minecraft.util.HandSide;
import net.minecraft.util.Hand;
import net.minecraft.util.HandSide;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.text.TextFormatting;
@@ -28,7 +32,7 @@ import vazkii.botania.common.lib.LibMisc;
// Hacky way to render 3D lexicon, will be reevaluated in the future.
@Mod.EventBusSubscriber(value = Dist.CLIENT, modid = LibMisc.MOD_ID)
public class RenderLexicon {
private static final ModelBook model = new ModelBook();
private static final BookModel model = new BookModel();
// todo 1.12 improve
private static final ResourceLocation texture = new ResourceLocation(LibResources.MODEL_LEXICA_DEFAULT);
private static final ResourceLocation elvenTexture = new ResourceLocation(LibResources.MODEL_LEXICA_ELVEN);
@@ -60,12 +64,12 @@ public class RenderLexicon {
}
}
private static void renderItemInFirstPerson(AbstractClientPlayer player, float partialTicks, float interpPitch, EnumHand hand, float swingProgress, ItemStack stack, float equipProgress) throws Throwable {
private static void renderItemInFirstPerson(AbstractClientPlayerEntity player, float partialTicks, float interpPitch, Hand hand, float swingProgress, ItemStack stack, float equipProgress) throws Throwable {
// Cherry picked from ItemRenderer.renderItemInFirstPerson
boolean flag = hand == EnumHand.MAIN_HAND;
EnumHandSide enumhandside = flag ? player.getPrimaryHand() : player.getPrimaryHand().opposite();
boolean flag = hand == Hand.MAIN_HAND;
HandSide enumhandside = flag ? player.getPrimaryHand() : player.getPrimaryHand().opposite();
GlStateManager.pushMatrix();
boolean flag1 = enumhandside == EnumHandSide.RIGHT;
boolean flag1 = enumhandside == HandSide.RIGHT;
float f = -0.4F * MathHelper.sin(MathHelper.sqrt(swingProgress) * (float)Math.PI);
float f1 = 0.2F * MathHelper.sin(MathHelper.sqrt(swingProgress) * ((float)Math.PI * 2F));
float f2 = -0.2F * MathHelper.sin(swingProgress * (float)Math.PI);
@@ -77,7 +81,7 @@ public class RenderLexicon {
GlStateManager.popMatrix();
}
private static void doRender(EnumHandSide side, float partialTicks, ItemStack stack) {
private static void doRender(HandSide side, float partialTicks, ItemStack stack) {
Minecraft mc = Minecraft.getInstance();
GlStateManager.pushMatrix();
@@ -93,8 +97,8 @@ public class RenderLexicon {
else ticks -= partialTicks;
}
GlStateManager.translated(0.3F + 0.02F * ticks, 0.475F + 0.01F * ticks, -0.2F - (side == EnumHandSide.RIGHT ? 0.035F : 0.01F) * ticks);
GlStateManager.rotatef(87.5F + ticks * (side == EnumHandSide.RIGHT ? 8 : 12), 0F, 1F, 0F);
GlStateManager.translated(0.3F + 0.02F * ticks, 0.475F + 0.01F * ticks, -0.2F - (side == HandSide.RIGHT ? 0.035F : 0.01F) * ticks);
GlStateManager.rotatef(87.5F + ticks * (side == HandSide.RIGHT ? 8 : 12), 0F, 1F, 0F);
GlStateManager.rotatef(ticks * 2.85F, 0F, 0F, 1F);
opening = ticks / 12F;
@@ -147,20 +151,20 @@ public class RenderLexicon {
// Copy - ItemRenderer.transformSideFirstPerson
// Arg - Side, EquipProgress
private static void transformSideFirstPerson(EnumHandSide p_187459_1_, float p_187459_2_)
private static void transformSideFirstPerson(HandSide p_187459_1_, float p_187459_2_)
{
int i = p_187459_1_ == EnumHandSide.RIGHT ? 1 : -1;
int i = p_187459_1_ == HandSide.RIGHT ? 1 : -1;
GlStateManager.translatef(i * 0.56F, -0.44F + p_187459_2_ * -0.8F, -0.72F);
}
// Copy with modification - ItemRenderer.transformFirstPerson
// Arg - Side, SwingProgress
private static void transformFirstPerson(EnumHandSide p_187453_1_, float p_187453_2_)
private static void transformFirstPerson(HandSide p_187453_1_, float p_187453_2_)
{
int i = p_187453_1_ == EnumHandSide.RIGHT ? 1 : -1;
int i = p_187453_1_ == HandSide.RIGHT ? 1 : -1;
// Botania - added
GlStateManager.translatef(p_187453_1_ == EnumHandSide.RIGHT ? 0.2F : 0.52F, -0.125F, p_187453_1_ == EnumHandSide.RIGHT ? 0.6F : 0.25F);
GlStateManager.rotatef(p_187453_1_ == EnumHandSide.RIGHT ? 60F : 120F, 0F, 1F, 0F);
GlStateManager.translatef(p_187453_1_ == HandSide.RIGHT ? 0.2F : 0.52F, -0.125F, p_187453_1_ == HandSide.RIGHT ? 0.6F : 0.25F);
GlStateManager.rotatef(p_187453_1_ == HandSide.RIGHT ? 60F : 120F, 0F, 1F, 0F);
GlStateManager.rotatef(30F, 0F, 0F, -1F);
// End add
float f = MathHelper.sin(p_187453_2_ * p_187453_2_ * (float)Math.PI);
@@ -12,14 +12,14 @@ package vazkii.botania.client.core.handler;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.Gui;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.AbstractGui;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.renderer.BufferBuilder;
import net.minecraft.client.renderer.GlStateManager;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.client.event.RenderTooltipEvent;
@@ -68,7 +68,7 @@ public final class TooltipAdditionDisplayHandler {
int lexSlot = -1;
ItemStack lexiconStack = ItemStack.EMPTY;
for(int i = 0; i < InventoryPlayer.getHotbarSize(); i++) {
for(int i = 0; i < PlayerInventory.getHotbarSize(); i++) {
ItemStack stackAt = mc.player.inventory.getStackInSlot(i);
if(!stackAt.isEmpty() && stackAt.getItem() instanceof ILexicon && ((ILexicon) stackAt.getItem()).isKnowledgeUnlocked(stackAt, data.entry.getKnowledgeType())) {
lexiconStack = stackAt;
@@ -81,10 +81,10 @@ public final class TooltipAdditionDisplayHandler {
int x = tooltipX - 34;
GlStateManager.disableDepthTest();
Gui.drawRect(x - 4, tooltipY - 4, x + 20, tooltipY + 26, 0x44000000);
Gui.drawRect(x - 6, tooltipY - 6, x + 22, tooltipY + 28, 0x44000000);
AbstractGui.drawRect(x - 4, tooltipY - 4, x + 20, tooltipY + 26, 0x44000000);
AbstractGui.drawRect(x - 6, tooltipY - 6, x + 22, tooltipY + 28, 0x44000000);
if(ConfigHandler.CLIENT.useShiftForQuickLookup.get() ? GuiScreen.isShiftKeyDown() : GuiScreen.isCtrlKeyDown()) {
if(ConfigHandler.CLIENT.useShiftForQuickLookup.get() ? Screen.isShiftKeyDown() : Screen.isCtrlKeyDown()) {
lexiconLookupTime += ClientTickHandler.delta;
int cx = x + 8;
@@ -94,7 +94,7 @@ public final class TooltipAdditionDisplayHandler {
float angles = lexiconLookupTime / time * 360F;
GlStateManager.disableLighting();
GlStateManager.disableTexture2D();
GlStateManager.disableTexture();
GlStateManager.shadeModel(GL11.GL_SMOOTH);
GlStateManager.enableBlend();
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
@@ -114,7 +114,7 @@ public final class TooltipAdditionDisplayHandler {
Tessellator.getInstance().draw();
GlStateManager.disableBlend();
GlStateManager.enableTexture2D();
GlStateManager.enableTexture();
GlStateManager.shadeModel(GL11.GL_FLAT);
if(lexiconLookupTime >= time) {
@@ -154,10 +154,10 @@ public final class TooltipAdditionDisplayHandler {
float hueOff = (ClientTickHandler.ticksInGame + ClientTickHandler.partialTicks) * 0.01F;
GlStateManager.disableDepthTest();
Gui.drawRect(mouseX - 1, mouseY - height - 1, mouseX + width + 1, mouseY, 0xFF000000);
AbstractGui.drawRect(mouseX - 1, mouseY - height - 1, mouseX + width + 1, mouseY, 0xFF000000);
for(int i = 0; i < rainbowWidth; i++)
Gui.drawRect(mouseX + i, mouseY - height, mouseX + i + 1, mouseY, Color.HSBtoRGB(hueOff + huePer * i, 1F, 1F));
Gui.drawRect(mouseX + rainbowWidth, mouseY - height, mouseX + width, mouseY, 0xFF555555);
AbstractGui.drawRect(mouseX + i, mouseY - height, mouseX + i + 1, mouseY, Color.HSBtoRGB(hueOff + huePer * i, 1F, 1F));
AbstractGui.drawRect(mouseX + rainbowWidth, mouseY - height, mouseX + width, mouseY, 0xFF555555);
String rank = I18n.format("botania.rank" + level).replaceAll("&", "\u00a7");
@@ -178,9 +178,9 @@ public final class TooltipAdditionDisplayHandler {
int manaBarWidth = (int) Math.ceil(width * fraction);
GlStateManager.disableDepthTest();
Gui.drawRect(mouseX - 1, mouseY - height - 1, mouseX + width + 1, mouseY, 0xFF000000);
Gui.drawRect(mouseX, mouseY - height, mouseX + manaBarWidth, mouseY, Color.HSBtoRGB(0.528F, ((float) Math.sin((ClientTickHandler.ticksInGame + ClientTickHandler.partialTicks) * 0.2) + 1F) * 0.3F + 0.4F, 1F));
Gui.drawRect(mouseX + manaBarWidth, mouseY - height, mouseX + width, mouseY, 0xFF555555);
AbstractGui.drawRect(mouseX - 1, mouseY - height - 1, mouseX + width + 1, mouseY, 0xFF000000);
AbstractGui.drawRect(mouseX, mouseY - height, mouseX + manaBarWidth, mouseY, Color.HSBtoRGB(0.528F, ((float) Math.sin((ClientTickHandler.ticksInGame + ClientTickHandler.partialTicks) * 0.2) + 1F) * 0.3F + 0.4F, 1F));
AbstractGui.drawRect(mouseX + manaBarWidth, mouseY - height, mouseX + width, mouseY, 0xFF555555);
}
}
@@ -10,7 +10,8 @@
*/
package vazkii.botania.client.core.handler;
import net.minecraft.util.text.TextComponentTranslation;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraftforge.event.entity.player.ItemTooltipEvent;
import net.minecraftforge.eventbus.api.EventPriority;
import net.minecraftforge.eventbus.api.SubscribeEvent;
@@ -26,7 +27,7 @@ public final class TooltipHandler {
@SubscribeEvent(priority = EventPriority.HIGHEST)
public static void onTooltipEvent(ItemTooltipEvent event) {
if(event.getItemStack().hasTag() && ItemNBTHelper.getBoolean(event.getItemStack(), ItemKeepIvy.TAG_KEEP, false))
event.getToolTip().add(new TextComponentTranslation("botaniamisc.hasKeepIvy"));
event.getToolTip().add(new TranslationTextComponent("botaniamisc.hasKeepIvy"));
}
}
@@ -13,7 +13,7 @@ package vazkii.botania.client.core.helper;
import net.minecraft.client.renderer.BufferBuilder;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.client.renderer.texture.AtlasTexture;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
@@ -13,7 +13,7 @@ package vazkii.botania.client.core.helper;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.renderer.BufferBuilder;
import net.minecraft.client.renderer.GlStateManager;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.client.settings.KeyBinding;
@@ -105,7 +105,7 @@ public final class RenderHelper {
float var12 = (par6 >> 16 & 255) / 255F;
float var13 = (par6 >> 8 & 255) / 255F;
float var14 = (par6 & 255) / 255F;
GlStateManager.disableTexture2D();
GlStateManager.disableTexture();
GlStateManager.enableBlend();
GlStateManager.disableAlphaTest();
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
@@ -120,7 +120,7 @@ public final class RenderHelper {
GlStateManager.shadeModel(GL11.GL_FLAT);
GlStateManager.disableBlend();
GlStateManager.enableAlphaTest();
GlStateManager.enableTexture2D();
GlStateManager.enableTexture();
}
public static void drawTexturedModalRect(int par1, int par2, float z, int par3, int par4, int par5, int par6) {
@@ -151,7 +151,7 @@ public final class RenderHelper {
Random random = new Random(seed);
GlStateManager.pushMatrix();
GlStateManager.disableTexture2D();
GlStateManager.disableTexture();
GlStateManager.shadeModel(GL11.GL_SMOOTH);
GlStateManager.enableBlend();
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
@@ -186,7 +186,7 @@ public final class RenderHelper {
GlStateManager.disableBlend();
GlStateManager.shadeModel(GL11.GL_FLAT);
GlStateManager.color4f(1F, 1F, 1F, 1F);
GlStateManager.enableTexture2D();
GlStateManager.enableTexture();
GlStateManager.enableAlphaTest();
GlStateManager.popMatrix();
}
@@ -212,7 +212,7 @@ public final class RenderHelper {
float a = 0.5F + 0.2F * ((float) Math.cos((double) (ClientTickHandler.ticksInGame + ClientTickHandler.partialTicks) / 10) * 0.5F + 0.5F);
GlStateManager.disableLighting();
GlStateManager.disableTexture2D();
GlStateManager.disableTexture();
GlStateManager.shadeModel(GL11.GL_SMOOTH);
GlStateManager.enableBlend();
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
@@ -234,7 +234,7 @@ public final class RenderHelper {
Tessellator.getInstance().draw();
GlStateManager.disableBlend();
GlStateManager.enableTexture2D();
GlStateManager.enableTexture();
GlStateManager.shadeModel(GL11.GL_FLAT);
GL11.glDisable(GL11.GL_STENCIL_TEST);
}
@@ -11,7 +11,7 @@
package vazkii.botania.client.core.helper;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GlStateManager;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.resources.IResourceManager;
@@ -12,16 +12,19 @@ package vazkii.botania.client.core.proxy;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.entity.RenderPlayer;
import net.minecraft.client.renderer.entity.model.ModelBiped;
import net.minecraft.client.renderer.entity.PlayerRenderer;
import net.minecraft.client.renderer.entity.PlayerRenderer;
import net.minecraft.client.renderer.entity.model.BipedModel;
import net.minecraft.client.renderer.entity.model.BipedModel;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.client.renderer.vertex.VertexFormat;
import net.minecraft.client.settings.KeyBinding;
import net.minecraft.client.util.InputMappings;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.RayTraceResult;
import net.minecraft.world.World;
@@ -130,7 +133,7 @@ public class ClientProxy implements IProxy {
public static boolean jingleTheBells = false;
public static boolean dootDoot = false;
private static final ModelBiped EMPTY_MODEL = new ModelBiped();
private static final BipedModel EMPTY_MODEL = new BipedModel();
static {
EMPTY_MODEL.setVisible(false);
}
@@ -183,8 +186,8 @@ public class ClientProxy implements IProxy {
}
private void initAuxiliaryRender() {
Map<String, RenderPlayer> skinMap = Minecraft.getInstance().getRenderManager().getSkinMap();
RenderPlayer render;
Map<String, PlayerRenderer> skinMap = Minecraft.getInstance().getRenderManager().getSkinMap();
PlayerRenderer render;
render = skinMap.get("default");
render.addLayer(new ContributorFancinessHandler());
if(Botania.curiosLoaded)
@@ -217,12 +220,12 @@ public class ClientProxy implements IProxy {
}
@Override
public boolean isTheClientPlayer(EntityLivingBase entity) {
public boolean isTheClientPlayer(LivingEntity entity) {
return entity == Minecraft.getInstance().player;
}
@Override
public EntityPlayer getClientPlayer() {
public PlayerEntity getClientPlayer() {
return Minecraft.getInstance().player;
}
@@ -289,7 +292,7 @@ public class ClientProxy implements IProxy {
public void removeSextantMultiblock() {
MultiblockSet set = MultiblockRenderHandler.currentMultiblock;
if(set != null) {
Multiblock mb = set.getForFacing(EnumFacing.SOUTH);
Multiblock mb = set.getForFacing(Direction.SOUTH);
if(mb instanceof MultiblockSextant)
MultiblockRenderHandler.setMultiblock(null);
}
@@ -383,7 +386,7 @@ public class ClientProxy implements IProxy {
}
@Override
public ModelBiped getEmptyModelBiped() {
public BipedModel getEmptyModelBiped() {
return EMPTY_MODEL;
}
}
@@ -11,7 +11,7 @@
package vazkii.botania.client.core.proxy;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.screen.Screen;
import net.minecraftforge.fml.client.IModGuiFactory;
import vazkii.botania.client.gui.GuiBotaniaConfig;
@@ -28,7 +28,7 @@ public class GuiFactory implements IModGuiFactory {
}
@Override
public GuiScreen createConfigGui(GuiScreen parentScreen) {
public Screen createConfigGui(Screen parentScreen) {
return new GuiBotaniaConfig(parentScreen);
}
@@ -13,11 +13,12 @@ package vazkii.botania.client.fx;
import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.Particle;
import net.minecraft.client.renderer.BufferBuilder;
import net.minecraft.client.renderer.GlStateManager;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.entity.Entity;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
@@ -175,37 +176,37 @@ public class FXSparkle extends Particle {
// Botania - change collision box list check to !airblock check
if (!world.isAirBlock(blockpos))
{
EnumFacing enumfacing = EnumFacing.UP;
Direction enumfacing = Direction.UP;
double d3 = Double.MAX_VALUE;
if (!world.isBlockFullCube(blockpos.west()) && d0 < d3)
{
d3 = d0;
enumfacing = EnumFacing.WEST;
enumfacing = Direction.WEST;
}
if (!world.isBlockFullCube(blockpos.east()) && 1.0D - d0 < d3)
{
d3 = 1.0D - d0;
enumfacing = EnumFacing.EAST;
enumfacing = Direction.EAST;
}
if (!world.isBlockFullCube(blockpos.north()) && d2 < d3)
{
d3 = d2;
enumfacing = EnumFacing.NORTH;
enumfacing = Direction.NORTH;
}
if (!world.isBlockFullCube(blockpos.south()) && 1.0D - d2 < d3)
{
d3 = 1.0D - d2;
enumfacing = EnumFacing.SOUTH;
enumfacing = Direction.SOUTH;
}
if (!world.isBlockFullCube(blockpos.up()) && 1.0D - d1 < d3)
{
d3 = 1.0D - d1;
enumfacing = EnumFacing.UP;
enumfacing = Direction.UP;
}
float f = rand.nextFloat() * 0.05F + 0.025F; // Botania - made multiplier and add both smaller
@@ -213,19 +214,19 @@ public class FXSparkle extends Particle {
float secondary = (rand.nextFloat() - rand.nextFloat()) * 0.1F; // Botania - Make and use secondary movement variables below
float secondary2 = (rand.nextFloat() - rand.nextFloat()) * 0.1F;
if (enumfacing.getAxis() == EnumFacing.Axis.X)
if (enumfacing.getAxis() == Direction.Axis.X)
{
motionX = f1 * f;
motionY = secondary;
motionZ = secondary2;
}
else if (enumfacing.getAxis() == EnumFacing.Axis.Y)
else if (enumfacing.getAxis() == Direction.Axis.Y)
{
motionY = f1 * f;
motionX = secondary;
motionZ = secondary2;
}
else if (enumfacing.getAxis() == EnumFacing.Axis.Z)
else if (enumfacing.getAxis() == Direction.Axis.Z)
{
motionZ = f1 * f;
motionX = secondary;
@@ -13,7 +13,7 @@ package vazkii.botania.client.fx;
import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.Particle;
import net.minecraft.client.renderer.BufferBuilder;
import net.minecraft.client.renderer.GlStateManager;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.entity.Entity;
@@ -12,7 +12,7 @@
package vazkii.botania.client.fx;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GlStateManager;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.profiler.Profiler;
import org.lwjgl.opengl.GL11;
@@ -10,14 +10,12 @@
*/
package vazkii.botania.client.gui;
import net.minecraft.client.gui.GuiScreen;
import vazkii.botania.common.core.handler.ConfigHandler;
import vazkii.botania.common.lib.LibMisc;
import net.minecraft.client.gui.screen.Screen;
// todo 1.13
public class GuiBotaniaConfig extends /*GuiConfig*/ GuiScreen {
public class GuiBotaniaConfig extends /*GuiConfig*/ Screen {
public GuiBotaniaConfig(GuiScreen parentScreen) {
public GuiBotaniaConfig(Screen parentScreen) {
// super(parentScreen, new ConfigElement(ConfigHandler.config.getCategory(Configuration.CATEGORY_GENERAL)).getChildElements(), LibMisc.MOD_ID, false, false, GuiConfig.getAbridgedConfigPath(ConfigHandler.config.toString()));
}
@@ -10,9 +10,9 @@
*/
package vazkii.botania.client.gui;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
import net.minecraft.inventory.container.Slot;
import net.minecraft.item.ItemStack;
public class SlotLocked extends Slot {
@@ -22,7 +22,7 @@ public class SlotLocked extends Slot {
}
@Override
public boolean canTakeStack(EntityPlayer player) {
public boolean canTakeStack(PlayerEntity player) {
return false;
}
@@ -11,10 +11,12 @@
package vazkii.botania.client.gui.bag;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.container.Container;
import net.minecraft.inventory.container.Slot;
import net.minecraft.inventory.container.Slot;
import net.minecraft.item.ItemStack;
import net.minecraftforge.items.SlotItemHandler;
import vazkii.botania.client.gui.SlotLocked;
@@ -26,7 +28,7 @@ public class ContainerFlowerBag extends Container {
private final InventoryFlowerBag flowerBagInv;
public ContainerFlowerBag(InventoryPlayer playerInv, InventoryFlowerBag flowerBagInv) {
public ContainerFlowerBag(PlayerInventory playerInv, InventoryFlowerBag flowerBagInv) {
int i;
int j;
@@ -51,14 +53,14 @@ public class ContainerFlowerBag extends Container {
}
@Override
public boolean canInteractWith(@Nonnull EntityPlayer player) {
public boolean canInteractWith(@Nonnull PlayerEntity player) {
return player.getHeldItemMainhand() == flowerBagInv.bag
|| player.getHeldItemOffhand() == flowerBagInv.bag;
}
@Nonnull
@Override
public ItemStack transferStackInSlot(EntityPlayer player, int slotIndex) {
public ItemStack transferStackInSlot(PlayerEntity player, int slotIndex) {
ItemStack itemstack = ItemStack.EMPTY;
Slot slot = inventorySlots.get(slotIndex);
@@ -10,13 +10,16 @@
*/
package vazkii.botania.client.gui.bag;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.gui.screen.inventory.ContainerScreen;
import net.minecraft.client.gui.screen.inventory.ContainerScreen;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Slot;
import net.minecraft.item.EnumDyeColor;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.Slot;
import net.minecraft.inventory.container.Slot;
import net.minecraft.item.DyeColor;
import net.minecraft.item.DyeColor;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.items.SlotItemHandler;
@@ -25,11 +28,11 @@ import vazkii.botania.common.block.ModBlocks;
import java.util.List;
public class GuiFlowerBag extends GuiContainer {
public class GuiFlowerBag extends ContainerScreen {
private static final ResourceLocation texture = new ResourceLocation(LibResources.GUI_FLOWER_BAG);
public GuiFlowerBag(InventoryPlayer playerInv, InventoryFlowerBag flowerBagInv) {
public GuiFlowerBag(PlayerInventory playerInv, InventoryFlowerBag flowerBagInv) {
super(new ContainerFlowerBag(playerInv, flowerBagInv));
}
@@ -60,7 +63,7 @@ public class GuiFlowerBag extends GuiContainer {
if(slot instanceof SlotItemHandler) {
SlotItemHandler slotf = (SlotItemHandler) slot;
if(!slotf.getHasStack()) {
EnumDyeColor color = EnumDyeColor.byId(slotf.getSlotIndex());
DyeColor color = DyeColor.byId(slotf.getSlotIndex());
ItemStack stack = new ItemStack(ModBlocks.getFlower(color));
int x = guiLeft + slotf.xPos;
int y = guiTop + slotf.yPos;
@@ -10,10 +10,12 @@
*/
package vazkii.botania.client.gui.box;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.container.Container;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
import net.minecraft.inventory.container.Slot;
import net.minecraft.inventory.container.Container;
import net.minecraft.inventory.container.Slot;
import net.minecraft.item.ItemStack;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
@@ -30,7 +32,7 @@ public class ContainerBaubleBox extends Container {
private final InventoryBaubleBox baubleBoxInv;
public IItemHandlerModifiable baubles;
public ContainerBaubleBox(EntityPlayer player, InventoryBaubleBox boxInv) {
public ContainerBaubleBox(PlayerEntity player, InventoryBaubleBox boxInv) {
int i;
int j;
@@ -69,7 +71,7 @@ public class ContainerBaubleBox extends Container {
}
@Override
public boolean canInteractWith(@Nonnull EntityPlayer player) {
public boolean canInteractWith(@Nonnull PlayerEntity player) {
return player.getHeldItemMainhand() == baubleBoxInv.box
|| player.getHeldItemOffhand() == baubleBoxInv.box;
}
@@ -83,7 +85,7 @@ public class ContainerBaubleBox extends Container {
@Nonnull
@Override
public ItemStack transferStackInSlot(EntityPlayer player, int slotIndex) {
public ItemStack transferStackInSlot(PlayerEntity player, int slotIndex) {
ItemStack itemstack = ItemStack.EMPTY;
Slot slot = inventorySlots.get(slotIndex);
@@ -10,18 +10,20 @@
*/
package vazkii.botania.client.gui.box;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Slot;
import net.minecraft.client.gui.screen.inventory.ContainerScreen;
import net.minecraft.client.gui.screen.inventory.ContainerScreen;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.container.Slot;
import net.minecraft.inventory.container.Slot;
import net.minecraft.util.ResourceLocation;
import vazkii.botania.client.lib.LibResources;
public class GuiBaubleBox extends GuiContainer {
public class GuiBaubleBox extends ContainerScreen {
private static final ResourceLocation texture = new ResourceLocation(LibResources.GUI_BAUBLE_BOX);
public GuiBaubleBox(EntityPlayer player, InventoryBaubleBox box) {
public GuiBaubleBox(PlayerEntity player, InventoryBaubleBox box) {
super(new ContainerBaubleBox(player, box));
}
@@ -10,25 +10,26 @@
*/
package vazkii.botania.client.gui.crafting;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.ContainerWorkbench;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.inventory.Slot;
import net.minecraft.inventory.SlotCrafting;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.WorkbenchContainer;
import net.minecraft.inventory.CraftingInventory;
import net.minecraft.inventory.container.Slot;
import net.minecraft.inventory.container.CraftingResultSlot;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import javax.annotation.Nonnull;
public class ContainerCraftingHalo extends ContainerWorkbench {
public class ContainerCraftingHalo extends WorkbenchContainer {
public ContainerCraftingHalo(InventoryPlayer playerInv, World world) {
public ContainerCraftingHalo(PlayerInventory playerInv, World world) {
super(playerInv, world, BlockPos.ORIGIN);
}
@Override
public boolean canInteractWith(@Nonnull EntityPlayer player) {
public boolean canInteractWith(@Nonnull PlayerEntity player) {
return true;
}
}
@@ -13,13 +13,16 @@ package vazkii.botania.client.gui.lexicon;
import net.minecraft.client.Minecraft;
import net.minecraft.client.audio.SimpleSound;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.widget.button.Button;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.widget.button.Button;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.resources.I18n;
import net.minecraft.client.util.InputMappings;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.SharedConstants;
import net.minecraft.util.text.TextFormatting;
@@ -65,7 +68,7 @@ import java.util.List;
import java.util.Map;
import java.util.Queue;
public class GuiLexicon extends GuiScreen {
public class GuiLexicon extends Screen {
public static GuiLexicon currentOpenLexicon = new GuiLexicon();
public static ItemStack stackUsed = ItemStack.EMPTY;
@@ -506,7 +509,7 @@ public class GuiLexicon extends GuiScreen {
LexiconEntry entry = tutorial.peek();
LexiconCategory category = entry.category;
for(GuiButton button : buttons)
for(Button button : buttons)
if(button instanceof GuiButtonCategory) {
GuiButtonCategory catButton = (GuiButtonCategory) button;
if(catButton.getCategory() == category) {
@@ -516,7 +519,7 @@ public class GuiLexicon extends GuiScreen {
}
}
public void orientTutorialArrowWithButton(GuiButton button) {
public void orientTutorialArrowWithButton(Button button) {
tutorialArrowX = button.x - TUTORIAL_ARROW_WIDTH;
tutorialArrowY = button.y - TUTORIAL_ARROW_HEIGHT;
}
@@ -581,7 +584,7 @@ public class GuiLexicon extends GuiScreen {
return false;
}
public static GuiLexicon create(NBTTagCompound cmp) {
public static GuiLexicon create(CompoundNBT cmp) {
String type = cmp.getString(TAG_TYPE);
try {
GuiLexicon lex = (GuiLexicon) Class.forName(type).newInstance();
@@ -596,7 +599,7 @@ public class GuiLexicon extends GuiScreen {
}
}
public void serialize(NBTTagCompound cmp) {
public void serialize(CompoundNBT cmp) {
cmp.putString(TAG_TYPE, getClass().getName());
}
@@ -604,7 +607,7 @@ public class GuiLexicon extends GuiScreen {
return "index";
}
public void load(NBTTagCompound cmp) {}
public void load(CompoundNBT cmp) {}
public GuiLexicon copy() {
return new GuiLexicon();
@@ -10,11 +10,12 @@
*/
package vazkii.botania.client.gui.lexicon;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.gui.widget.button.Button;
import net.minecraft.client.gui.widget.button.Button;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.resources.I18n;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.util.text.TextFormatting;
import org.lwjgl.glfw.GLFW;
import vazkii.botania.client.challenge.Challenge;
@@ -34,7 +35,7 @@ public class GuiLexiconChallenge extends GuiLexicon implements IParented {
private Challenge challenge;
private GuiLexicon parent;
private GuiButton backButton, completeButton;
private Button backButton, completeButton;
public GuiLexiconChallenge(GuiLexicon parent, Challenge challenge) {
this.parent = parent;
@@ -59,7 +60,7 @@ public class GuiLexiconChallenge extends GuiLexicon implements IParented {
ClientTickHandler.notifyPageChange();
}
});
buttons.add(completeButton = new GuiButton(13, left + 20, top + guiHeight - 35, guiWidth - 40, 20, "") {
buttons.add(completeButton = new Button(13, left + 20, top + guiHeight - 35, guiWidth - 40, 20, "") {
@Override
public void onClick(double mouseX, double mouseY) {
super.onClick(mouseX, mouseY);
@@ -156,13 +157,13 @@ public class GuiLexiconChallenge extends GuiLexicon implements IParented {
}
@Override
public void serialize(NBTTagCompound cmp) {
public void serialize(CompoundNBT cmp) {
super.serialize(cmp);
cmp.putString(TAG_CHALLENGE, challenge.unlocalizedName);
}
@Override
public void load(NBTTagCompound cmp) {
public void load(CompoundNBT cmp) {
super.load(cmp);
String challengeName = cmp.getString(TAG_CHALLENGE);
challenge = ModChallenges.challengeLookup.get(challengeName);
@@ -10,7 +10,7 @@
*/
package vazkii.botania.client.gui.lexicon;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.widget.button.Button;
import net.minecraft.client.resources.I18n;
import net.minecraft.util.text.TextFormatting;
import org.lwjgl.glfw.GLFW;
@@ -27,7 +27,7 @@ import java.util.List;
public class GuiLexiconChallengesList extends GuiLexicon implements IParented {
private GuiLexicon parent;
private GuiButton backButton;
private Button backButton;
public GuiLexiconChallengesList() {
parent = new GuiLexicon();
@@ -11,12 +11,14 @@
package vazkii.botania.client.gui.lexicon;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.widget.button.Button;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.widget.button.Button;
import net.minecraft.client.resources.I18n;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.util.text.Style;
import net.minecraft.util.text.TextComponentTranslation;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.util.text.TextFormatting;
import org.lwjgl.glfw.GLFW;
import vazkii.botania.api.BotaniaAPI;
@@ -42,18 +44,18 @@ public class GuiLexiconEntry extends GuiLexicon implements IGuiLexiconEntry, IPa
public int page = 0;
private boolean firstEntry = false;
LexiconEntry entry;
private GuiScreen parent;
private Screen parent;
private String title;
private String subtitle;
private GuiButton leftButton, rightButton, backButton;
private Button leftButton, rightButton, backButton;
public GuiLexiconEntry() {
parent = new GuiLexicon();
setTitle();
}
public GuiLexiconEntry(LexiconEntry entry, GuiScreen parent) {
public GuiLexiconEntry(LexiconEntry entry, Screen parent) {
this.entry = entry;
this.parent = parent;
setTitle();
@@ -80,7 +82,7 @@ public class GuiLexiconEntry extends GuiLexicon implements IGuiLexiconEntry, IPa
public void onClick(double mouseX, double mouseY) {
super.onClick(mouseX, mouseY);
entry.pages.get(page).onClosed(GuiLexiconEntry.this);
mc.displayGuiScreen(GuiScreen.isShiftKeyDown() ? new GuiLexicon() : parent);
mc.displayGuiScreen(Screen.isShiftKeyDown() ? new GuiLexicon() : parent);
ClientTickHandler.notifyPageChange();
}
});
@@ -210,7 +212,7 @@ public class GuiLexiconEntry extends GuiLexicon implements IGuiLexiconEntry, IPa
tutorial.poll();
positionTutorialArrow();
if(tutorial.isEmpty()) {
mc.player.sendMessage(new TextComponentTranslation("botaniamisc.tutorialEnded").setStyle(new Style().setColor(TextFormatting.RED)));
mc.player.sendMessage(new TranslationTextComponent("botaniamisc.tutorialEnded").setStyle(new Style().setColor(TextFormatting.RED)));
hasTutorialArrow = false;
}
}
@@ -359,7 +361,7 @@ public class GuiLexiconEntry extends GuiLexicon implements IGuiLexiconEntry, IPa
}
@Override
public List<GuiButton> getButtonList() {
public List<Button> getButtonList() {
return buttons;
}
@@ -379,14 +381,14 @@ public class GuiLexiconEntry extends GuiLexicon implements IGuiLexiconEntry, IPa
}
@Override
public void serialize(NBTTagCompound cmp) {
public void serialize(CompoundNBT cmp) {
super.serialize(cmp);
cmp.putString(TAG_ENTRY, entry.getUnlocalizedName());
cmp.putInt(TAG_PAGE, page);
}
@Override
public void load(NBTTagCompound cmp) {
public void load(CompoundNBT cmp) {
super.load(cmp);
String entryStr = cmp.getString(TAG_ENTRY);
@@ -11,7 +11,7 @@
package vazkii.botania.client.gui.lexicon;
import net.minecraft.client.resources.I18n;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.CompoundNBT;
import vazkii.botania.api.lexicon.ILexicon;
import vazkii.botania.api.lexicon.LexiconEntry;
@@ -49,7 +49,7 @@ public class GuiLexiconHistory extends GuiLexiconIndex {
}
@Override
public void load(NBTTagCompound cmp) {}
public void load(CompoundNBT cmp) {}
@Override
public String getNotesKey() {
@@ -10,14 +10,17 @@
*/
package vazkii.botania.client.gui.lexicon;
import net.minecraft.client.gui.Gui;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiTextField;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.gui.AbstractGui;
import net.minecraft.client.gui.widget.TextFieldWidget;
import net.minecraft.client.gui.widget.button.Button;
import net.minecraft.client.gui.widget.TextFieldWidget;
import net.minecraft.client.gui.widget.button.Button;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.resources.I18n;
import net.minecraft.init.Items;
import net.minecraft.item.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.util.text.TextFormatting;
import org.lwjgl.glfw.GLFW;
import vazkii.botania.api.BotaniaAPI;
@@ -45,11 +48,11 @@ public class GuiLexiconIndex extends GuiLexicon implements IParented {
private int tutPage = -1;
private GuiButton leftButton, rightButton, backButton;
private Button leftButton, rightButton, backButton;
private GuiLexicon parent;
GuiTextField searchField;
TextFieldWidget searchField;
private GuiButton currentButton;
private Button currentButton;
private LexiconEntry currentEntry;
private float infoTime;
@@ -125,7 +128,7 @@ public class GuiLexiconIndex extends GuiLexicon implements IParented {
}
});
searchField = new GuiTextField(15, fontRenderer, left + guiWidth / 2 + 28, top + guiHeight + 6, 200, 10);
searchField = new TextFieldWidget(15, fontRenderer, left + guiWidth / 2 + 28, top + guiHeight + 6, 200, 10);
searchField.setCanLoseFocus(false);
searchField.setFocused(true);
searchField.setEnableBackgroundDrawing(false);
@@ -244,8 +247,8 @@ public class GuiLexiconIndex extends GuiLexicon implements IParented {
GlStateManager.pushMatrix();
GlStateManager.translatef(x, y, 0);
GlStateManager.scalef(fract, 1F, 1F);
Gui.drawRect(12, -30, width + 20, -2, 0x44000000);
Gui.drawRect(10, -32, width + 22, -2, 0x44000000);
AbstractGui.drawRect(12, -30, width + 20, -2, 0x44000000);
AbstractGui.drawRect(10, -32, width + 22, -2, 0x44000000);
drawBookmark(width / 2 + 16, -8, s, true, 0xFFFFFF, 180);
@@ -287,7 +290,7 @@ public class GuiLexiconIndex extends GuiLexicon implements IParented {
return;
}
for(GuiButton button : buttons) {
for(Button button : buttons) {
int id = button.id;
int index = id + page * 12;
if(index >= entriesToDisplay.size())
@@ -434,14 +437,14 @@ public class GuiLexiconIndex extends GuiLexicon implements IParented {
}
@Override
public void serialize(NBTTagCompound cmp) {
public void serialize(CompoundNBT cmp) {
super.serialize(cmp);
cmp.putString(TAG_CATEGORY, category == null ? "" : category.getUnlocalizedName());
cmp.putInt(TAG_PAGE, page);
}
@Override
public void load(NBTTagCompound cmp) {
public void load(CompoundNBT cmp) {
super.load(cmp);
String categoryStr = cmp.getString(TAG_CATEGORY);
if(categoryStr.isEmpty())
@@ -11,8 +11,9 @@
package vazkii.botania.client.gui.lexicon.button;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.advancements.GuiScreenAdvancements;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.gui.advancements.AdvancementsScreen;
import net.minecraft.client.gui.advancements.AdvancementsScreen;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.resources.I18n;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.TextFormatting;
@@ -34,7 +35,7 @@ public class GuiButtonAchievement extends GuiButtonLexicon {
public void onClick(double mouseX, double mouseY) {
super.onClick(mouseX, mouseY);
if(Minecraft.getInstance().player != null) {
GuiScreenAdvancements gui = new GuiScreenAdvancements(Minecraft.getInstance().player.connection.getAdvancementManager());
AdvancementsScreen gui = new AdvancementsScreen(Minecraft.getInstance().player.connection.getAdvancementManager());
Minecraft.getInstance().displayGuiScreen(gui);
ResourceLocation tab = new ResourceLocation(LibMisc.MOD_ID, "main/root");
gui.setSelectedTab(Minecraft.getInstance().player.connection.getAdvancementManager().getAdvancementList().getAdvancement(tab));
@@ -11,7 +11,7 @@
package vazkii.botania.client.gui.lexicon.button;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GlStateManager;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.resources.I18n;
import vazkii.botania.client.core.helper.RenderHelper;
import vazkii.botania.client.gui.lexicon.GuiLexicon;
@@ -1,7 +1,8 @@
package vazkii.botania.client.gui.lexicon.button;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.resources.I18n;
import net.minecraft.util.text.TextFormatting;
import vazkii.botania.client.core.handler.ClientTickHandler;
@@ -35,7 +36,7 @@ public class GuiButtonBookmark extends GuiButtonLexicon {
modified = true;
}
} else {
if(GuiScreen.isShiftKeyDown()) {
if(Screen.isShiftKeyDown()) {
GuiLexicon.bookmarks.remove(i);
GuiLexicon.bookmarkKeys.remove(i);
@@ -11,7 +11,7 @@
package vazkii.botania.client.gui.lexicon.button;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GlStateManager;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.client.resources.I18n;
@@ -57,7 +57,7 @@ public class GuiButtonCategory extends GuiButtonLexicon {
OpenGlHelper.glActiveTexture(ARBMultitexture.GL_TEXTURE0_ARB + ConfigHandler.CLIENT.glSecondaryTextureUnit.get());
GlStateManager.enableTexture2D();
GlStateManager.enableTexture();
GL11.glGetInteger(GL11.GL_TEXTURE_BINDING_2D);
GL11.glBindTexture(GL11.GL_TEXTURE_2D, r.getTexture(stencilResource).getGlTextureId());
@@ -11,7 +11,7 @@
package vazkii.botania.client.gui.lexicon.button;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GlStateManager;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.resources.I18n;
import net.minecraft.util.text.TextFormatting;
@@ -11,7 +11,7 @@
package vazkii.botania.client.gui.lexicon.button;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GlStateManager;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.resources.I18n;
import net.minecraft.util.text.TextFormatting;
import vazkii.botania.client.core.helper.RenderHelper;
Loaded 100 of 650 files, more files were not shown because too many files have changed in this diff. Show more