-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Almost workable fission reactor (#2433)
Co-authored-by: TechLord22 <37029404+TechLord22@users.noreply.github.com> Co-authored-by: Serenibyss <10861407+serenibyss@users.noreply.github.com> Co-authored-by: iouter <62897714+iouter@users.noreply.github.com> Co-authored-by: DStrand1 <DStrand1@users.noreply.github.com> Co-authored-by: alongstringofnumbers <sjensen793@gmail.com> Co-authored-by: Tictim <ksw07149@gmail.com> Co-authored-by: ALongStringOfNumbers <31759736+ALongStringOfNumbers@users.noreply.github.com> Co-authored-by: M_W_K <31022105+M-W-K@users.noreply.github.com> Co-authored-by: Ghzdude <44148655+ghzdude@users.noreply.github.com> Co-authored-by: mtbo <111296252+loxoDev@users.noreply.github.com> Co-authored-by: YoungOnion <39562198+YoungOnionMC@users.noreply.github.com> Co-authored-by: Loxo <loxo.Minecraft@gmail.com> Co-authored-by: htmlcsjs <46023024+htmlcsjs@users.noreply.github.com> Co-authored-by: brachy84 <45517902+brachy84@users.noreply.github.com> Co-authored-by: froot <66188216+kumquat-ir@users.noreply.github.com> Co-authored-by: tier940 <tsubasa.ito@relightings.com>
- Loading branch information
1 parent
4f48a50
commit 785b3ff
Showing
67 changed files
with
2,084 additions
and
430 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
src/main/java/gregtech/api/gui/widgets/UpdatedSliderWidget.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package gregtech.api.gui.widgets; | ||
|
||
import gregtech.api.gui.IRenderContext; | ||
import gregtech.api.util.Position; | ||
import gregtech.api.util.Size; | ||
import gregtech.api.util.function.FloatConsumer; | ||
|
||
import net.minecraft.client.Minecraft; | ||
import net.minecraft.client.gui.FontRenderer; | ||
|
||
import java.util.function.Supplier; | ||
|
||
public class UpdatedSliderWidget extends SliderWidget { | ||
|
||
Supplier<Float> detector; | ||
|
||
public UpdatedSliderWidget(String name, int xPosition, int yPosition, int width, int height, float min, float max, | ||
float currentValue, FloatConsumer responder, Supplier<Float> detector) { | ||
super(name, xPosition, yPosition, width, height, min, max, currentValue, responder); | ||
this.detector = detector; | ||
} | ||
|
||
@Override | ||
public void drawInBackground(int mouseX, int mouseY, float partialTicks, IRenderContext context) { | ||
Position pos = getPosition(); | ||
Size size = getSize(); | ||
if (backgroundArea != null) { | ||
backgroundArea.draw(pos.x, pos.y, size.width, size.height); | ||
} | ||
sliderPosition = (detector.get() - min) / (max - min); | ||
this.displayString = getDisplayString(); | ||
|
||
sliderIcon.draw(pos.x + (int) (this.sliderPosition * (float) (size.width - 8)), pos.y, sliderWidth, | ||
size.height); | ||
FontRenderer fontRenderer = Minecraft.getMinecraft().fontRenderer; | ||
fontRenderer.drawString(displayString, | ||
pos.x + size.width / 2 - fontRenderer.getStringWidth(displayString) / 2, | ||
pos.y + size.height / 2 - fontRenderer.FONT_HEIGHT / 2, textColor); | ||
} | ||
} |
3 changes: 1 addition & 2 deletions
3
src/main/java/gregtech/api/metatileentity/multiblock/IControlRodPort.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
package gregtech.api.metatileentity.multiblock; | ||
|
||
public interface IControlRodPort { | ||
|
||
byte getInsertionAmount(); | ||
// Allows for a special multiblock ability. | ||
} |
Oops, something went wrong.