本文整理汇总了Java中net.minecraft.entity.passive.EntityMooshroom类的典型用法代码示例。如果您正苦于以下问题:Java EntityMooshroom类的具体用法?Java EntityMooshroom怎么用?Java EntityMooshroom使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
EntityMooshroom类属于net.minecraft.entity.passive包,在下文中一共展示了EntityMooshroom类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: animalsSheared
import net.minecraft.entity.passive.EntityMooshroom; //导入依赖的package包/类
@SubscribeEvent
public static void animalsSheared(PlayerInteractEvent.EntityInteract event)
{
Entity target = event.getTarget();
if (target instanceof EntityMooshroom && !target.isDead && ((EntityMooshroom) target).hurtTime == 0)
{
if (isUsingShears(event.getEntityPlayer()))
{
World world = event.getWorld();
if (!world.isRemote)
{
EntityItem item = new EntityItem(event.getEntity().getEntityWorld(), target.posX, target.posY, target.posZ, new ItemStack(ModItems.meatshroom));
world.spawnEntity(item);
}
}
}
}
示例2: LivingDropEvent
import net.minecraft.entity.passive.EntityMooshroom; //导入依赖的package包/类
@SubscribeEvent
public void LivingDropEvent(LivingDropsEvent event){
if(event.entity instanceof EntityMooshroom){
if(event.entityLiving.isChild()){
}
else{
event.drops.clear();
event.drops.add(new EntityItem(event.entityLiving.worldObj,event.entityLiving.posX,event.entityLiving.posY,event.entityLiving.posZ,new ItemStack(BetterMushroomItems.mushroom_leather, 1)));
if (event.entityLiving.isBurning()){
event.drops.add(new EntityItem(event.entityLiving.worldObj,event.entityLiving.posX,event.entityLiving.posY,event.entityLiving.posZ,new ItemStack(BetterMushroomItems.cooked_shroomeat, 1)));
}else{
event.drops.add(new EntityItem(event.entityLiving.worldObj,event.entityLiving.posX,event.entityLiving.posY,event.entityLiving.posZ,new ItemStack(BetterMushroomItems.raw_shroomeat, 1)));
}
}
}
}
示例3: func_77115_a
import net.minecraft.entity.passive.EntityMooshroom; //导入依赖的package包/类
protected void func_77115_a(EntityMooshroom p_77115_1_, float p_77115_2_) {
super.func_77029_c(p_77115_1_, p_77115_2_);
if(!p_77115_1_.func_70631_g_()) {
this.func_110776_a(TextureMap.field_110575_b);
GL11.glEnable(2884);
GL11.glPushMatrix();
GL11.glScalef(1.0F, -1.0F, 1.0F);
GL11.glTranslatef(0.2F, 0.4F, 0.5F);
GL11.glRotatef(42.0F, 0.0F, 1.0F, 0.0F);
this.field_76988_d.func_78600_a(Block.field_72103_ag, 0, 1.0F);
GL11.glTranslatef(0.1F, 0.0F, -0.6F);
GL11.glRotatef(42.0F, 0.0F, 1.0F, 0.0F);
this.field_76988_d.func_78600_a(Block.field_72103_ag, 0, 1.0F);
GL11.glPopMatrix();
GL11.glPushMatrix();
((ModelQuadruped)this.field_77045_g).field_78150_a.func_78794_c(0.0625F);
GL11.glScalef(1.0F, -1.0F, 1.0F);
GL11.glTranslatef(0.0F, 0.75F, -0.2F);
GL11.glRotatef(12.0F, 0.0F, 1.0F, 0.0F);
this.field_76988_d.func_78600_a(Block.field_72103_ag, 0, 1.0F);
GL11.glPopMatrix();
GL11.glDisable(2884);
}
}
示例4: onHackFinished
import net.minecraft.entity.passive.EntityMooshroom; //导入依赖的package包/类
@Override
public void onHackFinished(Entity entity, EntityPlayer player) {
if (!entity.world.isRemote) {
entity.setDead();
EntityMooshroom entitycow = new EntityMooshroom(entity.world);
entitycow.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);
entitycow.setHealth(((EntityCow) entity).getHealth());
entitycow.renderYawOffset = ((EntityCow) entity).renderYawOffset;
entity.world.spawnEntity(entitycow);
entity.world.spawnParticle(EnumParticleTypes.EXPLOSION_HUGE, entity.posX, entity.posY + entity.height / 2.0F, entity.posZ, 0.0D, 0.0D, 0.0D);
}
}
示例5: apply
import net.minecraft.entity.passive.EntityMooshroom; //导入依赖的package包/类
@Override
public void apply(World world, BlockPos pos, EntityLivingBase entity, int amplifier, int tick) {
if (entity instanceof EntityMooshroom) {
EntityCow cow = new EntityCow(world);
cow.setPosition(pos.getX(), pos.getY(), pos.getZ());
entity.setDead();
world.spawnEntity(cow);
}
}
示例6: apply
import net.minecraft.entity.passive.EntityMooshroom; //导入依赖的package包/类
@Override
public void apply(World world, BlockPos pos, EntityLivingBase entity, int amplifier, int tick) {
if (entity instanceof EntityCow & !(entity instanceof EntityMooshroom)) {
EntityMooshroom mooshroom = new EntityMooshroom(world);
mooshroom.setPosition(pos.getX(), pos.getY(), pos.getZ());
entity.setDead();
world.spawnEntity(mooshroom);
}
}
示例7: BiomeGenMushroomIsland
import net.minecraft.entity.passive.EntityMooshroom; //导入依赖的package包/类
public BiomeGenMushroomIsland(int p_i1984_1_)
{
super(p_i1984_1_);
this.theBiomeDecorator.treesPerChunk = -100;
this.theBiomeDecorator.flowersPerChunk = -100;
this.theBiomeDecorator.grassPerChunk = -100;
this.theBiomeDecorator.mushroomsPerChunk = 1;
this.theBiomeDecorator.bigMushroomsPerChunk = 1;
this.topBlock = Blocks.mycelium.getDefaultState();
this.spawnableMonsterList.clear();
this.spawnableCreatureList.clear();
this.spawnableWaterCreatureList.clear();
this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityMooshroom.class, 8, 4, 8));
}
示例8: doRenderLayer
import net.minecraft.entity.passive.EntityMooshroom; //导入依赖的package包/类
public void doRenderLayer(EntityMooshroom entitylivingbaseIn, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale)
{
if (!entitylivingbaseIn.isChild() && !entitylivingbaseIn.isInvisible())
{
BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
this.mooshroomRenderer.bindTexture(TextureMap.locationBlocksTexture);
GlStateManager.enableCull();
GlStateManager.cullFace(1028);
GlStateManager.pushMatrix();
GlStateManager.scale(1.0F, -1.0F, 1.0F);
GlStateManager.translate(0.2F, 0.35F, 0.5F);
GlStateManager.rotate(42.0F, 0.0F, 1.0F, 0.0F);
GlStateManager.pushMatrix();
GlStateManager.translate(-0.5F, -0.5F, 0.5F);
blockrendererdispatcher.renderBlockBrightness(Blocks.red_mushroom.getDefaultState(), 1.0F);
GlStateManager.popMatrix();
GlStateManager.pushMatrix();
GlStateManager.translate(0.1F, 0.0F, -0.6F);
GlStateManager.rotate(42.0F, 0.0F, 1.0F, 0.0F);
GlStateManager.translate(-0.5F, -0.5F, 0.5F);
blockrendererdispatcher.renderBlockBrightness(Blocks.red_mushroom.getDefaultState(), 1.0F);
GlStateManager.popMatrix();
GlStateManager.popMatrix();
GlStateManager.pushMatrix();
((ModelQuadruped)this.mooshroomRenderer.getMainModel()).head.postRender(0.0625F);
GlStateManager.scale(1.0F, -1.0F, 1.0F);
GlStateManager.translate(0.0F, 0.7F, -0.2F);
GlStateManager.rotate(12.0F, 0.0F, 1.0F, 0.0F);
GlStateManager.translate(-0.5F, -0.5F, 0.5F);
blockrendererdispatcher.renderBlockBrightness(Blocks.red_mushroom.getDefaultState(), 1.0F);
GlStateManager.popMatrix();
GlStateManager.cullFace(1029);
GlStateManager.disableCull();
}
}
示例9: BiomeMushroomIsland
import net.minecraft.entity.passive.EntityMooshroom; //导入依赖的package包/类
public BiomeMushroomIsland(Biome.BiomeProperties properties)
{
super(properties);
this.theBiomeDecorator.treesPerChunk = -100;
this.theBiomeDecorator.flowersPerChunk = -100;
this.theBiomeDecorator.grassPerChunk = -100;
this.theBiomeDecorator.mushroomsPerChunk = 1;
this.theBiomeDecorator.bigMushroomsPerChunk = 1;
this.topBlock = Blocks.MYCELIUM.getDefaultState();
this.spawnableMonsterList.clear();
this.spawnableCreatureList.clear();
this.spawnableWaterCreatureList.clear();
this.spawnableCreatureList.add(new Biome.SpawnListEntry(EntityMooshroom.class, 8, 4, 8));
}
示例10: doRenderLayer
import net.minecraft.entity.passive.EntityMooshroom; //导入依赖的package包/类
public void doRenderLayer(EntityMooshroom entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
if (!entitylivingbaseIn.isChild() && !entitylivingbaseIn.isInvisible())
{
BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
this.mooshroomRenderer.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
GlStateManager.enableCull();
GlStateManager.cullFace(GlStateManager.CullFace.FRONT);
GlStateManager.pushMatrix();
GlStateManager.scale(1.0F, -1.0F, 1.0F);
GlStateManager.translate(0.2F, 0.35F, 0.5F);
GlStateManager.rotate(42.0F, 0.0F, 1.0F, 0.0F);
GlStateManager.pushMatrix();
GlStateManager.translate(-0.5F, -0.5F, 0.5F);
blockrendererdispatcher.renderBlockBrightness(Blocks.RED_MUSHROOM.getDefaultState(), 1.0F);
GlStateManager.popMatrix();
GlStateManager.pushMatrix();
GlStateManager.translate(0.1F, 0.0F, -0.6F);
GlStateManager.rotate(42.0F, 0.0F, 1.0F, 0.0F);
GlStateManager.translate(-0.5F, -0.5F, 0.5F);
blockrendererdispatcher.renderBlockBrightness(Blocks.RED_MUSHROOM.getDefaultState(), 1.0F);
GlStateManager.popMatrix();
GlStateManager.popMatrix();
GlStateManager.pushMatrix();
this.mooshroomRenderer.getMainModel().head.postRender(0.0625F);
GlStateManager.scale(1.0F, -1.0F, 1.0F);
GlStateManager.translate(0.0F, 0.7F, -0.2F);
GlStateManager.rotate(12.0F, 0.0F, 1.0F, 0.0F);
GlStateManager.translate(-0.5F, -0.5F, 0.5F);
blockrendererdispatcher.renderBlockBrightness(Blocks.RED_MUSHROOM.getDefaultState(), 1.0F);
GlStateManager.popMatrix();
GlStateManager.cullFace(GlStateManager.CullFace.BACK);
GlStateManager.disableCull();
}
}
示例11: doRenderLayer
import net.minecraft.entity.passive.EntityMooshroom; //导入依赖的package包/类
public void doRenderLayer(EntityMooshroom entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
if (!entitylivingbaseIn.isChild() && !entitylivingbaseIn.isInvisible())
{
BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
this.mooshroomRenderer.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
GlStateManager.enableCull();
GlStateManager.cullFace(GlStateManager.CullFace.FRONT);
GlStateManager.pushMatrix();
GlStateManager.scale(1.0F, -1.0F, 1.0F);
GlStateManager.translate(0.2F, 0.35F, 0.5F);
GlStateManager.rotate(42.0F, 0.0F, 1.0F, 0.0F);
GlStateManager.pushMatrix();
GlStateManager.translate(-0.5F, -0.5F, 0.5F);
blockrendererdispatcher.renderBlockBrightness(Blocks.RED_MUSHROOM.getDefaultState(), 1.0F);
GlStateManager.popMatrix();
GlStateManager.pushMatrix();
GlStateManager.translate(0.1F, 0.0F, -0.6F);
GlStateManager.rotate(42.0F, 0.0F, 1.0F, 0.0F);
GlStateManager.translate(-0.5F, -0.5F, 0.5F);
blockrendererdispatcher.renderBlockBrightness(Blocks.RED_MUSHROOM.getDefaultState(), 1.0F);
GlStateManager.popMatrix();
GlStateManager.popMatrix();
GlStateManager.pushMatrix();
((ModelQuadruped)this.mooshroomRenderer.getMainModel()).head.postRender(0.0625F);
GlStateManager.scale(1.0F, -1.0F, 1.0F);
GlStateManager.translate(0.0F, 0.7F, -0.2F);
GlStateManager.rotate(12.0F, 0.0F, 1.0F, 0.0F);
GlStateManager.translate(-0.5F, -0.5F, 0.5F);
blockrendererdispatcher.renderBlockBrightness(Blocks.RED_MUSHROOM.getDefaultState(), 1.0F);
GlStateManager.popMatrix();
GlStateManager.cullFace(GlStateManager.CullFace.BACK);
GlStateManager.disableCull();
}
}
示例12: Config
import net.minecraft.entity.passive.EntityMooshroom; //导入依赖的package包/类
public Config() {
mobs = new ArrayList<Entity>(Arrays.asList(new Entity[]{
new Entity(EntityBat.class),
new Entity(EntityChicken.class),
new Entity(EntityCow.class),
new Entity(EntityHorse.class),
new Entity(EntityMooshroom.class),
new Entity(EntityOcelot.class),
new Entity(EntityPig.class),
new Entity(EntityRabbit.class),
new Entity(EntitySheep.class),
new Entity(EntitySquid.class),
new Entity(EntityVillager.class),
new Entity(EntityWolf.class),
new Entity(EntityBlaze.class),
new Entity(EntityCaveSpider.class),
new Entity(EntityCreeper.class),
new Entity(EntityEnderman.class),
new Entity(EntityGhast.class),
new Entity(EntityGolem.class),
new Entity(EntityGuardian.class),
new Entity(EntityIronGolem.class),
new Entity(EntityMagmaCube.class),
new Entity(EntityPigZombie.class),
new Entity(EntitySilverfish.class),
new Entity(EntitySkeleton.class),
new Entity(EntitySlime.class),
new Entity(EntitySnowman.class),
new Entity(EntitySpider.class),
new Entity(EntityWitch.class),
new Entity(EntityZombie.class),
new Entity(EntityItem.class),
new Entity(EntityMinecart.class),
new Entity(EntityPlayer.class)
}));
}
示例13: BiomeGenMushroomIsland
import net.minecraft.entity.passive.EntityMooshroom; //导入依赖的package包/类
public BiomeGenMushroomIsland(int par1)
{
super(par1);
this.theBiomeDecorator.treesPerChunk = -100;
this.theBiomeDecorator.flowersPerChunk = -100;
this.theBiomeDecorator.grassPerChunk = -100;
this.theBiomeDecorator.mushroomsPerChunk = 1;
this.theBiomeDecorator.bigMushroomsPerChunk = 1;
this.topBlock = Blocks.mycelium;
this.spawnableMonsterList.clear();
this.spawnableCreatureList.clear();
this.spawnableWaterCreatureList.clear();
this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityMooshroom.class, 8, 4, 8));
}
示例14: renderEquippedItems
import net.minecraft.entity.passive.EntityMooshroom; //导入依赖的package包/类
protected void renderEquippedItems(EntityMooshroom par1EntityMooshroom, float par2)
{
super.renderEquippedItems(par1EntityMooshroom, par2);
if (!par1EntityMooshroom.isChild())
{
this.bindTexture(TextureMap.locationBlocksTexture);
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glPushMatrix();
GL11.glScalef(1.0F, -1.0F, 1.0F);
GL11.glTranslatef(0.2F, 0.4F, 0.5F);
GL11.glRotatef(42.0F, 0.0F, 1.0F, 0.0F);
this.field_147909_c.renderBlockAsItem(Blocks.red_mushroom, 0, 1.0F);
GL11.glTranslatef(0.1F, 0.0F, -0.6F);
GL11.glRotatef(42.0F, 0.0F, 1.0F, 0.0F);
this.field_147909_c.renderBlockAsItem(Blocks.red_mushroom, 0, 1.0F);
GL11.glPopMatrix();
GL11.glPushMatrix();
((ModelQuadruped)this.mainModel).head.postRender(0.0625F);
GL11.glScalef(1.0F, -1.0F, 1.0F);
GL11.glTranslatef(0.0F, 0.75F, -0.2F);
GL11.glRotatef(12.0F, 0.0F, 1.0F, 0.0F);
this.field_147909_c.renderBlockAsItem(Blocks.red_mushroom, 0, 1.0F);
GL11.glPopMatrix();
GL11.glDisable(GL11.GL_CULL_FACE);
}
}
示例15: onEntityJoinWorld
import net.minecraft.entity.passive.EntityMooshroom; //导入依赖的package包/类
@SubscribeEvent
public void onEntityJoinWorld(EntityJoinWorldEvent parEvent)
{
double high = 0D, low = 0D;
int taskid = 4;
if (parEvent.entity instanceof EntityPig || parEvent.entity instanceof EntitySheep)
{
high = 1.33D;
low = 0.8D;
taskid = parEvent.entity instanceof EntityPig ? 5 : taskid;
}
else if (parEvent.entity instanceof EntityCow || parEvent.entity instanceof EntityMooshroom)
{
high = 2.13D;
low = 1.2D;
}
else if (parEvent.entity instanceof EntityChicken || parEvent.entity instanceof EntityRabbit)
{
high = 1.53D;
low = 1.0D;
}
if (high != 0 && low != 0)
{
((EntityLiving) parEvent.entity).tasks.addTask(taskid, new EntityAIAvoidEntity((EntityCreature) parEvent.entity, new Predicate() {
@Override
public boolean apply(Object p_apply_1_)
{
return p_apply_1_ instanceof EntityPlayer;
}
}, 16.0F, low, high));
}
}