Skip to content

Commit

Permalink
Fix errors when placing fruit press
Browse files Browse the repository at this point in the history
  • Loading branch information
mezz committed Aug 26, 2017
1 parent adef8dc commit 1d97fc1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Expand Up @@ -37,7 +37,11 @@ public void onUpdate() {
}

public Class<?>[] getComponentInterfaces() {
return Binnie.MACHINE.getComponentInterfaces(this.getClass());
Class<?>[] componentInterfaces = Binnie.MACHINE.getComponentInterfaces(this.getClass());
if (componentInterfaces == null) {
return new Class[0];
}
return componentInterfaces;
}

public void onInventoryUpdate() {
Expand Down
2 changes: 2 additions & 0 deletions core/src/main/java/binnie/core/machines/ManagerMachine.java
@@ -1,5 +1,6 @@
package binnie.core.machines;

import javax.annotation.Nullable;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
Expand Down Expand Up @@ -68,6 +69,7 @@ public void postInit() {
BinnieCore.getBinnieProxy().registerTileEntity(TileEntityMachine.class, "binnie.tile.machine", rendererMachine);
}

@Nullable
public Class<?>[] getComponentInterfaces(final Class<? extends MachineComponent> clss) {
if (!this.componentInterfaceMap.containsKey(clss)) {
this.registerComponentClass(clss);
Expand Down

0 comments on commit 1d97fc1

Please sign in to comment.