Compare commits
2 Commits
e63e905441
...
ae50cf0390
Author | SHA1 | Date | |
---|---|---|---|
ae50cf0390 | |||
3b91e3daf8 |
@ -3,6 +3,9 @@
|
|||||||
**1.15.2 Port**
|
**1.15.2 Port**
|
||||||
* Tweak Steadfast Spell
|
* Tweak Steadfast Spell
|
||||||
|
|
||||||
|
**1.2.5**
|
||||||
|
* Fix Casting Table Bug
|
||||||
|
|
||||||
**1.2.4**
|
**1.2.4**
|
||||||
* Optimize Packets
|
* Optimize Packets
|
||||||
* Allow Command Blocks to use ```/spell``` Command
|
* Allow Command Blocks to use ```/spell``` Command
|
||||||
|
@ -10,7 +10,7 @@ org.gradle.jvmargs = -Xmx1G
|
|||||||
fabric_loader_version = 0.7.8+build.189
|
fabric_loader_version = 0.7.8+build.189
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 1.2.4
|
mod_version = 1.2.5
|
||||||
maven_group = com.thebrokenrail
|
maven_group = com.thebrokenrail
|
||||||
archives_base_name = sorcerycraft
|
archives_base_name = sorcerycraft
|
||||||
|
|
||||||
|
@ -5,8 +5,12 @@ import com.thebrokenrail.sorcerycraft.SorceryCraft;
|
|||||||
import io.github.prospector.modmenu.api.ConfigScreenFactory;
|
import io.github.prospector.modmenu.api.ConfigScreenFactory;
|
||||||
import io.github.prospector.modmenu.api.ModMenuApi;
|
import io.github.prospector.modmenu.api.ModMenuApi;
|
||||||
import me.sargunvohra.mcmods.autoconfig1u.AutoConfig;
|
import me.sargunvohra.mcmods.autoconfig1u.AutoConfig;
|
||||||
|
import net.fabricmc.api.EnvType;
|
||||||
|
import net.fabricmc.api.Environment;
|
||||||
import net.minecraft.client.gui.screen.Screen;
|
import net.minecraft.client.gui.screen.Screen;
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
|
@Environment(EnvType.CLIENT)
|
||||||
public class ModMenu implements ModMenuApi {
|
public class ModMenu implements ModMenuApi {
|
||||||
@Override
|
@Override
|
||||||
public String getModId() {
|
public String getModId() {
|
||||||
|
@ -11,6 +11,8 @@ import me.sargunvohra.mcmods.autoconfig1u.gui.registry.GuiRegistry;
|
|||||||
import me.sargunvohra.mcmods.autoconfig1u.util.Utils;
|
import me.sargunvohra.mcmods.autoconfig1u.util.Utils;
|
||||||
import me.shedaniel.clothconfig2.api.ConfigEntryBuilder;
|
import me.shedaniel.clothconfig2.api.ConfigEntryBuilder;
|
||||||
import net.fabricmc.api.ClientModInitializer;
|
import net.fabricmc.api.ClientModInitializer;
|
||||||
|
import net.fabricmc.api.EnvType;
|
||||||
|
import net.fabricmc.api.Environment;
|
||||||
import net.fabricmc.fabric.api.client.rendereregistry.v1.EntityRendererRegistry;
|
import net.fabricmc.fabric.api.client.rendereregistry.v1.EntityRendererRegistry;
|
||||||
import net.fabricmc.fabric.api.client.screen.ScreenProviderRegistry;
|
import net.fabricmc.fabric.api.client.screen.ScreenProviderRegistry;
|
||||||
import net.fabricmc.fabric.impl.networking.ClientSidePacketRegistryImpl;
|
import net.fabricmc.fabric.impl.networking.ClientSidePacketRegistryImpl;
|
||||||
@ -21,6 +23,8 @@ import net.minecraft.util.math.MathHelper;
|
|||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
|
@Environment(EnvType.CLIENT)
|
||||||
public class SorceryCraftClient implements ClientModInitializer {
|
public class SorceryCraftClient implements ClientModInitializer {
|
||||||
@Override
|
@Override
|
||||||
public void onInitializeClient() {
|
public void onInitializeClient() {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.thebrokenrail.sorcerycraft.mixin;
|
package com.thebrokenrail.sorcerycraft.mixin;
|
||||||
|
|
||||||
|
import com.thebrokenrail.sorcerycraft.gui.CastingTableScreenHandler;
|
||||||
import com.thebrokenrail.sorcerycraft.spell.util.SpellHelper;
|
import com.thebrokenrail.sorcerycraft.spell.util.SpellHelper;
|
||||||
import com.thebrokenrail.sorcerycraft.spell.util.SpellPlayerEntity;
|
import com.thebrokenrail.sorcerycraft.spell.util.SpellPlayerEntity;
|
||||||
import net.minecraft.container.Container;
|
import net.minecraft.container.Container;
|
||||||
@ -35,6 +36,10 @@ public class MixinPlayerEntity implements SpellPlayerEntity {
|
|||||||
@Override
|
@Override
|
||||||
public void setDiscoveredSpells(Map<Identifier, Integer> spells) {
|
public void setDiscoveredSpells(Map<Identifier, Integer> spells) {
|
||||||
this.sorceryCraftDiscoveredSpells = spells;
|
this.sorceryCraftDiscoveredSpells = spells;
|
||||||
|
if (container instanceof CastingTableScreenHandler) {
|
||||||
|
//noinspection ConstantConditions
|
||||||
|
((CastingTableScreenHandler) container).setSpells((PlayerEntity) (Object) this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -5,7 +5,6 @@ import com.thebrokenrail.sorcerycraft.packet.UpdateKnownSpellsS2CPacket;
|
|||||||
import com.thebrokenrail.sorcerycraft.spell.util.SpellHelper;
|
import com.thebrokenrail.sorcerycraft.spell.util.SpellHelper;
|
||||||
import com.thebrokenrail.sorcerycraft.spell.util.SpellPlayerEntity;
|
import com.thebrokenrail.sorcerycraft.spell.util.SpellPlayerEntity;
|
||||||
import com.thebrokenrail.sorcerycraft.spell.util.SpellServerPlayerEntity;
|
import com.thebrokenrail.sorcerycraft.spell.util.SpellServerPlayerEntity;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
|
||||||
import net.minecraft.nbt.CompoundTag;
|
import net.minecraft.nbt.CompoundTag;
|
||||||
import net.minecraft.server.network.ServerPlayerEntity;
|
import net.minecraft.server.network.ServerPlayerEntity;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
@ -30,7 +29,9 @@ public abstract class MixinServerPlayerEntity extends MixinPlayerEntity implemen
|
|||||||
@Override
|
@Override
|
||||||
public void setDiscoveredSpells(Map<Identifier, Integer> spells) {
|
public void setDiscoveredSpells(Map<Identifier, Integer> spells) {
|
||||||
super.setDiscoveredSpells(spells);
|
super.setDiscoveredSpells(spells);
|
||||||
sync();
|
if (container instanceof CastingTableScreenHandler) {
|
||||||
|
sync();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -39,10 +40,5 @@ public abstract class MixinServerPlayerEntity extends MixinPlayerEntity implemen
|
|||||||
tag.put(SpellHelper.SPELL_TAG, SpellHelper.createSpellsTag(getDiscoveredSpells()));
|
tag.put(SpellHelper.SPELL_TAG, SpellHelper.createSpellsTag(getDiscoveredSpells()));
|
||||||
//noinspection ConstantConditions
|
//noinspection ConstantConditions
|
||||||
UpdateKnownSpellsS2CPacket.send((ServerPlayerEntity) (Object) this, tag);
|
UpdateKnownSpellsS2CPacket.send((ServerPlayerEntity) (Object) this, tag);
|
||||||
|
|
||||||
if (container instanceof CastingTableScreenHandler) {
|
|
||||||
//noinspection ConstantConditions
|
|
||||||
((CastingTableScreenHandler) container).setSpells((PlayerEntity) (Object) this);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user