-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve storage module system and add battery models
- Loading branch information
Showing
175 changed files
with
3,180 additions
and
2,035 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
mcversion=1.10.2 | ||
forgeversion=12.18.1.2056 | ||
forgeversion=12.18.1.2089 | ||
mcp_mappings=snapshot_20160525 | ||
|
||
tesla_version=1.10.2-1.2.1.46 | ||
jei_version=3.8.0.240 | ||
ic2_version=2.6.46-ex110 | ||
jei_version=3.9.3.252 | ||
ic2_version=2.6.68-ex110 | ||
waila_version=1.7.0-B3 | ||
top_version=1.10-1.0.15-28 | ||
mantle_version=0.10.4.+ | ||
forestry_version=5.2.9.+ | ||
|
||
version_major=1 | ||
version_minor=4 | ||
version_patch=2 | ||
version_minor=5 | ||
version_patch=0 | ||
|
||
curse_project_id=233073 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
src/main/java/de/nedelosk/modularmachines/api/gui/IContainerBase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,15 @@ | ||
package de.nedelosk.modularmachines.api.gui; | ||
|
||
import java.util.List; | ||
|
||
import net.minecraft.entity.player.EntityPlayer; | ||
import net.minecraft.inventory.Slot; | ||
|
||
public interface IContainerBase<T extends IGuiHandler> { | ||
|
||
T getHandler(); | ||
|
||
List<Slot> getSlots(); | ||
|
||
EntityPlayer getPlayer(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
src/main/java/de/nedelosk/modularmachines/api/modular/AssemblerItemHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
package de.nedelosk.modularmachines.api.modular; | ||
|
||
import javax.annotation.Nullable; | ||
|
||
import de.nedelosk.modularmachines.api.modules.position.IStoragePosition; | ||
import de.nedelosk.modularmachines.api.modules.storage.IItemHandlerStorage; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraftforge.items.ItemStackHandler; | ||
|
||
public class AssemblerItemHandler extends ItemStackHandler implements IItemHandlerStorage { | ||
|
||
protected IModularAssembler assembler; | ||
protected IStoragePosition position; | ||
|
||
public AssemblerItemHandler(ItemStack[] stacks, @Nullable IModularAssembler assembler, @Nullable IStoragePosition position){ | ||
super(stacks); | ||
|
||
this.assembler = assembler; | ||
this.position = position; | ||
} | ||
|
||
public AssemblerItemHandler(int size, @Nullable IModularAssembler assembler) { | ||
this(size, assembler, null); | ||
} | ||
|
||
public AssemblerItemHandler(int size, @Nullable IModularAssembler assembler, @Nullable IStoragePosition position) { | ||
super(size); | ||
|
||
this.assembler = assembler; | ||
this.position = position; | ||
} | ||
|
||
@Override | ||
public void setAssembler(IModularAssembler assembler) { | ||
this.assembler = assembler; | ||
} | ||
|
||
@Override | ||
public void setPosition(IStoragePosition position) { | ||
this.position = position; | ||
} | ||
|
||
@Override | ||
public IStoragePosition getPosition() { | ||
return position; | ||
} | ||
|
||
@Override | ||
public IModularAssembler getAssembler() { | ||
return assembler; | ||
} | ||
|
||
@Override | ||
protected int getStackLimit(int slot, ItemStack stack) { | ||
return 1; | ||
} | ||
|
||
@Override | ||
protected void onContentsChanged(int slot) { | ||
if(assembler != null){ | ||
assembler.updatePages(position); | ||
} | ||
} | ||
|
||
} |
8 changes: 8 additions & 0 deletions
8
src/main/java/de/nedelosk/modularmachines/api/modular/IAssemblerGui.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package de.nedelosk.modularmachines.api.modular; | ||
|
||
|
||
public interface IAssemblerGui { | ||
|
||
void setHasChange(); | ||
|
||
} |
Oops, something went wrong.