diff --git a/build.gradle b/build.gradle index 89efef0..d1d318e 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ plugins { id "net.minecraftforge.gradle.forge" version "2.0.2" } */ -version = "1.9.4-1.5" +version = "1.10.2-1.5" group= "furgl.babyMobs" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "BabyMobs" @@ -28,7 +28,7 @@ sourceCompatibility = 1.7 targetCompatibility = 1.7 minecraft { - version = "1.9.4-12.17.0.1976" + version = "1.10.2-12.18.1.2011" runDir = "run" // the mappings can be changed at any time, and must be in the following format. diff --git a/src/main/java/furgl/babyMobs/common/BabyMobs.java b/src/main/java/furgl/babyMobs/common/BabyMobs.java index 1a5069a..a71915b 100644 --- a/src/main/java/furgl/babyMobs/common/BabyMobs.java +++ b/src/main/java/furgl/babyMobs/common/BabyMobs.java @@ -115,6 +115,7 @@ private void registerCraftingRecipes() GameRegistry.addRecipe(new ItemStack(ModItems.golden_bread), "NNN", "NBN", "NNN", 'N', Items.GOLD_NUGGET, 'B', Items.BREAD); } + //copied from bootstrap public void registerDispenserBehaviors() { Field[] fields = ModItems.class.getDeclaredFields(); @@ -131,7 +132,7 @@ public void registerDispenserBehaviors() */ public ItemStack dispenseStack(IBlockSource source, ItemStack stack) { - EnumFacing enumfacing = BlockDispenser.getFacing(source.getBlockMetadata()); + EnumFacing enumfacing = (EnumFacing)source.func_189992_e().getValue(BlockDispenser.FACING); double d0 = source.getX() + (double)enumfacing.getFrontOffsetX(); double d1 = (double)((float)source.getBlockPos().getY() + 0.2F); double d2 = source.getZ() + (double)enumfacing.getFrontOffsetZ(); diff --git a/src/main/java/furgl/babyMobs/common/entity/monster/EntityBabySkeleton.java b/src/main/java/furgl/babyMobs/common/entity/monster/EntityBabySkeleton.java index 098cb2e..b0ef1b4 100644 --- a/src/main/java/furgl/babyMobs/common/entity/monster/EntityBabySkeleton.java +++ b/src/main/java/furgl/babyMobs/common/entity/monster/EntityBabySkeleton.java @@ -15,6 +15,7 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.monster.EntitySkeleton; +import net.minecraft.entity.monster.SkeletonType; import net.minecraft.entity.passive.EntityHorse; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.projectile.EntityTippedArrow; @@ -227,7 +228,7 @@ public void attackEntityWithRangedAttack(EntityLivingBase target, float p_82196_ entityarrow.setDamage(entityarrow.getDamage() + (double)i * 0.5D + 0.5D); if (j > 0) entityarrow.setKnockbackStrength(j); - if (EnchantmentHelper.getMaxEnchantmentLevel(Enchantments.FLAME, this) > 0 || this.getSkeletonType() == 1) + if (EnchantmentHelper.getMaxEnchantmentLevel(Enchantments.FLAME, this) > 0 || this.func_189771_df() == SkeletonType.WITHER) entityarrow.setFire(100); this.playSound(SoundEvents.ENTITY_SKELETON_SHOOT, 1.0F, 1.0F / (this.getRNG().nextFloat() * 0.4F + 0.8F)); this.worldObj.spawnEntityInWorld(entityarrow); diff --git a/src/main/java/furgl/babyMobs/common/entity/monster/EntityBabyWitherSkeleton.java b/src/main/java/furgl/babyMobs/common/entity/monster/EntityBabyWitherSkeleton.java index 668681d..41683c2 100644 --- a/src/main/java/furgl/babyMobs/common/entity/monster/EntityBabyWitherSkeleton.java +++ b/src/main/java/furgl/babyMobs/common/entity/monster/EntityBabyWitherSkeleton.java @@ -19,6 +19,7 @@ import net.minecraft.entity.ai.EntityAIWatchClosest; import net.minecraft.entity.ai.RandomPositionGenerator; import net.minecraft.entity.monster.EntitySkeleton; +import net.minecraft.entity.monster.SkeletonType; import net.minecraft.entity.passive.EntityWolf; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.projectile.EntityArrow; @@ -44,7 +45,7 @@ public EntityBabyWitherSkeleton(World worldIn) super(worldIn); this.setSize(0.6F, 1.2F); this.experienceValue = (int)(this.experienceValue * 2.5F); - this.setSkeletonType(1); + this.func_189768_a(SkeletonType.WITHER); this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.35D); this.maxHurtResistantTime = 50; this.targetTasks.addTask(1, new EntityAIBabyHurtByTarget(this, true, new Class[0])); diff --git a/src/main/java/furgl/babyMobs/common/event/BabyReplaceEvent.java b/src/main/java/furgl/babyMobs/common/event/BabyReplaceEvent.java index 0a0da7a..e23c074 100644 --- a/src/main/java/furgl/babyMobs/common/event/BabyReplaceEvent.java +++ b/src/main/java/furgl/babyMobs/common/event/BabyReplaceEvent.java @@ -45,6 +45,7 @@ import net.minecraft.entity.monster.EntitySpider; import net.minecraft.entity.monster.EntityWitch; import net.minecraft.entity.monster.EntityZombie; +import net.minecraft.entity.monster.SkeletonType; import net.minecraft.entity.passive.EntityHorse; import net.minecraft.entity.passive.EntitySquid; import net.minecraft.entity.passive.HorseType; @@ -206,7 +207,7 @@ else if (event.getEntity().getClass() == EntityShulker.class) event.getEntity().setDead(); } } - else if (event.getEntity().getClass() == EntitySkeleton.class && ((EntitySkeleton) event.getEntity()).getSkeletonType() == 0) + else if (event.getEntity().getClass() == EntitySkeleton.class && ((EntitySkeleton) event.getEntity()).func_189771_df() == SkeletonType.NORMAL) { if (rand.nextInt(100) < Config.babySkeletonRate || event.getEntity().getRidingEntity() instanceof EntityHorse && ((EntityHorse)event.getEntity().getRidingEntity()).isChild()) { @@ -224,7 +225,7 @@ else if (event.getEntity().getClass() == EntityCreeper.class) event.getEntity().setDead(); } } - else if (event.getEntity().getClass() == EntitySkeleton.class && ((EntitySkeleton) event.getEntity()).getSkeletonType() == 1) + else if (event.getEntity().getClass() == EntitySkeleton.class && ((EntitySkeleton) event.getEntity()).func_189771_df() == SkeletonType.WITHER) { if (rand.nextInt(100) < Config.babyWitherSkeletonRate) { diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index fba17d3..1866e28 100644 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -4,7 +4,7 @@ "name": "Baby Mobs", "description": "Adds baby versions of many vanilla monsters, each with its own special abilities.", "version": "1.5", - "mcversion": "1.9.4", + "mcversion": "1.10.2", "url": "https://sites.google.com/site/furglsmods/baby-mobs", "updateUrl": "", "authorList": ["Furgl"],