ActuallyAdditions/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemFoodSeed.java

50 lines
1.6 KiB
Java
Raw Normal View History

/*
* This file ("ItemFoodSeed.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
2017-01-01 16:23:26 +01:00
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.items.base;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockPlant;
2024-03-02 21:23:08 +01:00
import net.minecraft.core.BlockPos;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockState;
2021-11-14 00:20:29 +01:00
public class ItemFoodSeed /*extends ItemSeedFood */{ //TODO what is this?!
public final Block plant;
public final String name;
public final String oredictName;
private final int maxUseDuration;
2019-05-02 09:10:29 +02:00
public ItemFoodSeed(String name, String oredictName, Block plant, Item returnItem, int returnMeta, int healAmount, float saturation, int maxUseDuration) {
2021-11-14 00:20:29 +01:00
//super(healAmount, saturation, plant, Blocks.FARMLAND);
this.name = name;
this.oredictName = oredictName;
this.plant = plant;
this.maxUseDuration = maxUseDuration;
2019-05-02 09:10:29 +02:00
if (plant instanceof BlockPlant) {
2021-11-21 17:57:50 +01:00
//((BlockPlant) plant).doStuff(this, returnItem, returnMeta);
}
}
2021-11-14 00:20:29 +01:00
//@Override
2019-05-02 09:10:29 +02:00
public int getMaxItemUseDuration(ItemStack stack) {
return this.maxUseDuration;
}
2021-11-14 00:20:29 +01:00
//@Override
2024-03-02 21:23:08 +01:00
public BlockState getPlant(BlockGetter world, BlockPos pos) {
return this.plant.defaultBlockState();
}
}