Skip to content

Feat/projector overhaul#1941

Open
rapbattlegod32 wants to merge 8 commits intomainfrom
feat/projector-overhaul
Open

Feat/projector overhaul#1941
rapbattlegod32 wants to merge 8 commits intomainfrom
feat/projector-overhaul

Conversation

@rapbattlegod32
Copy link
Member

About the PR

environment projector has gui, made by @lakehascake

Why / Balance

nyx

Technical details

Media

Requirements

Breaking changes

Changelog

🆑

  • feat: environment projector gui

@rapbattlegod32 rapbattlegod32 requested review from a team as code owners October 27, 2025 04:17
@github-actions github-actions bot added C: Textures Changes: Might require knowledge of spriting or visual design. S: Needs Review Status: Requires additional reviews before being fully accepted. size/M Denotes a PR that changes 100-999 lines. S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. labels Oct 27, 2025
@GSMPBot GSMPBot requested review from drtheodor and duzos October 27, 2025 04:18
@rapbattlegod32
Copy link
Member Author

i give up on up and down directions, if someone can give me an example of how i can do it that would be great because ive tried copying what pillar/log blocks do and had no luck

@rapbattlegod32
Copy link
Member Author

im going to flicker goon for the next 4 hours and then ill try figure this out again

@drtheodor drtheodor added C: UI Changes: Might require knowledge of UI design or code. and removed S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. labels Dec 26, 2025
public void appendNarrations(NarrationMessageBuilder builder) {
WorldEntry selected = this.getSelected();
if (selected != null) {
builder.put(NarrationPart.TITLE, Text.literal("world: ").copy().append(selected.label));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use translatable

if (selected != null) {
builder.put(NarrationPart.TITLE, Text.literal("world: ").copy().append(selected.label));
} else {
builder.put(NarrationPart.TITLE, Text.literal("dimension skys"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here too

Comment on lines +24 to +25
private static final Identifier DEFAULT_TEXTURE = new Identifier(AITMod.MOD_ID,
"textures/gui/tardis/monitor/environment_menu_sky.png");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
private static final Identifier DEFAULT_TEXTURE = new Identifier(AITMod.MOD_ID,
"textures/gui/tardis/monitor/environment_menu_sky.png");
private static final Identifier DEFAULT_TEXTURE = AITMod.id("textures/gui/tardis/monitor/environment_menu_sky.png");

Comment on lines +26 to +27
private static final Identifier DIRECTION_TEXTURE = new Identifier(AITMod.MOD_ID,
"textures/gui/tardis/monitor/environment_menu_direction_compass.png");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
private static final Identifier DIRECTION_TEXTURE = new Identifier(AITMod.MOD_ID,
"textures/gui/tardis/monitor/environment_menu_direction_compass.png");
private static final Identifier DIRECTION_TEXTURE = AITMod.id("textures/gui/tardis/monitor/environment_menu_direction_compass.png");

int bgWidth = 216;
int left, top;

private static final RegistryKey<World> DEFAULT = World.END;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this field seems unnecessary?

}

private void drawBackground(DrawContext context, GuiSelection current) {
if (current.equals(GuiSelection.SKY)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (current.equals(GuiSelection.SKY)) {
if (current == GuiSelection.SKY) {

return ActionResult.SUCCESS;
state = state.cycle(ENABLED);
// world.setBlockState(pos, state, Block.NOTIFY_LISTENERS);
AITMod.sendProjectorToggle(pos, state.get(ENABLED));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this method should be implemented somewhere else
dont add more stuff to AITMod

return ActionResult.SUCCESS;
}

if (world.isClient){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

always false by this point

Comment on lines +100 to +102
if (world.isClient){
return ActionResult.SUCCESS;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (world.isClient){
return ActionResult.SUCCESS;
}

});
});

ClientPlayNetworking.registerGlobalReceiver(OPEN_SCREEN_PROJECTOR, (client, handler, buf, responseSender) -> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ideally, all of this should be moved to somewhere more relevant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C: Textures Changes: Might require knowledge of spriting or visual design. C: UI Changes: Might require knowledge of UI design or code. S: Needs Review Status: Requires additional reviews before being fully accepted. size/M Denotes a PR that changes 100-999 lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants