提供: Minecraft Modding Wiki
この編集を取り消せます。
下記の差分を確認して、本当に取り消していいか検証してください。よろしければ変更を保存して取り消しを完了してください。
最新版 | 編集中の文章 | ||
10行目: | 10行目: | ||
package custom.tool.item; | package custom.tool.item; | ||
− | |||
import net.minecraft.item.EnumToolMaterial; | import net.minecraft.item.EnumToolMaterial; | ||
import net.minecraft.item.Item; | import net.minecraft.item.Item; | ||
− | |||
import net.minecraft.item.ItemTool; | import net.minecraft.item.ItemTool; | ||
import net.minecraftforge.client.IItemRenderer; | import net.minecraftforge.client.IItemRenderer; | ||
21行目: | 19行目: | ||
import cpw.mods.fml.common.event.FMLPreInitializationEvent; | import cpw.mods.fml.common.event.FMLPreInitializationEvent; | ||
import cpw.mods.fml.common.network.NetworkMod; | import cpw.mods.fml.common.network.NetworkMod; | ||
− | |||
import cpw.mods.fml.common.registry.LanguageRegistry; | import cpw.mods.fml.common.registry.LanguageRegistry; | ||
@Mod( | @Mod( | ||
− | modid = CustomModelTools | + | modid = "CustomModelTools", |
− | name = | + | name = "Custom Model Tools", |
− | version = | + | version = "1" |
) | ) | ||
@NetworkMod( | @NetworkMod( | ||
35行目: | 32行目: | ||
public class CustomModelTools | public class CustomModelTools | ||
{ | { | ||
− | |||
− | |||
− | |||
− | |||
public static final boolean clientSideRequiredBoolean = true; | public static final boolean clientSideRequiredBoolean = true; | ||
public static final boolean serverSideRequiredBoolean = false; | public static final boolean serverSideRequiredBoolean = false; | ||
44行目: | 37行目: | ||
public static boolean Model_ON_OFF_Boolean = true; | public static boolean Model_ON_OFF_Boolean = true; | ||
public static String ModelTexture; | public static String ModelTexture; | ||
− | public static String texture | + | public static String texture; |
− | |||
− | |||
public static EnumToolMaterial toolMaterial; | public static EnumToolMaterial toolMaterial; | ||
public static ItemTool mainItem; | public static ItemTool mainItem; | ||
− | |||
− | |||
− | |||
− | |||
@EventHandler | @EventHandler | ||
public void mainLoading(FMLPreInitializationEvent event) | public void mainLoading(FMLPreInitializationEvent event) | ||
{ | { | ||
− | mainItem = (ItemTool) new ItemCustomModelTools( | + | mainItem = (ItemTool) new ItemCustomModelTools(3001, toolMaterial.IRON).setData("CustomModelItem", "CustomModelItem", 1.0F); |
− | registerItem(mainItem, "CustomModelItem", "Custom Model Item", "カスタムモデルアイテム", new ItemCustomModelToolsRenderer(), true, texture, | + | registerItem(mainItem, "CustomModelItem", "Custom Model Item", "カスタムモデルアイテム", new ItemCustomModelToolsRenderer(), true, texture, 64, 32); |
− | |||
} | } | ||
public void registerItem(Item items, String name, String en_US, String ja_JP, IItemRenderer itemRenderer, boolean modeling, String texture, int width, int height) | public void registerItem(Item items, String name, String en_US, String ja_JP, IItemRenderer itemRenderer, boolean modeling, String texture, int width, int height) | ||
71行目: | 57行目: | ||
Model_ON_OFF_Boolean = modeling; | Model_ON_OFF_Boolean = modeling; | ||
ModelTexture = texture; | ModelTexture = texture; | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
ModelCustomModelTools modelings = new ModelCustomModelTools(); | ModelCustomModelTools modelings = new ModelCustomModelTools(); | ||
modelings.setTextureSize(width, height); | modelings.setTextureSize(width, height); | ||
195行目: | 171行目: | ||
{ | { | ||
private ModelCustomModelTools modeling; | private ModelCustomModelTools modeling; | ||
+ | protected Minecraft mc; | ||
public ItemCustomModelToolsRenderer() | public ItemCustomModelToolsRenderer() | ||
{ | { | ||
234行目: | 211行目: | ||
GL11.glTranslatef(-0.304800F, -0.500F, -0.09F); | GL11.glTranslatef(-0.304800F, -0.500F, -0.09F); | ||
− | + | mc.renderEngine.bindTexture(new ResourceLocation(CustomModelTools.ModelTexture)); | |
modeling.render((Entity) data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); | modeling.render((Entity) data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); | ||
379行目: | 356行目: | ||
</source> | </source> | ||
− | + | 未完成<br> | |
− | + | [[チュートリアル一覧]]に乗せる方がいるのなら、まだ乗せないで下さい | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |