More Progress on Rewrite
Fixed the code in DDTeleporter and made minor changes to other classes that depended on those fixes. Ensured that PocketManager's load, save, and unload methods are called appropriately and rewrote some of their code. Made various changes in other classes (e.g. EventHookContainer, PlayerRespawnTracker) to pass them references to DDProperties through their constructors instead of having them rely on DDProperties.instance() - this is a better programming practice in the long run. Renamed initialization methods in mod_pocketDim to make it clear that they're called on events. Commented out command registration in mod_pocketDim so that we can test DD as soon as PacketHandler is fixed, without worrying about fixing the command classes.
This commit is contained in:
@@ -3,7 +3,7 @@ package StevenDimDoors.mod_pocketDim.ticking;
|
||||
import java.util.ArrayList;
|
||||
import java.util.EnumSet;
|
||||
|
||||
import StevenDimDoors.mod_pocketDim.mod_pocketDim;
|
||||
import StevenDimDoors.mod_pocketDim.DDTeleporter;
|
||||
import cpw.mods.fml.common.ITickHandler;
|
||||
import cpw.mods.fml.common.TickType;
|
||||
|
||||
@@ -43,9 +43,9 @@ public class CommonTickHandler implements ITickHandler, IRegularTickSender
|
||||
|
||||
//TODO: Stuck this in here because it's already rather hackish.
|
||||
//We should standardize this as an IRegularTickReceiver in the future. ~SenseiKiwi
|
||||
if (mod_pocketDim.teleTimer > 0)
|
||||
if (DDTeleporter.cooldown > 0)
|
||||
{
|
||||
mod_pocketDim.teleTimer--;
|
||||
DDTeleporter.cooldown--;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@ public class MobMonolith extends EntityFlying implements IMob
|
||||
(int) this.posY + 500,
|
||||
(int) this.posZ + MathHelper.getRandomIntegerInRange(rand, -250, 250),
|
||||
properties.LimboDimensionID);
|
||||
DDTeleporter.teleport(entityPlayer, destination);
|
||||
DDTeleporter.teleportEntity(entityPlayer, destination);
|
||||
this.aggro = 0;
|
||||
|
||||
entityPlayer.worldObj.playSoundAtEntity(entityPlayer,"mods.DimDoors.sfx.crack",13, 1);
|
||||
|
||||
Reference in New Issue
Block a user