mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-15 17:45:08 +00:00
Compare commits
13
Commits
2.9.20-pre
..
2.10.3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a7acc7e224 | ||
|
|
a59bb21e59 | ||
|
|
5b6c13ff0a | ||
|
|
6f8b6e2a9c | ||
|
|
479c8328b4 | ||
|
|
0c23f4937d | ||
|
|
cde2e4fa60 | ||
|
|
abbb6dc151 | ||
|
|
b3def82cde | ||
|
|
8b4e7f7ec3 | ||
|
|
d69d77ecae | ||
|
|
a233f6ba30 | ||
|
|
581150178f |
No files matched your search
+17
-16
@@ -1,24 +1,24 @@
|
||||
// Add your dependencies here
|
||||
|
||||
dependencies {
|
||||
api('com.github.GTNewHorizons:EnderCore:0.4.8:dev') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:ForestryMC:4.10.14:dev')
|
||||
compileOnly('com.github.GTNewHorizons:NotEnoughItems:2.7.64-GTNH:dev')
|
||||
api("com.github.GTNewHorizons:GTNHLib:0.6.38:dev")
|
||||
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.44:dev')
|
||||
api('com.github.GTNewHorizons:EnderCore:0.5.0:dev') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:ForestryMC:4.10.17:dev')
|
||||
compileOnly('com.github.GTNewHorizons:NotEnoughItems:2.8.19-GTNH:dev')
|
||||
api("com.github.GTNewHorizons:GTNHLib:0.7.0:dev")
|
||||
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.45:dev')
|
||||
api('curse.maven:cofh-lib-220333:2388748') // https://www.curseforge.com/minecraft/mc-mods/cofh-lib/files/2388748
|
||||
shadowImplementation('cglib:cglib-nodep:3.3.0')
|
||||
api("com.github.GTNewHorizons:TinkersConstruct:1.13.40-GTNH:dev")
|
||||
api("com.github.GTNewHorizons:TinkersConstruct:1.14.6-GTNH:dev")
|
||||
|
||||
compileOnly('com.github.GTNewHorizons:waila:1.8.12:api') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-660-GTNH:api') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:Baubles:1.0.4:dev') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.51.395:dev') {transitive = false}
|
||||
compileOnly("com.github.GTNewHorizons:ModularUI2:2.2.16-1.7.10:dev") {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:Railcraft:9.16.30:dev') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:StorageDrawers:2.1.5-GTNH:api') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:Chisel:2.16.5-GTNH:dev') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:OpenComputers:1.11.16-GTNH:api') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:waila:1.9.2:api') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-717-GTNH:api') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:Baubles-Expanded:2.2.1-GTNH:dev') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.52.60:dev') {transitive = false}
|
||||
compileOnly("com.github.GTNewHorizons:ModularUI2:2.3.4-1.7.10:dev") {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:Railcraft:9.17.0:dev') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:StorageDrawers:2.2.0-GTNH:api') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:Chisel:2.17.0-GTNH:dev') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:OpenComputers:1.12.2-GTNH:api') {transitive = false}
|
||||
compileOnly('curse.maven:minefactory-reloaded-66672:2366150') // https://www.curseforge.com/minecraft/mc-mods/minefactory-reloaded/files/2366150
|
||||
compileOnly('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev')
|
||||
compileOnly('curse.maven:ee3-65509:2305023') // https://www.curseforge.com/minecraft/mc-mods/ee3/files/2305023
|
||||
@@ -26,5 +26,6 @@ dependencies {
|
||||
compileOnly(rfg.deobf('curse.maven:mekanism-268560:2475797')) // https://www.curseforge.com/minecraft/mc-mods/mekanism/files/2475797
|
||||
compileOnly(rfg.deobf('maven.modrinth:immibis-microblocks:59.1.2')) // https://modrinth.com/mod/immibis-microblocks/version/59.1.2
|
||||
|
||||
compileOnlyApi('com.github.GTNewHorizons:Angelica:1.0.0-beta50:api') {transitive = false}
|
||||
compileOnlyApi('com.github.GTNewHorizons:Angelica:1.0.0-beta62:api') {transitive = false}
|
||||
compileOnly("com.github.GTNewHorizons:Hodgepodge:2.7.3:dev")
|
||||
}
|
||||
+1
-1
@@ -17,7 +17,7 @@ pluginManagement {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.41'
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.44'
|
||||
}
|
||||
|
||||
|
||||
@@ -213,6 +213,7 @@ public class EnderIO {
|
||||
|
||||
public static final boolean hasLwjgl3 = Loader.isModLoaded("lwjgl3ify");
|
||||
public static final boolean hasGT5 = Loader.isModLoaded("gregtech") && !Loader.isModLoaded("gregapi");
|
||||
public static final boolean hasHP = Loader.isModLoaded("hodgepodge");
|
||||
|
||||
// Materials
|
||||
public static ItemCapacitor itemBasicCapacitor;
|
||||
@@ -486,7 +487,9 @@ public class EnderIO {
|
||||
itemGrindingBall = ItemGrindingBall.create();
|
||||
itemAlloyEndergy = ItemAlloyEndergy.create();
|
||||
itemGrindingBallEndergy = ItemGrindingBallEndergy.create();
|
||||
itemPowderIngot = ItemPowderIngot.create();
|
||||
if (!hasGT5) {
|
||||
itemPowderIngot = ItemPowderIngot.create();
|
||||
}
|
||||
|
||||
registerFluids();
|
||||
|
||||
@@ -726,7 +729,9 @@ public class EnderIO {
|
||||
SkeletonHandler.registerSkeleton(this);
|
||||
}
|
||||
|
||||
MaterialRecipes.registerDependantOresInDictionary();
|
||||
if (!hasGT5) {
|
||||
MaterialRecipes.registerDependantOresInDictionary();
|
||||
}
|
||||
|
||||
EnderfaceRecipes.addRecipes();
|
||||
MaterialRecipes.addRecipes();
|
||||
|
||||
@@ -160,7 +160,6 @@ public class BlockConduitBundle extends BlockEio
|
||||
|
||||
BlockConduitBundle result = new BlockConduitBundle();
|
||||
result.init();
|
||||
MinecraftForge.EVENT_BUS.register(result.handler);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -171,7 +170,6 @@ public class BlockConduitBundle extends BlockEio
|
||||
private IIcon lastRemovedComponetIcon = null;
|
||||
|
||||
private final Random rand = new Random();
|
||||
public EventHandler handler;
|
||||
|
||||
protected BlockConduitBundle() {
|
||||
super(ModObject.blockConduitBundle.unlocalisedName, TileConduitBundle.class);
|
||||
@@ -191,8 +189,6 @@ public class BlockConduitBundle extends BlockEio
|
||||
return "EnderIO:" + soundName + ".step";
|
||||
}
|
||||
};
|
||||
|
||||
handler = new EventHandler();
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -302,6 +298,7 @@ public class BlockConduitBundle extends BlockEio
|
||||
EnderIO.guiHandler.registerGuiHandler(GuiHandler.GUI_ID_EXTERNAL_CONNECTION_BASE + dir.ordinal(), this);
|
||||
}
|
||||
EnderIO.guiHandler.registerGuiHandler(GuiHandler.GUI_ID_EXTERNAL_CONNECTION_SELECTOR, this);
|
||||
MinecraftForge.EVENT_BUS.register(new EventHandler());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1234,6 +1231,7 @@ public class BlockConduitBundle extends BlockEio
|
||||
if ("silence.step".equals(path)) {
|
||||
ISound snd = event.sound;
|
||||
World world = EnderIO.proxy.getClientWorld();
|
||||
if (world == null) return;
|
||||
BlockCoord bc = new BlockCoord(snd.getXPosF(), snd.getYPosF(), snd.getZPosF());
|
||||
TileEntity te = bc.getTileEntity(world);
|
||||
if (te instanceof TileConduitBundle && ((TileConduitBundle) te).hasFacade()) {
|
||||
|
||||
@@ -11,12 +11,14 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.input.Mouse;
|
||||
|
||||
import com.enderio.core.common.util.ChatUtil;
|
||||
|
||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.InputEvent.KeyInputEvent;
|
||||
import cpw.mods.fml.common.gameevent.InputEvent.MouseInputEvent;
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.api.teleport.IItemOfTravel;
|
||||
import crazypants.enderio.api.tool.IConduitControl;
|
||||
@@ -134,6 +136,18 @@ public class KeyTracker {
|
||||
|
||||
@SubscribeEvent
|
||||
public void onKeyInput(KeyInputEvent event) {
|
||||
handleInput();
|
||||
}
|
||||
|
||||
// mouse button presses arrive on a separate event
|
||||
@SubscribeEvent
|
||||
public void onMouseInput(MouseInputEvent event) {
|
||||
if (Mouse.getEventButton() >= 0) {
|
||||
handleInput();
|
||||
}
|
||||
}
|
||||
|
||||
private void handleInput() {
|
||||
handleGlide();
|
||||
handleSoundDetector();
|
||||
handleNightVision();
|
||||
|
||||
@@ -43,8 +43,6 @@ import crazypants.enderio.machine.farm.farmers.TreeHarvestUtil;
|
||||
public class ItemDarkSteelAxe extends ItemAxe
|
||||
implements IEnergyContainerItem, IAdvancedTooltipProvider, IDarkSteelItem {
|
||||
|
||||
public EventHandler handler;
|
||||
|
||||
public static boolean isEquipped(EntityPlayer player) {
|
||||
if (player == null) {
|
||||
return false;
|
||||
@@ -69,7 +67,6 @@ public class ItemDarkSteelAxe extends ItemAxe
|
||||
|
||||
public static ItemDarkSteelAxe create() {
|
||||
ItemDarkSteelAxe res = new ItemDarkSteelAxe();
|
||||
MinecraftForge.EVENT_BUS.register(res.handler);
|
||||
res.init();
|
||||
return res;
|
||||
}
|
||||
@@ -80,7 +77,6 @@ public class ItemDarkSteelAxe extends ItemAxe
|
||||
|
||||
protected ItemDarkSteelAxe() {
|
||||
this("darkSteel", ItemDarkSteelSword.MATERIAL);
|
||||
handler = new EventHandler();
|
||||
}
|
||||
|
||||
protected ItemDarkSteelAxe(String name, ToolMaterial mat) {
|
||||
@@ -90,7 +86,6 @@ public class ItemDarkSteelAxe extends ItemAxe
|
||||
String str = name + "_axe";
|
||||
setUnlocalizedName(str);
|
||||
setTextureName(EnderIO.DOMAIN + ":" + str);
|
||||
handler = new EventHandler();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -250,6 +245,7 @@ public class ItemDarkSteelAxe extends ItemAxe
|
||||
|
||||
protected void init() {
|
||||
GameRegistry.registerItem(this, getUnlocalizedName());
|
||||
MinecraftForge.EVENT_BUS.register(new EventHandler());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -38,8 +38,6 @@ import crazypants.enderio.machine.farm.farmers.HarvestResult;
|
||||
public class ItemDarkSteelShears extends ItemShears
|
||||
implements IEnergyContainerItem, IAdvancedTooltipProvider, IDarkSteelItem {
|
||||
|
||||
public EventHandler handler;
|
||||
|
||||
public static boolean isEquipped(EntityPlayer player) {
|
||||
if (player == null) {
|
||||
return false;
|
||||
@@ -64,13 +62,12 @@ public class ItemDarkSteelShears extends ItemShears
|
||||
|
||||
public static ItemDarkSteelShears create() {
|
||||
ItemDarkSteelShears res = new ItemDarkSteelShears();
|
||||
MinecraftForge.EVENT_BUS.register(res.handler);
|
||||
res.init();
|
||||
return res;
|
||||
}
|
||||
|
||||
protected final MultiHarvestComparator harvestComparator = new MultiHarvestComparator();
|
||||
protected final EntityComparator entityComparator = new EntityComparator();
|
||||
private final MultiHarvestComparator harvestComparator = new MultiHarvestComparator();
|
||||
private final EntityComparator entityComparator = new EntityComparator();
|
||||
protected String name;
|
||||
|
||||
protected ItemDarkSteelShears(String name) {
|
||||
@@ -85,7 +82,6 @@ public class ItemDarkSteelShears extends ItemShears
|
||||
|
||||
protected ItemDarkSteelShears() {
|
||||
this("darkSteel");
|
||||
handler = new EventHandler();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -226,6 +222,7 @@ public class ItemDarkSteelShears extends ItemShears
|
||||
|
||||
protected void init() {
|
||||
GameRegistry.registerItem(this, getUnlocalizedName());
|
||||
MinecraftForge.EVENT_BUS.register(new EventHandler());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -326,7 +323,7 @@ public class ItemDarkSteelShears extends ItemShears
|
||||
}
|
||||
}
|
||||
|
||||
public class EventHandler {
|
||||
public static class EventHandler {
|
||||
|
||||
@SubscribeEvent
|
||||
public void onBreakSpeedEvent(PlayerEvent.BreakSpeed evt) {
|
||||
|
||||
@@ -72,14 +72,12 @@ public class ItemDarkSteelSword extends ItemSword
|
||||
public static ItemDarkSteelSword create() {
|
||||
ItemDarkSteelSword res = new ItemDarkSteelSword();
|
||||
res.init();
|
||||
MinecraftForge.EVENT_BUS.register(res.handler);
|
||||
return res;
|
||||
}
|
||||
|
||||
protected final int powerPerDamagePoint = Config.darkSteelPowerStorageBase / MATERIAL.getMaxUses();
|
||||
protected long lastBlickTick = -1;
|
||||
protected String name;
|
||||
public EventHandler handler;
|
||||
|
||||
public ItemDarkSteelSword(String name, ToolMaterial mat) {
|
||||
super(mat);
|
||||
@@ -89,12 +87,10 @@ public class ItemDarkSteelSword extends ItemSword
|
||||
String str = name + "_sword";
|
||||
setUnlocalizedName(str);
|
||||
setTextureName(EnderIO.DOMAIN + ":" + str);
|
||||
handler = new EventHandler();
|
||||
}
|
||||
|
||||
public ItemDarkSteelSword() {
|
||||
this("darkSteel", MATERIAL);
|
||||
handler = new EventHandler();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -230,6 +226,7 @@ public class ItemDarkSteelSword extends ItemSword
|
||||
|
||||
protected void init() {
|
||||
GameRegistry.registerItem(this, getUnlocalizedName());
|
||||
MinecraftForge.EVENT_BUS.register(new EventHandler());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -89,7 +89,9 @@ public class ContainerCapBank extends ContainerEnderTileEntity<TileCapBank> {
|
||||
}
|
||||
|
||||
if (hasBaublesSlots()) {
|
||||
for (int i = 0; i < baubles.getSizeInventory(); i++) {
|
||||
// for (int i = 0; i < baubles.getSizeInventory(); i++) {
|
||||
// Capped since the sprite only has 4 slots
|
||||
for (int i = 0; i < Math.min(baubles.getSizeInventory(), 4); i++) {
|
||||
addSlotToContainer(new Slot(baubles, i, -15 + armorOffset, 84 + i * 18) {
|
||||
|
||||
@Override
|
||||
@@ -122,7 +124,9 @@ public class ContainerCapBank extends ContainerEnderTileEntity<TileCapBank> {
|
||||
int startHotBarSlot = endPlayerSlot + 1;
|
||||
int endHotBarSlot = startHotBarSlot + 9;
|
||||
int startBaublesSlot = endHotBarSlot + 1;
|
||||
int endBaublesSlot = baubles == null ? 0 : startBaublesSlot + baubles.getSizeInventory();
|
||||
// int endBaublesSlot = baubles == null ? 0 : startBaublesSlot + baubles.getSizeInventory();
|
||||
// Capped since the sprite only has 4 slots
|
||||
int endBaublesSlot = baubles == null ? 0 : startBaublesSlot + Math.min(baubles.getSizeInventory(), 4);
|
||||
|
||||
ItemStack copystack = null;
|
||||
Slot slot = (Slot) inventorySlots.get(slotIndex);
|
||||
|
||||
@@ -17,7 +17,9 @@ import net.minecraftforge.common.IPlantable;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import com.enderio.core.common.util.BlockCoord;
|
||||
import com.mitchej123.hodgepodge.mixins.interfaces.INetherSeed;
|
||||
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.machine.farm.TileFarmStation;
|
||||
|
||||
public class PlantableFarmer implements IFarmerJoe {
|
||||
@@ -109,7 +111,13 @@ public class PlantableFarmer implements IFarmerJoe {
|
||||
|
||||
protected boolean plant(TileFarmStation farm, World worldObj, BlockCoord bc, IPlantable plantable) {
|
||||
worldObj.setBlock(bc.x, bc.y, bc.z, Blocks.air, 0, 1 | 2);
|
||||
Block target = plantable.getPlant(null, 0, 0, 0);
|
||||
Block target;
|
||||
// needed for Pam's nether seeds
|
||||
if (EnderIO.hasHP && plantable instanceof INetherSeed netherSeed) {
|
||||
target = netherSeed.hodgepodge$getPlant(null, 0, 0, 0);
|
||||
} else {
|
||||
target = plantable.getPlant(null, 0, 0, 0);
|
||||
}
|
||||
int meta = plantable.getPlantMetadata(null, 0, 0, 0);
|
||||
worldObj.setBlock(bc.x, bc.y, bc.z, target, meta, 1 | 2);
|
||||
farm.actionPerformed(false);
|
||||
@@ -117,7 +125,13 @@ public class PlantableFarmer implements IFarmerJoe {
|
||||
}
|
||||
|
||||
protected boolean canPlant(World worldObj, BlockCoord bc, IPlantable plantable) {
|
||||
Block target = plantable.getPlant(null, 0, 0, 0);
|
||||
Block target;
|
||||
// needed for Pam's nether seeds
|
||||
if (EnderIO.hasHP && plantable instanceof INetherSeed netherSeed) {
|
||||
target = netherSeed.hodgepodge$getPlant(null, 0, 0, 0);
|
||||
} else {
|
||||
target = plantable.getPlant(null, 0, 0, 0);
|
||||
}
|
||||
Block ground = worldObj.getBlock(bc.x, bc.y - 1, bc.z);
|
||||
if (target != null && target.canPlaceBlockAt(worldObj, bc.x, bc.y, bc.z)
|
||||
&& target.canBlockStay(worldObj, bc.x, bc.y, bc.z)
|
||||
@@ -182,10 +196,14 @@ public class PlantableFarmer implements IFarmerJoe {
|
||||
}
|
||||
|
||||
private boolean isPlantableForBlock(ItemStack stack, Block block) {
|
||||
if (!(stack.getItem() instanceof IPlantable)) {
|
||||
return false;
|
||||
if (stack.getItem() instanceof IPlantable plantable) {
|
||||
// needed for Pam's nether seeds
|
||||
if (EnderIO.hasHP && plantable instanceof INetherSeed netherSeed) {
|
||||
return netherSeed.hodgepodge$getPlant(null, 0, 0, 0) == block;
|
||||
} else {
|
||||
return plantable.getPlant(null, 0, 0, 0) == block;
|
||||
}
|
||||
}
|
||||
IPlantable plantable = (IPlantable) stack.getItem();
|
||||
return plantable.getPlant(null, 0, 0, 0) == block;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -22,16 +22,13 @@ import crazypants.enderio.xp.PacketGivePlayerXP;
|
||||
public class BlockKillerJoe extends AbstractMachineBlock<TileKillerJoe> {
|
||||
|
||||
static final String USERNAME = "KillerJoe";
|
||||
public EventHandler handler;
|
||||
|
||||
public static BlockKillerJoe create() {
|
||||
PacketHandler.INSTANCE
|
||||
.registerMessage(PacketSwing.class, PacketSwing.class, PacketHandler.nextID(), Side.CLIENT);
|
||||
PacketGivePlayerXP.register();
|
||||
PacketExperianceContainer.register();
|
||||
|
||||
BlockKillerJoe res = new BlockKillerJoe();
|
||||
MinecraftForge.EVENT_BUS.register(res.handler);
|
||||
res.init();
|
||||
return res;
|
||||
}
|
||||
@@ -39,7 +36,12 @@ public class BlockKillerJoe extends AbstractMachineBlock<TileKillerJoe> {
|
||||
protected BlockKillerJoe() {
|
||||
super(ModObject.blockKillerJoe, TileKillerJoe.class);
|
||||
setStepSound(Block.soundTypeGlass);
|
||||
handler = new EventHandler();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void init() {
|
||||
super.init();
|
||||
MinecraftForge.EVENT_BUS.register(new EventHandler());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+6
-3
@@ -21,18 +21,21 @@ import crazypants.enderio.machine.obelisk.BlockObeliskAbstract;
|
||||
public class BlockInhibitorObelisk extends BlockObeliskAbstract<TileInhibitorObelisk> {
|
||||
|
||||
public static BlockInhibitorObelisk instance;
|
||||
public EventHandler handler;
|
||||
|
||||
public static BlockInhibitorObelisk create() {
|
||||
BlockInhibitorObelisk res = new BlockInhibitorObelisk();
|
||||
res.init();
|
||||
MinecraftForge.EVENT_BUS.register(res.handler);
|
||||
return instance = res;
|
||||
}
|
||||
|
||||
protected BlockInhibitorObelisk() {
|
||||
super(ModObject.blockInhibitorObelisk, TileInhibitorObelisk.class);
|
||||
handler = new EventHandler();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void init() {
|
||||
super.init();
|
||||
MinecraftForge.EVENT_BUS.register(new EventHandler());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -199,7 +199,7 @@ public class BlockPaintedGlowstone extends BlockEio
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerBlockIcons(IIconRegister IIconRegister) {
|
||||
blockIcon = IIconRegister.registerIcon("enderio:conduitConnector");
|
||||
blockIcon = IIconRegister.registerIcon("glowstone");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -231,10 +231,12 @@ public class BlockPaintedGlowstone extends BlockEio
|
||||
|
||||
@Override
|
||||
protected void processDrop(World world, int x, int y, int z, TileEntityEnder te, ItemStack drop) {
|
||||
TileEntityPaintedBlock tef = (TileEntityPaintedBlock) te;
|
||||
if (tef != null) {
|
||||
if (te instanceof TileEntityPaintedBlock tef) {
|
||||
ItemStack itemStack = createItemStackForSourceBlock(tef.getSourceBlock(), tef.getSourceBlockMetadata());
|
||||
drop.stackTagCompound = (NBTTagCompound) itemStack.stackTagCompound.copy();
|
||||
NBTTagCompound tag = itemStack.stackTagCompound;
|
||||
if (tag != null) {
|
||||
drop.stackTagCompound = (NBTTagCompound) tag.copy();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,8 @@ public final class PainterUtil {
|
||||
sourceName = is.getDisplayName();
|
||||
}
|
||||
}
|
||||
return EnderIO.lang.localize("blockPainter.paintedWith") + " " + sourceName;
|
||||
return EnderIO.lang.localize("blockPainter.paintedWith") + " "
|
||||
+ (sourceName.isEmpty() ? EnderIO.lang.localize("blockPainter.paintedWith.none") : sourceName);
|
||||
}
|
||||
|
||||
public static void setSourceBlock(ItemStack item, Block source, int meta) {
|
||||
|
||||
@@ -89,8 +89,6 @@ public class BlockPoweredSpawner extends AbstractMachineBlock<TilePoweredSpawner
|
||||
PoweredSpawnerConfig.getInstance();
|
||||
|
||||
BlockPoweredSpawner res = new BlockPoweredSpawner();
|
||||
MinecraftForge.EVENT_BUS.register(res.handler);
|
||||
FMLCommonHandler.instance().bus().register(res.handler);
|
||||
res.init();
|
||||
return res;
|
||||
}
|
||||
@@ -99,8 +97,6 @@ public class BlockPoweredSpawner extends AbstractMachineBlock<TilePoweredSpawner
|
||||
|
||||
private Field fieldpersistenceRequired;
|
||||
|
||||
public EventHandler handler;
|
||||
|
||||
protected BlockPoweredSpawner() {
|
||||
super(ModObject.blockPoweredSpawner, TilePoweredSpawner.class);
|
||||
|
||||
@@ -115,7 +111,14 @@ public class BlockPoweredSpawner extends AbstractMachineBlock<TilePoweredSpawner
|
||||
} catch (Exception e) {
|
||||
Log.error("BlockPoweredSpawner: Could not find field: persistenceRequired");
|
||||
}
|
||||
handler = new EventHandler();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void init() {
|
||||
super.init();
|
||||
EventHandler handler = new EventHandler();
|
||||
MinecraftForge.EVENT_BUS.register(handler);
|
||||
FMLCommonHandler.instance().bus().register(handler);
|
||||
}
|
||||
|
||||
private final Map<BlockCoord, ItemStack> dropCache = new HashMap<BlockCoord, ItemStack>();
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package crazypants.enderio.material;
|
||||
|
||||
import static crazypants.enderio.EnderIO.hasGT5;
|
||||
import static crazypants.enderio.material.Alloy.DARK_STEEL;
|
||||
import static crazypants.enderio.material.Alloy.END_STEEL;
|
||||
import static crazypants.enderio.material.Alloy.ENERGETIC_ALLOY;
|
||||
@@ -58,10 +59,13 @@ public class MaterialRecipes {
|
||||
|
||||
public static void registerOresInDictionary() {
|
||||
// Ore Dictionary Registration
|
||||
for (PowderIngot powder : PowderIngot.values()) {
|
||||
if (!powder.hasDependancy()) {
|
||||
OreDictionary
|
||||
.registerOre(powder.oreDictName, new ItemStack(EnderIO.itemPowderIngot, 1, powder.ordinal()));
|
||||
if (!hasGT5) {
|
||||
for (PowderIngot powder : PowderIngot.values()) {
|
||||
if (!powder.hasDependancy()) {
|
||||
OreDictionary.registerOre(
|
||||
powder.oreDictName,
|
||||
new ItemStack(EnderIO.itemPowderIngot, 1, powder.ordinal()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -431,17 +435,19 @@ public class MaterialRecipes {
|
||||
RecipeUtil.addShaped(vibCry, "nnn", "ngn", "nnn", 'n', vibrantNugget, 'g', "gemEmerald");
|
||||
|
||||
// Smelting
|
||||
ItemStack dustIron = new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_IRON.ordinal());
|
||||
ItemStack dustGold = new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_GOLD.ordinal());
|
||||
ItemStack ingotIron = new ItemStack(Items.iron_ingot);
|
||||
ItemStack ingotGold = new ItemStack(Items.gold_ingot);
|
||||
if (!hasGT5) {
|
||||
ItemStack dustIron = new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_IRON.ordinal());
|
||||
ItemStack dustGold = new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_GOLD.ordinal());
|
||||
ItemStack ingotIron = new ItemStack(Items.iron_ingot);
|
||||
ItemStack ingotGold = new ItemStack(Items.gold_ingot);
|
||||
|
||||
GameRegistry.addSmelting(dustIron, ingotIron, 0);
|
||||
GameRegistry.addSmelting(dustGold, ingotGold, 0);
|
||||
GameRegistry.addSmelting(dustIron, ingotIron, 0);
|
||||
GameRegistry.addSmelting(dustGold, ingotGold, 0);
|
||||
|
||||
// Ender Dusts
|
||||
ItemStack enderDust = new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_ENDER.ordinal());
|
||||
RecipeUtil.addShaped(new ItemStack(Items.ender_pearl), "eee", "eee", "eee", 'e', enderDust);
|
||||
// Ender Dusts
|
||||
ItemStack enderDust = new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_ENDER.ordinal());
|
||||
RecipeUtil.addShaped(new ItemStack(Items.ender_pearl), "eee", "eee", "eee", 'e', enderDust);
|
||||
}
|
||||
|
||||
// Dark Iron Bars
|
||||
ItemStack diBars = new ItemStack(EnderIO.blockDarkIronBars, 16, 0);
|
||||
@@ -564,24 +570,29 @@ public class MaterialRecipes {
|
||||
ItemStack darkRod = new ItemStack(EnderIO.itemMaterial, 1, Material.DARK_STEEL_ROD.ordinal());
|
||||
RecipeUtil.addShaped(darkRod, " ns", "nsn", "sn ", 's', darkSteel, 'n', endSteelNugget);
|
||||
|
||||
// Food
|
||||
ItemStack flour = new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.FLOUR.ordinal());
|
||||
ItemStack bread = new ItemStack(Items.bread, 1, 0);
|
||||
if (!hasGT5) {
|
||||
// Food
|
||||
ItemStack flour = new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.FLOUR.ordinal());
|
||||
ItemStack bread = new ItemStack(Items.bread, 1, 0);
|
||||
|
||||
GameRegistry.addSmelting(flour, bread, 0.35f);
|
||||
GameRegistry.addSmelting(flour, bread, 0.35f);
|
||||
}
|
||||
|
||||
ItemStack enderios = EnderFood.ENDERIOS.getStack();
|
||||
RecipeUtil.addShapeless(enderios, Items.bowl, Items.milk_bucket, "cropWheat", "dustEnderPearl");
|
||||
|
||||
if (OreDictionaryHelper.hasCopper()) {
|
||||
ItemStack dustCopper = new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_COPPER.ordinal());
|
||||
ItemStack ingotCoppper = OreDictionaryPreferences.instance.getPreferred(OreDictionaryHelper.INGOT_COPPER);
|
||||
GameRegistry.addSmelting(dustCopper, ingotCoppper, 0);
|
||||
}
|
||||
if (OreDictionaryHelper.hasTin()) {
|
||||
ItemStack dustTin = new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_TIN.ordinal());
|
||||
ItemStack ingotTin = OreDictionaryPreferences.instance.getPreferred(OreDictionaryHelper.INGOT_TIN);
|
||||
GameRegistry.addSmelting(dustTin, ingotTin, 0);
|
||||
if (!hasGT5) {
|
||||
if (OreDictionaryHelper.hasCopper()) {
|
||||
ItemStack dustCopper = new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_COPPER.ordinal());
|
||||
ItemStack ingotCoppper = OreDictionaryPreferences.instance
|
||||
.getPreferred(OreDictionaryHelper.INGOT_COPPER);
|
||||
GameRegistry.addSmelting(dustCopper, ingotCoppper, 0);
|
||||
}
|
||||
if (OreDictionaryHelper.hasTin()) {
|
||||
ItemStack dustTin = new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_TIN.ordinal());
|
||||
ItemStack ingotTin = OreDictionaryPreferences.instance.getPreferred(OreDictionaryHelper.INGOT_TIN);
|
||||
GameRegistry.addSmelting(dustTin, ingotTin, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package crazypants.util;
|
||||
|
||||
import static crazypants.enderio.EnderIO.hasGT5;
|
||||
import static crazypants.enderio.material.Material.BINDER_COMPOSITE;
|
||||
import static crazypants.enderio.material.Material.CONDUIT_BINDER;
|
||||
import static crazypants.enderio.material.Material.PHASED_IRON_NUGGET;
|
||||
@@ -9,6 +10,7 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
@@ -20,6 +22,7 @@ import com.pahimar.ee3.api.exchange.EnergyValueRegistryProxy;
|
||||
import com.pahimar.ee3.api.exchange.RecipeRegistryProxy;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.config.Config;
|
||||
import crazypants.enderio.item.ItemEnderFood.EnderFood;
|
||||
@@ -93,47 +96,59 @@ public class EE3Util {
|
||||
*/
|
||||
public static void registerMiscRecipes() {
|
||||
if (IS_EE3_LOADED) {
|
||||
ItemStack basicGear = new ItemStack(EnderIO.itemMachinePart, 1, MachinePart.BASIC_GEAR.ordinal());
|
||||
ItemStack stick4 = new ItemStack(Items.stick, 4);
|
||||
ItemStack cobble4 = new ItemStack(Blocks.cobblestone, 4);
|
||||
registerRecipe(basicGear, stick4, cobble4);
|
||||
|
||||
ItemStack flour10 = new ItemStack(EnderIO.itemPowderIngot, 10, PowderIngot.FLOUR.ordinal());
|
||||
ItemStack wheat5 = new ItemStack(Items.wheat, 5);
|
||||
ItemStack seeds1 = new ItemStack(Items.wheat_seeds, 1);
|
||||
registerRecipe(flour10, wheat5, seeds1);
|
||||
if (!hasGT5) {
|
||||
ItemStack basicGear = new ItemStack(EnderIO.itemMachinePart, 1, MachinePart.BASIC_GEAR.ordinal());
|
||||
ItemStack stick4 = new ItemStack(Items.stick, 4);
|
||||
ItemStack cobble4 = new ItemStack(Blocks.cobblestone, 4);
|
||||
registerRecipe(basicGear, stick4, cobble4);
|
||||
ItemStack flour10 = new ItemStack(EnderIO.itemPowderIngot, 10, PowderIngot.FLOUR.ordinal());
|
||||
ItemStack wheat5 = new ItemStack(Items.wheat, 5);
|
||||
ItemStack seeds1 = new ItemStack(Items.wheat_seeds, 1);
|
||||
registerRecipe(flour10, wheat5, seeds1);
|
||||
}
|
||||
|
||||
ItemStack enderios = EnderFood.ENDERIOS.getStack();
|
||||
ItemStack bowl = new ItemStack(Items.bowl, 1);
|
||||
ItemStack wheat = new ItemStack(Items.wheat, 1);
|
||||
ItemStack milkb = new ItemStack(Items.milk_bucket, 1);
|
||||
FluidStack milk = FluidContainerRegistry.getFluidForFilledItem(milkb);
|
||||
ItemStack dustEnderPearl = new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_ENDER.ordinal());
|
||||
ItemStack dustEnderPearl;
|
||||
if (hasGT5) {
|
||||
dustEnderPearl = GameRegistry.findItemStack("gregtech", "gt.metaitem.01", 1);
|
||||
Items.feather.setDamage(Objects.requireNonNull(dustEnderPearl), 2532);
|
||||
} else {
|
||||
dustEnderPearl = new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_ENDER.ordinal());
|
||||
}
|
||||
if (milk != null) {
|
||||
registerRecipe(enderios, bowl, milk, wheat, dustEnderPearl);
|
||||
} else {
|
||||
registerRecipe(enderios, bowl, milkb, wheat, dustEnderPearl);
|
||||
}
|
||||
|
||||
ItemStack dustCoal = new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_COAL.ordinal());
|
||||
ItemStack coal = new ItemStack(Items.coal, 1);
|
||||
registerRecipe(dustCoal, coal);
|
||||
if (!hasGT5) {
|
||||
ItemStack dustCoal = new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_COAL.ordinal());
|
||||
ItemStack coal = new ItemStack(Items.coal, 1);
|
||||
registerRecipe(dustCoal, coal);
|
||||
|
||||
ItemStack dustIron = new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_IRON.ordinal());
|
||||
ItemStack iron = new ItemStack(Items.iron_ingot, 1);
|
||||
registerRecipe(dustIron, iron);
|
||||
ItemStack dustIron = new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_IRON.ordinal());
|
||||
ItemStack iron = new ItemStack(Items.iron_ingot, 1);
|
||||
registerRecipe(dustIron, iron);
|
||||
|
||||
ItemStack dustGold = new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_GOLD.ordinal());
|
||||
ItemStack gold = new ItemStack(Items.gold_ingot, 1);
|
||||
registerRecipe(dustGold, gold);
|
||||
ItemStack dustGold = new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_GOLD.ordinal());
|
||||
ItemStack gold = new ItemStack(Items.gold_ingot, 1);
|
||||
registerRecipe(dustGold, gold);
|
||||
|
||||
ItemStack dustObsidian4 = new ItemStack(EnderIO.itemPowderIngot, 4, PowderIngot.POWDER_OBSIDIAN.ordinal());
|
||||
ItemStack obsidian = new ItemStack(Blocks.obsidian, 1);
|
||||
registerRecipe(dustObsidian4, obsidian);
|
||||
ItemStack dustObsidian4 = new ItemStack(
|
||||
EnderIO.itemPowderIngot,
|
||||
4,
|
||||
PowderIngot.POWDER_OBSIDIAN.ordinal());
|
||||
ItemStack obsidian = new ItemStack(Blocks.obsidian, 1);
|
||||
registerRecipe(dustObsidian4, obsidian);
|
||||
|
||||
ItemStack enderDust9 = new ItemStack(EnderIO.itemPowderIngot, 9, PowderIngot.POWDER_ENDER.ordinal());
|
||||
ItemStack enderPearl = new ItemStack(Items.ender_pearl);
|
||||
registerRecipe(enderDust9, enderPearl);
|
||||
ItemStack enderDust9 = new ItemStack(EnderIO.itemPowderIngot, 9, PowderIngot.POWDER_ENDER.ordinal());
|
||||
ItemStack enderPearl = new ItemStack(Items.ender_pearl);
|
||||
registerRecipe(enderDust9, enderPearl);
|
||||
}
|
||||
|
||||
ItemStack cbc8 = BINDER_COMPOSITE.getStack(8);
|
||||
ItemStack sand2 = new ItemStack(Blocks.sand, 2);
|
||||
|
||||
@@ -777,6 +777,7 @@ enderio.itemCoordSelector.chat.setDimension=Set Dimension: %s%s
|
||||
#Painter
|
||||
tile.blockPainter.name=Painting Machine
|
||||
enderio.blockPainter.paintedWith=Painted with:
|
||||
enderio.blockPainter.paintedWith.none=§onothing§r
|
||||
tile.blockPaintedFence.name=Painted Fence
|
||||
tile.blockPaintedFenceGate.name=Painted Gate
|
||||
tile.blockPaintedWall.name=Painted Wall
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 1.9 KiB |
Reference in new issue
Block a user