model for the RT generator

This commit is contained in:
Bob 2020-07-31 00:16:46 +02:00
parent 01de2ba803
commit 3634e95c78
8 changed files with 491 additions and 24 deletions

View File

@ -0,0 +1,418 @@
# Blender v2.79 (sub 0) OBJ File: 'rtg.blend'
# www.blender.org
o Connector
v -0.500000 0.687500 -0.187500
v -0.500000 0.687500 0.187500
v -0.500000 0.312500 -0.187500
v -0.500000 0.312500 0.187500
v -0.375000 0.687500 -0.187500
v -0.375000 0.687500 0.187500
v -0.375000 0.312500 -0.187500
v -0.375000 0.312500 0.187500
v -0.375000 0.625000 -0.125000
v -0.375000 0.625000 0.125000
v -0.375000 0.375000 -0.125000
v -0.375000 0.375000 0.125000
v -0.125000 0.625000 -0.125000
v -0.125000 0.625000 0.125000
v -0.125000 0.375000 -0.125000
v -0.125000 0.375000 0.125000
vt 0.761905 1.000000
vt 0.904762 0.714286
vt 0.904762 1.000000
vt 0.761905 0.714286
vt 0.904762 1.000000
vt 0.761905 1.000000
vt 0.714286 0.714286
vt 0.761905 0.714286
vt 0.761905 1.000000
vt 0.714286 0.714286
vt 0.761905 0.714286
vt 0.761905 1.000000
vt 0.714286 0.714286
vt 0.761905 0.714286
vt 0.761905 1.000000
vt 0.714286 0.714286
vt 0.761905 0.714286
vt 0.714286 0.904762
vt 0.619048 0.714286
vt 0.714286 0.714286
vt 0.714286 0.904762
vt 0.619048 0.714286
vt 0.714286 0.714286
vt 0.714286 0.904762
vt 0.619048 0.714286
vt 0.714286 0.714286
vt 0.714286 0.904762
vt 0.619048 0.714286
vt 0.714286 0.714286
vt 0.904762 0.714286
vt 0.714286 1.000000
vt 0.714286 1.000000
vt 0.714286 1.000000
vt 0.714286 1.000000
vt 0.619048 0.904762
vt 0.619048 0.904762
vt 0.619048 0.904762
vt 0.619048 0.904762
vn -1.0000 0.0000 0.0000
vn 1.0000 0.0000 0.0000
vn 0.0000 0.0000 -1.0000
vn 0.0000 1.0000 0.0000
vn 0.0000 0.0000 1.0000
vn 0.0000 -1.0000 0.0000
s off
f 1/1/1 4/2/1 2/3/1
f 8/4/2 5/5/2 6/6/2
f 1/1/3 7/7/3 3/8/3
f 2/9/4 5/10/4 1/11/4
f 4/12/5 6/13/5 2/14/5
f 3/15/6 8/16/6 4/17/6
f 12/18/5 14/19/5 10/20/5
f 11/21/6 16/22/6 12/23/6
f 9/24/3 15/25/3 11/26/3
f 10/27/4 13/28/4 9/29/4
f 1/1/1 3/8/1 4/2/1
f 8/4/2 7/30/2 5/5/2
f 1/1/3 5/31/3 7/7/3
f 2/9/4 6/32/4 5/10/4
f 4/12/5 8/33/5 6/13/5
f 3/15/6 7/34/6 8/16/6
f 12/18/5 16/35/5 14/19/5
f 11/21/6 15/36/6 16/22/6
f 9/24/3 13/37/3 15/25/3
f 10/27/4 14/38/4 13/28/4
o Gen
v -0.500000 0.000000 0.500000
v -0.500000 0.062500 0.500000
v -0.500000 0.000000 -0.500000
v -0.500000 0.062500 -0.500000
v 0.500000 0.000000 0.500000
v 0.500000 0.062500 0.500000
v 0.500000 0.000000 -0.500000
v 0.500000 0.062500 -0.500000
v 0.000000 0.062500 -0.187500
v 0.000000 0.937500 -0.187500
v 0.000000 1.000000 -0.125000
v 0.000000 0.062500 0.187500
v 0.000000 0.937500 0.187500
v 0.000000 1.000000 0.125000
v -0.187500 0.062500 0.000000
v -0.187500 0.937500 0.000000
v -0.125000 1.000000 0.000000
v 0.187500 0.062500 -0.000000
v 0.187500 0.937500 -0.000000
v 0.125000 1.000000 -0.000000
v -0.132583 0.062500 0.132583
v -0.132583 0.937500 0.132583
v -0.088388 1.000000 0.088388
v 0.132583 0.062500 -0.132583
v 0.132583 0.937500 -0.132583
v 0.088388 1.000000 -0.088388
v 0.132583 0.062500 0.132583
v 0.132583 0.937500 0.132583
v 0.088388 1.000000 0.088388
v -0.132583 0.062500 -0.132583
v -0.132583 0.937500 -0.132583
v -0.088388 1.000000 -0.088388
v -0.500000 0.062500 0.000000
v -0.500000 1.000000 0.000000
v -0.187500 0.062500 0.000000
v -0.187500 1.000000 0.000000
v -0.187500 1.000000 0.000000
v -0.187500 0.062500 0.000000
v -0.500000 1.000000 0.000000
v -0.500000 0.062500 0.000000
v -0.353553 0.062500 0.353553
v -0.353553 1.000000 0.353553
v -0.132583 0.062500 0.132583
v -0.132583 1.000000 0.132583
v -0.132583 1.000000 0.132583
v -0.132583 0.062500 0.132583
v -0.353553 1.000000 0.353553
v -0.353553 0.062500 0.353553
v -0.000000 0.062500 0.500000
v -0.000000 1.000000 0.500000
v 0.000000 0.062500 0.187500
v 0.000000 1.000000 0.187500
v 0.000000 1.000000 0.187500
v 0.000000 0.062500 0.187500
v -0.000000 1.000000 0.500000
v -0.000000 0.062500 0.500000
v 0.353553 0.062500 0.353553
v 0.353553 1.000000 0.353553
v 0.132583 0.062500 0.132583
v 0.132583 1.000000 0.132583
v 0.132583 1.000000 0.132583
v 0.132583 0.062500 0.132583
v 0.353553 1.000000 0.353553
v 0.353553 0.062500 0.353553
v 0.500000 0.062500 0.000000
v 0.500000 1.000000 0.000000
v 0.187500 0.062500 -0.000000
v 0.187500 1.000000 -0.000000
v 0.187500 1.000000 -0.000000
v 0.187500 0.062500 -0.000000
v 0.500000 1.000000 0.000000
v 0.500000 0.062500 0.000000
v 0.353553 0.062500 -0.353553
v 0.353553 1.000000 -0.353553
v 0.132583 0.062500 -0.132583
v 0.132583 1.000000 -0.132583
v 0.132583 1.000000 -0.132583
v 0.132583 0.062500 -0.132583
v 0.353553 1.000000 -0.353553
v 0.353553 0.062500 -0.353553
v 0.000000 0.062500 -0.500000
v 0.000000 1.000000 -0.500000
v -0.000000 0.062500 -0.187500
v -0.000000 1.000000 -0.187500
v -0.000000 1.000000 -0.187500
v -0.000000 0.062500 -0.187500
v 0.000000 1.000000 -0.500000
v 0.000000 0.062500 -0.500000
v -0.353553 0.062500 -0.353553
v -0.353553 1.000000 -0.353553
v -0.132583 0.062500 -0.132583
v -0.132583 1.000000 -0.132583
v -0.132583 1.000000 -0.132583
v -0.132583 0.062500 -0.132583
v -0.353553 1.000000 -0.353553
v -0.353553 0.062500 -0.353553
vt 0.380952 0.809524
vt 0.000000 0.761905
vt 0.380952 0.761905
vt 0.380952 0.809524
vt 0.000000 0.761905
vt 0.380952 0.761905
vt 0.380952 0.809524
vt -0.000000 0.761905
vt 0.380952 0.761905
vt 0.380952 0.809524
vt 0.000000 0.761905
vt 0.380952 0.761905
vt 0.000000 -0.000000
vt 0.380952 -0.000000
vt 0.380952 0.761905
vt 0.000000 0.000000
vt 0.380952 0.000000
vt 0.761905 -0.000000
vt 0.821429 0.666667
vt 0.761905 0.666667
vt 0.809524 0.714286
vt 0.773810 0.714286
vt 0.880952 -0.000000
vt 0.880952 0.666667
vt 0.940476 -0.000000
vt 0.940476 0.666667
vt 1.000000 -0.000000
vt 1.000000 0.666667
vt 0.523810 0.666667
vt 0.583333 0.000000
vt 0.583333 0.666667
vt 0.642857 -0.000000
vt 0.642857 0.666667
vt 0.702381 -0.000000
vt 0.702381 0.666667
vt 0.750000 0.714286
vt 0.690476 0.714286
vt 0.654762 0.714286
vt 0.595238 0.714286
vt 0.630952 0.714286
vt 0.571429 0.714286
vt 0.535714 0.714286
vt 0.952381 0.714286
vt 0.988095 0.714286
vt 0.892857 0.714286
vt 0.928571 0.714286
vt 0.833333 0.714286
vt 0.869048 0.714286
vt 0.919818 0.876219
vt 0.906124 0.810097
vt 0.919818 0.743974
vt 0.380952 0.714286
vt 0.523810 -0.000000
vt 0.523810 0.714286
vt 0.523810 -0.000000
vt 0.380952 0.714286
vt 0.523810 0.714286
vt 0.380952 0.714286
vt 0.523810 -0.000000
vt 0.523810 0.714286
vt 0.523810 -0.000000
vt 0.380952 0.714286
vt 0.523810 0.714286
vt 0.380952 0.714286
vt 0.523810 -0.000000
vt 0.523810 0.714286
vt 0.523810 -0.000000
vt 0.380952 0.714286
vt 0.523810 0.714286
vt 0.380952 0.714286
vt 0.523810 -0.000000
vt 0.523810 0.714286
vt 0.523810 -0.000000
vt 0.380952 0.714286
vt 0.523810 0.714286
vt 0.380952 0.714286
vt 0.523810 -0.000000
vt 0.523810 0.714286
vt 0.523810 -0.000000
vt 0.380952 0.714286
vt 0.523810 0.714286
vt 0.380952 0.714286
vt 0.523810 -0.000000
vt 0.523810 0.714286
vt 0.523810 -0.000000
vt 0.380952 0.714286
vt 0.523810 0.714286
vt 0.380952 0.714286
vt 0.523810 -0.000000
vt 0.523810 0.714286
vt 0.523810 -0.000000
vt 0.380952 0.714286
vt 0.523810 0.714286
vt 0.380952 0.714286
vt 0.523810 -0.000000
vt 0.523810 0.714286
vt 0.523810 -0.000000
vt 0.380952 0.714286
vt 0.523810 0.714286
vt 0.000000 0.809524
vt 0.000000 0.809524
vt -0.000000 0.809524
vt 0.000000 0.809524
vt 0.000000 0.761905
vt 0.821429 -0.000000
vt 0.523810 0.000000
vt 0.714286 0.714286
vt 0.952879 0.716585
vt 0.985940 0.876219
vt 0.985940 0.743974
vt 0.999635 0.810097
vt 0.952879 0.903608
vt 0.380952 -0.000000
vt 0.380952 -0.000000
vt 0.380952 -0.000000
vt 0.380952 -0.000000
vt 0.380952 -0.000000
vt 0.380952 -0.000000
vt 0.380952 -0.000000
vt 0.380952 -0.000000
vt 0.380952 -0.000000
vt 0.380952 -0.000000
vt 0.380952 -0.000000
vt 0.380952 -0.000000
vt 0.380952 -0.000000
vt 0.380952 -0.000000
vt 0.380952 -0.000000
vt 0.380952 -0.000000
vn -1.0000 0.0000 0.0000
vn 0.0000 0.0000 -1.0000
vn 1.0000 0.0000 0.0000
vn 0.0000 0.0000 1.0000
vn 0.0000 -1.0000 0.0000
vn 0.0000 1.0000 0.0000
vn 0.9239 0.0000 -0.3827
vn 0.6786 0.6786 -0.2811
vn 0.3827 0.0000 -0.9239
vn -0.3827 0.0000 -0.9239
vn -0.9239 0.0000 -0.3827
vn -0.9239 0.0000 0.3827
vn -0.3827 0.0000 0.9239
vn 0.3827 0.0000 0.9239
vn 0.9239 0.0000 0.3827
vn 0.6786 0.6786 0.2811
vn 0.2811 0.6786 0.6786
vn -0.2811 0.6786 0.6786
vn -0.6786 0.6786 0.2811
vn -0.6786 0.6786 -0.2811
vn -0.2811 0.6786 -0.6786
vn 0.2811 0.6786 -0.6786
vn -0.7071 0.0000 -0.7071
vn 0.7071 0.0000 0.7071
vn -0.7071 0.0000 0.7071
vn 0.7071 0.0000 -0.7071
s off
f 18/39/7 19/40/7 17/41/7
f 20/42/8 23/43/8 19/44/8
f 24/45/9 21/46/9 23/47/9
f 22/48/10 17/49/10 21/50/10
f 23/47/11 17/51/11 19/52/11
f 20/53/12 22/54/12 24/55/12
f 34/56/13 41/57/13 35/58/13
f 35/58/14 42/59/14 36/60/14
f 41/57/15 25/61/15 26/62/15
f 26/62/16 46/63/16 47/64/16
f 47/64/17 31/65/17 32/66/17
f 32/67/18 37/68/18 38/69/18
f 38/69/19 28/70/19 29/71/19
f 29/71/20 43/72/20 44/73/20
f 44/73/21 34/56/21 35/58/21
f 36/74/22 44/73/22 35/58/22
f 29/71/23 45/75/23 30/76/23
f 39/77/24 29/71/24 30/78/24
f 32/67/25 39/79/25 33/80/25
f 48/81/26 32/66/26 33/82/26
f 27/83/27 47/64/27 48/84/27
f 42/85/28 26/62/28 27/86/28
f 39/87/12 30/88/12 45/89/12
f 52/90/8 49/91/8 50/92/8
f 56/93/10 53/94/10 55/95/10
f 60/96/29 57/97/29 58/98/29
f 64/99/30 61/100/30 63/101/30
f 68/102/7 65/103/7 66/104/7
f 72/105/9 69/106/9 71/107/9
f 76/108/31 73/109/31 74/110/31
f 80/111/32 77/112/32 79/113/32
f 84/114/10 81/115/10 82/116/10
f 88/117/8 85/118/8 87/119/8
f 92/120/30 89/121/30 90/122/30
f 96/123/29 93/124/29 95/125/29
f 100/126/9 97/127/9 98/128/9
f 104/129/7 101/130/7 103/131/7
f 108/132/32 105/133/32 106/134/32
f 112/135/31 109/136/31 111/137/31
f 18/39/7 20/138/7 19/40/7
f 20/42/8 24/139/8 23/43/8
f 24/45/9 22/140/9 21/46/9
f 22/48/10 18/141/10 17/49/10
f 23/47/11 21/46/11 17/51/11
f 20/53/12 18/142/12 22/54/12
f 34/56/13 40/143/13 41/57/13
f 35/58/14 41/57/14 42/59/14
f 41/57/15 40/143/15 25/61/15
f 26/62/16 25/61/16 46/63/16
f 47/64/17 46/63/17 31/65/17
f 32/67/18 31/144/18 37/68/18
f 38/69/19 37/68/19 28/70/19
f 29/71/20 28/70/20 43/72/20
f 44/73/21 43/72/21 34/56/21
f 36/74/22 45/145/22 44/73/22
f 29/71/23 44/73/23 45/75/23
f 39/77/24 38/69/24 29/71/24
f 32/67/25 38/69/25 39/79/25
f 48/81/26 47/64/26 32/66/26
f 27/83/27 26/62/27 47/64/27
f 42/85/28 41/57/28 26/62/28
f 45/89/12 36/146/12 48/147/12
f 36/146/12 42/148/12 48/147/12
f 42/148/12 27/149/12 48/147/12
f 48/147/12 33/150/12 45/89/12
f 33/150/12 39/87/12 45/89/12
f 52/90/8 51/151/8 49/91/8
f 56/93/10 54/152/10 53/94/10
f 60/96/29 59/153/29 57/97/29
f 64/99/30 62/154/30 61/100/30
f 68/102/7 67/155/7 65/103/7
f 72/105/9 70/156/9 69/106/9
f 76/108/31 75/157/31 73/109/31
f 80/111/32 78/158/32 77/112/32
f 84/114/10 83/159/10 81/115/10
f 88/117/8 86/160/8 85/118/8
f 92/120/30 91/161/30 89/121/30
f 96/123/29 94/162/29 93/124/29
f 100/126/9 99/163/9 97/127/9
f 104/129/7 102/164/7 101/130/7
f 108/132/32 107/165/32 105/133/32
f 112/135/31 110/166/31 109/136/31

Binary file not shown.

Before

Width:  |  Height:  |  Size: 284 B

After

Width:  |  Height:  |  Size: 306 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 286 B

After

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -3,61 +3,50 @@ package com.hbm.blocks.machine;
import java.util.Random;
import com.hbm.blocks.ModBlocks;
import com.hbm.lib.RefStrings;
import com.hbm.main.MainRegistry;
import com.hbm.tileentity.machine.TileEntityMachineRTG;
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
public class MachineRTG extends BlockContainer {
private static boolean keepInventory;
private final Random field_149933_a = new Random();
private Random rand;
@SideOnly(Side.CLIENT)
//private IIcon iconFront;
private IIcon iconTop;
private IIcon iconBottom;
public MachineRTG(Material p_i45386_1_) {
super(p_i45386_1_);
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconRegister) {
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + (":machine_rtg_top"));
this.iconBottom = iconRegister.registerIcon(RefStrings.MODID + (":red_wire_coated"));
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":machine_rtg_furnace_base_alt");
public int getRenderType() {
return -1;
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata) {
return side == 1 ? this.iconTop : (side == 0 ? this.iconBottom : this.blockIcon);
public boolean isOpaqueCube() {
return false;
}
@Override
public boolean renderAsNormalBlock() {
return false;
}
@Override
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
if(this == ModBlocks.machine_rtg_grey)
return new TileEntityMachineRTG();
if(this == ModBlocks.machine_rtg_cyan)
return null;
return null;
}

View File

@ -147,6 +147,7 @@ public class ClientProxy extends ServerProxy
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBarrel.class, new RenderFluidBarrel());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineCrystallizer.class, new RenderCrystallizer());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMicrowave.class, new RenderMicrowave());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineRTG.class, new RenderRTG());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityVaultDoor.class, new RenderVaultDoor());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBlastDoor.class, new RenderBlastDoor());

View File

@ -78,6 +78,9 @@ public class ResourceManager {
//Crystallizer
public static final IModelCustom crystallizer = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/crystallizer.obj"));
//RTG
public static final IModelCustom rtg = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/machines/rtg.obj"));
//Anti Mass Spectrometer
public static final IModelCustom ams_base = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/ams_base.obj"));
public static final IModelCustom ams_emitter = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/ams_emitter.obj"));
@ -244,6 +247,9 @@ public class ResourceManager {
public static final ResourceLocation crystallizer_spinner_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/crystallizer_spinner.png");
public static final ResourceLocation crystallizer_window_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/crystallizer_window.png");
//RTG
public static final ResourceLocation rtg_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/rtg.png");
//Anti Mass Spectrometer
public static final ResourceLocation ams_base_tex = new ResourceLocation(RefStrings.MODID, "textures/models/ams_base.png");
public static final ResourceLocation ams_emitter_tex = new ResourceLocation(RefStrings.MODID, "textures/models/ams_emitter.png");

View File

@ -0,0 +1,53 @@
package com.hbm.render.tileentity;
import org.lwjgl.opengl.GL11;
import com.hbm.lib.Library;
import com.hbm.main.ResourceManager;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
public class RenderRTG extends TileEntitySpecialRenderer {
@Override
public void renderTileEntityAt(TileEntity te, double x, double y, double z, float inter) {
GL11.glPushMatrix();
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glRotatef(180, 0F, 1F, 0F);
bindTexture(ResourceManager.rtg_tex);
ResourceManager.rtg.renderPart("Gen");
int ix = te.xCoord;
int iy = te.yCoord;
int iz = te.zCoord;
if(Library.checkCableConnectables(te.getWorldObj(), ix + 1, iy, iz))
ResourceManager.rtg.renderPart("Connector");
if(Library.checkCableConnectables(te.getWorldObj(), ix - 1, iy, iz)) {
GL11.glRotatef(180, 0F, 1F, 0F);
ResourceManager.rtg.renderPart("Connector");
GL11.glRotatef(-180, 0F, 1F, 0F);
}
if(Library.checkCableConnectables(te.getWorldObj(), ix, iy, iz - 1)) {
GL11.glRotatef(90, 0F, 1F, 0F);
ResourceManager.rtg.renderPart("Connector");
GL11.glRotatef(-90, 0F, 1F, 0F);
}
if(Library.checkCableConnectables(te.getWorldObj(), ix, iy, iz + 1)) {
GL11.glRotatef(-90, 0F, 1F, 0F);
ResourceManager.rtg.renderPart("Connector");
GL11.glRotatef(90, 0F, 1F, 0F);
}
GL11.glPopMatrix();
}
}