telex hee hoo

This commit is contained in:
Bob 2023-09-07 21:56:08 +02:00
parent be51ae39d0
commit 3392ac21d9
10 changed files with 192 additions and 0 deletions

View File

@ -799,6 +799,7 @@ public class ModBlocks {
public static Block radio_torch_sender;
public static Block radio_torch_receiver;
public static Block radio_torch_counter;
public static Block radio_telex;
public static Block conveyor;
//public static Block conveyor_classic;
@ -1972,6 +1973,7 @@ public class ModBlocks {
radio_torch_sender = new RadioTorchSender().setBlockName("radio_torch_sender").setHardness(0.1F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
radio_torch_receiver = new RadioTorchReceiver().setBlockName("radio_torch_receiver").setHardness(0.1F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
radio_torch_counter = new RadioTorchCounter().setBlockName("radio_torch_counter").setHardness(0.1F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rtty_counter");
radio_telex = new RadioTelex().setBlockName("radio_telex").setHardness(3F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":radio_telex");
conveyor = new BlockConveyor().setBlockName("conveyor").setHardness(2.0F).setResistance(2.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":conveyor");
//conveyor_classic = new BlockConveyorClassic().setBlockName("conveyor_classic").setHardness(2.0F).setResistance(2.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":conveyor");
@ -3229,6 +3231,7 @@ public class ModBlocks {
register(radio_torch_sender);
register(radio_torch_receiver);
register(radio_torch_counter);
register(radio_telex);
register(crane_extractor);
register(crane_inserter);

View File

@ -0,0 +1,31 @@
package com.hbm.blocks.network;
import com.hbm.blocks.BlockDummyable;
import com.hbm.tileentity.network.TileEntityRadioTelex;
import net.minecraft.block.material.Material;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public class RadioTelex extends BlockDummyable {
public RadioTelex() {
super(Material.wood);
}
@Override
public TileEntity createNewTileEntity(World world, int meta) {
if(meta >= 12) return new TileEntityRadioTelex();
return null;
}
@Override
public int[] getDimensions() {
return new int[] {0, 0, 0, 0, 1, 0};
}
@Override
public int getOffset() {
return 0;
}
}

View File

@ -288,6 +288,7 @@ public class ClientProxy extends ServerProxy {
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFan.class, new RenderFan());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPistonInserter.class, new RenderPistonInserter());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityConveyorPress.class, new RenderConveyorPress());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRadioTelex.class, new RenderTelex());
//Foundry
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFoundryBasin.class, new RenderFoundry());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFoundryMold.class, new RenderFoundry());

View File

@ -346,6 +346,9 @@ public class ResourceManager {
//DecoContainer (File Cabinet for now)
public static final IModelCustom file_cabinet = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/file_cabinet.obj"));
//TELEX
public static final IModelCustom telex = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/machines/telex.obj"));
////Textures TEs
public static final ResourceLocation universal = new ResourceLocation(RefStrings.MODID, "textures/models/TheGadget3_.png");
@ -715,6 +718,9 @@ public class ResourceManager {
public static final ResourceLocation file_cabinet_tex = new ResourceLocation(RefStrings.MODID, "textures/models/file_cabinet.png");
public static final ResourceLocation file_cabinet_steel_tex = new ResourceLocation(RefStrings.MODID, "textures/models/file_cabinet_steel.png");
//TELEX
public static final ResourceLocation telex_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/telex.png");
////Obj Items
//Shimmer Sledge

View File

@ -0,0 +1,57 @@
package com.hbm.render.tileentity;
import org.lwjgl.opengl.GL11;
import com.hbm.blocks.BlockDummyable;
import com.hbm.blocks.ModBlocks;
import com.hbm.main.ResourceManager;
import com.hbm.render.item.ItemRenderBase;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.item.Item;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.client.IItemRenderer;
public class RenderTelex extends TileEntitySpecialRenderer implements IItemRendererProvider {
@Override
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float interp) {
GL11.glPushMatrix();
GL11.glTranslated(x + 0.5, y, z + 0.5);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_CULL_FACE);
switch(tile.getBlockMetadata() - BlockDummyable.offset) {
case 2: GL11.glRotatef(90, 0F, 1F, 0F); break;
case 4: GL11.glRotatef(180, 0F, 1F, 0F); break;
case 3: GL11.glRotatef(270, 0F, 1F, 0F); break;
case 5: GL11.glRotatef(0, 0F, 1F, 0F); break;
}
GL11.glTranslated(0, 0, 1);
bindTexture(ResourceManager.telex_tex);
ResourceManager.telex.renderAll();
GL11.glPopMatrix();
}
@Override
public Item getItemForRenderer() {
return Item.getItemFromBlock(ModBlocks.radio_telex);
}
@Override
public IItemRenderer getRenderer() {
return new ItemRenderBase( ) {
public void renderInventory() {
GL11.glTranslated(0, -2, 0);
GL11.glScaled(6, 6, 6);
}
public void renderCommon() {
GL11.glTranslated(0, 0, 0.5);
bindTexture(ResourceManager.telex_tex);
ResourceManager.telex.renderAll();
}};
}
}

View File

@ -384,6 +384,7 @@ public class TileMappings {
put(TileEntityRadioTorchSender.class, "tileentity_rtty_sender");
put(TileEntityRadioTorchReceiver.class, "tileentity_rtty_rec");
put(TileEntityRadioTorchCounter.class, "tileentity_rtty_counter");
put(TileEntityRadioTelex.class, "tileentity_rtty_telex");
}
private static void put(Class<? extends TileEntity> clazz, String... names) {

View File

@ -0,0 +1,7 @@
package com.hbm.tileentity.network;
import net.minecraft.tileentity.TileEntity;
public class TileEntityRadioTelex extends TileEntity {
}

View File

@ -0,0 +1,86 @@
# Blender v2.76 (sub 0) OBJ File: 'telex.blend'
# www.blender.org
o Cube_Cube.001
v -0.500000 0.000000 0.500000
v -0.500000 1.000000 0.500000
v -0.500000 0.000000 -1.500000
v -0.500000 1.000000 -1.500000
v 0.500000 0.000000 0.500000
v 0.500000 0.000000 -1.500000
v 0.500000 0.625000 -1.500000
v 0.500000 0.625000 0.500000
v 0.125000 1.000000 -1.500000
v 0.125000 1.000000 0.500000
v 0.500000 0.625000 0.125000
v 0.500000 0.625000 -0.750000
v 0.125000 1.000000 -0.750000
v 0.125000 0.625000 -0.750000
v 0.125000 0.625000 0.125000
v 0.125000 1.000000 0.125000
vt -0.000000 0.500000
vt -0.000000 0.250000
vt 0.500000 0.250000
vt 0.843750 0.250000
vt 0.750000 0.156250
vt 1.000000 -0.000000
vt 0.093750 0.250000
vt 0.093750 0.156250
vt 0.312500 0.156250
vt 0.500000 0.000000
vt 0.656250 0.250000
vt -0.000000 0.750000
vt 0.500000 0.500000
vt 0.500000 0.156250
vt 0.312500 0.250000
vt 0.000000 0.156250
vt -0.000000 0.000000
vt 0.593750 0.343750
vt 0.812500 0.343750
vt 0.593750 0.500000
vt 0.500000 0.593750
vt 0.687500 0.500000
vt 0.687500 0.593750
vt 0.593750 0.250000
vt 0.750000 -0.000000
vt 1.000000 0.250000
vt 0.500000 0.750000
vt 1.000000 0.500000
vt 0.500000 0.343750
vt 1.000000 0.343750
vt 0.812500 0.250000
vn -1.000000 0.000000 0.000000
vn 0.000000 0.000000 -1.000000
vn 1.000000 0.000000 0.000000
vn 0.000000 0.000000 1.000000
vn 0.000000 -1.000000 0.000000
vn 0.707100 0.707100 0.000000
vn 0.000000 1.000000 0.000000
s off
f 4/1/1 3/2/1 1/3/1
f 9/4/2 7/5/2 3/6/2
f 16/7/3 15/8/3 14/9/3
f 1/10/4 8/5/4 10/11/4
f 3/12/5 6/1/5 5/13/5
f 7/14/6 9/3/6 13/15/6
f 10/2/6 8/16/6 11/8/6
f 12/9/3 5/17/3 6/10/3
f 16/18/7 13/19/7 2/13/7
f 12/20/4 13/21/4 14/13/4
f 11/20/2 15/22/2 16/23/2
f 14/19/7 15/18/7 11/24/7
f 2/13/1 4/1/1 1/3/1
f 6/25/2 3/6/2 7/5/2
f 4/26/2 9/4/2 3/6/2
f 13/15/3 16/7/3 14/9/3
f 10/11/4 2/3/4 1/10/4
f 1/10/4 5/25/4 8/5/4
f 1/27/5 3/12/5 5/13/5
f 12/9/6 7/14/6 13/15/6
f 16/7/6 10/2/6 11/8/6
f 6/10/3 7/14/3 12/9/3
f 12/9/3 11/8/3 5/17/3
f 8/16/3 5/17/3 11/8/3
f 4/28/7 2/13/7 13/19/7
f 10/29/7 16/18/7 2/13/7
f 13/19/7 9/30/7 4/28/7
f 12/31/7 14/19/7 11/24/7

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB