This repository has been archived by the owner on Apr 20, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the width of the version dropdown dynamic and fix doesServerKnow (…
…#518) * Make the width of the version dropdown dynamic * Fix doesServerKnow * Fix items not getting added back to the creative inventory Also applies to items not getting removed if you joined a newer server first. * Handle blocks older than 1.12.2 properly as well * Suppress conversion warnings --------- Co-authored-by: Joseph Burton <[email protected]>
- Loading branch information
1 parent
be7871c
commit d6cfe94
Showing
9 changed files
with
117 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/main/java/net/earthcomputer/multiconnect/mixin/bridge/CreativeModeTabsMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package net.earthcomputer.multiconnect.mixin.bridge; | ||
|
||
import net.earthcomputer.multiconnect.impl.ConnectionInfo; | ||
import net.minecraft.world.flag.FeatureFlagSet; | ||
import net.minecraft.world.item.CreativeModeTabs; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; | ||
|
||
@Mixin(CreativeModeTabs.class) | ||
public class CreativeModeTabsMixin { | ||
private static int protocolValue = Integer.MIN_VALUE; | ||
|
||
@Inject(method = "wouldRebuildSameContents", at = @At("HEAD"), cancellable = true) | ||
private static void alsoCheckProtocolVersion(FeatureFlagSet featureFlagSet, boolean bl, CallbackInfoReturnable<Boolean> cir) { | ||
if (protocolValue != ConnectionInfo.protocolVersion) { | ||
protocolValue = ConnectionInfo.protocolVersion; | ||
cir.setReturnValue(false); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# this is a comment | ||
|
||
serverside-blockconnections: true | ||
serverside-blockconnections: true | ||
suppress-conversion-warnings: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters