Skip to content

Commit

Permalink
Un-verbose codec stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
yuesha-yc committed Dec 17, 2024
1 parent 34d24b2 commit b9c95a0
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public Research(FHIcon icon, ResearchCategory category, List<String> parents, Li
this.alwaysShow = flags[4];
this.setInfinite(flags[5]);
this.points = points;
System.out.println(effects);
// System.out.println(effects);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public Effect(BaseData data) {
}
public BaseData getBaseData() {
BaseData bd= new BaseData(name, tooltip, icon, nonce, hidden);
System.out.println(bd);
// System.out.println(bd);
return bd;
}
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public EffectItemReward createEffect() {
@Override
public void onClose() {
super.onClose();
System.out.println(e.rewards);
// System.out.println(e.rewards);
}
}
private static class Stats extends EffectEditor<EffectStats> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import net.minecraft.nbt.Tag;
import net.minecraft.nbt.ListTag;
import net.minecraftforge.common.util.LazyOptional;
import org.apache.logging.log4j.MarkerManager;

/**
* ScenarioConductor
Expand Down Expand Up @@ -270,7 +271,7 @@ public void save(CompoundTag data, boolean isPacket) {
public void load(CompoundTag data, boolean isPacket) {
getContext().varData.load(data.getCompound("vars"));
getContext().takeSnapshot();
System.out.println(data.getCompound("vars"));
FHMain.LOGGER.info(MarkerManager.getMarker("Scenario Conductor"), data.getCompound("vars"));
ListTag lacts=data.getList("acts", Tag.TAG_COMPOUND);
//Act initact=acts.get(init);
for(Tag v:lacts) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -378,15 +378,15 @@ public static <T> MapCodec<T> path(Codec<T> codec,String... path){
public static <T> void writeCodec(FriendlyByteBuf pb, Codec<T> codec, T obj) {
DataResult<Object> ob = codec.encodeStart(DataOps.COMPRESSED, obj);
Optional<Object> ret = ob.resultOrPartial(t->{throw new EncoderException(t);});
System.out.println(ret.get());
// System.out.println(ret.get());
ObjectWriter.writeObject(pb, ret.get());
}
public static <T> T readCodec(FriendlyByteBuf pb, Codec<T> codec) {

Object readed = ObjectWriter.readObject(pb);
System.out.println(readed);
// System.out.println(readed);
DataResult<T> ob = codec.parse(DataOps.COMPRESSED, readed);
System.out.println(ob);
// System.out.println(ob);
Optional<T> ret = ob.resultOrPartial(FHMain.LOGGER::info);
return ret.get();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void write(T obj,FriendlyByteBuf buffer) {
}
public MapCodec<T> getCodec(String name){
MapCodec<T> selected= codecs.get(name);
System.out.println(selected);
// System.out.println(selected);
return selected;
}
public T read(FriendlyByteBuf buffer) {
Expand Down

0 comments on commit b9c95a0

Please sign in to comment.