Complete removal of /info entity, it's correspondent carpet and two small changes (#1047)
* Remove no longer needed language packet mixin * Make StringArgument properly return a StringArgument supplier, so `string` isn't `term` Fixes gnembon/fabric-carpet#1044 * Complete removal of `/info entity` and it's correspondent carpet Resolves gnembon/fabric-carpet#1033 * Remove yet another no longer needed mixin
This commit is contained in:
1 parent
4d9c5eb391
commit
d8c10c6e4a
9 files changed
+10
-231
No files matched your search
@@ -1,6 +1,5 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.fakes.ClientSettingsC2SPacketInterface;
|
||||
import carpet.fakes.EntityInterface;
|
||||
import carpet.fakes.ServerPlayerEntityInterface;
|
||||
import carpet.script.EntityEventsGroup;
|
||||
@@ -19,6 +18,7 @@ import net.minecraft.util.registry.RegistryKey;
|
||||
import net.minecraft.world.World;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.Unique;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
@@ -35,6 +35,7 @@ public abstract class ServerPlayerEntity_scarpetEventMixin extends PlayerEntity
|
||||
{
|
||||
// to denote if the player reference is valid
|
||||
|
||||
@Unique
|
||||
private boolean isInvalidReference = false;
|
||||
|
||||
public ServerPlayerEntity_scarpetEventMixin(World world, BlockPos blockPos, float f, GameProfile gameProfile)
|
||||
@@ -130,14 +131,18 @@ public abstract class ServerPlayerEntity_scarpetEventMixin extends PlayerEntity
|
||||
}
|
||||
|
||||
//getting player language
|
||||
@Unique
|
||||
private String language;
|
||||
|
||||
public String getLanguage(){
|
||||
@Override
|
||||
public String getLanguage()
|
||||
{
|
||||
return this.language;
|
||||
}
|
||||
|
||||
@Inject(method = "setClientSettings", at = @At("HEAD"))
|
||||
public void setClientSettings(ClientSettingsC2SPacket packet, CallbackInfo ci){
|
||||
this.language = ((ClientSettingsC2SPacketInterface) packet).getLanguage();
|
||||
public void setLanguage(ClientSettingsC2SPacket packet, CallbackInfo ci)
|
||||
{
|
||||
this.language = packet.getLanguage();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user