mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-21 04:32:23 +00:00
Meh just use a field
This commit is contained in:
1 parent
0eaab9a52c
commit
61e72f3cc3
2 files changed
+2
-10
No files matched your search
@@ -15,21 +15,13 @@ import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
* InventoryWrapEvent is fired when the corporea system attempts to wrap an inventory for use.
|
||||
* */
|
||||
public class InventoryWrapEvent extends Event {
|
||||
private IWrappedInventory wrapped = null;
|
||||
public IWrappedInventory wrapped = null;
|
||||
final ICorporeaSpark spark;
|
||||
|
||||
public InventoryWrapEvent(ICorporeaSpark spark) {
|
||||
this.spark = spark;
|
||||
}
|
||||
|
||||
public IWrappedInventory getWrappedInventory() {
|
||||
return wrapped;
|
||||
}
|
||||
|
||||
public void setWrappedInventory(IWrappedInventory wrapped) {
|
||||
this.wrapped = wrapped;
|
||||
}
|
||||
|
||||
public ICorporeaSpark getSpark() {
|
||||
return spark;
|
||||
}
|
||||
|
||||
@@ -275,7 +275,7 @@ public class InternalMethodHandler extends DummyMethodHandler {
|
||||
|
||||
InventoryWrapEvent wrapEvent = new InventoryWrapEvent(spark);
|
||||
MinecraftForge.EVENT_BUS.post(wrapEvent);
|
||||
IWrappedInventory wrapped = wrapEvent.getWrappedInventory();
|
||||
IWrappedInventory wrapped = wrapEvent.wrapped;
|
||||
if(wrapped == null) {
|
||||
wrapped = WrappedIInventory.wrap(inv, spark);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user