• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqt誰得cocoawindowspythonphprubygameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdombtronvb.netdirectxarduinopreviewerゲームエンジン

Carbon Copy plugin for VS


Commit MetaInfo

Revision0c96495765339442b7200992acbb85b92197b6b2 (tree)
Time2020-10-21 02:25:59
Authormelchior <melchior@user...>
Commitermelchior

Log Message

Updated for V.S. 1.13

Change Summary

Incremental Difference

--- a/CarbonCopy/ClientCommands/CarbonCopyCommand.cs
+++ b/CarbonCopy/ClientCommands/CarbonCopyCommand.cs
@@ -1,6 +1,7 @@
11 using System;
22 using System.Collections.Generic;
33 using System.IO;
4+using System.Linq;
45
56 using Vintagestory.API.Client;
67 using Vintagestory.API.Common;
@@ -96,7 +97,7 @@ namespace CarbonCopy
9697 switch (subCommand) {
9798 case "start":
9899 if (this.start == null) {
99- this.start = ClientAPI.World.Player.Entity.LocalPos.AsBlockPos.Copy( );
100+ this.start = ClientAPI.World.Player.Entity.Pos.AsBlockPos.Copy( );
100101 }
101102 BendBlockPosition(this.start, args);
102103
@@ -105,7 +106,7 @@ namespace CarbonCopy
105106
106107 case "end":
107108 if (this.end == null) {
108- this.end = ClientAPI.World.Player.Entity.LocalPos.AsBlockPos.Copy( );
109+ this.end = ClientAPI.World.Player.Entity.Pos.AsBlockPos.Copy( );
109110 }
110111 BendBlockPosition(this.end, args);
111112
@@ -232,8 +233,8 @@ namespace CarbonCopy
232233
233234 reporter.WriteLine("MC Block Name\tVS Block Name\tVS ID#\tMaterial\t");
234235 Logger.VerboseDebug("Dumping {0} Blocks", ClientAPI.World.Blocks.Count);
235- foreach (var block in ClientAPI.World.Blocks.FindAll(blk => blk.Code != null && blk.Code.Domain == GlobalConstants.DefaultDomain)) {
236- if (block.Id != 0 && !block.IsMissing ) {
236+ foreach (var block in ClientAPI.World.Blocks.Where(blk => blk.Code != null && blk.Code.Domain == GlobalConstants.DefaultDomain)) {
237+ if (block.Id != 0 && !block.IsMissing && block.Code.Path != "unknown" ) {
237238 reporter.WriteLine($"____\t{block.Code.Path}\t{block.BlockId}\t{block.BlockMaterial}");
238239
239240 }
@@ -254,8 +255,8 @@ namespace CarbonCopy
254255
255256 reporter.WriteLine("MC Item Name\tVS Item Name\tVS ID#\tStorage Flags\tMax Stack Size\tC.I. Tabs\t");
256257 Logger.VerboseDebug("Dumping {0} Items", ClientAPI.World.Items.Count);
257- foreach (var item in ClientAPI.World.Items.FindAll(itm => itm.Code != null && itm.Code.Domain == GlobalConstants.DefaultDomain)) {
258- if (item.Id != 0 && !item.IsMissing) {
258+ foreach (var item in ClientAPI.World.Items.Where(itm => itm.Code != null && itm.Code.Domain == GlobalConstants.DefaultDomain)) {
259+ if (item.Id != 0 && !item.IsMissing && item.Code.Path != "unknown") {
259260 reporter.WriteLine($"____\t{item.Code.Path}\t{item.ItemId}\t{String.Join(",", item.StorageFlags)}\t{item.MaxStackSize}\t{(item.CreativeInventoryTabs != null ? String.Join(",",item.CreativeInventoryTabs): " ")}");
260261 }
261262
--- a/CarbonCopy/modinfo.json
+++ b/CarbonCopy/modinfo.json
@@ -3,10 +3,10 @@
33 "name": "Carbon-Copy",
44 "description" : "Export schematics from MP (clientside!)",
55 "authors": ["Melchior"],
6- "version": "0.1.4",
6+ "version": "0.1.5",
77 "side": "client",
88 "dependencies": {
9- "game": "1.11.0"
9+ "game": "1.13.0"
1010 },
1111 "website": "http://nowebsite.nope"
1212 }