Skip to content

Commit 8732b99

Browse files
committedDec 29, 2014
Added Transport Beacon Consoles and Matter Grids :3
1 parent e518bb9 commit 8732b99

18 files changed

+319
-35
lines changed
 

‎src/main/java/lordfokas/stargatetech2/IContentModule.java

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ public enum Module{
66
CORE,
77
ENEMY,
88
ENERGY,
9-
FACTORY,
109
INTEGRATION,
1110
TRANSPORT,
1211
WORLD

‎src/main/java/lordfokas/stargatetech2/ModuleTransport.java

+6
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
import lordfokas.stargatetech2.transport.BlockNaquadahRail;
88
import lordfokas.stargatetech2.transport.BlockStargate;
99
import lordfokas.stargatetech2.transport.BlockTransportRing;
10+
import lordfokas.stargatetech2.transport.TileBeaconConsole;
11+
import lordfokas.stargatetech2.transport.TileBeaconMatterGrid;
12+
import lordfokas.stargatetech2.transport.TileBeaconTransceiver;
1013
import lordfokas.stargatetech2.transport.TileStargate;
1114
import lordfokas.stargatetech2.transport.TileStargateBase;
1215
import lordfokas.stargatetech2.transport.TileStargateRing;
@@ -35,6 +38,9 @@ public void preInit(){
3538

3639
@Override
3740
public void init(){
41+
GameRegistry.registerTileEntity(TileBeaconConsole.class, TileEntityReference.TILE_BEACON_CONSOLE);
42+
GameRegistry.registerTileEntity(TileBeaconMatterGrid.class, TileEntityReference.TILE_BEACON_MATTERGRID);
43+
GameRegistry.registerTileEntity(TileBeaconTransceiver.class, TileEntityReference.TILE_BEACON_TRANSCEIVER);
3844
GameRegistry.registerTileEntity(TileTransportRing.class, TileEntityReference.TILE_TRANSPORT_RING);
3945
GameRegistry.registerTileEntity(TileStargate.class, TileEntityReference.TILE_STARGATE);
4046
GameRegistry.registerTileEntity(TileStargateRing.class, TileEntityReference.TILE_STARGATE_RING);

‎src/main/java/lordfokas/stargatetech2/ProxyClient.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@
99
import lordfokas.stargatetech2.core.base.BaseISBRH;
1010
import lordfokas.stargatetech2.core.machine.RenderBlockMachine;
1111
import lordfokas.stargatetech2.transport.RenderBeacon;
12+
import lordfokas.stargatetech2.transport.RenderBeaconMatterGrid;
1213
import lordfokas.stargatetech2.transport.RenderNaquadahRail;
1314
import lordfokas.stargatetech2.transport.RenderStargateBlock;
1415
import lordfokas.stargatetech2.transport.RenderStargateTile;
1516
import lordfokas.stargatetech2.transport.RenderTransportRing;
1617
import lordfokas.stargatetech2.transport.RingKeyHandler;
1718
import lordfokas.stargatetech2.transport.RingOverlay;
19+
import lordfokas.stargatetech2.transport.TileBeaconMatterGrid;
1820
import lordfokas.stargatetech2.transport.TileStargate;
1921
import lordfokas.stargatetech2.transport.TileTransportRing;
2022
import lordfokas.stargatetech2.world.RenderLanteanWall;
@@ -45,14 +47,13 @@ public void registerRenderers(Module module){
4547
break;
4648
case ENERGY:
4749
break;
48-
case FACTORY:
49-
break;
5050
case INTEGRATION:
5151
break;
5252
case TRANSPORT:
5353
registerRenderer(RenderBeacon.instance());
5454
registerRenderer(RenderNaquadahRail.instance());
5555
registerRenderer(RenderStargateBlock.instance());
56+
ClientRegistry.bindTileEntitySpecialRenderer(TileBeaconMatterGrid.class, new RenderBeaconMatterGrid());
5657
ClientRegistry.bindTileEntitySpecialRenderer(TileTransportRing.class, new RenderTransportRing());
5758
ClientRegistry.bindTileEntitySpecialRenderer(TileStargate.class, new RenderStargateTile());
5859
break;

‎src/main/java/lordfokas/stargatetech2/core/reference/BlockReference.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class BlockReference {
2121

2222

2323
// TRANSPORT
24-
public static final String BEACON_ANTENNA = "beaconAntenna";
24+
public static final String BEACON = "beacon";
2525
public static final String STARGATE = "stargate";
2626
public static final String NAQUADAH_RAIL = "naquadahRail";
2727
public static final String TRANSPORT_RING = "transportRing";

‎src/main/java/lordfokas/stargatetech2/core/reference/ModReference.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
public class ModReference {
44
public static final String MOD_ID = "StargateTech2";
55
public static final String MOD_NAME = "StargateTech 2";
6-
public static final String MOD_VERSION = "0.7.7-Alpha";
6+
public static final String MOD_VERSION = "0.8.0-Alpha";
77
public static final String DEPENDENCIES = "required-after: ThermalExpansion";
88
}

‎src/main/java/lordfokas/stargatetech2/core/reference/TextureReference.java

+2
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ public class TextureReference {
4242
@Block public static final String INTERFACE_STRIPES = "interfaceStripes";
4343

4444
@Block public static final String BEACON_ANTENNA = "beaconAntenna";
45+
@Block public static final String BEACON_CONSOLE = "beaconConsole";
46+
@Block public static final String BEACON_MATTERGRID = "beaconMatterGrid";
4547
@Block public static final String BEACON_TRANSCEIVER = "beaconTransceiver";
4648
@Block public static final String BEACON_TRANSCEIVER_T = "beaconTransceiver_T";
4749

‎src/main/java/lordfokas/stargatetech2/core/reference/TileEntityReference.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,10 @@ public class TileEntityReference {
1515

1616
// ENERGY
1717

18-
// FACTORY
19-
public static final String TILE_CROSSOVER = "tileCrossover";
20-
public static final String TILE_PRIORITIZER = "tilePrioritizer";
21-
2218
// TRANSPORT
19+
public static final String TILE_BEACON_CONSOLE = "tileBeaconConsole";
20+
public static final String TILE_BEACON_MATTERGRID = "tileBeaconMatterGrid";
21+
public static final String TILE_BEACON_TRANSCEIVER = "tileBeaconTransceiver";
2322
public static final String TILE_STARGATE = "tileStargate";
2423
public static final String TILE_STARGATE_RING = "tileStargateRing";
2524
public static final String TILE_STARGATE_BASE = "tileStargateBase";

‎src/main/java/lordfokas/stargatetech2/transport/BlockBeacon.java

+29-13
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@
33
import java.util.List;
44

55
import cpw.mods.fml.common.registry.GameRegistry;
6+
import cpw.mods.fml.relauncher.Side;
7+
import cpw.mods.fml.relauncher.SideOnly;
68
import lordfokas.stargatetech2.core.IconRegistry;
79
import lordfokas.stargatetech2.core.base.BaseBlockContainer;
810
import lordfokas.stargatetech2.core.base.BaseTileEntity;
911
import lordfokas.stargatetech2.core.reference.BlockReference;
1012
import lordfokas.stargatetech2.core.reference.TextureReference;
13+
import net.minecraft.client.renderer.texture.IIconRegister;
1114
import net.minecraft.creativetab.CreativeTabs;
1215
import net.minecraft.entity.EntityLivingBase;
1316
import net.minecraft.item.Item;
@@ -19,31 +22,36 @@
1922
public class BlockBeacon extends BaseBlockContainer{
2023
public static final int META_TRANSCEIVER = 0;
2124
public static final int META_ANTENNA = 1;
25+
public static final int META_CONSOLE = 2;
26+
public static final int META_MATTERGRID = 3;
2227

2328
public BlockBeacon() {
24-
super(BlockReference.BEACON_ANTENNA);
29+
super(BlockReference.BEACON);
2530
setIsAbstractBusBlock();
2631
}
2732

2833
@Override
2934
public IIcon getBaseIcon(int side, int meta){
3035
if(meta == META_ANTENNA) return IconRegistry.blockIcons.get(TextureReference.BEACON_ANTENNA);
31-
if(meta == META_TRANSCEIVER){
32-
if(side == 0){
33-
return IconRegistry.blockIcons.get(TextureReference.MACHINE_BOTTOM);
34-
}else if(side == 1){
35-
return IconRegistry.blockIcons.get(TextureReference.BEACON_TRANSCEIVER_T);
36-
}else{
37-
return IconRegistry.blockIcons.get(TextureReference.BEACON_TRANSCEIVER);
38-
}
39-
}
36+
if(meta == META_TRANSCEIVER)
37+
if(side == 0) return IconRegistry.blockIcons.get(TextureReference.MACHINE_BOTTOM);
38+
else if(side == 1) return IconRegistry.blockIcons.get(TextureReference.BEACON_TRANSCEIVER_T);
39+
else return IconRegistry.blockIcons.get(TextureReference.BEACON_TRANSCEIVER);
40+
if(meta == META_CONSOLE)
41+
if(side == 0) return IconRegistry.blockIcons.get(TextureReference.MACHINE_BOTTOM);
42+
else if(side == 1) return IconRegistry.blockIcons.get(TextureReference.MACHINE_TOP);
43+
else return IconRegistry.blockIcons.get(TextureReference.BEACON_CONSOLE);
44+
if(meta == META_MATTERGRID)
45+
if(side == 0) return IconRegistry.blockIcons.get(TextureReference.MACHINE_BOTTOM);
46+
else if(side == 1) return IconRegistry.blockIcons.get(TextureReference.BEACON_MATTERGRID);
47+
else return IconRegistry.blockIcons.get(TextureReference.MACHINE_SIDE);
4048
return blockIcon;
4149
}
4250

43-
@Override
51+
/*@Override
4452
public void onBlockPlacedBy(World w, int x, int y, int z, EntityLivingBase e, ItemStack stack){
4553
w.setBlockMetadataWithNotify(x, y, z, stack.getItemDamage(), 2);
46-
}
54+
}*/
4755

4856
@Override
4957
public int damageDropped(int meta){
@@ -74,6 +82,8 @@ public boolean renderAsNormalBlock(){
7482
public void getSubBlocks(Item item, CreativeTabs tab, List list) {
7583
list.add(new ItemStack(item, 1, META_TRANSCEIVER));
7684
list.add(new ItemStack(item, 1, META_ANTENNA));
85+
list.add(new ItemStack(item, 1, META_CONSOLE));
86+
list.add(new ItemStack(item, 1, META_MATTERGRID));
7787
}
7888

7989
@Override
@@ -84,7 +94,13 @@ protected void registerBlock(){
8494
@Override
8595
protected BaseTileEntity createTileEntity(int metadata){
8696
if(metadata == META_TRANSCEIVER){
87-
return null; // Soon (tm);
97+
return new TileBeaconTransceiver();
98+
}
99+
if(metadata == META_CONSOLE){
100+
return new TileBeaconConsole();
101+
}
102+
if(metadata == META_MATTERGRID){
103+
return new TileBeaconMatterGrid();
88104
}
89105
return null;
90106
}

‎src/main/java/lordfokas/stargatetech2/transport/ItemBlockBeacon.java

+11-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ public ItemBlockBeacon(Block block) {
1313

1414
@Override
1515
public String getUnlocalizedName(ItemStack s) {
16-
return s.getItemDamage() == 0 ? "block.beaconTransceiver" : "block.beaconAntenna";
16+
switch(s.getItemDamage()){
17+
case BlockBeacon.META_TRANSCEIVER: return "block.beacon.transceiver";
18+
case BlockBeacon.META_ANTENNA: return "block.beacon.antenna";
19+
case BlockBeacon.META_CONSOLE: return "block.beacon.console";
20+
case BlockBeacon.META_MATTERGRID: return "block.beacon.mattergrid";
21+
}
22+
return "UNKNOWN_BEACON_BLOCK";
1723
}
24+
25+
public int getMetadata(int meta){
26+
return meta;
27+
}
1828
}

‎src/main/java/lordfokas/stargatetech2/transport/RenderBeacon.java

+54-9
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
import net.minecraft.client.renderer.RenderBlocks;
55
import net.minecraft.util.IIcon;
66
import net.minecraft.world.IBlockAccess;
7+
import lordfokas.stargatetech2.ModuleTransport;
8+
import lordfokas.stargatetech2.core.IconRegistry;
79
import lordfokas.stargatetech2.core.base.BaseISBRH;
810

911
public class RenderBeacon extends BaseISBRH{
@@ -20,9 +22,13 @@ public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block b
2022
boolean handled = true;
2123
beacon.setBlockBounds(0.25f, 0.25f, 0.25f, 0.75f, 0.75f, 0.75f);
2224
if(meta == BlockBeacon.META_TRANSCEIVER){
23-
renderWorldBase(beacon, renderer, x, y, z);
25+
renderWorldTransceiver(beacon, renderer, x, y, z);
2426
}else if(meta == BlockBeacon.META_ANTENNA){
25-
renderWorldPole(beacon, renderer, x, y, z);
27+
renderWorldAntenna(beacon, renderer, x, y, z);
28+
}else if(meta == BlockBeacon.META_CONSOLE){
29+
renderWorldConsole(beacon, renderer, x, y, z);
30+
}else if(meta == BlockBeacon.META_MATTERGRID){
31+
renderWorldMatterGrid(beacon, renderer, x, y, z, world);
2632
}else handled = false;
2733
beacon.setBlockBounds(0, 0, 0, 1, 1, 1);
2834
return handled;
@@ -32,13 +38,13 @@ public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block b
3238
public void renderInventoryBlock(Block block, int meta, int modelID, RenderBlocks renderer){
3339
BlockBeacon beacon = (BlockBeacon) block;
3440
if(meta == BlockBeacon.META_TRANSCEIVER){
35-
renderItemBase(renderer, beacon);
41+
renderItemTransceiver(renderer, beacon);
3642
}else if(meta == BlockBeacon.META_ANTENNA){
37-
renderItemPole(renderer, beacon);
38-
};
43+
renderItemAntenna(renderer, beacon);
44+
}else super.renderInventoryBlock(block, meta, modelID, renderer);
3945
}
4046

41-
private void renderWorldBase(BlockBeacon beacon, RenderBlocks renderer, int x, int y, int z){
47+
private void renderWorldTransceiver(BlockBeacon beacon, RenderBlocks renderer, int x, int y, int z){
4248
IIcon base = beacon.getBaseIcon(0, 0);
4349
IIcon top = beacon.getBaseIcon(1, 0);
4450
IIcon side = beacon.getBaseIcon(2, 0);
@@ -53,7 +59,7 @@ private void renderWorldBase(BlockBeacon beacon, RenderBlocks renderer, int x, i
5359
beacon.restoreTextures();
5460
}
5561

56-
private void renderItemBase(RenderBlocks renderer, BlockBeacon beacon){
62+
private void renderItemTransceiver(RenderBlocks renderer, BlockBeacon beacon){
5763
IIcon base = beacon.getBaseIcon(0, 0);
5864
IIcon top = beacon.getBaseIcon(1, 0);
5965
IIcon side = beacon.getBaseIcon(2, 0);
@@ -72,14 +78,14 @@ private void renderItemBase(RenderBlocks renderer, BlockBeacon beacon){
7278
beacon.restoreTextures();
7379
}
7480

75-
private void renderWorldPole(BlockBeacon beacon, RenderBlocks renderer, int x, int y, int z){
81+
private void renderWorldAntenna(BlockBeacon beacon, RenderBlocks renderer, int x, int y, int z){
7682
renderWorldCuboidWithBounds(beacon, renderer, x, y, z, F03, 0, F03, F06, 1, F06);
7783
renderWorldCuboidWithBounds(beacon, renderer, x, y, z, F10, 0, F03, F13, 1, F06);
7884
renderWorldCuboidWithBounds(beacon, renderer, x, y, z, F03, 0, F10, F06, 1, F13);
7985
renderWorldCuboidWithBounds(beacon, renderer, x, y, z, F10, 0, F10, F13, 1, F13);
8086
}
8187

82-
private void renderItemPole(RenderBlocks renderer, BlockBeacon beacon){
88+
private void renderItemAntenna(RenderBlocks renderer, BlockBeacon beacon){
8389
renderer.setRenderBounds(F03, 0, F03, F06, 1, F06);
8490
renderInventoryCuboid(beacon, BlockBeacon.META_ANTENNA, renderer, false);
8591
renderer.setRenderBounds(F10, 0, F03, F13, 1, F06);
@@ -89,4 +95,43 @@ private void renderItemPole(RenderBlocks renderer, BlockBeacon beacon){
8995
renderer.setRenderBounds(F10, 0, F10, F13, 1, F13);
9096
renderInventoryCuboid(beacon, BlockBeacon.META_ANTENNA, renderer, false);
9197
}
98+
99+
private void renderWorldConsole(BlockBeacon beacon, RenderBlocks renderer, int x, int y, int z){
100+
renderWorldCuboidWithBounds(beacon, renderer, x, y, z, 0, 0, 0, 1, F02, 1);
101+
renderWorldCuboidWithBounds(beacon, renderer, x, y, z, 0, F14, 0, 1, 1, 1);
102+
renderWorldCuboidWithBounds(beacon, renderer, x, y, z, 0, F02, 0, F02, F14, F02);
103+
renderWorldCuboidWithBounds(beacon, renderer, x, y, z, F14, F02, 0, 1, F14, F02);
104+
renderWorldCuboidWithBounds(beacon, renderer, x, y, z, 0, F02, F14, F02, F14, 1);
105+
renderWorldCuboidWithBounds(beacon, renderer, x, y, z, F14, F02, F14, 1, F14, 1);
106+
renderWorldCuboidWithBounds(beacon, renderer, x, y, z, F01, F01, F01, F15, F15, F15);
107+
}
108+
109+
private void renderWorldMatterGrid(BlockBeacon beacon, RenderBlocks renderer, int x, int y, int z, IBlockAccess world){
110+
boolean top, bottom, left, right, topleft, topright, bottomleft, bottomright;
111+
top = isMatterGrid(world, x, y, z+1);
112+
bottom = isMatterGrid(world, x, y, z-1);
113+
right = isMatterGrid(world, x+1, y, z);
114+
left = isMatterGrid(world, x-1, y, z);
115+
topright = isMatterGrid(world, x+1, y, z+1);
116+
topleft = isMatterGrid(world, x-1, y, z+1);
117+
bottomright = isMatterGrid(world, x+1, y, z-1);
118+
bottomleft = isMatterGrid(world, x-1, y, z-1);
119+
120+
renderWorldCuboidWithBounds(beacon, renderer, x, y, z, 0, 0, 0, 1, F15, 1);
121+
122+
if(!top) renderWorldCuboidWithBounds(beacon, renderer, x, y, z, F01, F15, F15, F15, 1, 1);
123+
if(!bottom) renderWorldCuboidWithBounds(beacon, renderer, x, y, z, F01, F15, 0, F15, 1, F01);
124+
if(!right) renderWorldCuboidWithBounds(beacon, renderer, x, y, z, F15, F15, F01, 1, 1, F15);
125+
if(!left) renderWorldCuboidWithBounds(beacon, renderer, x, y, z, 0, F15, F01, F01, 1, F15);
126+
if(!(top && right && topright)) renderWorldCuboidWithBounds(beacon, renderer, x, y, z, F15, F15, F15, 1, 1, 1);
127+
if(!(top && left && topleft)) renderWorldCuboidWithBounds(beacon, renderer, x, y, z, 0, F15, F15, F01, 1, 1);
128+
if(!(bottom && right && bottomright)) renderWorldCuboidWithBounds(beacon, renderer, x, y, z, F15, F15, 0, 1, 1, F01);
129+
if(!(bottom && left && bottomleft)) renderWorldCuboidWithBounds(beacon, renderer, x, y, z, 0, F15, 0, F01, 1, F01);
130+
}
131+
132+
private boolean isMatterGrid(IBlockAccess world, int x, int y, int z){
133+
boolean beacon = world.getBlock(x, y, z) == ModuleTransport.beacon;
134+
boolean meta = world.getBlockMetadata(x, y, z) == BlockBeacon.META_MATTERGRID;
135+
return beacon && meta;
136+
}
92137
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
package lordfokas.stargatetech2.transport;
2+
3+
import java.nio.FloatBuffer;
4+
import java.util.Random;
5+
6+
import org.lwjgl.opengl.GL11;
7+
8+
import net.minecraft.block.Block;
9+
import net.minecraft.client.Minecraft;
10+
import net.minecraft.client.renderer.ActiveRenderInfo;
11+
import net.minecraft.client.renderer.GLAllocation;
12+
import net.minecraft.client.renderer.Tessellator;
13+
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
14+
import net.minecraft.tileentity.TileEntity;
15+
import net.minecraft.util.ResourceLocation;
16+
import net.minecraft.world.World;
17+
import lordfokas.stargatetech2.core.Vec3Int;
18+
import lordfokas.stargatetech2.core.base.BaseTESR;
19+
20+
public class RenderBeaconMatterGrid extends TileEntitySpecialRenderer{
21+
private static final ResourceLocation ender_sky = new ResourceLocation("textures/environment/end_sky.png");
22+
private static final ResourceLocation end_portal = new ResourceLocation("textures/entity/end_portal.png");
23+
private static final Random random = new Random(31100L);
24+
private FloatBuffer buffer = GLAllocation.createDirectFloatBuffer(16);
25+
26+
@Override
27+
public final void renderTileEntityAt(TileEntity te, double x, double y, double z, float f) {
28+
float f1 = (float)this.field_147501_a.field_147560_j;
29+
float f2 = (float)this.field_147501_a.field_147561_k;
30+
float f3 = (float)this.field_147501_a.field_147558_l;
31+
GL11.glDisable(GL11.GL_LIGHTING);
32+
random.setSeed(31100L);
33+
float f4 = 0.94F;
34+
35+
for (int i = 0; i < 16; ++i)
36+
{
37+
GL11.glPushMatrix();
38+
float f5 = (float)(16 - i);
39+
float f6 = 0.0625F;
40+
float f7 = 1.0F / (f5 + 1.0F);
41+
42+
if (i == 0)
43+
{
44+
this.bindTexture(ender_sky);
45+
f7 = 0.1F;
46+
f5 = 65.0F;
47+
f6 = 0.125F;
48+
GL11.glEnable(GL11.GL_BLEND);
49+
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
50+
}
51+
52+
if (i == 1)
53+
{
54+
this.bindTexture(end_portal);
55+
GL11.glEnable(GL11.GL_BLEND);
56+
GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE);
57+
f6 = 0.5F;
58+
}
59+
60+
float f8 = (float)(-(y + (double)f4));
61+
float f9 = f8 + ActiveRenderInfo.objectY;
62+
float f10 = f8 + f5 + ActiveRenderInfo.objectY;
63+
float f11 = f9 / f10;
64+
f11 += (float)(y + (double)f4);
65+
GL11.glTranslatef(f1, f11, f3);
66+
GL11.glTexGeni(GL11.GL_S, GL11.GL_TEXTURE_GEN_MODE, GL11.GL_OBJECT_LINEAR);
67+
GL11.glTexGeni(GL11.GL_T, GL11.GL_TEXTURE_GEN_MODE, GL11.GL_OBJECT_LINEAR);
68+
GL11.glTexGeni(GL11.GL_R, GL11.GL_TEXTURE_GEN_MODE, GL11.GL_OBJECT_LINEAR);
69+
GL11.glTexGeni(GL11.GL_Q, GL11.GL_TEXTURE_GEN_MODE, GL11.GL_EYE_LINEAR);
70+
GL11.glTexGen(GL11.GL_S, GL11.GL_OBJECT_PLANE, floatBuffer(1.0F, 0.0F, 0.0F, 0.0F));
71+
GL11.glTexGen(GL11.GL_T, GL11.GL_OBJECT_PLANE, floatBuffer(0.0F, 0.0F, 1.0F, 0.0F));
72+
GL11.glTexGen(GL11.GL_R, GL11.GL_OBJECT_PLANE, floatBuffer(0.0F, 0.0F, 0.0F, 1.0F));
73+
GL11.glTexGen(GL11.GL_Q, GL11.GL_EYE_PLANE, floatBuffer(0.0F, 1.0F, 0.0F, 0.0F));
74+
GL11.glEnable(GL11.GL_TEXTURE_GEN_S);
75+
GL11.glEnable(GL11.GL_TEXTURE_GEN_T);
76+
GL11.glEnable(GL11.GL_TEXTURE_GEN_R);
77+
GL11.glEnable(GL11.GL_TEXTURE_GEN_Q);
78+
GL11.glPopMatrix();
79+
GL11.glMatrixMode(GL11.GL_TEXTURE);
80+
GL11.glPushMatrix();
81+
GL11.glLoadIdentity();
82+
GL11.glTranslatef(0.0F, (float)(Minecraft.getSystemTime() % 700000L) / 700000.0F, 0.0F);
83+
GL11.glScalef(f6, f6, f6);
84+
GL11.glTranslatef(0.5F, 0.5F, 0.0F);
85+
GL11.glRotatef((float)(i * i * 4321 + i * 9) * 2.0F, 0.0F, 0.0F, 1.0F);
86+
GL11.glTranslatef(-0.5F, -0.5F, 0.0F);
87+
GL11.glTranslatef(-f1, -f3, -f2);
88+
f9 = f8 + ActiveRenderInfo.objectY;
89+
GL11.glTranslatef(ActiveRenderInfo.objectX * f5 / f9, ActiveRenderInfo.objectZ * f5 / f9, -f2);
90+
Tessellator tessellator = Tessellator.instance;
91+
tessellator.startDrawingQuads();
92+
f11 = random.nextFloat() * 0.5F + 0.1F;
93+
float f12 = random.nextFloat() * 0.5F + 0.4F;
94+
float f13 = random.nextFloat() * 0.5F + 0.5F;
95+
96+
if (i == 0)
97+
{
98+
f13 = 1.0F;
99+
f12 = 1.0F;
100+
f11 = 1.0F;
101+
}
102+
103+
tessellator.setColorRGBA_F(f11 * f7, f12 * f7, f13 * f7, 1.0F);
104+
tessellator.addVertex(x, y + (double)f4, z);
105+
tessellator.addVertex(x, y + (double)f4, z + 1.0D);
106+
tessellator.addVertex(x + 1.0D, y + (double)f4, z + 1.0D);
107+
tessellator.addVertex(x + 1.0D, y + (double)f4, z);
108+
tessellator.draw();
109+
GL11.glPopMatrix();
110+
GL11.glMatrixMode(GL11.GL_MODELVIEW);
111+
}
112+
113+
GL11.glDisable(GL11.GL_BLEND);
114+
GL11.glDisable(GL11.GL_TEXTURE_GEN_S);
115+
GL11.glDisable(GL11.GL_TEXTURE_GEN_T);
116+
GL11.glDisable(GL11.GL_TEXTURE_GEN_R);
117+
GL11.glDisable(GL11.GL_TEXTURE_GEN_Q);
118+
GL11.glEnable(GL11.GL_LIGHTING);
119+
}
120+
121+
private FloatBuffer floatBuffer(float p_147525_1_, float p_147525_2_, float p_147525_3_, float p_147525_4_)
122+
{
123+
buffer.clear();
124+
buffer.put(p_147525_1_).put(p_147525_2_).put(p_147525_3_).put(p_147525_4_);
125+
buffer.flip();
126+
return buffer;
127+
}
128+
129+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package lordfokas.stargatetech2.transport;
2+
3+
import net.minecraft.nbt.NBTTagCompound;
4+
import lordfokas.stargatetech2.core.base.BaseTileEntity;
5+
6+
public class TileBeaconConsole extends BaseTileEntity{
7+
8+
@Override
9+
public boolean canUpdate(){
10+
return false;
11+
}
12+
13+
@Override
14+
protected void readNBT(NBTTagCompound nbt) {
15+
// TODO Auto-generated method stub
16+
17+
}
18+
19+
@Override
20+
protected void writeNBT(NBTTagCompound nbt) {
21+
// TODO Auto-generated method stub
22+
23+
}
24+
25+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package lordfokas.stargatetech2.transport;
2+
3+
import net.minecraft.nbt.NBTTagCompound;
4+
import lordfokas.stargatetech2.core.base.BaseTileEntity;
5+
6+
public class TileBeaconMatterGrid extends BaseTileEntity {
7+
8+
@Override
9+
public boolean canUpdate(){
10+
return false;
11+
}
12+
13+
@Override
14+
protected void readNBT(NBTTagCompound nbt) {
15+
// TODO Auto-generated method stub
16+
17+
}
18+
19+
@Override
20+
protected void writeNBT(NBTTagCompound nbt) {
21+
// TODO Auto-generated method stub
22+
23+
}
24+
25+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package lordfokas.stargatetech2.transport;
2+
3+
import net.minecraft.nbt.NBTTagCompound;
4+
import lordfokas.stargatetech2.core.base.BaseTileEntity;
5+
6+
public class TileBeaconTransceiver extends BaseTileEntity{
7+
8+
@Override
9+
public boolean canUpdate(){
10+
return false;
11+
}
12+
13+
@Override
14+
protected void readNBT(NBTTagCompound nbt) {
15+
// TODO Auto-generated method stub
16+
17+
}
18+
19+
@Override
20+
protected void writeNBT(NBTTagCompound nbt) {
21+
// TODO Auto-generated method stub
22+
23+
}
24+
25+
}

‎src/main/resources/assets/stargatetech2/lang/en_US.lang

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
###################################################################################################
22
# BLOCKS
33

4-
block.beaconTransceiver.name=Transport Beacon Transceiver
5-
block.beaconAntenna.name=Transport Beacon Antenna
4+
block.beacon.transceiver.name=Transport Beacon Transceiver
5+
block.beacon.antenna.name=Transport Beacon Antenna
6+
block.beacon.console.name=Transport Beacon Console
7+
block.beacon.mattergrid.name=Transport Beacon Matter Grid
68
block.busAdapter.name=Abstract Bus Adapter
79
block.busCable.name=Abstract Bus Cable
810
block.naquadah.ore.name=Naquadah Ore
Loading
Loading

‎src/main/resources/mcmod.info

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"modid": "StargateTech2",
44
"name": "StargateTech 2",
55
"description": "Adds Stargate-themed technology to minecraft! This is still in very heavy development, most things are subject to change in the future!",
6-
"version": "0.7.7-Alpha",
6+
"version": "0.8.0-Alpha",
77
"credits": "Thanks to Matchlighter and JoshTheEnder",
88
"logoFile": "",
99
"mcversion": "1.7.10",

0 commit comments

Comments
 (0)
Please sign in to comment.