0
對此有何幫助?這是行不通的。有人告訴我創建一個GymDbellItem類的實例,我不知道該怎麼做..幫助?Minecraft Modding - 物品絕殺不顯示
GymDbellItem.java
package com.bagasmc.gym.items;
import java.util.List;
import com.bagasmc.gym.handlers.CreativeTabHandler;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.common.registry.GameRegistry;
public class GymDbellItem extends Item {
public static ItemBase gymDumbbell;
public static ItemStack dumBell;
public static void init() {
gymDumbbell = register(new ItemBase("dumbBell").setCreativeTab(CreativeTabHandler.tabBlocks));
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean check) {
list.add(" STAMINA ");
list.add("3 kilos 6.6 lbs");
}
private static <T extends Item> T register(T item) {
GameRegistry.register(item);
if(item instanceof ItemModelProvider) {
((ItemModelProvider)item).registerItemModel(item);
}
return item;
}
}
它不顯示絕殺:(
謝謝!它現在的作品:) – Bagas
@Bagas如果答案適合你,將其標記爲已接受(左側的複選標記)。 – Draco18s