-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
closes #66
- Loading branch information
Showing
17 changed files
with
135 additions
and
8 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
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
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,13 @@ | ||
metadata("lol.bai.megane.module.lapisreserve") { | ||
waila("MeganeLapisReserve") | ||
|
||
fmj { | ||
depends( | ||
"lapisreserve" to any | ||
) | ||
} | ||
} | ||
|
||
dependencies { | ||
modImplementation(deps.fabric.lapisReserve) | ||
} |
15 changes: 15 additions & 0 deletions
15
...ic/lapis-reserve/src/main/java/lol/bai/megane/module/lapisreserve/MeganeLapisReserve.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,15 @@ | ||
package lol.bai.megane.module.lapisreserve; | ||
|
||
import lol.bai.megane.module.lapisreserve.provider.LapisReserveProvider; | ||
import mcp.mobius.waila.api.IRegistrar; | ||
import mcp.mobius.waila.api.IWailaPlugin; | ||
import net.minecraft.world.level.block.entity.EnchantmentTableBlockEntity; | ||
|
||
public class MeganeLapisReserve implements IWailaPlugin { | ||
|
||
@Override | ||
public void register(IRegistrar registrar) { | ||
registrar.addBlockData(new LapisReserveProvider(), EnchantmentTableBlockEntity.class); | ||
} | ||
|
||
} |
23 changes: 23 additions & 0 deletions
23
...serve/src/main/java/lol/bai/megane/module/lapisreserve/provider/LapisReserveProvider.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,23 @@ | ||
package lol.bai.megane.module.lapisreserve.provider; | ||
|
||
import mcp.mobius.waila.api.IDataProvider; | ||
import mcp.mobius.waila.api.IDataWriter; | ||
import mcp.mobius.waila.api.IPluginConfig; | ||
import mcp.mobius.waila.api.IServerAccessor; | ||
import mcp.mobius.waila.api.data.ItemData; | ||
import net.minecraft.world.level.block.entity.EnchantmentTableBlockEntity; | ||
import sf.ssf.sfort.PlayerInterface; | ||
|
||
public class LapisReserveProvider implements IDataProvider<EnchantmentTableBlockEntity> { | ||
|
||
@Override | ||
public void appendData(IDataWriter data, IServerAccessor<EnchantmentTableBlockEntity> accessor, IPluginConfig config) { | ||
data.add(ItemData.class, res -> { | ||
var reserve = ((PlayerInterface) accessor.getPlayer().getInventory()).getLapisreserve(); | ||
if (reserve.isEmpty()) return; | ||
|
||
res.add(ItemData.of(config).add(reserve)); | ||
}); | ||
} | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
metadata("lol.bai.megane.module.lapisreserve") { | ||
waila("MeganeLapisReserve") { | ||
required("lapisreserve") | ||
} | ||
|
||
forgeFml() | ||
packMcmeta() | ||
|
||
modsToml{ | ||
depends("lapisreserve" to any) | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation(fg.deobf(deps.forge.lapisReserve)) | ||
} |
15 changes: 15 additions & 0 deletions
15
...ge/lapis-reserve/src/main/java/lol/bai/megane/module/lapisreserve/MeganeLapisReserve.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,15 @@ | ||
package lol.bai.megane.module.lapisreserve; | ||
|
||
import lol.bai.megane.module.lapisreserve.provider.LapisReserveProvider; | ||
import mcp.mobius.waila.api.IRegistrar; | ||
import mcp.mobius.waila.api.IWailaPlugin; | ||
import net.minecraft.world.level.block.entity.EnchantmentTableBlockEntity; | ||
|
||
public class MeganeLapisReserve implements IWailaPlugin { | ||
|
||
@Override | ||
public void register(IRegistrar registrar) { | ||
registrar.addBlockData(new LapisReserveProvider(), EnchantmentTableBlockEntity.class); | ||
} | ||
|
||
} |
23 changes: 23 additions & 0 deletions
23
...serve/src/main/java/lol/bai/megane/module/lapisreserve/provider/LapisReserveProvider.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,23 @@ | ||
package lol.bai.megane.module.lapisreserve.provider; | ||
|
||
import mcp.mobius.waila.api.IDataProvider; | ||
import mcp.mobius.waila.api.IDataWriter; | ||
import mcp.mobius.waila.api.IPluginConfig; | ||
import mcp.mobius.waila.api.IServerAccessor; | ||
import mcp.mobius.waila.api.data.ItemData; | ||
import net.minecraft.world.level.block.entity.EnchantmentTableBlockEntity; | ||
import sf.ssf.sfort.lapisreserve.PlayerInterface; | ||
|
||
public class LapisReserveProvider implements IDataProvider<EnchantmentTableBlockEntity> { | ||
|
||
@Override | ||
public void appendData(IDataWriter data, IServerAccessor<EnchantmentTableBlockEntity> accessor, IPluginConfig config) { | ||
data.add(ItemData.class, res -> { | ||
var reserve = ((PlayerInterface) accessor.getPlayer().getInventory()).getLapisreserve(); | ||
if (reserve.isEmpty()) return; | ||
|
||
res.add(ItemData.of(config).add(reserve)); | ||
}); | ||
} | ||
|
||
} |
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