Rename BeaconBeamDTO.pos -> blockPos
This commit is contained in:
+9
-9
@@ -94,8 +94,8 @@ public class BeaconRenderHandler
|
||||
for (int i = 0; i < newBeamList.size(); i++)
|
||||
{
|
||||
BeaconBeamDTO beam = newBeamList.get(i);
|
||||
newBeamByPos.put(beam.pos, beam);
|
||||
allPosSet.add(beam.pos);
|
||||
newBeamByPos.put(beam.blockPos, beam);
|
||||
allPosSet.add(beam.blockPos);
|
||||
}
|
||||
|
||||
// get existing beams
|
||||
@@ -104,8 +104,8 @@ public class BeaconRenderHandler
|
||||
for (int i = 0; i < existingBeamList.size(); i++)
|
||||
{
|
||||
BeaconBeamDTO beam = existingBeamList.get(i);
|
||||
existingBeamByPos.put(beam.pos, beam);
|
||||
allPosSet.add(beam.pos);
|
||||
existingBeamByPos.put(beam.blockPos, beam);
|
||||
allPosSet.add(beam.blockPos);
|
||||
}
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ public class BeaconRenderHandler
|
||||
for (int i = 0; i < existingBeamList.size(); i++)
|
||||
{
|
||||
BeaconBeamDTO beam = existingBeamList.get(i);
|
||||
this.stopRenderingBeaconAtPos(beam.pos);
|
||||
this.stopRenderingBeaconAtPos(beam.blockPos);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,11 +178,11 @@ public class BeaconRenderHandler
|
||||
|
||||
private void startRenderingBeacon(BeaconBeamDTO beacon)
|
||||
{
|
||||
if (this.beaconBlockPosSet.add(beacon.pos))
|
||||
if (this.beaconBlockPosSet.add(beacon.blockPos))
|
||||
{
|
||||
DhApiRenderableBox beaconBox = new DhApiRenderableBox(
|
||||
new DhApiVec3d(beacon.pos.x, beacon.pos.y+1, beacon.pos.z),
|
||||
new DhApiVec3d(beacon.pos.x+1, BEAM_TOP_Y, beacon.pos.z+1),
|
||||
new DhApiVec3d(beacon.blockPos.x, beacon.blockPos.y+1, beacon.blockPos.z),
|
||||
new DhApiVec3d(beacon.blockPos.x+1, BEAM_TOP_Y, beacon.blockPos.z+1),
|
||||
beacon.color,
|
||||
EDhApiBlockMaterial.ILLUMINATED
|
||||
);
|
||||
@@ -208,7 +208,7 @@ public class BeaconRenderHandler
|
||||
|
||||
private void updateBeaconColor(BeaconBeamDTO newBeam)
|
||||
{
|
||||
DhBlockPos pos = newBeam.pos;
|
||||
DhBlockPos pos = newBeam.blockPos;
|
||||
for (int i = 0; i < this.beaconBoxGroup.size(); i++)
|
||||
{
|
||||
DhApiRenderableBox box = this.beaconBoxGroup.get(i);
|
||||
|
||||
@@ -21,14 +21,13 @@ package com.seibel.distanthorizons.core.sql.dto;
|
||||
|
||||
import com.seibel.distanthorizons.core.dataObjects.fullData.sources.FullDataSourceV2;
|
||||
import com.seibel.distanthorizons.core.pos.DhBlockPos;
|
||||
import com.seibel.distanthorizons.core.pos.DhBlockPos;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
/** handles storing {@link FullDataSourceV2}'s in the database. */
|
||||
public class BeaconBeamDTO implements IBaseDTO<DhBlockPos>
|
||||
{
|
||||
public DhBlockPos pos;
|
||||
public DhBlockPos blockPos;
|
||||
public Color color;
|
||||
|
||||
|
||||
@@ -37,9 +36,9 @@ public class BeaconBeamDTO implements IBaseDTO<DhBlockPos>
|
||||
// constructor //
|
||||
//=============//
|
||||
|
||||
public BeaconBeamDTO(DhBlockPos pos, Color color)
|
||||
public BeaconBeamDTO(DhBlockPos blockPos, Color color)
|
||||
{
|
||||
this.pos = pos;
|
||||
this.blockPos = blockPos;
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
@@ -50,6 +49,6 @@ public class BeaconBeamDTO implements IBaseDTO<DhBlockPos>
|
||||
//===========//
|
||||
|
||||
@Override
|
||||
public DhBlockPos getKey() { return this.pos; }
|
||||
public DhBlockPos getKey() { return this.blockPos; }
|
||||
|
||||
}
|
||||
|
||||
@@ -100,9 +100,9 @@ public class BeaconBeamRepo extends AbstractDhRepo<DhBlockPos, BeaconBeamDTO>
|
||||
PreparedStatement statement = this.createPreparedStatement(sql);
|
||||
|
||||
int i = 1;
|
||||
statement.setObject(i++, dto.pos.x);
|
||||
statement.setObject(i++, dto.pos.y);
|
||||
statement.setObject(i++, dto.pos.z);
|
||||
statement.setObject(i++, dto.blockPos.x);
|
||||
statement.setObject(i++, dto.blockPos.y);
|
||||
statement.setObject(i++, dto.blockPos.z);
|
||||
|
||||
statement.setObject(i++, dto.color.getRed());
|
||||
statement.setObject(i++, dto.color.getGreen());
|
||||
@@ -132,9 +132,9 @@ public class BeaconBeamRepo extends AbstractDhRepo<DhBlockPos, BeaconBeamDTO>
|
||||
|
||||
statement.setObject(i++, System.currentTimeMillis()); // last modified unix time
|
||||
|
||||
statement.setObject(i++, dto.pos.x);
|
||||
statement.setObject(i++, dto.pos.y);
|
||||
statement.setObject(i++, dto.pos.z);
|
||||
statement.setObject(i++, dto.blockPos.x);
|
||||
statement.setObject(i++, dto.blockPos.y);
|
||||
statement.setObject(i++, dto.blockPos.z);
|
||||
|
||||
return statement;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user