Now the multipart system depends on Qlib, wont load if not installed.
Also a code format of the system
This commit is contained in:
parent
d6797868fb
commit
e2467caede
22 changed files with 1542 additions and 1852 deletions
|
@ -4,13 +4,8 @@
|
|||
|
||||
package techreborn.partSystem;
|
||||
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
@ -21,9 +16,6 @@ import uk.co.qmunity.lib.client.render.RenderHelper;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* This is based of
|
||||
* https://github.com/Qmunity/QmunityLib/blob/master/src/main/java
|
||||
|
@ -33,93 +25,93 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
*/
|
||||
public interface IModPart {
|
||||
|
||||
/**
|
||||
* Adds all of this part's collision boxes to the list. These boxes can
|
||||
* depend on the entity that's colliding with them.
|
||||
*/
|
||||
public void addCollisionBoxesToList(List<Vecs3dCube> boxes, Entity entity);
|
||||
/**
|
||||
* Adds all of this part's collision boxes to the list. These boxes can
|
||||
* depend on the entity that's colliding with them.
|
||||
*/
|
||||
public void addCollisionBoxesToList(List<Vecs3dCube> boxes, Entity entity);
|
||||
|
||||
/**
|
||||
* Gets this part's selection boxes.
|
||||
*/
|
||||
public List<Vecs3dCube> getSelectionBoxes();
|
||||
/**
|
||||
* Gets this part's selection boxes.
|
||||
*/
|
||||
public List<Vecs3dCube> getSelectionBoxes();
|
||||
|
||||
/**
|
||||
* Gets this part's occlusion boxes.
|
||||
*/
|
||||
public List<Vecs3dCube> getOcclusionBoxes();
|
||||
/**
|
||||
* Gets this part's occlusion boxes.
|
||||
*/
|
||||
public List<Vecs3dCube> getOcclusionBoxes();
|
||||
|
||||
/**
|
||||
* Renders this part dynamically (every render tick).
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderDynamic(Vecs3d translation, double delta);
|
||||
/**
|
||||
* Renders this part dynamically (every render tick).
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderDynamic(Vecs3d translation, double delta);
|
||||
|
||||
/**
|
||||
* Renders this part statically. A tessellator has alredy started drawing. <br>
|
||||
* Only called when there's a block/lighting/render update in the chunk this
|
||||
* part is in.
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean renderStatic(Vecs3d translation, RenderHelper renderHelper, int pass);
|
||||
/**
|
||||
* Renders this part statically. A tessellator has alredy started drawing. <br>
|
||||
* Only called when there's a block/lighting/render update in the chunk this
|
||||
* part is in.
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean renderStatic(Vecs3d translation, RenderHelper renderHelper, int pass);
|
||||
|
||||
/**
|
||||
* Writes the part's data to an NBT tag, which is saved with the game data.
|
||||
*/
|
||||
public void writeToNBT(NBTTagCompound tag);
|
||||
/**
|
||||
* Writes the part's data to an NBT tag, which is saved with the game data.
|
||||
*/
|
||||
public void writeToNBT(NBTTagCompound tag);
|
||||
|
||||
/**
|
||||
* Reads the part's data from an NBT tag, which was stored in the game data.
|
||||
*/
|
||||
public void readFromNBT(NBTTagCompound tag);
|
||||
/**
|
||||
* Reads the part's data from an NBT tag, which was stored in the game data.
|
||||
*/
|
||||
public void readFromNBT(NBTTagCompound tag);
|
||||
|
||||
/**
|
||||
* Gets the itemstack that places this part.
|
||||
*/
|
||||
public ItemStack getItem();
|
||||
/**
|
||||
* Gets the itemstack that places this part.
|
||||
*/
|
||||
public ItemStack getItem();
|
||||
|
||||
/**
|
||||
* Gets the name of this part.
|
||||
*/
|
||||
public String getName();
|
||||
/**
|
||||
* Gets the name of this part.
|
||||
*/
|
||||
public String getName();
|
||||
|
||||
/**
|
||||
* Gets the world of this part.
|
||||
*/
|
||||
public World getWorld();
|
||||
/**
|
||||
* Gets the world of this part.
|
||||
*/
|
||||
public World getWorld();
|
||||
|
||||
/**
|
||||
* This is the item texture eg: "network:cable"
|
||||
*/
|
||||
public String getItemTextureName();
|
||||
/**
|
||||
* This is the item texture eg: "network:cable"
|
||||
*/
|
||||
public String getItemTextureName();
|
||||
|
||||
/**
|
||||
* Gets the X cord of this part.
|
||||
*/
|
||||
public int getX();
|
||||
/**
|
||||
* Gets the X cord of this part.
|
||||
*/
|
||||
public int getX();
|
||||
|
||||
/**
|
||||
* Gets the Y cord of this part.
|
||||
*/
|
||||
public int getY();
|
||||
/**
|
||||
* Gets the Y cord of this part.
|
||||
*/
|
||||
public int getY();
|
||||
|
||||
/**
|
||||
* Gets the Z cord of this part.
|
||||
*/
|
||||
public int getZ();
|
||||
/**
|
||||
* Gets the Z cord of this part.
|
||||
*/
|
||||
public int getZ();
|
||||
|
||||
/**
|
||||
* Called every tick
|
||||
*/
|
||||
public void tick();
|
||||
/**
|
||||
* Called every tick
|
||||
*/
|
||||
public void tick();
|
||||
|
||||
/**
|
||||
* Called when a block or part has been changed. Can be used for cables to
|
||||
* check nearby blocks
|
||||
*/
|
||||
public void nearByChange();
|
||||
/**
|
||||
* Called when a block or part has been changed. Can be used for cables to
|
||||
* check nearby blocks
|
||||
*/
|
||||
public void nearByChange();
|
||||
|
||||
public void onAdded();
|
||||
public void onAdded();
|
||||
|
||||
public void onRemoved();
|
||||
public void onRemoved();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue