Added recipes for new v8 content
This commit is contained in:
parent
9f20e0bce0
commit
f51c528bbf
8 changed files with 42 additions and 106 deletions
|
@ -118,7 +118,7 @@ public class GuiOredictionificator extends GuiMekanism
|
|||
GL11.glPopMatrix();
|
||||
}*/
|
||||
|
||||
fontRendererObj.drawString(MekanismUtils.localize("gui.filter"), 78, yStart + 2, 0x404040);
|
||||
fontRendererObj.drawString(MekanismUtils.localize("gui.filter"), 32, yStart + 2, 0x404040);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -146,14 +146,14 @@ public class GuiOredictionificator extends GuiMekanism
|
|||
if(tileEntity.filters.get(getFilterIndex()+i) != null)
|
||||
{
|
||||
int yStart = i*22 + 18;
|
||||
boolean mouseOver = xAxis >= 56 && xAxis <= 152 && yAxis >= yStart && yAxis <= yStart+22;
|
||||
boolean mouseOver = xAxis >= 10 && xAxis <= 152 && yAxis >= yStart && yAxis <= yStart+22;
|
||||
|
||||
if(mouseOver)
|
||||
{
|
||||
MekanismRenderer.color(EnumColor.GREY, 3.0F);
|
||||
}
|
||||
|
||||
drawTexturedModalRect(guiWidth + 56, guiHeight + yStart, 0, 166, 142, 22);
|
||||
drawTexturedModalRect(guiWidth + 10, guiHeight + yStart, 0, 230, 142, 22);
|
||||
|
||||
MekanismRenderer.resetColor();
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ public class GuiOredictionificatorFilter extends GuiMekanism
|
|||
public void setFilter()
|
||||
{
|
||||
String newFilter = filterText.getText();
|
||||
boolean has = true;
|
||||
boolean has = false;
|
||||
|
||||
for(String s : possibleFilters)
|
||||
{
|
||||
|
@ -125,6 +125,8 @@ public class GuiOredictionificatorFilter extends GuiMekanism
|
|||
filterText = new GuiTextField(fontRendererObj, guiWidth + 33, guiHeight + 48, 96, 12);
|
||||
filterText.setMaxStringLength(TileEntityOredictionificator.MAX_LENGTH);
|
||||
filterText.setFocused(true);
|
||||
|
||||
updateButtons();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -28,19 +28,19 @@ public abstract class PlayerSound extends Sound implements IResettableSound
|
|||
@Override
|
||||
public float getXPosF()
|
||||
{
|
||||
return (float) player.posX;
|
||||
return (float)player.posX;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getYPosF()
|
||||
{
|
||||
return (float) player.posY;
|
||||
return (float)player.posY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getZPosF()
|
||||
{
|
||||
return (float) player.posZ;
|
||||
return (float)player.posZ;
|
||||
}
|
||||
|
||||
public PlayerSound setFadeIn(int fade)
|
||||
|
@ -51,7 +51,6 @@ public abstract class PlayerSound extends Sound implements IResettableSound
|
|||
|
||||
public PlayerSound setFadeOut(int fade)
|
||||
{
|
||||
|
||||
fadeOut = Math.min(0, fade);
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -18,8 +18,8 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class Sound implements ISound {
|
||||
|
||||
public class Sound implements ISound
|
||||
{
|
||||
protected AttenuationType attenuation;
|
||||
|
||||
protected ResourceLocation sound;
|
||||
|
|
|
@ -1,94 +0,0 @@
|
|||
package mekanism.common;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.MekanismConfig.general;
|
||||
import mekanism.api.Pos3D;
|
||||
import mekanism.api.lasers.ILaserReceptor;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class LaserManager
|
||||
{
|
||||
public static MovingObjectPosition fireLaser(TileEntity from, ForgeDirection direction, double energy, World world)
|
||||
{
|
||||
return fireLaser(new Pos3D(from).centre().translate(direction, 0.501), direction, energy, world);
|
||||
}
|
||||
|
||||
public static MovingObjectPosition fireLaser(Pos3D from, ForgeDirection direction, double energy, World world)
|
||||
{
|
||||
Pos3D to = from.clone().translate(direction, general.laserRange - 0.002);
|
||||
|
||||
MovingObjectPosition mop = world.rayTraceBlocks(Vec3.createVectorHelper(from.xPos, from.yPos, from.zPos), Vec3.createVectorHelper(to.xPos, to.yPos, to.zPos));
|
||||
|
||||
if(mop != null)
|
||||
{
|
||||
to = new Pos3D(mop.hitVec);
|
||||
Coord4D toCoord = new Coord4D(mop.blockX, mop.blockY, mop.blockZ);
|
||||
TileEntity tile = toCoord.getTileEntity(world);
|
||||
|
||||
if(tile instanceof ILaserReceptor)
|
||||
{
|
||||
if(!(((ILaserReceptor)tile).canLasersDig()))
|
||||
{
|
||||
((ILaserReceptor)tile).receiveLaserEnergy(energy, ForgeDirection.getOrientation(mop.sideHit));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
from.translateExcludingSide(direction, -0.1);
|
||||
to.translateExcludingSide(direction, 0.1);
|
||||
|
||||
for(Entity e : (List<Entity>)world.getEntitiesWithinAABB(Entity.class, Pos3D.getAABB(from, to)))
|
||||
{
|
||||
if(!e.isImmuneToFire()) e.setFire((int)(energy / 1000));
|
||||
}
|
||||
|
||||
return mop;
|
||||
}
|
||||
|
||||
public static List<ItemStack> breakBlock(Coord4D blockCoord, boolean dropAtBlock, World world)
|
||||
{
|
||||
List<ItemStack> ret = null;
|
||||
Block blockHit = blockCoord.getBlock(world);
|
||||
|
||||
if(dropAtBlock)
|
||||
{
|
||||
blockHit.dropBlockAsItem(world, blockCoord.xCoord, blockCoord.yCoord, blockCoord.zCoord, blockCoord.getMetadata(world), 0);
|
||||
}
|
||||
else {
|
||||
ret = blockHit.getDrops(world, blockCoord.xCoord, blockCoord.yCoord, blockCoord.zCoord, blockCoord.getMetadata(world), 0);
|
||||
}
|
||||
blockHit.breakBlock(world, blockCoord.xCoord, blockCoord.yCoord, blockCoord.zCoord, blockHit, blockCoord.getMetadata(world));
|
||||
world.setBlockToAir(blockCoord.xCoord, blockCoord.yCoord, blockCoord.zCoord);
|
||||
world.playAuxSFX(2001, blockCoord.xCoord, blockCoord.yCoord, blockCoord.zCoord, Block.getIdFromBlock(blockHit));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static void fireLaserClient(TileEntity from, ForgeDirection direction, double energy, World world)
|
||||
{
|
||||
fireLaserClient(new Pos3D(from).centre().translate(direction, 0.501), direction, energy, world);
|
||||
}
|
||||
|
||||
public static void fireLaserClient(Pos3D from, ForgeDirection direction, double energy, World world)
|
||||
{
|
||||
Pos3D to = from.clone().translate(direction, general.laserRange - 0.002);
|
||||
MovingObjectPosition mop = world.rayTraceBlocks(Vec3.createVectorHelper(from.xPos, from.yPos, from.zPos), Vec3.createVectorHelper(to.xPos, to.yPos, to.zPos));
|
||||
|
||||
if(mop != null)
|
||||
{
|
||||
to = new Pos3D(mop.hitVec);
|
||||
}
|
||||
from.translate(direction, -0.501);
|
||||
Mekanism.proxy.renderLaser(world, from, to, direction, energy);
|
||||
}
|
||||
|
||||
}
|
|
@ -468,7 +468,7 @@ public class Mekanism
|
|||
" S ", "SES", " S ", Character.valueOf('S'), "ingotSteel", Character.valueOf('E'), MekanismItems.EnergyTablet.getUnchargedItem()
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismBlocks.BasicBlock2, 2, 2), new Object[] {
|
||||
" I ", "ICI", " I ", Character.valueOf('I'), new ItemStack(MekanismBlocks.BasicBlock2, 1, 1), Character.valueOf('C'), "circuitBasic"
|
||||
" I ", "ICI", " I ", Character.valueOf('I'), new ItemStack(MekanismBlocks.BasicBlock2, 1, 1), Character.valueOf('C'), "circuitElite"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismItems.FactoryInstaller, 1, 0), new Object[] {
|
||||
"RCR", "iWi", "RCR", Character.valueOf('R'), "alloyBasic", Character.valueOf('C'), "circuitBasic", Character.valueOf('i'), "ingotIron", Character.valueOf('W'), "plankWood"
|
||||
|
@ -479,6 +479,18 @@ public class Mekanism
|
|||
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismItems.FactoryInstaller, 1, 2), new Object[] {
|
||||
"RCR", "gWg", "RCR", Character.valueOf('R'), "alloyElite", Character.valueOf('C'), "circuitElite", Character.valueOf('g'), "ingotGold", Character.valueOf('W'), "plankWood"
|
||||
}));
|
||||
MachineType.OREDICTIONIFICATOR.addRecipe(new MekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock3, 1, 3), new Object[] {
|
||||
"SGS", "CBC", "SWS", Character.valueOf('S'), "ingotSteel", Character.valueOf('G'), "paneGlass", Character.valueOf('C'), "circuitBasic", Character.valueOf('B'), MekanismItems.Dictionary, Character.valueOf('W'), Blocks.chest
|
||||
}));
|
||||
MachineType.LASER.addRecipe(new MekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock2, 1, 13), new Object[] {
|
||||
"RE ", "RCD", "RE ", Character.valueOf('R'), "alloyElite", Character.valueOf('E'), MekanismItems.EnergyTablet.getUnchargedItem(), Character.valueOf('C'), new ItemStack(MekanismBlocks.BasicBlock, 1, 8), Character.valueOf('D'), "gemDiamond"
|
||||
}));
|
||||
MachineType.LASER_AMPLIFIER.addRecipe(new MekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock2, 1, 14), new Object[] {
|
||||
"SSS", "SED", "SSS", Character.valueOf('S'), "ingotSteel", Character.valueOf('E'), MekanismItems.EnergyTablet.getUnchargedItem(), Character.valueOf('D'), "gemDiamond"
|
||||
}));
|
||||
MachineType.LASER_TRACTOR_BEAM.addRecipe(new MekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock2, 1, 15), new Object[] {
|
||||
"C", "F", Character.valueOf('C'), new ItemStack(MekanismBlocks.MachineBlock, 1, 13), Character.valueOf('F'), new ItemStack(MekanismBlocks.MachineBlock2, 1, 14)
|
||||
}));
|
||||
|
||||
//Energy Cube recipes
|
||||
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(MekanismUtils.getEnergyCube(EnergyCubeTier.BASIC), new Object[] {
|
||||
|
|
|
@ -126,7 +126,7 @@ public class PacketNewFilter implements IMessageHandler<NewFilterMessage, IMessa
|
|||
{
|
||||
mFilter.write(data);
|
||||
}
|
||||
else if(type == 3)
|
||||
else if(type == 2)
|
||||
{
|
||||
oFilter.write(data);
|
||||
}
|
||||
|
|
|
@ -129,6 +129,23 @@ public class MekanismGenerators implements IModule
|
|||
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(GeneratorsBlocks.Generator, 1, 6), new Object[] {
|
||||
" O ", "OAO", "ECE", Character.valueOf('O'), "ingotOsmium", Character.valueOf('A'), MekanismItems.EnrichedAlloy, Character.valueOf('E'), MekanismItems.EnergyTablet.getUnchargedItem(), Character.valueOf('C'), "circuitBasic"
|
||||
}));
|
||||
|
||||
//Reactor Recipes
|
||||
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(GeneratorsBlocks.Reactor, 4, 1), new Object[] {
|
||||
" C ", "CAC", " C ", Character.valueOf('C'), new ItemStack(MekanismBlocks.BasicBlock, 1, 8), Character.valueOf('A'), "alloyUltimate"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(GeneratorsBlocks.Reactor, 2, 3), new Object[] {
|
||||
" I ", "ICI", " I ", Character.valueOf('I'), new ItemStack(GeneratorsBlocks.Reactor, 1, 1), Character.valueOf('C'), "circuitUltimate"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(GeneratorsBlocks.ReactorGlass, 4, 0), new Object[] {
|
||||
" I ", "IGI", " I ", Character.valueOf('I'), new ItemStack(GeneratorsBlocks.Reactor, 1, 1), Character.valueOf('G'), "blockGlass"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(GeneratorsBlocks.Reactor, 1, 0), new Object[] {
|
||||
"CGC", "ITI", "III", Character.valueOf('C'), "circuitUltimate", Character.valueOf('G'), "paneGlass", Character.valueOf('I'), new ItemStack(GeneratorsBlocks.Reactor, 1, 1), Character.valueOf('T'), MekanismUtils.getEmptyGasTank()
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(GeneratorsBlocks.ReactorGlass, 2, 1), new Object[] {
|
||||
" I ", "ILI", " I ", Character.valueOf('I'), new ItemStack(GeneratorsBlocks.ReactorGlass, 1, 0), Character.valueOf('L'), "blockRedstone"
|
||||
}));
|
||||
|
||||
FuelHandler.addGas(GasRegistry.getGas("ethene"), general.ETHENE_BURN_TIME, general.FROM_H2 + generators.bioGeneration * 2 * general.ETHENE_BURN_TIME); //1mB hydrogen + 2*bioFuel/tick*200ticks/100mB * 20x efficiency bonus
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue