Particle Settings
Grinder Fix.
This commit is contained in:
parent
e7575c157b
commit
1b6455421e
|
@ -94,7 +94,8 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||
try
|
||||
{
|
||||
ResourceLocation resLoc = new ResourceLocation( Name );
|
||||
resLoc = new ResourceLocation( resLoc.getResourceDomain(), String.format( "%s/%s%s", new Object[] { "textures/blocks", resLoc.getResourcePath(), ".png" } ) );
|
||||
resLoc = new ResourceLocation( resLoc.getResourceDomain(), String.format( "%s/%s%s", new Object[] { "textures/blocks",
|
||||
resLoc.getResourcePath(), ".png" } ) );
|
||||
|
||||
Resource res = Minecraft.getMinecraft().getResourceManager().getResource( resLoc );
|
||||
if ( res != null )
|
||||
|
@ -687,4 +688,10 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||
return AEBaseItemBlock.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit()
|
||||
{
|
||||
// override!
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ import appeng.block.AEBaseBlock;
|
|||
import appeng.client.render.BaseBlockRender;
|
||||
import appeng.client.render.blocks.RenderBlockCharger;
|
||||
import appeng.client.render.effects.LightningEffect;
|
||||
import appeng.core.CommonHelper;
|
||||
import appeng.core.Configuration;
|
||||
import appeng.core.features.AEFeature;
|
||||
import appeng.helpers.ICustomCollision;
|
||||
|
@ -86,8 +87,11 @@ public class BlockCharger extends AEBaseBlock implements ICustomCollision
|
|||
|
||||
for (int bolts = 0; bolts < 3; bolts++)
|
||||
{
|
||||
LightningEffect fx = new LightningEffect( w, xOff + 0.5 + x, yOff + 0.5 + y, zOff + 0.5 + z, 0.0D, 0.0D, 0.0D );
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx );
|
||||
if ( CommonHelper.proxy.shouldAddParticles( r ) )
|
||||
{
|
||||
LightningEffect fx = new LightningEffect( w, xOff + 0.5 + x, yOff + 0.5 + y, zOff + 0.5 + z, 0.0D, 0.0D, 0.0D );
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@ import appeng.block.AEBaseBlock;
|
|||
import appeng.client.render.BaseBlockRender;
|
||||
import appeng.client.render.blocks.RenderQuartzTorch;
|
||||
import appeng.client.render.effects.LightningEffect;
|
||||
import appeng.core.CommonHelper;
|
||||
import appeng.core.Configuration;
|
||||
import appeng.core.features.AEFeature;
|
||||
import appeng.helpers.ICustomCollision;
|
||||
|
@ -119,9 +120,12 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
|
|||
double zOff = -0.3 * up.offsetZ;
|
||||
for (int bolts = 0; bolts < 3; bolts++)
|
||||
{
|
||||
LightningEffect fx = new LightningEffect( w, xOff + 0.5 + x, yOff + 0.5 + y, zOff + 0.5 + z, 0.0D, 0.0D, 0.0D );
|
||||
if ( CommonHelper.proxy.shouldAddParticles( r ) )
|
||||
{
|
||||
LightningEffect fx = new LightningEffect( w, xOff + 0.5 + x, yOff + 0.5 + y, zOff + 0.5 + z, 0.0D, 0.0D, 0.0D );
|
||||
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx );
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,8 @@ public class BlockQuantumLinkChamber extends AEBaseBlock
|
|||
{
|
||||
if ( bridge.hasQES() )
|
||||
{
|
||||
CommonHelper.proxy.spawnEnergy( w, bx + 0.5, by + 0.5, bz + 0.5 );
|
||||
if ( CommonHelper.proxy.shouldAddParticles( r ) )
|
||||
CommonHelper.proxy.spawnEnergy( w, bx + 0.5, by + 0.5, bz + 0.5 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ import net.minecraft.client.Minecraft;
|
|||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.world.World;
|
||||
import appeng.client.render.effects.VibrantEffect;
|
||||
import appeng.core.CommonHelper;
|
||||
import appeng.core.Configuration;
|
||||
import appeng.core.features.AEFeature;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
@ -29,13 +30,16 @@ public class BlockQuartzLamp extends BlockQuartzGlass
|
|||
if ( !Configuration.instance.enableEffects )
|
||||
return;
|
||||
|
||||
double d0 = (double) (r.nextFloat() - 0.5F) * 0.96D;
|
||||
double d1 = (double) (r.nextFloat() - 0.5F) * 0.96D;
|
||||
double d2 = (double) (r.nextFloat() - 0.5F) * 0.96D;
|
||||
if ( CommonHelper.proxy.shouldAddParticles( r ) )
|
||||
{
|
||||
double d0 = (double) (r.nextFloat() - 0.5F) * 0.96D;
|
||||
double d1 = (double) (r.nextFloat() - 0.5F) * 0.96D;
|
||||
double d2 = (double) (r.nextFloat() - 0.5F) * 0.96D;
|
||||
|
||||
VibrantEffect fx = new VibrantEffect( w, 0.5 + x + d0, 0.5 + y + d1, 0.5 + z + d2, 0.0D, 0.0D, 0.0D );
|
||||
VibrantEffect fx = new VibrantEffect( w, 0.5 + x + d0, 0.5 + y + d1, 0.5 + z + d2, 0.0D, 0.0D, 0.0D );
|
||||
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx );
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.util.IOrientable;
|
||||
import appeng.api.util.IOrientableBlock;
|
||||
|
@ -34,6 +35,12 @@ public class OreQuartz extends AEBaseBlock implements IOrientableBlock
|
|||
enhanceBrightness = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit()
|
||||
{
|
||||
OreDictionary.registerOre( "oreCertusQuartz", new ItemStack( this ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Class<? extends BaseBlockRender> getRenderer()
|
||||
{
|
||||
|
|
|
@ -8,6 +8,7 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.world.World;
|
||||
import appeng.api.AEApi;
|
||||
import appeng.client.render.effects.ChargedOreEffect;
|
||||
import appeng.core.CommonHelper;
|
||||
import appeng.core.Configuration;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
@ -63,8 +64,11 @@ public class OreQuartzCharged extends OreQuartz
|
|||
break;
|
||||
}
|
||||
|
||||
ChargedOreEffect fx = new ChargedOreEffect( w, x + xOff, y + yOff, z + zOff, 0.0f, 0.0f, 0.0f );
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx );
|
||||
if ( CommonHelper.proxy.shouldAddParticles( r ) )
|
||||
{
|
||||
ChargedOreEffect fx = new ChargedOreEffect( w, x + xOff, y + yOff, z + zOff, 0.0f, 0.0f, 0.0f );
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package appeng.client;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
|
@ -104,4 +105,13 @@ public class ClientHelper extends ServerHelper
|
|||
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldAddParticles(Random r)
|
||||
{
|
||||
if ( Minecraft.getMinecraft().gameSettings.particleSetting == 0 )
|
||||
return true;
|
||||
return r.nextInt( Minecraft.getMinecraft().gameSettings.particleSetting ) == 0;
|
||||
}
|
||||
|
||||
}
|
|
@ -37,9 +37,6 @@ public class ToolBiometricCardRender implements IItemRenderer
|
|||
float f5 = ((Icon) par2Icon).getMaxU();
|
||||
float f6 = ((Icon) par2Icon).getMinV();
|
||||
float f7 = ((Icon) par2Icon).getMaxV();
|
||||
float f8 = 1.0F;
|
||||
float f9 = 0.0F;
|
||||
float f10 = 0.0F;
|
||||
float f12 = 0.0625F;
|
||||
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
|
|
@ -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);
|
||||
|
||||
}
|
||||
|
|
|
@ -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" };
|
||||
|
||||
|
|
|
@ -348,6 +348,8 @@ public class Registration
|
|||
|
||||
feature.feature().register();
|
||||
|
||||
feature.postInit();
|
||||
|
||||
return feature.feature();
|
||||
}
|
||||
else if ( obj == null )
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -49,4 +49,9 @@ public class AEBaseItem extends Item implements IAEFeature
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit()
|
||||
{
|
||||
// override!
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,14 +16,14 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
|
||||
public enum MaterialType
|
||||
{
|
||||
CertusQuartzCrystal(AEFeature.Core), CertusQuartzCrystalCharged(AEFeature.Core, EntityChargedQuartz.class),
|
||||
CertusQuartzCrystal(AEFeature.Core, "crystalCertusQuartz"), CertusQuartzCrystalCharged(AEFeature.Core, EntityChargedQuartz.class),
|
||||
|
||||
CertusQuartzDust, NetherQuartzDust(AEFeature.Core, "dustNetherQuartz"), Flour(AEFeature.Flour, "dustWheat"), GoldDust(AEFeature.Core, "dustGold"), IronDust(
|
||||
AEFeature.Core, "dustIron"), IronNugget(AEFeature.Core, "nuggetIron"),
|
||||
CertusQuartzDust(AEFeature.Core, "dustCertusQuartz"), NetherQuartzDust(AEFeature.Core, "dustNetherQuartz"), Flour(AEFeature.Flour, "dustWheat"), GoldDust(
|
||||
AEFeature.Core, "dustGold"), IronDust(AEFeature.Core, "dustIron"), IronNugget(AEFeature.Core, "nuggetIron"),
|
||||
|
||||
Silicon(AEFeature.Core, "itemSilicon"), MatterBall,
|
||||
|
||||
FluixCrystal(AEFeature.Core, "crystalFLuix"), FluixDust(AEFeature.Core, "dustFluix"), FluixPearl(AEFeature.Core, "pearlFluix"),
|
||||
FluixCrystal(AEFeature.Core, "crystalFluix"), FluixDust(AEFeature.Core, "dustFluix"), FluixPearl(AEFeature.Core, "pearlFluix"),
|
||||
|
||||
PureifiedCertusQuartzCrystal, PureifiedNetherQuartzCrystal, PureifiedFluixCrystal,
|
||||
|
||||
|
|
|
@ -27,4 +27,9 @@ public class ToolQuartzAxe extends ItemAxe implements IAEFeature
|
|||
feature = new AEFeatureHandler( EnumSet.of( Type, AEFeature.QuartzAxe ), this, Type.name() );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit()
|
||||
{
|
||||
// override!
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,4 +27,9 @@ public class ToolQuartzHoe extends ItemHoe implements IAEFeature
|
|||
feature = new AEFeatureHandler( EnumSet.of( Type, AEFeature.QuartzHoe ), this, Type.name() );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit()
|
||||
{
|
||||
// override!
|
||||
}
|
||||
}
|
|
@ -27,4 +27,9 @@ public class ToolQuartzPickaxe extends ItemPickaxe implements IAEFeature
|
|||
feature = new AEFeatureHandler( EnumSet.of( Type, AEFeature.QuartzPickaxe ), this, Type.name() );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit()
|
||||
{
|
||||
// override!
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,4 +27,9 @@ public class ToolQuartzSpade extends ItemSpade implements IAEFeature
|
|||
feature = new AEFeatureHandler( EnumSet.of( Type, AEFeature.QuartzSpade ), this, Type.name() );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit()
|
||||
{
|
||||
// override!
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,4 +25,9 @@ public class ToolQuartzSword extends ItemSword implements IAEFeature
|
|||
feature = new AEFeatureHandler( EnumSet.of( Type, AEFeature.QuartzSword ), this, Type.name() );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit()
|
||||
{
|
||||
// override!
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package appeng.server;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
|
@ -84,4 +85,10 @@ public class ServerHelper extends CommonHelper
|
|||
// :P
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldAddParticles(Random r)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue