Removed quantum entangler
This commit is contained in:
parent
167c6bf907
commit
2120899b20
20 changed files with 58 additions and 125 deletions
|
@ -29,7 +29,7 @@
|
|||
<exclude name=".git/**"/>
|
||||
<exclude name="**/*.xml"/>
|
||||
</fileset>
|
||||
<fileset dir="${dir.development}Universal-Electricity/src/main/java/api">
|
||||
<fileset dir="${dir.development}Universal-Electricity/src/main/java/universalelectricity/api">
|
||||
<exclude name=".git/**"/>
|
||||
<exclude name="**/*.xml"/>
|
||||
</fileset>
|
||||
|
|
|
@ -6,12 +6,12 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import resonantinduction.contractor.TileEntityEMContractor;
|
||||
import resonantinduction.fx.FXElectricBolt;
|
||||
import resonantinduction.gui.GuiMultimeter;
|
||||
import resonantinduction.levitator.RenderLevitator;
|
||||
import resonantinduction.levitator.TileEntityEMContractor;
|
||||
import resonantinduction.multimeter.PartMultimeter;
|
||||
import resonantinduction.render.BlockRenderingHandler;
|
||||
import resonantinduction.render.RenderEMContractor;
|
||||
import resonantinduction.render.RenderItemMultimeter;
|
||||
import resonantinduction.render.RenderTesla;
|
||||
import resonantinduction.tesla.TileEntityTesla;
|
||||
|
@ -39,7 +39,7 @@ public class ClientProxy extends CommonProxy
|
|||
RenderingRegistry.registerBlockHandler(BlockRenderingHandler.INSTANCE);
|
||||
MinecraftForgeClient.registerItemRenderer(ResonantInduction.itemMultimeter.itemID, new RenderItemMultimeter());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTesla.class, new RenderTesla());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityEMContractor.class, new RenderEMContractor());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityEMContractor.class, new RenderLevitator());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -19,13 +19,14 @@ import net.minecraftforge.oredict.ShapelessOreRecipe;
|
|||
import org.modstats.ModstatInfo;
|
||||
import org.modstats.Modstats;
|
||||
|
||||
import resonantinduction.contractor.BlockEMContractor;
|
||||
import resonantinduction.contractor.ItemBlockContractor;
|
||||
import resonantinduction.contractor.TileEntityEMContractor;
|
||||
import resonantinduction.entangler.ItemLinker;
|
||||
import resonantinduction.entangler.ItemQuantumEntangler;
|
||||
import resonantinduction.battery.BlockBattery;
|
||||
import resonantinduction.battery.TileEntityBattery;
|
||||
import resonantinduction.furnace.BlockAdvancedFurnace;
|
||||
import resonantinduction.furnace.TileAdvancedFurnace;
|
||||
import resonantinduction.levitator.BlockEMContractor;
|
||||
import resonantinduction.levitator.ItemBlockContractor;
|
||||
import resonantinduction.levitator.ItemLinker;
|
||||
import resonantinduction.levitator.TileEntityEMContractor;
|
||||
import resonantinduction.multimeter.ItemMultimeter;
|
||||
import resonantinduction.tesla.BlockTesla;
|
||||
import resonantinduction.tesla.TileEntityTesla;
|
||||
|
@ -131,7 +132,6 @@ public class ResonantInduction
|
|||
}
|
||||
|
||||
// Items
|
||||
public static Item itemQuantumEntangler;
|
||||
public static Item itemLinker;
|
||||
/**
|
||||
* Forge Multipart
|
||||
|
@ -174,7 +174,6 @@ public class ResonantInduction
|
|||
TileEntityEMContractor.PUSH_DELAY = CONFIGURATION.get(Configuration.CATEGORY_GENERAL, "Contractor Item Push Delay", TileEntityEMContractor.PUSH_DELAY).getInt(TileEntityEMContractor.PUSH_DELAY);
|
||||
|
||||
// Items
|
||||
itemQuantumEntangler = new ItemQuantumEntangler(getNextItemID());
|
||||
itemLinker = new ItemLinker(getNextItemID());
|
||||
itemPartWire = new ItemWire(getNextItemID());
|
||||
itemMultimeter = new ItemMultimeter(getNextItemID());
|
||||
|
@ -182,7 +181,7 @@ public class ResonantInduction
|
|||
// Blocks
|
||||
blockTesla = new BlockTesla(getNextBlockID());
|
||||
blockEMContractor = new BlockEMContractor(getNextBlockID());
|
||||
// blockBattery = new BlockBattery(getNextBlockID());
|
||||
blockBattery = new BlockBattery(getNextBlockID());
|
||||
|
||||
if (REPLACE_FURNACE)
|
||||
{
|
||||
|
@ -193,19 +192,17 @@ public class ResonantInduction
|
|||
|
||||
CONFIGURATION.save();
|
||||
|
||||
GameRegistry.registerItem(itemQuantumEntangler, itemQuantumEntangler.getUnlocalizedName());
|
||||
GameRegistry.registerItem(itemLinker, itemLinker.getUnlocalizedName());
|
||||
GameRegistry.registerItem(itemMultimeter, itemMultimeter.getUnlocalizedName());
|
||||
|
||||
GameRegistry.registerBlock(blockTesla, blockTesla.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(blockEMContractor, ItemBlockContractor.class, blockEMContractor.getUnlocalizedName());
|
||||
// GameRegistry.registerBlock(blockBattery, blockBattery.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(blockBattery, blockBattery.getUnlocalizedName());
|
||||
|
||||
// Tiles
|
||||
GameRegistry.registerTileEntity(TileEntityTesla.class, blockTesla.getUnlocalizedName());
|
||||
GameRegistry.registerTileEntity(TileEntityEMContractor.class, blockEMContractor.getUnlocalizedName());
|
||||
// GameRegistry.registerTileEntity(TileEntityBattery.class,
|
||||
// blockBattery.getUnlocalizedName());
|
||||
GameRegistry.registerTileEntity(TileEntityBattery.class, blockBattery.getUnlocalizedName());
|
||||
|
||||
ResonantInduction.proxy.registerRenderers();
|
||||
|
||||
|
@ -254,16 +251,9 @@ public class ResonantInduction
|
|||
*/
|
||||
final ItemStack defaultWire = EnumWireMaterial.IRON.getWire();
|
||||
|
||||
/** Capacitor **/
|
||||
// GameRegistry.addRecipe(new ShapedOreRecipe(UniversalRecipe.BATTERY.get(), "RRR", "RIR",
|
||||
// "RRR", 'R', Item.redstone, 'I', UniversalRecipe.PRIMARY_METAL.get()));
|
||||
|
||||
/** Linker **/
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(itemLinker, " E ", "GCG", " E ", 'E', Item.eyeOfEnder, 'C', UniversalRecipe.BATTERY.get(), 'G', UniversalRecipe.SECONDARY_METAL.get()));
|
||||
|
||||
/** Quantum Entangler **/
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(itemQuantumEntangler, "EEE", "ILI", "EEE", 'E', Item.eyeOfEnder, 'L', itemLinker, 'I', UniversalRecipe.PRIMARY_METAL.get()));
|
||||
|
||||
/** Tesla - by Jyzarc */
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(blockTesla, "WEW", " C ", " I ", 'W', defaultWire, 'E', Item.eyeOfEnder, 'C', UniversalRecipe.BATTERY.get(), 'I', UniversalRecipe.PRIMARY_PLATE.get()));
|
||||
|
||||
|
@ -271,8 +261,7 @@ public class ResonantInduction
|
|||
GameRegistry.addRecipe(new ShapedOreRecipe(itemMultimeter, "WWW", "ICI", 'W', defaultWire, 'C', UniversalRecipe.BATTERY.get(), 'I', UniversalRecipe.PRIMARY_METAL.get()));
|
||||
|
||||
/** Battery */
|
||||
// GameRegistry.addRecipe(new ShapedOreRecipe(blockBattery, "III", "IRI", "III", 'R',
|
||||
// Block.blockRedstone, 'I', UniversalRecipe.PRIMARY_METAL.get()));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(blockBattery, "III", "IRI", "III", 'R', Block.blockRedstone, 'I', UniversalRecipe.PRIMARY_METAL.get()));
|
||||
|
||||
/** EM Contractor */
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(blockEMContractor, " I ", "GCG", "WWW", 'W', UniversalRecipe.PRIMARY_METAL.get(), 'C', UniversalRecipe.BATTERY.get(), 'G', UniversalRecipe.SECONDARY_METAL.get(), 'I', UniversalRecipe.PRIMARY_METAL.get()));
|
||||
|
|
26
src/resonantinduction/battery/ItemBlockBattery.java
Normal file
26
src/resonantinduction/battery/ItemBlockBattery.java
Normal file
|
@ -0,0 +1,26 @@
|
|||
package resonantinduction.battery;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import resonantinduction.levitator.TileEntityEMContractor;
|
||||
|
||||
public class ItemBlockBattery extends ItemBlock
|
||||
{
|
||||
public ItemBlockBattery(int id)
|
||||
{
|
||||
super(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metadata)
|
||||
{
|
||||
boolean place = super.placeBlockAt(stack, player, world, x, y, z, side, hitX, hitY, hitZ, metadata);
|
||||
|
||||
return place;
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package resonantinduction.render;
|
||||
package resonantinduction.battery;
|
||||
|
||||
import java.util.Random;
|
||||
|
|
@ -1,80 +0,0 @@
|
|||
package resonantinduction.entangler;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import universalelectricity.api.vector.Vector3;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author AidanBrady
|
||||
*
|
||||
*/
|
||||
public class ItemQuantumEntangler extends ItemCoordLink
|
||||
{
|
||||
private static boolean didBindThisTick = false;
|
||||
|
||||
public ItemQuantumEntangler(int id)
|
||||
{
|
||||
super("quantumEntangler", id);
|
||||
this.setMaxStackSize(1);
|
||||
// TODO Handheld model, render animation, energy usage (should be easy?)
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack itemstack, EntityPlayer entityplayer, World world, int x, int y, int z, int side, float posX, float posY, float posZ)
|
||||
{
|
||||
if (!world.isRemote)
|
||||
{
|
||||
if (world.isAirBlock(x, y + 1, z) && world.isAirBlock(x, y + 2, z))
|
||||
{
|
||||
int dimID = world.provider.dimensionId;
|
||||
|
||||
entityplayer.addChatMessage("Bound Entangler to block [" + x + ", " + y + ", " + z + "], dimension '" + dimID + "'");
|
||||
setLink(itemstack, new Vector3(x, y, z), dimID);
|
||||
didBindThisTick = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
entityplayer.addChatMessage("Error: invalid block for binding!");
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer)
|
||||
{
|
||||
if (!world.isRemote && !didBindThisTick)
|
||||
{
|
||||
if (!hasLink(itemstack))
|
||||
{
|
||||
entityplayer.addChatMessage("Error: no block bound to Entangler!");
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
// TELEPORT //
|
||||
|
||||
Vector3 vec = getLink(itemstack);
|
||||
int dimID = getLinkDim(itemstack);
|
||||
|
||||
// travel to dimension if different dimID
|
||||
if (world.provider.dimensionId != dimID)
|
||||
{
|
||||
((EntityPlayerMP) entityplayer).travelToDimension(dimID);
|
||||
}
|
||||
|
||||
// actually teleport to new coords
|
||||
((EntityPlayerMP) entityplayer).playerNetServerHandler.setPlayerLocation(vec.x + 0.5, vec.y + 1, vec.z + 0.5, entityplayer.rotationYaw, entityplayer.rotationPitch);
|
||||
|
||||
world.playSoundAtEntity(entityplayer, "mob.endermen.portal", 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
didBindThisTick = false;
|
||||
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package resonantinduction.contractor;
|
||||
package resonantinduction.levitator;
|
||||
|
||||
import net.minecraft.block.ITileEntityProvider;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -9,7 +9,6 @@ import net.minecraft.world.World;
|
|||
import net.minecraftforge.common.ForgeDirection;
|
||||
import resonantinduction.ResonantInduction;
|
||||
import resonantinduction.base.BlockBase;
|
||||
import resonantinduction.entangler.ItemCoordLink;
|
||||
import resonantinduction.render.BlockRenderingHandler;
|
||||
import universalelectricity.api.vector.Vector3;
|
||||
import cpw.mods.fml.relauncher.Side;
|
|
@ -1,4 +1,4 @@
|
|||
package resonantinduction.contractor;
|
||||
package resonantinduction.levitator;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package resonantinduction.entangler;
|
||||
package resonantinduction.levitator;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package resonantinduction.entangler;
|
||||
package resonantinduction.levitator;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package resonantinduction.contractor;
|
||||
package resonantinduction.levitator;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
|
@ -1,4 +1,4 @@
|
|||
package resonantinduction.render;
|
||||
package resonantinduction.levitator;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
@ -7,10 +7,9 @@ import net.minecraft.util.ResourceLocation;
|
|||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import resonantinduction.ResonantInduction;
|
||||
import resonantinduction.contractor.TileEntityEMContractor;
|
||||
import resonantinduction.model.ModelEMContractor;
|
||||
|
||||
public class RenderEMContractor extends TileEntitySpecialRenderer
|
||||
public class RenderLevitator extends TileEntitySpecialRenderer
|
||||
{
|
||||
public static final ModelEMContractor MODEL = new ModelEMContractor(false);
|
||||
public static final ModelEMContractor MODEL_SPIN = new ModelEMContractor(true);
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package resonantinduction.contractor;
|
||||
package resonantinduction.levitator;
|
||||
|
||||
import universalelectricity.api.vector.Vector3;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package resonantinduction.contractor;
|
||||
package resonantinduction.levitator;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
|
@ -34,7 +34,7 @@ public class ItemMultimeter extends JItemMultiPart
|
|||
@Override
|
||||
public TMultiPart newPart(ItemStack itemStack, EntityPlayer player, World world, BlockCoord pos, int side, Vector3 hit)
|
||||
{
|
||||
BlockCoord onPos = pos.copy().offset(side ^ 1);
|
||||
pos.offset(side ^ 1, -1);
|
||||
PartMultimeter part = (PartMultimeter) MultiPartRegistry.createPart("resonant_induction_multimeter", false);
|
||||
|
||||
if (part != null)
|
||||
|
|
|
@ -9,7 +9,8 @@ import net.minecraft.world.IBlockAccess;
|
|||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import resonantinduction.contractor.BlockEMContractor;
|
||||
import resonantinduction.levitator.BlockEMContractor;
|
||||
import resonantinduction.levitator.RenderLevitator;
|
||||
import resonantinduction.tesla.BlockTesla;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
|
@ -44,8 +45,8 @@ public class BlockRenderingHandler implements ISimpleBlockRenderingHandler
|
|||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0.5, 1.5, 0.5);
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(RenderEMContractor.TEXTURE);
|
||||
RenderEMContractor.MODEL.render(0.0625f);
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(RenderLevitator.TEXTURE);
|
||||
RenderLevitator.MODEL.render(0.0625f);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
/*else if (block instanceof BlockBattery)
|
||||
|
|
|
@ -11,7 +11,7 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.world.World;
|
||||
import resonantinduction.ResonantInduction;
|
||||
import resonantinduction.base.BlockBase;
|
||||
import resonantinduction.entangler.ItemCoordLink;
|
||||
import resonantinduction.levitator.ItemCoordLink;
|
||||
import resonantinduction.render.BlockRenderingHandler;
|
||||
import universalelectricity.api.vector.Vector3;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
|
|
@ -14,7 +14,6 @@ import resonantinduction.ResonantInduction;
|
|||
import resonantinduction.TabRI;
|
||||
import resonantinduction.Utility;
|
||||
import resonantinduction.wire.part.PartFlatWire;
|
||||
import resonantinduction.wire.render.RenderFlatWire;
|
||||
import universalelectricity.api.energy.UnitDisplay;
|
||||
import universalelectricity.api.energy.UnitDisplay.Unit;
|
||||
import codechicken.lib.vec.BlockCoord;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package resonantinduction.wire.render;
|
||||
package resonantinduction.wire;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.LinkedList;
|
|
@ -16,7 +16,7 @@ import org.lwjgl.opengl.GL11;
|
|||
import resonantinduction.ResonantInduction;
|
||||
import resonantinduction.Utility;
|
||||
import resonantinduction.wire.EnumWireMaterial;
|
||||
import resonantinduction.wire.render.RenderFlatWire;
|
||||
import resonantinduction.wire.RenderFlatWire;
|
||||
import codechicken.lib.colour.Colour;
|
||||
import codechicken.lib.data.MCDataInput;
|
||||
import codechicken.lib.data.MCDataOutput;
|
||||
|
|
Loading…
Reference in a new issue