Skip to content

Commit

Permalink
Don't oredict when we don't need to, also stop bolts being used as ar…
Browse files Browse the repository at this point in the history
…rows.

Unfortunately this also breaks Crossbows more, but they weren't that
useful right now anyway.
  • Loading branch information
jriwanek committed Apr 26, 2016
1 parent 04a813a commit fc2f190
Show file tree
Hide file tree
Showing 20 changed files with 22 additions and 45 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,4 @@ run

/README.txt
/forge-*-changelog.txt
# /gradlew
# /gradlew.bat
gradle.properties
4 changes: 1 addition & 3 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
1) Disabled Recipes for Fishing Rod, Crossbow, Horse Armor & Bolts (They're all pretty buggy currently)
2) Enabled Bows & Arrows (Textures arn't 100% and there are issues, but they're not major ones)
3) Added Remaining Textures
1) Quick fix for bolts being useable as arrows.
14 changes: 10 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,21 @@ allprojects {
targetCompatibility = 1.8
}

version = "0.9.2"
version = "0.9.2.1"
group= "modernmetals" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "ModernMetals"

minecraft {
version = "1.9-12.16.0.1865-1.9"
runDir = "run"
mappings = "snapshot_20160424"
mappings = "snapshot_20160425"
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
}

dependencies {
compile files(
'libs/BaseMetals_1.9-API-2.2.0.jar',
'libs/PowerAdvantage_1.9.0-API-2.1.0.jar',
'lib/BaseMetals/BaseMetals_1.9-API-2.2.1.jar',
'lib/PowerAdvantage/PowerAdvantage_1.9.0-API-2.1.0.jar',
)
}

Expand Down Expand Up @@ -80,13 +80,19 @@ task apiJar(type: Jar) {
from apiClasses
}

task deobfJar(type: Jar) {
from(sourceSets.main.output) {
classifier = "deobf"
}
}
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}

artifacts {
// archives apiJar
archives deobfJar
archives javadocJar
}

Expand Down
Binary file added lib/BaseMetals/BaseMetals-2.2.1.zip
Binary file not shown.
Binary file added lib/BaseMetals/BaseMetals-javadoc.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file removed libs/BaseMetals-javadoc.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion src/main/java/modernmetals/ModernMetals.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class ModernMetals
public static ModernMetals INSTANCE = null;
public static final String MODID = "modernmetals";
public static final String NAME = "Modern Metals";
public static final String VERSION = "0.9.2";
public static final String VERSION = "0.9.2.1";

/** All ore-spawn files discovered in the ore-spawn folder */
public static final List<Path> oreSpawnConfigFiles = new LinkedList<>();
Expand Down
1 change: 0 additions & 1 deletion src/main/java/modernmetals/init/Recipes.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import modernmetals.init.Materials;
import cyano.basemetals.material.MetalMaterial;
import cyano.basemetals.registry.CrusherRecipeRegistry;
import net.minecraft.init.Blocks;
import net.minecraft.block.Block;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/modernmetals/items/ItemMetalBolt.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
import cyano.basemetals.registry.IOreDictionaryEntry;
import net.minecraft.creativetab.CreativeTabs;

public class ItemMetalBolt extends net.minecraft.item.ItemArrow implements IOreDictionaryEntry, IMetalObject{
public class ItemMetalBolt extends net.minecraft.item.Item implements IOreDictionaryEntry, IMetalObject{
protected final MetalMaterial metal;
private final String oreDict;
public ItemMetalBolt(MetalMaterial metal){
this.metal = metal;
this.setCreativeTab(CreativeTabs.MATERIALS);
this.oreDict = "bolt"+metal.getCapitalizedName();
this.oreDict = "ammoBolt";
}

public String getOreDictionaryName(){
Expand Down
9 changes: 2 additions & 7 deletions src/main/java/modernmetals/items/ItemMetalBow.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,19 @@
import cyano.basemetals.init.Materials;
import cyano.basemetals.items.MetalToolEffects;
import cyano.basemetals.material.MetalMaterial;
import cyano.basemetals.registry.IOreDictionaryEntry;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.oredict.OreDictionary;

public class ItemMetalBow extends net.minecraft.item.ItemBow implements IOreDictionaryEntry {
public class ItemMetalBow extends net.minecraft.item.ItemBow {

protected final MetalMaterial metal;
protected final String repairOreDictName;
protected final boolean regenerates;
protected final long regenInterval = 200;
private final String oreDict;

public ItemMetalBow(MetalMaterial metal){
this.metal = metal;
Expand All @@ -31,12 +29,8 @@ public ItemMetalBow(MetalMaterial metal){
} else {
regenerates = false;
}
this.oreDict = "bow"+metal.getCapitalizedName();
}

public String getOreDictionaryName(){
return oreDict;
}

// TODO: Test this
@Override
Expand All @@ -60,6 +54,7 @@ public String getMaterialName() {
return metal.getName();
}

@SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean b){
super.addInformation(stack,player,list,b);
Expand Down
10 changes: 2 additions & 8 deletions src/main/java/modernmetals/items/ItemMetalCrossbow.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,19 @@
import cyano.basemetals.init.Materials;
import cyano.basemetals.items.MetalToolEffects;
import cyano.basemetals.material.MetalMaterial;
import cyano.basemetals.registry.IOreDictionaryEntry;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.oredict.OreDictionary;

public class ItemMetalCrossbow extends net.minecraft.item.ItemBow implements IOreDictionaryEntry {
public class ItemMetalCrossbow extends net.minecraft.item.Item {

protected final MetalMaterial metal;
protected final String repairOreDictName;
protected final boolean regenerates;
protected final long regenInterval = 200;
private final String oreDict;

public ItemMetalCrossbow(MetalMaterial metal){
this.metal = metal;
Expand All @@ -31,11 +29,6 @@ public ItemMetalCrossbow(MetalMaterial metal){
} else {
regenerates = false;
}
this.oreDict = "crossbow"+metal.getCapitalizedName();
}

public String getOreDictionaryName(){
return oreDict;
}

// TODO: Test this
Expand All @@ -60,6 +53,7 @@ public String getMaterialName() {
return metal.getName();
}

@SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean b){
super.addInformation(stack,player,list,b);
Expand Down
10 changes: 2 additions & 8 deletions src/main/java/modernmetals/items/ItemMetalFishingRod.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import cyano.basemetals.items.MetalToolEffects;
import cyano.basemetals.material.IMetalObject;
import cyano.basemetals.material.MetalMaterial;
import cyano.basemetals.registry.IOreDictionaryEntry;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
Expand All @@ -20,13 +19,12 @@
import net.minecraftforge.fml.relauncher.SideOnly;
import net.minecraftforge.oredict.OreDictionary;

public class ItemMetalFishingRod extends ItemFishingRod implements IOreDictionaryEntry, IMetalObject {
public class ItemMetalFishingRod extends ItemFishingRod implements IMetalObject {

private final MetalMaterial metal;
protected final String repairOreDictName;
protected final boolean regenerates;
protected final long regenInterval = 200;
private final String oreDict;

public ItemMetalFishingRod(MetalMaterial m){
this.metal = m;
Expand All @@ -46,11 +44,6 @@ public float apply(ItemStack stack, World worldIn, EntityLivingBase entityIn)
return entityIn == null ? 0.0F : (entityIn.getHeldItemMainhand() == stack && entityIn instanceof EntityPlayer && ((EntityPlayer)entityIn).fishEntity != null ? 1.0F : 0.0F);
}
});
this.oreDict = "fishingrod"+metal.getCapitalizedName();
}

public String getOreDictionaryName(){
return oreDict;
}

// TODO: Test this
Expand All @@ -75,6 +68,7 @@ public String getMaterialName() {
return metal.getName();
}

@SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean b){
super.addInformation(stack,player,list,b);
Expand Down
11 changes: 2 additions & 9 deletions src/main/java/modernmetals/items/ItemMetalShears.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,20 @@

import cyano.basemetals.init.Materials;
import cyano.basemetals.items.MetalToolEffects;
import cyano.basemetals.material.IMetalObject;
import cyano.basemetals.material.MetalMaterial;
import cyano.basemetals.registry.IOreDictionaryEntry;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.oredict.OreDictionary;

public class ItemMetalShears extends net.minecraft.item.ItemShears implements IOreDictionaryEntry {
public class ItemMetalShears extends net.minecraft.item.ItemShears {

protected final MetalMaterial metal;
protected final String repairOreDictName;
protected final boolean regenerates;
protected final long regenInterval = 200;
private final String oreDict;
public ItemMetalShears(MetalMaterial metal){
this.metal = metal;
this.setMaxDamage(metal.getToolDurability());
Expand All @@ -31,11 +28,6 @@ public ItemMetalShears(MetalMaterial metal){
} else {
regenerates = false;
}
this.oreDict = "shears"+metal.getCapitalizedName();
}

public String getOreDictionaryName(){
return oreDict;
}

// TODO: Test this
Expand All @@ -60,6 +52,7 @@ public String getMaterialName() {
return metal.getName();
}

@SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean b){
super.addInformation(stack,player,list,b);
Expand Down

0 comments on commit fc2f190

Please sign in to comment.