Merge branch '1.12' into combiner

This commit is contained in:
Aidan authored and GitHub committed 2017-10-09 14:14:34 -04:00
commit d96eb27572
22 files changed
+69 -36

No files matched your search

@@ -177,7 +177,9 @@ public class MekanismJEI implements IModPlugin
ElectrolyticSeparatorRecipeCategory electrolyticSeparatorCategory = new ElectrolyticSeparatorRecipeCategory(registry.getJeiHelpers().getGuiHelper());
MetallurgicInfuserRecipeCategory metallurgicInfuserCategory = new MetallurgicInfuserRecipeCategory(registry.getJeiHelpers().getGuiHelper());
PRCRecipeCategory prcCategory = new PRCRecipeCategory(registry.getJeiHelpers().getGuiHelper());
RotaryCondensentratorRecipeCategory rotaryCondensentratorCategory = new RotaryCondensentratorRecipeCategory(registry.getJeiHelpers().getGuiHelper());
RotaryCondensentratorRecipeCategory rotaryCondensentratorCondensentratingCategory = new RotaryCondensentratorRecipeCategory(registry.getJeiHelpers().getGuiHelper(), true);
RotaryCondensentratorRecipeCategory rotaryCondensentratorDecondensentratingCategory = new RotaryCondensentratorRecipeCategory(registry.getJeiHelpers().getGuiHelper(), false);
SolarNeutronRecipeCategory solarNeutronCategory = new SolarNeutronRecipeCategory(registry.getJeiHelpers().getGuiHelper());
ThermalEvaporationRecipeCategory thermalEvaporationCategory = new ThermalEvaporationRecipeCategory(registry.getJeiHelpers().getGuiHelper());
@@ -260,16 +262,18 @@ public class MekanismJEI implements IModPlugin
addRecipes(registry, Recipe.PRESSURIZED_REACTION_CHAMBER, PressurizedRecipe.class, PRCRecipeWrapper.class, "mekanism.pressurized_reaction_chamber");
List<RotaryCondensentratorRecipeWrapper> condensentratorRecipes = new ArrayList<>();
List<RotaryCondensentratorRecipeWrapper> decondensentratorRecipes = new ArrayList<>();
for(Gas gas : GasRegistry.getRegisteredGasses())
{
if(gas.hasFluid())
{
condensentratorRecipes.add(new RotaryCondensentratorRecipeWrapper(gas.getFluid(), gas, true));
condensentratorRecipes.add(new RotaryCondensentratorRecipeWrapper(gas.getFluid(), gas, false));
decondensentratorRecipes.add(new RotaryCondensentratorRecipeWrapper(gas.getFluid(), gas, false));
}
}
registry.addRecipes(condensentratorRecipes, "mekanism.rotary_condensentrator");
registry.addRecipes(condensentratorRecipes, "mekanism.rotary_condensentrator_condensentrating");
registry.addRecipes(decondensentratorRecipes, "mekanism.rotary_condensentrator_decondensentrating");
registry.addRecipeClickArea(GuiEnrichmentChamber.class, 79, 40, 24, 7, "mekanism.enrichment_chamber");
registry.addRecipeClickArea(GuiCrusher.class, 79, 40, 24, 7, "mekanism.crusher");
@@ -289,7 +293,7 @@ public class MekanismJEI implements IModPlugin
registry.addRecipeClickArea(GuiElectrolyticSeparator.class, 80, 30, 16, 6, "mekanism.electrolytic_separator");
registry.addRecipeClickArea(GuiThermalEvaporationController.class, 49, 20, 78, 38, "mekanism.thermal_evaporation_plant");
registry.addRecipeClickArea(GuiPRC.class, 75, 37, 36, 10, "mekanism.pressurized_reaction_chamber");
registry.addRecipeClickArea(GuiRotaryCondensentrator.class, 64, 39, 48, 8, "mekanism.rotary_condensentrator");
registry.addRecipeClickArea(GuiRotaryCondensentrator.class, 64, 39, 48, 8, "mekanism.rotary_condensentrator_condensentrating", "mekanism.rotary_condensentrator_decondensentrating");
registerRecipeItem(registry, MachineType.ENRICHMENT_CHAMBER);
registerRecipeItem(registry, MachineType.CRUSHER);
@@ -307,7 +311,7 @@ public class MekanismJEI implements IModPlugin
registerRecipeItem(registry, MachineType.SOLAR_NEUTRON_ACTIVATOR);
registerRecipeItem(registry, MachineType.ELECTROLYTIC_SEPARATOR);
registerRecipeItem(registry, MachineType.PRESSURIZED_REACTION_CHAMBER);
registerRecipeItem(registry, MachineType.ROTARY_CONDENSENTRATOR);
registry.addRecipeCatalyst(MachineType.ROTARY_CONDENSENTRATOR.getStack(), "mekanism.rotary_condensentrator_condensentrating", "mekanism.rotary_condensentrator_decondensentrating");
registry.addRecipeCatalyst(BasicBlockType.THERMAL_EVAPORATION_CONTROLLER.getStack(1), "mekanism.thermal_evaporation_plant");
registry.addRecipeCatalyst(MachineType.FORMULAIC_ASSEMBLICATOR.getStack(), VanillaRecipeCategoryUid.CRAFTING);
@@ -18,18 +18,25 @@ import javax.annotation.Nullable;
public class RotaryCondensentratorRecipeCategory extends BaseRecipeCategory
{
private final IDrawable background;
private final boolean condensentrating;
@Nullable
private RotaryCondensentratorRecipeWrapper tempRecipe;
public RotaryCondensentratorRecipeCategory(IGuiHelper helper)
public RotaryCondensentratorRecipeCategory(IGuiHelper helper, boolean condensentrating)
{
super(helper, "mekanism:gui/nei/GuiRotaryCondensentrator.png", "rotary_condensentrator", "nei.rotaryCondensentrator", null);
super(helper,
"mekanism:gui/nei/GuiRotaryCondensentrator.png",
condensentrating ? "rotary_condensentrator_condensentrating" : "rotary_condensentrator_decondensentrating",
condensentrating ? "gui.condensentrating" : "gui.decondensentrating",
null);
xOffset = 3;
yOffset = 12;
background = guiHelper.createDrawable(new ResourceLocation(guiTexture), xOffset, yOffset, 170, 71);
this.condensentrating = condensentrating;
}
@Override
@@ -42,7 +49,7 @@ public class RotaryCondensentratorRecipeCategory extends BaseRecipeCategory
return;
}
if(tempRecipe.condensentrating)
if(condensentrating)
{
drawTexturedRect(64-xOffset, 39-yOffset, 176, 123, 48, 8);
}
@@ -40,6 +40,8 @@ import net.minecraftforge.common.property.IUnlistedProperty;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import javax.annotation.Nullable;
public class BlockStateBasic extends ExtendedBlockState
{
public static final PropertyBool activeProperty = PropertyBool.create("active");
@@ -134,6 +136,7 @@ public class BlockStateBasic extends ExtendedBlockState
isBeaconBase = beaconBase;
}
@Nullable
public static BasicBlockType get(IBlockState state)
{
if(state.getBlock() instanceof BlockBasic)
@@ -144,11 +147,13 @@ public class BlockStateBasic extends ExtendedBlockState
return null;
}
@Nullable
public static BasicBlockType get(ItemStack stack)
{
return get(Block.getBlockFromItem(stack.getItem()), stack.getItemDamage());
}
@Nullable
public static BasicBlockType get(Block block, int meta)
{
if(block instanceof BlockBasic)
@@ -159,13 +164,18 @@ public class BlockStateBasic extends ExtendedBlockState
return null;
}
@Nullable
public static BasicBlockType get(BasicBlock blockType, int metadata)
{
BasicBlockType firstTry = values()[blockType.ordinal() << 4 | metadata];
if(firstTry.blockType == blockType && firstTry.meta == metadata)
int index = blockType.ordinal() << 4 | metadata;
if (index < values().length)
{
return firstTry;
BasicBlockType firstTry = values()[index];
if(firstTry.blockType == blockType && firstTry.meta == metadata)
{
return firstTry;
}
}
for(BasicBlockType type : values())
@@ -175,6 +185,8 @@ public class BlockStateBasic extends ExtendedBlockState
return type;
}
}
Mekanism.logger.error("Invalid BasicBlock. type: {}, meta: {}", blockType.ordinal(), metadata);
return null;
}
@@ -87,7 +87,7 @@ public abstract class Finder
@Override
public boolean modifies(ItemStack stack)
{
return StackUtils.equalsWildcard(itemType, stack);
return itemType.getHasSubtypes() ? StackUtils.equalsWildcard(itemType, stack) : itemType.getItem() == stack.getItem();
}
}
@@ -287,13 +287,13 @@ public class EntityRobit extends EntityCreature implements IInventory, ISustaine
private void collectItems()
{
List<EntityItem> items = world.getEntitiesWithinAABB(EntityItem.class, getEntityBoundingBox().expand(1.5, 1.5, 1.5));
List<EntityItem> items = world.getEntitiesWithinAABB(EntityItem.class, getEntityBoundingBox().grow(1.5, 1.5, 1.5));
if(items != null && !items.isEmpty())
{
for(EntityItem item : items)
{
if(item.cannotPickup() || item.getItem().getItem() instanceof ItemRobit)
if(item.cannotPickup() || item.getItem().getItem() instanceof ItemRobit || item.isDead)
{
continue;
}
@@ -89,7 +89,7 @@ public class ItemBlockBasic extends ItemBlock implements IEnergizedItem, ITierIt
{
if(BasicBlockType.get(stack) == BasicBlockType.BIN)
{
return new InventoryBin(stack).getItemCount() == 0 ? super.getItemStackLimit(stack) : 1;
return 1; // Temporary no stacking due to #
}
return super.getItemStackLimit(stack);
@@ -145,7 +145,7 @@ public class ItemBlockBasic extends ItemBlock implements IEnergizedItem, ITierIt
{
BasicBlockType type = BasicBlockType.get(itemstack);
if(type.hasDescription)
if(type != null && type.hasDescription)
{
if(!MekKeyHandler.getIsKeyPressed(MekanismKeyHandler.sneakKey))
{
@@ -290,7 +290,7 @@ public class ItemBlockBasic extends ItemBlock implements IEnergizedItem, ITierIt
if(type != null)
{
String name = getUnlocalizedName() + "." + BasicBlockType.get(itemstack).name;
String name = getUnlocalizedName() + "." + type.name;
if(type == BasicBlockType.BIN || type == BasicBlockType.INDUCTION_CELL || type == BasicBlockType.INDUCTION_PROVIDER)
{
@@ -300,7 +300,7 @@ public class ItemBlockBasic extends ItemBlock implements IEnergizedItem, ITierIt
return name;
}
return "null";
return "Invalid Basic Block";
}
@Override
@@ -2,9 +2,13 @@ package mekanism.common.item;
import mekanism.api.Chunk3D;
import mekanism.api.EnumColor;
import mekanism.client.MekKeyHandler;
import mekanism.client.MekanismKeyHandler;
import mekanism.common.Mekanism;
import mekanism.common.util.LangUtils;
import mekanism.common.util.MekanismUtils;
import net.minecraft.client.settings.GameSettings;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ActionResult;
@@ -13,6 +17,8 @@ import net.minecraft.util.EnumHand;
import net.minecraft.util.text.TextComponentString;
import net.minecraft.world.World;
import java.util.List;
public class ItemSeismicReader extends ItemEnergized
{
public static final double ENERGY_USAGE = 250;
@@ -27,7 +33,25 @@ public class ItemSeismicReader extends ItemEnergized
{
return false;
}
@Override
public void addInformation(ItemStack itemstack, World world, List<String> list, ITooltipFlag flag)
{
if(!MekKeyHandler.getIsKeyPressed(MekanismKeyHandler.sneakKey))
{
list.add(LangUtils.localize("tooltip.hold") + " " + EnumColor.INDIGO + GameSettings.getKeyDisplayString(MekanismKeyHandler.sneakKey.getKeyCode()) + EnumColor.GREY + " " + LangUtils.localize("tooltip.forDetails") + ".");
list.add(LangUtils.localize("tooltip.hold") + " " + EnumColor.AQUA + GameSettings.getKeyDisplayString(MekanismKeyHandler.sneakKey.getKeyCode()) + EnumColor.GREY + " " + LangUtils.localize("tooltip.and") + " " + EnumColor.AQUA + GameSettings.getKeyDisplayString(MekanismKeyHandler.modeSwitchKey.getKeyCode()) + EnumColor.GREY + " " + LangUtils.localize("tooltip.forDesc") + ".");
}
else if(!MekKeyHandler.getIsKeyPressed(MekanismKeyHandler.modeSwitchKey))
{
super.addInformation(itemstack, world, list, flag);
}
else
{
list.addAll(MekanismUtils.splitTooltip(LangUtils.localize("tooltip.mekanism.SeismicReader"), itemstack));
}
}
@Override
public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer entityplayer, EnumHand hand)
{
@@ -940,7 +940,6 @@ itemGroup.tabMekanism=Mekanism
//NEI stuff
nei.chemicalInjectionChamber=Ch. Vstřikovací Komora
nei.rotaryCondensentrator=R. Kondenzátor
//**********//
//GENERATORS//
@@ -933,7 +933,6 @@ itemGroup.tabMekanism=Mekanism
//NEI stuff
nei.chemicalInjectionChamber=K. Injektionskammer
nei.rotaryCondensentrator=R. Condensentrator
//**********//
//GENERATORS//
@@ -939,7 +939,6 @@ itemGroup.tabMekanism=Mekanism
//NEI stuff
nei.chemicalInjectionChamber=C. Injektionskammer
nei.rotaryCondensentrator=R.-Kondensentrator
//**********//
//GENERATORS//
@@ -804,6 +804,7 @@ tooltip.flamethrower.modeBump=Flamethrower mode bumped to
tooltip.seismicReader.needsEnergy=Not enough energy to interpret vibration
tooltip.seismicReader.noVibrations=Unable to discover any vibrations
tooltip.mekanism.SeismicReader=A portable machine that uses seismic vibrations to provide information on differing layers of the world.
tooltip.Bin=A block used to store large quantities of a single type of item.
tooltip.TeleporterFrame=The frame used to construct the Teleporter multiblock, allowing a portal to be generated within the structure.
@@ -971,7 +972,6 @@ itemGroup.tabMekanism=Mekanism
//NEI stuff
nei.chemicalInjectionChamber=C. Injection Chamber
nei.rotaryCondensentrator=R. Condensentrator
//**********//
//GENERATORS//
@@ -933,7 +933,6 @@ itemGroup.tabMekanism=Mekanism
//NEI stuff
nei.chemicalInjectionChamber=Chambre d'injection C.
nei.rotaryCondensentrator=Condensateur R.
//**********//
//GENERATORS//
@@ -818,7 +818,6 @@ itemGroup.tabMekanism=Mekanism
//NEI stuff -maybe will be added-
//nei.chemicalInjectionChamber=C. Injection Chamber
//nei.rotaryCondensentrator=R. Condensentrator
//**********//
//GENERATORS//
@@ -940,7 +940,6 @@ itemGroup.tabMekanism=Mekanism
//NEI stuff
nei.chemicalInjectionChamber=化学注入室
nei.rotaryCondensentrator=回転式流体凝縮器
//**********//
//GENERATORS//
@@ -618,7 +618,6 @@ itemGroup.tabMekanism=메카니즘[Mekanism]
//NEI stuff
nei.chemicalInjectionChamber=C. 주입기
nei.rotaryCondensentrator=R. Condensentrator
//**********//
//GENERATORS//
@@ -761,7 +761,6 @@ itemGroup.tabMekanism=Mekanism
//NEI stuff
nei.chemicalInjectionChamber=C. Injeksjons Kammer
nei.rotaryCondensentrator=R. Condensentrator
//**********//
//GENERATORS//
@@ -422,7 +422,6 @@ itemGroup.tabMekanism=Mekanism
//NEI stuff
nei.chemicalInjectionChamber=Komora wtrysku chemicznego
nei.rotaryCondensentrator=Koncentrator obrotowy
//**********//
//GENERATORS//
@@ -940,7 +940,6 @@ itemGroup.tabMekanism=Mekanism
//NEI stuff
nei.chemicalInjectionChamber=Câm. Injeção Quím.
nei.rotaryCondensentrator=Condensentrador Rot.
//**********//
//GENERATORS//
@@ -940,7 +940,6 @@ itemGroup.tabMekanism=Mekanism
//NEI stuff
nei.chemicalInjectionChamber=Câm. Injeção Quím.
nei.rotaryCondensentrator=Condensentrador Rot.
//**********//
//GENERATORS//
@@ -958,7 +958,6 @@ itemGroup.tabMekanism=Mekanism
//NEI stuff
nei.chemicalInjectionChamber=Хим. инъекционная камера
nei.rotaryCondensentrator=Рот. сгуститель
//**********//
//GENERATORS//
@@ -952,7 +952,6 @@ itemGroup.tabMekanism=通用机械
//NEI stuff
nei.chemicalInjectionChamber=化学压射室
nei.rotaryCondensentrator=回旋式气液转换机
//**********//
//GENERATORS//
@@ -763,7 +763,6 @@ itemGroup.tabMekanism=通用機械
//NEI stuff
nei.chemicalInjectionChamber=化學壓射室
nei.rotaryCondensentrator=回旋式氣液轉換機
//**********//
//GENERATORS//