提供: Minecraft Modding Wiki
この編集を取り消せます。
下記の差分を確認して、本当に取り消していいか検証してください。よろしければ変更を保存して取り消しを完了してください。
最新版 | 編集中の文章 | ||
24行目: | 24行目: | ||
@EventHandler | @EventHandler | ||
public void init(FMLInitialization event) { | public void init(FMLInitialization event) { | ||
− | EntityRegistry.registerModEntity(EntitySample.class, "SampleEntity | + | EntityRegistry.registerModEntity(EntitySample.class, "SampleEntity, 0, this, 250, 1, false); |
EntityRegistry.addSpawn(EntitySample.class, 20, 1, 4, EnumCreatureType.creature, BiomeGenBase.plains); | EntityRegistry.addSpawn(EntitySample.class, 20, 1, 4, EnumCreatureType.creature, BiomeGenBase.plains); | ||
if(FMLCommonHandler.instance().getSide() == Side.CLIENT) { | if(FMLCommonHandler.instance().getSide() == Side.CLIENT) { | ||
39行目: | 39行目: | ||
import net.minecraft.entity.EnumCreatureAttribute; | import net.minecraft.entity.EnumCreatureAttribute; | ||
import net.minecraft.entity.EntityLiving; | import net.minecraft.entity.EntityLiving; | ||
− | |||
− | |||
import net.minecraft.init.Items; | import net.minecraft.init.Items; | ||
import net.minecraft.item.Item; | import net.minecraft.item.Item; | ||
46行目: | 44行目: | ||
− | public class EntitySample extends | + | public class EntitySample extends EntityLiving { |
public EntitySample(World world) { | public EntitySample(World world) { | ||
super(world); | super(world); | ||
95行目: | 93行目: | ||
public static final ResourceLocation texture = new ResourceLocation("entity:textures/entity/sample.png"); | public static final ResourceLocation texture = new ResourceLocation("entity:textures/entity/sample.png"); | ||
public RenderSample() { | public RenderSample() { | ||
− | + | super(new ModelSample(), 1.0f); | |
− | super(new ModelSample(), | ||
} | } | ||
107行目: | 104行目: | ||
package mods.entity; | package mods.entity; | ||
− | |||
import net.minecraft.client.model.ModelRenderer; | import net.minecraft.client.model.ModelRenderer; | ||
141行目: | 137行目: | ||
} | } | ||
</source> | </source> | ||
− | |||
===解説=== | ===解説=== | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |