mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-25 22:34:33 +00:00
Fix camouflage and add agriculture tab
This commit is contained in:
1 parent
86a93b29c0
commit
3eaf9d4d30
15 files changed
+158
-30
No files matched your search
@@ -45,7 +45,8 @@ import forestry.core.utils.CamouflageUtil;
|
||||
import forestry.energy.EnergyManager;
|
||||
import forestry.greenhouse.blocks.BlockGreenhouse;
|
||||
import forestry.greenhouse.blocks.BlockGreenhouseType;
|
||||
import forestry.greenhouse.network.packets.PacketCamouflageUpdate;
|
||||
import forestry.greenhouse.network.packets.PacketCamouflageUpdateToClient;
|
||||
import forestry.greenhouse.network.packets.PacketCamouflageUpdateToServer;
|
||||
import forestry.greenhouse.tiles.TileGreenhouseSprinkler;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -259,16 +260,20 @@ public class GreenhouseController extends RectangularMultiblockControllerBase im
|
||||
return;
|
||||
}
|
||||
|
||||
if (worldObj != null && worldObj.isRemote) {
|
||||
for(IMultiblockComponent comp : connectedParts){
|
||||
if(comp instanceof ICamouflagedBlock){
|
||||
ICamouflagedBlock camBlock = (ICamouflagedBlock) comp;
|
||||
if(camBlock.getCamouflageType() == type){
|
||||
worldObj.markBlockForUpdate(camBlock.getCoordinates());
|
||||
if (worldObj != null) {
|
||||
if(worldObj.isRemote){
|
||||
for(IMultiblockComponent comp : connectedParts){
|
||||
if(comp instanceof ICamouflagedBlock){
|
||||
ICamouflagedBlock camBlock = (ICamouflagedBlock) comp;
|
||||
if(camBlock.getCamouflageType() == type){
|
||||
worldObj.markBlockForUpdate(camBlock.getCoordinates());
|
||||
}
|
||||
}
|
||||
}
|
||||
Proxies.net.sendToServer(new PacketCamouflageUpdateToServer(this, type, true));
|
||||
}else{
|
||||
Proxies.net.sendNetworkPacket(new PacketCamouflageUpdateToClient(this, type, true), worldObj);
|
||||
}
|
||||
Proxies.net.sendToServer(new PacketCamouflageUpdate(this, type, true));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user