Commit 5a6fbb2 1 parent 0a5f528 commit 5a6fbb2 Copy full SHA for 5a6fbb2
File tree 3 files changed +31
-1
lines changed
java/dev/ithundxr/railwaystweaks/mixin/compat/tconstruct
3 files changed +31
-1
lines changed Original file line number Diff line number Diff line change 2
2
org.gradle.jvmargs =-Xmx2G
3
3
4
4
# Mod Properties
5
- mod_version = 0.0.46
5
+ mod_version = 0.0.47
6
6
maven_group = dev.ithundxr
7
7
archives_base_name = RailwaysTweaks
8
8
Original file line number Diff line number Diff line change
1
+ package dev .ithundxr .railwaystweaks .mixin .compat .tconstruct ;
2
+
3
+ import org .spongepowered .asm .mixin .Final ;
4
+ import org .spongepowered .asm .mixin .Mixin ;
5
+ import org .spongepowered .asm .mixin .Shadow ;
6
+ import org .spongepowered .asm .mixin .injection .At ;
7
+ import org .spongepowered .asm .mixin .injection .Inject ;
8
+ import org .spongepowered .asm .mixin .injection .callback .CallbackInfoReturnable ;
9
+ import slimeknights .tconstruct .library .modifiers .Modifier ;
10
+ import slimeknights .tconstruct .library .modifiers .ModifierId ;
11
+ import slimeknights .tconstruct .library .modifiers .ModifierManager ;
12
+ import slimeknights .tconstruct .library .modifiers .util .LazyModifier ;
13
+
14
+ @ Mixin (LazyModifier .class )
15
+ public class LazyModifierMixin {
16
+
17
+ @ Shadow @ Final protected ModifierId id ;
18
+
19
+ @ Inject (
20
+ method = "get()Lslimeknights/tconstruct/library/modifiers/Modifier;" ,
21
+ at = @ At ("HEAD" ),
22
+ cancellable = true ,
23
+ remap = false
24
+ )
25
+ private void railwayTweaks$suppressException (CallbackInfoReturnable <Modifier > cir ) {
26
+ if (!ModifierManager .INSTANCE .isDynamicModifiersLoaded ())
27
+ cir .setReturnValue (ModifierManager .INSTANCE .getDefaultValue ());
28
+ }
29
+ }
Original file line number Diff line number Diff line change 17
17
" compat.create.SchematicannonBlockEntityMixin" ,
18
18
" compat.dcintegration.DiscordEventListenerMixin" ,
19
19
" compat.enchancement.SlideComponentMixin" ,
20
+ " compat.tconstruct.LazyModifierMixin" ,
20
21
" compat.tconstruct.SimpleChannelAccessor"
21
22
],
22
23
"client" : [
You can’t perform that action at this time.
0 commit comments