mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-25 16:38:33 +01:00
Compare commits
No commits in common. "48a2734161361a1b660cc572ea05ee8dcdfdd37b" and "70b0131f88461e2f890f8dd020ecc8407774ac4b" have entirely different histories.
48a2734161
...
70b0131f88
4 changed files with 2 additions and 15 deletions
|
@ -26,6 +26,5 @@ public interface IAtomicReconstructor extends IEnergyTile {
|
|||
Direction getOrientation();
|
||||
|
||||
void resetBeam(int maxAge);
|
||||
void resetBeam(int maxAge, int color);
|
||||
int getTTL();
|
||||
}
|
||||
|
|
|
@ -40,7 +40,6 @@ public class ReconstructorRenderer extends TileEntityRenderer<TileEntityAtomicRe
|
|||
public void render(TileEntityAtomicReconstructor tile, float partialTicks, @Nonnull MatrixStack matrices, @Nonnull IRenderTypeBuffer buffer, int combinedLight, int combinedOverlay) {
|
||||
ItemStack stack = tile.inv.getStackInSlot(0);
|
||||
//default color 0x1b6dff
|
||||
int color = tile.getBeamColor();
|
||||
Direction direction = tile.getOrientation();
|
||||
float rot = 360.0f - direction.getOpposite().toYRot(); //Sigh...
|
||||
float pitch = 0;
|
||||
|
@ -50,7 +49,7 @@ public class ReconstructorRenderer extends TileEntityRenderer<TileEntityAtomicRe
|
|||
pitch = -90;
|
||||
}
|
||||
if (tile.getProgress() > 0) {
|
||||
AssetUtil.renderLaser(matrices, buffer, 0, 0, 0, rot, pitch, 5, 0, color, 0.8f * tile.getProgress(), 0.2f);
|
||||
AssetUtil.renderLaser(matrices, buffer, 0, 0, 0, rot, pitch, 5, 0, 0x1b6dff, 0.8f * tile.getProgress(), 0.2f);
|
||||
tile.decTTL();
|
||||
}
|
||||
if (stack.isEmpty() || !(stack.getItem() instanceof ILensItem)) {
|
||||
|
|
|
@ -41,7 +41,6 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple
|
|||
private int oldEnergy;
|
||||
private int ttl = 0;
|
||||
private int maxAge = 0;
|
||||
private int beamColor = 0x1b6dff;
|
||||
|
||||
public TileEntityAtomicReconstructor() {
|
||||
super(ActuallyBlocks.ATOMIC_RECONSTRUCTOR.getTileEntityType(), 1);
|
||||
|
@ -63,18 +62,8 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple
|
|||
|
||||
@Override
|
||||
public void resetBeam(int maxAge) {
|
||||
this.resetBeam(maxAge, 0x1b6dff);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resetBeam(int maxAge, int color) {
|
||||
this.ttl = maxAge;
|
||||
this.maxAge = maxAge;
|
||||
this.beamColor = color;
|
||||
}
|
||||
|
||||
public int getBeamColor() {
|
||||
return this.beamColor;
|
||||
}
|
||||
|
||||
public float getProgress(){
|
||||
|
|
|
@ -230,7 +230,7 @@ public final class AssetUtil {
|
|||
Minecraft mc = Minecraft.getInstance();
|
||||
TileEntity tile = mc.level.getBlockEntity(new BlockPos(startX, startY, startZ));
|
||||
if(tile instanceof TileEntityAtomicReconstructor)
|
||||
((TileEntityAtomicReconstructor) tile).resetBeam(maxAge, color);
|
||||
((TileEntityAtomicReconstructor) tile).resetBeam(maxAge);
|
||||
|
||||
|
||||
/* if (mc.player.distanceToSqr(startX, startY, startZ) <= 64 || mc.player.distanceToSqr(endX, endY, endZ) <= 64) {
|
||||
|
|
Loading…
Reference in a new issue