Merge branch 'gamma-delta:main' into main
This commit is contained in:
commit
85dca3d6f4
5 changed files with 16 additions and 7 deletions
|
@ -86,12 +86,18 @@ public interface IotaHolderItem {
|
|||
return HexIotaTypes.getColor(tag);
|
||||
}
|
||||
|
||||
/**
|
||||
* Write {@code null} to indicate erasing
|
||||
*/
|
||||
boolean canWrite(ItemStack stack, @Nullable Iota iota);
|
||||
|
||||
/**
|
||||
* Write {@code null} to indicate erasing
|
||||
*/
|
||||
void writeDatum(ItemStack stack, @Nullable Iota iota);
|
||||
|
||||
static void appendHoverText(IotaHolderItem self, ItemStack stack, List<Component> components,
|
||||
TooltipFlag flag) {
|
||||
TooltipFlag flag) {
|
||||
var datumTag = self.readIotaTag(stack);
|
||||
if (datumTag != null) {
|
||||
var cmp = HexIotaTypes.getDisplay(datumTag);
|
||||
|
|
|
@ -86,7 +86,10 @@ public class ItemSlate extends BlockItem implements IotaHolderItem {
|
|||
|
||||
@Override
|
||||
public boolean canWrite(ItemStack stack, Iota datum) {
|
||||
return datum instanceof PatternIota && !NBTHelper.hasCompound(stack, BlockEntitySlate.TAG_PATTERN);
|
||||
var isWritten = NBTHelper.hasCompound(stack, "BlockEntityTag")
|
||||
&& stack.getTag().getCompound("BlockEntityTag").contains(BlockEntitySlate.TAG_PATTERN);
|
||||
return (datum instanceof PatternIota && !isWritten)
|
||||
|| (datum == null && isWritten);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -270,7 +270,7 @@
|
|||
"hexcasting.spell.book.hexcasting:const/vec/x": "Vector Rfln. +X/-X",
|
||||
"hexcasting.spell.book.hexcasting:const/vec/y": "Vector Rfln. +Y/-Y",
|
||||
"hexcasting.spell.book.hexcasting:const/vec/z": "Vector Rfln. +Z/-Z",
|
||||
"hexcasting.spell.book.hexcasting:write/entity": "Chronicler's Prfn.",
|
||||
"hexcasting.spell.book.hexcasting:read/entity": "Chronicler's Prfn.",
|
||||
"hexcasting.spell.book.hexcasting:number": "Numerical Reflection",
|
||||
"hexcasting.spell.book.hexcasting:mask": "Bookkeeper's Gambit",
|
||||
|
||||
|
@ -340,7 +340,7 @@
|
|||
"hexcasting.spell.hexcasting:rotate": "Rotation Gambit",
|
||||
"hexcasting.spell.hexcasting:rotate_reverse": "Rotation Gambit II",
|
||||
"hexcasting.spell.hexcasting:duplicate": "Gemini Decomposition",
|
||||
"hexcasting.spell.hexcasting:over": "Prospecter's Gambit",
|
||||
"hexcasting.spell.hexcasting:over": "Prospector's Gambit",
|
||||
"hexcasting.spell.hexcasting:tuck": "Undertaker's Gambit",
|
||||
"hexcasting.spell.hexcasting:2dup": "Dioscuri Gambit",
|
||||
"hexcasting.spell.hexcasting:duplicate_n": "Gemini Gambit",
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
"type": "hexcasting:pattern",
|
||||
"op_id": "hexcasting:write/entity",
|
||||
"anchor": "hexcasting:write/entity",
|
||||
"input": "any, entity",
|
||||
"input": "entity, any",
|
||||
"output": "",
|
||||
"text": "hexcasting.page.readwrite.write/entity"
|
||||
},
|
||||
|
|
|
@ -111,7 +111,7 @@ public class ForgeHexInitializer {
|
|||
|
||||
// https://github.com/VazkiiMods/Botania/blob/1.18.x/Forge/src/main/java/vazkii/botania/forge/ForgeCommonInitializer.java
|
||||
private static <T> void bind(ResourceKey<Registry<T>> registry,
|
||||
Consumer<BiConsumer<T, ResourceLocation>> source) {
|
||||
Consumer<BiConsumer<T, ResourceLocation>> source) {
|
||||
getModEventBus().addListener((RegisterEvent event) -> {
|
||||
if (registry.equals(event.getRegistryKey())) {
|
||||
source.accept((t, rl) -> event.register(registry, rl, () -> t));
|
||||
|
@ -123,7 +123,7 @@ public class ForgeHexInitializer {
|
|||
var modBus = getModEventBus();
|
||||
var evBus = MinecraftForge.EVENT_BUS;
|
||||
|
||||
modBus.register(ForgeHexClientInitializer.class);
|
||||
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> modBus.register(ForgeHexClientInitializer.class));
|
||||
|
||||
modBus.addListener((FMLCommonSetupEvent evt) ->
|
||||
evt.enqueueWork(() -> {
|
||||
|
|
Loading…
Reference in a new issue