Skip to content

Commit

Permalink
Updated to cover MC from 1.9 to 1.10.2 and Forge >= 1887
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueAnanas committed Jul 23, 2016
1 parent f62d543 commit eaf96c5
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 16 deletions.
5 changes: 3 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ version = project.mod_version
archivesBaseName = "[${project.minecraft_version}]${project.mod_id}"

minecraft {
version = project.minecraft_version + '-' + project.forge_version + "-" + project.minecraft_version // grab latest forge
version = project.minecraft_version + '-' + project.forge_version // + "-" + project.minecraft_version // grab latest forge
mappings = project.mappings_version
runDir = 'run'
replace '@MOD_VERSION@', project.mod_version
Expand All @@ -44,11 +44,12 @@ processResources {
expand ([
'mod_version': project.mod_version,
'forge_version': project.forge_version,
'forge_versionlimit': project.forge_versionlimit,
'minecraft_version': project.minecraft_version,
])
}

// copy everything else that we didnt do before
// copy everything else that we didn't do before
from(sourceSets.main.resources.srcDirs) {
exclude '**/*.info'
exclude '**/*.properties'
Expand Down
10 changes: 4 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
minecraft_version=1.9
forge_version=12.16.0.1782
mappings_version=snapshot_20160320
mod_version=7.1
forge_version=12.16.1.1887
forge_versionlimit=12.18.2
mappings_version=stable_24
mod_version=7.1.1
mod_id=bspkrsCore
group_name=bspkrscore
appendix=universal

# extra_curse_id=-1
# extra_curse_releasetype=release
2 changes: 1 addition & 1 deletion src/main/java/bspkrs/bspkrscore/fml/bspkrsCoreMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public void serverStarting(FMLServerStartingEvent event)
@SubscribeEvent
public void onConfigChanged(OnConfigChangedEvent event)
{
if (event.modID.equals(Reference.MODID))
if (event.getModID().equals(Reference.MODID))
{
Reference.config.save();
syncConfig();
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/bspkrs/client/util/EntityUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public static EntityLivingBase getRandomLivingEntity(World world,
{
Random random = new Random();
// Get a COPY dumbass!
Set entities = new TreeSet(EntityList.stringToClassMapping.keySet());
Set entities = new TreeSet(EntityList.NAME_TO_CLASS.keySet());

if (blacklist != null)
entities.removeAll(blacklist);
Expand All @@ -230,7 +230,7 @@ public static EntityLivingBase getRandomLivingEntity(World world,
do
{
id = random.nextInt(entStrings.length);
clazz = (Class) EntityList.stringToClassMapping.get(entStrings[id]);
clazz = (Class) EntityList.NAME_TO_CLASS.get(entStrings[id]);
}
while (!EntityLivingBase.class.isAssignableFrom(clazz)
&& (++tries <= numberOfAttempts));
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/bspkrs/client/util/HUDUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,8 @@ public static void renderItemOverlayIntoGUI(FontRenderer fontRenderer, ItemStack

if (itemStack.getMaxStackSize() > 1)
count = HUDUtils.countInInventory(Minecraft.getMinecraft().thePlayer, itemStack.getItem(), itemStack.getItemDamage());
else if (itemStack.getItem().equals(Items.bow))
count = HUDUtils.countInInventory(Minecraft.getMinecraft().thePlayer, Items.arrow);
else if (itemStack.getItem().equals(Items.BOW))
count = HUDUtils.countInInventory(Minecraft.getMinecraft().thePlayer, Items.ARROW);

if (count > 1)
{
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/bspkrs/util/CommonUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ public static int parseInt(String string, int defaultValue)
public void playAtPitch(int i, World world, EntityPlayer entityplayer)
{
float f = (float) Math.pow(2D, (i - 12) / 12D);
world.playSound(entityplayer, entityplayer.getPosition(), SoundEvents.block_note_pling, SoundCategory.getByName("block"), 0.5F, f);
world.playSound(entityplayer, entityplayer.getPosition(), SoundEvents.BLOCK_NOTE_PLING, SoundCategory.getByName("block"), 0.5F, f);
}

public static boolean moveBlock(World world, BlockPos src, BlockPos tgt, boolean allowBlockReplacement)
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/mcmod.info
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"logoFile": "",
"screenshots": [],
"parent": "",
"requiredMods": ["Forge@[${forge_version},)"],
"dependencies": ["Forge@[${forge_version},)"],
"requiredMods": ["Forge@[${forge_version},${forge_versionlimit})"],
"dependencies": ["Forge@[${forge_version},${forge_versionlimit})"],
"dependants": [],
"useDependencyInformation": "true"
}]
Expand Down

0 comments on commit eaf96c5

Please sign in to comment.