mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-22 13:10:13 +00:00
Compare commits
14
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e2b41a49c3 | ||
|
|
7f89eba8b5 | ||
|
|
76dabdf493 | ||
|
|
41c51754bb | ||
|
|
472b3649e1 | ||
|
|
806d162b19 | ||
|
|
ad1f98b03e | ||
|
|
f9bc80ef91 | ||
|
|
8807be5887 | ||
|
|
026a36d51d | ||
|
|
c6c539ea13 | ||
|
|
983a76dd1d | ||
|
|
f492c45f50 | ||
|
|
3093ea6180 |
No files matched your search
+1
-1
@@ -2,7 +2,7 @@ minecraft_version=1.7.10
|
||||
forge_version=10.13.4.1614-1.7.10
|
||||
forgeDep_version=10.13.4.1614
|
||||
|
||||
mod_version=2.3.1.13_beta
|
||||
mod_version=2.3.1.14_beta
|
||||
|
||||
#Comment out this line to get rid of the appendix
|
||||
#mod_appendix=beta
|
||||
|
||||
@@ -19,6 +19,8 @@ import mods.immibis.microblocks.api.IMicroblockSystem;
|
||||
import mods.immibis.microblocks.api.MicroblockAPIUtils;
|
||||
import mods.immibis.microblocks.api.Part;
|
||||
import mods.immibis.microblocks.api.PartType;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -162,7 +164,19 @@ public class TileConduitBundle extends TileEntityEio implements IConduitBundle {
|
||||
facadeMeta = nbtRoot.getInteger("facadeMeta");
|
||||
|
||||
if(worldObj != null && worldObj.isRemote) {
|
||||
clientUpdated = true;
|
||||
if (conduits.size() == 1 && conduits.get(0) instanceof IItemConduit) {
|
||||
boolean itemConduitClientUpdated = false;
|
||||
for (Object o : Minecraft.getMinecraft().theWorld.playerEntities) {
|
||||
Entity e = ((Entity) o);
|
||||
if (e.getDistanceSq(this.xCoord, yCoord, zCoord) < 36) {
|
||||
itemConduitClientUpdated = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (itemConduitClientUpdated) clientUpdated = true;
|
||||
} else {
|
||||
clientUpdated = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (MicroblocksUtil.supportMicroblocks()) {
|
||||
|
||||
@@ -51,6 +51,7 @@ public class TooltipHandlerBurnTime implements ITooltipCallback {
|
||||
|
||||
@Override
|
||||
public boolean shouldHandleItem(ItemStack item) {
|
||||
if (!Thread.currentThread().getName().startsWith("Client Thread")) return false;
|
||||
int time = TileEntityFurnace.getItemBurnTime(item);
|
||||
return time > 0 || isStirlingGen(item);
|
||||
}
|
||||
|
||||
@@ -185,6 +185,9 @@ public class ItemSoulVessel extends Item implements IResourceTooltipProvider {
|
||||
if(entity instanceof EntityPlayer) {
|
||||
return false;
|
||||
}
|
||||
if(entity.isDead) {
|
||||
return false;
|
||||
}
|
||||
|
||||
String entityId = EntityList.getEntityString(entity);
|
||||
if(isBlackListed(entityId)) {
|
||||
|
||||
@@ -24,6 +24,7 @@ import crazypants.enderio.machine.farm.farmers.PlantableFarmer;
|
||||
import crazypants.enderio.machine.farm.farmers.RubberTreeFarmerIC2;
|
||||
import crazypants.enderio.machine.farm.farmers.StemFarmer;
|
||||
import crazypants.enderio.machine.farm.farmers.TreeFarmer;
|
||||
import crazypants.enderio.machine.farm.farmers.ForestryFarmer;
|
||||
|
||||
public final class FarmersRegistry {
|
||||
|
||||
@@ -34,13 +35,10 @@ public final class FarmersRegistry {
|
||||
addExtraUtilities();
|
||||
addNatura();
|
||||
addTiC();
|
||||
addStillHungry();
|
||||
addIC2();
|
||||
addMFR();
|
||||
addThaumcraft();
|
||||
addFlowers();
|
||||
addGrowableOres();
|
||||
addImmersiveEngineering();
|
||||
ForestryFarmer.init();
|
||||
|
||||
FarmersCommune.joinCommune(new StemFarmer(Blocks.reeds, new ItemStack(Items.reeds)));
|
||||
FarmersCommune.joinCommune(new StemFarmer(Blocks.cactus, new ItemStack(Blocks.cactus)));
|
||||
@@ -178,16 +176,6 @@ public final class FarmersRegistry {
|
||||
}
|
||||
}
|
||||
|
||||
private static void addMFR() {
|
||||
String mod = "MineFactoryReloaded";
|
||||
String blockName = "rubberwood.sapling";
|
||||
Block saplingBlock = GameRegistry.findBlock(mod, blockName);
|
||||
if(saplingBlock != null) {
|
||||
FarmersCommune.joinCommune(new TreeFarmer(saplingBlock, GameRegistry.findBlock(mod, "rubberwood.log")));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static void addIC2() {
|
||||
RubberTreeFarmerIC2 rtf = new RubberTreeFarmerIC2();
|
||||
if(rtf.isValid()) {
|
||||
@@ -195,11 +183,6 @@ public final class FarmersRegistry {
|
||||
}
|
||||
}
|
||||
|
||||
private static void addStillHungry() {
|
||||
String mod = "stillhungry";
|
||||
addPickable(mod, "grapeBlock", "StillHungry_grapeSeed");
|
||||
}
|
||||
|
||||
private static void addExtraUtilities() {
|
||||
String mod = "ExtraUtilities";
|
||||
String name = "plant/ender_lilly";
|
||||
@@ -219,36 +202,6 @@ public final class FarmersRegistry {
|
||||
GameRegistry.findBlock("Botany", "flower"),
|
||||
GameRegistry.findBlock("Botania", "flower") ) );
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private static void addGrowableOres() {
|
||||
String mod = "B0bGrowsOre";
|
||||
if (!Loader.isModLoaded(mod)) {
|
||||
return;
|
||||
}
|
||||
Pattern[] growableOres = { Pattern.compile("(.+)Reed"), Pattern.compile("oreGrowable(.+)") };
|
||||
|
||||
Iterator<Block> blockIter = Block.blockRegistry.iterator();
|
||||
while (blockIter.hasNext()) {
|
||||
Block block = blockIter.next();
|
||||
String name = Block.blockRegistry.getNameForObject(block);
|
||||
if (name != null && name.startsWith(mod)) {
|
||||
for (Pattern blockPattern : growableOres) {
|
||||
if (blockPattern.matcher(name).find()) {
|
||||
FarmersCommune.joinCommune(new StemFarmer(block, new ItemStack(block)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void addImmersiveEngineering() {
|
||||
Block hemp = GameRegistry.findBlock("ImmersiveEngineering", "hemp");
|
||||
Item hempSeed = GameRegistry.findItem("ImmersiveEngineering", "hemp");
|
||||
if (hemp != null && hempSeed != null) {
|
||||
FarmersCommune.joinCommune(new StemFarmer(hemp, new ItemStack(hempSeed)));
|
||||
}
|
||||
}
|
||||
|
||||
private FarmersRegistry() {
|
||||
}
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
package crazypants.enderio.machine.farm.farmers;
|
||||
|
||||
import com.enderio.core.common.util.BlockCoord;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import crazypants.enderio.Log;
|
||||
import crazypants.enderio.machine.farm.TileFarmStation;
|
||||
import forestry.api.arboriculture.EnumGermlingType;
|
||||
import forestry.api.arboriculture.ITree;
|
||||
import forestry.api.arboriculture.ITreeRoot;
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ForestryFarmer implements IFarmerJoe {
|
||||
private ITreeRoot root;
|
||||
private Item forestrySapling;
|
||||
|
||||
private ForestryFarmer(ITreeRoot root, Item forestrySapling) {
|
||||
this.root = root;
|
||||
this.forestrySapling = forestrySapling;
|
||||
}
|
||||
|
||||
public static void init() {
|
||||
ITreeRoot root = (ITreeRoot) AlleleManager.alleleRegistry.getSpeciesRoot("rootTrees");
|
||||
Item forestrySapling = GameRegistry.findItem("Forestry", "sapling");
|
||||
if (root != null && forestrySapling != null) {
|
||||
FarmersCommune.joinCommune(new ForestryFarmer(root, forestrySapling));
|
||||
Log.info("ForestryFarmer engaged.");
|
||||
} else {
|
||||
Log.info("ForestryFarmer borked.");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlant(ItemStack stack) {
|
||||
return stack != null && stack.getItem() == forestrySapling && root.getType(stack) == EnumGermlingType.SAPLING;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean prepareBlock(TileFarmStation farm, BlockCoord bc, Block block, int meta) {
|
||||
ItemStack sapling = farm.getSeedTypeInSuppliesFor(bc);
|
||||
ITree tree = root.getMember(sapling);
|
||||
if (tree != null && tree.canStay(farm.getWorldObj(), bc.x, bc.y, bc.z)) {
|
||||
farm.takeSeedFromSupplies(sapling, bc, false);
|
||||
root.plantSapling(farm.getWorldObj(), tree, farm.getFakePlayer().getGameProfile(), bc.x, bc.y, bc.z);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canHarvest(TileFarmStation farm, BlockCoord bc, Block block, int meta) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IHarvestResult harvestBlock(TileFarmStation farm, BlockCoord bc, Block block, int meta) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -118,7 +118,7 @@ public class BlockFusedQuartz extends BlockEio {
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
Type type = Type.byMeta(meta);
|
||||
if (type.blastResistance) {
|
||||
return 2000;
|
||||
return 20;
|
||||
} else {
|
||||
return super.getExplosionResistance(par1Entity);
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ public class NEIEnderIOConfig implements IConfigureNEI {
|
||||
API.registerGuiOverlayHandler(GuiInventoryPanel.class, new InventoryPanelNEIOverlayHandler(), "crafting");
|
||||
|
||||
API.hideItem(new ItemStack(EnderIO.blockConduitFacade));
|
||||
API.hideItem(new ItemStack(EnderIO.blockLightNode));
|
||||
API.hideItem(new ItemStack(EnderIO.itemEnderface));
|
||||
API.hideItem(PainterUtil.applyDefaultPaintedState(new ItemStack(EnderIO.blockPaintedCarpet)));
|
||||
API.hideItem(PainterUtil.applyDefaultPaintedState(new ItemStack(EnderIO.blockPaintedSlab)));
|
||||
|
||||
Reference in new issue
Block a user