Particle Settings

Grinder Fix.
This commit is contained in:
AlgorithmX2
2014-01-29 20:47:55 -06:00
parent e7575c157b
commit 1b6455421e
22 changed files with 127 additions and 41 deletions
+3
View File
@@ -1,6 +1,7 @@
package appeng.core;
import java.util.List;
import java.util.Random;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.network.packet.Packet;
@@ -28,4 +29,6 @@ public abstract class CommonHelper
public abstract void spawnEnergy(World w, double posX, double posY, double posZ);
public abstract boolean shouldAddParticles(Random r);
}
+3 -1
View File
@@ -63,9 +63,11 @@ public class Configuration extends net.minecraftforge.common.Configuration imple
public String grinderOres[] = {
// Vanilla Items
"Obsidian", "EnderPearl", "Coal", "Iron", "Gold", "Charcoal",
"Obsidian", "Ender", "Coal", "Iron", "Gold", "Charcoal", "NetherQuartz",
// Common Mod Ores
"Copper", "Tin", "Silver", "Lead", "Bronze",
// AE
"CertusQuartz", "Wheat", "Fluix",
// Other Mod Ores
"Brass", "Platinum", "Nickel", "Invar", "Aluminium", "Electrum" };
+2
View File
@@ -348,6 +348,8 @@ public class Registration
feature.feature().register();
feature.postInit();
return feature.feature();
}
else if ( obj == null )
+2
View File
@@ -5,4 +5,6 @@ public interface IAEFeature
public AEFeatureHandler feature();
void postInit();
}
@@ -33,15 +33,23 @@ public class GrinderRecipeManager implements IGrinderRegistry, IOreListener
public GrinderRecipeManager() {
RecipeList = new ArrayList();
addOre( "Gold", new ItemStack( Block.oreGold ) );
addOre( "Iron", new ItemStack( Block.oreIron ) );
addIngot( "Gold", new ItemStack( Item.ingotGold ) );
addIngot( "Iron", new ItemStack( Item.ingotIron ) );
addOre( "Obsidian", new ItemStack( Block.obsidian ) );
addOre( "EnderPearl", new ItemStack( Item.enderPearl ) );
addOre( "Coal", new ItemStack( Item.coal ) );
addOre( "Charcoal", new ItemStack( Item.coal, 1, 1 ) );
addOre( "NetherQuartz", new ItemStack( Block.oreNetherQuartz ) );
addIngot( "NetherQuartz", new ItemStack( Item.netherQuartz ) );
addOre( "Gold", new ItemStack( Block.oreGold ) );
addIngot( "Gold", new ItemStack( Item.ingotGold ) );
addOre( "Iron", new ItemStack( Block.oreIron ) );
addIngot( "Iron", new ItemStack( Item.ingotIron ) );
addOre( "Obsidian", new ItemStack( Block.obsidian ) );
addIngot( "Ender", new ItemStack( Item.enderPearl ) );
addIngot( "Wheat", new ItemStack( Item.wheat ) );
OreDictionaryHandler.instance.observe( this );
}
@@ -61,8 +69,7 @@ public class GrinderRecipeManager implements IGrinderRegistry, IOreListener
return;
}
log( "Allow Grinding of " + Platform.getItemDisplayName( in ) + " to " + Platform.getItemDisplayName( out ) + " for "
+ cost );
log( "Allow Grinding of " + Platform.getItemDisplayName( in ) + " to " + Platform.getItemDisplayName( out ) + " for " + cost );
RecipeList.add( new AppEngGrinderRecipe( copy( in ), copy( out ), cost ) );
}
@@ -75,8 +82,8 @@ public class GrinderRecipeManager implements IGrinderRegistry, IOreListener
return;
}
log( "Allow Grinding of " + Platform.getItemDisplayName( in ) + " to " + Platform.getItemDisplayName( out )
+ " with optional " + Platform.getItemDisplayName( optional ) + " for " + cost );
log( "Allow Grinding of " + Platform.getItemDisplayName( in ) + " to " + Platform.getItemDisplayName( out ) + " with optional "
+ Platform.getItemDisplayName( optional ) + " for " + cost );
RecipeList.add( new AppEngGrinderRecipe( copy( in ), copy( out ), copy( optional ), chance, cost ) );
}
@@ -110,14 +117,10 @@ public class GrinderRecipeManager implements IGrinderRegistry, IOreListener
{
if ( name.equals( "Obsidian" ) )
return 1;
if ( name.equals( "EnderPearl" ) )
return 1;
if ( name.equals( "Charcoal" ) )
return 1;
if ( name.equals( "Coal" ) )
return 1;
if ( name.contains( "Quartz" ) )
return 1;
return 2;
}
@@ -200,19 +203,18 @@ public class GrinderRecipeManager implements IGrinderRegistry, IOreListener
@Override
public void oreRegistered(String Name, ItemStack item)
{
if ( Name.startsWith( "ore" ) || Name.startsWith( "ingot" ) || Name.startsWith( "dust" ) )
if ( Name.startsWith( "ore" ) || Name.startsWith( "crystal" ) || Name.startsWith( "ingot" ) || Name.startsWith( "dust" ) )
{
for (String ore : Configuration.instance.grinderOres)
{
if ( ore.equals( "CertusQuartz" ) )
continue;
if ( ore.equals( "NetherQuartz" ) )
continue;
if ( Name.equals( "ore" + ore ) )
{
addOre( ore, item );
}
else if ( Name.equals( "crystal" + ore ) )
{
addIngot( ore, item );
}
else if ( Name.equals( "ingot" + ore ) )
{
addIngot( ore, item );