Skip to content

Commit

Permalink
- Instead of having a separate list of wood types the mod now uses th…
Browse files Browse the repository at this point in the history
…e TFC one, if/when more wood types are added they should work automatically

- Thanks to Cubey79 for providing us with textures for all the new TFC+ wood types
- Minor refactoring
  • Loading branch information
nuckable committed Feb 1, 2021
1 parent 84cfafd commit bfbe838
Show file tree
Hide file tree
Showing 91 changed files with 100 additions and 22 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ buildscript {

apply plugin: 'forge'

version = "1.0.5"
version = "1.0.6"
group= "org.rbh.tfcadditions"
archivesBaseName = "[1.7.10]TFC-Additions"

Expand Down
7 changes: 4 additions & 3 deletions src/main/java/org/rbh/tfcadditions/Blocks/BlockPlanks.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.dunk.tfc.Blocks.BlockTerra;
import com.dunk.tfc.Items.Tools.ItemHammer;
import com.dunk.tfc.api.Constant.Global;
import com.dunk.tfc.api.Tools.IToolChisel;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
Expand Down Expand Up @@ -100,11 +101,11 @@ protected String[] getMetaNames(NameType bracket){
String[] MetaNames;
if(bracket == NameType.FIRST_BRACKET){
MetaNames = new String[16];
System.arraycopy(Names.WOOD_ALL, 0, MetaNames, 0, 16);
System.arraycopy(Global.WOOD_ALL, 0, MetaNames, 0, 16);
return MetaNames;
} else if(bracket == NameType.SECOND_BRACKET){
MetaNames = new String[Names.WOOD_ALL.length - 16];
System.arraycopy(Names.WOOD_ALL, 16, MetaNames, 0, Names.WOOD_ALL.length - 16);
MetaNames = new String[Global.WOOD_ALL.length - 16];
System.arraycopy(Global.WOOD_ALL, 16, MetaNames, 0, Global.WOOD_ALL.length - 16);
return MetaNames;
}
return null;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.rbh.tfcadditions.Blocks.Dent;

import com.dunk.tfc.api.Constant.Global;
import net.minecraft.block.material.Material;
import net.minecraft.util.IIcon;
import org.rbh.tfcadditions.Blocks.BlockChisel;
Expand All @@ -12,8 +13,8 @@ public class BlockPlank2Dent extends BlockChisel {
public BlockPlank2Dent()
{
super(Material.wood, "wood", "Plank Outline");
names = new String[Names.WOOD_ALL.length - 16];
System.arraycopy(Names.WOOD_ALL, 16, names, 0, Names.WOOD_ALL.length - 16);
names = new String[Global.WOOD_ALL.length - 16];
System.arraycopy(Global.WOOD_ALL, 16, names, 0, Global.WOOD_ALL.length - 16);
icons = new IIcon[names.length];
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.rbh.tfcadditions.Blocks.Dent;

import com.dunk.tfc.api.Constant.Global;
import net.minecraft.block.material.Material;
import net.minecraft.util.IIcon;
import org.rbh.tfcadditions.Blocks.BlockChisel;
Expand All @@ -13,7 +14,7 @@ public BlockPlankDent()
{
super(Material.wood, "wood", "Plank Outline");
names = new String[16];
System.arraycopy(Names.WOOD_ALL, 0, names, 0, 16);
System.arraycopy(Global.WOOD_ALL, 0, names, 0, 16);
icons = new IIcon[names.length];
}
}
3 changes: 2 additions & 1 deletion src/main/java/org/rbh/tfcadditions/Core/Recipes.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.rbh.tfcadditions.Core;

import com.dunk.tfc.api.Constant.Global;
import com.dunk.tfc.api.TFCItems;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.item.Item;
Expand Down Expand Up @@ -31,7 +32,7 @@ public static void registerRecipes(){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.SteelPlaner, 1), "SHS", "WWW", 'S', "stickWood", 'H', TFCItems.steelChiselHead, 'W', "woodLumber"));

//Wood items and blocks
for(int i = 0; i < Names.WOOD_ALL.length; i++){
for(int i = 0; i < Global.WOOD_ALL.length; i++){
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.PlankPlaned, 1, i), new ItemStack(TFCItems.singlePlank, 1, i), "itemPlaner"));

int l = i%16;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.rbh.tfcadditions.Items.ItemBlocks;

import com.dunk.tfc.Items.ItemBlocks.ItemTerraBlock;
import com.dunk.tfc.api.Constant.Global;
import net.minecraft.block.Block;
import org.rbh.tfcadditions.Blocks.Dent.BlockIGEXDent;
import org.rbh.tfcadditions.Blocks.Dent.BlockIGINDent;
Expand All @@ -27,6 +28,6 @@ public ItemBlock(Block block){
else if(block instanceof BlockIGINDentSmall) metaNames = Names.STONE_IGIN;
else if(block instanceof BlockSEDDent) metaNames = Names.STONE_SED;
else if(block instanceof BlockSEDDentSmall) metaNames = Names.STONE_SED;
else if(block instanceof BlockPlankDent) metaNames = Names.WOOD_ALL;
else if(block instanceof BlockPlankDent) metaNames = Global.WOOD_ALL;
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.rbh.tfcadditions.Items.ItemBlocks;

import com.dunk.tfc.Items.ItemBlocks.ItemTerraBlock;
import com.dunk.tfc.api.Constant.Global;
import net.minecraft.block.Block;
import org.rbh.tfcadditions.Blocks.BlockPlanks;
import org.rbh.tfcadditions.Blocks.Dent.BlockPlank2Dent;
Expand All @@ -17,11 +18,11 @@ public ItemBlockPlanks(Block block)

if(block instanceof BlockPlankDent) {
metaNames = new String[16];
System.arraycopy(Names.WOOD_ALL, 0, metaNames, 0, 16);
System.arraycopy(Global.WOOD_ALL, 0, metaNames, 0, 16);
}
else if(block instanceof BlockPlank2Dent) {
metaNames = new String[Names.WOOD_ALL.length - 16];
System.arraycopy(Names.WOOD_ALL, 16, metaNames, 0, Names.WOOD_ALL.length - 16);
metaNames = new String[Global.WOOD_ALL.length - 16];
System.arraycopy(Global.WOOD_ALL, 16, metaNames, 0, Global.WOOD_ALL.length - 16);
}
else if(block instanceof BlockPlanks){
metaNames = ((BlockPlanks) block).getNames();
Expand Down
11 changes: 6 additions & 5 deletions src/main/java/org/rbh/tfcadditions/Items/ItemPlankPlaned.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.rbh.tfcadditions.Items;

import com.dunk.tfc.Items.ItemTerra;
import com.dunk.tfc.api.Constant.Global;
import com.dunk.tfc.api.Enums.EnumSize;
import com.dunk.tfc.api.Enums.EnumWeight;
import net.minecraft.client.renderer.texture.IIconRegister;
Expand All @@ -18,14 +19,14 @@
*/
public class ItemPlankPlaned extends ItemTerra {

private IIcon[] icons = new IIcon[Names.WOOD_ALL.length];
private IIcon[] icons = new IIcon[Global.WOOD_ALL.length];

ItemPlankPlaned(){
super();
this.hasSubtypes = true;
this.setMaxDamage(0);
setCreativeTab(CreativeTabs.TFCAdditions_Tab);
this.metaNames = Names.WOOD_ALL.clone();
this.metaNames = Global.WOOD_ALL.clone();
this.setWeight(EnumWeight.LIGHT);
this.setSize(EnumSize.MEDIUM);
}
Expand All @@ -39,15 +40,15 @@ public IIcon getIconFromDamage(int meta)
@Override
public void registerIcons(IIconRegister registerer)
{
for(int i = 0; i < Names.WOOD_ALL.length; i++) {
icons[i] = registerer.registerIcon(Reference.ModID + ":" + "wood/"+Names.WOOD_ALL[i]+" Plank Planed");
for(int i = 0; i < Global.WOOD_ALL.length; i++) {
icons[i] = registerer.registerIcon(Reference.ModID + ":" + "wood/"+Global.WOOD_ALL[i]+" Plank Planed");
}
}

@Override
public void getSubItems(Item par1, net.minecraft.creativetab.CreativeTabs par2CreativeTabs, List list)
{
for(int i = 0; i < Names.WOOD_ALL.length; i++) {
for(int i = 0; i < Global.WOOD_ALL.length; i++) {
list.add(new ItemStack(this,1,i));
}
}
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/org/rbh/tfcadditions/Reference/Names.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
package org.rbh.tfcadditions.Reference;

import com.dunk.tfc.api.Enums.EnumFuelMaterial;

/**
* Created by raymondbh on 15.07.2015.
*/
public class Names {

public static final String[] STONE_IGIN = new String[]{"Granite", "Diorite", "Gabbro"};
public static final String[] STONE_SED = new String[]{"Shale", "Claystone", "Rock Salt", "Limestone", "Conglomerate", "Dolomite", "Chert", "Chalk"};
public static final String[] STONE_SED = new String[]{"Shale", "Claystone", "Rock Salt", "Limestone", "Conglomerate",
"Dolomite", "Chert", "Chalk"};
public static final String[] STONE_IGEX = new String[]{"Rhyolite", "Basalt", "Andesite", "Dacite"};
public static final String[] STONE_MM = new String[]{"Quartzite", "Slate", "Phyllite", "Schist", "Gneiss", "Marble"};

public static String[] WOOD_ALL = new String[]{"Oak", "Aspen", "Birch", "Chestnut", "Douglas Fir", "Hickory", "Maple", "Ash", "Pine", "Sequoia", "Spruce", "Sycamore", "White Cedar", "White Elm", "Willow", "Kapok", "Acacia"};
}
5 changes: 4 additions & 1 deletion src/main/java/org/rbh/tfcadditions/Reference/Reference.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class Reference {

public static final int VersionMajor = 1;
public static final int VersionMinor = 0;
public static final int VersionRevision = 5;
public static final int VersionRevision = 6;

public static final String ModVersion = VersionMajor + "." + VersionMinor + "." + VersionRevision;
//public static final String TFCVersion = "@TFCVERSION@";
Expand All @@ -22,4 +22,7 @@ public class Reference {
public static final String AssetPathGui = "textures/gui/";

public static final String GUI_FACTORY = "org.rbh.tfcadditions.Config.GUIFactory";

public static final String ModDependencies = "required-after:terrafirmacraftplus" +
";required-after:ctmlib";
}
2 changes: 1 addition & 1 deletion src/main/java/org/rbh/tfcadditions/TFCAdditions.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* Created by raymondbh on 15.07.2015.
*/

@Mod(modid = Reference.ModID, name = Reference.ModName, version = Reference.ModVersion, guiFactory = Reference.GUI_FACTORY)
@Mod(modid = Reference.ModID, name = Reference.ModName, version = Reference.ModVersion, guiFactory = Reference.GUI_FACTORY, dependencies = Reference.ModDependencies)
public class TFCAdditions {

public static final Logger LOG = LogManager.getLogger(Reference.ModID);
Expand Down
66 changes: 66 additions & 0 deletions src/main/resources/assets/tfcadditions/lang/en_US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,17 @@ tile.PlanksOutline.White Elm.name=White Elm with Outline
tile.PlanksOutline.Willow.name=Willow with Outline
tile.PlanksOutline.Kapok.name=Kapok with Outline
tile.PlanksOutline2.Acacia.name=Acacia with Outline
tile.PlanksOutline2.Bamboo.name=Bamboo with Outline
tile.PlanksOutline2.Baobab.name=Baobab with Outline
tile.PlanksOutline2.Ebony.name=Ebony with Outline
tile.PlanksOutline2.Fever.name=Fever with Outline
tile.PlanksOutline2.Fruitwood.name=Fruitwood with Outline
tile.PlanksOutline2.Gingko.name=Gingko with Outline
tile.PlanksOutline2.Limba.name=Limba with Outline
tile.PlanksOutline2.Mahogany.name=Mahogany with Outline
tile.PlanksOutline2.Mangrove.name=Mangrove with Outline
tile.PlanksOutline2.Teak.name=Teak with Outline
tile.PlanksOutline2.Palm.name=Palm with Outline

tile.PlanksParquet.Oak.name=Oak Parquet
tile.PlanksParquet.Aspen.name=Aspen Parquet
Expand All @@ -94,6 +105,17 @@ tile.PlanksParquet.White Elm.name=White Elm Parquet
tile.PlanksParquet.Willow.name=Willow Parquet
tile.PlanksParquet.Kapok.name=Kapok Parquet
tile.PlanksParquet2.Acacia.name=Acacia Parquet
tile.PlanksParquet2.Bamboo.name=Bamboo Parquet
tile.PlanksParquet2.Baobab.name=Baobab Parquet
tile.PlanksParquet2.Ebony.name=Ebony Parquet
tile.PlanksParquet2.Fever.name=Fever Parquet
tile.PlanksParquet2.Fruitwood.name=Fruitwood Parquet
tile.PlanksParquet2.Gingko.name=Gingko Parquet
tile.PlanksParquet2.Limba.name=Limba Parquet
tile.PlanksParquet2.Mahogany.name=Mahogany Parquet
tile.PlanksParquet2.Mangrove.name=Mangrove Parquet
tile.PlanksParquet2.Teak.name=Teak Parquet
tile.PlanksParquet2.Palm.name=Palm Parquet

tile.PlanksNorm.Oak.name=Oak Planks
tile.PlanksNorm.Aspen.name=Aspen Planks
Expand All @@ -112,6 +134,17 @@ tile.PlanksNorm.White Elm.name=White Elm Planks
tile.PlanksNorm.Willow.name=Willow Planks
tile.PlanksNorm.Kapok.name=Kapok Planks
tile.PlanksNorm2.Acacia.name=Acacia Planks
tile.PlanksNorm2.Bamboo.name=Bamboo Planks
tile.PlanksNorm2.Baobab.name=Baobab Planks
tile.PlanksNorm2.Ebony.name=Ebony Planks
tile.PlanksNorm2.Fever.name=Fever Planks
tile.PlanksNorm2.Fruitwood.name=Fruitwood Planks
tile.PlanksNorm2.Gingko.name=Gingko Planks
tile.PlanksNorm2.Limba.name=Limba Planks
tile.PlanksNorm2.Mahogany.name=Mahogany Planks
tile.PlanksNorm2.Mangrove.name=Mangrove Planks
tile.PlanksNorm2.Teak.name=Teak Planks
tile.PlanksNorm2.Palm.name=Palm Planks

tile.PlanksVert.Oak.name=Oak Vertical Planks
tile.PlanksVert.Aspen.name=Aspen Vertical Planks
Expand All @@ -130,6 +163,17 @@ tile.PlanksVert.White Elm.name=White Elm Vertical Planks
tile.PlanksVert.Willow.name=Willow Vertical Planks
tile.PlanksVert.Kapok.name=Kapok Vertical Planks
tile.PlanksVert2.Acacia.name=Acacia Vertical Planks
tile.PlanksVert2.Bamboo.name=Bamboo Vertical Planks
tile.PlanksVert2.Baobab.name=Baobab Vertical Planks
tile.PlanksVert2.Ebony.name=Ebony Vertical Planks
tile.PlanksVert2.Fever.name=Fever Vertical Planks
tile.PlanksVert2.Fruitwood.name=Fruitwood Vertical Planks
tile.PlanksVert2.Gingko.name=Gingko Vertical Planks
tile.PlanksVert2.Limba.name=Limba Vertical Planks
tile.PlanksVert2.Mahogany.name=Mahogany Vertical Planks
tile.PlanksVert2.Mangrove.name=Mangrove Vertical Planks
tile.PlanksVert2.Teak.name=Teak Vertical Planks
tile.PlanksVert2.Palm.name=Palm Vertical Planks

tile.PlanksLarge.Oak.name=Oak Large Planks
tile.PlanksLarge.Aspen.name=Aspen Large Planks
Expand All @@ -148,6 +192,17 @@ tile.PlanksLarge.White Elm.name=White Elm Large Planks
tile.PlanksLarge.Willow.name=Willow Large Planks
tile.PlanksLarge.Kapok.name=Kapok Large Planks
tile.PlanksLarge2.Acacia.name=Acacia Large Planks
tile.PlanksLarge2.Bamboo.name=Bamboo Large Planks
tile.PlanksLarge2.Baobab.name=Baobab Large Planks
tile.PlanksLarge2.Ebony.name=Ebony Large Planks
tile.PlanksLarge2.Fever.name=Fever Large Planks
tile.PlanksLarge2.Fruitwood.name=Fruitwood Large Planks
tile.PlanksLarge2.Gingko.name=Gingko Large Planks
tile.PlanksLarge2.Limba.name=Limba Large Planks
tile.PlanksLarge2.Mahogany.name=Mahogany Large Planks
tile.PlanksLarge2.Mangrove.name=Mangrove Large Planks
tile.PlanksLarge2.Teak.name=Teak Large Planks
tile.PlanksLarge2.Palm.name=Palm Large Planks

item.Plank Planed.Oak.name=Planed Oak Plank
item.Plank Planed.Aspen.name=Planed Aspen Plank
Expand All @@ -166,6 +221,17 @@ item.Plank Planed.White Elm.name=Planed White Elm Plank
item.Plank Planed.Willow.name=Planed Willow Plank
item.Plank Planed.Kapok.name=Planed Kapok Plank
item.Plank Planed.Acacia.name=Planed Acacia Plank
item.Plank Planed.Bamboo.name=Planed Bamboo Plank
item.Plank Planed.Baobab.name=Planed Baobab Plank
item.Plank Planed.Ebony.name=Planed Ebony Plank
item.Plank Planed.Fever.name=Planed Fever Plank
item.Plank Planed.Fruitwood.name=Planed Fruitwood Plank
item.Plank Planed.Gingko.name=Planed Gingko Plank
item.Plank Planed.Limba.name=Planed Limba Plank
item.Plank Planed.Mahogany.name=Planed Mahogany Plank
item.Plank Planed.Mangrove.name=Planed Mangrove Plank
item.Plank Planed.Teak.name=Planed Teak Plank
item.Plank Planed.Palm.name=Planed Palm Plank

item.Bismuth Bronze Planer.name=Bismuth Bronze Planer
item.Black Bronze Planer.name=Black Bronze Planer
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/main/resources/mcmod.info
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"screenshots": [ ],
"parent": "",
"requiredMods": ["Forge", "terrafirmacraftplus" ],
"dependencies": ["terrafirmacraftplus", "NotEnoughItems"],
"dependencies": ["terrafirmacraftplus", "NotEnoughItems", "CTMLib"],
"dependants": [ ],
"useDependencyInformation": "true"
}]
Expand Down

0 comments on commit bfbe838

Please sign in to comment.