Skip to content

Commit

Permalink
attempt to fix fake players
Browse files Browse the repository at this point in the history
  • Loading branch information
progwml6 committed Feb 1, 2014
1 parent d559ab4 commit 83fdeae
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
@@ -1,5 +1,7 @@
package tmechworks.blocks.logic;

import com.mojang.authlib.GameProfile;

import mantle.blocks.BlockUtils;
import mantle.blocks.abstracts.InventoryLogic;
import mantle.blocks.iface.*;
Expand Down Expand Up @@ -48,7 +50,7 @@ public void setworldObj (World par1World)
{
this.field_145850_b = par1World;
if (!par1World.isRemote)
fakePlayer = new FakePlayerLogic(field_145850_b, "Player.Drawbridge", this);
fakePlayer = new FakePlayerLogic((WorldServer)field_145850_b, new GameProfile(null, "Player.Drawbridge"), (InventoryLogic)this);
}

@Override
Expand Down
16 changes: 15 additions & 1 deletion src/main/java/tmechworks/blocks/logic/DrawbridgeLogic.java
@@ -1,5 +1,7 @@
package tmechworks.blocks.logic;

import com.mojang.authlib.GameProfile;

import mantle.blocks.BlockUtils;
import mantle.blocks.abstracts.InventoryLogic;
import mantle.blocks.iface.*;
Expand Down Expand Up @@ -47,7 +49,7 @@ public void setworldObj (World par1World)
{
this.field_145850_b = par1World;
if (!field_145850_b.isRemote)
fakePlayer = new FakePlayerLogic(field_145850_b, "Player.Drawbridge", this);
fakePlayer = new FakePlayerLogic((WorldServer)field_145850_b, new GameProfile(null, "Player.Drawbridge"), (InventoryLogic)this);
}

@Override
Expand Down Expand Up @@ -552,4 +554,16 @@ public void onInventoryChanged ()
}
this.field_145850_b.func_147471_g(field_145851_c, field_145848_d, field_145849_e);
}

@Override
public String func_145825_b ()
{
return getDefaultName();
}

@Override
public boolean func_145818_k_ ()
{
return true;
}
}

0 comments on commit 83fdeae

Please sign in to comment.