Skip to content

Commit

Permalink
remove out commentec code
Browse files Browse the repository at this point in the history
run SA
  • Loading branch information
Dream-Master committed Nov 8, 2022
1 parent b846e30 commit 2b27b55
Show file tree
Hide file tree
Showing 795 changed files with 33,757 additions and 37,347 deletions.
7 changes: 3 additions & 4 deletions src/api/java/pneumaticCraft/api/IHeatExchangerLogic.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @author MineMaarten
* www.minemaarten.com
*/
public interface IHeatExchangerLogic{
public interface IHeatExchangerLogic {

/**
* Call this to tick this logic, and make the heat disperse itself.
Expand All @@ -19,7 +19,7 @@ public interface IHeatExchangerLogic{
/**
* When called (preferably on tile entity load and neighbor block/tile entity change) this will add all IHeatExchanger neighbor TileEntities as connected heat exchangers.
* It will also take care of blocks like Lava.
*
*
* You don't _have_ to call this method, if this heat exchanger is not connected to the outside world (for example the heat of the liquid
* plastic in the Plastic Mixer).
* @param world
Expand All @@ -32,7 +32,7 @@ public interface IHeatExchangerLogic{
public void initializeAsHull(World world, int x, int y, int z, ForgeDirection... validSides);

/**
* When called, this will connect these two heat exchangers. You should only call this on one of the two heat exchangers.
* When called, this will connect these two heat exchangers. You should only call this on one of the two heat exchangers.
* @param exchanger
*/
public void addConnectedExchanger(IHeatExchangerLogic exchanger);
Expand Down Expand Up @@ -73,5 +73,4 @@ public interface IHeatExchangerLogic{
* @param amount
*/
public void addHeat(double amount);

}
19 changes: 9 additions & 10 deletions src/api/java/pneumaticCraft/api/PneumaticRegistry.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package pneumaticCraft.api;

import java.util.List;

import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityCreature;
Expand All @@ -20,23 +19,23 @@
/**
* This class can be used to register and access various things to and from the mod.
*/
public class PneumaticRegistry{
public class PneumaticRegistry {
/**
* This field, which is initialized in PneumaticCraft's preInit, will give you access to various registration and access options.
* @deprecated This field isn't going to be removed, but it'll be marked private. use getInstance().
*/
@Deprecated
public static IPneumaticCraftInterface instance;

public static IPneumaticCraftInterface getInstance(){
public static IPneumaticCraftInterface getInstance() {
return instance;
}

public static void init(IPneumaticCraftInterface inter){
if(instance == null) instance = inter;//only allow initialization once; by PneumaticCraft
public static void init(IPneumaticCraftInterface inter) {
if (instance == null) instance = inter; // only allow initialization once; by PneumaticCraft
}

public static interface IPneumaticCraftInterface{
public static interface IPneumaticCraftInterface {

/*
* ------------- Pneumatic Helmet --------------
Expand Down Expand Up @@ -83,10 +82,10 @@ public static interface IPneumaticCraftInterface{
* y level, and drop the deliveredStacks. When there isn't a clear path for the items to fall these 5 blocks the Drone will deliver at a
* y level above the specified y that _is_ clear. If no clear blocks can be found (when there are only solid blocks), the Drone will
* drop the items very high up in the air instead, and drop them there.
*
*
* When the Drone is tried to be catched by a player (by wrenching it), the drone will only the drop the items that it was delivering (or
* none if it dropped those items already). The Drone itself never will be dropped.
*
*
* @param x
* @param y
* @param z
Expand Down Expand Up @@ -138,7 +137,8 @@ public static interface IPneumaticCraftInterface{
* @return The amount of Security Stations that disallow interaction for the given player.
* This method throws an IllegalArgumentException when tried to be called from the client side!
*/
public int getProtectingSecurityStations(World world, int x, int y, int z, EntityPlayer player, boolean showRangeLines);
public int getProtectingSecurityStations(
World world, int x, int y, int z, EntityPlayer player, boolean showRangeLines);

/**
* Use this to register ISimpleBlockRenderHandler render id's of full blocks, those of which should be able to be used for the Pneumatic Door Base camouflage.
Expand All @@ -153,6 +153,5 @@ public static interface IPneumaticCraftInterface{
* @param liquidToPointRatio The amount of liquid (in mB) used to get one XP point. In OpenBlocks this is 20 (mB/point).
*/
public void registerXPLiquid(Fluid fluid, int liquidToPointRatio);

}
}
5 changes: 2 additions & 3 deletions src/api/java/pneumaticCraft/api/actuator/IActuator.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package pneumaticCraft.api.actuator;

import java.util.List;

import net.minecraft.tileentity.TileEntity;

public interface IActuator{
public interface IActuator {
/**
* Same as {@link pneumaticCraft.api.universalSensor.ISensorSetting#getSensorPath()}
* @return
Expand All @@ -25,7 +24,7 @@ public interface IActuator{
public List<String> getDescription();

/**
*
*
* @param universalActuator
*/
public void actuate(TileEntity universalActuator);
Expand Down
108 changes: 54 additions & 54 deletions src/api/java/pneumaticCraft/api/block/BlockSupplier.java
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package pneumaticCraft.api.block;

import net.minecraft.block.Block;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.block.Block;

public class BlockSupplier{
public class BlockSupplier {
// private static Class blockClass;

/**
* @param blockName
* @return
*/
public static Block getBlock(String blockName){
public static Block getBlock(String blockName) {
return GameRegistry.findBlock("PneumaticCraft", blockName);
/*try {
if(blockClass == null) blockClass = Class.forName("pneumaticCraft.common.block.Blockss");
Expand All @@ -22,56 +22,56 @@ public static Block getBlock(String blockName){
}

/*
The following is a list of all the block names that can be passed as argument in getBlock(String) to get a PneumaticCraft block.
pressureTube meta = tube type
airCompressor
airCannon
pressureChamberWall meta < 6 ? wall : window
pressureChamberValve
pressureChamberInterface
squidPlant
fireFlower
creeperPlant
slimePlant
rainPlant
enderPlant
lightningPlant
adrenalinePlant
burstPlant
potionPlant
repulsionPlant
heliumPlant
flyingFlower
musicPlant
propulsionPlant
chopperPlant
chargingStation
elevatorBase
elevatorFrame
vacuumPump
pneumaticDoorBase
pneumaticDoor
assemblyPlatform
assemblyIOUnit
assemblyDrill
assemblyLaser
assemblyController
advancedPressureTube meta = tube type (like 'pressureTube')
compressedIron
uvLightBox
etchingAcid
securityStation
universalSensor
pneumaticGenerator
electricCompressor
pneumaticEngine
kineticCompressor
aerialInterface
electrostaticCompressor
aphorismTile
omnidirectionalHopper
The following is a list of all the block names that can be passed as argument in getBlock(String) to get a PneumaticCraft block.
*/
pressureTube meta = tube type
airCompressor
airCannon
pressureChamberWall meta < 6 ? wall : window
pressureChamberValve
pressureChamberInterface
squidPlant
fireFlower
creeperPlant
slimePlant
rainPlant
enderPlant
lightningPlant
adrenalinePlant
burstPlant
potionPlant
repulsionPlant
heliumPlant
flyingFlower
musicPlant
propulsionPlant
chopperPlant
chargingStation
elevatorBase
elevatorFrame
vacuumPump
pneumaticDoorBase
pneumaticDoor
assemblyPlatform
assemblyIOUnit
assemblyDrill
assemblyLaser
assemblyController
advancedPressureTube meta = tube type (like 'pressureTube')
compressedIron
uvLightBox
etchingAcid
securityStation
universalSensor
pneumaticGenerator
electricCompressor
pneumaticEngine
kineticCompressor
aerialInterface
electrostaticCompressor
aphorismTile
omnidirectionalHopper
*/
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Should be implemented by any block that allows to be rotated by a Pneumatic Wrench. It uses almost the same
* rotate method as the Vanilla (Forge) method. However it uses energy to rotate (when rotateBlock() return true).
*/
public interface IPneumaticWrenchable{
public interface IPneumaticWrenchable {

public boolean rotateBlock(World world, EntityPlayer player, int x, int y, int z, ForgeDirection side);
}
28 changes: 16 additions & 12 deletions src/api/java/pneumaticCraft/api/client/GuiAnimatedStatSupplier.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
import net.minecraft.item.ItemStack;

/**
* With this class you can retrieve new instances of the PneumaticCraft's IGuiAnimatedStat implementation. You can use these in Gui's as
* With this class you can retrieve new instances of the PneumaticCraft's IGuiAnimatedStat implementation. You can use these in Gui's as
* well as anywhere you like. When you use these in Gui's you need to pass a valid GuiScreen instance, if you don't you can just pass
* null.
*/
public class GuiAnimatedStatSupplier{
public class GuiAnimatedStatSupplier {
private static Class animatedStatClass;

public static IGuiAnimatedStat getAnimatedStat(GuiScreen gui, int backgroundColor){
return getAnimatedStat(new Class[]{GuiScreen.class, int.class}, gui, backgroundColor);
public static IGuiAnimatedStat getAnimatedStat(GuiScreen gui, int backgroundColor) {
return getAnimatedStat(new Class[] {GuiScreen.class, int.class}, gui, backgroundColor);
}

/**
Expand All @@ -22,8 +22,9 @@ public static IGuiAnimatedStat getAnimatedStat(GuiScreen gui, int backgroundColo
* @param backgroundColor
* @return
*/
public static IGuiAnimatedStat getAnimatedStat(GuiScreen gui, ItemStack iconStack, int backgroundColor){
return getAnimatedStat(new Class[]{GuiScreen.class, int.class, ItemStack.class}, gui, backgroundColor, iconStack);
public static IGuiAnimatedStat getAnimatedStat(GuiScreen gui, ItemStack iconStack, int backgroundColor) {
return getAnimatedStat(
new Class[] {GuiScreen.class, int.class, ItemStack.class}, gui, backgroundColor, iconStack);
}

/**
Expand All @@ -33,15 +34,18 @@ public static IGuiAnimatedStat getAnimatedStat(GuiScreen gui, ItemStack iconStac
* @param backgroundColor
* @return
*/
public static IGuiAnimatedStat getAnimatedStat(GuiScreen gui, String iconTexture, int backgroundColor){
return getAnimatedStat(new Class[]{GuiScreen.class, int.class, String.class}, gui, backgroundColor, iconTexture);
public static IGuiAnimatedStat getAnimatedStat(GuiScreen gui, String iconTexture, int backgroundColor) {
return getAnimatedStat(
new Class[] {GuiScreen.class, int.class, String.class}, gui, backgroundColor, iconTexture);
}

private static IGuiAnimatedStat getAnimatedStat(Class[] constructorClasses, Object... constructorParameters){
private static IGuiAnimatedStat getAnimatedStat(Class[] constructorClasses, Object... constructorParameters) {
try {
if(animatedStatClass == null) animatedStatClass = Class.forName("pneumaticCraft.client.gui.widget.GuiAnimatedStat");
return (IGuiAnimatedStat)animatedStatClass.getConstructor(constructorClasses).newInstance(constructorParameters);
} catch(Exception e) {
if (animatedStatClass == null)
animatedStatClass = Class.forName("pneumaticCraft.client.gui.widget.GuiAnimatedStat");
return (IGuiAnimatedStat)
animatedStatClass.getConstructor(constructorClasses).newInstance(constructorParameters);
} catch (Exception e) {
System.err.println("Failed to retrieve an GuiAnimatedStat instance from PneumaticCraft.");
}
return null;
Expand Down
43 changes: 36 additions & 7 deletions src/api/java/pneumaticCraft/api/client/GuiElementRenderer.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package pneumaticCraft.api.client;

import java.lang.reflect.Method;

import net.minecraft.client.gui.FontRenderer;

public class GuiElementRenderer{
public class GuiElementRenderer {
private static Method drawGaugeMethod;

/**
Expand All @@ -19,13 +18,43 @@ public class GuiElementRenderer{
* @param yPos y position of the gauge.
* @param zLevel z position of the gauge (Gui#zLevel, -90, for in normal GUI's).
*/
public static void drawPressureGauge(FontRenderer fontRenderer, float minPressure, float maxPressure, float dangerPressure, float minWorkingPressure, float currentPressure, int xPos, int yPos, float zLevel){
public static void drawPressureGauge(
FontRenderer fontRenderer,
float minPressure,
float maxPressure,
float dangerPressure,
float minWorkingPressure,
float currentPressure,
int xPos,
int yPos,
float zLevel) {
try {
if(drawGaugeMethod == null) {
drawGaugeMethod = Class.forName("pneumaticCraft.client.gui.GuiUtils").getMethod("drawPressureGauge", FontRenderer.class, float.class, float.class, float.class, float.class, float.class, int.class, int.class, float.class);
if (drawGaugeMethod == null) {
drawGaugeMethod = Class.forName("pneumaticCraft.client.gui.GuiUtils")
.getMethod(
"drawPressureGauge",
FontRenderer.class,
float.class,
float.class,
float.class,
float.class,
float.class,
int.class,
int.class,
float.class);
}
drawGaugeMethod.invoke(null, fontRenderer, minPressure, maxPressure, dangerPressure, minWorkingPressure, currentPressure, xPos, yPos, zLevel);
} catch(Exception e) {
drawGaugeMethod.invoke(
null,
fontRenderer,
minPressure,
maxPressure,
dangerPressure,
minWorkingPressure,
currentPressure,
xPos,
yPos,
zLevel);
} catch (Exception e) {
System.err.println("Failed to render a Pressure Gauge from PneumaticCraft.");
}
}
Expand Down
4 changes: 1 addition & 3 deletions src/api/java/pneumaticCraft/api/client/IGuiAnimatedStat.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
* animated stats can be implemented as well via this interface, and they will interact with the PneumaticCraft GuiAnimatedStats
* if you implement it correctly.
*/

public interface IGuiAnimatedStat{
public interface IGuiAnimatedStat {

/**
* When you call this method with a set of coordinates representing the button location and dimensions, you'll get
Expand Down Expand Up @@ -175,5 +174,4 @@ public interface IGuiAnimatedStat{
* @return
*/
public boolean isClicked();

}
Loading

0 comments on commit 2b27b55

Please sign in to comment.