mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-29 18:28:34 +01:00
Start Work on Laser Relay
This commit is contained in:
parent
6dacc377cf
commit
f036ed0a44
7 changed files with 605 additions and 0 deletions
|
@ -0,0 +1,101 @@
|
||||||
|
/*
|
||||||
|
* This file ("BlockLaserRelay.java") is part of the Actually Additions Mod for Minecraft.
|
||||||
|
* It is created and owned by Ellpeck and distributed
|
||||||
|
* under the Actually Additions License to be found at
|
||||||
|
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
|
||||||
|
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||||
|
*
|
||||||
|
* © 2015 Ellpeck
|
||||||
|
*/
|
||||||
|
|
||||||
|
package ellpeck.actuallyadditions.blocks;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import ellpeck.actuallyadditions.tile.TileEntityLaserRelay;
|
||||||
|
import ellpeck.actuallyadditions.util.AssetUtil;
|
||||||
|
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.item.EnumRarity;
|
||||||
|
import net.minecraft.item.ItemBlock;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.IIcon;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class BlockLaserRelay extends BlockContainerBase implements IActAddItemOrBlock{
|
||||||
|
|
||||||
|
public BlockLaserRelay(){
|
||||||
|
super(Material.rock);
|
||||||
|
this.setHarvestLevel("pickaxe", 0);
|
||||||
|
this.setHardness(1.5F);
|
||||||
|
this.setResistance(10.0F);
|
||||||
|
this.setStepSound(soundTypeStone);
|
||||||
|
|
||||||
|
float f = 1F/16F;
|
||||||
|
this.setBlockBounds(3*f, 0F, 3*f, 1-3*f, 1F, 1-3*f);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean renderAsNormalBlock(){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getRenderType(){
|
||||||
|
return AssetUtil.LASER_RELAY_RENDER_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IIcon getIcon(int side, int metadata){
|
||||||
|
return this.blockIcon;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isOpaqueCube(){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void registerBlockIcons(IIconRegister iconReg){
|
||||||
|
this.blockIcon = Blocks.beacon.getIcon(0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName(){
|
||||||
|
return "blockLaserRelay";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TileEntity createNewTileEntity(World world, int i){
|
||||||
|
return new TileEntityLaserRelay();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class TheItemBlock extends ItemBlock{
|
||||||
|
|
||||||
|
public TheItemBlock(Block block){
|
||||||
|
super(block);
|
||||||
|
this.setHasSubtypes(false);
|
||||||
|
this.setMaxDamage(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getUnlocalizedName(ItemStack stack){
|
||||||
|
return this.getUnlocalizedName();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getMetadata(int damage){
|
||||||
|
return damage;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EnumRarity getRarity(ItemStack stack){
|
||||||
|
return EnumRarity.epic;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -97,9 +97,24 @@ public class InitBlocks{
|
||||||
public static Block blockDirectionalBreaker;
|
public static Block blockDirectionalBreaker;
|
||||||
public static Block blockRangedCollector;
|
public static Block blockRangedCollector;
|
||||||
|
|
||||||
|
//public static Block blockLaserRelay;
|
||||||
|
|
||||||
|
//TODO: Plan for Laser Power Transmitters:
|
||||||
|
//TODO: Connectable with Laser Wrench
|
||||||
|
//TODO: Generate a Network that is (maybe) stored via WorldSavedData
|
||||||
|
//TODO: Whenever a Transmitter is fed with energy, it tries to find a connector that is connected to a block that needs energy
|
||||||
|
//TODO: The power then gets transferred through a Laser Entity that will find its way past all of the transmitters on its way to the block in need
|
||||||
|
//TODO: Or maybe, instead, if I can't be bothered, the points will be connected through shiny lines that light up or flash when power is transmitted
|
||||||
|
//TODO: Save the Connections via an Array of "ConnectionPairs" which stores two connected lasers to make calculating the laser entity easier
|
||||||
|
//TODO: -> To find every laser one is connected to, just go through the array, find the laser itself and get the second part of the pair
|
||||||
|
//TODO: Notify Client of Connections through NBT -> Every laser adds itself to the connection list on the client
|
||||||
|
|
||||||
public static void init(){
|
public static void init(){
|
||||||
ModUtil.LOGGER.info("Initializing Blocks...");
|
ModUtil.LOGGER.info("Initializing Blocks...");
|
||||||
|
|
||||||
|
//blockLaserRelay = new BlockLaserRelay();
|
||||||
|
//BlockUtil.register(blockLaserRelay);
|
||||||
|
|
||||||
blockRangedCollector = new BlockRangedCollector();
|
blockRangedCollector = new BlockRangedCollector();
|
||||||
BlockUtil.register(blockRangedCollector);
|
BlockUtil.register(blockRangedCollector);
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,426 @@
|
||||||
|
/*
|
||||||
|
* This file ("ModelLaserRelay.java") is part of the Actually Additions Mod for Minecraft.
|
||||||
|
* It is created and owned by Ellpeck and distributed
|
||||||
|
* under the Actually Additions License to be found at
|
||||||
|
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
|
||||||
|
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||||
|
*
|
||||||
|
* © 2015 Ellpeck
|
||||||
|
*/
|
||||||
|
|
||||||
|
package ellpeck.actuallyadditions.blocks.render;
|
||||||
|
|
||||||
|
import net.minecraft.client.model.ModelRenderer;
|
||||||
|
|
||||||
|
public class ModelLaserRelay extends ModelBaseAA{
|
||||||
|
|
||||||
|
private ModelRenderer[] shapes = new ModelRenderer[64];
|
||||||
|
|
||||||
|
public ModelLaserRelay(){
|
||||||
|
textureWidth = 128;
|
||||||
|
textureHeight = 128;
|
||||||
|
|
||||||
|
this.shapes[0] = new ModelRenderer(this, 0, 0);
|
||||||
|
this.shapes[0].addBox(0F, 0F, 0F, 10, 1, 10);
|
||||||
|
this.shapes[0].setRotationPoint(-5F, 23F, -5F);
|
||||||
|
this.shapes[0].setTextureSize(128, 128);
|
||||||
|
this.shapes[0].mirror = true;
|
||||||
|
setRotation(this.shapes[0], 0F, 0F, 0F);
|
||||||
|
this.shapes[1] = new ModelRenderer(this, 0, 12);
|
||||||
|
this.shapes[1].addBox(0F, 0F, 0F, 1, 3, 10);
|
||||||
|
this.shapes[1].setRotationPoint(-6F, 20F, -5F);
|
||||||
|
this.shapes[1].setTextureSize(128, 128);
|
||||||
|
this.shapes[1].mirror = true;
|
||||||
|
setRotation(this.shapes[1], 0F, 0F, 0F);
|
||||||
|
this.shapes[2] = new ModelRenderer(this, 0, 12);
|
||||||
|
this.shapes[2].addBox(0F, 0F, 0F, 1, 3, 10);
|
||||||
|
this.shapes[2].setRotationPoint(5F, 20F, -5F);
|
||||||
|
this.shapes[2].setTextureSize(128, 128);
|
||||||
|
this.shapes[2].mirror = true;
|
||||||
|
setRotation(this.shapes[2], 0F, 0F, 0F);
|
||||||
|
this.shapes[3] = new ModelRenderer(this, 0, 12);
|
||||||
|
this.shapes[3].addBox(0F, 0F, 0F, 1, 3, 10);
|
||||||
|
this.shapes[3].setRotationPoint(-5F, 20F, -5F);
|
||||||
|
this.shapes[3].setTextureSize(128, 128);
|
||||||
|
this.shapes[3].mirror = true;
|
||||||
|
setRotation(this.shapes[3], 0F, 1.579523F, 0F);
|
||||||
|
this.shapes[4] = new ModelRenderer(this, 0, 12);
|
||||||
|
this.shapes[4].addBox(0F, 0F, 0F, 1, 3, 10);
|
||||||
|
this.shapes[4].setRotationPoint(-5F, 20F, 6F);
|
||||||
|
this.shapes[4].setTextureSize(128, 128);
|
||||||
|
this.shapes[4].mirror = true;
|
||||||
|
setRotation(this.shapes[4], 0F, 1.579523F, 0F);
|
||||||
|
this.shapes[5] = new ModelRenderer(this, 23, 12);
|
||||||
|
this.shapes[5].addBox(0F, 0F, 0F, 1, 1, 8);
|
||||||
|
this.shapes[5].setRotationPoint(-7F, 14F, -4F);
|
||||||
|
this.shapes[5].setTextureSize(128, 128);
|
||||||
|
this.shapes[5].mirror = true;
|
||||||
|
setRotation(this.shapes[5], 0F, 0F, 0F);
|
||||||
|
this.shapes[6] = new ModelRenderer(this, 23, 12);
|
||||||
|
this.shapes[6].addBox(0F, 0F, 0F, 1, 1, 8);
|
||||||
|
this.shapes[6].setRotationPoint(6F, 14F, -4F);
|
||||||
|
this.shapes[6].setTextureSize(128, 128);
|
||||||
|
this.shapes[6].mirror = true;
|
||||||
|
setRotation(this.shapes[6], 0F, 0F, 0F);
|
||||||
|
this.shapes[7] = new ModelRenderer(this, 23, 12);
|
||||||
|
this.shapes[7].addBox(0F, 0F, 0F, 1, 1, 8);
|
||||||
|
this.shapes[7].setRotationPoint(-4F, 14F, -6F);
|
||||||
|
this.shapes[7].setTextureSize(128, 128);
|
||||||
|
this.shapes[7].mirror = true;
|
||||||
|
setRotation(this.shapes[7], 0F, 1.579523F, 0F);
|
||||||
|
this.shapes[8] = new ModelRenderer(this, 23, 12);
|
||||||
|
this.shapes[8].addBox(0F, 0F, 0F, 1, 1, 8);
|
||||||
|
this.shapes[8].setRotationPoint(-4F, 14F, 7F);
|
||||||
|
this.shapes[8].setTextureSize(128, 128);
|
||||||
|
this.shapes[8].mirror = true;
|
||||||
|
setRotation(this.shapes[8], 0F, 1.579523F, 0F);
|
||||||
|
this.shapes[9] = new ModelRenderer(this, 0, 26);
|
||||||
|
this.shapes[9].addBox(0F, 0F, 0F, 12, 1, 2);
|
||||||
|
this.shapes[9].setRotationPoint(-6F, 18F, -1F);
|
||||||
|
this.shapes[9].setTextureSize(128, 128);
|
||||||
|
this.shapes[9].mirror = true;
|
||||||
|
setRotation(this.shapes[9], 0F, 0F, 0F);
|
||||||
|
this.shapes[10] = new ModelRenderer(this, 41, 0);
|
||||||
|
this.shapes[10].addBox(0F, 0F, 0F, 2, 1, 5);
|
||||||
|
this.shapes[10].setRotationPoint(-1F, 18F, 1F);
|
||||||
|
this.shapes[10].setTextureSize(128, 128);
|
||||||
|
this.shapes[10].mirror = true;
|
||||||
|
setRotation(this.shapes[10], 0F, 0F, 0F);
|
||||||
|
this.shapes[11] = new ModelRenderer(this, 41, 0);
|
||||||
|
this.shapes[11].addBox(0F, 0F, 0F, 2, 1, 5);
|
||||||
|
this.shapes[11].setRotationPoint(-1F, 18F, -6F);
|
||||||
|
this.shapes[11].setTextureSize(128, 128);
|
||||||
|
this.shapes[11].mirror = true;
|
||||||
|
setRotation(this.shapes[11], 0F, 0F, 0F);
|
||||||
|
this.shapes[12] = new ModelRenderer(this, 41, 7);
|
||||||
|
this.shapes[12].addBox(0F, 0F, 0F, 1, 2, 4);
|
||||||
|
this.shapes[12].setRotationPoint(-2F, 16F, 2F);
|
||||||
|
this.shapes[12].setTextureSize(128, 128);
|
||||||
|
this.shapes[12].mirror = true;
|
||||||
|
setRotation(this.shapes[12], 0F, 0F, 0F);
|
||||||
|
this.shapes[13] = new ModelRenderer(this, 41, 7);
|
||||||
|
this.shapes[13].addBox(0F, 0F, 0F, 1, 2, 4);
|
||||||
|
this.shapes[13].setRotationPoint(1F, 16F, 2F);
|
||||||
|
this.shapes[13].setTextureSize(128, 128);
|
||||||
|
this.shapes[13].mirror = true;
|
||||||
|
setRotation(this.shapes[13], 0F, 0F, 0F);
|
||||||
|
this.shapes[14] = new ModelRenderer(this, 41, 7);
|
||||||
|
this.shapes[14].addBox(0F, 0F, 0F, 1, 2, 4);
|
||||||
|
this.shapes[14].setRotationPoint(-2F, 16F, -6F);
|
||||||
|
this.shapes[14].setTextureSize(128, 128);
|
||||||
|
this.shapes[14].mirror = true;
|
||||||
|
setRotation(this.shapes[14], 0F, 0F, 0F);
|
||||||
|
this.shapes[15] = new ModelRenderer(this, 41, 7);
|
||||||
|
this.shapes[15].addBox(0F, 0F, 0F, 1, 2, 4);
|
||||||
|
this.shapes[15].setRotationPoint(1F, 16F, -6F);
|
||||||
|
this.shapes[15].setTextureSize(128, 128);
|
||||||
|
this.shapes[15].mirror = true;
|
||||||
|
setRotation(this.shapes[15], 0F, 0F, 0F);
|
||||||
|
this.shapes[16] = new ModelRenderer(this, 41, 7);
|
||||||
|
this.shapes[16].addBox(0F, 0F, 0F, 1, 2, 4);
|
||||||
|
this.shapes[16].setRotationPoint(-6F, 16F, 2F);
|
||||||
|
this.shapes[16].setTextureSize(128, 128);
|
||||||
|
this.shapes[16].mirror = true;
|
||||||
|
setRotation(this.shapes[16], 0F, 1.579523F, 0F);
|
||||||
|
this.shapes[17] = new ModelRenderer(this, 41, 7);
|
||||||
|
this.shapes[17].addBox(0F, 0F, 0F, 1, 2, 4);
|
||||||
|
this.shapes[17].setRotationPoint(-6F, 16F, -1F);
|
||||||
|
this.shapes[17].setTextureSize(128, 128);
|
||||||
|
this.shapes[17].mirror = true;
|
||||||
|
setRotation(this.shapes[17], 0F, 1.579523F, 0F);
|
||||||
|
this.shapes[18] = new ModelRenderer(this, 41, 7);
|
||||||
|
this.shapes[18].addBox(0F, 0F, 0F, 1, 2, 4);
|
||||||
|
this.shapes[18].setRotationPoint(2F, 16F, 2F);
|
||||||
|
this.shapes[18].setTextureSize(128, 128);
|
||||||
|
this.shapes[18].mirror = true;
|
||||||
|
setRotation(this.shapes[18], 0F, 1.579523F, 0F);
|
||||||
|
this.shapes[19] = new ModelRenderer(this, 41, 7);
|
||||||
|
this.shapes[19].addBox(0F, 0F, 0F, 1, 2, 4);
|
||||||
|
this.shapes[19].setRotationPoint(2F, 16F, -1F);
|
||||||
|
this.shapes[19].setTextureSize(128, 128);
|
||||||
|
this.shapes[19].mirror = true;
|
||||||
|
setRotation(this.shapes[19], 0F, 1.579523F, 0F);
|
||||||
|
this.shapes[20] = new ModelRenderer(this, 0, 26);
|
||||||
|
this.shapes[20].addBox(0F, 0F, 0F, 12, 1, 2);
|
||||||
|
this.shapes[20].setRotationPoint(-6F, 15F, -1F);
|
||||||
|
this.shapes[20].setTextureSize(128, 128);
|
||||||
|
this.shapes[20].mirror = true;
|
||||||
|
setRotation(this.shapes[20], 0F, 0F, 0F);
|
||||||
|
this.shapes[21] = new ModelRenderer(this, 41, 0);
|
||||||
|
this.shapes[21].addBox(0F, 0F, 0F, 2, 1, 5);
|
||||||
|
this.shapes[21].setRotationPoint(-1F, 15F, 1F);
|
||||||
|
this.shapes[21].setTextureSize(128, 128);
|
||||||
|
this.shapes[21].mirror = true;
|
||||||
|
setRotation(this.shapes[21], 0F, 0F, 0F);
|
||||||
|
this.shapes[22] = new ModelRenderer(this, 41, 0);
|
||||||
|
this.shapes[22].addBox(0F, 0F, 0F, 2, 1, 5);
|
||||||
|
this.shapes[22].setRotationPoint(-1F, 15F, -6F);
|
||||||
|
this.shapes[22].setTextureSize(128, 128);
|
||||||
|
this.shapes[22].mirror = true;
|
||||||
|
setRotation(this.shapes[22], 0F, 0F, 0F);
|
||||||
|
this.shapes[23] = new ModelRenderer(this, 23, 23);
|
||||||
|
this.shapes[23].addBox(0F, 0F, 0F, 3, 1, 1);
|
||||||
|
this.shapes[23].setRotationPoint(-4F, 18F, -7F);
|
||||||
|
this.shapes[23].setTextureSize(128, 128);
|
||||||
|
this.shapes[23].mirror = true;
|
||||||
|
setRotation(this.shapes[23], 0F, 0F, 0F);
|
||||||
|
this.shapes[24] = new ModelRenderer(this, 23, 23);
|
||||||
|
this.shapes[24].addBox(0F, 0F, 0F, 3, 1, 1);
|
||||||
|
this.shapes[24].setRotationPoint(1F, 18F, -7F);
|
||||||
|
this.shapes[24].setTextureSize(128, 128);
|
||||||
|
this.shapes[24].mirror = true;
|
||||||
|
setRotation(this.shapes[24], 0F, 0F, 0F);
|
||||||
|
this.shapes[25] = new ModelRenderer(this, 23, 23);
|
||||||
|
this.shapes[25].addBox(0F, 0F, 0F, 3, 1, 1);
|
||||||
|
this.shapes[25].setRotationPoint(-4F, 18F, 6F);
|
||||||
|
this.shapes[25].setTextureSize(128, 128);
|
||||||
|
this.shapes[25].mirror = true;
|
||||||
|
setRotation(this.shapes[25], 0F, 0F, 0F);
|
||||||
|
this.shapes[26] = new ModelRenderer(this, 23, 23);
|
||||||
|
this.shapes[26].addBox(0F, 0F, 0F, 3, 1, 1);
|
||||||
|
this.shapes[26].setRotationPoint(1F, 18F, 6F);
|
||||||
|
this.shapes[26].setTextureSize(128, 128);
|
||||||
|
this.shapes[26].mirror = true;
|
||||||
|
setRotation(this.shapes[26], 0F, 0F, 0F);
|
||||||
|
this.shapes[27] = new ModelRenderer(this, 23, 23);
|
||||||
|
this.shapes[27].addBox(0F, 0F, 0F, 3, 1, 1);
|
||||||
|
this.shapes[27].setRotationPoint(-7F, 18F, 4F);
|
||||||
|
this.shapes[27].setTextureSize(128, 128);
|
||||||
|
this.shapes[27].mirror = true;
|
||||||
|
setRotation(this.shapes[27], 0F, 1.579523F, 0F);
|
||||||
|
this.shapes[28] = new ModelRenderer(this, 23, 23);
|
||||||
|
this.shapes[28].addBox(0F, 0F, 0F, 3, 1, 1);
|
||||||
|
this.shapes[28].setRotationPoint(-7F, 18F, -1F);
|
||||||
|
this.shapes[28].setTextureSize(128, 128);
|
||||||
|
this.shapes[28].mirror = true;
|
||||||
|
setRotation(this.shapes[28], 0F, 1.579523F, 0F);
|
||||||
|
this.shapes[29] = new ModelRenderer(this, 23, 23);
|
||||||
|
this.shapes[29].addBox(0F, 0F, 0F, 3, 1, 1);
|
||||||
|
this.shapes[29].setRotationPoint(6F, 18F, 4F);
|
||||||
|
this.shapes[29].setTextureSize(128, 128);
|
||||||
|
this.shapes[29].mirror = true;
|
||||||
|
setRotation(this.shapes[29], 0F, 1.579523F, 0F);
|
||||||
|
this.shapes[30] = new ModelRenderer(this, 23, 23);
|
||||||
|
this.shapes[30].addBox(0F, 0F, 0F, 3, 1, 1);
|
||||||
|
this.shapes[30].setRotationPoint(6F, 18F, -1F);
|
||||||
|
this.shapes[30].setTextureSize(128, 128);
|
||||||
|
this.shapes[30].mirror = true;
|
||||||
|
setRotation(this.shapes[30], 0F, 1.579523F, 0F);
|
||||||
|
this.shapes[31] = new ModelRenderer(this, 42, 14);
|
||||||
|
this.shapes[31].addBox(0F, 0F, 0F, 1, 2, 2);
|
||||||
|
this.shapes[31].setRotationPoint(-7F, 16F, -4F);
|
||||||
|
this.shapes[31].setTextureSize(128, 128);
|
||||||
|
this.shapes[31].mirror = true;
|
||||||
|
setRotation(this.shapes[31], 0F, 0F, 0F);
|
||||||
|
this.shapes[32] = new ModelRenderer(this, 42, 14);
|
||||||
|
this.shapes[32].addBox(0F, 0F, 0F, 1, 2, 2);
|
||||||
|
this.shapes[32].setRotationPoint(-7F, 16F, 2F);
|
||||||
|
this.shapes[32].setTextureSize(128, 128);
|
||||||
|
this.shapes[32].mirror = true;
|
||||||
|
setRotation(this.shapes[32], 0F, 0F, 0F);
|
||||||
|
this.shapes[33] = new ModelRenderer(this, 42, 14);
|
||||||
|
this.shapes[33].addBox(0F, 0F, 0F, 1, 2, 2);
|
||||||
|
this.shapes[33].setRotationPoint(6F, 16F, 2F);
|
||||||
|
this.shapes[33].setTextureSize(128, 128);
|
||||||
|
this.shapes[33].mirror = true;
|
||||||
|
setRotation(this.shapes[33], 0F, 0F, 0F);
|
||||||
|
this.shapes[34] = new ModelRenderer(this, 42, 14);
|
||||||
|
this.shapes[34].addBox(0F, 0F, 0F, 1, 2, 2);
|
||||||
|
this.shapes[34].setRotationPoint(6F, 16F, -4F);
|
||||||
|
this.shapes[34].setTextureSize(128, 128);
|
||||||
|
this.shapes[34].mirror = true;
|
||||||
|
setRotation(this.shapes[34], 0F, 0F, 0F);
|
||||||
|
this.shapes[35] = new ModelRenderer(this, 42, 14);
|
||||||
|
this.shapes[35].addBox(0F, 0F, 0F, 1, 2, 2);
|
||||||
|
this.shapes[35].setRotationPoint(2F, 16F, -6F);
|
||||||
|
this.shapes[35].setTextureSize(128, 128);
|
||||||
|
this.shapes[35].mirror = true;
|
||||||
|
setRotation(this.shapes[35], 0F, 1.579523F, 0F);
|
||||||
|
this.shapes[36] = new ModelRenderer(this, 42, 14);
|
||||||
|
this.shapes[36].addBox(0F, 0F, 0F, 1, 2, 2);
|
||||||
|
this.shapes[36].setRotationPoint(-4F, 16F, -6F);
|
||||||
|
this.shapes[36].setTextureSize(128, 128);
|
||||||
|
this.shapes[36].mirror = true;
|
||||||
|
setRotation(this.shapes[36], 0F, 1.579523F, 0F);
|
||||||
|
this.shapes[37] = new ModelRenderer(this, 42, 14);
|
||||||
|
this.shapes[37].addBox(0F, 0F, 0F, 1, 2, 2);
|
||||||
|
this.shapes[37].setRotationPoint(2F, 16F, 7F);
|
||||||
|
this.shapes[37].setTextureSize(128, 128);
|
||||||
|
this.shapes[37].mirror = true;
|
||||||
|
setRotation(this.shapes[37], 0F, 1.579523F, 0F);
|
||||||
|
this.shapes[38] = new ModelRenderer(this, 42, 14);
|
||||||
|
this.shapes[38].addBox(0F, 0F, 0F, 1, 2, 2);
|
||||||
|
this.shapes[38].setRotationPoint(-4F, 16F, 7F);
|
||||||
|
this.shapes[38].setTextureSize(128, 128);
|
||||||
|
this.shapes[38].mirror = true;
|
||||||
|
setRotation(this.shapes[38], 0F, 1.579523F, 0F);
|
||||||
|
this.shapes[39] = new ModelRenderer(this, 23, 23);
|
||||||
|
this.shapes[39].addBox(0F, 0F, 0F, 3, 1, 1);
|
||||||
|
this.shapes[39].setRotationPoint(6F, 15F, 4F);
|
||||||
|
this.shapes[39].setTextureSize(128, 128);
|
||||||
|
this.shapes[39].mirror = true;
|
||||||
|
setRotation(this.shapes[39], 0F, 1.579523F, 0F);
|
||||||
|
this.shapes[40] = new ModelRenderer(this, 23, 23);
|
||||||
|
this.shapes[40].addBox(0F, 0F, 0F, 3, 1, 1);
|
||||||
|
this.shapes[40].setRotationPoint(6F, 15F, -1F);
|
||||||
|
this.shapes[40].setTextureSize(128, 128);
|
||||||
|
this.shapes[40].mirror = true;
|
||||||
|
setRotation(this.shapes[40], 0F, 1.579523F, 0F);
|
||||||
|
this.shapes[41] = new ModelRenderer(this, 23, 23);
|
||||||
|
this.shapes[41].addBox(0F, 0F, 0F, 3, 1, 1);
|
||||||
|
this.shapes[41].setRotationPoint(1F, 15F, -7F);
|
||||||
|
this.shapes[41].setTextureSize(128, 128);
|
||||||
|
this.shapes[41].mirror = true;
|
||||||
|
setRotation(this.shapes[41], 0F, 0F, 0F);
|
||||||
|
this.shapes[42] = new ModelRenderer(this, 23, 23);
|
||||||
|
this.shapes[42].addBox(0F, 0F, 0F, 3, 1, 1);
|
||||||
|
this.shapes[42].setRotationPoint(-4F, 15F, -7F);
|
||||||
|
this.shapes[42].setTextureSize(128, 128);
|
||||||
|
this.shapes[42].mirror = true;
|
||||||
|
setRotation(this.shapes[42], 0F, 0F, 0F);
|
||||||
|
this.shapes[43] = new ModelRenderer(this, 23, 23);
|
||||||
|
this.shapes[43].addBox(0F, 0F, 0F, 3, 1, 1);
|
||||||
|
this.shapes[43].setRotationPoint(-7F, 15F, -1F);
|
||||||
|
this.shapes[43].setTextureSize(128, 128);
|
||||||
|
this.shapes[43].mirror = true;
|
||||||
|
setRotation(this.shapes[43], 0F, 1.579523F, 0F);
|
||||||
|
this.shapes[44] = new ModelRenderer(this, 23, 23);
|
||||||
|
this.shapes[44].addBox(0F, 0F, 0F, 3, 1, 1);
|
||||||
|
this.shapes[44].setRotationPoint(-7F, 15F, 4F);
|
||||||
|
this.shapes[44].setTextureSize(128, 128);
|
||||||
|
this.shapes[44].mirror = true;
|
||||||
|
setRotation(this.shapes[44], 0F, 1.579523F, 0F);
|
||||||
|
this.shapes[45] = new ModelRenderer(this, 23, 23);
|
||||||
|
this.shapes[45].addBox(0F, 0F, 0F, 3, 1, 1);
|
||||||
|
this.shapes[45].setRotationPoint(-4F, 15F, 6F);
|
||||||
|
this.shapes[45].setTextureSize(128, 128);
|
||||||
|
this.shapes[45].mirror = true;
|
||||||
|
setRotation(this.shapes[45], 0F, 0F, 0F);
|
||||||
|
this.shapes[46] = new ModelRenderer(this, 23, 23);
|
||||||
|
this.shapes[46].addBox(0F, 0F, 0F, 3, 1, 1);
|
||||||
|
this.shapes[46].setRotationPoint(1F, 15F, 6F);
|
||||||
|
this.shapes[46].setTextureSize(128, 128);
|
||||||
|
this.shapes[46].mirror = true;
|
||||||
|
setRotation(this.shapes[46], 0F, 0F, 0F);
|
||||||
|
this.shapes[47] = new ModelRenderer(this, 0, 12);
|
||||||
|
this.shapes[47].addBox(0F, 0F, 0F, 1, 3, 10);
|
||||||
|
this.shapes[47].setRotationPoint(-5F, 11F, -5F);
|
||||||
|
this.shapes[47].setTextureSize(128, 128);
|
||||||
|
this.shapes[47].mirror = true;
|
||||||
|
setRotation(this.shapes[47], 0F, 1.579523F, 0F);
|
||||||
|
this.shapes[48] = new ModelRenderer(this, 0, 12);
|
||||||
|
this.shapes[48].addBox(0F, 0F, 0F, 1, 3, 10);
|
||||||
|
this.shapes[48].setRotationPoint(-6F, 11F, -5F);
|
||||||
|
this.shapes[48].setTextureSize(128, 128);
|
||||||
|
this.shapes[48].mirror = true;
|
||||||
|
setRotation(this.shapes[48], 0F, 0F, 0F);
|
||||||
|
this.shapes[49] = new ModelRenderer(this, 0, 12);
|
||||||
|
this.shapes[49].addBox(0F, 0F, 0F, 1, 3, 10);
|
||||||
|
this.shapes[49].setRotationPoint(-5F, 11F, 6F);
|
||||||
|
this.shapes[49].setTextureSize(128, 128);
|
||||||
|
this.shapes[49].mirror = true;
|
||||||
|
setRotation(this.shapes[49], 0F, 1.579523F, 0F);
|
||||||
|
this.shapes[50] = new ModelRenderer(this, 0, 12);
|
||||||
|
this.shapes[50].addBox(0F, 0F, 0F, 1, 3, 10);
|
||||||
|
this.shapes[50].setRotationPoint(5F, 11F, -5F);
|
||||||
|
this.shapes[50].setTextureSize(128, 128);
|
||||||
|
this.shapes[50].mirror = true;
|
||||||
|
setRotation(this.shapes[50], 0F, 0F, 0F);
|
||||||
|
this.shapes[51] = new ModelRenderer(this, 56, 0);
|
||||||
|
this.shapes[51].addBox(0F, 0F, 0F, 1, 14, 1);
|
||||||
|
this.shapes[51].setRotationPoint(-2F, 9F, -2F);
|
||||||
|
this.shapes[51].setTextureSize(128, 128);
|
||||||
|
this.shapes[51].mirror = true;
|
||||||
|
setRotation(this.shapes[51], 0F, 0F, 0F);
|
||||||
|
this.shapes[52] = new ModelRenderer(this, 23, 12);
|
||||||
|
this.shapes[52].addBox(0F, 0F, 0F, 1, 1, 8);
|
||||||
|
this.shapes[52].setRotationPoint(6F, 19F, -4F);
|
||||||
|
this.shapes[52].setTextureSize(128, 128);
|
||||||
|
this.shapes[52].mirror = true;
|
||||||
|
setRotation(this.shapes[52], 0F, 0F, 0F);
|
||||||
|
this.shapes[53] = new ModelRenderer(this, 23, 12);
|
||||||
|
this.shapes[53].addBox(0F, 0F, 0F, 1, 1, 8);
|
||||||
|
this.shapes[53].setRotationPoint(-4F, 19F, 7F);
|
||||||
|
this.shapes[53].setTextureSize(128, 128);
|
||||||
|
this.shapes[53].mirror = true;
|
||||||
|
setRotation(this.shapes[53], 0F, 1.579523F, 0F);
|
||||||
|
this.shapes[54] = new ModelRenderer(this, 23, 12);
|
||||||
|
this.shapes[54].addBox(0F, 0F, 0F, 1, 1, 8);
|
||||||
|
this.shapes[54].setRotationPoint(-7F, 19F, -4F);
|
||||||
|
this.shapes[54].setTextureSize(128, 128);
|
||||||
|
this.shapes[54].mirror = true;
|
||||||
|
setRotation(this.shapes[54], 0F, 0F, 0F);
|
||||||
|
this.shapes[55] = new ModelRenderer(this, 23, 12);
|
||||||
|
this.shapes[55].addBox(0F, 0F, 0F, 1, 1, 8);
|
||||||
|
this.shapes[55].setRotationPoint(-4F, 19F, -6F);
|
||||||
|
this.shapes[55].setTextureSize(128, 128);
|
||||||
|
this.shapes[55].mirror = true;
|
||||||
|
setRotation(this.shapes[55], 0F, 1.579523F, 0F);
|
||||||
|
this.shapes[56] = new ModelRenderer(this, 56, 0);
|
||||||
|
this.shapes[56].addBox(0F, 0F, 0F, 1, 14, 1);
|
||||||
|
this.shapes[56].setRotationPoint(1F, 9F, -2F);
|
||||||
|
this.shapes[56].setTextureSize(128, 128);
|
||||||
|
this.shapes[56].mirror = true;
|
||||||
|
setRotation(this.shapes[56], 0F, 0F, 0F);
|
||||||
|
this.shapes[57] = new ModelRenderer(this, 56, 0);
|
||||||
|
this.shapes[57].addBox(0F, 0F, 0F, 1, 14, 1);
|
||||||
|
this.shapes[57].setRotationPoint(-2F, 9F, 1F);
|
||||||
|
this.shapes[57].setTextureSize(128, 128);
|
||||||
|
this.shapes[57].mirror = true;
|
||||||
|
setRotation(this.shapes[57], 0F, 0F, 0F);
|
||||||
|
this.shapes[58] = new ModelRenderer(this, 56, 0);
|
||||||
|
this.shapes[58].addBox(0F, 0F, 0F, 1, 14, 1);
|
||||||
|
this.shapes[58].setRotationPoint(1F, 9F, 1F);
|
||||||
|
this.shapes[58].setTextureSize(128, 128);
|
||||||
|
this.shapes[58].mirror = true;
|
||||||
|
setRotation(this.shapes[58], 0F, 0F, 0F);
|
||||||
|
this.shapes[59] = new ModelRenderer(this, 29, 26);
|
||||||
|
this.shapes[59].addBox(0F, 0F, 0F, 8, 2, 1);
|
||||||
|
this.shapes[59].setRotationPoint(-4F, 9F, -5F);
|
||||||
|
this.shapes[59].setTextureSize(128, 128);
|
||||||
|
this.shapes[59].mirror = true;
|
||||||
|
setRotation(this.shapes[59], 0F, 0F, 0F);
|
||||||
|
this.shapes[60] = new ModelRenderer(this, 29, 26);
|
||||||
|
this.shapes[60].addBox(0F, 0F, 0F, 8, 2, 1);
|
||||||
|
this.shapes[60].setRotationPoint(-4F, 9F, 4F);
|
||||||
|
this.shapes[60].setTextureSize(128, 128);
|
||||||
|
this.shapes[60].mirror = true;
|
||||||
|
setRotation(this.shapes[60], 0F, 0F, 0F);
|
||||||
|
this.shapes[61] = new ModelRenderer(this, 29, 26);
|
||||||
|
this.shapes[61].addBox(0F, 0F, 0F, 8, 2, 1);
|
||||||
|
this.shapes[61].setRotationPoint(-5F, 9F, 4F);
|
||||||
|
this.shapes[61].setTextureSize(128, 128);
|
||||||
|
this.shapes[61].mirror = true;
|
||||||
|
setRotation(this.shapes[61], 0F, 1.579523F, 0F);
|
||||||
|
this.shapes[62] = new ModelRenderer(this, 29, 26);
|
||||||
|
this.shapes[62].addBox(0F, 0F, 0F, 8, 2, 1);
|
||||||
|
this.shapes[62].setRotationPoint(4F, 9F, 4F);
|
||||||
|
this.shapes[62].setTextureSize(128, 128);
|
||||||
|
this.shapes[62].mirror = true;
|
||||||
|
setRotation(this.shapes[62], 0F, 1.579523F, 0F);
|
||||||
|
this.shapes[63] = new ModelRenderer(this, 0, 31);
|
||||||
|
this.shapes[63].addBox(0F, 0F, 0F, 8, 1, 8);
|
||||||
|
this.shapes[63].setRotationPoint(-4F, 8F, -4F);
|
||||||
|
this.shapes[63].setTextureSize(128, 128);
|
||||||
|
this.shapes[63].mirror = true;
|
||||||
|
setRotation(this.shapes[63], 0F, 0F, 0F);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void render(float f){
|
||||||
|
for(ModelRenderer renderer : this.shapes){
|
||||||
|
renderer.render(f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName(){
|
||||||
|
return "modelLaserRelay";
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setRotation(ModelRenderer model, float x, float y, float z){
|
||||||
|
model.rotateAngleX = x;
|
||||||
|
model.rotateAngleY = y;
|
||||||
|
model.rotateAngleZ = z;
|
||||||
|
}
|
||||||
|
}
|
|
@ -55,6 +55,7 @@ public class ClientProxy implements IProxy{
|
||||||
AssetUtil.PHANTOM_BOOSTER_RENDER_ID = RenderingRegistry.getNextAvailableRenderId();
|
AssetUtil.PHANTOM_BOOSTER_RENDER_ID = RenderingRegistry.getNextAvailableRenderId();
|
||||||
AssetUtil.SMILEY_CLOUD_RENDER_ID = RenderingRegistry.getNextAvailableRenderId();
|
AssetUtil.SMILEY_CLOUD_RENDER_ID = RenderingRegistry.getNextAvailableRenderId();
|
||||||
AssetUtil.TOOL_TABLE_RENDER_ID = RenderingRegistry.getNextAvailableRenderId();
|
AssetUtil.TOOL_TABLE_RENDER_ID = RenderingRegistry.getNextAvailableRenderId();
|
||||||
|
AssetUtil.LASER_RELAY_RENDER_ID = RenderingRegistry.getNextAvailableRenderId();
|
||||||
|
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCompost.class, new RenderTileEntity(new ModelCompost()));
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCompost.class, new RenderTileEntity(new ModelCompost()));
|
||||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(InitBlocks.blockCompost), new RenderItems(new ModelCompost()));
|
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(InitBlocks.blockCompost), new RenderItems(new ModelCompost()));
|
||||||
|
@ -74,6 +75,9 @@ public class ClientProxy implements IProxy{
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySmileyCloud.class, new RenderSmileyCloud(new ModelSmileyCloud()));
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySmileyCloud.class, new RenderSmileyCloud(new ModelSmileyCloud()));
|
||||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(InitBlocks.blockSmileyCloud), new RenderItems(new ModelSmileyCloud()));
|
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(InitBlocks.blockSmileyCloud), new RenderItems(new ModelSmileyCloud()));
|
||||||
|
|
||||||
|
//ClientRegistry.bindTileEntitySpecialRenderer(TileEntityLaserRelay.class, new RenderTileEntity(new ModelLaserRelay()));
|
||||||
|
//MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(InitBlocks.blockLaserRelay), new RenderItems(new ModelLaserRelay()));
|
||||||
|
|
||||||
VillagerRegistry.instance().registerVillagerSkin(ConfigIntValues.JAM_VILLAGER_ID.getValue(), new ResourceLocation(ModUtil.MOD_ID_LOWER, "textures/entity/villager/jamVillager.png"));
|
VillagerRegistry.instance().registerVillagerSkin(ConfigIntValues.JAM_VILLAGER_ID.getValue(), new ResourceLocation(ModUtil.MOD_ID_LOWER, "textures/entity/villager/jamVillager.png"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,6 +62,7 @@ public abstract class TileEntityBase extends TileEntity{
|
||||||
GameRegistry.registerTileEntity(TileEntityLeafGenerator.class, ModUtil.MOD_ID_LOWER+":tileEntityLeafGenerator");
|
GameRegistry.registerTileEntity(TileEntityLeafGenerator.class, ModUtil.MOD_ID_LOWER+":tileEntityLeafGenerator");
|
||||||
GameRegistry.registerTileEntity(TileEntityDirectionalBreaker.class, ModUtil.MOD_ID_LOWER+":tileEntityDirectionalBreaker");
|
GameRegistry.registerTileEntity(TileEntityDirectionalBreaker.class, ModUtil.MOD_ID_LOWER+":tileEntityDirectionalBreaker");
|
||||||
GameRegistry.registerTileEntity(TileEntityRangedCollector.class, ModUtil.MOD_ID_LOWER+":tileEntityRangedCollector");
|
GameRegistry.registerTileEntity(TileEntityRangedCollector.class, ModUtil.MOD_ID_LOWER+":tileEntityRangedCollector");
|
||||||
|
//GameRegistry.registerTileEntity(TileEntityLaserRelay.class, ModUtil.MOD_ID_LOWER+":tileEntityLaserRelay");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -0,0 +1,57 @@
|
||||||
|
/*
|
||||||
|
* This file ("TileEntityLaserRelay.java") is part of the Actually Additions Mod for Minecraft.
|
||||||
|
* It is created and owned by Ellpeck and distributed
|
||||||
|
* under the Actually Additions License to be found at
|
||||||
|
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
|
||||||
|
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||||
|
*
|
||||||
|
* © 2015 Ellpeck
|
||||||
|
*/
|
||||||
|
|
||||||
|
package ellpeck.actuallyadditions.tile;
|
||||||
|
|
||||||
|
import cofh.api.energy.IEnergyReceiver;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
|
public class TileEntityLaserRelay extends TileEntityBase implements IEnergyReceiver{
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canUpdate(){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeSyncableNBT(NBTTagCompound compound, boolean isForSync){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void readSyncableNBT(NBTTagCompound compound, boolean isForSync){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate){
|
||||||
|
return this.transmitEnergy(maxReceive, simulate);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getEnergyStored(ForgeDirection from){
|
||||||
|
return 0; //TODO Get Energy in Network
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getMaxEnergyStored(ForgeDirection from){
|
||||||
|
return 0; //TODO Get Max Energy in Network
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canConnectEnergy(ForgeDirection from){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int transmitEnergy(int maxTransmit, boolean simulate){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
|
@ -33,6 +33,7 @@ public class AssetUtil{
|
||||||
public static int PHANTOM_BOOSTER_RENDER_ID;
|
public static int PHANTOM_BOOSTER_RENDER_ID;
|
||||||
public static int SMILEY_CLOUD_RENDER_ID;
|
public static int SMILEY_CLOUD_RENDER_ID;
|
||||||
public static int TOOL_TABLE_RENDER_ID;
|
public static int TOOL_TABLE_RENDER_ID;
|
||||||
|
public static int LASER_RELAY_RENDER_ID;
|
||||||
|
|
||||||
public static ResourceLocation getGuiLocation(String file){
|
public static ResourceLocation getGuiLocation(String file){
|
||||||
return new ResourceLocation(ModUtil.MOD_ID_LOWER, "textures/gui/"+file+".png");
|
return new ResourceLocation(ModUtil.MOD_ID_LOWER, "textures/gui/"+file+".png");
|
||||||
|
|
Loading…
Reference in a new issue