Skip to content

Commit 1e83342

Browse files
committed
[Tickrate] Fixed error in singleplayer
1 parent f0de0ee commit 1e83342

File tree

3 files changed

+2
-7
lines changed

3 files changed

+2
-7
lines changed

src/main/java/com/minecrafttas/tasmod/savestates/SavestateHandlerClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ public static void loadstate(String nameOfSavestate) throws Exception {
222222
*
223223
* We expect to start at tick 10 WITHOUT clearing the controller.
224224
* If we were to replace the controller, everything above tick 10 would be lost.
225-
* So we only set the index to 10, preload and preload the inputs.
225+
* So we only set the index to 10 and preload the inputs.
226226
*
227227
* VV
228228
* 0 10 20

src/main/java/com/minecrafttas/tasmod/savestates/handlers/SavestatePlayerHandler.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ public void loadAndSendMotionToPlayer() {
152152
public void changeDimensionDangerously(EntityPlayerMP player, int dimensionTo) {
153153
int dimensionFrom = player.dimension;
154154
WorldServer worldServerFrom = this.server.getWorld(dimensionFrom);
155-
// WorldServer worldServerTo = this.server.getWorld(dimensionTo);
156155

157156
//@formatter:off
158157
player.connection
@@ -167,10 +166,6 @@ public void changeDimensionDangerously(EntityPlayerMP player, int dimensionTo) {
167166
//@formatter:on
168167
worldServerFrom.removeEntityDangerously(player);
169168
player.isDead = false;
170-
// worldServerTo.spawnEntity(player);
171-
// worldServerTo.updateEntityWithOptionalForce(player, false);
172-
// player.setWorld(worldServerTo);
173-
// player.interactionManager.setWorld(worldServerTo);
174169
}
175170

176171
public void clearScoreboard() {

src/main/java/com/minecrafttas/tasmod/tickratechanger/TickrateChangerServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ private void advanceServerTick() {
208208
*/
209209
@Override
210210
public void onClientCompleteAuthentication(String username) {
211-
if (TASmod.getServerInstance().isDedicatedServer()) {
211+
if (TASmod.getServerInstance() != null && TASmod.getServerInstance().isDedicatedServer()) {
212212
log("Sending the current tickrate (" + ticksPerSecond + ") to " + username);
213213

214214
try {

0 commit comments

Comments
 (0)