@@ -34,6 +34,10 @@ private static void OnUpdate(On.Terraria.Main.orig_Update orig, Terraria.Main in
34
34
35
35
private static void OnHardmodeTileUpdate ( object sender , Hooks . WorldGen . HardmodeTileUpdateEventArgs e )
36
36
{
37
+ if ( e . Result == HookResult . Cancel )
38
+ {
39
+ return ;
40
+ }
37
41
if ( _hookManager . InvokeGameHardmodeTileUpdate ( e . X , e . Y , e . Type ) )
38
42
{
39
43
e . Result = HookResult . Cancel ;
@@ -42,6 +46,10 @@ private static void OnHardmodeTileUpdate(object sender, Hooks.WorldGen.HardmodeT
42
46
43
47
private static void OnHardmodeTilePlace ( object sender , Hooks . WorldGen . HardmodeTilePlaceEventArgs e )
44
48
{
49
+ if ( e . Result == HardmodeTileUpdateResult . Cancel )
50
+ {
51
+ return ;
52
+ }
45
53
if ( _hookManager . InvokeGameHardmodeTileUpdate ( e . X , e . Y , e . Type ) )
46
54
{
47
55
e . Result = HardmodeTileUpdateResult . Cancel ;
@@ -63,6 +71,10 @@ private static void OnStartServer(On.Terraria.Netplay.orig_StartServer orig)
63
71
64
72
private static void OnItemMechSpawn ( object sender , Hooks . Item . MechSpawnEventArgs e )
65
73
{
74
+ if ( e . Result == HookResult . Cancel )
75
+ {
76
+ return ;
77
+ }
66
78
if ( ! _hookManager . InvokeGameStatueSpawn ( e . Num2 , e . Num3 , e . Num , ( int ) ( e . X / 16f ) , ( int ) ( e . Y / 16f ) , e . Type , false ) )
67
79
{
68
80
e . Result = HookResult . Cancel ;
@@ -71,6 +83,10 @@ private static void OnItemMechSpawn(object sender, Hooks.Item.MechSpawnEventArgs
71
83
72
84
private static void OnNpcMechSpawn ( object sender , Hooks . NPC . MechSpawnEventArgs e )
73
85
{
86
+ if ( e . Result == HookResult . Cancel )
87
+ {
88
+ return ;
89
+ }
74
90
if ( ! _hookManager . InvokeGameStatueSpawn ( e . Num2 , e . Num3 , e . Num , ( int ) ( e . X / 16f ) , ( int ) ( e . Y / 16f ) , e . Type , true ) )
75
91
{
76
92
e . Result = HookResult . Cancel ;
0 commit comments