mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-26 00:38:35 +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();
|
Direction getOrientation();
|
||||||
|
|
||||||
void resetBeam(int maxAge);
|
void resetBeam(int maxAge);
|
||||||
void resetBeam(int maxAge, int color);
|
|
||||||
int getTTL();
|
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) {
|
public void render(TileEntityAtomicReconstructor tile, float partialTicks, @Nonnull MatrixStack matrices, @Nonnull IRenderTypeBuffer buffer, int combinedLight, int combinedOverlay) {
|
||||||
ItemStack stack = tile.inv.getStackInSlot(0);
|
ItemStack stack = tile.inv.getStackInSlot(0);
|
||||||
//default color 0x1b6dff
|
//default color 0x1b6dff
|
||||||
int color = tile.getBeamColor();
|
|
||||||
Direction direction = tile.getOrientation();
|
Direction direction = tile.getOrientation();
|
||||||
float rot = 360.0f - direction.getOpposite().toYRot(); //Sigh...
|
float rot = 360.0f - direction.getOpposite().toYRot(); //Sigh...
|
||||||
float pitch = 0;
|
float pitch = 0;
|
||||||
|
@ -50,7 +49,7 @@ public class ReconstructorRenderer extends TileEntityRenderer<TileEntityAtomicRe
|
||||||
pitch = -90;
|
pitch = -90;
|
||||||
}
|
}
|
||||||
if (tile.getProgress() > 0) {
|
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();
|
tile.decTTL();
|
||||||
}
|
}
|
||||||
if (stack.isEmpty() || !(stack.getItem() instanceof ILensItem)) {
|
if (stack.isEmpty() || !(stack.getItem() instanceof ILensItem)) {
|
||||||
|
|
|
@ -41,7 +41,6 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple
|
||||||
private int oldEnergy;
|
private int oldEnergy;
|
||||||
private int ttl = 0;
|
private int ttl = 0;
|
||||||
private int maxAge = 0;
|
private int maxAge = 0;
|
||||||
private int beamColor = 0x1b6dff;
|
|
||||||
|
|
||||||
public TileEntityAtomicReconstructor() {
|
public TileEntityAtomicReconstructor() {
|
||||||
super(ActuallyBlocks.ATOMIC_RECONSTRUCTOR.getTileEntityType(), 1);
|
super(ActuallyBlocks.ATOMIC_RECONSTRUCTOR.getTileEntityType(), 1);
|
||||||
|
@ -63,18 +62,8 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void resetBeam(int maxAge) {
|
public void resetBeam(int maxAge) {
|
||||||
this.resetBeam(maxAge, 0x1b6dff);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void resetBeam(int maxAge, int color) {
|
|
||||||
this.ttl = maxAge;
|
this.ttl = maxAge;
|
||||||
this.maxAge = maxAge;
|
this.maxAge = maxAge;
|
||||||
this.beamColor = color;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getBeamColor() {
|
|
||||||
return this.beamColor;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public float getProgress(){
|
public float getProgress(){
|
||||||
|
|
|
@ -230,7 +230,7 @@ public final class AssetUtil {
|
||||||
Minecraft mc = Minecraft.getInstance();
|
Minecraft mc = Minecraft.getInstance();
|
||||||
TileEntity tile = mc.level.getBlockEntity(new BlockPos(startX, startY, startZ));
|
TileEntity tile = mc.level.getBlockEntity(new BlockPos(startX, startY, startZ));
|
||||||
if(tile instanceof TileEntityAtomicReconstructor)
|
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) {
|
/* if (mc.player.distanceToSqr(startX, startY, startZ) <= 64 || mc.player.distanceToSqr(endX, endY, endZ) <= 64) {
|
||||||
|
|
Loading…
Reference in a new issue