Compare commits

...
5 Commits
6 changed files with 60 additions and 2 deletions

No files matched your search

+1 -1
View File
@@ -7,7 +7,7 @@
<Console name="SysOut" target="SYSTEM_OUT">
<PatternLayout pattern="[%d{HH:mm:ss}] [%t/%level]: %msg%n" />
</Console>
<Queue name="ServerGuiConsole">
<Queue name="ServerGuiConsole" ignoreExceptions="true">
<PatternLayout pattern="[%d{HH:mm:ss}] [%t/%level] [%logger]: %msg%n" />
</Queue>
<RollingRandomAccessFile name="File" fileName="logs/latest.log" filePattern="logs/%d{yyyy-MM-dd}-%i.log.gz">
@@ -1,5 +1,14 @@
--- ../src-base/minecraft/net/minecraft/item/ItemArmor.java
+++ ../src-work/minecraft/net/minecraft/item/ItemArmor.java
@@ -40,7 +40,7 @@
if (list.size() > 0)
{
EntityLivingBase entitylivingbase = (EntityLivingBase)list.get(0);
- int l = entitylivingbase instanceof EntityPlayer ? 1 : 0;
+ int l = 0;// Forge: We fix the indexes. Mojang Stop hard coding this!
int i1 = EntityLiving.func_82159_b(p_82487_2_);
ItemStack itemstack1 = p_82487_2_.func_77946_l();
itemstack1.field_77994_a = 1;
@@ -221,7 +221,7 @@
if (itemstack1 == null)
@@ -14,7 +14,7 @@
return false;
}
- else if (!p_77648_3_.func_147439_a(p_77648_4_, p_77648_5_, p_77648_6_).func_149688_o().func_76220_a())
+ else if (!p_77648_3_.isSideSolid(p_77648_4_, p_77648_5_, p_77648_6_, net.minecraftforge.common.util.ForgeDirection.getOrientation(p_77648_7_)))
+ else if (!p_77648_3_.func_147439_a(p_77648_4_, p_77648_5_, p_77648_6_).func_149688_o().func_76220_a() && !p_77648_3_.isSideSolid(p_77648_4_, p_77648_5_, p_77648_6_, net.minecraftforge.common.util.ForgeDirection.getOrientation(p_77648_7_)))
{
return false;
}
@@ -32,3 +32,13 @@
}
--this.field_145957_n[0].field_77994_a;
@@ -301,6 +304,9 @@
}
else
{
+ int moddedBurnTime = net.minecraftforge.event.ForgeEventFactory.getFuelBurnTime(p_145952_0_);
+ if (moddedBurnTime >= 0) return moddedBurnTime;
+
Item item = p_145952_0_.func_77973_b();
if (item instanceof ItemBlock && Block.func_149634_a(item) != Blocks.field_150350_a)
@@ -135,6 +135,13 @@ public class ForgeEventFactory
return event.list;
}
public static int getFuelBurnTime(ItemStack fuel)
{
FuelBurnTimeEvent event = new FuelBurnTimeEvent(fuel);
MinecraftForge.EVENT_BUS.post(event);
return event.getResult() == Result.DEFAULT ? -1 : event.burnTime;
}
public static int getMaxSpawnPackSize(EntityLiving entity)
{
LivingPackSizeEvent maxCanSpawnEvent = new LivingPackSizeEvent(entity);
@@ -0,0 +1,32 @@
package net.minecraftforge.event;
import net.minecraft.item.ItemStack;
import cpw.mods.fml.common.eventhandler.Event;
import cpw.mods.fml.common.eventhandler.Event.HasResult;
/**
* FuelBurnTimeEvent is fired whenever a furnace needs the burn time of a fuel. <br>
* Normally, a registered {@link cpw.mods.fml.common.IFuelHandler} is preferred, but
* this is useful in the rare situation where IFuelHandler is not effective.<br>
* <br>
* {@link Result#DEFAULT} allows the normal fuel handling code to proceed.
* {@link Result#ALLOW} or {@link Result#DENY} uses the value of {@link #burnTime}
* for the given {@link fuel}, bypassing both vanilla and IFuelHandler determinations.
* <br>
* {@link #fuel} contains the potential fuel.<br>
* {@link #burnTime} the results if set by an event handler.<br>
* <br>
* This event are fired on the {@link MinecraftForge#EVENT_BUS}.
**/
@HasResult
@Deprecated //Remove in 1.8
public class FuelBurnTimeEvent extends Event
{
public final ItemStack fuel;
public int burnTime;
public FuelBurnTimeEvent(ItemStack fuel)
{
this.fuel = fuel;
}
}