Redstone config polish

This commit is contained in:
modmuss50 2020-01-23 13:53:16 +00:00
parent 3b2da8b510
commit a06afa1a4a
14 changed files with 26 additions and 14 deletions

View file

@ -26,12 +26,14 @@ package techreborn;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.client.itemgroup.FabricItemGroupBuilder;
import net.minecraft.fluid.Fluids;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Identifier;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import reborncore.api.power.ItemPowerHolder;
import reborncore.common.blockentity.RedstoneConfiguration;
import reborncore.common.config.Configuration;
import reborncore.common.recipes.RecipeCrafter;
import reborncore.common.util.Torus;
@ -40,7 +42,14 @@ import techreborn.blockentity.storage.energy.idsu.IDSUManager;
import techreborn.client.GuiHandler;
import techreborn.config.TechRebornConfig;
import techreborn.events.ModRegistry;
import techreborn.init.*;
import techreborn.init.FluidGeneratorRecipes;
import techreborn.init.ModLoot;
import techreborn.init.ModRecipes;
import techreborn.init.ModSounds;
import techreborn.init.TRBlockEntities;
import techreborn.init.TRContent;
import techreborn.init.TRDispenserBehavior;
import techreborn.items.DynamicCellItem;
import techreborn.packets.ClientboundPackets;
import techreborn.packets.ServerboundPackets;
import techreborn.utils.PoweredCraftingHandler;
@ -87,6 +96,9 @@ public class TechReborn implements ModInitializer {
DataAttachment.REGISTRY.register(IDSUManager.class, IDSUManager::new);
RedstoneConfiguration.fluidStack = DynamicCellItem.getCellWithFluid(Fluids.LAVA);
RedstoneConfiguration.powerStack = new ItemStack(TRContent.RED_CELL_BATTERY);
LOGGER.info("TechReborn setup done!");
}

View file

@ -70,7 +70,7 @@ public class GuiAESU extends GuiBase<BuiltContainer> {
super.drawForeground(mouseX, mouseY);
final Layer layer = Layer.FOREGROUND;
if(!isTabOpen()){
if(!hideGuiElements()){
RenderSystem.pushMatrix();
RenderSystem.scaled(0.6, 0.6, 1);
drawCentredString(PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) blockEntity.getEnergy()) + "/"

View file

@ -54,7 +54,7 @@ public class GuiBatbox extends GuiBase<BuiltContainer> {
super.drawForeground(mouseX, mouseY);
final Layer layer = Layer.FOREGROUND;
if(!isTabOpen()){
if(!hideGuiElements()){
RenderSystem.pushMatrix();
RenderSystem.scaled(0.6, 0.6, 5);
drawCentredString(PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) blockEntity.getEnergy()) + "/" + PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) blockEntity.getMaxPower()) + " " + PowerSystem.getDisplayPower().abbreviation, 35, 0, 58, layer);

View file

@ -93,7 +93,7 @@ public class GuiBlastFurnace extends GuiBase<BuiltContainer> {
}
public void onClick(GuiButtonExtended button, Double x, Double y){
if (isTabOpen()) return;
if (hideGuiElements()) return;
if (blockEntity.renderMultiblock == null) {
{
// This code here makes a basic multiblock and then sets to the selected one.

View file

@ -59,7 +59,7 @@ public class GuiChunkLoader extends GuiBase<BuiltContainer> {
super.drawBackground(partialTicks, mouseX, mouseY);
final Layer layer = Layer.BACKGROUND;
if (isTabOpen()) return;
if (hideGuiElements()) return;
String text = "Radius: " + blockEntity.getRadius();
drawCentredString(text, 25, 4210752, layer);

View file

@ -82,7 +82,7 @@ public class GuiDistillationTower extends GuiBase<BuiltContainer> {
}
public void onClick(GuiButtonExtended button, Double x, Double y){
if (isTabOpen()) return;
if (hideGuiElements()) return;
if (blockEntity.renderMultiblock == null) {
{
// This code here makes a basic multiblock and then sets to the selected one.

View file

@ -87,7 +87,7 @@ public class GuiFluidReplicator extends GuiBase<BuiltContainer> {
// GuiScreen
public void onClick(GuiButtonExtended button, Double x, Double y){
if (isTabOpen()) return;
if (hideGuiElements()) return;
if (blockEntity.renderMultiblock == null) {
{
// This code here makes a basic multiblock and then sets to the selected one.

View file

@ -115,7 +115,7 @@ public class GuiFusionReactor extends GuiBase<BuiltContainer> {
}
public void hologramToggle(GuiButtonExtended button, double x, double y){
if (isTabOpen()) return;
if (hideGuiElements()) return;
if (blockEntity.renderMultiblock == null) {
updateMultiBlockRender();
} else {

View file

@ -101,7 +101,7 @@ public class GuiGreenhouseController extends GuiBase<BuiltContainer> {
}
public void onClick(GuiButtonExtended button, Double x, Double y) {
if (isTabOpen()) return;
if (hideGuiElements()) return;
if (blockEntity.renderMultiblock == null) {
final Multiblock multiblock = new Multiblock();
BlockState lamp = TRContent.Machine.LAMP_INCANDESCENT.block.getDefaultState().with(Properties.FACING, Direction.DOWN);

View file

@ -84,7 +84,7 @@ public class GuiImplosionCompressor extends GuiBase<BuiltContainer> {
}
public void onClick(GuiButtonExtended button, Double mouseX, Double mouseY){
if (isTabOpen()) return;
if (hideGuiElements()) return;
if (blockEntity.renderMultiblock == null) {
{
// This code here makes a basic multiblock and then sets to the selected one.

View file

@ -89,7 +89,7 @@ public class GuiIndustrialGrinder extends GuiBase<BuiltContainer> {
}
public void onClick(GuiButtonExtended button, double mouseX, double mouseY){
if (isTabOpen()) return;
if (hideGuiElements()) return;
if (blockEntity.renderMultiblock == null) {
{
// This code here makes a basic multiblock and then sets to the selected one.

View file

@ -94,7 +94,7 @@ public class GuiIndustrialSawmill extends GuiBase<BuiltContainer> {
}
public void onClick(GuiButtonExtended button, Double mouseX, Double mouseY){
if (isTabOpen()) return;
if (hideGuiElements()) return;
if (blockEntity.renderMultiblock == null) {
{
// This code here makes a basic multiblock and then sets to the selected one.

View file

@ -55,7 +55,7 @@ public class GuiMFE extends GuiBase<BuiltContainer> {
super.drawForeground(mouseX, mouseY);
final Layer layer = Layer.FOREGROUND;
if(!isTabOpen()){
if(!hideGuiElements()){
RenderSystem.pushMatrix();
RenderSystem.scaled(0.6, 0.6, 1);
drawCentredString(PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) mfe.getEnergy()) + "/" + PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) mfe.getMaxPower()) + " " + PowerSystem.getDisplayPower().abbreviation, 35, 0, 58, layer);

View file

@ -80,7 +80,7 @@ public class GuiVacuumFreezer extends GuiBase<BuiltContainer> {
}
public void onClick(GuiButtonExtended button, Double mouseX, Double mouseY){
if (isTabOpen()) return;
if (hideGuiElements()) return;
if (blockEntity.renderMultiblock == null) {
{
// This code here makes a basic multiblock and then sets to the selected one.