some more textures, digamma diagnostic, RBMK fuel

This commit is contained in:
Bob 2021-03-24 00:33:29 +01:00
parent 7f5c39322a
commit fb63ad0736
22 changed files with 129 additions and 4 deletions

View File

@ -1549,6 +1549,13 @@ public class GUIHandler implements IGuiHandler {
}
return null;
}
case ModBlocks.guiID_fel: {
if(entity instanceof TileEntityFEL) {
return new GUIFEL(player.inventory, (TileEntityFEL) entity);
}
return null;
}
}
// ITEM GUIS

View File

@ -0,0 +1,59 @@
package com.hbm.inventory.gui;
import org.lwjgl.opengl.GL11;
import com.hbm.inventory.container.ContainerFEL;
import com.hbm.lib.RefStrings;
import com.hbm.packet.AuxButtonPacket;
import com.hbm.packet.PacketDispatcher;
import com.hbm.tileentity.machine.TileEntityFEL;
import net.minecraft.client.Minecraft;
import net.minecraft.client.audio.PositionedSoundRecord;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
public class GUIFEL extends GuiInfoContainer {
public static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/machine/gui_fel.png");
private TileEntityFEL silex;
public GUIFEL(InventoryPlayer invPlayer, TileEntityFEL laser) {
super(new ContainerFEL(invPlayer, laser));
this.silex = laser;
this.xSize = 176;
this.ySize = 168;
}
@Override
public void drawScreen(int mouseX, int mouseY, float f) {
super.drawScreen(mouseX, mouseY, f);
}
protected void mouseClicked(int x, int y, int i) {
super.mouseClicked(x, y, i);
if(guiLeft + 10 <= x && guiLeft + 10 + 12 > x && guiTop + 92 < y && guiTop + 92 + 12 >= y) {
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(silex.xCoord, silex.yCoord, silex.zCoord, 0, 0));
}
}
@Override
protected void drawGuiContainerForegroundLayer(int i, int j) {
String name = this.silex.hasCustomInventoryName() ? this.silex.getInventoryName() : I18n.format(this.silex.getInventoryName());
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
}
@Override
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
}
}

View File

@ -966,6 +966,7 @@ public class ModItems {
public static Item reactor_sensor;
public static Item oil_detector;
public static Item geiger_counter;
public static Item digamma_diagnostic;
public static Item survey_scanner;
public static Item mirror_tool;
@ -2177,6 +2178,7 @@ public class ModItems {
public static Item digamma_feel;
public static Item digamma_know;
public static Item digamma_kauai_moho;
public static Item digamma_up_on_top;
public static final int guiID_item_folder = 1099;
public static final int guiID_item_designator = 10100;
@ -3875,6 +3877,7 @@ public class ModItems {
turret_chip = new ItemTurretChip().setUnlocalizedName("turret_chip").setMaxStackSize(1).setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":turret_chip");
turret_biometry = new ItemTurretBiometry().setUnlocalizedName("turret_biometry").setFull3D().setMaxStackSize(1).setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":rei_scanner");
geiger_counter = new ItemGeigerCounter().setUnlocalizedName("geiger_counter").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":geiger_counter");
digamma_diagnostic = new ItemDigammaDiagnostic().setUnlocalizedName("digamma_diagnostic").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":digamma_diagnostic");
survey_scanner = new ItemSurveyScanner().setUnlocalizedName("survey_scanner").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":survey_scanner");
mirror_tool = new ItemMirrorTool().setUnlocalizedName("mirror_tool").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":mirror_tool");
@ -4608,6 +4611,7 @@ public class ModItems {
digamma_feel = new Item().setUnlocalizedName("digamma_feel").setTextureName(RefStrings.MODID + ":digamma_feel");
digamma_know = new Item().setUnlocalizedName("digamma_know").setTextureName(RefStrings.MODID + ":digamma_know");
digamma_kauai_moho = new Item().setUnlocalizedName("digamma_kauai_moho").setTextureName(RefStrings.MODID + ":digamma_kauai_moho");
digamma_up_on_top = new Item().setUnlocalizedName("digamma_up_on_top").setTextureName(RefStrings.MODID + ":digamma_up_on_top");
mysteryshovel = new ItemMS().setUnlocalizedName("mysteryshovel").setFull3D().setMaxStackSize(1).setTextureName(RefStrings.MODID + ":cursed_shovel");
memory = new ItemBattery(Long.MAX_VALUE / 100L, 100000000000000L, 100000000000000L).setUnlocalizedName("memory").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":mo8_anim");
@ -5651,6 +5655,7 @@ public class ModItems {
GameRegistry.registerItem(survey_scanner, survey_scanner.getUnlocalizedName());
GameRegistry.registerItem(mirror_tool, mirror_tool.getUnlocalizedName());
GameRegistry.registerItem(geiger_counter, geiger_counter.getUnlocalizedName());
GameRegistry.registerItem(digamma_diagnostic, digamma_diagnostic.getUnlocalizedName());
GameRegistry.registerItem(containment_box, containment_box.getUnlocalizedName());
//Keys and Locks
@ -6834,6 +6839,7 @@ public class ModItems {
GameRegistry.registerItem(digamma_feel, digamma_feel.getUnlocalizedName());
GameRegistry.registerItem(digamma_know, digamma_know.getUnlocalizedName());
GameRegistry.registerItem(digamma_kauai_moho, digamma_kauai_moho.getUnlocalizedName());
GameRegistry.registerItem(digamma_up_on_top, digamma_up_on_top.getUnlocalizedName());
GameRegistry.registerItem(mysteryshovel, mysteryshovel.getUnlocalizedName());
GameRegistry.registerItem(memory, memory.getUnlocalizedName());
}

View File

@ -42,7 +42,7 @@ public class ItemDigamma extends ItemHazard {
list.add("");
super.addInformation(stack, player, list, bool);
float d = ((int) ((1000F / digamma) * 10F)) / 10F;
float d = ((int) ((1000F / digamma) * 200F)) / 10F;
list.add(EnumChatFormatting.RED + "[" + I18nUtil.resolveKey("trait.digamma") + "]");
list.add(EnumChatFormatting.DARK_RED + "" + d + "mDRX/s");

View File

@ -0,0 +1,22 @@
package com.hbm.items.tool;
import com.hbm.util.ContaminationUtil;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
public class ItemDigammaDiagnostic extends Item {
@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
if(!world.isRemote) {
world.playSoundAtEntity(player, "hbm:item.techBoop", 1.0F, 1.0F);
ContaminationUtil.printDiagnosticData(player);
}
return stack;
}
}

View File

@ -94,7 +94,8 @@ public class ItemGeigerCounter extends Item {
return rads;
}
@Override
//what?!
/*@Override
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int i, float f0, float f1, float f2)
{
if(world.getBlock(x, y, z) == ModBlocks.block_red_copper) {
@ -105,7 +106,7 @@ public class ItemGeigerCounter extends Item {
}
return false;
}
}*/
@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {

View File

@ -194,6 +194,7 @@ public class MainRegistry {
public static Achievement digammaFeel;
public static Achievement digammaKnow;
public static Achievement digammaKauaiMoho;
public static Achievement digammaUpOnTop;
public static int generalOverride = 0;
public static int polaroidID = 1;
@ -933,6 +934,7 @@ public class MainRegistry {
digammaFeel = new Achievement("achievement.digammaFeel", "digammaFeel", 0, 8, ModItems.digamma_feel, digammaSee).initIndependentStat().registerStat();
digammaKnow = new Achievement("achievement.digammaKnow", "digammaKnow", 2, 8, ModItems.digamma_know, digammaFeel).initIndependentStat().registerStat().setSpecial();
digammaKauaiMoho = new Achievement("achievement.digammaKauaiMoho", "digammaKauaiMoho", 4, 8, ModItems.digamma_kauai_moho, digammaKnow).initIndependentStat().registerStat().setSpecial();
digammaUpOnTop = new Achievement("achievement.digammaUpOnTop", "digammaUpOnTop", 6, 8, ModItems.digamma_up_on_top, digammaKauaiMoho).initIndependentStat().registerStat().setSpecial();
AchievementPage.registerAchievementPage(new AchievementPage("Nuclear Tech", new Achievement[] {
achSacrifice,
@ -969,7 +971,8 @@ public class MainRegistry {
digammaSee,
digammaFeel,
digammaKnow,
digammaKauaiMoho
digammaKauaiMoho,
digammaUpOnTop
}));
// MUST be initialized AFTER achievements!!

View File

@ -211,4 +211,15 @@ public class ContaminationUtil {
player.addChatMessage(new ChatComponentTranslation("geiger.playerRad").appendSibling(new ChatComponentText(" " + radPrefix + eRad + " RAD")).setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)));
player.addChatMessage(new ChatComponentTranslation("geiger.playerRes").appendSibling(new ChatComponentText(" " + resPrefix + res + "% (" + resKoeff + ")")).setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)));
}
public static void printDiagnosticData(EntityPlayer player) {
double digamma = ((int)(HbmLivingProps.getDigamma(player) * 100)) / 100D;
double halflife = ((int)((1D - Math.pow(0.5, digamma)) * 100)) / 100D;
player.addChatMessage(new ChatComponentText("===== Ϝ ").appendSibling(new ChatComponentTranslation("digamma.title")).appendSibling(new ChatComponentText(" Ϝ =====")).setChatStyle(new ChatStyle().setColor(EnumChatFormatting.LIGHT_PURPLE)));
player.addChatMessage(new ChatComponentTranslation("digamma.playerDigamma").appendSibling(new ChatComponentText(EnumChatFormatting.RED + " " + digamma + " DRX")).setChatStyle(new ChatStyle().setColor(EnumChatFormatting.LIGHT_PURPLE)));
player.addChatMessage(new ChatComponentTranslation("digamma.playerHealth").appendSibling(new ChatComponentText(EnumChatFormatting.RED + " " + halflife + "%")).setChatStyle(new ChatStyle().setColor(EnumChatFormatting.LIGHT_PURPLE)));
player.addChatMessage(new ChatComponentTranslation("digamma.playerRes").appendSibling(new ChatComponentText(EnumChatFormatting.DARK_BLUE + " " + "N/A")).setChatStyle(new ChatStyle().setColor(EnumChatFormatting.LIGHT_PURPLE)));
}
}

View File

@ -24,6 +24,8 @@ achievement.digammaKnow.desc=what this world is about.
achievement.digammaKnow=The Terror of Knowing
achievement.digammaSee.desc=into the abyss.
achievement.digammaSee=The Terror of Seeing
achievement.diigammaUpOnTop.desc=Fürchtenichts, eisenbeschlagen.
achievement.diigammaUpOnTop=An der Spitze
achievement.fiend.desc=Sei gemein.
achievement.fiend2.desc=Sei gemeiner.
achievement.fiend2=Unhold 2: Noch unholdiger
@ -305,6 +307,11 @@ death.attack.tau=%1$s wurde von %2$s mit negativ geladenen Tauonen durchsiebt.
death.attack.tauBlast=%1$s lud die XVL1456 zu lange auf und wurde in Stücke gerissen.
death.attack.teleporter=%1$s wurde ins Nichts teleportiert.
digamma.playerDigamma=Digammabelastung:
digamma.playerHealth=Digammaeinfluss:
digamma.playerRes=Digammaresistenz:
digamma.title=DIGAMMA-DIAGNOSEGERÄT
entity.entity_cyber_crab.name=Cyber-Krabbe
entity.entity_elder_one.name=Quackos der Älteste
entity.entity_fucc_a_ducc.name=Ente
@ -988,6 +995,7 @@ item.detonator_deadman.name=Totmannzünder
item.detonator_laser.name=Laserzünder
item.detonator_multi.name=Mehrfach-Fernzünder
item.diamond_gavel.name=Diamantener Richterhammer
item.digamma_diagnostic.name=Digamma-Diagnosegerät
item.dnt_boots.name=dienautronium stiefel
item.dnt_legs.name=dineuterium beine
item.dnt_helmet.name=dinotroniumu helme

View File

@ -24,6 +24,8 @@ achievement.digammaKnow.desc=what this world is about.
achievement.digammaKnow=The Terror of Knowing
achievement.digammaSee.desc=into the abyss.
achievement.digammaSee=The Terror of Seeing
achievement.diigammaUpOnTop.desc=Dreadnought, iron-cladden.
achievement.diigammaUpOnTop=Up On Top
achievement.fiend.desc=Be mean.
achievement.fiend2.desc=Be meaner.
achievement.fiend2=Delinquent 2: Delinquent Harder
@ -307,6 +309,11 @@ death.attack.tau=%1$s was riddeled by %2$s using negatively charged tauons.
death.attack.tauBlast=%1$s charged the XVL1456 for too long and was blown into pieces.
death.attack.teleporter=%1$s was teleported into nothingness.
digamma.playerDigamma=Digamma exposure:
digamma.playerHealth=Digamma influence:
digamma.playerRes=Digamma resistance:
digamma.title=DIGAMMA DIAGNOSTIC
entity.entity_cyber_crab.name=Cyber Crab
entity.entity_elder_one.name=Quackos The Elder One
entity.entity_fucc_a_ducc.name=Duck
@ -990,6 +997,7 @@ item.detonator_deadman.name=Dead Man's Detonator
item.detonator_laser.name=Laser Detonator
item.detonator_multi.name=Multi Detonator
item.diamond_gavel.name=Diamond Gavel
item.digamma_diagnostic.name=Digamma Diagnostic
item.dnt_boots.name=dienautronium boots
item.dnt_legs.name=dineuterium legs
item.dnt_helmet.name=dinotroniumu helmet

Binary file not shown.

After

Width:  |  Height:  |  Size: 375 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 261 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 349 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 257 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 388 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 564 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 611 B