Started work on Levers

Made part conversion send the desc packet to the client rather than do a local conversion
This commit is contained in:
Chicken Bones committed 2013-06-02 13:38:59 +10:00
1 parent ae74440783
commit 931da01077
10 files changed
+246 -91

No files matched your search

+7 -2
View File
@@ -14,6 +14,7 @@ public class Content implements IPartFactory, IPartConverter
public TMultiPart createPart(String name, boolean client)
{
if(name.equals("mc_torch")) return new TorchPart();
if(name.equals("mc_lever")) return new LeverPart();
return null;
}
@@ -22,14 +23,16 @@ public class Content implements IPartFactory, IPartConverter
{
MultiPartRegistry.registerConverter(this);
MultiPartRegistry.registerParts(this, new String[]{
"mc_torch"
"mc_torch",
"mc_lever"
});
}
@Override
public boolean canConvert(int blockID)
{
return blockID == Block.torchWood.blockID;
return blockID == Block.torchWood.blockID ||
blockID == Block.lever.blockID;
}
@Override
@@ -39,6 +42,8 @@ public class Content implements IPartFactory, IPartConverter
int meta = world.getBlockMetadata(pos.x, pos.y, pos.z);
if(id == Block.torchWood.blockID)
return new TorchPart(meta);
if(id == Block.lever.blockID)
return new LeverPart(meta);
return null;
}