Skip to content

Commit

Permalink
Merge branch 'master' into gtnewhorizons
Browse files Browse the repository at this point in the history
# Conflicts:
#	build.properties
#	src/main/java/com/detrav/DetravScannerMod.java
  • Loading branch information
Detrav committed Jan 13, 2018
2 parents 8db97f6 + 5f3cfcc commit d6694f3
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/detrav/commands/DetravScannerCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ private void process(ICommandSender sender, int aX, int aZ, String fName)
if (entity != null) {
GT_TileEntity_Ores gt_entity = (GT_TileEntity_Ores) entity;
short meta = gt_entity.getMetaData();
String name = Materials.getLocalizedNameForItem(
GT_LanguageManager.getTranslation(b.getUnlocalizedName() + "." + meta + ".name"), meta);
String name =
GT_LanguageManager.getTranslation(b.getUnlocalizedName() + "." + meta + ".name");
if(name.startsWith("Small")) continue;
if (fName == null || name.toLowerCase().contains(fName)) {
if (!ores.containsKey(name))
Expand Down
25 changes: 18 additions & 7 deletions src/main/java/com/detrav/enums/DetravToolDictNames.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,22 @@
* Created by wital_000 on 19.03.2016.
*/
public enum DetravToolDictNames {
craftingToolProPick,
craftingToolElectricProPick,
craftingToolPortableCharger,
craftingToolPortableAnvil,
craftingToolSmartPlunger,
craftingToolSmartTreeTap,
craftingToolCictuitConfigurator;
craftingToolProPick("craftingToolProPick"),
craftingToolElectricProPick("craftingToolElectricProPick"),
craftingToolPortableCharger("craftingToolPortableCharger"),
craftingToolPortableAnvil("craftingToolPortableAnvil"),
craftingToolSmartPlunger("craftingToolSmartPlunger"),
craftingToolSmartTreeTap("craftingToolSmartTreeTap");

private String mValue;

DetravToolDictNames(String aValue)
{
mValue = aValue;
}

@Override
public String toString() {
return this.mValue;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ protected void processOreProspecting(DetravMetaGeneratedTool01 aItem, ItemStack
if (aTileEntity instanceof GT_TileEntity_Ores) {
GT_TileEntity_Ores gt_entity = (GT_TileEntity_Ores) aTileEntity;
short meta = gt_entity.getMetaData();
String name = Materials.getLocalizedNameForItem(GT_LanguageManager.getTranslation("gt.blockores." + meta + ".name"), meta);
String name = GT_LanguageManager.getTranslation("gt.blockores." + meta + ".name");
addChatMassageByValue(aPlayer, -1, name);
if (!aPlayer.capabilities.isCreativeMode)
aItem.doDamage(aStack, this.mCosts);
Expand Down Expand Up @@ -119,8 +119,8 @@ protected void processOreProspecting(DetravMetaGeneratedTool01 aItem, ItemStack
tMetaID = (short)((GT_TileEntity_Ores) tTileEntity).getMetaData();
try {

String name = Materials.getLocalizedNameForItem(
GT_LanguageManager.getTranslation(tBlock.getUnlocalizedName() + "." + tMetaID + ".name"), tMetaID);
String name =
GT_LanguageManager.getTranslation(tBlock.getUnlocalizedName() + "." + tMetaID + ".name");
if (name.startsWith("Small")) if (data != 1) continue;
if (name.startsWith("Small")) if(data!=1) continue;
if (!ores.containsKey(name))
Expand Down Expand Up @@ -148,8 +148,8 @@ protected void processOreProspecting(DetravMetaGeneratedTool01 aItem, ItemStack
try {
try {
tMetaID = (short)tAssotiation.mMaterial.mMaterial.mMetaItemSubID;
String name = Materials.getLocalizedNameForItem(GT_LanguageManager.getTranslation(
"gt.blockores." + tMetaID + ".name"), tMetaID);
String name =GT_LanguageManager.getTranslation(
"gt.blockores." + tMetaID + ".name");
if (!ores.containsKey(name))
ores.put(name, 1);
else {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/detrav/net/DetravProPickPacket00.java
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public BufferedImage getImage(int posX,int posZ) {
}
rgba = tMaterial.getRGBA();
//ores.put(GT_Ore)
name = tMaterial.getLocalizedNameForItem(GT_LanguageManager.getTranslation("gt.blockores." + meta + ".name"));
name = GT_LanguageManager.getTranslation("gt.blockores." + meta + ".name");

raster.setSample(i, j, 0, rgba[0]);
raster.setSample(i, j, 1, rgba[1]);
Expand Down

0 comments on commit d6694f3

Please sign in to comment.