Browse Source

Update, add more blocks

tags/v1.0.0
NorbiPeti 4 years ago
parent
commit
218c20a6a4
Signed by: NorbiPeti <szatmari.norbert.peter@gmail.com> GPG Key ID: DBA4C4549A927E56
3 changed files with 25 additions and 10 deletions
  1. +19
    -0
      GCMC/CubePlacerEngine.cs
  2. +4
    -7
      GCMC/GCMC.csproj
  3. +2
    -3
      GCMC/PlaceBlockPatch.cs

+ 19
- 0
GCMC/CubePlacerEngine.cs View File

@@ -85,6 +85,7 @@ namespace GCMC
darkness = 5;
break;
case "AIR":
case "DOUBLE_PLANT":
continue;
case "LOG":
id = BlockIDs.WoodCube;
@@ -98,6 +99,24 @@ namespace GCMC
id = BlockIDs.AluminiumCube;
color = BlockColors.Yellow;
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:
Console.WriteLine("Unknown block: " + blocks.Material);
continue;


+ 4
- 7
GCMC/GCMC.csproj View File

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


+ 2
- 3
GCMC/PlaceBlockPatch.cs View File

@@ -2,7 +2,6 @@ using System.Reflection;
using DataLoader;
using Harmony;
using JetBrains.Annotations;
using RobocraftX.Blocks.GUI;
using RobocraftX.Common;
using RobocraftX.CR.MachineEditing;
using RobocraftX.StateSync;
@@ -20,7 +19,7 @@ namespace GCMC
{
if (isAuthoritative)
{
stateSyncReg.AddEngine(new CubePlacerEngine());
stateSyncReg.AddDeterministicEngine(new CubePlacerEngine());
Debug.Log($"Added Minecraft world import engine");
}
else
@@ -29,7 +28,7 @@ namespace GCMC

static MethodBase TargetMethod(HarmonyInstance instance)
{
return typeof(MachineEditingCompositionRoot).GetMethod("StateSyncCompose",
return typeof(MainEditingCompositionRoot).GetMethod("Compose",
BindingFlags.Public | BindingFlags.Static);
}
}

Loading…
Cancel
Save