Added missing Block.damageDropped() to OreQuartzCharged
This was previously handled by a template method, but it was removed with the api refactoring. Fixes #1174
This commit is contained in:
@@ -18,11 +18,14 @@
|
||||
|
||||
package appeng.block.solids;
|
||||
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -34,10 +37,12 @@ import appeng.client.render.effects.ChargedOreFX;
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.core.CommonHelper;
|
||||
|
||||
|
||||
public class OreQuartzCharged extends OreQuartz
|
||||
{
|
||||
|
||||
public OreQuartzCharged() {
|
||||
public OreQuartzCharged()
|
||||
{
|
||||
super( OreQuartzCharged.class );
|
||||
this.setBoostBrightnessLow( 2 );
|
||||
this.setBoostBrightnessHigh( 5 );
|
||||
@@ -56,39 +61,50 @@ public class OreQuartzCharged extends OreQuartz
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void randomDisplayTick(World w, int x, int y, int z, Random r)
|
||||
public int damageDropped( int id )
|
||||
{
|
||||
for ( ItemStack crystalStack : AEApi.instance().definitions().materials().certusQuartzCrystalCharged().maybeStack( 1 ).asSet() )
|
||||
{
|
||||
return crystalStack.getItemDamage();
|
||||
}
|
||||
|
||||
throw new MissingDefinition( "Tried to access charged certus quartz crystal, even though they are disabled" );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public void randomDisplayTick( World w, int x, int y, int z, Random r )
|
||||
{
|
||||
if ( !AEConfig.instance.enableEffects )
|
||||
return;
|
||||
|
||||
double xOff = (r.nextFloat());
|
||||
double yOff = (r.nextFloat());
|
||||
double zOff = (r.nextFloat());
|
||||
double xOff = ( r.nextFloat() );
|
||||
double yOff = ( r.nextFloat() );
|
||||
double zOff = ( r.nextFloat() );
|
||||
|
||||
switch (r.nextInt( 6 ))
|
||||
switch ( r.nextInt( 6 ) )
|
||||
{
|
||||
case 0:
|
||||
xOff = -0.01;
|
||||
break;
|
||||
case 1:
|
||||
yOff = -0.01;
|
||||
break;
|
||||
case 2:
|
||||
xOff = -0.01;
|
||||
break;
|
||||
case 3:
|
||||
zOff = -0.01;
|
||||
break;
|
||||
case 4:
|
||||
xOff = 1.01;
|
||||
break;
|
||||
case 5:
|
||||
yOff = 1.01;
|
||||
break;
|
||||
case 6:
|
||||
zOff = 1.01;
|
||||
break;
|
||||
case 0:
|
||||
xOff = -0.01;
|
||||
break;
|
||||
case 1:
|
||||
yOff = -0.01;
|
||||
break;
|
||||
case 2:
|
||||
xOff = -0.01;
|
||||
break;
|
||||
case 3:
|
||||
zOff = -0.01;
|
||||
break;
|
||||
case 4:
|
||||
xOff = 1.01;
|
||||
break;
|
||||
case 5:
|
||||
yOff = 1.01;
|
||||
break;
|
||||
case 6:
|
||||
zOff = 1.01;
|
||||
break;
|
||||
}
|
||||
|
||||
if ( CommonHelper.proxy.shouldAddParticles( r ) )
|
||||
|
||||
Reference in New Issue
Block a user