mirror of
https://github.com/GTNewHorizons/ForgeMultipart.git
synced 2026-11-20 04:09:45 +00:00
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:
1 parent
ae74440783
commit
931da01077
10 files changed
+246
-91
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user