mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-22 12:59:44 +00:00
Add camouflage system, add greenhouse door and clean up
This commit is contained in:
1 parent
7238886d00
commit
bde92c4afc
158 files changed
+1476
-491
No files matched your search
@@ -0,0 +1,12 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.core;
|
||||
|
||||
public enum EnumCamouflageType {
|
||||
DEFAULT, GLASS, DOOR;
|
||||
|
||||
public static final EnumCamouflageType[] VALUES = values();
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.core;
|
||||
|
||||
import forestry.core.tiles.ILocatable;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface ICamouflageHandler extends ILocatable {
|
||||
|
||||
ItemStack getCamouflageBlock(EnumCamouflageType type);
|
||||
|
||||
void setCamouflageBlock(EnumCamouflageType type, ItemStack camouflageBlock);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.core;
|
||||
|
||||
import forestry.core.tiles.ILocatable;
|
||||
|
||||
public interface ICamouflagedBlock extends ILocatable {
|
||||
|
||||
EnumCamouflageType getCamouflageType();
|
||||
|
||||
}
|
||||
@@ -10,7 +10,7 @@ import forestry.api.multiblock.IGreenhouseController;
|
||||
public class DefaultGreenhouseListener implements IGreenhouseListener {
|
||||
|
||||
@Override
|
||||
public <G extends IGreenhouseController & IGreenhouseHousing> boolean canWork(G greenhouse) {
|
||||
public <G extends IGreenhouseController & IGreenhouseHousing> boolean canWork(G greenhouse, boolean canWork) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
package forestry.api.greenhouse;
|
||||
|
||||
public class GreenhouseManager {
|
||||
|
||||
public static IGreenhouseItemAccess greenhouseItemAccess;
|
||||
|
||||
}
|
||||
@@ -5,8 +5,6 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.greenhouse;
|
||||
|
||||
import forestry.api.core.EnumHumidity;
|
||||
import forestry.api.core.EnumTemperature;
|
||||
import forestry.api.core.IErrorLogicSource;
|
||||
import forestry.core.tiles.IClimatised;
|
||||
import net.minecraft.util.BlockPos;
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.greenhouse;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import forestry.api.core.EnumCamouflageType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IGreenhouseItemAccess {
|
||||
|
||||
void registerGreenhouseGlass(@Nonnull ItemStack glass);
|
||||
|
||||
boolean isGreenhouseGlass(@Nonnull ItemStack glass);
|
||||
|
||||
void addToCamouflageBlockBlackList(@Nonnull EnumCamouflageType type, @Nonnull ItemStack camouflageBlock);
|
||||
|
||||
boolean isOnCamouflageBlockBlackList(@Nonnull EnumCamouflageType type, @Nonnull ItemStack camouflageBlock);
|
||||
|
||||
}
|
||||
@@ -10,11 +10,12 @@ import forestry.api.multiblock.IGreenhouseController;
|
||||
public interface IGreenhouseListener {
|
||||
|
||||
/**
|
||||
* Called before the greenhouse work
|
||||
* Called before the greenhouse work.
|
||||
*
|
||||
* @param greenhouse The greenhouse multiblock
|
||||
* @return Can the greenhouse work
|
||||
* @param greenhouse The greenhouse multiblock.
|
||||
* @param canWork The actual {@link Boolean} value.
|
||||
* @return True if the greenhouse can work.
|
||||
*/
|
||||
<G extends IGreenhouseController & IGreenhouseHousing> boolean canWork(G greenhouse);
|
||||
<G extends IGreenhouseController & IGreenhouseHousing> boolean canWork(G greenhouse, boolean canWork);
|
||||
|
||||
}
|
||||
@@ -16,6 +16,9 @@ public interface IGreenhouseComponent<T extends IMultiblockLogicGreenhouse> exte
|
||||
interface Listener extends IGreenhouseComponent {
|
||||
IGreenhouseListener getGreenhouseListener();
|
||||
}
|
||||
|
||||
interface Door extends IGreenhouseComponent {
|
||||
}
|
||||
|
||||
interface Climatiser extends IGreenhouseComponent {
|
||||
<G extends IGreenhouseController & IGreenhouseHousing & IClimateControlled> void changeClimate(int tickCount, G greenhouse);
|
||||
|
||||
Reference in new issue
Block a user