renamed the packages to be more professional
This commit is contained in:
parent
f54dc2fec4
commit
181d2f885f
112 changed files with 735 additions and 192 deletions
|
@ -1,4 +1,4 @@
|
|||
package com.dark;
|
||||
package com.builtbroken.minecraft;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
|
@ -1,17 +1,23 @@
|
|||
package com.dark;
|
||||
package com.builtbroken.minecraft;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import universalelectricity.core.vector.Vector3;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.builtbroken.common.Pair;
|
||||
import com.dark.IExtraInfo.IExtraBlockInfo;
|
||||
import com.builtbroken.minecraft.IExtraInfo.IExtraBlockInfo;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
@ -39,4 +45,13 @@ public class ClientRegistryProxy extends RegistryProxy
|
|||
super.regiserTileEntity(name, clazz);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderBeam(World world, Vector3 position, Vector3 target, Color color, int age)
|
||||
{
|
||||
if (world.isRemote || FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT)
|
||||
{
|
||||
FMLClientHandler.instance().getClient().effectRenderer.addEffect(new FXBeam(world, position, target, color, DarkCore.TEXTURE_DIRECTORY + "", age));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark;
|
||||
package com.builtbroken.minecraft;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.HashMap;
|
||||
|
@ -15,12 +15,14 @@ import net.minecraftforge.fluids.Fluid;
|
|||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
|
||||
import com.builtbroken.common.Pair;
|
||||
import com.dark.IExtraInfo.IExtraBlockInfo;
|
||||
import com.dark.IExtraInfo.IExtraItemInfo;
|
||||
import com.builtbroken.minecraft.IExtraInfo.IExtraBlockInfo;
|
||||
import com.builtbroken.minecraft.IExtraInfo.IExtraItemInfo;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.SidedProxy;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
||||
/** Handler to make registering all parts of a mod's objects that are loaded into the game by forge
|
||||
*
|
||||
|
@ -30,8 +32,24 @@ public class CoreRegistry
|
|||
public static HashMap<Block, String> registredBlocks = new HashMap<Block, String>();
|
||||
public static HashMap<Item, String> registredItems = new HashMap<Item, String>();
|
||||
|
||||
@SidedProxy(clientSide = "com.dark.ClientRegistryProxy", serverSide = "com.dark.RegistryProxy")
|
||||
public static RegistryProxy proxy;
|
||||
@SidedProxy(clientSide = "com.builtbroken.minecraft.ClientRegistryProxy", serverSide = "com.builtbroken.minecraft.RegistryProxy")
|
||||
public static RegistryProxy prox;
|
||||
|
||||
public static RegistryProxy proxy()
|
||||
{
|
||||
if (prox == null)
|
||||
{
|
||||
if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT)
|
||||
{
|
||||
prox = new ClientRegistryProxy();
|
||||
}
|
||||
else
|
||||
{
|
||||
prox = new RegistryProxy();
|
||||
}
|
||||
}
|
||||
return prox;
|
||||
}
|
||||
|
||||
public static Configuration masterBlockConfig = new Configuration(new File(Loader.instance().getConfigDir(), "objects/EnabledBlocks.cfg"));
|
||||
|
||||
|
@ -97,7 +115,7 @@ public class CoreRegistry
|
|||
if (block != null)
|
||||
{
|
||||
registredBlocks.put(block, name);
|
||||
proxy.registerBlock(block, itemClass, name, modID);
|
||||
proxy().registerBlock(block, itemClass, name, modID);
|
||||
CoreRegistry.finishCreation(block);
|
||||
}
|
||||
}
|
||||
|
@ -123,7 +141,7 @@ public class CoreRegistry
|
|||
((IExtraBlockInfo) block).getTileEntities(block.blockID, tileListNew);
|
||||
for (Pair<String, Class<? extends TileEntity>> par : tileListNew)
|
||||
{
|
||||
proxy.regiserTileEntity(par.left(), par.right());
|
||||
proxy().regiserTileEntity(par.left(), par.right());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -168,7 +186,7 @@ public class CoreRegistry
|
|||
if (fluidActual.getBlockID() == -1 && masterBlockConfig.get("Enabled_List", "Enabled_" + fluid.getName() + "Block", true).getBoolean(true))
|
||||
{
|
||||
fluidBlock = new BlockFluid(modDomainPrefix, fluidActual, config).setUnlocalizedName("tile.Fluid." + fluid.getName());
|
||||
proxy.registerBlock(fluidBlock, null, "DMBlockFluid" + fluid.getName(), modDomainPrefix);
|
||||
proxy().registerBlock(fluidBlock, null, "DMBlockFluid" + fluid.getName(), modDomainPrefix);
|
||||
}
|
||||
else
|
||||
{
|
|
@ -1,20 +1,22 @@
|
|||
package com.dark;
|
||||
package com.builtbroken.minecraft;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import universalelectricity.compatibility.Compatibility;
|
||||
import universalelectricity.core.UniversalElectricity;
|
||||
|
||||
import com.dark.fluid.FluidHelper;
|
||||
import com.dark.helpers.PlayerKeyHandler;
|
||||
import com.dark.prefab.BlockMulti;
|
||||
import com.dark.save.SaveManager;
|
||||
import com.dark.tilenetwork.prefab.NetworkUpdateHandler;
|
||||
import com.builtbroken.minecraft.fluid.FluidHelper;
|
||||
import com.builtbroken.minecraft.helpers.PlayerKeyHandler;
|
||||
import com.builtbroken.minecraft.prefab.BlockMulti;
|
||||
import com.builtbroken.minecraft.save.SaveManager;
|
||||
import com.builtbroken.minecraft.tilenetwork.prefab.NetworkUpdateHandler;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.registry.TickRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
@ -77,6 +79,7 @@ public class DarkCore
|
|||
MinecraftForge.EVENT_BUS.register(SaveManager.instance());
|
||||
TickRegistry.registerTickHandler(NetworkUpdateHandler.instance(), Side.SERVER);
|
||||
TickRegistry.registerScheduledTickHandler(new PlayerKeyHandler(), Side.CLIENT);
|
||||
MinecraftForge.EVENT_BUS.register(new LaserEntityDamageSource(null));
|
||||
UniversalElectricity.initiate();
|
||||
Compatibility.initiate();
|
||||
pre = true;
|
||||
|
@ -139,4 +142,16 @@ public class DarkCore
|
|||
return id;
|
||||
}
|
||||
|
||||
public static boolean isOp(String username)
|
||||
{
|
||||
MinecraftServer theServer = FMLCommonHandler.instance().getMinecraftServerInstance();
|
||||
|
||||
if (theServer != null)
|
||||
{
|
||||
return theServer.getConfigurationManager().getOps().contains(username.trim().toLowerCase());
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark;
|
||||
package com.builtbroken.minecraft;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark;
|
||||
package com.builtbroken.minecraft;
|
||||
|
||||
public enum EnumOrePart
|
||||
{
|
240
src/com/builtbroken/minecraft/FXBeam.java
Normal file
240
src/com/builtbroken/minecraft/FXBeam.java
Normal file
|
@ -0,0 +1,240 @@
|
|||
package com.builtbroken.minecraft;
|
||||
|
||||
import java.awt.Color;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import universalelectricity.core.vector.Vector3;
|
||||
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/** Based off Thaumcraft's Beam Renderer.
|
||||
*
|
||||
* @author Calclavia, Azanor */
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class FXBeam extends EntityFX
|
||||
{
|
||||
double movX = 0.0D, movY = 0.0D, movZ = 0.0D;
|
||||
|
||||
private float length = 0.0F;
|
||||
|
||||
private float rotYaw = 0.0F, rotPitch = 0.0F, rotSpeed = 20;
|
||||
|
||||
private float prevYaw = 0.0F, prevPitch = 0.0F;
|
||||
|
||||
private Vector3 endLocation = new Vector3();
|
||||
|
||||
private float endModifier = 1.0F;
|
||||
|
||||
/** Reverse rotation */
|
||||
private boolean reverse = false;
|
||||
/** pulse or fade as the life span goes down */
|
||||
private boolean pulse = false;
|
||||
|
||||
private float prevSize = 0.0F;
|
||||
/** beam diameter */
|
||||
private float beamD = 0.08f;
|
||||
|
||||
private String texture = DarkCore.TEXTURE_DIRECTORY + "";
|
||||
|
||||
public FXBeam(World world, Vector3 start, Vector3 end, Color color, String texture, int age, boolean pulse)
|
||||
{
|
||||
this(world, start, end, color, texture, age);
|
||||
this.pulse = pulse;
|
||||
}
|
||||
|
||||
public FXBeam(World world, Vector3 start, Vector3 end, Color color, String texture, int age)
|
||||
{
|
||||
super(world, start.x, start.y, start.z, 0.0D, 0.0D, 0.0D);
|
||||
|
||||
this.setRGB(color);
|
||||
|
||||
this.texture = texture;
|
||||
|
||||
this.setSize(0.02F, 0.02F);
|
||||
this.noClip = true;
|
||||
|
||||
this.motionX = 0.0D;
|
||||
this.motionY = 0.0D;
|
||||
this.motionZ = 0.0D;
|
||||
|
||||
this.endLocation = end;
|
||||
float xd = (float) (this.posX - this.endLocation.x);
|
||||
float yd = (float) (this.posY - this.endLocation.y);
|
||||
float zd = (float) (this.posZ - this.endLocation.z);
|
||||
this.length = (float) new Vector3(this).distance(this.endLocation);
|
||||
double var7 = MathHelper.sqrt_double(xd * xd + zd * zd);
|
||||
this.rotYaw = ((float) (Math.atan2(xd, zd) * 180.0D / 3.141592653589793D));
|
||||
this.rotPitch = ((float) (Math.atan2(yd, var7) * 180.0D / 3.141592653589793D));
|
||||
this.prevYaw = this.rotYaw;
|
||||
this.prevPitch = this.rotPitch;
|
||||
|
||||
this.particleMaxAge = age;
|
||||
|
||||
/** Sets the particle age based on distance. */
|
||||
EntityLivingBase renderentity = Minecraft.getMinecraft().renderViewEntity;
|
||||
int visibleDistance = 50;
|
||||
|
||||
if (!Minecraft.getMinecraft().gameSettings.fancyGraphics)
|
||||
{
|
||||
visibleDistance = 25;
|
||||
}
|
||||
if (renderentity.getDistance(this.posX, this.posY, this.posZ) > visibleDistance)
|
||||
{
|
||||
this.particleMaxAge = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate()
|
||||
{
|
||||
this.prevPosX = this.posX;
|
||||
this.prevPosY = this.posY;
|
||||
this.prevPosZ = this.posZ;
|
||||
|
||||
this.prevYaw = this.rotYaw;
|
||||
this.prevPitch = this.rotPitch;
|
||||
|
||||
float deltaX = (float) (this.posX - this.endLocation.x);
|
||||
float deltaY = (float) (this.posY - this.endLocation.y);
|
||||
float deltaZ = (float) (this.posZ - this.endLocation.z);
|
||||
|
||||
this.length = MathHelper.sqrt_float(deltaX * deltaX + deltaY * deltaY + deltaZ * deltaZ);
|
||||
|
||||
double xzMag = MathHelper.sqrt_double(deltaX * deltaX + deltaZ * deltaZ);
|
||||
|
||||
this.rotYaw = ((float) (Math.atan2(deltaX, deltaZ) * 180.0D / 3.141592653589793D));
|
||||
this.rotPitch = ((float) (Math.atan2(deltaY, xzMag) * 180.0D / 3.141592653589793D));
|
||||
|
||||
if (this.particleAge++ >= this.particleMaxAge)
|
||||
{
|
||||
setDead();
|
||||
}
|
||||
}
|
||||
|
||||
public void setRGB(float r, float g, float b)
|
||||
{
|
||||
this.particleRed = r;
|
||||
this.particleGreen = g;
|
||||
this.particleBlue = b;
|
||||
}
|
||||
|
||||
public void setRGB(Color color)
|
||||
{
|
||||
this.particleRed = color.getRed();
|
||||
this.particleGreen = color.getGreen();
|
||||
this.particleBlue = color.getBlue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle(Tessellator tessellator, float f, float f1, float f2, float f3, float f4, float f5)
|
||||
{
|
||||
//Clear
|
||||
tessellator.draw();
|
||||
GL11.glPushMatrix();
|
||||
|
||||
//Start drawing
|
||||
try
|
||||
{
|
||||
float var9 = 1.0F;
|
||||
float slide = this.worldObj.getTotalWorldTime();
|
||||
float rot = this.worldObj.provider.getWorldTime() % (360 / this.rotSpeed) * this.rotSpeed + this.rotSpeed * f;
|
||||
|
||||
float size = 1.0F;
|
||||
float alphaColor = 0.5F;
|
||||
|
||||
if (this.pulse)
|
||||
{
|
||||
size = Math.min(this.particleAge / 4.0F, 1.0F);
|
||||
size = this.prevSize + (size - this.prevSize) * f;
|
||||
if ((this.particleMaxAge - this.particleAge <= 4))
|
||||
{
|
||||
alphaColor = 0.5F - (4 - (this.particleMaxAge - this.particleAge)) * 0.1F;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(this.texture));
|
||||
|
||||
GL11.glTexParameterf(3553, 10242, 10497.0F);
|
||||
GL11.glTexParameterf(3553, 10243, 10497.0F);
|
||||
|
||||
GL11.glDisable(2884);
|
||||
|
||||
float var11 = slide + f;
|
||||
if (this.reverse)
|
||||
{
|
||||
var11 *= -1.0F;
|
||||
}
|
||||
float var12 = -var11 * 0.2F - MathHelper.floor_float(-var11 * 0.1F);
|
||||
|
||||
GL11.glEnable(3042);
|
||||
GL11.glBlendFunc(770, 1);
|
||||
GL11.glDepthMask(false);
|
||||
|
||||
float xx = (float) (this.prevPosX + (this.posX - this.prevPosX) * f - interpPosX);
|
||||
float yy = (float) (this.prevPosY + (this.posY - this.prevPosY) * f - interpPosY);
|
||||
float zz = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * f - interpPosZ);
|
||||
GL11.glTranslated(xx, yy, zz);
|
||||
|
||||
float yaw = this.prevYaw + (this.rotYaw - this.prevYaw) * f;
|
||||
float pitch = this.prevPitch + (this.rotPitch - this.prevPitch) * f;
|
||||
GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(180.0F + yaw, 0.0F, 0.0F, -1.0F);
|
||||
GL11.glRotatef(pitch, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
double negWidth = -beamD * size;
|
||||
double posWidth = beamD * size;
|
||||
//TODO test length without size to see if that will fix length render changes
|
||||
double negLength = -beamD * size * this.endModifier;
|
||||
double posLength = beamD * size * this.endModifier;
|
||||
|
||||
GL11.glRotatef(rot, 0.0F, 1.0F, 0.0F);
|
||||
for (int t = 0; t < 3; t++)
|
||||
{
|
||||
double dist = this.length * size * var9;
|
||||
double var31 = 0.0D;
|
||||
double var33 = 1.0D;
|
||||
double var35 = -1.0F + var12 + t / 3.0F;
|
||||
double uvLength = this.length * size * var9 + var35;
|
||||
|
||||
GL11.glRotatef(60.0F, 0.0F, 1.0F, 0.0F);
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setBrightness(200);
|
||||
tessellator.setColorRGBA_F(this.particleRed, this.particleGreen, this.particleBlue, alphaColor);
|
||||
tessellator.addVertexWithUV(negLength, dist, 0.0D, var33, uvLength);
|
||||
tessellator.addVertexWithUV(negWidth, 0.0D, 0.0D, var33, var35);
|
||||
tessellator.addVertexWithUV(posWidth, 0.0D, 0.0D, var31, var35);
|
||||
tessellator.addVertexWithUV(posLength, dist, 0.0D, var31, uvLength);
|
||||
tessellator.draw();
|
||||
}
|
||||
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glDepthMask(true);
|
||||
GL11.glDisable(3042);
|
||||
GL11.glEnable(2884);
|
||||
|
||||
this.prevSize = size;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
//Reset
|
||||
GL11.glPopMatrix();
|
||||
tessellator.startDrawingQuads();
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("textures/particle/particles.png"));
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark;
|
||||
package com.builtbroken.minecraft;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark;
|
||||
package com.builtbroken.minecraft;
|
||||
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
55
src/com/builtbroken/minecraft/LaserEntityDamageSource.java
Normal file
55
src/com/builtbroken/minecraft/LaserEntityDamageSource.java
Normal file
|
@ -0,0 +1,55 @@
|
|||
package com.builtbroken.minecraft;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.monster.EntityCreeper;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EntityDamageSource;
|
||||
import net.minecraftforge.event.ForgeSubscribe;
|
||||
import net.minecraftforge.event.entity.living.LivingAttackEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingDeathEvent;
|
||||
|
||||
public class LaserEntityDamageSource extends EntityDamageSource
|
||||
{
|
||||
public LaserEntityDamageSource(Entity par2Entity)
|
||||
{
|
||||
super("Laser", par2Entity);
|
||||
}
|
||||
|
||||
@ForgeSubscribe
|
||||
public void LivingDeathEvent(LivingDeathEvent event)
|
||||
{
|
||||
if (event.entity instanceof EntityCreeper)
|
||||
{
|
||||
if (!event.entity.worldObj.isRemote && event.source instanceof LaserEntityDamageSource)
|
||||
{
|
||||
boolean flag = event.entity.worldObj.getGameRules().getGameRuleBooleanValue("mobGriefing");
|
||||
|
||||
if (((EntityCreeper) event.entity).getPowered())
|
||||
{
|
||||
event.entity.worldObj.createExplosion(event.entity, event.entity.posX, event.entity.posY, event.entity.posZ, 3 * 2, flag);
|
||||
}
|
||||
else
|
||||
{
|
||||
event.entity.worldObj.createExplosion(event.entity, event.entity.posX, event.entity.posY, event.entity.posZ, 3, flag);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ForgeSubscribe
|
||||
public void LivingAttackEvent(LivingAttackEvent event)
|
||||
{
|
||||
if (event.entity instanceof EntityPlayer)
|
||||
{
|
||||
if (((EntityPlayer) event.entity).inventory.armorItemInSlot(3) == new ItemStack(Item.plateDiamond, 1))
|
||||
{
|
||||
if (event.isCancelable())
|
||||
{
|
||||
event.setCanceled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark;
|
||||
package com.builtbroken.minecraft;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -21,7 +21,7 @@ import net.minecraftforge.event.Cancelable;
|
|||
import net.minecraftforge.event.Event;
|
||||
import universalelectricity.core.vector.Vector3;
|
||||
|
||||
import com.dark.helpers.DarksHelper;
|
||||
import com.builtbroken.minecraft.helpers.DarksHelper;
|
||||
|
||||
/** An event triggered by entities or tiles that create lasers
|
||||
*
|
79
src/com/builtbroken/minecraft/MachineMiningEvent.java
Normal file
79
src/com/builtbroken/minecraft/MachineMiningEvent.java
Normal file
|
@ -0,0 +1,79 @@
|
|||
package com.builtbroken.minecraft;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.Cancelable;
|
||||
import net.minecraftforge.event.Event;
|
||||
import universalelectricity.core.vector.Vector3;
|
||||
|
||||
public class MachineMiningEvent extends Event
|
||||
{
|
||||
public final World world;
|
||||
public final Vector3 spot;
|
||||
public final TileEntity machine;
|
||||
|
||||
public MachineMiningEvent(World world, Vector3 spot, TileEntity machine)
|
||||
{
|
||||
this.world = world;
|
||||
this.spot = spot;
|
||||
this.machine = machine;
|
||||
}
|
||||
|
||||
@Cancelable
|
||||
public static class PreMine extends MachineMiningEvent
|
||||
{
|
||||
public PreMine(World world, Vector3 spot, TileEntity machine)
|
||||
{
|
||||
super(world, spot, machine);
|
||||
}
|
||||
}
|
||||
|
||||
public static class MiningDrop extends MachineMiningEvent
|
||||
{
|
||||
List<ItemStack> items;
|
||||
|
||||
public MiningDrop(World world, Vector3 spot, TileEntity machine, List<ItemStack> items)
|
||||
{
|
||||
super(world, spot, machine);
|
||||
this.items = items;
|
||||
}
|
||||
}
|
||||
|
||||
public static class PostMine extends MachineMiningEvent
|
||||
{
|
||||
public PostMine(World world, Vector3 spot, TileEntity machine)
|
||||
{
|
||||
super(world, spot, machine);
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean doMachineMiningCheck(World world, Vector3 target, TileEntity machine)
|
||||
{
|
||||
Block block = Block.blocksList[target.getBlockID(world)];
|
||||
|
||||
return block != null && target.getTileEntity(world) == null && !block.isAirBlock(world, target.intX(), target.intY(), target.intZ()) && block.getBlockHardness(world, target.intX(), target.intY(), target.intZ()) >= 0;
|
||||
|
||||
}
|
||||
|
||||
public static List<ItemStack> getItemsMined(World world, Vector3 target, TileEntity machine)
|
||||
{
|
||||
Block block = Block.blocksList[target.getBlockID(world)];
|
||||
if (block != null)
|
||||
{
|
||||
List<ItemStack> items = block.getBlockDropped(world, target.intX(), target.intY(), target.intZ(), target.getBlockMetadata(world), 1);
|
||||
if (items != null)
|
||||
{
|
||||
MiningDrop event = new MiningDrop(world, target, machine, items);
|
||||
MinecraftForge.EVENT_BUS.post(event);
|
||||
items = event.items;
|
||||
return items;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
45
src/com/builtbroken/minecraft/OtherDamageSource.java
Normal file
45
src/com/builtbroken/minecraft/OtherDamageSource.java
Normal file
|
@ -0,0 +1,45 @@
|
|||
package com.builtbroken.minecraft;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import universalelectricity.prefab.CustomDamageSource;
|
||||
|
||||
public class OtherDamageSource extends CustomDamageSource
|
||||
{
|
||||
protected Object damageSource;
|
||||
|
||||
public OtherDamageSource(String damageName, Object attacker)
|
||||
{
|
||||
super(damageName);
|
||||
this.damageSource = attacker;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Entity getEntity()
|
||||
{
|
||||
return damageSource instanceof Entity ? ((Entity) damageSource) : null;
|
||||
}
|
||||
|
||||
public TileEntity getTileEntity()
|
||||
{
|
||||
return damageSource instanceof TileEntity ? ((TileEntity) damageSource) : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDifficultyScaled()
|
||||
{
|
||||
return this.damageSource != null && this.damageSource instanceof EntityLiving && !(this.damageSource instanceof EntityPlayer);
|
||||
}
|
||||
|
||||
public static OtherDamageSource doBulletDamage(Object object)
|
||||
{
|
||||
return (OtherDamageSource) ((CustomDamageSource) new OtherDamageSource("Bullets", object).setProjectile()).setDeathMessage("%1$s was filled with holes!");
|
||||
}
|
||||
|
||||
public static OtherDamageSource doLaserDamage(Object object)
|
||||
{
|
||||
return (OtherDamageSource) ((CustomDamageSource) new OtherDamageSource("Laser", object).setProjectile()).setDeathMessage("%1$s was vaporized!");
|
||||
}
|
||||
}
|
|
@ -1,8 +1,15 @@
|
|||
package com.dark;
|
||||
package com.builtbroken.minecraft;
|
||||
|
||||
import java.awt.Color;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import universalelectricity.core.vector.Vector3;
|
||||
|
||||
import com.builtbroken.minecraft.network.PacketManagerEffects;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class RegistryProxy
|
||||
|
@ -19,4 +26,9 @@ public class RegistryProxy
|
|||
{
|
||||
GameRegistry.registerTileEntityWithAlternatives(clazz, name, "DM" + name);
|
||||
}
|
||||
|
||||
public void renderBeam(World world, Vector3 position, Vector3 target, Color color, int age)
|
||||
{
|
||||
PacketManagerEffects.sendClientLaserEffect(world, position, target, color, age);
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.access;
|
||||
package com.builtbroken.minecraft.access;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.access;
|
||||
package com.builtbroken.minecraft.access;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
|
@ -12,9 +12,9 @@ import net.minecraft.nbt.NBTTagList;
|
|||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
import com.dark.save.IVirtualObject;
|
||||
import com.dark.save.NBTFileHelper;
|
||||
import com.dark.save.SaveManager;
|
||||
import com.builtbroken.minecraft.save.IVirtualObject;
|
||||
import com.builtbroken.minecraft.save.NBTFileHelper;
|
||||
import com.builtbroken.minecraft.save.SaveManager;
|
||||
|
||||
/** Designed to be used as a container for AccessGroups and AccessUser. If you plan to use this make
|
||||
* sure to use it correctly. This is designed to be saved separate from the world save if marked for
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.access;
|
||||
package com.builtbroken.minecraft.access;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.access;
|
||||
package com.builtbroken.minecraft.access;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.access;
|
||||
package com.builtbroken.minecraft.access;
|
||||
|
||||
/** Applied to tileEntities that contain an access profile that describes how the tile interacts with
|
||||
* users
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.access;
|
||||
package com.builtbroken.minecraft.access;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.access;
|
||||
package com.builtbroken.minecraft.access;
|
||||
|
||||
/** Constants that represent nodes by which machines and entities used in combination with
|
||||
* ISpecialAccess to limit users on what they can do. These nodes should be used in the same way by
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.fluid;
|
||||
package com.builtbroken.minecraft.fluid;
|
||||
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.fluid;
|
||||
package com.builtbroken.minecraft.fluid;
|
||||
|
||||
import com.builtbroken.common.science.ChemElement;
|
||||
import com.builtbroken.common.science.ChemicalCompound;
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.fluid;
|
||||
package com.builtbroken.minecraft.fluid;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.fluid;
|
||||
package com.builtbroken.minecraft.fluid;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
@ -23,7 +23,7 @@ import net.minecraftforge.fluids.IFluidHandler;
|
|||
import universalelectricity.core.vector.Vector3;
|
||||
|
||||
import com.builtbroken.common.Pair;
|
||||
import com.dark.helpers.AutoCraftingManager;
|
||||
import com.builtbroken.minecraft.recipes.AutoCraftingManager;
|
||||
|
||||
public class FluidHelper
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.fluid;
|
||||
package com.builtbroken.minecraft.fluid;
|
||||
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.fluid;
|
||||
package com.builtbroken.minecraft.fluid;
|
||||
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.fluid;
|
||||
package com.builtbroken.minecraft.fluid;
|
||||
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.helpers;
|
||||
package com.builtbroken.minecraft.helpers;
|
||||
|
||||
import java.awt.Color;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.helpers;
|
||||
package com.builtbroken.minecraft.helpers;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.helpers;
|
||||
package com.builtbroken.minecraft.helpers;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.helpers;
|
||||
package com.builtbroken.minecraft.helpers;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -13,7 +13,7 @@ import net.minecraft.world.World;
|
|||
import net.minecraftforge.common.ForgeDirection;
|
||||
import universalelectricity.core.vector.Vector3;
|
||||
|
||||
import com.dark.interfaces.IExtendedStorage;
|
||||
import com.builtbroken.minecraft.interfaces.IExtendedStorage;
|
||||
|
||||
/** Helper that handles most of the interaction of the tile with the inventories around it
|
||||
*
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.helpers;
|
||||
package com.builtbroken.minecraft.helpers;
|
||||
|
||||
import java.util.Random;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.helpers;
|
||||
package com.builtbroken.minecraft.helpers;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
|
@ -8,7 +8,7 @@ import net.minecraft.client.settings.KeyBinding;
|
|||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.input.Mouse;
|
||||
|
||||
import com.dark.network.PacketManagerKeyEvent;
|
||||
import com.builtbroken.minecraft.network.PacketManagerKeyEvent;
|
||||
|
||||
import cpw.mods.fml.common.IScheduledTickHandler;
|
||||
import cpw.mods.fml.common.TickType;
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.helpers;
|
||||
package com.builtbroken.minecraft.helpers;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.interfaces;
|
||||
package com.builtbroken.minecraft.interfaces;
|
||||
|
||||
import universalelectricity.core.vector.Vector3;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.interfaces;
|
||||
package com.builtbroken.minecraft.interfaces;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.interfaces;
|
||||
package com.builtbroken.minecraft.interfaces;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.interfaces;
|
||||
package com.builtbroken.minecraft.interfaces;
|
||||
|
||||
/** This class should be applied to all tile entities (mainly machines) that can be disabled (by
|
||||
* things like EMP, short circuit etc.).
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.interfaces;
|
||||
package com.builtbroken.minecraft.interfaces;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.interfaces;
|
||||
package com.builtbroken.minecraft.interfaces;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.interfaces;
|
||||
package com.builtbroken.minecraft.interfaces;
|
||||
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.interfaces;
|
||||
package com.builtbroken.minecraft.interfaces;
|
||||
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.interfaces;
|
||||
package com.builtbroken.minecraft.interfaces;
|
||||
|
||||
/** Applied to devices that have the option to run without power. Normally this option is only shown
|
||||
* to creative mode players
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.interfaces;
|
||||
package com.builtbroken.minecraft.interfaces;
|
||||
|
||||
public interface IScroll
|
||||
{
|
|
@ -1,10 +1,10 @@
|
|||
package com.dark.interfaces;
|
||||
package com.builtbroken.minecraft.interfaces;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
import com.dark.access.ISpecialAccess;
|
||||
import com.builtbroken.minecraft.access.ISpecialAccess;
|
||||
|
||||
/** Basic methods to make it easier to construct or interact with a terminal based tile. Recommend to
|
||||
* be used by tiles that want to mimic computer command line like interfaces. As well to restrict
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.interfaces;
|
||||
package com.builtbroken.minecraft.interfaces;
|
||||
|
||||
import java.util.Set;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.interfaces;
|
||||
package com.builtbroken.minecraft.interfaces;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.network;
|
||||
package com.builtbroken.minecraft.network;
|
||||
|
||||
import net.minecraft.network.INetworkManager;
|
||||
import net.minecraft.network.packet.Packet250CustomPayload;
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.network;
|
||||
package com.builtbroken.minecraft.network;
|
||||
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.network;
|
||||
package com.builtbroken.minecraft.network;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.network;
|
||||
package com.builtbroken.minecraft.network;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.DataInputStream;
|
|
@ -0,0 +1,65 @@
|
|||
package com.builtbroken.minecraft.network;
|
||||
|
||||
import java.awt.Color;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.network.INetworkManager;
|
||||
import net.minecraft.network.packet.Packet;
|
||||
import net.minecraft.network.packet.Packet250CustomPayload;
|
||||
import net.minecraft.world.World;
|
||||
import universalelectricity.core.vector.Vector3;
|
||||
|
||||
import com.builtbroken.minecraft.CoreRegistry;
|
||||
import com.builtbroken.minecraft.DarkCore;
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
|
||||
import cpw.mods.fml.common.network.Player;
|
||||
|
||||
public class PacketManagerEffects implements IPacketManager
|
||||
{
|
||||
static int packetID = 0;
|
||||
|
||||
@Override
|
||||
public int getID()
|
||||
{
|
||||
return packetID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setID(int maxID)
|
||||
{
|
||||
packetID = maxID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handlePacket(INetworkManager network, Packet250CustomPayload packet, Player player, ByteArrayDataInput data)
|
||||
{
|
||||
try
|
||||
{
|
||||
World world = ((EntityPlayer) player).worldObj;
|
||||
String effectName = data.readUTF();
|
||||
if (world != null)
|
||||
{
|
||||
if (effectName.equalsIgnoreCase("laser"))
|
||||
{
|
||||
System.out.println("Received laser packet");
|
||||
CoreRegistry.proxy().renderBeam(world, PacketHandler.readVector3(data), PacketHandler.readVector3(data), new Color(data.readInt(), data.readInt(), data.readInt()), data.readInt());
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
System.out.println("[CoreMachine] Error reading packet for effect rendering");
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void sendClientLaserEffect(World world, Vector3 position, Vector3 target, Color color, int age)
|
||||
{
|
||||
Packet packet = PacketHandler.instance().getPacketWithID(DarkCore.CHANNEL, packetID, "laser", position, target, color.getRed(), color.getBlue(), color.getGreen(), age);
|
||||
PacketHandler.instance().sendPacketToClients(packet, world, position, position.distance(target));
|
||||
System.out.println("Sent laser render packet to client");
|
||||
}
|
||||
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.network;
|
||||
package com.builtbroken.minecraft.network;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -8,7 +8,7 @@ import net.minecraft.network.packet.Packet250CustomPayload;
|
|||
import net.minecraft.world.World;
|
||||
import universalelectricity.core.vector.Vector3;
|
||||
|
||||
import com.dark.DarkCore;
|
||||
import com.builtbroken.minecraft.DarkCore;
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.network;
|
||||
package com.builtbroken.minecraft.network;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -7,8 +7,8 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.network.INetworkManager;
|
||||
import net.minecraft.network.packet.Packet250CustomPayload;
|
||||
|
||||
import com.dark.DarkCore;
|
||||
import com.dark.interfaces.IControlReceiver;
|
||||
import com.builtbroken.minecraft.DarkCore;
|
||||
import com.builtbroken.minecraft.interfaces.IControlReceiver;
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.network;
|
||||
package com.builtbroken.minecraft.network;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.network.INetworkManager;
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.prefab;
|
||||
package com.builtbroken.minecraft.prefab;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
@ -19,12 +19,12 @@ import net.minecraftforge.oredict.OreDictionary;
|
|||
import universalelectricity.prefab.block.BlockTile;
|
||||
|
||||
import com.builtbroken.common.Pair;
|
||||
import com.dark.DarkCore;
|
||||
import com.dark.IExtraInfo.IExtraBlockInfo;
|
||||
import com.dark.access.AccessUser;
|
||||
import com.dark.access.ISpecialAccess;
|
||||
import com.dark.interfaces.IBlockActivated;
|
||||
import com.dark.tilenetwork.INetworkPart;
|
||||
import com.builtbroken.minecraft.DarkCore;
|
||||
import com.builtbroken.minecraft.IExtraInfo.IExtraBlockInfo;
|
||||
import com.builtbroken.minecraft.access.AccessUser;
|
||||
import com.builtbroken.minecraft.access.ISpecialAccess;
|
||||
import com.builtbroken.minecraft.interfaces.IBlockActivated;
|
||||
import com.builtbroken.minecraft.tilenetwork.INetworkPart;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.prefab;
|
||||
package com.builtbroken.minecraft.prefab;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
@ -18,8 +18,8 @@ import universalelectricity.core.UniversalElectricity;
|
|||
import universalelectricity.core.vector.Vector3;
|
||||
|
||||
import com.builtbroken.common.Pair;
|
||||
import com.dark.DarkCore;
|
||||
import com.dark.IExtraInfo.IExtraBlockInfo;
|
||||
import com.builtbroken.minecraft.DarkCore;
|
||||
import com.builtbroken.minecraft.IExtraInfo.IExtraBlockInfo;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
@ -1,9 +1,9 @@
|
|||
package com.dark.prefab;
|
||||
package com.builtbroken.minecraft.prefab;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
import com.dark.save.ISaveObj;
|
||||
import com.dark.save.NBTFileHelper;
|
||||
import com.builtbroken.minecraft.save.ISaveObj;
|
||||
import com.builtbroken.minecraft.save.NBTFileHelper;
|
||||
|
||||
/** Wrapper for data to be sent threw a network to a device
|
||||
*
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.prefab;
|
||||
package com.builtbroken.minecraft.prefab;
|
||||
|
||||
|
||||
import ic2.api.item.IElectricItemManager;
|
|
@ -1,9 +1,9 @@
|
|||
package com.dark.prefab;
|
||||
package com.builtbroken.minecraft.prefab;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
|
||||
import com.dark.DarkCore;
|
||||
import com.builtbroken.minecraft.DarkCore;
|
||||
|
||||
public class ItemBasic extends Item
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.prefab;
|
||||
package com.builtbroken.minecraft.prefab;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemBlock;
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.prefab;
|
||||
package com.builtbroken.minecraft.prefab;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.prefab;
|
||||
package com.builtbroken.minecraft.prefab;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
|
@ -16,7 +16,7 @@ import universalelectricity.core.grid.IElectricityNetwork;
|
|||
import universalelectricity.core.vector.Vector3;
|
||||
import universalelectricity.core.vector.VectorHelper;
|
||||
|
||||
import com.dark.interfaces.IPowerLess;
|
||||
import com.builtbroken.minecraft.interfaces.IPowerLess;
|
||||
|
||||
/** Basic energy tile that can consume power
|
||||
*
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.prefab;
|
||||
package com.builtbroken.minecraft.prefab;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -13,15 +13,15 @@ import net.minecraftforge.common.ForgeDirection;
|
|||
import universalelectricity.core.vector.Vector3;
|
||||
import universalelectricity.prefab.tile.TileEntityAdvanced;
|
||||
|
||||
import com.dark.access.AccessGroup;
|
||||
import com.dark.access.AccessUser;
|
||||
import com.dark.access.GroupRegistry;
|
||||
import com.dark.access.ISpecialAccess;
|
||||
import com.dark.access.Nodes;
|
||||
import com.dark.interfaces.IExternalInv;
|
||||
import com.dark.interfaces.IInvBox;
|
||||
import com.dark.prefab.invgui.InvChest;
|
||||
import com.dark.tilenetwork.prefab.NetworkTileEntities;
|
||||
import com.builtbroken.minecraft.access.AccessGroup;
|
||||
import com.builtbroken.minecraft.access.AccessUser;
|
||||
import com.builtbroken.minecraft.access.GroupRegistry;
|
||||
import com.builtbroken.minecraft.access.ISpecialAccess;
|
||||
import com.builtbroken.minecraft.access.Nodes;
|
||||
import com.builtbroken.minecraft.interfaces.IExternalInv;
|
||||
import com.builtbroken.minecraft.interfaces.IInvBox;
|
||||
import com.builtbroken.minecraft.prefab.invgui.InvChest;
|
||||
import com.builtbroken.minecraft.tilenetwork.prefab.NetworkTileEntities;
|
||||
|
||||
|
||||
/** Prefab for simple object who only need basic inv support and nothing more
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.prefab;
|
||||
package com.builtbroken.minecraft.prefab;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
@ -12,13 +12,13 @@ import net.minecraftforge.common.ForgeDirection;
|
|||
import universalelectricity.core.vector.Vector3;
|
||||
import universalelectricity.prefab.tile.IRotatable;
|
||||
|
||||
import com.dark.DarkCore;
|
||||
import com.dark.IExtraInfo.IExtraTileEntityInfo;
|
||||
import com.dark.interfaces.IDisableable;
|
||||
import com.dark.interfaces.IExternalInv;
|
||||
import com.dark.interfaces.IInvBox;
|
||||
import com.dark.network.ISimplePacketReceiver;
|
||||
import com.dark.network.PacketHandler;
|
||||
import com.builtbroken.minecraft.DarkCore;
|
||||
import com.builtbroken.minecraft.IExtraInfo.IExtraTileEntityInfo;
|
||||
import com.builtbroken.minecraft.interfaces.IDisableable;
|
||||
import com.builtbroken.minecraft.interfaces.IExternalInv;
|
||||
import com.builtbroken.minecraft.interfaces.IInvBox;
|
||||
import com.builtbroken.minecraft.network.ISimplePacketReceiver;
|
||||
import com.builtbroken.minecraft.network.PacketHandler;
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.prefab;
|
||||
package com.builtbroken.minecraft.prefab;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
@ -10,8 +10,8 @@ import net.minecraft.world.World;
|
|||
import universalelectricity.core.vector.Vector3;
|
||||
import universalelectricity.prefab.network.IPacketReceiver;
|
||||
|
||||
import com.dark.interfaces.IMultiBlock;
|
||||
import com.dark.network.PacketHandler;
|
||||
import com.builtbroken.minecraft.interfaces.IMultiBlock;
|
||||
import com.builtbroken.minecraft.network.PacketHandler;
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
|
||||
/** This is a multiblock to be used for blocks that are bigger than one block.
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.prefab.invgui;
|
||||
package com.builtbroken.minecraft.prefab.invgui;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.prefab.invgui;
|
||||
package com.builtbroken.minecraft.prefab.invgui;
|
||||
|
||||
import java.awt.Color;
|
||||
|
||||
|
@ -11,7 +11,7 @@ import org.lwjgl.opengl.GL11;
|
|||
|
||||
import universalelectricity.core.vector.Vector2;
|
||||
|
||||
import com.dark.DarkCore;
|
||||
import com.builtbroken.minecraft.DarkCore;
|
||||
|
||||
/** When done should be a prefab that can be used to render a power bar on the screen
|
||||
*
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.prefab.invgui;
|
||||
package com.builtbroken.minecraft.prefab.invgui;
|
||||
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.prefab.invgui;
|
||||
package com.builtbroken.minecraft.prefab.invgui;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
|
@ -6,7 +6,7 @@ import net.minecraft.util.ResourceLocation;
|
|||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.dark.DarkCore;
|
||||
import com.builtbroken.minecraft.DarkCore;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.prefab.invgui;
|
||||
package com.builtbroken.minecraft.prefab.invgui;
|
||||
|
||||
/** Same as the GuiMachineBase but supports inventory pages
|
||||
*
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.prefab.invgui;
|
||||
package com.builtbroken.minecraft.prefab.invgui;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
|
@ -8,9 +8,9 @@ import net.minecraft.util.ResourceLocation;
|
|||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import com.dark.DarkCore;
|
||||
import com.dark.prefab.TileEntityMachine;
|
||||
import com.dark.prefab.invgui.GuiButtonImage.ButtonIcon;
|
||||
import com.builtbroken.minecraft.DarkCore;
|
||||
import com.builtbroken.minecraft.prefab.TileEntityMachine;
|
||||
import com.builtbroken.minecraft.prefab.invgui.GuiButtonImage.ButtonIcon;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.prefab.invgui;
|
||||
package com.builtbroken.minecraft.prefab.invgui;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
|
@ -11,8 +11,8 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import com.dark.prefab.TileEntityMachine;
|
||||
import com.dark.prefab.invgui.GuiButtonImage.ButtonIcon;
|
||||
import com.builtbroken.minecraft.prefab.TileEntityMachine;
|
||||
import com.builtbroken.minecraft.prefab.invgui.GuiButtonImage.ButtonIcon;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
|
@ -1,11 +1,11 @@
|
|||
package com.dark.prefab.invgui;
|
||||
package com.builtbroken.minecraft.prefab.invgui;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.dark.DarkCore;
|
||||
import com.builtbroken.minecraft.DarkCore;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.prefab.invgui;
|
||||
package com.builtbroken.minecraft.prefab.invgui;
|
||||
|
||||
public interface IMessageBoxDialog
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.prefab.invgui;
|
||||
package com.builtbroken.minecraft.prefab.invgui;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.prefab.invgui;
|
||||
package com.builtbroken.minecraft.prefab.invgui;
|
||||
|
||||
/** Add this to a container class if using WatchedSlot to trigger the container on slot change */
|
||||
public interface ISlotWatcher
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.prefab.invgui;
|
||||
package com.builtbroken.minecraft.prefab.invgui;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -8,8 +8,8 @@ import net.minecraft.nbt.NBTTagList;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
|
||||
import com.dark.interfaces.IExternalInv;
|
||||
import com.dark.interfaces.IInvBox;
|
||||
import com.builtbroken.minecraft.interfaces.IExternalInv;
|
||||
import com.builtbroken.minecraft.interfaces.IInvBox;
|
||||
|
||||
public class InvChest implements IInvBox
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.prefab.invgui;
|
||||
package com.builtbroken.minecraft.prefab.invgui;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.prefab.invgui;
|
||||
package com.builtbroken.minecraft.prefab.invgui;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.Slot;
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.prefab.invgui;
|
||||
package com.builtbroken.minecraft.prefab.invgui;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.Slot;
|
|
@ -1,4 +1,4 @@
|
|||
package dark.api.reciepes;
|
||||
package com.builtbroken.minecraft.recipes;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.helpers;
|
||||
package com.builtbroken.minecraft.recipes;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
|
@ -1,4 +1,4 @@
|
|||
package dark.api.reciepes;
|
||||
package com.builtbroken.minecraft.recipes;
|
||||
|
||||
/** Machine or entity that is creating a AssemblyObject. Avoid actually storing the recipe item if
|
||||
* there is one. Instead do what a few other mods do an give the illusion of the recipe being
|
|
@ -1,4 +1,4 @@
|
|||
package dark.api.reciepes;
|
||||
package com.builtbroken.minecraft.recipes;
|
||||
|
||||
/** Applied to objects that are not complete and are being constructed from parts slowly. Used mainly
|
||||
* with assembly line armbots to create large objects like rockets automatically.
|
|
@ -1,4 +1,4 @@
|
|||
package dark.api.reciepes;
|
||||
package com.builtbroken.minecraft.recipes;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package dark.api.reciepes;
|
||||
package com.builtbroken.minecraft.recipes;
|
||||
|
||||
/** Advanced version of the assemblyRecipe. This is also used to display the recipe like a blueprint
|
||||
*
|
|
@ -1,4 +1,4 @@
|
|||
package dark.api.reciepes;
|
||||
package com.builtbroken.minecraft.recipes;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
|
@ -1,4 +1,4 @@
|
|||
package dark.api.reciepes;
|
||||
package com.builtbroken.minecraft.recipes;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package dark.api.reciepes;
|
||||
package com.builtbroken.minecraft.recipes;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
|
@ -9,7 +9,6 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.item.ItemTool;
|
||||
|
||||
import com.builtbroken.common.Pair;
|
||||
import com.dark.helpers.AutoCraftingManager;
|
||||
|
||||
/** Recipes for ore processor machines
|
||||
*
|
|
@ -1,4 +1,4 @@
|
|||
package dark.api.reciepes;
|
||||
package com.builtbroken.minecraft.recipes;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package dark.api.reciepes;
|
||||
package com.builtbroken.minecraft.recipes;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.save;
|
||||
package com.builtbroken.minecraft.save;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.save;
|
||||
package com.builtbroken.minecraft.save;
|
||||
|
||||
import java.io.File;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.save;
|
||||
package com.builtbroken.minecraft.save;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.save;
|
||||
package com.builtbroken.minecraft.save;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
|
@ -1,13 +1,13 @@
|
|||
package com.dark.terminal;
|
||||
package com.builtbroken.minecraft.terminal;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
import com.dark.access.GroupRegistry;
|
||||
import com.dark.interfaces.ITerminal;
|
||||
import com.dark.interfaces.ITerminalCommand;
|
||||
import com.builtbroken.minecraft.access.GroupRegistry;
|
||||
import com.builtbroken.minecraft.interfaces.ITerminal;
|
||||
import com.builtbroken.minecraft.interfaces.ITerminalCommand;
|
||||
|
||||
public class CommandRegistry
|
||||
{
|
|
@ -1,13 +1,13 @@
|
|||
package com.dark.terminal;
|
||||
package com.builtbroken.minecraft.terminal;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
import com.dark.access.ISpecialAccess;
|
||||
import com.dark.interfaces.ITerminal;
|
||||
import com.dark.interfaces.ITerminalCommand;
|
||||
import com.builtbroken.minecraft.access.ISpecialAccess;
|
||||
import com.builtbroken.minecraft.interfaces.ITerminal;
|
||||
import com.builtbroken.minecraft.interfaces.ITerminalCommand;
|
||||
|
||||
public class CommandUser implements ITerminalCommand
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
package com.dark.terminal;
|
||||
package com.builtbroken.minecraft.terminal;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -8,10 +8,10 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.network.packet.Packet;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
|
||||
import com.dark.interfaces.IScroll;
|
||||
import com.dark.interfaces.ITerminal;
|
||||
import com.dark.network.PacketHandler;
|
||||
import com.dark.prefab.TileEntityEnergyMachine;
|
||||
import com.builtbroken.minecraft.interfaces.IScroll;
|
||||
import com.builtbroken.minecraft.interfaces.ITerminal;
|
||||
import com.builtbroken.minecraft.network.PacketHandler;
|
||||
import com.builtbroken.minecraft.prefab.TileEntityEnergyMachine;
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue