2013-12-27 23:59:59 +01:00
|
|
|
package appeng.client;
|
|
|
|
|
2014-02-20 05:20:38 +01:00
|
|
|
import static net.minecraftforge.client.IItemRenderer.ItemRenderType.ENTITY;
|
|
|
|
import static net.minecraftforge.client.IItemRenderer.ItemRendererHelper.BLOCK_3D;
|
|
|
|
|
2014-05-26 10:25:17 +02:00
|
|
|
import java.io.IOException;
|
2013-12-27 23:59:59 +01:00
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.List;
|
2014-01-30 03:47:55 +01:00
|
|
|
import java.util.Random;
|
2013-12-27 23:59:59 +01:00
|
|
|
|
2014-02-20 05:20:38 +01:00
|
|
|
import net.minecraft.block.Block;
|
2013-12-27 23:59:59 +01:00
|
|
|
import net.minecraft.client.Minecraft;
|
2014-02-20 05:20:38 +01:00
|
|
|
import net.minecraft.client.gui.FontRenderer;
|
2014-01-28 18:29:17 +01:00
|
|
|
import net.minecraft.client.particle.EntityFX;
|
2014-02-20 05:20:38 +01:00
|
|
|
import net.minecraft.client.renderer.RenderBlocks;
|
|
|
|
import net.minecraft.client.renderer.entity.RenderItem;
|
2013-12-27 23:59:59 +01:00
|
|
|
import net.minecraft.client.renderer.entity.RenderManager;
|
2014-02-20 05:20:38 +01:00
|
|
|
import net.minecraft.entity.item.EntityItem;
|
2013-12-27 23:59:59 +01:00
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
2014-02-09 02:34:52 +01:00
|
|
|
import net.minecraft.init.Items;
|
2014-02-20 05:20:38 +01:00
|
|
|
import net.minecraft.item.ItemBlock;
|
|
|
|
import net.minecraft.item.ItemStack;
|
2014-02-16 22:28:50 +01:00
|
|
|
import net.minecraft.util.MovingObjectPosition;
|
2014-07-18 03:16:53 +02:00
|
|
|
import net.minecraft.util.Vec3;
|
2013-12-27 23:59:59 +01:00
|
|
|
import net.minecraft.world.World;
|
2014-02-20 05:20:38 +01:00
|
|
|
import net.minecraftforge.client.ForgeHooksClient;
|
|
|
|
import net.minecraftforge.client.IItemRenderer;
|
|
|
|
import net.minecraftforge.client.MinecraftForgeClient;
|
2014-05-26 10:25:17 +02:00
|
|
|
import net.minecraftforge.client.event.MouseEvent;
|
2014-07-21 05:45:08 +02:00
|
|
|
import net.minecraftforge.client.event.RenderLivingEvent;
|
2013-12-27 23:59:59 +01:00
|
|
|
import net.minecraftforge.client.event.TextureStitchEvent;
|
|
|
|
import net.minecraftforge.common.MinecraftForge;
|
2014-02-20 05:20:38 +01:00
|
|
|
|
|
|
|
import org.lwjgl.opengl.GL11;
|
|
|
|
|
2014-07-21 05:45:08 +02:00
|
|
|
import appeng.api.util.AEColor;
|
2013-12-27 23:59:59 +01:00
|
|
|
import appeng.block.AEBaseBlock;
|
|
|
|
import appeng.client.render.BaseBlockRender;
|
|
|
|
import appeng.client.render.TESRWrapper;
|
|
|
|
import appeng.client.render.WorldRender;
|
2014-07-09 10:17:11 +02:00
|
|
|
import appeng.client.render.effects.AssemblerFX;
|
2014-07-07 04:04:58 +02:00
|
|
|
import appeng.client.render.effects.CraftingFx;
|
2014-01-28 20:27:22 +01:00
|
|
|
import appeng.client.render.effects.EnergyFx;
|
2014-07-18 03:16:53 +02:00
|
|
|
import appeng.client.render.effects.LightningArcFX;
|
2014-07-07 04:04:58 +02:00
|
|
|
import appeng.client.render.effects.LightningFX;
|
|
|
|
import appeng.client.render.effects.VibrantFX;
|
2013-12-27 23:59:59 +01:00
|
|
|
import appeng.client.texture.CableBusTextures;
|
2014-05-26 03:58:44 +02:00
|
|
|
import appeng.client.texture.ExtraBlockTextures;
|
2014-05-26 10:25:17 +02:00
|
|
|
import appeng.client.texture.ExtraItemTextures;
|
2014-02-23 23:50:53 +01:00
|
|
|
import appeng.core.AEConfig;
|
2014-05-26 10:25:17 +02:00
|
|
|
import appeng.core.AELog;
|
2014-02-23 23:50:53 +01:00
|
|
|
import appeng.core.CommonHelper;
|
2014-05-26 10:25:17 +02:00
|
|
|
import appeng.core.sync.network.NetworkHandler;
|
2014-07-09 10:17:11 +02:00
|
|
|
import appeng.core.sync.packets.PacketAssemblerAnimation;
|
2014-05-26 10:25:17 +02:00
|
|
|
import appeng.core.sync.packets.PacketValueConfig;
|
2014-07-07 04:04:58 +02:00
|
|
|
import appeng.entity.EntityFloatingItem;
|
2013-12-27 23:59:59 +01:00
|
|
|
import appeng.entity.EntityTinyTNTPrimed;
|
2014-07-07 04:04:58 +02:00
|
|
|
import appeng.entity.RenderFloatingItem;
|
2014-02-23 02:28:52 +01:00
|
|
|
import appeng.entity.RenderTinyTNTPrimed;
|
2014-05-26 10:25:17 +02:00
|
|
|
import appeng.helpers.IMouseWheelItem;
|
2014-07-21 05:45:08 +02:00
|
|
|
import appeng.hooks.TickHandler;
|
|
|
|
import appeng.hooks.TickHandler.PlayerColor;
|
2013-12-27 23:59:59 +01:00
|
|
|
import appeng.server.ServerHelper;
|
|
|
|
import appeng.util.Platform;
|
|
|
|
import cpw.mods.fml.client.registry.ClientRegistry;
|
|
|
|
import cpw.mods.fml.client.registry.RenderingRegistry;
|
2014-02-09 02:34:52 +01:00
|
|
|
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
2013-12-27 23:59:59 +01:00
|
|
|
|
|
|
|
public class ClientHelper extends ServerHelper
|
|
|
|
{
|
|
|
|
|
2014-02-20 05:20:38 +01:00
|
|
|
private static RenderItem itemRenderer = new RenderItem();
|
|
|
|
private static RenderBlocks blockRenderer = new RenderBlocks();
|
|
|
|
|
2014-07-21 05:45:08 +02:00
|
|
|
@SubscribeEvent
|
|
|
|
public void postPlayerRender(RenderLivingEvent.Pre p)
|
|
|
|
{
|
|
|
|
PlayerColor player = TickHandler.instance.getPlayerColors().get( p.entity.getEntityId() );
|
|
|
|
if ( player != null )
|
|
|
|
{
|
|
|
|
AEColor col = player.myColor;
|
|
|
|
|
|
|
|
float r = (float) (0xff & (col.mediumVariant >> 16));
|
|
|
|
float g = (float) (0xff & (col.mediumVariant >> 8));
|
|
|
|
float b = (float) (0xff & (col.mediumVariant));
|
|
|
|
GL11.glColor3f( r / 255.0f, g / 255.0f, b / 255.0f );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-02-20 05:20:38 +01:00
|
|
|
@Override
|
2014-07-07 04:04:58 +02:00
|
|
|
public void doRenderItem(ItemStack itemstack, World w)
|
2014-02-20 05:20:38 +01:00
|
|
|
{
|
|
|
|
if ( itemstack != null )
|
|
|
|
{
|
2014-07-07 04:04:58 +02:00
|
|
|
EntityItem entityitem = new EntityItem( w, 0.0D, 0.0D, 0.0D, itemstack );
|
2014-02-20 05:20:38 +01:00
|
|
|
entityitem.getEntityItem().stackSize = 1;
|
|
|
|
|
|
|
|
// set all this stuff and then do shit? meh?
|
|
|
|
entityitem.hoverStart = 0;
|
|
|
|
entityitem.age = 0;
|
|
|
|
entityitem.rotationYaw = 0;
|
|
|
|
|
|
|
|
GL11.glPushMatrix();
|
|
|
|
GL11.glTranslatef( 0, -0.04F, 0 );
|
|
|
|
GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
|
|
|
|
// GL11.glDisable( GL11.GL_CULL_FACE );
|
|
|
|
|
|
|
|
if ( itemstack.isItemEnchanted() )
|
|
|
|
{
|
|
|
|
GL11.glTranslatef( 0.0f, -0.05f, -0.25f );
|
|
|
|
GL11.glScalef( 1.0f / 1.5f, 1.0f / 1.5f, 1.0f / 1.5f );
|
|
|
|
// GL11.glTranslated( -8.0, -12.2, -10.6 );
|
|
|
|
GL11.glScalef( 1.0f, -1.0f, 0.005f );
|
|
|
|
// GL11.glScalef( 1.0f , -1.0f, 1.0f );
|
|
|
|
|
|
|
|
Block block = Block.getBlockFromItem( itemstack.getItem() );
|
|
|
|
if ( (itemstack.getItemSpriteNumber() == 0 && block != null && RenderBlocks.renderItemIn3d( block.getRenderType() )) )
|
|
|
|
{
|
|
|
|
GL11.glRotatef( 25.0f, 1.0f, 0.0f, 0.0f );
|
|
|
|
GL11.glRotatef( 15.0f, 0.0f, 1.0f, 0.0f );
|
|
|
|
GL11.glRotatef( 30.0f, 0.0f, 1.0f, 0.0f );
|
|
|
|
}
|
|
|
|
|
|
|
|
IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer( itemstack, ENTITY );
|
|
|
|
if ( customRenderer != null && !(itemstack.getItem() instanceof ItemBlock) )
|
|
|
|
{
|
|
|
|
if ( customRenderer.shouldUseRenderHelper( ENTITY, itemstack, BLOCK_3D ) )
|
|
|
|
{
|
|
|
|
GL11.glTranslatef( 0, -0.04F, 0 );
|
|
|
|
GL11.glScalef( 0.7f, 0.7f, 0.7f );
|
|
|
|
GL11.glRotatef( 35, 1, 0, 0 );
|
|
|
|
GL11.glRotatef( 45, 0, 1, 0 );
|
|
|
|
GL11.glRotatef( -90, 0, 1, 0 );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if ( itemstack.getItem() instanceof ItemBlock )
|
|
|
|
{
|
|
|
|
GL11.glTranslatef( 0, -0.04F, 0 );
|
|
|
|
GL11.glScalef( 1.1f, 1.1f, 1.1f );
|
|
|
|
GL11.glRotatef( -90, 0, 1, 0 );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
GL11.glTranslatef( 0, -0.14F, 0 );
|
|
|
|
GL11.glScalef( 0.8f, 0.8f, 0.8f );
|
|
|
|
}
|
|
|
|
|
|
|
|
RenderItem.renderInFrame = true;
|
|
|
|
RenderManager.instance.renderEntityWithPosYaw( entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F );
|
|
|
|
RenderItem.renderInFrame = false;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
GL11.glScalef( 1.0f / 42.0f, 1.0f / 42.0f, 1.0f / 42.0f );
|
|
|
|
GL11.glTranslated( -8.0, -10.2, -10.4 );
|
|
|
|
GL11.glScalef( 1.0f, 1.0f, 0.005f );
|
|
|
|
|
|
|
|
RenderItem.renderInFrame = false;
|
|
|
|
FontRenderer fr = Minecraft.getMinecraft().fontRenderer;
|
|
|
|
if ( !ForgeHooksClient.renderInventoryItem( blockRenderer, Minecraft.getMinecraft().renderEngine, itemstack, true, 0, (float) 0, (float) 0 ) )
|
|
|
|
{
|
|
|
|
itemRenderer.renderItemIntoGUI( fr, Minecraft.getMinecraft().renderEngine, itemstack, 0, 0, false );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
GL11.glPopMatrix();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-12-27 23:59:59 +01:00
|
|
|
@Override
|
|
|
|
public void init()
|
|
|
|
{
|
|
|
|
MinecraftForge.EVENT_BUS.register( this );
|
2014-04-20 03:41:43 +02:00
|
|
|
}
|
2013-12-27 23:59:59 +01:00
|
|
|
|
2014-04-20 03:41:43 +02:00
|
|
|
@Override
|
|
|
|
public void postinit()
|
|
|
|
{
|
2013-12-27 23:59:59 +01:00
|
|
|
RenderingRegistry.registerBlockHandler( WorldRender.instance );
|
|
|
|
RenderManager.instance.entityRenderMap.put( EntityTinyTNTPrimed.class, new RenderTinyTNTPrimed() );
|
2014-07-07 04:04:58 +02:00
|
|
|
RenderManager.instance.entityRenderMap.put( EntityFloatingItem.class, new RenderFloatingItem() );
|
2013-12-27 23:59:59 +01:00
|
|
|
}
|
|
|
|
|
2014-05-26 10:25:17 +02:00
|
|
|
@SubscribeEvent
|
|
|
|
public void wheelEvent(MouseEvent me)
|
|
|
|
{
|
|
|
|
if ( me.isCanceled() || me.dwheel == 0 )
|
|
|
|
return;
|
|
|
|
|
|
|
|
Minecraft mc = Minecraft.getMinecraft();
|
|
|
|
EntityPlayer player = mc.thePlayer;
|
|
|
|
ItemStack is = player.getHeldItem();
|
|
|
|
|
|
|
|
if ( is != null && is.getItem() instanceof IMouseWheelItem && player.isSneaking() )
|
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
|
|
|
NetworkHandler.instance.sendToServer( new PacketValueConfig( "Item", me.dwheel > 0 ? "WheelUp" : "WheelDown" ) );
|
|
|
|
me.setCanceled( true );
|
|
|
|
}
|
|
|
|
catch (IOException e)
|
|
|
|
{
|
|
|
|
AELog.error( e );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-02-09 02:34:52 +01:00
|
|
|
@SubscribeEvent
|
2013-12-27 23:59:59 +01:00
|
|
|
public void updateTextureSheet(TextureStitchEvent.Pre ev)
|
|
|
|
{
|
2014-05-26 03:58:44 +02:00
|
|
|
if ( ev.map.getTextureType() == 1 )
|
|
|
|
{
|
|
|
|
for (ExtraItemTextures et : ExtraItemTextures.values())
|
|
|
|
et.registerIcon( ev.map );
|
|
|
|
}
|
|
|
|
|
2014-02-09 02:34:52 +01:00
|
|
|
if ( ev.map.getTextureType() == 0 )
|
2013-12-27 23:59:59 +01:00
|
|
|
{
|
2014-05-26 03:58:44 +02:00
|
|
|
for (ExtraBlockTextures et : ExtraBlockTextures.values())
|
2013-12-27 23:59:59 +01:00
|
|
|
et.registerIcon( ev.map );
|
|
|
|
|
|
|
|
for (CableBusTextures cb : CableBusTextures.values())
|
|
|
|
cb.registerIcon( ev.map );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public World getWorld()
|
|
|
|
{
|
|
|
|
if ( Platform.isClient() )
|
|
|
|
return Minecraft.getMinecraft().theWorld;
|
|
|
|
else
|
|
|
|
return super.getWorld();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void bindTileEntitySpecialRenderer(Class tile, AEBaseBlock blk)
|
|
|
|
{
|
|
|
|
BaseBlockRender bbr = blk.getRendererInstance().rendererInstance;
|
2014-01-20 17:41:37 +01:00
|
|
|
if ( bbr.hasTESR && tile != null )
|
2013-12-27 23:59:59 +01:00
|
|
|
ClientRegistry.bindTileEntitySpecialRenderer( tile, new TESRWrapper( bbr ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public List<EntityPlayer> getPlayers()
|
|
|
|
{
|
|
|
|
if ( Platform.isClient() )
|
|
|
|
{
|
|
|
|
List<EntityPlayer> o = new ArrayList();
|
|
|
|
o.add( Minecraft.getMinecraft().thePlayer );
|
|
|
|
return o;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
return super.getPlayers();
|
|
|
|
}
|
|
|
|
|
2014-01-28 18:29:17 +01:00
|
|
|
@Override
|
2014-07-09 10:17:11 +02:00
|
|
|
public void spawnEffect(EffectType effect, World worldObj, double posX, double posY, double posZ, Object o)
|
2014-02-23 23:50:53 +01:00
|
|
|
{
|
|
|
|
if ( AEConfig.instance.enableEffects )
|
|
|
|
{
|
|
|
|
switch (effect)
|
|
|
|
{
|
2014-07-09 10:17:11 +02:00
|
|
|
case Assembler:
|
|
|
|
spawnAssembler( worldObj, posX, posY, posZ, o );
|
2014-07-10 03:39:24 +02:00
|
|
|
return;
|
2014-02-23 23:50:53 +01:00
|
|
|
case Vibrant:
|
|
|
|
spawnVibrant( worldObj, posX, posY, posZ );
|
|
|
|
return;
|
2014-07-07 04:04:58 +02:00
|
|
|
case Crafting:
|
|
|
|
spawnCrafting( worldObj, posX, posY, posZ );
|
|
|
|
return;
|
2014-02-23 23:50:53 +01:00
|
|
|
case Energy:
|
|
|
|
spawnEnergy( worldObj, posX, posY, posZ );
|
|
|
|
return;
|
|
|
|
case Lightning:
|
|
|
|
spawnLightning( worldObj, posX, posY, posZ );
|
|
|
|
return;
|
2014-07-18 03:16:53 +02:00
|
|
|
case LightningArc:
|
|
|
|
spawnLightningArc( worldObj, posX, posY, posZ, (Vec3) o );
|
|
|
|
return;
|
2014-02-23 23:50:53 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-07-09 10:17:11 +02:00
|
|
|
private void spawnAssembler(World worldObj, double posX, double posY, double posZ, Object o)
|
|
|
|
{
|
|
|
|
PacketAssemblerAnimation paa = (PacketAssemblerAnimation) o;
|
|
|
|
|
|
|
|
AssemblerFX fx = new AssemblerFX( Minecraft.getMinecraft().theWorld, posX, posY, posZ, 0.0D, 0.0D, 0.0D, paa.rate, paa.is );
|
|
|
|
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx );
|
|
|
|
}
|
|
|
|
|
2014-02-23 23:50:53 +01:00
|
|
|
private void spawnVibrant(World w, double x, double y, double z)
|
|
|
|
{
|
|
|
|
if ( CommonHelper.proxy.shouldAddParticles( Platform.getRandom() ) )
|
|
|
|
{
|
|
|
|
double d0 = (double) (Platform.getRandomFloat() - 0.5F) * 0.26D;
|
|
|
|
double d1 = (double) (Platform.getRandomFloat() - 0.5F) * 0.26D;
|
|
|
|
double d2 = (double) (Platform.getRandomFloat() - 0.5F) * 0.26D;
|
|
|
|
|
2014-07-07 04:04:58 +02:00
|
|
|
VibrantFX fx = new VibrantFX( w, x + d0, y + d1, z + d2, 0.0D, 0.0D, 0.0D );
|
2014-02-23 23:50:53 +01:00
|
|
|
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-07-18 03:16:53 +02:00
|
|
|
private void spawnLightningArc(World worldObj, double posX, double posY, double posZ, Vec3 second)
|
|
|
|
{
|
|
|
|
LightningFX fx = new LightningArcFX( worldObj, posX, posY, posZ, second.xCoord, second.yCoord, second.zCoord, 0.0f, 0.0f, 0.0f );
|
|
|
|
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx );
|
|
|
|
}
|
|
|
|
|
2014-02-23 23:50:53 +01:00
|
|
|
private void spawnLightning(World worldObj, double posX, double posY, double posZ)
|
2014-01-28 18:29:17 +01:00
|
|
|
{
|
2014-07-07 04:04:58 +02:00
|
|
|
LightningFX fx = new LightningFX( worldObj, posX, posY + 0.3f, posZ, 0.0f, 0.0f, 0.0f );
|
2014-01-28 18:29:17 +01:00
|
|
|
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx );
|
|
|
|
}
|
|
|
|
|
2014-02-23 23:50:53 +01:00
|
|
|
private void spawnEnergy(World w, double posX, double posY, double posZ)
|
2014-01-28 20:27:22 +01:00
|
|
|
{
|
|
|
|
float x = (float) (((Platform.getRandomInt() % 100) * 0.01) - 0.5) * 0.7f;
|
|
|
|
float y = (float) (((Platform.getRandomInt() % 100) * 0.01) - 0.5) * 0.7f;
|
|
|
|
float z = (float) (((Platform.getRandomInt() % 100) * 0.01) - 0.5) * 0.7f;
|
|
|
|
|
2014-02-09 02:34:52 +01:00
|
|
|
EnergyFx fx = new EnergyFx( w, posX + x, posY + y, posZ + z, Items.diamond );
|
2014-01-28 20:27:22 +01:00
|
|
|
|
|
|
|
fx.motionX = -x * 0.1;
|
|
|
|
fx.motionY = -y * 0.1;
|
|
|
|
fx.motionZ = -z * 0.1;
|
|
|
|
|
|
|
|
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx );
|
|
|
|
}
|
2014-01-30 03:47:55 +01:00
|
|
|
|
2014-07-07 04:04:58 +02:00
|
|
|
private void spawnCrafting(World w, double posX, double posY, double posZ)
|
|
|
|
{
|
|
|
|
float x = (float) (((Platform.getRandomInt() % 100) * 0.01) - 0.5) * 0.7f;
|
|
|
|
float y = (float) (((Platform.getRandomInt() % 100) * 0.01) - 0.5) * 0.7f;
|
|
|
|
float z = (float) (((Platform.getRandomInt() % 100) * 0.01) - 0.5) * 0.7f;
|
|
|
|
|
|
|
|
CraftingFx fx = new CraftingFx( w, posX + x, posY + y, posZ + z, Items.diamond );
|
|
|
|
|
|
|
|
fx.motionX = -x * 0.2;
|
|
|
|
fx.motionY = -y * 0.2;
|
|
|
|
fx.motionZ = -z * 0.2;
|
|
|
|
|
|
|
|
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx );
|
|
|
|
}
|
|
|
|
|
2014-01-30 03:47:55 +01:00
|
|
|
@Override
|
|
|
|
public boolean shouldAddParticles(Random r)
|
|
|
|
{
|
2014-02-14 06:31:02 +01:00
|
|
|
int setting = Minecraft.getMinecraft().gameSettings.particleSetting;
|
2014-03-15 07:58:21 +01:00
|
|
|
if ( setting == 2 )
|
|
|
|
return false;
|
2014-02-14 06:31:02 +01:00
|
|
|
if ( setting == 0 )
|
2014-01-30 03:47:55 +01:00
|
|
|
return true;
|
2014-02-14 06:31:02 +01:00
|
|
|
return r.nextInt( 2 * (setting + 1) ) == 0;
|
2014-01-30 03:47:55 +01:00
|
|
|
}
|
|
|
|
|
2014-02-16 22:28:50 +01:00
|
|
|
@Override
|
|
|
|
public MovingObjectPosition getMOP()
|
|
|
|
{
|
|
|
|
return Minecraft.getMinecraft().objectMouseOver;
|
|
|
|
}
|
|
|
|
|
2013-12-27 23:59:59 +01:00
|
|
|
}
|