Skip to content

Commit 57a14af

Browse files
authored
Merge pull request #2 from bsixel/GateMergeEvent
Removed worldName from event
2 parents a68cd7c + 67b7ec5 commit 57a14af

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

src/mod/gcewing/sg/event/SGMergeEvent.java

+3-9
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ public class SGMergeEvent extends Event {
1111
Private because the event should be read-only - including both the gatePosition and address
1212
in case changes are made to gate address generation
1313
*/
14-
private final String worldName;
1514
private final BlockPos gatePosition;
1615
private final String address;
1716
private final boolean merged;
@@ -20,24 +19,19 @@ public class SGMergeEvent extends Event {
2019
/**
2120
* Fired when a Stargate is merged or unmerged (the multiblock structure is completed or broken)
2221
*/
23-
public SGMergeEvent(String worldName, String address, boolean merged, BlockPos gatePosition, World world) {
24-
this.worldName = worldName;
22+
public SGMergeEvent(String address, boolean merged, BlockPos gatePosition, World world) {
2523
this.gatePosition = gatePosition;
2624
this.address = address;
2725
this.merged = merged;
2826
this.world = world;
2927
}
3028

31-
public static SGMergeEvent fireEvent(String worldName, String address, boolean merged, BlockPos gatePosition, World world) {
32-
SGMergeEvent event = new SGMergeEvent(worldName, address, merged, gatePosition, world);
29+
public static SGMergeEvent fireEvent(String address, boolean merged, BlockPos gatePosition, World world) {
30+
SGMergeEvent event = new SGMergeEvent(address, merged, gatePosition, world);
3331
MinecraftForge.EVENT_BUS.post(event);
3432
return event;
3533
}
3634

37-
public String getWorldName() {
38-
return worldName;
39-
}
40-
4135
public BlockPos getGatePosition() {
4236
return gatePosition;
4337
}

src/mod/gcewing/sg/tileentity/SGBaseTE.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ public void setMerged(boolean state) {
833833
if (logStargateEvents) {
834834
log.info(String.format("STARGATE %s %s %s %s", action, name, pos, address));
835835
}
836-
SGMergeEvent.fireEvent(name, this.homeAddress, isMerged, this.pos, getWorld());
836+
SGMergeEvent.fireEvent(this.homeAddress, isMerged, this.pos, getWorld());
837837
if (state) {
838838
GeneralAddressRegistry.addAddress(world, this.homeAddress);
839839
} else {

0 commit comments

Comments
 (0)