mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-21 04:32:24 +00:00
Generics for everyone \o/
This commit is contained in:
1 parent
ac9344cbda
commit
23ed2dcaea
55 files changed
+164
-163
No files matched your search
@@ -45,8 +45,8 @@ public class GeneArrayItem implements INbtReadable, INbtWritable, IGeneItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getInfo(final List list) {
|
||||
final List<Object> totalList = new ArrayList<>();
|
||||
public void getInfo(final List<String> list) {
|
||||
final List<String> totalList = new ArrayList<>();
|
||||
for (IGene gene : this.genes) {
|
||||
final String chromosomeName = this.getBreedingSystem().getChromosomeName(gene.getChromosome());
|
||||
totalList.add(TextFormatting.GOLD + chromosomeName + TextFormatting.GRAY + ": " + gene.getName());
|
||||
|
||||
@@ -50,7 +50,7 @@ public class GeneItem implements INbtReadable, INbtWritable, IGeneItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getInfo(final List list) {
|
||||
public void getInfo(final List<String> list) {
|
||||
final String chromosomeName = this.getBreedingSystem().getChromosomeName(this.gene.getChromosome());
|
||||
list.add(TextFormatting.GOLD + chromosomeName + TextFormatting.GRAY + ": " + this.gene.getName());
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.util.List;
|
||||
public interface IGeneItem {
|
||||
ISpeciesRoot getSpeciesRoot();
|
||||
|
||||
void getInfo(final List p0);
|
||||
void getInfo(final List<String> p0);
|
||||
|
||||
int getColour(final int p0);
|
||||
|
||||
|
||||
+2
-3
@@ -10,10 +10,9 @@ import mezz.jei.api.gui.IGuiItemStackGroup;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.recipe.BlankRecipeCategory;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
public class IncubatorRecipeCategory extends BlankRecipeCategory {
|
||||
public class IncubatorRecipeCategory extends BlankRecipeCategory<IncubatorRecipeWrapper> {
|
||||
private final IDrawableAnimated arrowAnimated;
|
||||
|
||||
public IncubatorRecipeCategory() {
|
||||
@@ -51,7 +50,7 @@ public class IncubatorRecipeCategory extends BlankRecipeCategory {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper, IIngredients ingredients) {
|
||||
public void setRecipe(IRecipeLayout recipeLayout, IncubatorRecipeWrapper recipeWrapper, IIngredients ingredients) {
|
||||
IDrawable tankOverlay = GeneticsJeiPlugin.drawables.getTankOverlay();
|
||||
IGuiFluidStackGroup fluidStacks = recipeLayout.getFluidStacks();
|
||||
fluidStacks.init(Incubator.TANK_INPUT, true, 1, 1, 16, 58, 50, false, tankOverlay);
|
||||
|
||||
@@ -35,7 +35,7 @@ public enum GeneticsItems implements IItemMiscProvider {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(final List par3List) {
|
||||
public void addInformation(final List<String> par3List) {
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -34,14 +34,15 @@ public abstract class ItemGene extends ItemCore {
|
||||
}
|
||||
|
||||
public int getCharges(final ItemStack stack) {
|
||||
return (stack == null) ? 0 : (stack.getItem().getMaxDamage() - stack.getItemDamage());
|
||||
return (stack == null) ? 0 : (stack.getMaxDamage() - stack.getItemDamage());
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(final ItemStack itemstack, final EntityPlayer entityPlayer, final List list, final boolean advanced) {
|
||||
public void addInformation(final ItemStack itemstack, final EntityPlayer entityPlayer, final List<String> list, final boolean advanced) {
|
||||
super.addInformation(itemstack, entityPlayer, list, advanced);
|
||||
final int damage = this.getMaxDamage() - itemstack.getItemDamage();
|
||||
|
||||
final int damage = itemstack.getMaxDamage() - itemstack.getItemDamage();
|
||||
if (damage == 0) {
|
||||
list.add(Binnie.LANGUAGE.localise("genetic.item.gene.empty"));
|
||||
} else if (damage == 1) {
|
||||
|
||||
@@ -43,7 +43,7 @@ public class ItemSequence extends ItemCore implements IItemAnalysable, IItemChar
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(final ItemStack itemstack, final EntityPlayer entityPlayer, final List list, final boolean par4) {
|
||||
public void addInformation(final ItemStack itemstack, final EntityPlayer entityPlayer, final List<String> list, final boolean par4) {
|
||||
super.addInformation(itemstack, entityPlayer, list, par4);
|
||||
list.add(Genetics.proxy.localise("item.sequence." + (5 - itemstack.getItemDamage() % 6)));
|
||||
final SequencerItem gene = new SequencerItem(itemstack);
|
||||
|
||||
@@ -29,7 +29,7 @@ public class ItemSerum extends ItemGene implements IItemSerum {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addInformation(final ItemStack itemstack, final EntityPlayer entityPlayer, final List list, final boolean par4) {
|
||||
public void addInformation(final ItemStack itemstack, final EntityPlayer entityPlayer, final List<String> list, final boolean par4) {
|
||||
super.addInformation(itemstack, entityPlayer, list, par4);
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ public class ItemSerumArray extends ItemGene implements IItemSerum {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addInformation(final ItemStack itemstack, final EntityPlayer entityPlayer, final List list, final boolean par4) {
|
||||
public void addInformation(final ItemStack itemstack, final EntityPlayer entityPlayer, final List<String> list, final boolean par4) {
|
||||
super.addInformation(itemstack, entityPlayer, list, par4);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user