提供: 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) { | ||
36行目: | 36行目: | ||
package mods.entity; | package mods.entity; | ||
− | + | public class EntitySample extends EntityLiving { | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | public class EntitySample extends | ||
public EntitySample(World world) { | public EntitySample(World world) { | ||
super(world); | super(world); | ||
87行目: | 77行目: | ||
<source lang="java"> | <source lang="java"> | ||
package mods.entity; | package mods.entity; | ||
− | |||
− | |||
− | |||
− | |||
public class RenderSample extends Render { | public class RenderSample extends Render { | ||
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(), | ||
} | } | ||
− | public ResourceLocation | + | public ResourceLocation getTexture() { return texture; } |
} | } | ||
</source> | </source> | ||
107行目: | 92行目: | ||
package mods.entity; | package mods.entity; | ||
− | + | public class ModelSample extends Model { | |
− | |||
− | |||
− | public class ModelSample extends | ||
− | |||
ModelRenderer bottom; | ModelRenderer bottom; | ||
ModelRenderer base; | ModelRenderer base; | ||
117行目: | 98行目: | ||
public ModelSample() { | public ModelSample() { | ||
− | + | bottom = new ModelRenderer(this); | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | bottom | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
} | } | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
} | } | ||
</source> | </source> |