mirror of
https://github.com/GTNewHorizons/Gadomancy.git
synced 2026-11-27 15:23:22 +00:00
Merge pull request #2 from calmofthestorm/register-full-mirrored-jar
Register full mirrored jars with their network once.
This commit is contained in:
1 file changed
+4
-1
@@ -26,14 +26,17 @@ public class TileRemoteJar extends TileJarFillable {
|
||||
|
||||
private int count = 0;
|
||||
|
||||
private boolean registered_to_network = false;
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
super.updateEntity();
|
||||
if (count % 3 == 0 && !getWorldObj().isRemote && networkId != null && amount < maxAmount) {
|
||||
if (count % 3 == 0 && !getWorldObj().isRemote && networkId != null && (!registered_to_network || amount < maxAmount)) {
|
||||
count = 0;
|
||||
|
||||
JarNetwork network = getNetwork(networkId);
|
||||
|
||||
registered_to_network = true;
|
||||
if(!network.jars.contains(this)) {
|
||||
network.jars.add((TileJarFillable) worldObj.getTileEntity(xCoord, yCoord, zCoord));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user