the rim flappe on a bongfish
16
changelog
@ -1,12 +1,10 @@
|
||||
## Changed
|
||||
* Updated chinese localiation
|
||||
* Duds now have a radioactive AoE effect around them based on type
|
||||
* HPS is no longer tagged as radioactive and no longer requires hazardous materials tanks to store
|
||||
* Somehow, these meaningless tags triggered people exceptionally hard. Go annoy someone else.
|
||||
* Solderers and arc welders can now use overdrive upgrades
|
||||
* Do note that processing speed rises linearly, but power draw rises exponentially
|
||||
* The RBMK console's grid can now be rotated using a screwdriver
|
||||
* Tool abilities have changed
|
||||
* Righ-clicking while holding ALT now opens a configuration window
|
||||
* The configuration window allows creation of tool presets
|
||||
* Area and block abilities can now be toggled independently from each other. For example, the vein miner ability can be combined with silk touch
|
||||
* Clicking on the same ability allows switching between levels
|
||||
* Updated textures for the armor and gun modification tables
|
||||
|
||||
## Fixed
|
||||
* Crates? Maybe?
|
||||
* Fixed conveyor placer not being usable on the conveyor sorter
|
||||
* Fixed crucible trying to autogen recipes for nonexistant nether thorium ore
|
||||
@ -16,14 +16,11 @@ import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.toserver.NBTItemControlPacket;
|
||||
import com.hbm.util.EnumUtil;
|
||||
import com.hbm.util.I18nUtil;
|
||||
import com.hbm.util.Tuple.Pair;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
@ -124,8 +121,8 @@ public class GUIScreenToolAbility extends GuiScreen {
|
||||
int extraBtnsX = guiLeft + xSize - 86;
|
||||
|
||||
hoverIdxExtraBtn = -1;
|
||||
for (int i = 0; i < 7; ++i) {
|
||||
if (isInAABB(mouseX, mouseY, extraBtnsX + i * 11, guiTop + 11, 9, 9)) {
|
||||
for(int i = 0; i < 7; ++i) {
|
||||
if(isInAABB(mouseX, mouseY, extraBtnsX + i * 11, guiTop + 11, 9, 9)) {
|
||||
hoverIdxExtraBtn = i;
|
||||
drawTexturedModalRect(extraBtnsX + i * 11, guiTop + 11, 193 + i * 9, 0, 9, 9);
|
||||
}
|
||||
@ -134,20 +131,20 @@ public class GUIScreenToolAbility extends GuiScreen {
|
||||
// Draw tooltip
|
||||
String tooltipValue = "";
|
||||
|
||||
if (hoverIdxArea != -1) {
|
||||
if(hoverIdxArea != -1) {
|
||||
int level = 0;
|
||||
if (abilitiesArea.get(hoverIdxArea).ability == activePreset.areaAbility) {
|
||||
if(abilitiesArea.get(hoverIdxArea).ability == activePreset.areaAbility) {
|
||||
level = activePreset.areaAbilityLevel;
|
||||
}
|
||||
tooltipValue = abilitiesArea.get(hoverIdxArea).ability.getFullName(level);
|
||||
} else if (hoverIdxHarvest != -1) {
|
||||
} else if(hoverIdxHarvest != -1) {
|
||||
int level = 0;
|
||||
if (abilitiesHarvest.get(hoverIdxHarvest).ability == activePreset.harvestAbility) {
|
||||
if(abilitiesHarvest.get(hoverIdxHarvest).ability == activePreset.harvestAbility) {
|
||||
level = activePreset.harvestAbilityLevel;
|
||||
}
|
||||
tooltipValue = abilitiesHarvest.get(hoverIdxHarvest).ability.getFullName(level);
|
||||
} else if (hoverIdxExtraBtn != -1) {
|
||||
switch (hoverIdxExtraBtn) {
|
||||
} else if(hoverIdxExtraBtn != -1) {
|
||||
switch(hoverIdxExtraBtn) {
|
||||
case 0: tooltipValue = "Reset all presets"; break;
|
||||
case 1: tooltipValue = "Delete current 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 tooltipX = guiLeft + xSize / 2 - tooltipWidth / 2;
|
||||
int tooltipY = guiTop + ySize + 1 + 4;
|
||||
@ -171,7 +168,7 @@ public class GUIScreenToolAbility extends GuiScreen {
|
||||
int midWidth = width - keepLeft - keepRight;
|
||||
int realMidWidth = realWidth - keepLeft - keepRight;
|
||||
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 + 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) {
|
||||
int hoverIdx = -1;
|
||||
|
||||
for (int i = 0; i < abilities.size(); ++i) {
|
||||
for(int i = 0; i < abilities.size(); ++i) {
|
||||
AbilityInfo abilityInfo = abilities.get(i);
|
||||
boolean available = abilityAvailable(abilityInfo.ability);
|
||||
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);
|
||||
|
||||
// Draw level LEDs
|
||||
if (abilityInfo.ability.levels() > 1) {
|
||||
if(abilityInfo.ability.levels() > 1) {
|
||||
int level = 0;
|
||||
|
||||
if (selected) {
|
||||
if(selected) {
|
||||
level = selectedLevel + 1;
|
||||
}
|
||||
|
||||
@ -200,7 +197,7 @@ public class GUIScreenToolAbility extends GuiScreen {
|
||||
// int maxLevel = Math.min(abilityInfo.ability.levels(), 5);
|
||||
int maxLevel = 5;
|
||||
|
||||
if (level > 10 || level < 0) {
|
||||
if(level > 10 || level < 0) {
|
||||
// All-red LEDs for invalid levels
|
||||
level = -1;
|
||||
}
|
||||
@ -210,14 +207,14 @@ public class GUIScreenToolAbility extends GuiScreen {
|
||||
|
||||
boolean isHovered = isInAABB(mouseX, mouseY, x + 20 * i, y, 16, 16);
|
||||
|
||||
if (isHovered) {
|
||||
if(isHovered) {
|
||||
hoverIdx = i;
|
||||
}
|
||||
|
||||
if (selected) {
|
||||
if(selected) {
|
||||
// Draw selection highlight
|
||||
drawTexturedModalRect(x + 20 * i - 1, y - 1, 220, 9, 18, 18);
|
||||
} else if (available && isHovered) {
|
||||
} else if(available && isHovered) {
|
||||
// Draw hover highlight
|
||||
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) {
|
||||
if (!availableAbilities.supportsAbility(ability)) {
|
||||
if(!availableAbilities.supportsAbility(ability)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
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 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
|
||||
public void handleMouseInput() {
|
||||
super.handleMouseInput();
|
||||
@ -285,21 +270,21 @@ public class GUIScreenToolAbility extends GuiScreen {
|
||||
Pair<IBaseAbility, Integer> clickResult;
|
||||
|
||||
clickResult = handleSwitchesClicked(abilitiesArea, activePreset.areaAbility, activePreset.areaAbilityLevel, hoverIdxArea, mouseX, mouseY);
|
||||
activePreset.areaAbility = (IToolAreaAbility)clickResult.key;
|
||||
activePreset.areaAbility = (IToolAreaAbility) clickResult.key;
|
||||
activePreset.areaAbilityLevel = clickResult.value;
|
||||
|
||||
clickResult = handleSwitchesClicked(abilitiesHarvest, activePreset.harvestAbility, activePreset.harvestAbilityLevel, hoverIdxHarvest, mouseX, mouseY);
|
||||
activePreset.harvestAbility = (IToolHarvestAbility)clickResult.key;
|
||||
activePreset.harvestAbility = (IToolHarvestAbility) clickResult.key;
|
||||
activePreset.harvestAbilityLevel = clickResult.value;
|
||||
|
||||
if (!activePreset.areaAbility.allowsHarvest(activePreset.areaAbilityLevel)) {
|
||||
if(!activePreset.areaAbility.allowsHarvest(activePreset.areaAbilityLevel)) {
|
||||
activePreset.harvestAbility = IToolHarvestAbility.NONE;
|
||||
activePreset.harvestAbilityLevel = 0;
|
||||
}
|
||||
|
||||
// Process extra buttons
|
||||
if (hoverIdxExtraBtn != -1) {
|
||||
switch (hoverIdxExtraBtn) {
|
||||
if(hoverIdxExtraBtn != -1) {
|
||||
switch(hoverIdxExtraBtn) {
|
||||
case 0: doResetPresets(); break;
|
||||
case 1: doDelPreset(); break;
|
||||
case 2: doAddPreset(); break;
|
||||
@ -313,25 +298,24 @@ public class GUIScreenToolAbility extends GuiScreen {
|
||||
}
|
||||
|
||||
// Allow quick-closing
|
||||
if (!isInAABB(mouseX, mouseY, guiLeft, guiTop, xSize, ySize)) {
|
||||
MainRegistry.logger.info("GUIScreenToolAbility.mouseClicked: Clicked outside GUI, closing...");
|
||||
if(!isInAABB(mouseX, mouseY, guiLeft, guiTop, xSize, ySize)) {
|
||||
doClose();
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
boolean available = abilityAvailable(hoveredAbility);
|
||||
|
||||
if (available) {
|
||||
if(available) {
|
||||
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));
|
||||
}
|
||||
|
||||
if (hoveredAbility == selectedAbility) {
|
||||
if(hoveredAbility == selectedAbility) {
|
||||
selectedLevel = (selectedLevel + 1) % availableLevels;
|
||||
} else {
|
||||
selectedLevel = 0;
|
||||
@ -364,7 +348,7 @@ public class GUIScreenToolAbility extends GuiScreen {
|
||||
}
|
||||
|
||||
protected void doDelPreset() {
|
||||
if (config.presets.size() <= 1) {
|
||||
if(config.presets.size() <= 1) {
|
||||
return;
|
||||
}
|
||||
config.presets.remove(config.currentPreset);
|
||||
@ -372,7 +356,7 @@ public class GUIScreenToolAbility extends GuiScreen {
|
||||
}
|
||||
|
||||
protected void doAddPreset() {
|
||||
if (config.presets.size() >= 99) {
|
||||
if(config.presets.size() >= 99) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -385,8 +369,8 @@ public class GUIScreenToolAbility extends GuiScreen {
|
||||
}
|
||||
|
||||
protected void doNextPreset(boolean bound) {
|
||||
if (bound) {
|
||||
if (config.currentPreset < config.presets.size() - 1) {
|
||||
if(bound) {
|
||||
if(config.currentPreset < config.presets.size() - 1) {
|
||||
config.currentPreset += 1;
|
||||
}
|
||||
} else {
|
||||
@ -395,8 +379,8 @@ public class GUIScreenToolAbility extends GuiScreen {
|
||||
}
|
||||
|
||||
protected void doPrevPreset(boolean bound) {
|
||||
if (bound) {
|
||||
if (config.currentPreset > 0) {
|
||||
if(bound) {
|
||||
if(config.currentPreset > 0) {
|
||||
config.currentPreset -= 1;
|
||||
}
|
||||
} else {
|
||||
|
||||
@ -39,7 +39,7 @@ public class ItemGuideBook extends Item implements IGUIProvider {
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||
|
||||
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
|
||||
|
||||
@ -24,11 +24,9 @@ import com.hbm.handler.ability.ToolPreset;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.toclient.PlayerInformPacket;
|
||||
import com.hbm.packet.toserver.NBTItemControlPacket;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
|
||||
import api.hbm.item.IDepthRockTool;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
@ -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.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 });
|
||||
|
||||
addRecipeAuto(new ItemStack(ModBlocks.charger), new Object[] { "G", "S", "C", 'G', Items.glowstone_dust, 'S', STEEL.ingot(), 'C', ModItems.coil_copper });
|
||||
|
||||
|
Before Width: | Height: | Size: 307 B After Width: | Height: | Size: 238 B |
|
Before Width: | Height: | Size: 334 B After Width: | Height: | Size: 308 B |
|
Before Width: | Height: | Size: 324 B After Width: | Height: | Size: 307 B |
|
Before Width: | Height: | Size: 203 B After Width: | Height: | Size: 264 B |
|
Before Width: | Height: | Size: 261 B After Width: | Height: | Size: 353 B |
|
Before Width: | Height: | Size: 289 B After Width: | Height: | Size: 417 B |