mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-20 03:59:45 +00:00
rename ICamouflagedBlock to ICamouflagedTile
This commit is contained in:
1 parent
b1d55811a9
commit
686e2799ad
8 files changed
+18
-18
No files matched your search
+1
-1
@@ -8,7 +8,7 @@ package forestry.api.core;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface ICamouflagedBlock {
|
||||
public interface ICamouflagedTile {
|
||||
|
||||
EnumCamouflageType getCamouflageType();
|
||||
|
||||
@@ -17,7 +17,7 @@ import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
|
||||
import forestry.api.core.EnumCamouflageType;
|
||||
import forestry.api.core.ICamouflageHandler;
|
||||
import forestry.api.core.ICamouflagedBlock;
|
||||
import forestry.api.core.ICamouflagedTile;
|
||||
|
||||
public class GreenhouseEvents extends Event {
|
||||
|
||||
@@ -31,13 +31,13 @@ public class GreenhouseEvents extends Event {
|
||||
public static class CamouflageChangeEvent extends GreenhouseEvents{
|
||||
|
||||
@Nullable
|
||||
public ICamouflagedBlock camouflagedBlock;
|
||||
public ICamouflagedTile camouflagedBlock;
|
||||
@Nonnull
|
||||
public ICamouflageHandler camouflageHandler;
|
||||
@Nonnull
|
||||
public final EnumCamouflageType camouflageType;
|
||||
|
||||
public CamouflageChangeEvent(IGreenhouseState state, @Nullable ICamouflagedBlock camouflagedBlock, @Nonnull ICamouflageHandler camouflageHandler, @Nonnull EnumCamouflageType camouflageType) {
|
||||
public CamouflageChangeEvent(IGreenhouseState state, @Nullable ICamouflagedTile camouflagedBlock, @Nonnull ICamouflageHandler camouflageHandler, @Nonnull EnumCamouflageType camouflageType) {
|
||||
super(state);
|
||||
|
||||
this.camouflagedBlock = camouflagedBlock;
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.io.IOException;
|
||||
|
||||
import forestry.api.core.EnumCamouflageType;
|
||||
import forestry.api.core.ICamouflageHandler;
|
||||
import forestry.api.core.ICamouflagedBlock;
|
||||
import forestry.api.core.ICamouflagedTile;
|
||||
import forestry.api.multiblock.IMultiblockComponent;
|
||||
import forestry.core.network.DataInputStreamForestry;
|
||||
import forestry.core.network.DataOutputStreamForestry;
|
||||
@@ -79,8 +79,8 @@ public class CamouflageUtil {
|
||||
return null;
|
||||
}
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
if(tile instanceof ICamouflagedBlock){
|
||||
ICamouflagedBlock block = (ICamouflagedBlock) tile;
|
||||
if(tile instanceof ICamouflagedTile){
|
||||
ICamouflagedTile block = (ICamouflagedTile) tile;
|
||||
|
||||
return handler.getCamouflageBlock(block.getCamouflageType());
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import forestry.api.core.ForestryAPI;
|
||||
import forestry.api.core.ICamouflagedBlock;
|
||||
import forestry.api.core.ICamouflagedTile;
|
||||
import forestry.api.core.IModelManager;
|
||||
import forestry.api.core.ISpriteRegister;
|
||||
import forestry.api.core.ITextureManager;
|
||||
|
||||
@@ -15,7 +15,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import forestry.api.core.EnumCamouflageType;
|
||||
import forestry.api.core.ICamouflagedBlock;
|
||||
import forestry.api.core.ICamouflagedTile;
|
||||
import forestry.api.greenhouse.DefaultGreenhouseLogic;
|
||||
import forestry.api.greenhouse.EnumGreenhouseEventType;
|
||||
import forestry.api.greenhouse.GreenhouseManager;
|
||||
@@ -70,8 +70,8 @@ public class GreenhouseLogicGreenhouseEffect extends DefaultGreenhouseLogic impl
|
||||
|
||||
World world = controller.getWorld();
|
||||
for (IMultiblockComponent component : controller.getComponents()) {
|
||||
if (component instanceof ICamouflagedBlock) {
|
||||
ICamouflagedBlock block = (ICamouflagedBlock) component;
|
||||
if (component instanceof ICamouflagedTile) {
|
||||
ICamouflagedTile block = (ICamouflagedTile) component;
|
||||
if (block.getCamouflageType() == EnumCamouflageType.GLASS) {
|
||||
if (world.canBlockSeeSky(component.getCoordinates())) {
|
||||
ItemStack camouflageStack = CamouflageUtil.getCamouflageBlock(world, component.getCoordinates());
|
||||
|
||||
@@ -34,7 +34,7 @@ import net.minecraftforge.fluids.FluidRegistry;
|
||||
import forestry.api.core.EnumCamouflageType;
|
||||
import forestry.api.core.EnumHumidity;
|
||||
import forestry.api.core.EnumTemperature;
|
||||
import forestry.api.core.ICamouflagedBlock;
|
||||
import forestry.api.core.ICamouflagedTile;
|
||||
import forestry.api.greenhouse.EnumGreenhouseEventType;
|
||||
import forestry.api.greenhouse.GreenhouseEvents.CamouflageChangeEvent;
|
||||
import forestry.api.greenhouse.GreenhouseEvents.CheckInternalBlockFaceEvent;
|
||||
@@ -308,8 +308,8 @@ public class GreenhouseController extends RectangularMultiblockControllerBase im
|
||||
if (worldObj != null) {
|
||||
if (worldObj.isRemote) {
|
||||
for (IMultiblockComponent comp : connectedParts) {
|
||||
if (comp instanceof ICamouflagedBlock) {
|
||||
ICamouflagedBlock camBlock = (ICamouflagedBlock) comp;
|
||||
if (comp instanceof ICamouflagedTile) {
|
||||
ICamouflagedTile camBlock = (ICamouflagedTile) comp;
|
||||
if (camBlock.getCamouflageType() == type) {
|
||||
worldObj.markBlockRangeForRenderUpdate(camBlock.getCoordinates(), camBlock.getCoordinates());
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ import net.minecraftforge.common.MinecraftForge;
|
||||
|
||||
import forestry.api.core.EnumCamouflageType;
|
||||
import forestry.api.core.ICamouflageHandler;
|
||||
import forestry.api.core.ICamouflagedBlock;
|
||||
import forestry.api.core.ICamouflagedTile;
|
||||
import forestry.api.core.IErrorLogic;
|
||||
import forestry.api.core.IErrorLogicSource;
|
||||
import forestry.api.greenhouse.GreenhouseEvents.CamouflageChangeEvent;
|
||||
@@ -47,7 +47,7 @@ import forestry.greenhouse.gui.GuiGreenhouse;
|
||||
import forestry.greenhouse.multiblock.MultiblockLogicGreenhouse;
|
||||
import forestry.greenhouse.network.packets.PacketCamouflageUpdate;
|
||||
|
||||
public abstract class TileGreenhouse extends MultiblockTileEntityForestry<MultiblockLogicGreenhouse> implements IGreenhouseComponent, IHintSource, IStreamableGui, IErrorLogicSource, IRestrictedAccess, ITitled, ICamouflageHandler, ICamouflagedBlock {
|
||||
public abstract class TileGreenhouse extends MultiblockTileEntityForestry<MultiblockLogicGreenhouse> implements IGreenhouseComponent, IHintSource, IStreamableGui, IErrorLogicSource, IRestrictedAccess, ITitled, ICamouflageHandler, ICamouflagedTile {
|
||||
|
||||
private ItemStack camouflageBlock;
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ import net.minecraftforge.items.CapabilityItemHandler;
|
||||
|
||||
import forestry.api.core.EnumCamouflageType;
|
||||
import forestry.api.core.ICamouflageHandler;
|
||||
import forestry.api.core.ICamouflagedBlock;
|
||||
import forestry.api.core.ICamouflagedTile;
|
||||
import forestry.api.core.IErrorLogic;
|
||||
import forestry.api.core.IErrorLogicSource;
|
||||
import forestry.api.greenhouse.GreenhouseEvents.CamouflageChangeEvent;
|
||||
@@ -58,7 +58,7 @@ import cofh.api.energy.IEnergyHandler;
|
||||
import cofh.api.energy.IEnergyProvider;
|
||||
import cofh.api.energy.IEnergyReceiver;
|
||||
|
||||
public class TileGreenhouseHatch extends MultiblockTileEntityBase<MultiblockLogicGreenhouse> implements IGreenhouseComponent, IHintSource, IErrorLogicSource, IRestrictedAccess, ICamouflageHandler, ICamouflagedBlock, IFluidHandler, IEnergyProvider, IEnergyReceiver {
|
||||
public class TileGreenhouseHatch extends MultiblockTileEntityBase<MultiblockLogicGreenhouse> implements IGreenhouseComponent, IHintSource, IErrorLogicSource, IRestrictedAccess, ICamouflageHandler, ICamouflagedTile, IFluidHandler, IEnergyProvider, IEnergyReceiver {
|
||||
|
||||
EnumFacing outwards;
|
||||
private ItemStack camouflageBlock;
|
||||
|
||||
Reference in new issue
Block a user