some texture stuff, RTG pellets

This commit is contained in:
Bob 2020-09-19 22:33:20 +02:00
parent d13385f2db
commit 94c8552bc8
19 changed files with 78 additions and 35 deletions

View File

@ -1447,6 +1447,7 @@ item.pellet_mes.name=MES-Watzpellet
item.pellet_meteorite.name=Meteoritenkugeln
item.pellet_neptunium.name=Neptunium-Watzpellet
item.pellet_rtg.name=Plutonium 238 Pellet
item.pellet_rtg_polonium.name=Polonium 210 Pellet
item.pellet_rtg_weak.name=Schwaches Uran RTG-Pellet
item.pellet_schrabidium.name=Pures Schrabidium-Watzpellet
item.photo_panel.name=Photovoltaikpanele

View File

@ -1447,6 +1447,7 @@ item.pellet_mes.name=MES Watz Pellet
item.pellet_meteorite.name=Meteorite Rounds
item.pellet_neptunium.name=Neptunium Watz Pellet
item.pellet_rtg.name=Plutonium 238 Fuel Pellet
item.pellet_rtg_polonium.name=Polonium 210 Fuel Pellet
item.pellet_rtg_weak.name=Weak Uranium RTG Pellet
item.pellet_schrabidium.name=Pure Schrabidium Watz Pellet
item.photo_panel.name=Photovoltaic Panel

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 280 B

After

Width:  |  Height:  |  Size: 248 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 267 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 B

After

Width:  |  Height:  |  Size: 251 B

View File

@ -205,6 +205,7 @@ public class AssemblerRecipes {
makeRecipe(new ComparableStack(ModItems.circuit_red_copper, 1), new AStack[] {new ComparableStack(ModItems.circuit_copper, 1), new ComparableStack(ModItems.wire_red_copper, 6), new OreDictStack("dustGold", 4), new ComparableStack(ModItems.plate_polymer, 1), },150);
makeRecipe(new ComparableStack(ModItems.pellet_rtg, 1), new AStack[] {new ComparableStack(ModItems.nugget_pu238, 5), new OreDictStack("plateIron", 2), },50);
makeRecipe(new ComparableStack(ModItems.pellet_rtg_weak, 1), new AStack[] {new ComparableStack(ModItems.nugget_u238, 4), new ComparableStack(ModItems.nugget_pu238, 1), new OreDictStack("plateIron", 2), },50);
makeRecipe(new ComparableStack(ModItems.pellet_rtg_polonium, 1), new AStack[] {new ComparableStack(ModItems.nugget_polonium, 5), new OreDictStack("plateIron", 2), }, 50);
makeRecipe(new ComparableStack(ModItems.tritium_deuterium_cake, 1), new AStack[] {new ComparableStack(ModItems.cell_deuterium, 6), new ComparableStack(ModItems.cell_tritium, 2), new ComparableStack(ModItems.lithium, 4), },150);
makeRecipe(new ComparableStack(ModItems.pellet_cluster, 1), new AStack[] {new OreDictStack("plateSteel", 4), new ComparableStack(Blocks.tnt, 1), }, 50);
makeRecipe(new ComparableStack(ModItems.pellet_buckshot, 1), new AStack[] {new ComparableStack(ModItems.nugget_lead, 6), }, 50);

View File

@ -32,7 +32,8 @@ public class GUIMachineRTG extends GuiInfoContainer {
String[] text = new String[] { "Accepted Pellets:",
" Regular Pellet (5 HE/t)",
" Weak Pellet (3 HE/t)" };
" Weak Pellet (3 HE/t)",
" Polonium Pellet (25 HE/t)" };
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36, 16, 16, guiLeft - 8, guiTop + 36 + 16, text);
}

View File

@ -63,7 +63,7 @@ public class GUIMiningLaser extends GuiInfoContainer {
protected void drawGuiContainerForegroundLayer(int i, int j) {
String name = this.laser.hasCustomInventoryName() ? this.laser.getInventoryName() : I18n.format(this.laser.getInventoryName());
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 4, 4210752);
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
String width = "" + laser.getWidth();

View File

@ -523,6 +523,7 @@ public class ModItems {
public static Item pellet_rtg;
public static Item pellet_rtg_weak;
public static Item pellet_rtg_polonium;
public static Item tritium_deuterium_cake;
public static Item pellet_schrabidium;
@ -2385,6 +2386,7 @@ public class ModItems {
pellet_rtg = new ItemRadioactive(0.25F).setUnlocalizedName("pellet_rtg").setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":pellet_rtg");
pellet_rtg_weak = new ItemRadioactive(0.1F).setUnlocalizedName("pellet_rtg_weak").setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":pellet_rtg_weak");
pellet_rtg_polonium = new ItemRadioactive(2.5F).setUnlocalizedName("pellet_rtg_polonium").setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":pellet_rtg_polonium");
tritium_deuterium_cake = new ItemCustomLore().setUnlocalizedName("tritium_deuterium_cake").setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":tritium_deuterium_cake");
piston_selenium = new Item().setUnlocalizedName("piston_selenium").setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":piston_selenium");
@ -4466,6 +4468,7 @@ public class ModItems {
//Pellets
GameRegistry.registerItem(pellet_rtg, pellet_rtg.getUnlocalizedName());
GameRegistry.registerItem(pellet_rtg_weak, pellet_rtg_weak.getUnlocalizedName());
GameRegistry.registerItem(pellet_rtg_polonium, pellet_rtg_polonium.getUnlocalizedName());
GameRegistry.registerItem(tritium_deuterium_cake, tritium_deuterium_cake.getUnlocalizedName());
GameRegistry.registerItem(pellet_cluster, pellet_cluster.getUnlocalizedName());
GameRegistry.registerItem(pellet_buckshot, pellet_buckshot.getUnlocalizedName());

View File

@ -61,6 +61,14 @@ public class ItemCustomLore extends Item {
list.add("Cheaper and weaker pellet, now with more U238!");
}
if(this == ModItems.pellet_rtg_polonium)
{
if(MainRegistry.polaroidID == 11)
list.add("Polonium 4 U and me.");
else
list.add("More powderful RTG pellet, made from finest polonium!");
}
if(this == ModItems.pellet_cluster)
{
list.add("Used in multi purpose bombs:");

View File

@ -9,11 +9,14 @@ import com.hbm.main.ResourceManager;
import com.hbm.render.util.RenderSparks;
import com.hbm.tileentity.machine.TileEntityCore;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GLAllocation;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
public class RenderCore extends TileEntitySpecialRenderer {
@ -28,10 +31,19 @@ public class RenderCore extends TileEntitySpecialRenderer {
TileEntityCore core = (TileEntityCore)tileEntity;
if(core.heat == 0)
if(core.heat == 0) {
renderStandby(x, y, z);
else
renderOrb(core, x, y, z);
} else {
GL11.glPushMatrix();
GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5);
GL11.glRotatef(-RenderManager.instance.playerViewY, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(RenderManager.instance.playerViewX - 90, 1.0F, 0.0F, 0.0F);
GL11.glTranslated(-0.5, -0.5, -0.5);
renderVoid(core, 0, 0, 0);
GL11.glPopMatrix();
}
}
public void renderStandby(double x, double y, double z) {
@ -109,6 +121,8 @@ public class RenderCore extends TileEntitySpecialRenderer {
}
public void renderVoid(TileEntity tile, double x, double y, double z) {
TileEntityCore core = (TileEntityCore)tile;
World world = tile.getWorldObj();
GL11.glPushMatrix();
@ -155,14 +169,14 @@ public class RenderCore extends TileEntitySpecialRenderer {
}
GL11.glTranslatef(random.nextFloat() * (1 - f7), random.nextFloat() * (1 - f7), random.nextFloat() * (1 - f7));
float scale = 0.9F;
float scale = 0.8F;
GL11.glScalef(scale, scale, scale);
float ang = 360 / end;
GL11.glRotatef(ang * i + ang * random.nextFloat(), 0.0F, 0.0F, 1.0F);
float f11 = (float) random.nextDouble() * 0.5F + 0.9F;
float f12 = (float) random.nextDouble() * 0.5F + 0.1F;
float f13 = (float) random.nextDouble() * 0.5F + 0.9F;
float f11 = (float) random.nextDouble() * 0.5F + 0.4F;
float f12 = (float) random.nextDouble() * 0.5F + 0.4F;
float f13 = (float) random.nextDouble() * 0.5F + 2F;
if (i == 0) {
f13 = 1.0F;
f12 = 1.0F;
@ -178,25 +192,35 @@ public class RenderCore extends TileEntitySpecialRenderer {
GL11.glTexGen(GL11.GL_Q, GL11.GL_EYE_PLANE, this.func_147525_a(0, 1, 0, 0));
GL11.glRotatef(180, 0, 0, 1);
tessellator.startDrawingQuads();
tessellator.setColorOpaque_F(f11, f12, f13);
tessellator.setBrightness(0xF000F0);
tessellator.addVertex(x + 0.0, y + 0.0, z + 1.0);
tessellator.addVertex(x + 0.0, y + 0.0, z + 0.0);
tessellator.addVertex(x + 1.0, y + 0.0, z + 0.0);
tessellator.addVertex(x + 1.0, y + 0.0, z + 1.0);
tessellator.draw();
int tot = core.tanks[0].getMaxFill() + core.tanks[1].getMaxFill();
int fill = core.tanks[0].getFill() + core.tanks[1].getFill();
float s = 2.25F * fill / tot + 0.5F;
tessellator.startDrawingQuads();
tessellator.setColorOpaque_F(f11, f12, f13);
tessellator.setBrightness(0xF000F0);
tessellator.addVertex(x + 1.0, y + 1.0, z + 1.0);
tessellator.addVertex(x + 1.0, y + 1.0, z + 0.0);
tessellator.addVertex(x + 0.0, y + 1.0, z + 0.0);
tessellator.addVertex(x + 0.0, y + 1.0, z + 1.0);
tessellator.draw();
int count = 32;
for(int j = 0; j < count; j++) {
Vec3 vec = Vec3.createVectorHelper(s, 0, 0);
tessellator.startDrawing(GL11.GL_TRIANGLES);
tessellator.setColorOpaque_F(f11, f12, f13);
tessellator.setBrightness(0xF000F0);
GL11.glTexGen(GL11.GL_S, GL11.GL_EYE_PLANE, this.func_147525_a(0, 1, 0, 0));
vec.rotateAroundY((float) Math.PI * 2F / count * j - 0.0025F);
tessellator.addVertex(x + 0.5 + vec.xCoord, y + 1.0, z + 0.5 + vec.zCoord);
vec.rotateAroundY((float) Math.PI * 2F / count + 0.005F);
tessellator.addVertex(x + 0.5 + vec.xCoord, y + 1.0, z + 0.5 + vec.zCoord);
tessellator.addVertex(x + 0.5, y + 1.0, z + 0.5);
tessellator.draw();
}
/*GL11.glTexGen(GL11.GL_S, GL11.GL_EYE_PLANE, this.func_147525_a(0, 1, 0, 0));
GL11.glTexGen(GL11.GL_T, GL11.GL_EYE_PLANE, this.func_147525_a(1, 0, 0, 0));
GL11.glTexGen(GL11.GL_R, GL11.GL_EYE_PLANE, this.func_147525_a(0, 0, 0, 1));
GL11.glTexGen(GL11.GL_Q, GL11.GL_EYE_PLANE, this.func_147525_a(0, 0, 1, 0));
@ -236,7 +260,7 @@ public class RenderCore extends TileEntitySpecialRenderer {
tessellator.addVertex(x + 1.0, y + 1.0, z + 0.0);
tessellator.addVertex(x + 1.0, y + 1.0, z + 1.0);
tessellator.addVertex(x + 1.0, y + 0.0, z + 1.0);
tessellator.draw();
tessellator.draw();*/
}
GL11.glPopMatrix();

View File

@ -43,7 +43,7 @@ public class TileEntityMachineCyclotron extends TileEntityMachineBase implements
@Override
public String getName() {
return "container.machineCyclotron";
return "container.cyclotron";
}
@Override

View File

@ -228,9 +228,14 @@ public class TileEntityMachineRTG extends TileEntity implements ISidedInventory,
heat += 5;
if(slots[i].getItem() == ModItems.pellet_rtg_weak)
heat += 3;
if(slots[i].getItem() == ModItems.pellet_rtg_polonium)
heat += 25;
}
}
if(heat > heatMax)
heat = heatMax;
power += heat;
if(power > powerMax)
power = powerMax;

View File

@ -101,15 +101,14 @@ public class TileEntityRtgFurnace extends TileEntity implements ISidedInventory
}
public boolean isLoaded() {
if(slots[1] != null && slots[2] != null && slots[3] != null)
{
if(slots[1].getItem() == ModItems.pellet_rtg && slots[2].getItem() == ModItems.pellet_rtg && slots[3].getItem() == ModItems.pellet_rtg)
{
return true;
}
for(int i = 1; i <= 3; i++) {
if(!(slots[i] != null && (slots[i].getItem() == ModItems.pellet_rtg || slots[i].getItem() == ModItems.pellet_rtg_polonium)))
return false;
}
return false;
return true;
}
@Override