Skip to content

Commit

Permalink
Merge branch 'master' into experimental
Browse files Browse the repository at this point in the history
  • Loading branch information
bonii-xx committed Nov 30, 2014
2 parents 5187f3b + d089455 commit 076b66b
Show file tree
Hide file tree
Showing 11 changed files with 583 additions and 610 deletions.
6 changes: 0 additions & 6 deletions src/main/java/tconstruct/armor/TinkerArmorEvents.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ public void onLivingDrop (LivingDropsEvent event)

if (event.entityLiving instanceof IBossDisplayData)
{
if (event.entityLiving instanceof BlueSlime)
{
BlueSlime slime = (BlueSlime) event.entityLiving;
if (slime.getSlimeSize() < 8)
return;
}
String entityName = event.entityLiving.getClass().getSimpleName().toLowerCase();
if (entityName.contains("entitynpc") || entityName.contains("entitycustomnpc"))
return;
Expand Down
12 changes: 9 additions & 3 deletions src/main/java/tconstruct/blocks/slime/SlimeFluid.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import net.minecraftforge.fluids.*;
import tconstruct.world.TinkerWorld;
import tconstruct.world.entity.BlueSlime;
import tconstruct.world.entity.KingBlueSlime;
import tconstruct.world.entity.SlimeBase;

public class SlimeFluid extends BlockFluidClassic
{
Expand Down Expand Up @@ -46,9 +48,13 @@ public void updateTick (World world, int x, int y, int z, Random rand)
super.updateTick(world, x, y, z, rand);
if (rand.nextInt(100) == 0 && world.getBlockMetadata(x, y, z) == 0 && world.checkNoEntityCollision(AxisAlignedBB.getBoundingBox(x - 1, y - 1, z - 1, x + 2, y + 2, z + 2)))
{
BlueSlime entityslime = new BlueSlime(world);
entityslime.setPosition((double) x + 0.5D, (double) y + 1.5D, (double) z + 0.5D);
world.spawnEntityInWorld(entityslime);
SlimeBase slime;
if(rand.nextInt(300) == 0)
slime = new KingBlueSlime(world);
else
slime = new BlueSlime(world);
slime.setPosition((double) x + 0.5D, (double) y + 1.5D, (double) z + 0.5D);
world.spawnEntityInWorld(slime);
}
}

Expand Down
13 changes: 8 additions & 5 deletions src/main/java/tconstruct/tools/items/TitleIcon.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
import tconstruct.client.TProxyClient;
import tconstruct.library.tools.ToolCore;
import tconstruct.world.entity.BlueSlime;
import tconstruct.world.entity.KingBlueSlime;

// spawn egg.
public class TitleIcon extends Item
{
int[] primaryColor = { 0x66BBE8, 0x66BBE8 };
Expand All @@ -29,6 +31,7 @@ public TitleIcon()
{
super();
this.setCreativeTab(CreativeTabs.tabMisc);
this.setHasSubtypes(true);
}

@Override
Expand Down Expand Up @@ -135,7 +138,7 @@ public boolean onItemUse (ItemStack stack, EntityPlayer player, World world, int
spawnEntity(posX, posY, posZ, new BlueSlime(world), world, player);
break;
case 1:
spawnBossSlime(posX, posY, posZ, new BlueSlime(world), world, player);
spawnBossSlime(posX, posY, posZ, new KingBlueSlime(world), world, player);
break;
}
if (!player.capabilities.isCreativeMode)
Expand Down Expand Up @@ -168,8 +171,8 @@ public static EntityLiving activateSpawnEgg (ItemStack stack, World world, doubl
spawnEntity(posX, posY, posZ, entity, world);
break;
case 1:
entity = new BlueSlime(world);
spawnBossSlime(posX, posY, posZ, new BlueSlime(world), world);
entity = new KingBlueSlime(world);
spawnBossSlime(posX, posY, posZ, new KingBlueSlime(world), world);
break;
}
return entity;
Expand Down Expand Up @@ -197,7 +200,7 @@ public static void spawnEntity (double x, double y, double z, Entity entity, Wor
}
}

public static void spawnBossSlime (double x, double y, double z, BlueSlime entity, World world, EntityPlayer player)
public static void spawnBossSlime (double x, double y, double z, KingBlueSlime entity, World world, EntityPlayer player)
{
if (!world.isRemote)
{
Expand All @@ -208,7 +211,7 @@ public static void spawnBossSlime (double x, double y, double z, BlueSlime entit
}
}

public static void spawnBossSlime (double x, double y, double z, BlueSlime entity, World world)
public static void spawnBossSlime (double x, double y, double z, KingBlueSlime entity, World world)
{
if (!world.isRemote)
{
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tconstruct/util/IMCHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ else if(tag.hasKey("Stonebound") && tag.hasKey("Jagged")) {
int color = tag.getInteger("Color");

if(tag.hasKey("Jagged"))
shoddy = tag.getFloat("Jagged");
shoddy = -tag.getFloat("Jagged");

if(tag.hasKey("localizationString"))
return new ToolMaterial(name, tag.getString("localizationString"), hlvl, durability, speed, attack, handle, reinforced, shoddy, style, color);
Expand Down
1 change: 1 addition & 0 deletions src/main/java/tconstruct/world/TinkerWorld.java
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ public void createEntities ()
// TConstruct.instance, 32, 5, true);

EntityRegistry.registerModEntity(BlueSlime.class, "EdibleSlime", 12, TConstruct.instance, 64, 5, true);
EntityRegistry.registerModEntity(KingBlueSlime.class, "KingSlime", 14, TConstruct.instance, 64, 5, true);
// EntityRegistry.registerModEntity(MetalSlime.class, "MetalSlime", 13,
// TConstruct.instance, 64, 5, true);

Expand Down
4 changes: 3 additions & 1 deletion src/main/java/tconstruct/world/TinkerWorldProxyClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ void registerRenderer ()
RenderingRegistry.registerBlockHandler(new SlimePadRender());

// Entities
RenderingRegistry.registerEntityRenderingHandler(BlueSlime.class, new SlimeRender(new ModelSlime(16), new ModelSlime(0), 0.25F));
SlimeRender slimeRender = new SlimeRender(new ModelSlime(16), new ModelSlime(0), 0.25F);
RenderingRegistry.registerEntityRenderingHandler(BlueSlime.class, slimeRender);
RenderingRegistry.registerEntityRenderingHandler(KingBlueSlime.class, slimeRender);
RenderingRegistry.registerEntityRenderingHandler(CartEntity.class, new CartRender());

VillagerRegistry.instance().registerVillagerSkin(78943, new ResourceLocation("tinker", "textures/mob/villagertools.png"));
Expand Down

0 comments on commit 076b66b

Please sign in to comment.