the rim flappe on a bongfish

This commit is contained in:
Boblet 2025-05-21 16:29:18 +02:00
parent 411d73ff9b
commit 716e429772
12 changed files with 13419 additions and 21207 deletions

View File

@ -1,12 +1,10 @@
## Changed ## Changed
* Updated chinese localiation * The RBMK console's grid can now be rotated using a screwdriver
* Duds now have a radioactive AoE effect around them based on type * Tool abilities have changed
* HPS is no longer tagged as radioactive and no longer requires hazardous materials tanks to store * Righ-clicking while holding ALT now opens a configuration window
* Somehow, these meaningless tags triggered people exceptionally hard. Go annoy someone else. * The configuration window allows creation of tool presets
* Solderers and arc welders can now use overdrive upgrades * Area and block abilities can now be toggled independently from each other. For example, the vein miner ability can be combined with silk touch
* Do note that processing speed rises linearly, but power draw rises exponentially * Clicking on the same ability allows switching between levels
* Updated textures for the armor and gun modification tables
## Fixed ## Fixed
* Crates? Maybe?
* Fixed conveyor placer not being usable on the conveyor sorter
* Fixed crucible trying to autogen recipes for nonexistant nether thorium ore

View File

@ -16,14 +16,11 @@ import com.hbm.lib.RefStrings;
import com.hbm.main.MainRegistry; import com.hbm.main.MainRegistry;
import com.hbm.packet.PacketDispatcher; import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toserver.NBTItemControlPacket; import com.hbm.packet.toserver.NBTItemControlPacket;
import com.hbm.util.EnumUtil;
import com.hbm.util.I18nUtil;
import com.hbm.util.Tuple.Pair; import com.hbm.util.Tuple.Pair;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.audio.PositionedSoundRecord; import net.minecraft.client.audio.PositionedSoundRecord;
import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.GuiScreen;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
@ -124,8 +121,8 @@ public class GUIScreenToolAbility extends GuiScreen {
int extraBtnsX = guiLeft + xSize - 86; int extraBtnsX = guiLeft + xSize - 86;
hoverIdxExtraBtn = -1; hoverIdxExtraBtn = -1;
for (int i = 0; i < 7; ++i) { for(int i = 0; i < 7; ++i) {
if (isInAABB(mouseX, mouseY, extraBtnsX + i * 11, guiTop + 11, 9, 9)) { if(isInAABB(mouseX, mouseY, extraBtnsX + i * 11, guiTop + 11, 9, 9)) {
hoverIdxExtraBtn = i; hoverIdxExtraBtn = i;
drawTexturedModalRect(extraBtnsX + i * 11, guiTop + 11, 193 + i * 9, 0, 9, 9); drawTexturedModalRect(extraBtnsX + i * 11, guiTop + 11, 193 + i * 9, 0, 9, 9);
} }
@ -134,20 +131,20 @@ public class GUIScreenToolAbility extends GuiScreen {
// Draw tooltip // Draw tooltip
String tooltipValue = ""; String tooltipValue = "";
if (hoverIdxArea != -1) { if(hoverIdxArea != -1) {
int level = 0; int level = 0;
if (abilitiesArea.get(hoverIdxArea).ability == activePreset.areaAbility) { if(abilitiesArea.get(hoverIdxArea).ability == activePreset.areaAbility) {
level = activePreset.areaAbilityLevel; level = activePreset.areaAbilityLevel;
} }
tooltipValue = abilitiesArea.get(hoverIdxArea).ability.getFullName(level); tooltipValue = abilitiesArea.get(hoverIdxArea).ability.getFullName(level);
} else if (hoverIdxHarvest != -1) { } else if(hoverIdxHarvest != -1) {
int level = 0; int level = 0;
if (abilitiesHarvest.get(hoverIdxHarvest).ability == activePreset.harvestAbility) { if(abilitiesHarvest.get(hoverIdxHarvest).ability == activePreset.harvestAbility) {
level = activePreset.harvestAbilityLevel; level = activePreset.harvestAbilityLevel;
} }
tooltipValue = abilitiesHarvest.get(hoverIdxHarvest).ability.getFullName(level); tooltipValue = abilitiesHarvest.get(hoverIdxHarvest).ability.getFullName(level);
} else if (hoverIdxExtraBtn != -1) { } else if(hoverIdxExtraBtn != -1) {
switch (hoverIdxExtraBtn) { switch(hoverIdxExtraBtn) {
case 0: tooltipValue = "Reset all presets"; break; case 0: tooltipValue = "Reset all presets"; break;
case 1: tooltipValue = "Delete current preset"; break; case 1: tooltipValue = "Delete current preset"; break;
case 2: tooltipValue = "Add new preset"; break; case 2: tooltipValue = "Add new preset"; break;
@ -158,7 +155,7 @@ public class GUIScreenToolAbility extends GuiScreen {
} }
} }
if (!tooltipValue.isEmpty()) { if(!tooltipValue.isEmpty()) {
int tooltipWidth = Math.max(6, fontRendererObj.getStringWidth(tooltipValue)); int tooltipWidth = Math.max(6, fontRendererObj.getStringWidth(tooltipValue));
int tooltipX = guiLeft + xSize / 2 - tooltipWidth / 2; int tooltipX = guiLeft + xSize / 2 - tooltipWidth / 2;
int tooltipY = guiTop + ySize + 1 + 4; int tooltipY = guiTop + ySize + 1 + 4;
@ -171,7 +168,7 @@ public class GUIScreenToolAbility extends GuiScreen {
int midWidth = width - keepLeft - keepRight; int midWidth = width - keepLeft - keepRight;
int realMidWidth = realWidth - keepLeft - keepRight; int realMidWidth = realWidth - keepLeft - keepRight;
drawTexturedModalRect(x, y, u, v, keepLeft, height); drawTexturedModalRect(x, y, u, v, keepLeft, height);
for (int i = 0; i < realMidWidth; i += midWidth) { for(int i = 0; i < realMidWidth; i += midWidth) {
drawTexturedModalRect(x + keepLeft + i, y, u + keepLeft, v, Math.min(midWidth, realMidWidth - i), height); drawTexturedModalRect(x + keepLeft + i, y, u + keepLeft, v, Math.min(midWidth, realMidWidth - i), height);
} }
drawTexturedModalRect(x + keepLeft + realMidWidth, y, u + keepLeft + midWidth, v, keepRight, height); drawTexturedModalRect(x + keepLeft + realMidWidth, y, u + keepLeft + midWidth, v, keepRight, height);
@ -180,7 +177,7 @@ public class GUIScreenToolAbility extends GuiScreen {
protected int drawSwitches(List<AbilityInfo> abilities, IBaseAbility selectedAbility, int selectedLevel, int x, int y, int mouseX, int mouseY) { protected int drawSwitches(List<AbilityInfo> abilities, IBaseAbility selectedAbility, int selectedLevel, int x, int y, int mouseX, int mouseY) {
int hoverIdx = -1; int hoverIdx = -1;
for (int i = 0; i < abilities.size(); ++i) { for(int i = 0; i < abilities.size(); ++i) {
AbilityInfo abilityInfo = abilities.get(i); AbilityInfo abilityInfo = abilities.get(i);
boolean available = abilityAvailable(abilityInfo.ability); boolean available = abilityAvailable(abilityInfo.ability);
boolean selected = abilityInfo.ability == selectedAbility; boolean selected = abilityInfo.ability == selectedAbility;
@ -189,10 +186,10 @@ public class GUIScreenToolAbility extends GuiScreen {
drawTexturedModalRect(x + 20 * i, y, abilityInfo.textureU + (available ? 16 : 0), abilityInfo.textureV, 16, 16); drawTexturedModalRect(x + 20 * i, y, abilityInfo.textureU + (available ? 16 : 0), abilityInfo.textureV, 16, 16);
// Draw level LEDs // Draw level LEDs
if (abilityInfo.ability.levels() > 1) { if(abilityInfo.ability.levels() > 1) {
int level = 0; int level = 0;
if (selected) { if(selected) {
level = selectedLevel + 1; level = selectedLevel + 1;
} }
@ -200,7 +197,7 @@ public class GUIScreenToolAbility extends GuiScreen {
// int maxLevel = Math.min(abilityInfo.ability.levels(), 5); // int maxLevel = Math.min(abilityInfo.ability.levels(), 5);
int maxLevel = 5; int maxLevel = 5;
if (level > 10 || level < 0) { if(level > 10 || level < 0) {
// All-red LEDs for invalid levels // All-red LEDs for invalid levels
level = -1; level = -1;
} }
@ -210,14 +207,14 @@ public class GUIScreenToolAbility extends GuiScreen {
boolean isHovered = isInAABB(mouseX, mouseY, x + 20 * i, y, 16, 16); boolean isHovered = isInAABB(mouseX, mouseY, x + 20 * i, y, 16, 16);
if (isHovered) { if(isHovered) {
hoverIdx = i; hoverIdx = i;
} }
if (selected) { if(selected) {
// Draw selection highlight // Draw selection highlight
drawTexturedModalRect(x + 20 * i - 1, y - 1, 220, 9, 18, 18); drawTexturedModalRect(x + 20 * i - 1, y - 1, 220, 9, 18, 18);
} else if (available && isHovered) { } else if(available && isHovered) {
// Draw hover highlight // Draw hover highlight
drawTexturedModalRect(x + 20 * i - 1, y - 1, 238, 9, 18, 18); drawTexturedModalRect(x + 20 * i - 1, y - 1, 238, 9, 18, 18);
} }
@ -241,30 +238,18 @@ public class GUIScreenToolAbility extends GuiScreen {
} }
private boolean abilityAvailable(IBaseAbility ability) { private boolean abilityAvailable(IBaseAbility ability) {
if (!availableAbilities.supportsAbility(ability)) { if(!availableAbilities.supportsAbility(ability)) {
return false; return false;
} }
ToolPreset activePreset = config.getActivePreset(); ToolPreset activePreset = config.getActivePreset();
if (ability instanceof IToolHarvestAbility && ability != IToolHarvestAbility.NONE && !activePreset.areaAbility.allowsHarvest(activePreset.areaAbilityLevel)) { if(ability instanceof IToolHarvestAbility && ability != IToolHarvestAbility.NONE && !activePreset.areaAbility.allowsHarvest(activePreset.areaAbilityLevel)) {
return false; return false;
} }
return true; return true;
} }
// Note: This spuriously trigger way too often, and I can't see why. I'll disable it altogether, I guess
// @Override
// public void updateScreen() {
// EntityPlayer player = this.mc.thePlayer;
//
// if(player.getHeldItem() == null || player.getHeldItem().getItem() != toolStack.getItem()) {
// // TODO: Remove
// MainRegistry.logger.warn("GUIScreenToolAbility.updateScreen: toolStack changed!");
// player.closeScreen();
// }
// }
@Override @Override
public void handleMouseInput() { public void handleMouseInput() {
super.handleMouseInput(); super.handleMouseInput();
@ -285,21 +270,21 @@ public class GUIScreenToolAbility extends GuiScreen {
Pair<IBaseAbility, Integer> clickResult; Pair<IBaseAbility, Integer> clickResult;
clickResult = handleSwitchesClicked(abilitiesArea, activePreset.areaAbility, activePreset.areaAbilityLevel, hoverIdxArea, mouseX, mouseY); clickResult = handleSwitchesClicked(abilitiesArea, activePreset.areaAbility, activePreset.areaAbilityLevel, hoverIdxArea, mouseX, mouseY);
activePreset.areaAbility = (IToolAreaAbility)clickResult.key; activePreset.areaAbility = (IToolAreaAbility) clickResult.key;
activePreset.areaAbilityLevel = clickResult.value; activePreset.areaAbilityLevel = clickResult.value;
clickResult = handleSwitchesClicked(abilitiesHarvest, activePreset.harvestAbility, activePreset.harvestAbilityLevel, hoverIdxHarvest, mouseX, mouseY); clickResult = handleSwitchesClicked(abilitiesHarvest, activePreset.harvestAbility, activePreset.harvestAbilityLevel, hoverIdxHarvest, mouseX, mouseY);
activePreset.harvestAbility = (IToolHarvestAbility)clickResult.key; activePreset.harvestAbility = (IToolHarvestAbility) clickResult.key;
activePreset.harvestAbilityLevel = clickResult.value; activePreset.harvestAbilityLevel = clickResult.value;
if (!activePreset.areaAbility.allowsHarvest(activePreset.areaAbilityLevel)) { if(!activePreset.areaAbility.allowsHarvest(activePreset.areaAbilityLevel)) {
activePreset.harvestAbility = IToolHarvestAbility.NONE; activePreset.harvestAbility = IToolHarvestAbility.NONE;
activePreset.harvestAbilityLevel = 0; activePreset.harvestAbilityLevel = 0;
} }
// Process extra buttons // Process extra buttons
if (hoverIdxExtraBtn != -1) { if(hoverIdxExtraBtn != -1) {
switch (hoverIdxExtraBtn) { switch(hoverIdxExtraBtn) {
case 0: doResetPresets(); break; case 0: doResetPresets(); break;
case 1: doDelPreset(); break; case 1: doDelPreset(); break;
case 2: doAddPreset(); break; case 2: doAddPreset(); break;
@ -313,25 +298,24 @@ public class GUIScreenToolAbility extends GuiScreen {
} }
// Allow quick-closing // Allow quick-closing
if (!isInAABB(mouseX, mouseY, guiLeft, guiTop, xSize, ySize)) { if(!isInAABB(mouseX, mouseY, guiLeft, guiTop, xSize, ySize)) {
MainRegistry.logger.info("GUIScreenToolAbility.mouseClicked: Clicked outside GUI, closing...");
doClose(); doClose();
} }
} }
protected Pair<IBaseAbility, Integer> handleSwitchesClicked(List<AbilityInfo> abilities, IBaseAbility selectedAbility, int selectedLevel, int hoverIdx, int mouseX, int mouseY) { protected Pair<IBaseAbility, Integer> handleSwitchesClicked(List<AbilityInfo> abilities, IBaseAbility selectedAbility, int selectedLevel, int hoverIdx, int mouseX, int mouseY) {
if (hoverIdx != -1) { if(hoverIdx != -1) {
IBaseAbility hoveredAbility = abilities.get(hoverIdx).ability; IBaseAbility hoveredAbility = abilities.get(hoverIdx).ability;
boolean available = abilityAvailable(hoveredAbility); boolean available = abilityAvailable(hoveredAbility);
if (available) { if(available) {
int availableLevels = availableAbilities.maxLevel(hoveredAbility) + 1; int availableLevels = availableAbilities.maxLevel(hoveredAbility) + 1;
if (hoveredAbility != selectedAbility || availableLevels > 1) { if(hoveredAbility != selectedAbility || availableLevels > 1) {
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("hbm:item.techBoop"), 2F)); mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("hbm:item.techBoop"), 2F));
} }
if (hoveredAbility == selectedAbility) { if(hoveredAbility == selectedAbility) {
selectedLevel = (selectedLevel + 1) % availableLevels; selectedLevel = (selectedLevel + 1) % availableLevels;
} else { } else {
selectedLevel = 0; selectedLevel = 0;
@ -364,7 +348,7 @@ public class GUIScreenToolAbility extends GuiScreen {
} }
protected void doDelPreset() { protected void doDelPreset() {
if (config.presets.size() <= 1) { if(config.presets.size() <= 1) {
return; return;
} }
config.presets.remove(config.currentPreset); config.presets.remove(config.currentPreset);
@ -372,7 +356,7 @@ public class GUIScreenToolAbility extends GuiScreen {
} }
protected void doAddPreset() { protected void doAddPreset() {
if (config.presets.size() >= 99) { if(config.presets.size() >= 99) {
return; return;
} }
@ -385,8 +369,8 @@ public class GUIScreenToolAbility extends GuiScreen {
} }
protected void doNextPreset(boolean bound) { protected void doNextPreset(boolean bound) {
if (bound) { if(bound) {
if (config.currentPreset < config.presets.size() - 1) { if(config.currentPreset < config.presets.size() - 1) {
config.currentPreset += 1; config.currentPreset += 1;
} }
} else { } else {
@ -395,8 +379,8 @@ public class GUIScreenToolAbility extends GuiScreen {
} }
protected void doPrevPreset(boolean bound) { protected void doPrevPreset(boolean bound) {
if (bound) { if(bound) {
if (config.currentPreset > 0) { if(config.currentPreset > 0) {
config.currentPreset -= 1; config.currentPreset -= 1;
} }
} else { } else {

View File

@ -39,7 +39,7 @@ public class ItemGuideBook extends Item implements IGUIProvider {
public void getSubItems(Item item, CreativeTabs tab, List list) { public void getSubItems(Item item, CreativeTabs tab, List list) {
for(int i = 1; i < BookType.values().length; i++) for(int i = 1; i < BookType.values().length; i++)
list.add(new ItemStack(item, 1, i)); if(i != 2) list.add(new ItemStack(item, 1, i));
} }
@Override @Override

View File

@ -24,11 +24,9 @@ import com.hbm.handler.ability.ToolPreset;
import com.hbm.main.MainRegistry; import com.hbm.main.MainRegistry;
import com.hbm.packet.PacketDispatcher; import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toclient.PlayerInformPacket; import com.hbm.packet.toclient.PlayerInformPacket;
import com.hbm.packet.toserver.NBTItemControlPacket;
import com.hbm.tileentity.IGUIProvider; import com.hbm.tileentity.IGUIProvider;
import api.hbm.item.IDepthRockTool; import api.hbm.item.IDepthRockTool;
import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block; import net.minecraft.block.Block;

View File

@ -929,7 +929,6 @@ public class CraftingManager {
addShapelessAuto(new ItemStack(ModItems.book_guide, 1, BookType.TEST.ordinal()), new Object[] { Items.book, ModItems.canned_conserve.stackFromEnum(EnumFoodType.JIZZ) }); addShapelessAuto(new ItemStack(ModItems.book_guide, 1, BookType.TEST.ordinal()), new Object[] { Items.book, ModItems.canned_conserve.stackFromEnum(EnumFoodType.JIZZ) });
addShapelessAuto(new ItemStack(ModItems.book_guide, 1, BookType.RBMK.ordinal()), new Object[] { Items.book, Items.potato }); addShapelessAuto(new ItemStack(ModItems.book_guide, 1, BookType.RBMK.ordinal()), new Object[] { Items.book, Items.potato });
addShapelessAuto(new ItemStack(ModItems.book_guide, 1, BookType.HADRON.ordinal()), new Object[] { Items.book, ModItems.fuse });
addShapelessAuto(new ItemStack(ModItems.book_guide, 1, BookType.STARTER.ordinal()), new Object[] { Items.book, Items.iron_ingot }); addShapelessAuto(new ItemStack(ModItems.book_guide, 1, BookType.STARTER.ordinal()), new Object[] { Items.book, Items.iron_ingot });
addRecipeAuto(new ItemStack(ModBlocks.charger), new Object[] { "G", "S", "C", 'G', Items.glowstone_dust, 'S', STEEL.ingot(), 'C', ModItems.coil_copper }); addRecipeAuto(new ItemStack(ModBlocks.charger), new Object[] { "G", "S", "C", 'G', Items.glowstone_dust, 'S', STEEL.ingot(), 'C', ModItems.coil_copper });

Binary file not shown.

Before

Width:  |  Height:  |  Size: 307 B

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 334 B

After

Width:  |  Height:  |  Size: 308 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 324 B

After

Width:  |  Height:  |  Size: 307 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 203 B

After

Width:  |  Height:  |  Size: 264 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 261 B

After

Width:  |  Height:  |  Size: 353 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 289 B

After

Width:  |  Height:  |  Size: 417 B