mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-26 23:13:09 +00:00
More fixes
This commit is contained in:
1 parent
5c145362d8
commit
bf0e3bb1c7
74 files changed
+165
-279
No files matched your search
@@ -16,6 +16,9 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraft.util.text.translation.I18n;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.api.subtile.SubTileEntity;
|
||||
import vazkii.botania.api.subtile.SubTileFunctional;
|
||||
@@ -24,7 +27,7 @@ import vazkii.botania.api.subtile.SubTileGenerating;
|
||||
/**
|
||||
* A basic (and fallback) implementation of SubTileSignature.
|
||||
*/
|
||||
public class BasicSignature extends SubTileSignature {
|
||||
public class BasicSignature implements SubTileSignature {
|
||||
|
||||
private final String name;
|
||||
|
||||
@@ -61,8 +64,9 @@ public class BasicSignature extends SubTileSignature {
|
||||
return "botania.flowerType.misc";
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addTooltip(ItemStack stack, EntityPlayer player, List<String> tooltip) {
|
||||
public void addTooltip(ItemStack stack, World world, List<String> tooltip) {
|
||||
tooltip.add(TextFormatting.BLUE + I18n.translateToLocal(getType()));
|
||||
}
|
||||
|
||||
|
||||
@@ -14,29 +14,33 @@ import java.util.List;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* A singleton instance for a SubTileEntity, this is called for a few methods.
|
||||
*/
|
||||
public abstract class SubTileSignature {
|
||||
public interface SubTileSignature {
|
||||
|
||||
public static final String SPECIAL_FLOWER_PREFIX = "flower.";
|
||||
|
||||
/**
|
||||
* Gets the display name for the flower item.
|
||||
*/
|
||||
public abstract String getUnlocalizedNameForStack(ItemStack stack);
|
||||
String getUnlocalizedNameForStack(ItemStack stack);
|
||||
|
||||
/**
|
||||
* Gets the lore text for the flower item, displayed in the item's tooltip.
|
||||
* If you do not want a reference return a key that does not have localization such
|
||||
* as "botaniamisc.noloc".
|
||||
*/
|
||||
public abstract String getUnlocalizedLoreTextForStack(ItemStack stack);
|
||||
String getUnlocalizedLoreTextForStack(ItemStack stack);
|
||||
|
||||
/**
|
||||
* Adds additional text to the tooltip. This text is added after getUnlocalizedLoreTextForStack.
|
||||
*/
|
||||
public void addTooltip(ItemStack stack, EntityPlayer player, List<String> tooltip) {}
|
||||
@SideOnly(Side.CLIENT)
|
||||
default void addTooltip(ItemStack stack, World world, List<String> tooltip) {}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user