mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-21 20:52:26 +00:00
1.6.2 test - Finished liquids, added connected textures on glass
This commit is contained in:
1 parent
40c6f445a2
commit
a80fcbce86
704 files changed
+60909
No files matched your search
@@ -0,0 +1,51 @@
|
||||
package tconstruct.library.event;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.event.Event;
|
||||
|
||||
/* This event fires after all of the other construction. The resulting nbttag is added to the tool
|
||||
* Note: The tag is the base tag. toolTag.getCompoundTag("InfiTool") will have all of the tool's data.
|
||||
*/
|
||||
|
||||
public class PartBuilderEvent extends Event
|
||||
{
|
||||
public final ItemStack material;
|
||||
public final ItemStack pattern;
|
||||
public final ItemStack otherPattern;
|
||||
protected ItemStack[] resultStacks;
|
||||
|
||||
public PartBuilderEvent(ItemStack material, ItemStack pattern, ItemStack otherPattern)
|
||||
{
|
||||
this.material = material;
|
||||
this.pattern = pattern;
|
||||
this.otherPattern = otherPattern;
|
||||
}
|
||||
|
||||
@HasResult
|
||||
public static class NormalPart extends PartBuilderEvent
|
||||
{
|
||||
public NormalPart(ItemStack material, ItemStack pattern, ItemStack otherPattern)
|
||||
{
|
||||
super(material, pattern, otherPattern);
|
||||
}
|
||||
|
||||
/** Fires before other processing is done
|
||||
*
|
||||
* Result is significant:
|
||||
* DEFAULT: Allows part to be crafted normally
|
||||
* ALLOW: Uses resultStack instead
|
||||
* DENY: Stops part crafting altogether
|
||||
*/
|
||||
|
||||
public void overrideResult (ItemStack[] result)
|
||||
{
|
||||
resultStacks = result;
|
||||
this.setResult(Result.ALLOW);
|
||||
}
|
||||
|
||||
public ItemStack[] getResultStacks ()
|
||||
{
|
||||
return resultStacks;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user