mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-26 15:03:03 +00:00
Added all the basic achievements.
This commit is contained in:
1 parent
cc799ccc18
commit
266e3587db
27 files changed
+313
-15
No files matched your search
@@ -11,11 +11,17 @@
|
||||
package vazkii.botania.common.item.block;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemBlockWithMetadata;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.stats.Achievement;
|
||||
import vazkii.botania.client.lib.LibResources;
|
||||
import vazkii.botania.common.achievement.ICraftAchievement;
|
||||
import vazkii.botania.common.achievement.IPickupAchievement;
|
||||
|
||||
public class ItemBlockWithMetadataAndName extends ItemBlockWithMetadata {
|
||||
public class ItemBlockWithMetadataAndName extends ItemBlockWithMetadata implements IPickupAchievement, ICraftAchievement {
|
||||
|
||||
public ItemBlockWithMetadataAndName(Block par2Block) {
|
||||
super(par2Block, par2Block);
|
||||
@@ -31,4 +37,14 @@ public class ItemBlockWithMetadataAndName extends ItemBlockWithMetadata {
|
||||
return super.getUnlocalizedName(par1ItemStack) + par1ItemStack.getItemDamage();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Achievement getAchievementOnCraft(ItemStack stack, EntityPlayer player, IInventory matrix) {
|
||||
return field_150939_a instanceof ICraftAchievement ? ((ICraftAchievement) field_150939_a).getAchievementOnCraft(stack, player, matrix) : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Achievement getAchievementOnPickup(ItemStack stack, EntityPlayer player, EntityItem item) {
|
||||
return field_150939_a instanceof IPickupAchievement ? ((IPickupAchievement) field_150939_a).getAchievementOnPickup(stack, player, item) : null;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user