Conversation
MrSquidson
left a comment
There was a problem hiding this comment.
Seems like some of the things broke while moving your old PR to this one...
Main issue seems to be colors and the fact that no one can see poison particles now...
| @ModifyReturnValue(method = "getPerspective", at = @At("RETURN")) | ||
| public Perspective getPerspective(Perspective original) { | ||
| if (GameFunctions.isPlayerAliveAndSurvival(MinecraftClient.getInstance().player)) { | ||
| if (TMMClient.isPlayerAliveAndInSurvival() && TMMClient.gameComponent.isRunning()) { |
There was a problem hiding this comment.
Cannot open world because of a NullpointerException thrown by `TMMClient.gameComponent.isRunning()
I've changed the line to;
if (TMMClient.isPlayerAliveAndInSurvival() && (TMMClient.gameComponent != null && TMMClient.gameComponent.isRunning())) {And now im able to enter the world again...
There was a problem hiding this comment.
This does actually throw a NullpointerException though... above does fix it...
| if (target instanceof PlayerEntity player) { | ||
| if (GameFunctions.isPlayerSpectatingOrCreative(player)) return -1; | ||
| if (isKiller() && gameComponent.canUseKillerFeatures(player)) return MathHelper.hsvToRgb(0F, 1.0F, 0.6F); | ||
| if (isKiller() || gameComponent.canUseKillerFeatures(player)) return MathHelper.hsvToRgb(0F, 1.0F, 0.6F); |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
| (!TMMClient.isKiller() && | ||
| !TMMClient.isPlayerSpectatingOrCreative() && | ||
| !CanSeePoison.EVENT.invoker().visible(MinecraftClient.getInstance().player) | ||
| ) || tray.getPoisoner() == null) { |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
MrSquidson
left a comment
There was a problem hiding this comment.
Disregard above- I had the old PR checked out...
MrSquidson
left a comment
There was a problem hiding this comment.
Changes are only needed in;
src/main/java/dev/doctor4t/trainmurdermystery/mixin/client/restrictions/GameOptionsMixin.java since it gives a NullpointerException... otherwise everything works :)
| @ModifyReturnValue(method = "getPerspective", at = @At("RETURN")) | ||
| public Perspective getPerspective(Perspective original) { | ||
| if (GameFunctions.isPlayerAliveAndSurvival(MinecraftClient.getInstance().player)) { | ||
| if (TMMClient.isPlayerAliveAndInSurvival() && TMMClient.gameComponent.isRunning()) { |
There was a problem hiding this comment.
This does actually throw a NullpointerException though... above does fix it...
| if (target instanceof PlayerEntity player) { | ||
| if (GameFunctions.isPlayerSpectatingOrCreative(player)) return -1; | ||
| if (isKiller() && gameComponent.canUseKillerFeatures(player)) return MathHelper.hsvToRgb(0F, 1.0F, 0.6F); | ||
| if (isKiller() || gameComponent.canUseKillerFeatures(player)) return MathHelper.hsvToRgb(0F, 1.0F, 0.6F); |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
| this.equals(MinecraftClient.getInstance().options.advancementsKey)) | ||
| return true; | ||
| if (TMMClient.gameComponent != null && TMMClient.gameComponent.isRunning()) | ||
| return this.equals(MinecraftClient.getInstance().options.togglePerspectiveKey); |
There was a problem hiding this comment.
Can do f5 in the lobby as expected, if a game starts you enter first person.
| (!TMMClient.isKiller() && | ||
| !TMMClient.isPlayerSpectatingOrCreative() && | ||
| !CanSeePoison.EVENT.invoker().visible(MinecraftClient.getInstance().player) | ||
| ) || tray.getPoisoner() == null) { |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
|
@MrSquidson thank you for verifying my code all over again. I wouldn't have so much patience to do the same. |
|
make sure you're not completely rewriting the borders: innocents should appear with a border corresponding to their mood, not just green all the time |
|
The only change I made is one check for red colors. I dont think that affects the innocents in any way, but I will check when I will be able to. |
|
I'll try and look if mood still displays... I'd expect so since the Innocent borders ain't changed here, but you never know... |
| @ModifyReturnValue(method = "getPerspective", at = @At("RETURN")) | ||
| public Perspective getPerspective(Perspective original) { | ||
| if (GameFunctions.isPlayerAliveAndSurvival(MinecraftClient.getInstance().player)) { | ||
| if (TMMClient.isPlayerAliveAndInSurvival() && (TMMClient.gameComponent != null && TMMClient.gameComponent.isRunning())) { |
|
I'd say this is ready for merge when a maintainer has looked it over :) |
| if (target instanceof PlayerEntity player) { | ||
| if (GameFunctions.isPlayerSpectatingOrCreative(player)) return -1; | ||
| if (isKiller() && gameComponent.canUseKillerFeatures(player)) return MathHelper.hsvToRgb(0F, 1.0F, 0.6F); | ||
| if (gameComponent.canUseKillerFeatures(player)) return MathHelper.hsvToRgb(0F, 1.0F, 0.6F); |
There was a problem hiding this comment.
IMO this should check MoodType and return the role's color if the MoodType is fake, in addition to the original killer check.
There was a problem hiding this comment.
I like the idea, but i think it needs a little refactoring which this pull request was not created for, because we'd need to add another field to the role class and someone might did in another pull request and so and etc. etc. etc. I think we better wait until all the other pull requests are either approved or discarded.
There was a problem hiding this comment.
(we'd need another field because not all roles should be highlighted to the killers, like the jester)
ea642f4 to
7a336c9
Compare
…nto spectator-features-&-lobby-f3 # Conflicts: # src/main/java/dev/doctor4t/wathe/block_entity/TrimmedBedBlockEntity.java # src/main/java/dev/doctor4t/wathe/mixin/client/restrictions/GameOptionsMixin.java # src/main/java/dev/doctor4t/wathe/mixin/client/restrictions/KeyBindingMixin.java # src/main/java/dev/doctor4t/wathe/mixin/client/self/BeveragePlateBlockEntityMixin.java
|
@LevAlTru isn't the keybinding mixin supposed to still use |


Copy of #49 because of its accidental closure.