@Override public void onFinish(World world, BlockPos pos, EntityLivingBase entity, int amplifier) { if (amplifier >= 3) { EntityCaveSpider spider = new EntityCaveSpider(world); spider.setPosition(pos.getX(), pos.getY(), pos.getZ()); world.spawnEntity(spider); } int box = 1 + (int) ((float) amplifier / 2F); BlockPos posI = pos.add(box, box, box); BlockPos posF = pos.add(-box, -box, -box); BlockPos.getAllInBox(posI, posF).forEach( pos1 -> { if (world.getBlockState(pos1).getBlock() == Blocks.AIR) world.setBlockState(pos1, Blocks.WEB.getDefaultState()); } ); }
public static void initialize() { inLove = ReflectionHelper.findField(EntityAnimal.class, "field_70881_d", "inLove"); //Standard mutationSet.add(new AnimalMutation((world, pos, mother, father) -> spawnBabyAt(world,pos,new EntityCow(world)),100)); mutationSet.add(new AnimalMutation((world, pos, mother, father) -> spawnBabyAt(world,pos,new EntitySheep(world)),100)); mutationSet.add(new AnimalMutation((world, pos, mother, father) -> spawnBabyAt(world,pos,new EntityPig(world)),100)); mutationSet.add(new AnimalMutation((world, pos, mother, father) -> spawnBabyAt(world,pos,new EntityChicken(world)),50)); //Lower chance for egg hatching animal //Parent species mutationSet.add(new AnimalMutation((world, pos, mother, father) -> spawnBabyAt(world,pos,mother.createChild(mother)),100)); mutationSet.add(new AnimalMutation((world, pos, mother, father) -> spawnBabyAt(world,pos,father.createChild(father)),100)); //Abominations mutationSet.add(new AnimalMutation((world, pos, mother, father) -> spawnEntityAt(world,pos,new EntitySilverfish(world)),200)); mutationSet.add(new AnimalMutation((world, pos, mother, father) -> spawnEntityAt(world,pos,new EntityCaveSpider(world)),100)); mutationSet.add(new AnimalMutation((world, pos, mother, father) -> spawnEntityAt(world,pos,new EntitySlime(world)),50)); //Enviroment dependent mutationSet.add(new AnimalMutation((world, pos, mother, father) -> spawnEntityAt(world,pos,new EntitySquid(world)),0).setCustomWeight(AnimalCrossbreedHandler::getSquidWeight)); mutationSet.add(new AnimalMutation((world, pos, mother, father) -> spawnBabyAt(world,pos,new EntityWolf(world)),0).setCustomWeight(AnimalCrossbreedHandler::getWolfWeight)); mutationSet.add(new AnimalMutation((world, pos, mother, father) -> spawnBabyAt(world,pos,new EntityOcelot(world)),0).setCustomWeight(AnimalCrossbreedHandler::getOcelotWeight)); }
@SubscribeEvent public void onMobDrops(LivingDropsEvent e) { World world = e.getEntity().getEntityWorld(); Random rng = world.rand; if (e.getEntity() instanceof EntitySkeleton) { EntitySkeleton skele = (EntitySkeleton) e.getEntity(); if (skele.getSkeletonType() == 1) { if (rng.nextFloat() < 0.20 + (e.getLootingLevel() + 1 * 0.05)) e.getDrops().add(new EntityItem(world, skele.posX, skele.posY, skele.posZ, new ItemStack(ModItems.MobDust, 1, 0))); } } if (e.getEntity() instanceof EntityCaveSpider) { if (rng.nextFloat() < 0.20 + (e.getLootingLevel() + 1 * 0.05)) e.getDrops().add(new EntityItem(world, e.getEntity().posX, e.getEntity().posY, e.getEntity().posZ, new ItemStack(ModItems.MobDust, 1, 1))); } }
public BiomRoofedForest(int p_i45383_1_) { super(p_i45383_1_); this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityCow.class, 8, 4, 6)); this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityWolf.class, 2, 4, 6)); this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityCentaure.class, 12, 4, 6)); this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityLutin.class, 14, 4, 6)); this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityCaveSpider.class, 8, 2, 4)); this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityZombie.class, 8, 2, 4)); this.topBlock = BlockRegister.GRASS; this.fillerBlock = BlockRegister.DIRT; this.setBiomeName("Mystic Roofed Forest"); this.theBiomeDecorator.grassPerChunk = 16; ((BiomeDecoratorMagic) this.theBiomeDecorator).berry_per_chunk = 6; this.theBiomeDecorator.treesPerChunk = 10; }
public BiomMagicForest(int p_i45383_1_) { super(p_i45383_1_); this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityCow.class, 8, 4, 6)); this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityWolf.class, 2, 4, 6)); this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityStymph.class, 10, 4, 6)); this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityLutin.class, 14, 4, 6)); this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityCentaure.class, 12, 4, 6)); this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityCaveSpider.class, 8, 2, 4)); this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityZombie.class, 8, 2, 4)); this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityGobelin.class, 8, 2, 4)); this.topBlock = Blocks.grass; this.fillerBlock = Blocks.dirt; this.setBiomeName("Mystic Forest"); this.theBiomeDecorator.grassPerChunk = 16; ((BiomeDecoratorMagic) this.theBiomeDecorator).berry_per_chunk = 6; this.theBiomeDecorator.treesPerChunk = 6; }
private static void init() { addDrop(EntityCreeper.class, SkillBase.armorBreak); addDrop(EntityIronGolem.class, SkillBase.armorBreak); addDrop(EntitySilverfish.class, SkillBase.dash); addDrop(EntityHorse.class, SkillBase.dash); addDrop(EntityEnderman.class, SkillBase.dodge); addDrop(EntityKeese.class, SkillBase.dodge); addDrop(EntitySpider.class, SkillBase.endingBlow); addDrop(EntityCaveSpider.class, SkillBase.leapingBlow); addDrop(EntityMagmaCube.class, SkillBase.leapingBlow); addDrop(EntityPigZombie.class, SkillBase.parry); addDrop(EntityOcelot.class, SkillBase.parry); addDrop(EntityOctorok.class, SkillBase.risingCut); addDrop(EntityBlaze.class, SkillBase.spinAttack); addDrop(EntityDarknut.class, SkillBase.spinAttack); addDrop(EntityZombie.class, SkillBase.swordBasic); addDrop(EntitySkeleton.class, SkillBase.swordBasic); addDrop(EntityGhast.class, SkillBase.swordBeam); addDrop(EntityWitch.class, SkillBase.swordBeam); addDrop(EntityWizzrobe.class, SkillBase.swordBreak); }
@SubscribeEvent public void onLivingAttackEvent(LivingAttackEvent event) { if (spidersApplySlowness) { if (event.getSource().getDamageType().equals("mob") && event.getSource().getEntity() instanceof EntitySpider) { event.getEntityLiving() .addPotionEffect(new PotionEffect(MobEffects.SLOWNESS, 200, 1)); } } if (replaceCaveSpiderPoison) { if (event.getSource().getDamageType().equals("mob") && event.getSource().getEntity() instanceof EntityCaveSpider) { poisonedEntities.add(event.getEntityLiving()); } } }
public static void addDefaultEntries(){ PneumaticRegistry.getInstance().addHackable(Blocks.tnt, HackableTNT.class); PneumaticRegistry.getInstance().addHackable(Blocks.mob_spawner, HackableMobSpawner.class); PneumaticRegistry.getInstance().addHackable(Blocks.lever, HackableLever.class); PneumaticRegistry.getInstance().addHackable(Blocks.stone_button, HackableButton.class); PneumaticRegistry.getInstance().addHackable(Blocks.wooden_button, HackableButton.class); PneumaticRegistry.getInstance().addHackable(Blocks.wooden_door, HackableDoor.class); PneumaticRegistry.getInstance().addHackable(Blocks.tripwire_hook, HackableTripwire.class); PneumaticRegistry.getInstance().addHackable(Blocks.dispenser, HackableDispenser.class); PneumaticRegistry.getInstance().addHackable(Blocks.dropper, HackableDispenser.class); PneumaticRegistry.getInstance().addHackable(Blockss.securityStation, HackableSecurityStation.class); PneumaticRegistry.getInstance().addHackable(Blocks.monster_egg, HackableTripwire.class); PneumaticRegistry.getInstance().addHackable(Blocks.noteblock, HackableNoteblock.class); PneumaticRegistry.getInstance().addHackable(Blocks.jukebox, HackableJukebox.class); PneumaticRegistry.getInstance().addHackable(EntityCreeper.class, HackableCreeper.class); PneumaticRegistry.getInstance().addHackable(EntityTameable.class, HackableTameable.class); PneumaticRegistry.getInstance().addHackable(EntityCow.class, HackableCow.class); PneumaticRegistry.getInstance().addHackable(EntityCaveSpider.class, HackableCaveSpider.class); PneumaticRegistry.getInstance().addHackable(EntityBlaze.class, HackableBlaze.class); PneumaticRegistry.getInstance().addHackable(EntityGhast.class, HackableGhast.class); PneumaticRegistry.getInstance().addHackable(EntityWitch.class, HackableWitch.class); PneumaticRegistry.getInstance().addHackable(EntityLiving.class, HackableLivingDisarm.class); PneumaticRegistry.getInstance().addHackable(EntityEnderman.class, HackableEnderman.class); PneumaticRegistry.getInstance().addHackable(EntityBat.class, HackableBat.class); }
private static ResourceLocation getRandomMonster() { ArrayList<ResourceLocation> entities = new ArrayList<ResourceLocation>(); entities.add(EntityList.getKey(EntityZombie.class)); entities.add(EntityList.getKey(EntitySpider.class)); entities.add(EntityList.getKey(EntitySkeleton.class)); entities.add(EntityList.getKey(EntityEnderman.class)); entities.add(EntityList.getKey(EntityCreeper.class)); entities.add(EntityList.getKey(EntityCaveSpider.class)); return entities.get((int) (Math.random() * entities.size())); }
public BiomeUnderworld() { super(new BiomeProperties(LCDimensions.underworldName).setRainDisabled().setTemperature(2).setRainfall(0).setWaterColor(0)); this.spawnableMonsterList.clear(); this.spawnableCreatureList.clear(); this.spawnableWaterCreatureList.clear(); this.spawnableCaveCreatureList.clear(); this.spawnableMonsterList.add(new SpawnListEntry(EntityDemonSoldier.class, 100, 2, 4)); this.spawnableMonsterList.add(new SpawnListEntry(EntityUnderworldCreeper.class, 30, 1, 2)); this.spawnableMonsterList.add(new SpawnListEntry(EntityUnderworldSlime.class, 20, 1, 1)); this.spawnableMonsterList.add(new SpawnListEntry(EntityCaveSpider.class, 40, 1, 3)); this.spawnableMonsterList.add(new SpawnListEntry(EntityUnderworldGhast.class, 20, 1, 1)); }
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) })); }
private static void removeTheseMCMobs() { // Don't spawn the normal Minecraft hostile mobs? if (!CoreBalance.GEN.mcHostileMobs) { for (int i = 0; i < BiomeGenBase.getBiomeGenArray().length; i++) { if (BiomeGenBase.getBiomeGenArray()[i] != null) { EntityRegistry.removeSpawn(EntityZombie.class, EnumCreatureType.MONSTER, BiomeGenBase.getBiomeGenArray()[i]); EntityRegistry.removeSpawn(EntityCreeper.class, EnumCreatureType.MONSTER, BiomeGenBase.getBiomeGenArray()[i]); EntityRegistry.removeSpawn(EntitySkeleton.class, EnumCreatureType.MONSTER, BiomeGenBase.getBiomeGenArray()[i]); EntityRegistry.removeSpawn(EntitySpider.class, EnumCreatureType.MONSTER, BiomeGenBase.getBiomeGenArray()[i]); EntityRegistry.removeSpawn(EntitySilverfish.class, EnumCreatureType.MONSTER, BiomeGenBase.getBiomeGenArray()[i]); EntityRegistry.removeSpawn(EntityWitch.class, EnumCreatureType.MONSTER, BiomeGenBase.getBiomeGenArray()[i]); EntityRegistry.removeSpawn(EntityEnderman.class, EnumCreatureType.MONSTER, BiomeGenBase.getBiomeGenArray()[i]); EntityRegistry.removeSpawn(EntityCaveSpider.class, EnumCreatureType.MONSTER, BiomeGenBase.getBiomeGenArray()[i]); } } } }
@SubscribeEvent public void livingDrops(LivingDropsEvent event) { if (event.entityLiving instanceof EntityCaveSpider) { if (itemRand.nextInt(100) >= 90) { event.drops.add(new EntityItem(((EntityCaveSpider) event.entityLiving).worldObj,event.entity.posX,event.entity.posY,event.entity.posZ,new ItemStack(ItemRegistry.spiderFang))); } } if (event.entityLiving instanceof EntityEnderman) { if (itemRand.nextInt(100) > 80) { event.drops.add(new EntityItem(((EntityEnderman) event.entityLiving).worldObj,event.entity.posX,event.entity.posY,event.entity.posZ,new ItemStack(ItemRegistry.dustsMeta,1,2))); } } }
@SubscribeEvent public void onEntityInteract(EntityInteractEvent event) { if (event.target instanceof EntitySpider && !(event.target instanceof EntityCrippledSpider) && !(event.target instanceof EntityCaveSpider)) { if (event.entityPlayer.getHeldItem() != null && event.entityPlayer.getHeldItem().getItem() == Items.shears) { EntityCrippledSpider.replace((EntitySpider) event.target, event.entityPlayer); } } }
@ForgeSubscribe public void onHostileEntityDrop(LivingDropsEvent event) { if (event.source.getDamageType().equals("player")) { rand = Math.random(); if (event.entityLiving instanceof EntitySkeleton || event.entityLiving instanceof EntityCreeper || event.entityLiving instanceof EntitySpider || event.entityLiving instanceof EntityCaveSpider || event.entityLiving instanceof EntityEnderman || event.entityLiving instanceof EntityZombie || event.entityLiving instanceof EntityPigZombie || event.entityLiving instanceof EntityIronGolem || event.entityLiving instanceof EntityBlaze || event.entityLiving instanceof EntitySlime || event.entityLiving instanceof EntityMagmaCube || event.entityLiving instanceof EntityWitch || event.entityLiving instanceof EntitySilverfish || event.entityLiving instanceof EntityGhast) { //The integer at the end relates to how many Items will be dropped(percentage). if (rand < 0.22d && ConfigBooleans.munnyDrops){ //The integer at the end relates to how many Items will be dropped(amount). event.entityLiving.dropItem(AddedItems.Munny10.itemID, 1); } } } }
@ForgeSubscribe public void onHostileEntityDrop(LivingDropsEvent event) { if (event.source.getDamageType().equals("player")) { rand = Math.random(); if (event.entityLiving instanceof EntitySkeleton || event.entityLiving instanceof EntityCreeper || event.entityLiving instanceof EntitySpider || event.entityLiving instanceof EntityCaveSpider || event.entityLiving instanceof EntityEnderman || event.entityLiving instanceof EntityZombie || event.entityLiving instanceof EntityPigZombie || event.entityLiving instanceof EntityIronGolem || event.entityLiving instanceof EntityBlaze || event.entityLiving instanceof EntitySlime || event.entityLiving instanceof EntityMagmaCube || event.entityLiving instanceof EntityWitch || event.entityLiving instanceof EntitySilverfish || event.entityLiving instanceof EntityGhast) { //The integer at the end relates to how many Items will be dropped(percentage). if (rand < 0.10d && ConfigBooleans.munnyDrops){ //The integer at the end relates to how many Items will be dropped(amount). event.entityLiving.dropItem(AddedItems.Munny50.itemID, 1); } } } }
@ForgeSubscribe public void onHostileEntityDrop(LivingDropsEvent event) { if (event.source.getDamageType().equals("player")) { rand = Math.random(); if (event.entityLiving instanceof EntitySkeleton || event.entityLiving instanceof EntityCreeper || event.entityLiving instanceof EntitySpider || event.entityLiving instanceof EntityCaveSpider || event.entityLiving instanceof EntityEnderman || event.entityLiving instanceof EntityZombie || event.entityLiving instanceof EntityPigZombie || event.entityLiving instanceof EntityIronGolem || event.entityLiving instanceof EntityBlaze || event.entityLiving instanceof EntitySlime || event.entityLiving instanceof EntityMagmaCube || event.entityLiving instanceof EntityWitch || event.entityLiving instanceof EntitySilverfish || event.entityLiving instanceof EntityGhast) { //The integer at the end relates to how many Items will be dropped(percentage). if (rand < 0.40d && ConfigBooleans.munnyDrops){ //The integer at the end relates to how many Items will be dropped(amount). event.entityLiving.dropItem(AddedItems.Munny5.itemID, 1); } } } }
@ForgeSubscribe public void onHostileEntityDrop(LivingDropsEvent event) { if (event.source.getDamageType().equals("player")) { rand = Math.random(); if (event.entityLiving instanceof EntitySkeleton || event.entityLiving instanceof EntityCreeper || event.entityLiving instanceof EntitySpider || event.entityLiving instanceof EntityCaveSpider || event.entityLiving instanceof EntityEnderman || event.entityLiving instanceof EntityZombie || event.entityLiving instanceof EntityPigZombie || event.entityLiving instanceof EntityIronGolem || event.entityLiving instanceof EntityBlaze || event.entityLiving instanceof EntitySlime || event.entityLiving instanceof EntityMagmaCube || event.entityLiving instanceof EntityWitch || event.entityLiving instanceof EntitySilverfish || event.entityLiving instanceof EntityGhast) { //The integer at the end relates to how many Items will be dropped(percentage). if (rand < 0.10d && ConfigBooleans.munnyDrops){ //The integer at the end relates to how many Items will be dropped(amount). event.entityLiving.dropItem(AddedItems.Munny.itemID, 1); } } } }
@ForgeSubscribe public void onHostileEntityDrop(LivingDropsEvent event) { if (event.source.getDamageType().equals("player")) { rand = Math.random(); if (event.entityLiving instanceof EntitySkeleton || event.entityLiving instanceof EntityCreeper || event.entityLiving instanceof EntitySpider || event.entityLiving instanceof EntityCaveSpider || event.entityLiving instanceof EntityEnderman || event.entityLiving instanceof EntityZombie || event.entityLiving instanceof EntityPigZombie || event.entityLiving instanceof EntityIronGolem || event.entityLiving instanceof EntityBlaze || event.entityLiving instanceof EntitySlime || event.entityLiving instanceof EntityMagmaCube || event.entityLiving instanceof EntityWitch || event.entityLiving instanceof EntitySilverfish || event.entityLiving instanceof EntityGhast) { //The integer at the end relates to how many Items will be dropped(percentage). if (rand < 0.66d && ConfigBooleans.munnyDrops){ //The integer at the end relates to how many Items will be dropped(amount). event.entityLiving.dropItem(AddedItems.Munny1.itemID, 1); } } } }
public CraftCaveSpider(CraftServer server, EntityCaveSpider entity) { super(server, entity); }
@Override public EntityCaveSpider getHandle() { return (EntityCaveSpider) entity; }
public RenderManager(TextureManager renderEngineIn, RenderItem itemRendererIn) { this.renderEngine = renderEngineIn; this.entityRenderMap.put(EntityCaveSpider.class, new RenderCaveSpider(this)); this.entityRenderMap.put(EntitySpider.class, new RenderSpider(this)); this.entityRenderMap.put(EntityPig.class, new RenderPig(this, new ModelPig(), 0.7F)); this.entityRenderMap.put(EntitySheep.class, new RenderSheep(this, new ModelSheep2(), 0.7F)); this.entityRenderMap.put(EntityCow.class, new RenderCow(this, new ModelCow(), 0.7F)); this.entityRenderMap.put(EntityMooshroom.class, new RenderMooshroom(this, new ModelCow(), 0.7F)); this.entityRenderMap.put(EntityWolf.class, new RenderWolf(this, new ModelWolf(), 0.5F)); this.entityRenderMap.put(EntityChicken.class, new RenderChicken(this, new ModelChicken(), 0.3F)); this.entityRenderMap.put(EntityOcelot.class, new RenderOcelot(this, new ModelOcelot(), 0.4F)); this.entityRenderMap.put(EntityRabbit.class, new RenderRabbit(this, new ModelRabbit(), 0.3F)); this.entityRenderMap.put(EntitySilverfish.class, new RenderSilverfish(this)); this.entityRenderMap.put(EntityEndermite.class, new RenderEndermite(this)); this.entityRenderMap.put(EntityCreeper.class, new RenderCreeper(this)); this.entityRenderMap.put(EntityEnderman.class, new RenderEnderman(this)); this.entityRenderMap.put(EntitySnowman.class, new RenderSnowMan(this)); this.entityRenderMap.put(EntitySkeleton.class, new RenderSkeleton(this)); this.entityRenderMap.put(EntityWitch.class, new RenderWitch(this)); this.entityRenderMap.put(EntityBlaze.class, new RenderBlaze(this)); this.entityRenderMap.put(EntityPigZombie.class, new RenderPigZombie(this)); this.entityRenderMap.put(EntityZombie.class, new RenderZombie(this)); this.entityRenderMap.put(EntitySlime.class, new RenderSlime(this, new ModelSlime(16), 0.25F)); this.entityRenderMap.put(EntityMagmaCube.class, new RenderMagmaCube(this)); this.entityRenderMap.put(EntityGiantZombie.class, new RenderGiantZombie(this, new ModelZombie(), 0.5F, 6.0F)); this.entityRenderMap.put(EntityGhast.class, new RenderGhast(this)); this.entityRenderMap.put(EntitySquid.class, new RenderSquid(this, new ModelSquid(), 0.7F)); this.entityRenderMap.put(EntityVillager.class, new RenderVillager(this)); this.entityRenderMap.put(EntityIronGolem.class, new RenderIronGolem(this)); this.entityRenderMap.put(EntityBat.class, new RenderBat(this)); this.entityRenderMap.put(EntityGuardian.class, new RenderGuardian(this)); this.entityRenderMap.put(EntityDragon.class, new RenderDragon(this)); this.entityRenderMap.put(EntityEnderCrystal.class, new RenderEnderCrystal(this)); this.entityRenderMap.put(EntityWither.class, new RenderWither(this)); this.entityRenderMap.put(Entity.class, new RenderEntity(this)); this.entityRenderMap.put(EntityPainting.class, new RenderPainting(this)); this.entityRenderMap.put(EntityItemFrame.class, new RenderItemFrame(this, itemRendererIn)); this.entityRenderMap.put(EntityLeashKnot.class, new RenderLeashKnot(this)); this.entityRenderMap.put(EntityArrow.class, new RenderArrow(this)); this.entityRenderMap.put(EntitySnowball.class, new RenderSnowball(this, Items.snowball, itemRendererIn)); this.entityRenderMap.put(EntityEnderPearl.class, new RenderSnowball(this, Items.ender_pearl, itemRendererIn)); this.entityRenderMap.put(EntityEnderEye.class, new RenderSnowball(this, Items.ender_eye, itemRendererIn)); this.entityRenderMap.put(EntityEgg.class, new RenderSnowball(this, Items.egg, itemRendererIn)); this.entityRenderMap.put(EntityPotion.class, new RenderPotion(this, itemRendererIn)); this.entityRenderMap.put(EntityExpBottle.class, new RenderSnowball(this, Items.experience_bottle, itemRendererIn)); this.entityRenderMap.put(EntityFireworkRocket.class, new RenderSnowball(this, Items.fireworks, itemRendererIn)); this.entityRenderMap.put(EntityLargeFireball.class, new RenderFireball(this, 2.0F)); this.entityRenderMap.put(EntitySmallFireball.class, new RenderFireball(this, 0.5F)); this.entityRenderMap.put(EntityWitherSkull.class, new RenderWitherSkull(this)); this.entityRenderMap.put(EntityItem.class, new RenderEntityItem(this, itemRendererIn)); this.entityRenderMap.put(EntityXPOrb.class, new RenderXPOrb(this)); this.entityRenderMap.put(EntityTNTPrimed.class, new RenderTNTPrimed(this)); this.entityRenderMap.put(EntityFallingBlock.class, new RenderFallingBlock(this)); this.entityRenderMap.put(EntityArmorStand.class, new ArmorStandRenderer(this)); this.entityRenderMap.put(EntityMinecartTNT.class, new RenderTntMinecart(this)); this.entityRenderMap.put(EntityMinecartMobSpawner.class, new RenderMinecartMobSpawner(this)); this.entityRenderMap.put(EntityMinecart.class, new RenderMinecart(this)); this.entityRenderMap.put(EntityBoat.class, new RenderBoat(this)); this.entityRenderMap.put(EntityFishHook.class, new RenderFish(this)); this.entityRenderMap.put(EntityHorse.class, new RenderHorse(this, new ModelHorse(), 0.75F)); this.entityRenderMap.put(EntityLightningBolt.class, new RenderLightningBolt(this)); this.playerRenderer = new RenderPlayer(this); this.skinMap.put("default", this.playerRenderer); this.skinMap.put("slim", new RenderPlayer(this, true)); }
/** * Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args: * entityLiving, partialTickTime */ protected void preRenderCallback(EntityCaveSpider entitylivingbaseIn, float partialTickTime) { GlStateManager.scale(0.7F, 0.7F, 0.7F); }
/** * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. */ protected ResourceLocation getEntityTexture(EntityCaveSpider entity) { return caveSpiderTextures; }
public RenderManager(TextureManager renderEngineIn, RenderItem itemRendererIn) { this.renderEngine = renderEngineIn; this.entityRenderMap.put(EntityCaveSpider.class, new RenderCaveSpider(this)); this.entityRenderMap.put(EntitySpider.class, new RenderSpider(this)); this.entityRenderMap.put(EntityPig.class, new RenderPig(this, new ModelPig(), 0.7F)); this.entityRenderMap.put(EntitySheep.class, new RenderSheep(this, new ModelSheep2(), 0.7F)); this.entityRenderMap.put(EntityCow.class, new RenderCow(this, new ModelCow(), 0.7F)); this.entityRenderMap.put(EntityMooshroom.class, new RenderMooshroom(this, new ModelCow(), 0.7F)); this.entityRenderMap.put(EntityWolf.class, new RenderWolf(this, new ModelWolf(), 0.5F)); this.entityRenderMap.put(EntityChicken.class, new RenderChicken(this, new ModelChicken(), 0.3F)); this.entityRenderMap.put(EntityOcelot.class, new RenderOcelot(this, new ModelOcelot(), 0.4F)); this.entityRenderMap.put(EntityRabbit.class, new RenderRabbit(this, new ModelRabbit(), 0.3F)); this.entityRenderMap.put(EntitySilverfish.class, new RenderSilverfish(this)); this.entityRenderMap.put(EntityEndermite.class, new RenderEndermite(this)); this.entityRenderMap.put(EntityCreeper.class, new RenderCreeper(this)); this.entityRenderMap.put(EntityEnderman.class, new RenderEnderman(this)); this.entityRenderMap.put(EntitySnowman.class, new RenderSnowMan(this)); this.entityRenderMap.put(EntitySkeleton.class, new RenderSkeleton(this)); this.entityRenderMap.put(EntityWitch.class, new RenderWitch(this)); this.entityRenderMap.put(EntityBlaze.class, new RenderBlaze(this)); this.entityRenderMap.put(EntityPigZombie.class, new RenderPigZombie(this)); this.entityRenderMap.put(EntityZombie.class, new RenderZombie(this)); this.entityRenderMap.put(EntitySlime.class, new RenderSlime(this, new ModelSlime(16), 0.25F)); this.entityRenderMap.put(EntityMagmaCube.class, new RenderMagmaCube(this)); this.entityRenderMap.put(EntityGiantZombie.class, new RenderGiantZombie(this, new ModelZombie(), 0.5F, 6.0F)); this.entityRenderMap.put(EntityGhast.class, new RenderGhast(this)); this.entityRenderMap.put(EntitySquid.class, new RenderSquid(this, new ModelSquid(), 0.7F)); this.entityRenderMap.put(EntityVillager.class, new RenderVillager(this)); this.entityRenderMap.put(EntityIronGolem.class, new RenderIronGolem(this)); this.entityRenderMap.put(EntityBat.class, new RenderBat(this)); this.entityRenderMap.put(EntityGuardian.class, new RenderGuardian(this)); this.entityRenderMap.put(EntityDragon.class, new RenderDragon(this)); this.entityRenderMap.put(EntityEnderCrystal.class, new RenderEnderCrystal(this)); this.entityRenderMap.put(EntityWither.class, new RenderWither(this)); this.entityRenderMap.put(Entity.class, new RenderEntity(this)); this.entityRenderMap.put(EntityPainting.class, new RenderPainting(this)); this.entityRenderMap.put(EntityItemFrame.class, new RenderItemFrame(this, itemRendererIn)); this.entityRenderMap.put(EntityLeashKnot.class, new RenderLeashKnot(this)); this.entityRenderMap.put(EntityArrow.class, new RenderArrow(this)); this.entityRenderMap.put(EntitySnowball.class, new RenderSnowball(this, Items.snowball, itemRendererIn)); this.entityRenderMap.put(EntityEnderPearl.class, new RenderSnowball(this, Items.ender_pearl, itemRendererIn)); this.entityRenderMap.put(EntityEnderEye.class, new RenderSnowball(this, Items.ender_eye, itemRendererIn)); this.entityRenderMap.put(EntityEgg.class, new RenderSnowball(this, Items.egg, itemRendererIn)); this.entityRenderMap.put(EntityPotion.class, new RenderPotion(this, itemRendererIn)); this.entityRenderMap.put(EntityExpBottle.class, new RenderSnowball(this, Items.experience_bottle, itemRendererIn)); this.entityRenderMap.put(EntityFireworkRocket.class, new RenderSnowball(this, Items.fireworks, itemRendererIn)); this.entityRenderMap.put(EntityLargeFireball.class, new RenderFireball(this, 2.0F)); this.entityRenderMap.put(EntitySmallFireball.class, new RenderFireball(this, 0.5F)); this.entityRenderMap.put(EntityWitherSkull.class, new RenderWitherSkull(this)); this.entityRenderMap.put(EntityItem.class, new RenderEntityItem(this, itemRendererIn)); this.entityRenderMap.put(EntityXPOrb.class, new RenderXPOrb(this)); this.entityRenderMap.put(EntityTNTPrimed.class, new RenderTNTPrimed(this)); this.entityRenderMap.put(EntityFallingBlock.class, new RenderFallingBlock(this)); this.entityRenderMap.put(EntityArmorStand.class, new ArmorStandRenderer(this)); this.entityRenderMap.put(EntityMinecartTNT.class, new RenderTntMinecart(this)); this.entityRenderMap.put(EntityMinecartMobSpawner.class, new RenderMinecartMobSpawner(this)); this.entityRenderMap.put(EntityMinecart.class, new RenderMinecart(this)); this.entityRenderMap.put(EntityBoat.class, new RenderBoat(this)); this.entityRenderMap.put(EntityFishHook.class, new RenderFish(this)); this.entityRenderMap.put(EntityHorse.class, new RenderHorse(this, new ModelHorse(), 0.75F)); this.entityRenderMap.put(EntityLightningBolt.class, new RenderLightningBolt(this)); this.playerRenderer = new RenderPlayer(this); this.skinMap.put("default", this.playerRenderer); this.skinMap.put("slim", new RenderPlayer(this, true)); PlayerItemsLayer.register(this.skinMap); if (Reflector.RenderingRegistry_loadEntityRenderers.exists()) { Reflector.call(Reflector.RenderingRegistry_loadEntityRenderers, new Object[] {this.entityRenderMap}); } }
@Override public void onImpact(MovingObjectPosition target) { if (target.entityHit != null) { // Figuring out what we hit here now if (target.entityHit instanceof EntityCreeper) { doCapture(target, 50); } else if (target.entityHit instanceof EntityPigZombie) { doCapture(target, 57); } else if (target.entityHit instanceof EntityCaveSpider) { doCapture(target, 59); } else if (target.entityHit instanceof EntityMooshroom) { doCapture(target, 96); } else if (target.entityHit instanceof EntitySkeleton) { doCapture(target, 51); } else if (target.entityHit instanceof EntitySpider) { doCapture(target, 52); } else if (target.entityHit instanceof EntityZombie) { doCapture(target, 54); } else if (target.entityHit instanceof EntityMagmaCube) { doCapture(target, 62); } else if (target.entityHit instanceof EntitySlime) { doCapture(target, 55); } else if (target.entityHit instanceof EntityGhast) { doCapture(target, 56); } else if (target.entityHit instanceof EntitySilverfish) { doCapture(target, 60); } else if (target.entityHit instanceof EntityBlaze) { doCapture(target, 61); } else if (target.entityHit instanceof EntityBat) { doCapture(target, 65); } else if (target.entityHit instanceof EntityWitch) { doCapture(target, 66); } else if (target.entityHit instanceof EntityPig) { doCapture(target, 90); } else if (target.entityHit instanceof EntitySheep) { doCapture(target, 91); } else if (target.entityHit instanceof EntityCow) { doCapture(target, 92); } else if (target.entityHit instanceof EntityChicken) { doCapture(target, 93); } else if (target.entityHit instanceof EntitySquid) { doCapture(target, 94); } else if (target.entityHit instanceof EntityWolf) { doCapture(target, 95); } else if (target.entityHit instanceof EntityOcelot) { doCapture(target, 98); } else if (target.entityHit instanceof EntityHorse) { doCapture(target, 100); } else if (target.entityHit instanceof EntityVillager) { doCapture(target, 120); } // Can't catch Arceus else if (target.entityHit instanceof EntityPlayer) { target.entityHit.attackEntityFrom(DamageSource.causeIndirectMagicDamage(this, this.shootingEntity), (float) 10); this.damageShooter(); } else if (target.entityHit instanceof EntityDragon) { this.damageShooter(); } else if (target.entityHit instanceof EntityWither) { this.damageShooter(); } // else, not a known entity NetHelper.sendParticleMessageToAllPlayers(this.worldObj, this.getEntityId(), (byte) 11, (byte) 4); this.setDead(); // We've hit something, so begone with the projectile } else // Hit the terrain { //Block block = this.worldObj.getBlock(target.blockX, target.blockY, target.blockZ); // Glass breaking if (!Helper.tryBlockBreak(this.worldObj, this, target, 1)) { this.setDead(); } // Only begone if we didn't hit glass } }
public ModelAdapterCaveSpider() { super(EntityCaveSpider.class, "cave_spider", 0.7F); }
/** * Allows the render to do state modifications necessary before the model is rendered. */ protected void preRenderCallback(EntityCaveSpider entitylivingbaseIn, float partialTickTime) { GlStateManager.scale(0.7F, 0.7F, 0.7F); }
/** * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. */ protected ResourceLocation getEntityTexture(EntityCaveSpider entity) { return CAVE_SPIDER_TEXTURES; }
public RenderManager(TextureManager renderEngineIn, RenderItem itemRendererIn) { this.renderEngine = renderEngineIn; this.entityRenderMap.put(EntityCaveSpider.class, new RenderCaveSpider(this)); this.entityRenderMap.put(EntitySpider.class, new RenderSpider(this)); this.entityRenderMap.put(EntityPig.class, new RenderPig(this, new ModelPig(), 0.7F)); this.entityRenderMap.put(EntitySheep.class, new RenderSheep(this, new ModelSheep2(), 0.7F)); this.entityRenderMap.put(EntityCow.class, new RenderCow(this, new ModelCow(), 0.7F)); this.entityRenderMap.put(EntityMooshroom.class, new RenderMooshroom(this, new ModelCow(), 0.7F)); this.entityRenderMap.put(EntityWolf.class, new RenderWolf(this, new ModelWolf(), 0.5F)); this.entityRenderMap.put(EntityChicken.class, new RenderChicken(this, new ModelChicken(), 0.3F)); this.entityRenderMap.put(EntityOcelot.class, new RenderOcelot(this, new ModelOcelot(), 0.4F)); this.entityRenderMap.put(EntityRabbit.class, new RenderRabbit(this, new ModelRabbit(), 0.3F)); this.entityRenderMap.put(EntitySilverfish.class, new RenderSilverfish(this)); this.entityRenderMap.put(EntityEndermite.class, new RenderEndermite(this)); this.entityRenderMap.put(EntityCreeper.class, new RenderCreeper(this)); this.entityRenderMap.put(EntityEnderman.class, new RenderEnderman(this)); this.entityRenderMap.put(EntitySnowman.class, new RenderSnowMan(this)); this.entityRenderMap.put(EntitySkeleton.class, new RenderSkeleton(this)); this.entityRenderMap.put(EntityWitch.class, new RenderWitch(this)); this.entityRenderMap.put(EntityBlaze.class, new RenderBlaze(this)); this.entityRenderMap.put(EntityPigZombie.class, new RenderPigZombie(this)); this.entityRenderMap.put(EntityZombie.class, new RenderZombie(this)); this.entityRenderMap.put(EntitySlime.class, new RenderSlime(this, new ModelSlime(16), 0.25F)); this.entityRenderMap.put(EntityMagmaCube.class, new RenderMagmaCube(this)); this.entityRenderMap.put(EntityGiantZombie.class, new RenderGiantZombie(this, new ModelZombie(), 0.5F, 6.0F)); this.entityRenderMap.put(EntityGhast.class, new RenderGhast(this)); this.entityRenderMap.put(EntitySquid.class, new RenderSquid(this, new ModelSquid(), 0.7F)); this.entityRenderMap.put(EntityVillager.class, new RenderVillager(this)); this.entityRenderMap.put(EntityIronGolem.class, new RenderIronGolem(this)); this.entityRenderMap.put(EntityBat.class, new RenderBat(this)); this.entityRenderMap.put(EntityGuardian.class, new RenderGuardian(this)); this.entityRenderMap.put(EntityShulker.class, new RenderShulker(this, new ModelShulker())); this.entityRenderMap.put(EntityPolarBear.class, new RenderPolarBear(this, new ModelPolarBear(), 0.7F)); this.entityRenderMap.put(EntityDragon.class, new RenderDragon(this)); this.entityRenderMap.put(EntityEnderCrystal.class, new RenderEnderCrystal(this)); this.entityRenderMap.put(EntityWither.class, new RenderWither(this)); this.entityRenderMap.put(Entity.class, new RenderEntity(this)); this.entityRenderMap.put(EntityPainting.class, new RenderPainting(this)); this.entityRenderMap.put(EntityItemFrame.class, new RenderItemFrame(this, itemRendererIn)); this.entityRenderMap.put(EntityLeashKnot.class, new RenderLeashKnot(this)); this.entityRenderMap.put(EntityTippedArrow.class, new RenderTippedArrow(this)); this.entityRenderMap.put(EntitySpectralArrow.class, new RenderSpectralArrow(this)); this.entityRenderMap.put(EntitySnowball.class, new RenderSnowball(this, Items.SNOWBALL, itemRendererIn)); this.entityRenderMap.put(EntityEnderPearl.class, new RenderSnowball(this, Items.ENDER_PEARL, itemRendererIn)); this.entityRenderMap.put(EntityEnderEye.class, new RenderSnowball(this, Items.ENDER_EYE, itemRendererIn)); this.entityRenderMap.put(EntityEgg.class, new RenderSnowball(this, Items.EGG, itemRendererIn)); this.entityRenderMap.put(EntityPotion.class, new RenderPotion(this, itemRendererIn)); this.entityRenderMap.put(EntityExpBottle.class, new RenderSnowball(this, Items.EXPERIENCE_BOTTLE, itemRendererIn)); this.entityRenderMap.put(EntityFireworkRocket.class, new RenderSnowball(this, Items.FIREWORKS, itemRendererIn)); this.entityRenderMap.put(EntityLargeFireball.class, new RenderFireball(this, 2.0F)); this.entityRenderMap.put(EntitySmallFireball.class, new RenderFireball(this, 0.5F)); this.entityRenderMap.put(EntityDragonFireball.class, new RenderDragonFireball(this)); this.entityRenderMap.put(EntityWitherSkull.class, new RenderWitherSkull(this)); this.entityRenderMap.put(EntityShulkerBullet.class, new RenderShulkerBullet(this)); this.entityRenderMap.put(EntityItem.class, new RenderEntityItem(this, itemRendererIn)); this.entityRenderMap.put(EntityXPOrb.class, new RenderXPOrb(this)); this.entityRenderMap.put(EntityTNTPrimed.class, new RenderTNTPrimed(this)); this.entityRenderMap.put(EntityFallingBlock.class, new RenderFallingBlock(this)); this.entityRenderMap.put(EntityArmorStand.class, new RenderArmorStand(this)); this.entityRenderMap.put(EntityMinecartTNT.class, new RenderTntMinecart(this)); this.entityRenderMap.put(EntityMinecartMobSpawner.class, new RenderMinecartMobSpawner(this)); this.entityRenderMap.put(EntityMinecart.class, new RenderMinecart(this)); this.entityRenderMap.put(EntityBoat.class, new RenderBoat(this)); this.entityRenderMap.put(EntityFishHook.class, new RenderFish(this)); this.entityRenderMap.put(EntityAreaEffectCloud.class, new RenderAreaEffectCloud(this)); this.entityRenderMap.put(EntityHorse.class, new RenderHorse(this, new ModelHorse(), 0.75F)); this.entityRenderMap.put(EntityLightningBolt.class, new RenderLightningBolt(this)); this.playerRenderer = new RenderPlayer(this); this.skinMap.put("default", this.playerRenderer); this.skinMap.put("slim", new RenderPlayer(this, true)); net.minecraftforge.fml.client.registry.RenderingRegistry.loadEntityRenderers(this, this.entityRenderMap); }
public static DataFixer createFixer() { DataFixer datafixer = new DataFixer(512); WorldInfo.registerFixes(datafixer); EntityPlayer.registerFixesPlayer(datafixer); AnvilChunkLoader.registerFixes(datafixer); ItemStack.registerFixes(datafixer); EntityArmorStand.registerFixesArmorStand(datafixer); EntityArrow.registerFixesArrow(datafixer); EntityBat.registerFixesBat(datafixer); EntityBlaze.registerFixesBlaze(datafixer); EntityCaveSpider.registerFixesCaveSpider(datafixer); EntityChicken.registerFixesChicken(datafixer); EntityCow.registerFixesCow(datafixer); EntityCreeper.registerFixesCreeper(datafixer); EntityDragonFireball.registerFixesDragonFireball(datafixer); EntityDragon.registerFixesDragon(datafixer); EntityEnderman.registerFixesEnderman(datafixer); EntityEndermite.registerFixesEndermite(datafixer); EntityFallingBlock.registerFixesFallingBlock(datafixer); EntityLargeFireball.registerFixesLargeFireball(datafixer); EntityFireworkRocket.registerFixesFireworkRocket(datafixer); EntityGhast.registerFixesGhast(datafixer); EntityGiantZombie.registerFixesGiantZombie(datafixer); EntityGuardian.registerFixesGuardian(datafixer); EntityHorse.registerFixesHorse(datafixer); EntityItem.registerFixesItem(datafixer); EntityItemFrame.registerFixesItemFrame(datafixer); EntityMagmaCube.registerFixesMagmaCube(datafixer); EntityMinecartChest.registerFixesMinecartChest(datafixer); EntityMinecartCommandBlock.registerFixesMinecartCommand(datafixer); EntityMinecartFurnace.registerFixesMinecartFurnace(datafixer); EntityMinecartHopper.registerFixesMinecartHopper(datafixer); EntityMinecartEmpty.registerFixesMinecartEmpty(datafixer); EntityMinecartMobSpawner.registerFixesMinecartMobSpawner(datafixer); EntityMinecartTNT.registerFixesMinecartTNT(datafixer); EntityLiving.registerFixesMob(datafixer); EntityMob.registerFixesMonster(datafixer); EntityMooshroom.registerFixesMooshroom(datafixer); EntityOcelot.registerFixesOcelot(datafixer); EntityPig.registerFixesPig(datafixer); EntityPigZombie.registerFixesPigZombie(datafixer); EntityRabbit.registerFixesRabbit(datafixer); EntitySheep.registerFixesSheep(datafixer); EntityShulker.registerFixesShulker(datafixer); EntitySilverfish.registerFixesSilverfish(datafixer); EntitySkeleton.registerFixesSkeleton(datafixer); EntitySlime.registerFixesSlime(datafixer); EntitySmallFireball.registerFixesSmallFireball(datafixer); EntitySnowman.registerFixesSnowman(datafixer); EntitySnowball.registerFixesSnowball(datafixer); EntitySpectralArrow.registerFixesSpectralArrow(datafixer); EntitySpider.registerFixesSpider(datafixer); EntitySquid.registerFixesSquid(datafixer); EntityEgg.registerFixesEgg(datafixer); EntityEnderPearl.registerFixesEnderPearl(datafixer); EntityExpBottle.registerFixesExpBottle(datafixer); EntityPotion.registerFixesPotion(datafixer); EntityTippedArrow.registerFixesTippedArrow(datafixer); EntityVillager.registerFixesVillager(datafixer); EntityIronGolem.registerFixesIronGolem(datafixer); EntityWitch.registerFixesWitch(datafixer); EntityWither.registerFixesWither(datafixer); EntityWitherSkull.registerFixesWitherSkull(datafixer); EntityWolf.registerFixesWolf(datafixer); EntityZombie.registerFixesZombie(datafixer); TileEntityPiston.registerFixesPiston(datafixer); TileEntityFlowerPot.registerFixesFlowerPot(datafixer); TileEntityFurnace.registerFixesFurnace(datafixer); TileEntityChest.registerFixesChest(datafixer); TileEntityDispenser.registerFixes(datafixer); TileEntityDropper.registerFixesDropper(datafixer); TileEntityBrewingStand.registerFixesBrewingStand(datafixer); TileEntityHopper.registerFixesHopper(datafixer); BlockJukebox.registerFixesJukebox(datafixer); TileEntityMobSpawner.registerFixesMobSpawner(datafixer); registerFixes(datafixer); return datafixer; }