ZIRNOX fixes, pheo's bobble

This commit is contained in:
Boblet 2021-11-22 10:26:48 +01:00
parent 6aedf26a93
commit 8eb3e4ac2c
5 changed files with 33 additions and 20 deletions

View File

@ -170,6 +170,7 @@ public class BlockBobble extends BlockContainer {
VT("VT-6/24", "VT-6/24", "Balefire warhead model and general texturework", "You cannot unfuck a horse.", true), VT("VT-6/24", "VT-6/24", "Balefire warhead model and general texturework", "You cannot unfuck a horse.", true),
DOC("The Doctor", "Doctor17PH", "Russian localization, lunar miner", "Perhaps the moon rocks were too expensive", true), DOC("The Doctor", "Doctor17PH", "Russian localization, lunar miner", "Perhaps the moon rocks were too expensive", true),
BLUEHAT("The Blue Hat", "The Blue Hat", "Textures", "there's a listening device in this bobblehead$don't touch it thanks", true), BLUEHAT("The Blue Hat", "The Blue Hat", "Textures", "there's a listening device in this bobblehead$don't touch it thanks", true),
PHEO("Pheo", "Pheonix", "Deuterium machines, tantalium textures, Reliant Rocket", "RUN TO THE BEDROOM, ON THE SUITCASE ON THE LEFT,$YOU'LL FIND MY FAVORITE AXE", true),
//testing garbage. why is she so dumb? //testing garbage. why is she so dumb?
CIRNO("Cirno", "Cirno", "being a dumb ice fairy", "No brain. Head empty.", true); CIRNO("Cirno", "Cirno", "being a dumb ice fairy", "No brain. Head empty.", true);

View File

@ -70,15 +70,19 @@ public class GUIScreenBobble extends GuiScreen {
nextLevel += 10; nextLevel += 10;
String text = this.bobble.type.contribution;
this.fontRendererObj.drawStringWithShadow(text, (int)(left + sizeX / 2 - this.fontRendererObj.getStringWidth(text) / 2), nextLevel, 0x009900);
nextLevel += 20; String[] list = this.bobble.type.contribution.split("\\$");
for(String text : list) {
this.fontRendererObj.drawStringWithShadow(text, (int)(left + sizeX / 2 - this.fontRendererObj.getStringWidth(text) / 2), nextLevel, 0x009900);
nextLevel += 10;
}
nextLevel += 10;
} }
if(this.bobble.type.inscription != null) { if(this.bobble.type.inscription != null) {
String title = "The bottom has following inscription:"; String title = "On the bottom is the following inscription:";
this.fontRendererObj.drawStringWithShadow(title, (int)(left + sizeX / 2 - this.fontRendererObj.getStringWidth(title) / 2), nextLevel, 0x00ff00); this.fontRendererObj.drawStringWithShadow(title, (int)(left + sizeX / 2 - this.fontRendererObj.getStringWidth(title) / 2), nextLevel, 0x00ff00);
nextLevel += 10; nextLevel += 10;

View File

@ -3506,8 +3506,8 @@ public class ModItems {
rod_zirnox_thorium_fuel = new ItemZirnoxRod(120000, 30).setUnlocalizedName("rod_zirnox_thorium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rod_zirnox_thorium_fuel"); rod_zirnox_thorium_fuel = new ItemZirnoxRod(120000, 30).setUnlocalizedName("rod_zirnox_thorium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rod_zirnox_thorium_fuel");
rod_zirnox_mox_fuel = new ItemZirnoxRod(85000, 60).setUnlocalizedName("rod_zirnox_mox_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rod_zirnox_mox_fuel"); rod_zirnox_mox_fuel = new ItemZirnoxRod(85000, 60).setUnlocalizedName("rod_zirnox_mox_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rod_zirnox_mox_fuel");
rod_zirnox_plutonium_fuel = new ItemZirnoxRod(75000, 75).setUnlocalizedName("rod_zirnox_plutonium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rod_zirnox_plutonium_fuel"); rod_zirnox_plutonium_fuel = new ItemZirnoxRod(75000, 75).setUnlocalizedName("rod_zirnox_plutonium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rod_zirnox_plutonium_fuel");
rod_zirnox_u233_fuel = new ItemZirnoxRod(100000, 70).setUnlocalizedName("rod_zirnox_u233_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rod_zirnox_u233_fuel"); rod_zirnox_u233_fuel = new ItemZirnoxRod(90000, 70).setUnlocalizedName("rod_zirnox_u233_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rod_zirnox_u233_fuel");
rod_zirnox_u235_fuel = new ItemZirnoxRod(80000, 80).setUnlocalizedName("rod_zirnox_u235_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rod_zirnox_u235_fuel"); rod_zirnox_u235_fuel = new ItemZirnoxRod(80000, 85).setUnlocalizedName("rod_zirnox_u235_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rod_zirnox_u235_fuel");
rod_zirnox_les_fuel = new ItemZirnoxRod(200000, 150).setUnlocalizedName("rod_zirnox_les_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rod_zirnox_les_fuel"); rod_zirnox_les_fuel = new ItemZirnoxRod(200000, 150).setUnlocalizedName("rod_zirnox_les_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rod_zirnox_les_fuel");
rod_zirnox_lithium = new ItemZirnoxBreedingRod(20000, 0).setUnlocalizedName("rod_zirnox_lithium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rod_zirnox_lithium"); rod_zirnox_lithium = new ItemZirnoxBreedingRod(20000, 0).setUnlocalizedName("rod_zirnox_lithium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rod_zirnox_lithium");
rod_zirnox_tritium = new Item().setUnlocalizedName("rod_zirnox_tritium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_zirnox_empty).setTextureName(RefStrings.MODID + ":rod_zirnox_tritium"); rod_zirnox_tritium = new Item().setUnlocalizedName("rod_zirnox_tritium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_zirnox_empty).setTextureName(RefStrings.MODID + ":rod_zirnox_tritium");

View File

@ -38,6 +38,7 @@ public class RenderBobble extends TileEntitySpecialRenderer {
public static final ResourceLocation bobble_vt = new ResourceLocation(RefStrings.MODID, "textures/models/trinkets/vt.png"); public static final ResourceLocation bobble_vt = new ResourceLocation(RefStrings.MODID, "textures/models/trinkets/vt.png");
public static final ResourceLocation bobble_doc = new ResourceLocation(RefStrings.MODID, "textures/models/trinkets/doctor17ph.png"); public static final ResourceLocation bobble_doc = new ResourceLocation(RefStrings.MODID, "textures/models/trinkets/doctor17ph.png");
public static final ResourceLocation bobble_blue = new ResourceLocation(RefStrings.MODID, "textures/models/trinkets/thebluehat.png"); public static final ResourceLocation bobble_blue = new ResourceLocation(RefStrings.MODID, "textures/models/trinkets/thebluehat.png");
public static final ResourceLocation bobble_pheo = new ResourceLocation(RefStrings.MODID, "textures/models/trinkets/pheo.png");
public static final ResourceLocation bobble_cirno = new ResourceLocation(RefStrings.MODID, "textures/models/trinkets/cirno.png"); public static final ResourceLocation bobble_cirno = new ResourceLocation(RefStrings.MODID, "textures/models/trinkets/cirno.png");
@Override @Override
@ -81,6 +82,7 @@ public class RenderBobble extends TileEntitySpecialRenderer {
case VT: bindTexture(bobble_vt); break; case VT: bindTexture(bobble_vt); break;
case DOC: bindTexture(bobble_doc); break; case DOC: bindTexture(bobble_doc); break;
case BLUEHAT: bindTexture(bobble_blue); break; case BLUEHAT: bindTexture(bobble_blue); break;
case PHEO: bindTexture(bobble_pheo); break;
case CIRNO: bindTexture(bobble_cirno); break; case CIRNO: bindTexture(bobble_cirno); break;
default: bindTexture(ResourceManager.universal); default: bindTexture(ResourceManager.universal);
} }
@ -336,6 +338,10 @@ public class RenderBobble extends TileEntitySpecialRenderer {
} }
} }
/*
* Creates a small diamond at 0/0, useful for figuring out where the translation is at
* to determine the rotation point
*/
public void renderOrigin() { public void renderOrigin() {
GL11.glDisable(GL11.GL_CULL_FACE); GL11.glDisable(GL11.GL_CULL_FACE);
@ -401,6 +407,9 @@ public class RenderBobble extends TileEntitySpecialRenderer {
GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_LIGHTING);
} }
/*
* Override with Minecraft.getMinecraft()'s texman to prevent NPEs when invoked statically
*/
@Override @Override
protected void bindTexture(ResourceLocation loc) { protected void bindTexture(ResourceLocation loc) {
Minecraft.getMinecraft().getTextureManager().bindTexture(loc); Minecraft.getMinecraft().getTextureManager().bindTexture(loc);

View File

@ -129,21 +129,21 @@ public class TileEntityReactorZirnox extends TileEntityMachineBase implements IF
case 5: case 5:
return new int[] { 4, 6, 12 }; return new int[] { 4, 6, 12 };
case 6: case 6:
return new int[] { 1, 5, 13 }; return new int[] { 5, 13 };
case 7: case 7:
return new int[] { 0, 8, 14 }; return new int[] { 0, 8, 14 };
case 8: case 8:
return new int[] { 1, 7, 9, 15 }; return new int[] { 1, 7, 9, 15 };
case 9: case 9:
return new int[] { 4, 8, 16}; return new int[] { 2, 8, 16};
case 10: case 10:
return new int[] { 11, 17 }; return new int[] { 3, 11, 17 };
case 11: case 11:
return new int[] { 10, 12, 18 }; return new int[] { 4, 10, 12, 18 };
case 12: case 12:
return new int[] { 11, 13, 19 }; return new int[] { 5, 11, 13, 19 };
case 13: case 13:
return new int[] { 12, 20 }; return new int[] { 6, 12, 20 };
case 14: case 14:
return new int[] { 7, 15, 21 }; return new int[] { 7, 15, 21 };
case 15: case 15:
@ -224,13 +224,12 @@ public class TileEntityReactorZirnox extends TileEntityMachineBase implements IF
private void generateSteam() { private void generateSteam() {
// function of SHS produced per tick // function of SHS produced per tick
// maxes out at heat% * tank capacity / 20 // heat% * 64 * 10 (should get rid of any rounding errors)
double Steam = (((double) heat / (double) maxHeat) * ((double) water.getMaxFill() / 50D)); int Water = (int) ((float)heat / maxHeat) * 64;
int Steam = Water * 10;
double Water = Steam /= 10; water.setFill(water.getFill() - Water);
steam.setFill(steam.getFill() + Steam);
water.setFill(water.getFill() - (int) Math.ceil(Water));
steam.setFill(steam.getFill() + (int) Math.floor(Steam));
if(water.getFill() < 0) if(water.getFill() < 0)
water.setFill(0); water.setFill(0);