Skip to content

Commit

Permalink
Update to 1.11.2 (#16)
Browse files Browse the repository at this point in the history
* Updated build.gradle for 1.11.2-13-20.0.2228

* Update to 1.11.2

Replace 'stack == null' checks with 'stack == ItemStack.Empty'
Changed MODID to 'lumberjack' to comply with Forge standards

* Removed gradle.properties
  • Loading branch information
mallrat208 authored and dries007 committed Feb 28, 2017
1 parent a0ab702 commit aa3d543
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Expand Up @@ -38,9 +38,9 @@ archivesBaseName = 'Lumberjack'
def githuborg = 'DoubleDoorDevelopment'
def description = 'Boom. Tree gone!'
minecraft {
version = "1.9.4-12.17.0.1976"
version = "1.11.2-13.20.0.2228"
runDir = "jars"
mappings = "stable_26"
mappings = "snapshot_20161220"
}

repositories {
Expand Down
Expand Up @@ -148,7 +148,7 @@ private ItemLumberAxe(ToolMaterial toolMaterial, boolean fromAxe)
toolMaterials.add(materialName);

ItemStack repairStack = getRepairStack(toolMaterial);
if (repairStack != null && repairStack.getItem() != null)
if (repairStack != ItemStack.EMPTY)
{
int[] ids = OreDictionary.getOreIDs(repairStack);
if (ids.length == 0)
Expand Down Expand Up @@ -186,7 +186,7 @@ private void setProperty(Field field, ItemAxe axe)
@Override
public boolean onBlockDestroyed(@Nullable ItemStack itemStack, @Nullable World world, IBlockState state, @Nullable BlockPos blockPos, @Nullable EntityLivingBase entityLivingBase)
{
return itemStack != null && world != null && blockPos != null && entityLivingBase != null &&
return itemStack != ItemStack.EMPTY && world != null && blockPos != null && entityLivingBase != null &&
(Material.LEAVES.equals(state.getMaterial()) || super.onBlockDestroyed(itemStack, world, state, blockPos, entityLivingBase));
}
}
Expand Up @@ -40,7 +40,7 @@
*/
public class Constants
{
public static final String MODID = "Lumberjack";
public static final String MODID = "lumberjack";
public static final String UPDATE_URL = CoreConstants.BASE_URL + MODID + ".json";

/**
Expand Down
Expand Up @@ -105,7 +105,7 @@ public void breakEvent(BlockEvent.BreakEvent event)

// Only interact if the item matches
ItemStack itemStack = player.getHeldItemMainhand();
if (itemStack == null || !(itemStack.getItem() instanceof ItemLumberAxe)) return;
if (itemStack == ItemStack.EMPTY || !(itemStack.getItem() instanceof ItemLumberAxe)) return;

// We are chopping the current block, so save that info
pointMap.put(uuid, event.getPos());
Expand Down

0 comments on commit aa3d543

Please sign in to comment.