Update, add more blocks

This commit is contained in:
Norbi Peti 2020-04-11 17:22:12 +02:00
parent f1a3031ea4
commit 218c20a6a4
No known key found for this signature in database
GPG key ID: DBA4C4549A927E56
3 changed files with 25 additions and 10 deletions

View file

@ -85,6 +85,7 @@ namespace GCMC
darkness = 5; darkness = 5;
break; break;
case "AIR": case "AIR":
case "DOUBLE_PLANT":
continue; continue;
case "LOG": case "LOG":
id = BlockIDs.WoodCube; id = BlockIDs.WoodCube;
@ -98,6 +99,24 @@ namespace GCMC
id = BlockIDs.AluminiumCube; id = BlockIDs.AluminiumCube;
color = BlockColors.Yellow; color = BlockColors.Yellow;
break; break;
case "LONG_GRASS":
id = BlockIDs.Flower1;
color = BlockColors.Default;
break;
case "YELLOW_FLOWER":
id = BlockIDs.Flower2;
color = BlockColors.Default;
break;
case "GRAVEL":
id = BlockIDs.ConcreteCube;
color = BlockColors.White;
darkness = 7;
break;
case "CLAY":
id = BlockIDs.ConcreteCube;
color = BlockColors.White;
darkness = 4;
break;
default: default:
Console.WriteLine("Unknown block: " + blocks.Material); Console.WriteLine("Unknown block: " + blocks.Material);
continue; continue;

View file

@ -21,17 +21,14 @@
<Reference Include="DataLoader, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"> <Reference Include="DataLoader, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\ref\DataLoader.dll</HintPath> <HintPath>..\ref\DataLoader.dll</HintPath>
</Reference> </Reference>
<Reference Include="GamecraftModdingAPI, Version=0.1.1.0, Culture=neutral, PublicKeyToken=null"> <Reference Include="GamecraftModdingAPI, Version=0.2.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\GamecraftModdingAPI\GamecraftModdingAPI\bin\Debug\net48\GamecraftModdingAPI.dll</HintPath> <HintPath>..\..\GamecraftModdingAPI\GamecraftModdingAPI\bin\Debug\net472\GamecraftModdingAPI.dll</HintPath>
</Reference>
<Reference Include="GamecraftModdingAPI, Version=0.1.2.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\GamecraftModdingAPI\GamecraftModdingAPI\bin\Debug\net48\GamecraftModdingAPI.dll</HintPath>
</Reference> </Reference>
<Reference Include="IllusionPlugin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"> <Reference Include="IllusionPlugin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>IllusionPlugin.dll</HintPath> <HintPath>IllusionPlugin.dll</HintPath>
</Reference> </Reference>
<Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=null"> <Reference Include="Newtonsoft.Json, Version=12.0.1.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\GamecraftModdingAPI\GamecraftModdingAPI\bin\Debug\net48\Newtonsoft.Json.dll</HintPath> <HintPath>..\..\GamecraftModdingAPI\GamecraftModdingAPI\bin\Debug\net472\Newtonsoft.Json.dll</HintPath>
</Reference> </Reference>
<Reference Include="RobocraftX.Blocks, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"> <Reference Include="RobocraftX.Blocks, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\ref\RobocraftX.Blocks.dll</HintPath> <HintPath>..\ref\RobocraftX.Blocks.dll</HintPath>

View file

@ -2,7 +2,6 @@ using System.Reflection;
using DataLoader; using DataLoader;
using Harmony; using Harmony;
using JetBrains.Annotations; using JetBrains.Annotations;
using RobocraftX.Blocks.GUI;
using RobocraftX.Common; using RobocraftX.Common;
using RobocraftX.CR.MachineEditing; using RobocraftX.CR.MachineEditing;
using RobocraftX.StateSync; using RobocraftX.StateSync;
@ -20,7 +19,7 @@ namespace GCMC
{ {
if (isAuthoritative) if (isAuthoritative)
{ {
stateSyncReg.AddEngine(new CubePlacerEngine()); stateSyncReg.AddDeterministicEngine(new CubePlacerEngine());
Debug.Log($"Added Minecraft world import engine"); Debug.Log($"Added Minecraft world import engine");
} }
else else
@ -29,7 +28,7 @@ namespace GCMC
static MethodBase TargetMethod(HarmonyInstance instance) static MethodBase TargetMethod(HarmonyInstance instance)
{ {
return typeof(MachineEditingCompositionRoot).GetMethod("StateSyncCompose", return typeof(MainEditingCompositionRoot).GetMethod("Compose",
BindingFlags.Public | BindingFlags.Static); BindingFlags.Public | BindingFlags.Static);
} }
} }