Remove all awt usage

This commit is contained in:
modmuss50 2019-08-19 14:40:02 +01:00
parent f0b8d99853
commit 066d1bc9e2
3 changed files with 7 additions and 7 deletions

View file

@ -40,12 +40,12 @@ import reborncore.client.multiblock.MultiblockRenderEvent;
import reborncore.client.multiblock.MultiblockSet;
import reborncore.common.network.NetworkManager;
import reborncore.common.powerSystem.PowerSystem;
import reborncore.common.util.Color;
import reborncore.common.util.Torus;
import techreborn.init.TRContent;
import techreborn.packets.ServerboundPackets;
import techreborn.blockentity.fusionReactor.FusionControlComputerBlockEntity;
import java.awt.*;
import java.util.List;
import java.util.Optional;
@ -82,9 +82,9 @@ public class GuiFusionReactor extends GuiBase<BuiltContainer> {
builder.drawProgressBar(this, blockEntity.getProgressScaled(100), 100, 105, 51, mouseX, mouseY, GuiBuilder.ProgressDirection.LEFT, layer);
if (blockEntity.getCoilStatus() > 0) {
addHologramButton(6, 4, 212, layer).clickHandler(this::hologramToggle);
drawCentredString(blockEntity.getStateString(), 20, Color.BLUE.darker().getRGB(), layer);
drawCentredString(blockEntity.getStateString(), 20, Color.BLUE.darker().getColor(), layer);
if(blockEntity.state == 2){
drawCentredString( PowerSystem.getLocaliszedPowerFormatted((int) blockEntity.getPowerChange()) + "/t", 30, Color.GREEN.darker().getRGB(), layer);
drawCentredString( PowerSystem.getLocaliszedPowerFormatted((int) blockEntity.getPowerChange()) + "/t", 30, Color.GREEN.darker().getColor(), layer);
}
} else {
builder.drawMultiblockMissingBar(this, layer);

View file

@ -48,10 +48,10 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.world.ExtendedBlockView;
import reborncore.common.fluid.container.ItemFluidInfo;
import reborncore.common.util.Color;
import techreborn.TechReborn;
import javax.annotation.Nullable;
import java.awt.*;
import java.util.Collections;
import java.util.List;
import java.util.Random;
@ -91,7 +91,7 @@ public class DynamicBucketBakedModel implements BakedModel, FabricBakedModel {
BakedModel fluidModel = bakedModelManager.getModel(BUCKET_FLUID);
int fluidColor = fluidRenderHandler.getFluidColor(MinecraftClient.getInstance().world, MinecraftClient.getInstance().player.getBlockPos(), fluid.getDefaultState());
Sprite fluidSprite = fluidRenderHandler.getFluidSprites(MinecraftClient.getInstance().world, BlockPos.ORIGIN, fluid.getDefaultState())[0];
int color = new Color((float) (fluidColor >> 16 & 255) / 255.0F, (float) (fluidColor >> 8 & 255) / 255.0F, (float) (fluidColor & 255) / 255.0F).getRGB();
int color = new Color((float) (fluidColor >> 16 & 255) / 255.0F, (float) (fluidColor >> 8 & 255) / 255.0F, (float) (fluidColor & 255) / 255.0F).getColor();
context.pushTransform(quad -> {
quad.nominalFace(GeometryHelper.lightFace(quad));
quad.spriteColor(0, color, color, color, color);

View file

@ -48,10 +48,10 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.world.ExtendedBlockView;
import reborncore.common.fluid.container.ItemFluidInfo;
import reborncore.common.util.Color;
import techreborn.TechReborn;
import javax.annotation.Nullable;
import java.awt.*;
import java.util.Collections;
import java.util.List;
import java.util.Random;
@ -86,7 +86,7 @@ public class DynamicCellBakedModel implements BakedModel, FabricBakedModel {
BakedModel fluidModel = bakedModelManager.getModel(CELL_FLUID);
int fluidColor = fluidRenderHandler.getFluidColor(MinecraftClient.getInstance().world, MinecraftClient.getInstance().player.getBlockPos(), fluid.getDefaultState());
Sprite fluidSprite = fluidRenderHandler.getFluidSprites(MinecraftClient.getInstance().world, BlockPos.ORIGIN, fluid.getDefaultState())[0];
int color = new Color((float) (fluidColor >> 16 & 255) / 255.0F, (float) (fluidColor >> 8 & 255) / 255.0F, (float) (fluidColor & 255) / 255.0F).getRGB();
int color = new Color((float) (fluidColor >> 16 & 255) / 255.0F, (float) (fluidColor >> 8 & 255) / 255.0F, (float) (fluidColor & 255) / 255.0F).getColor();
context.pushTransform(quad -> {
quad.nominalFace(GeometryHelper.lightFace(quad));
quad.spriteColor(0, color, color, color, color);