Added command to view fluid fuel power values
This commit is contained in:
parent
2cf90af757
commit
cd04ae5693
1 changed files with 14 additions and 0 deletions
|
@ -4,8 +4,12 @@ package techreborn.command;
|
|||
import net.minecraft.command.CommandBase;
|
||||
import net.minecraft.command.ICommandSender;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import techreborn.api.fuel.FluidPowerManager;
|
||||
import techreborn.api.recipe.RecipeHandler;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class TechRebornDevCommand extends CommandBase {
|
||||
|
||||
@Override
|
||||
|
@ -29,8 +33,18 @@ public class TechRebornDevCommand extends CommandBase {
|
|||
sender.addChatMessage(new ChatComponentText("You need to use arguments, see /trdev help"));
|
||||
} else if ("help".equals(args[0])) {
|
||||
sender.addChatMessage(new ChatComponentText("recipes - Shows size of the recipe array"));
|
||||
sender.addChatMessage(new ChatComponentText("fluid - Lists the fluid power values"));
|
||||
} else if ("recipes".equals(args[0])) {
|
||||
sender.addChatMessage(new ChatComponentText(RecipeHandler.recipeList.size() + " recipes loaded"));
|
||||
} else if ("fluid".equals(args[0])){
|
||||
for(Object object : FluidPowerManager.fluidPowerValues.keySet().toArray()){
|
||||
if(object instanceof Fluid){
|
||||
Fluid fluid = (Fluid) object;
|
||||
sender.addChatMessage(new ChatComponentText(fluid.getUnlocalizedName() + " : " + FluidPowerManager.fluidPowerValues.get(fluid)));
|
||||
} else {
|
||||
sender.addChatMessage(new ChatComponentText("Found invalid fluid entry"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue