-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wardrobe ui and independ CBlockEntity
- Loading branch information
Showing
26 changed files
with
565 additions
and
145 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
8 changes: 8 additions & 0 deletions
8
src/main/java/com/teammoeg/chorda/block/entity/BlockStateAccess.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 com.teammoeg.chorda.block.entity; | ||
|
||
import net.minecraft.world.level.block.state.BlockState; | ||
|
||
public interface BlockStateAccess { | ||
public BlockState getBlock(); | ||
public void setBlock(BlockState state); | ||
} |
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
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
41 changes: 41 additions & 0 deletions
41
src/main/java/com/teammoeg/chorda/capability/capabilities/ItemHandlerWrapper.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,41 @@ | ||
package com.teammoeg.chorda.capability.capabilities; | ||
|
||
import java.util.function.Supplier; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
import net.minecraft.world.item.ItemStack; | ||
import net.minecraftforge.items.IItemHandlerModifiable; | ||
|
||
public class ItemHandlerWrapper implements IItemHandlerModifiable { | ||
private final Supplier<IItemHandlerModifiable> intern; | ||
public void setStackInSlot(int slot, @NotNull ItemStack stack) { | ||
intern.get().setStackInSlot(slot, stack); | ||
} | ||
public int getSlots() { | ||
return intern.get().getSlots(); | ||
} | ||
public @NotNull ItemStack getStackInSlot(int slot) { | ||
return intern.get().getStackInSlot(slot); | ||
} | ||
public @NotNull ItemStack insertItem(int slot, @NotNull ItemStack stack, boolean simulate) { | ||
return intern.get().insertItem(slot, stack, simulate); | ||
} | ||
public @NotNull ItemStack extractItem(int slot, int amount, boolean simulate) { | ||
return intern.get().extractItem(slot, amount, simulate); | ||
} | ||
public int getSlotLimit(int slot) { | ||
return intern.get().getSlotLimit(slot); | ||
} | ||
public boolean isItemValid(int slot, @NotNull ItemStack stack) { | ||
return intern.get().isItemValid(slot, stack); | ||
} | ||
public ItemHandlerWrapper(Supplier<IItemHandlerModifiable> intern) { | ||
super(); | ||
this.intern = intern; | ||
} | ||
|
||
|
||
} |
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
Oops, something went wrong.