Skip to content

Commit

Permalink
merge conflicts: eternal
Browse files Browse the repository at this point in the history
  • Loading branch information
serenibyss committed Aug 8, 2021
1 parent 54cf8a2 commit 3085115
Show file tree
Hide file tree
Showing 1,240 changed files with 9,659 additions and 9,032 deletions.
3 changes: 1 addition & 2 deletions src/api/java/appeng/api/implementations/items/IAEWrench.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ public interface IAEWrench {
* Check if the wrench can be used.
*
* @param player wrenching player
* @param pos of block.
*
* @param pos of block.
* @return true if wrench can be used
*/
boolean canWrench(ItemStack wrench, EntityPlayer player, BlockPos pos);
Expand Down
3 changes: 3 additions & 0 deletions src/api/java/cofh/api/item/IToolHammer.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
public interface IToolHammer {

boolean isUsable(ItemStack item, EntityLivingBase user, BlockPos pos);

boolean isUsable(ItemStack item, EntityLivingBase user, Entity entity);

void toolUsed(ItemStack item, EntityLivingBase user, BlockPos pos);

void toolUsed(ItemStack item, EntityLivingBase user, Entity entity);
}
6 changes: 2 additions & 4 deletions src/api/java/crazypants/enderio/api/tool/IConduitControl.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ public interface IConduitControl {
/**
* Controls whether the overlay is shown and the player can change the display mode.
*
* @param stack
* The itemstack
* @param player
* The player holding the itemstack
* @param stack The itemstack
* @param player The player holding the itemstack
* @return True if the overlay should be rendered and the player should be able to change modes. False otherwise.
*/
boolean showOverlay(@Nonnull ItemStack stack, @Nonnull EntityPlayer player);
Expand Down
10 changes: 8 additions & 2 deletions src/main/java/gregtech/GregTechMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,15 @@
import gregtech.loaders.dungeon.DungeonLootLoader;
import net.minecraftforge.classloading.FMLForgePlugin;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fml.common.*;
import net.minecraftforge.fml.common.FMLCommonHandler;
import net.minecraftforge.fml.common.LoaderException;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Optional.Method;
import net.minecraftforge.fml.common.event.*;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
import net.minecraftforge.fml.common.registry.GameRegistry;

@Mod(modid = GTValues.MODID,
Expand Down
100 changes: 50 additions & 50 deletions src/main/java/gregtech/api/GTValues.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,33 +65,33 @@ public class GTValues {
/**
* The short names for the voltages
*/
public static final String[] VN = new String[] {"ULV", "LV", "MV", "HV", "EV", "IV", "LuV", "ZPM", "UV", "UHV", "UEV", "UIV", "UMV", "UXV", "MAX"};
public static final String[] VN = new String[]{"ULV", "LV", "MV", "HV", "EV", "IV", "LuV", "ZPM", "UV", "UHV", "UEV", "UIV", "UMV", "UXV", "MAX"};

/**
* Color values for the voltages
*/
public static final int[] VC = new int[] {0xB4B4B4, 0xDCDCDC, 0xFF6400, 0xFFFF1E, 0x808080, 0xF0F0F5, 0xDCDCF5, 0xC8C8F5, 0xB4B4F5, 0xA0A0F5, 0x8C8CF5, 0x7878F5, 0x6464F5, 0x5050F5, 0x2828F5};
public static final int[] VC = new int[]{0xB4B4B4, 0xDCDCDC, 0xFF6400, 0xFFFF1E, 0x808080, 0xF0F0F5, 0xDCDCF5, 0xC8C8F5, 0xB4B4F5, 0xA0A0F5, 0x8C8CF5, 0x7878F5, 0x6464F5, 0x5050F5, 0x2828F5};

/**
* The long names for the voltages
*/
public static final String[] VOLTAGE_NAMES = new String[] {"Ultra Low Voltage", "Low Voltage", "Medium Voltage", "High Voltage", "Extreme Voltage", "Insane Voltage", "Ludicrous Voltage", "ZPM Voltage", "Ultimate Voltage",
public static final String[] VOLTAGE_NAMES = new String[]{"Ultra Low Voltage", "Low Voltage", "Medium Voltage", "High Voltage", "Extreme Voltage", "Insane Voltage", "Ludicrous Voltage", "ZPM Voltage", "Ultimate Voltage",
"Highly Ultimate Voltage", "Extremely Ultimate Voltage", "Insanely Ultimate Voltage", "Mega Ultimate Voltage", "Extended Mega Ultimate Voltage", "Maximum Voltage"};

/**
* ModID strings, since they are quite common parameters
*/
public static final String MODID = "gregtech",
MODID_FR = "forestry",
MODID_CT = "crafttweaker",
MODID_TOP = "theoneprobe",
MODID_CTM = "ctm",
MODID_CC = "cubicchunks",
MODID_AR = "advancedrocketry",
MODID_EIO = "enderio",
MODID_BC = "buildcraftcore",
MODID_COFH = "cofhcore",
MODID_APPENG = "appliedenergistics2";
MODID_FR = "forestry",
MODID_CT = "crafttweaker",
MODID_TOP = "theoneprobe",
MODID_CTM = "ctm",
MODID_CC = "cubicchunks",
MODID_AR = "advancedrocketry",
MODID_EIO = "enderio",
MODID_BC = "buildcraftcore",
MODID_COFH = "cofhcore",
MODID_APPENG = "appliedenergistics2";

//because forge is too fucking retarded to cache results or at least do not create fucking
//immutable collections every time you retrieve indexed mod list
Expand All @@ -117,41 +117,41 @@ public static boolean isModLoaded(String modid) {
*/
public static final boolean HT =
ConfigHolder.U.machines.highTierMachines ||
ConfigHolder.U.machines.highTierAlloySmelter ||
ConfigHolder.U.machines.highTierArcFurnaces ||
ConfigHolder.U.machines.highTierAssemblers ||
ConfigHolder.U.machines.highTierAutoclaves ||
ConfigHolder.U.machines.highTierBenders ||
ConfigHolder.U.machines.highTierBreweries ||
ConfigHolder.U.machines.highTierCanners ||
ConfigHolder.U.machines.highTierCentrifuges ||
ConfigHolder.U.machines.highTierChemicalBaths ||
ConfigHolder.U.machines.highTierChemicalReactors ||
ConfigHolder.U.machines.highTierCompressors ||
ConfigHolder.U.machines.highTierCutters ||
ConfigHolder.U.machines.highTierDistilleries ||
ConfigHolder.U.machines.highTierElectricFurnace ||
ConfigHolder.U.machines.highTierElectrolyzers ||
ConfigHolder.U.machines.highTierElectromagneticSeparators ||
ConfigHolder.U.machines.highTierExtractors ||
ConfigHolder.U.machines.highTierExtruders ||
ConfigHolder.U.machines.highTierFermenters ||
ConfigHolder.U.machines.highTierFluidHeaters ||
ConfigHolder.U.machines.highTierFluidSolidifiers ||
ConfigHolder.U.machines.highTierForgeHammers ||
ConfigHolder.U.machines.highTierFormingPresses ||
ConfigHolder.U.machines.highTierLathes ||
ConfigHolder.U.machines.highTierMixers ||
ConfigHolder.U.machines.highTierOreWashers ||
ConfigHolder.U.machines.highTierPackers ||
ConfigHolder.U.machines.highTierPolarizers ||
ConfigHolder.U.machines.highTierLaserEngravers ||
ConfigHolder.U.machines.highTierSifters ||
ConfigHolder.U.machines.highTierThermalCentrifuges ||
ConfigHolder.U.machines.highTierMacerators ||
ConfigHolder.U.machines.highTierUnpackers ||
ConfigHolder.U.machines.highTierWiremills ||
ConfigHolder.U.machines.highTierMassFabricators ||
ConfigHolder.U.machines.highTierReplicators ||
ConfigHolder.U.machines.highTierScanners;
ConfigHolder.U.machines.highTierAlloySmelter ||
ConfigHolder.U.machines.highTierArcFurnaces ||
ConfigHolder.U.machines.highTierAssemblers ||
ConfigHolder.U.machines.highTierAutoclaves ||
ConfigHolder.U.machines.highTierBenders ||
ConfigHolder.U.machines.highTierBreweries ||
ConfigHolder.U.machines.highTierCanners ||
ConfigHolder.U.machines.highTierCentrifuges ||
ConfigHolder.U.machines.highTierChemicalBaths ||
ConfigHolder.U.machines.highTierChemicalReactors ||
ConfigHolder.U.machines.highTierCompressors ||
ConfigHolder.U.machines.highTierCutters ||
ConfigHolder.U.machines.highTierDistilleries ||
ConfigHolder.U.machines.highTierElectricFurnace ||
ConfigHolder.U.machines.highTierElectrolyzers ||
ConfigHolder.U.machines.highTierElectromagneticSeparators ||
ConfigHolder.U.machines.highTierExtractors ||
ConfigHolder.U.machines.highTierExtruders ||
ConfigHolder.U.machines.highTierFermenters ||
ConfigHolder.U.machines.highTierFluidHeaters ||
ConfigHolder.U.machines.highTierFluidSolidifiers ||
ConfigHolder.U.machines.highTierForgeHammers ||
ConfigHolder.U.machines.highTierFormingPresses ||
ConfigHolder.U.machines.highTierLathes ||
ConfigHolder.U.machines.highTierMixers ||
ConfigHolder.U.machines.highTierOreWashers ||
ConfigHolder.U.machines.highTierPackers ||
ConfigHolder.U.machines.highTierPolarizers ||
ConfigHolder.U.machines.highTierLaserEngravers ||
ConfigHolder.U.machines.highTierSifters ||
ConfigHolder.U.machines.highTierThermalCentrifuges ||
ConfigHolder.U.machines.highTierMacerators ||
ConfigHolder.U.machines.highTierUnpackers ||
ConfigHolder.U.machines.highTierWiremills ||
ConfigHolder.U.machines.highTierMassFabricators ||
ConfigHolder.U.machines.highTierReplicators ||
ConfigHolder.U.machines.highTierScanners;
}
6 changes: 3 additions & 3 deletions src/main/java/gregtech/api/GregTechAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ public class GregTechAPI {
public static final Map<Material, Map<StoneType, IBlockOre>> oreBlockTable = new HashMap<>();

public static final BaseCreativeTab TAB_GREGTECH =
new BaseCreativeTab(GTValues.MODID + ".main", () -> MetaItems.BATTERY_HULL_HV.getStackForm(), true);
new BaseCreativeTab(GTValues.MODID + ".main", () -> MetaItems.BATTERY_HULL_HV.getStackForm(), true);
public static final BaseCreativeTab TAB_GREGTECH_MATERIALS =
new BaseCreativeTab(GTValues.MODID + ".materials", () -> OreDictUnifier.get(OrePrefix.ingot, Materials.Aluminium), true);
new BaseCreativeTab(GTValues.MODID + ".materials", () -> OreDictUnifier.get(OrePrefix.ingot, Materials.Aluminium), true);
public static final BaseCreativeTab TAB_GREGTECH_ORES =
new BaseCreativeTab(GTValues.MODID + ".ores", () -> MetaItems.DRILL_MV.getStackForm(), true);
new BaseCreativeTab(GTValues.MODID + ".ores", () -> MetaItems.DRILL_MV.getStackForm(), true);

public static final GTControlledRegistry<ResourceLocation, MetaTileEntity> META_TILE_ENTITY_REGISTRY = new GTControlledRegistry<>(Short.MAX_VALUE);

Expand Down
26 changes: 13 additions & 13 deletions src/main/java/gregtech/api/block/machines/BlockMachine.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
import gregtech.api.pipenet.block.BlockPipe;
import gregtech.api.pipenet.tile.AttachmentType;
import gregtech.api.pipenet.tile.IPipeTile;
import gregtech.api.render.IBlockAppearance;
import gregtech.api.render.MetaTileEntityRenderer;
import gregtech.api.util.GTUtility;
import gregtech.common.ConfigHolder;
import gregtech.common.tools.DamageValues;
import gregtech.api.render.IBlockAppearance;
import gregtech.integration.ctm.IFacadeWrapper;
import net.minecraft.block.Block;
import net.minecraft.block.ITileEntityProvider;
Expand Down Expand Up @@ -121,8 +121,8 @@ public IBlockState getActualState(@Nonnull IBlockState state, @Nonnull IBlockAcc
return state;

return ((IExtendedBlockState) state)
.withProperty(HARVEST_TOOL, metaTileEntity.getHarvestTool() == null ? "wrench" : metaTileEntity.getHarvestTool())
.withProperty(HARVEST_LEVEL, metaTileEntity.getHarvestLevel());
.withProperty(HARVEST_TOOL, metaTileEntity.getHarvestTool() == null ? "wrench" : metaTileEntity.getHarvestTool())
.withProperty(HARVEST_LEVEL, metaTileEntity.getHarvestLevel());
}

@Nonnull
Expand Down Expand Up @@ -204,9 +204,9 @@ public RayTraceResult collisionRayTrace(@Nonnull IBlockState blockState, @Nonnul
public boolean rotateBlock(@Nonnull World world, @Nonnull BlockPos pos, @Nonnull EnumFacing axis) {
MetaTileEntity metaTileEntity = getMetaTileEntity(world, pos);
if (metaTileEntity == null ||
!metaTileEntity.isValidFrontFacing(axis) ||
metaTileEntity.getFrontFacing() == axis ||
!metaTileEntity.hasFrontFacing())
!metaTileEntity.isValidFrontFacing(axis) ||
metaTileEntity.getFrontFacing() == axis ||
!metaTileEntity.hasFrontFacing())
return false;
metaTileEntity.setFrontFacing(axis);
return true;
Expand All @@ -218,15 +218,15 @@ public EnumFacing[] getValidRotations(@Nonnull World world, @Nonnull BlockPos po
MetaTileEntity metaTileEntity = getMetaTileEntity(world, pos);
if (metaTileEntity == null || !metaTileEntity.hasFrontFacing()) return null;
return Arrays.stream(EnumFacing.VALUES)
.filter(metaTileEntity::isValidFrontFacing)
.toArray(EnumFacing[]::new);
.filter(metaTileEntity::isValidFrontFacing)
.toArray(EnumFacing[]::new);
}

@Override
public boolean recolorBlock(@Nonnull World world, @Nonnull BlockPos pos, @Nonnull EnumFacing side, @Nonnull EnumDyeColor color) {
MetaTileEntity metaTileEntity = getMetaTileEntity(world, pos);
if (metaTileEntity == null ||
metaTileEntity.getPaintingColor() == color.colorValue)
metaTileEntity.getPaintingColor() == color.colorValue)
return false;
metaTileEntity.setPaintingColor(color.colorValue);
return true;
Expand Down Expand Up @@ -258,9 +258,9 @@ public void onBlockPlacedBy(World worldIn, @Nonnull BlockPos pos, @Nonnull IBloc
pipePos = rt2.getBlockPos();
if (pipePos != null) {
Block block = worldIn.getBlockState(pipePos).getBlock();
if(block instanceof BlockPipe) {
if (block instanceof BlockPipe) {
IPipeTile pipeTile = ((BlockPipe<?, ?, ?>) block).getPipeTileEntity(worldIn, pipePos);
if(((BlockPipe<?, ?, ?>) block).canPipeConnectToBlock(pipeTile, facing.getOpposite(), worldIn.getTileEntity(pos))) {
if (((BlockPipe<?, ?, ?>) block).canPipeConnectToBlock(pipeTile, facing.getOpposite(), worldIn.getTileEntity(pos))) {
pipeTile.setConnectionBlocked(AttachmentType.PIPE, facing.getOpposite(), false, false);
}
}
Expand Down Expand Up @@ -319,7 +319,7 @@ public boolean onBlockActivated(@Nonnull World worldIn, @Nonnull BlockPos pos, @
IScrewdriverItem screwdriver = itemStack.getCapability(GregtechCapabilities.CAPABILITY_SCREWDRIVER, null);

if (screwdriver.damageItem(DamageValues.DAMAGE_FOR_SCREWDRIVER, true) &&
metaTileEntity.onCoverScrewdriverClick(playerIn, hand, rayTraceResult)) {
metaTileEntity.onCoverScrewdriverClick(playerIn, hand, rayTraceResult)) {
screwdriver.damageItem(DamageValues.DAMAGE_FOR_SCREWDRIVER, false);
return true;
}
Expand All @@ -331,7 +331,7 @@ public boolean onBlockActivated(@Nonnull World worldIn, @Nonnull BlockPos pos, @
EnumFacing wrenchDirection = ICoverable.determineGridSideHit(rayTraceResult);

if (wrenchItem.damageItem(DamageValues.DAMAGE_FOR_WRENCH, true) &&
metaTileEntity.onWrenchClick(playerIn, hand, wrenchDirection, rayTraceResult)) {
metaTileEntity.onWrenchClick(playerIn, hand, wrenchDirection, rayTraceResult)) {
wrenchItem.damageItem(DamageValues.DAMAGE_FOR_WRENCH, false);
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public boolean placeBlockAt(@Nonnull ItemStack stack, @Nonnull EntityPlayer play
//prevent rendering glitch before meta tile entity sync to client, but after block placement
//set opaque property on the placing on block, instead during set of meta tile entity
return super.placeBlockAt(stack, player, world, pos, side, hitX, hitY, hitZ,
newState.withProperty(BlockMachine.OPAQUE, metaTileEntity != null && metaTileEntity.isOpaqueCube()));
newState.withProperty(BlockMachine.OPAQUE, metaTileEntity != null && metaTileEntity.isOpaqueCube()));
}

@Nullable
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/gregtech/api/capability/IEnergyContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ default boolean outputsEnergy(EnumFacing side) {

/**
* Adds specified amount of energy to this energy container
*
* @param energyToAdd amount of energy to add
* @return amount of energy added
*/
Expand All @@ -32,6 +33,7 @@ default long addEnergy(long energyToAdd) {

/**
* Removes specified amount of energy from this energy container
*
* @param energyToRemove amount of energy to remove
* @return amount of energy removed
*/
Expand Down Expand Up @@ -82,4 +84,4 @@ default boolean isOneProbeHidden() {
return false;
}

}
}
Loading

0 comments on commit 3085115

Please sign in to comment.