Skip to content
Permalink
Browse files

Still not registering the seedbags or crops.

  • Loading branch information
Bunsan committed Nov 18, 2018
1 parent 16233d3 commit 266e316956f7578a92b8151139ca315c334e84ff
@@ -67,14 +67,29 @@ public Crop(@Nonnull ResourceLocation name, float minTemp, float maxTemp, float

public boolean isValidLocation(float temp, float rain, float density)
{
return minGrowthTemp <= temp && maxGrowthTemp >= temp && minRain <= rain && maxRain >= rain && minDensity <= density && maxDensity >= density;
return minTemp <= temp && maxTemp >= temp && minRain <= rain && maxRain >= rain && minDensity <= density && maxDensity >= density;
}

public int getGrowthStages()
{
return growthStages;
}

public float getMinStageGrowthTime()
{
return minStageGrowthTime;
}

public float getMinGrowthTemp()
{
return minGrowthTemp;
}

public float getMaxGrowthTemp()
{
return maxGrowthTemp;
}

@Override
public String toString() { return String.valueOf(getRegistryName()); }

@@ -388,11 +388,11 @@ public static void registerBlocks(RegistryEvent.Register<Block> event)
{
Builder<BlockCropsTFC> crops = ImmutableList.builder();

for (Crop crop : TFCRegistries.CROPS.getValuesCollection())
for (Crop type : TFCRegistries.CROPS.getValuesCollection())
{
crops.add(register(r, "crop/" + crop.getRegistryName().getPath(), new BlockCropsTFC(crop), CT_PLANTS));
crops.add(register(r, "crops/" + type.getRegistryName().getPath(), new BlockCropsTFC(type), CT_PLANTS));
}
allCropBlocks.forEach(x -> normalItemBlocks.add(new ItemBlockTFC(x)));
allCropBlocks = crops.build();
}

inventoryItemBlocks.add(new ItemBlockTorchTFC(register(r, "torch", new BlockTorchTFC(), CT_MISC)));
@@ -20,8 +20,6 @@
import net.dries007.tfc.api.types.Crop;
import net.dries007.tfc.objects.blocks.stone.BlockFarmlandTFC;

//import net.dries007.tfc.objects.Agriculture.Crop;

public class ItemSeedsTFC extends Item implements IPlantable
{
private final Block crops;
@@ -177,8 +177,8 @@ public static void registerItems(RegistryEvent.Register<Item> event)
simpleItems.add(register(r, "ceramics/fire_clay", new Item(), CT_MISC));
}

for (Crop seedbag : TFCRegistries.CROPS.getValuesCollection())
simpleItems.add(register(r, "crops/seedbag/" + seedbag.getRegistryName().getPath(), (new ItemSeedsTFC(seedbag, (BlockCropsTFC.get(seedbag)))), CT_PLANTS));
for (Crop type : TFCRegistries.CROPS.getValuesCollection())
simpleItems.add(register(r, "crops/seedbag/" + type.getRegistryName().getPath(), (new ItemSeedsTFC(type, BlockCropsTFC.get(type))), CT_PLANTS));

for (Food food : Food.values())
simpleItems.add(register(r, "food/" + food.name().toLowerCase(), (new ItemFoodTFC(food, food.heal, food.saturation)), CT_FOOD ));

0 comments on commit 266e316

Please sign in to comment.
You can’t perform that action at this time.