-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nuclear fission #2093
Open
Zalgo239
wants to merge
199
commits into
master
Choose a base branch
from
nuclear-fission
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Nuclear fission #2093
Changes from 119 commits
Commits
Show all changes
199 commits
Select commit
Hold shift + click to select a range
b98199e
Start of work on nuclear fission
Zalgo239 55a7c49
Start implementation of reactor states
Zalgo239 12d255d
Smoother transitions and better logic
Zalgo239 2164c9d
More reactor states
Zalgo239 58fa6ba
Reorganising packages
Zalgo239 427ee94
Other nuclear components
Zalgo239 7a40ca4
New material properties
Zalgo239 3796bf6
Basic stats for nuclear properties
Zalgo239 47f03ad
Keys for the new properties
Zalgo239 0f819dc
Large amount of reactor calculations
Zalgo239 376db84
Significantly improved and simplified logic
Zalgo239 2ce07e4
Reactor stats calculation cleanup
Zalgo239 66c1e66
Fission Reactor meta tile entity
Zalgo239 7c64a23
Fission reactor rebase
Zalgo239 563ebc6
Start of work on reactor multiblock structure logic
Zalgo239 d45e1f1
Proper handling of minimum and maximum dimensions
Zalgo239 29475f2
More reactor structure logic
Zalgo239 48c434f
Fixed height calculation and extra tricorder info
Zalgo239 a1f12bc
Reactor dimensions NBT saving
Zalgo239 8391e90
Extra structure pattern checks
Zalgo239 3d11fe6
Rebase and fixes due to changes to IMaterialProperty
Zalgo239 b511e55
Start work on custom hatches for fission reactor
Zalgo239 b757ae2
Added UI for the fuel rod hatch
Zalgo239 1837229
Added fuel rod output hatch
Zalgo239 2490741
API fixes and fuel rod hatch rendering
Zalgo239 8fd6ce9
Fix fuel rod hatches orientations
Zalgo239 d30c627
Add coolant hatches and control rod port
Zalgo239 2dd3455
Fission reactor component names localisation
Zalgo239 2849604
Add hatches to the fission reactor's structure
bruberu e1b99a3
Fuel rod hatch, coolant hatch, and control rod hatch checks put in place
bruberu 3378111
Allow coolant import and fuel rod import hatches to be locked
bruberu 2354360
Basic work on actually constructing the reactor (doesn't compile)
bruberu 231e42c
Complete nuclear reactor checks (but apparently locking needs to be c…
bruberu 115b531
Proper server-to-client locking sync
bruberu 7ae3ca3
Start thinking about how to actually update the fission reactor
bruberu e91338e
Reactor state update order
Zalgo239 9f22688
Reactor failiure checks
Zalgo239 6d1b8d6
Fix MTE ID conflicts
Zalgo239 8b68afa
Refactor logic to remove coolant headaches
Zalgo239 d7b3ac5
Coolant consumption logic
Zalgo239 0d2ef18
Remove unecessary variable
Zalgo239 71b59e7
Make reactor consume the fuel
Zalgo239 5485f70
Add components for gas centrifuges and spent fuel pool
Zalgo239 7b47128
Added spent fuel pool multiblock
Zalgo239 fe95377
Added totally original and not copied from susycore heat exchanger code
Zalgo239 489b0d3
New epic paneling for spent fuel pools and other decor
Zalgo239 95bb585
Spent fuel pool structure changes and light on spent fuel casings
Zalgo239 6a83a95
Blocks cleanup
Zalgo239 5c2b982
Structure fixes
Zalgo239 a526688
Remove unused import
Zalgo239 7f33913
Textures for the empty fuel casings variant
Zalgo239 061a63d
Remove light from nuclear casings
Zalgo239 ca2d6a7
Fix inactive variant being emissive
Zalgo239 57307e1
Remove unused defaults
Zalgo239 291a117
Added gas centrifuge multiblock
Zalgo239 8674b03
fixes
serenibyss 6a7a914
spotless
serenibyss b8983a2
a couple spotless cleanups
serenibyss ae9d20e
Added consequences for failures
Zalgo239 080d303
Hot coolant output logic
Zalgo239 f12a5a3
Radiation damage from items and fuel rods
Zalgo239 ae5ef45
Add item models and textures
Zalgo239 7ea3a66
Add coolant properties to material builder
Zalgo239 abbfc6e
Fix reactor not outputting the correct coolant
Zalgo239 54eaf68
Fix U238 being used as natural uranium
Zalgo239 2aa56b1
Added more nuclear materials
Zalgo239 5b4f9b1
attempt test prerelease script
serenibyss c30b7f0
try to make github run the action
serenibyss 41507a1
spotless
serenibyss c5ef04b
fix compilation issues
serenibyss 4f48a50
Various Fission Reactor fixes (#2338)
loxoDev 785b3ff
Almost workable fission reactor (#2433)
bruberu f5ac934
fix: merge oops
bruberu dbdb2da
feat: couple textures I forgot
bruberu 20b1b3f
feat: a few more radiation damage functions
bruberu 97156ca
feat: coolant config as requested by Zalgo
bruberu 765ca05
fix: I love getting spotless'd
bruberu 73eb670
feat: resolve some TODOs
bruberu 0e96dcf
fix: sbob
bruberu 15a80c8
fix: reviews part 1
bruberu eff79de
fix: reviews part 2
bruberu 2f2b003
fix: splotlam 49oianuhwsegrd
bruberu a258bf2
fix: how did I not notice that
bruberu a852a37
fix: revert gas centrifuge shenanigans
bruberu 63540f7
feat: more documentation
bruberu d396ba8
fix: one fuel rod doesn't literally break things anymore
bruberu b252975
fix: the daily spotless :)
bruberu 42ffe41
fix: better structural feedback
bruberu 403bb1b
fix: better coolant saving
bruberu a129bfa
fix: useless layers now actually mean something
bruberu f441101
fix: spotless last files
bruberu 06ed766
fix: water being OP
bruberu f5a1eee
fix: plateZircaloy and anode basket
bruberu 5d10f41
fix: missing high-grade MOX spent fuel recipe
bruberu 0d289f8
fix: stainless steel round
bruberu 35a17f2
fix: min instead of max, and another structure bug
bruberu c0149d6
feat: maintenance
bruberu a7d798c
fix: remove error type that might not mean anything important
bruberu bba511e
feat: start on half life
bruberu ccf7fae
fix: composition
bruberu a9bbe40
Nuclear fission intermediate work (#2507)
bruberu 3eeab88
fix: circuits
bruberu ba409b9
feat: UX 101
bruberu 3d2d711
feat: I should probably push these textures too
bruberu b744940
feat: UX 102
bruberu feb237d
feat: a friendly nuclear engineer
bruberu e59b5b8
fix: flow rate + UI calculations
bruberu 8d3ec09
fix: NPE
bruberu 3224647
fix: more NPEs :weary:
bruberu 5bf6c45
fix: non-updating block
bruberu fd5e965
fix: now consumes fuel on first place
bruberu ea1cb8b
feat: describe EU/t for water a little better
bruberu 4ecacb0
fix: recheck fuel if work check failed before
bruberu b7d6031
feat: partial fuel rods (I want to boil myself alive in glyoxylic acid)
bruberu d3fa666
feat: base fuel rods on partial fuel
bruberu 9440009
fix: remove a beautiful progress bar
bruberu b766dfa
fix: "pathIsClear"
bruberu 040258d
fix: villager feedback
bruberu d43d9c7
fix: 7-9 is now 7/16-9/16
bruberu 24252ef
fix: it is NPE sunday today
bruberu d3e09f8
fix: potential floating point errors
bruberu da4c015
fix: remove debug depletion
bruberu aa7f289
feat: display max power limitation better
bruberu 6e3e340
feat: critical rod insertion -> generation rate
bruberu d365547
fix: temperature min limit & control rod normalization
bruberu 7f4535b
fix: prevent NaN
bruberu 4ca352e
fix: more things I can technically blame on Zalgo
bruberu 43ebbf7
feat: fuel and coolant tooltips
bruberu e44911e
feat: gas centrifuge column recipe
bruberu f09661a
fix: material-registry-agnostic
bruberu 491b064
feat: try to lower reactor volatility
bruberu 7c00bfb
feat: ok that was a bad idea
bruberu 9ad1287
fix: reactor meltdown NPE #1234798
bruberu 9e71ba6
Merge remote-tracking branch 'refs/remotes/origin/master' into nuclea…
bruberu b80623b
feat: upstream merge and deal with fluidstoragekeys
bruberu 41d7bd7
feat: fluid tooltips now work only with the right storage key
bruberu 20d3f9f
More nuclear fission stuff (#2533)
vrejhead 3c4c888
feat: spotless + power overhaul
bruberu 41cc55f
feat: rebalance a little
bruberu 4e126df
feat: logarithmic power
bruberu 44a0b02
feat: mean generation time time
bruberu 395c450
fix: temperature spikes
bruberu f310069
feat: add k_eff to reactor NBT
bruberu d9d7e45
fix: zbodlezz
bruberu 1c720f2
feat: redo control rod regulation
bruberu 23dbfd9
fix: that is not the right array
bruberu af08d1b
feat: large reactor stability
bruberu 554ddb5
fix: more robust shutdown
bruberu 2d7ad90
fix: I want to say a curse word to spotless
bruberu 002c9b5
feat: smiley lobotomy procedure #1
bruberu 56c90c4
fix: sseltops
bruberu a4b0b20
feat: delta temperature (lobotomy #2)
bruberu 7786b20
feat: fuel rod danger levels
bruberu 8ad1990
Assorted fission fixes (#2536)
loxoDev 537300f
feat: extended facing
bruberu baf6243
feat: coolant calculations
bruberu 0e9772c
fix: spptptptpppttptppt
bruberu 44a5c06
fix: partialCoolant actually works, maybe
bruberu a3601f0
feat: set default balancing to 14, thanks to whatsapp2
bruberu e1506eb
feat: refactor PrimitiveRecipeLogic
bruberu 19240f0
feat: all review comments responded to
bruberu b872d3b
feat: parallel tooltip (accidentally missed it)
bruberu 91e62e5
fix: custom preview relative directions
bruberu f51c30b
feat: better spent fuel pool structure
bruberu 39398e6
feat: making even better fuel pool structure when I have a job to get…
bruberu 61e8149
fix: https://www.youtube.com/watch?v=ClUxYeWXnLY
bruberu 1a12ced
feat: double nuclear reprocessing speeds
bruberu ae14020
fix: stoich
bruberu 1be5dc7
feat: LowEnrichedUraniumDioxide use
bruberu bef429f
fix: alson's comments
bruberu 7d67e3a
fix: spitless
bruberu bb01459
feat: the overhaul, part one
bruberu 259db88
feat: primitive multiblocks plan C plus homogenousmore
bruberu c144c74
feat: overhaul part 2 so I can see more review comments
bruberu 5e0974d
feat: overhaul part 3
bruberu eb5b6a5
feat: overhaul part 4
bruberu 69751b3
feat: overhaul part 5: panelling edition
bruberu 52a55db
fix: sporkless again
bruberu 43767a6
feat: gas centrifuge columns now look OK
bruberu 9abbc5c
feat: the great refactor
bruberu f2f18dc
feat: JEI integration
bruberu b2f41c2
feat: revert the en-enterprisation
bruberu 6270fad
fix: plutonium localization + structure checking + geometry hiccups
bruberu 200c314
fix: setPartialFuel skill issue
bruberu a98dd0f
feat: balance conversation part 1
bruberu 644941a
feat: balance conversation part 2
bruberu cda4923
feat: JEI improvements
bruberu 4e7eb53
fix: colors
bruberu e467afa
feat: widget locking displays
bruberu fc96413
fix: spotless? more like feckless
bruberu da6c02b
feat: tellurium in LowGradeMOX
bruberu f3d9428
feat: rebalance for realism *and* gameplay
bruberu 60c1570
fix: forgor promethium
bruberu a409d62
feat: config to bump down heat exchanger efficiency
bruberu d75dbd6
fix: JEI pages + GUI scaling
bruberu 4c9fa32
fix: oh right spotless exists
bruberu d94ff6c
feat: use block/block
bruberu be22a9d
feat: set to ZPM (whatsapp2 recommendation)
bruberu 7715045
refactor: hashed map -> string-indexed map
bruberu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Nuclear Test Release | ||
name: Java CI with Gradle on main Commit | ||
|
||
on: | ||
push: | ||
|
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
15 changes: 15 additions & 0 deletions
15
src/main/java/gregtech/api/capability/ICoolantHandler.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,15 @@ | ||
package gregtech.api.capability; | ||
|
||
import gregtech.api.capability.impl.LockableFluidTank; | ||
import gregtech.api.unification.material.Material; | ||
|
||
import net.minecraftforge.fluids.Fluid; | ||
|
||
public interface ICoolantHandler extends ILockableHandler<Fluid> { | ||
|
||
Material getCoolant(); | ||
|
||
void setCoolant(Material material); | ||
bruberu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
LockableFluidTank getFluidTank(); | ||
} |
24 changes: 24 additions & 0 deletions
24
src/main/java/gregtech/api/capability/IFuelRodHandler.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,24 @@ | ||
package gregtech.api.capability; | ||
|
||
import gregtech.api.items.itemhandlers.LockableItemStackHandler; | ||
import gregtech.api.nuclear.fission.components.FuelRod; | ||
import gregtech.api.unification.material.Material; | ||
|
||
import net.minecraft.item.ItemStack; | ||
|
||
public interface IFuelRodHandler extends ILockableHandler<ItemStack> { | ||
|
||
Material getFuel(); | ||
|
||
void setFuel(Material material); | ||
|
||
Material getPartialFuel(); | ||
bruberu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
// Set the fuel type that's currently being processed by the reactor, and succeeds in doing so only if it is a | ||
// fission fuel. Returns true if the partial fuel changed. | ||
boolean setPartialFuel(Material material); | ||
bruberu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
void setInternalFuelRod(FuelRod rod); | ||
|
||
LockableItemStackHandler getStackHandler(); | ||
} |
10 changes: 10 additions & 0 deletions
10
src/main/java/gregtech/api/capability/ILockableHandler.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,10 @@ | ||
package gregtech.api.capability; | ||
|
||
public interface ILockableHandler<T> { | ||
|
||
void setLock(boolean isLocked); | ||
|
||
boolean isLocked(); | ||
|
||
T getLockedObject(); | ||
bruberu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} |
80 changes: 80 additions & 0 deletions
80
src/main/java/gregtech/api/capability/impl/LockableFluidTank.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,80 @@ | ||
package gregtech.api.capability.impl; | ||
|
||
import gregtech.api.capability.ILockableHandler; | ||
import gregtech.api.metatileentity.MetaTileEntity; | ||
|
||
import net.minecraft.nbt.NBTTagCompound; | ||
import net.minecraftforge.fluids.Fluid; | ||
import net.minecraftforge.fluids.FluidRegistry; | ||
import net.minecraftforge.fluids.FluidStack; | ||
import net.minecraftforge.fluids.FluidTank; | ||
|
||
public class LockableFluidTank extends NotifiableFluidTank implements ILockableHandler<Fluid> { | ||
|
||
private boolean locked; | ||
private Fluid lockedFluid; | ||
|
||
public LockableFluidTank(int capacity, MetaTileEntity entityToNotify, boolean isExport) { | ||
super(capacity, entityToNotify, isExport); | ||
} | ||
|
||
@Override | ||
public Fluid getLockedObject() { | ||
return lockedFluid; | ||
} | ||
|
||
@Override | ||
public void setLock(boolean isLocked) { | ||
locked = isLocked; | ||
} | ||
|
||
@Override | ||
public int fill(FluidStack resource, boolean doFill) { | ||
int filled = super.fill(resource, doFill); | ||
if (doFill && this.fluid != null && this.fluid.amount != 0) { | ||
this.lockedFluid = this.fluid.getFluid(); | ||
} | ||
return filled; | ||
} | ||
|
||
@Override | ||
public void setFluid(FluidStack fluid) { | ||
super.setFluid(fluid); | ||
if (this.fluid != null && this.fluid.amount != 0) { | ||
this.lockedFluid = this.fluid.getFluid(); | ||
} | ||
} | ||
|
||
@Override | ||
public boolean isLocked() { | ||
return locked; | ||
} | ||
|
||
@Override | ||
public boolean canFillFluidType(FluidStack fluid) { | ||
if (locked && fluid.getFluid() != lockedFluid) { | ||
return false; | ||
} | ||
return super.canFillFluidType(fluid); | ||
} | ||
|
||
@Override | ||
public FluidTank readFromNBT(NBTTagCompound nbt) { | ||
super.readFromNBT(nbt); | ||
if (nbt.hasKey("LockedFluid")) { | ||
this.lockedFluid = FluidRegistry.getFluid(nbt.getString("LockedFluid")); | ||
} else if (this.fluid != null && this.fluid.amount != 0) { | ||
this.lockedFluid = this.fluid.getFluid(); | ||
} | ||
return this; | ||
} | ||
|
||
@Override | ||
public NBTTagCompound writeToNBT(NBTTagCompound nbt) { | ||
super.writeToNBT(nbt); | ||
if (lockedFluid != null) { | ||
nbt.setString("LockedFluid", lockedFluid.getName()); | ||
} | ||
return nbt; | ||
} | ||
} |
55 changes: 55 additions & 0 deletions
55
src/main/java/gregtech/api/capability/impl/NoEnergyMultiblockRecipeLogic.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,55 @@ | ||
package gregtech.api.capability.impl; | ||
|
||
import gregtech.api.GTValues; | ||
import gregtech.api.metatileentity.multiblock.RecipeMapMultiblockController; | ||
import gregtech.api.recipes.logic.OverclockingLogic; | ||
import gregtech.api.recipes.recipeproperties.IRecipePropertyStorage; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
|
||
public class NoEnergyMultiblockRecipeLogic extends MultiblockRecipeLogic { | ||
bruberu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
public NoEnergyMultiblockRecipeLogic(RecipeMapMultiblockController tileEntity) { | ||
super(tileEntity); | ||
} | ||
|
||
protected long getEnergyInputPerSecond() { | ||
return 2147483647L; | ||
} | ||
|
||
protected long getEnergyStored() { | ||
return 0L; | ||
} | ||
|
||
protected long getEnergyCapacity() { | ||
return 2147483647L; | ||
} | ||
|
||
protected boolean drawEnergy(int recipeEUt, boolean simulate) { | ||
return true; | ||
} | ||
|
||
public long getMaxVoltage() { | ||
return 1L; | ||
} | ||
|
||
protected int[] runOverclockingLogic(@NotNull IRecipePropertyStorage propertyStorage, int recipeEUt, | ||
long maxVoltage, int recipeDuration, int amountOC) { | ||
return OverclockingLogic.standardOverclockingLogic(1, this.getMaxVoltage(), recipeDuration, amountOC, | ||
this.getOverclockingDurationDivisor(), this.getOverclockingVoltageMultiplier()); | ||
} | ||
|
||
public long getMaximumOverclockVoltage() { | ||
return GTValues.V[1]; | ||
} | ||
|
||
public void invalidate() { | ||
this.previousRecipe = null; | ||
this.progressTime = 0; | ||
this.maxProgressTime = 0; | ||
this.recipeEUt = 0; | ||
this.fluidOutputs = null; | ||
this.itemOutputs = null; | ||
this.setActive(false); | ||
} | ||
} |
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
61 changes: 61 additions & 0 deletions
61
src/main/java/gregtech/api/gui/widgets/RecolorableTextWidget.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,61 @@ | ||
package gregtech.api.gui.widgets; | ||
|
||
import gregtech.api.gui.IRenderContext; | ||
import gregtech.api.util.Position; | ||
|
||
import net.minecraft.client.Minecraft; | ||
import net.minecraft.client.gui.FontRenderer; | ||
import net.minecraft.network.PacketBuffer; | ||
import net.minecraft.util.text.ITextComponent; | ||
import net.minecraftforge.fml.relauncher.Side; | ||
import net.minecraftforge.fml.relauncher.SideOnly; | ||
|
||
import java.util.List; | ||
import java.util.function.Consumer; | ||
import java.util.function.IntSupplier; | ||
|
||
/** | ||
* Represents a text-component based widget, which obtains | ||
* text from server and automatically synchronizes it with clients | ||
*/ | ||
public class RecolorableTextWidget extends AdvancedTextWidget { | ||
bruberu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
private final IntSupplier colorSupplier; | ||
private int color; | ||
|
||
public RecolorableTextWidget(int xPosition, int yPosition, Consumer<List<ITextComponent>> text, | ||
IntSupplier colorSupplier) { | ||
super(xPosition, yPosition, text, 0); | ||
this.colorSupplier = colorSupplier; | ||
} | ||
|
||
@Override | ||
public void detectAndSendChanges() { | ||
super.detectAndSendChanges(); | ||
int color = colorSupplier.getAsInt(); | ||
if (this.color != color) { | ||
this.color = color; | ||
writeUpdateInfo(2, buf -> buf.writeVarInt(color)); | ||
} | ||
} | ||
|
||
@Override | ||
public void readUpdateInfo(int id, PacketBuffer buffer) { | ||
super.readUpdateInfo(id, buffer); | ||
if (id == 2) { | ||
color = buffer.readVarInt(); | ||
} | ||
} | ||
|
||
@Override | ||
@SideOnly(Side.CLIENT) | ||
public void drawInBackground(int mouseX, int mouseY, float partialTicks, IRenderContext context) { | ||
super.drawInBackground(mouseX, mouseY, partialTicks, context); | ||
FontRenderer fontRenderer = Minecraft.getMinecraft().fontRenderer; | ||
Position position = getPosition(); | ||
for (int i = 0; i < displayText.size(); i++) { | ||
fontRenderer.drawString(displayText.get(i).getFormattedText(), position.x, | ||
position.y + i * (fontRenderer.FONT_HEIGHT + 2), color); | ||
} | ||
} | ||
} |
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll need to remove this workflow before merging this PR. Not something to do quite yet though, writing this as a reminder for later.