Skip to content

Commit

Permalink
1.10.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Furgl committed Sep 2, 2016
1 parent 0926143 commit 3a4619d
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ 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"

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.
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/furgl/babyMobs/common/BabyMobs.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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]));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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())
{
Expand All @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/mcmod.info
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down

0 comments on commit 3a4619d

Please sign in to comment.