#mod-dev-talk Saturday 8 January 2022
98 messages3 people
- S
- J
- S
- J
- S
- J
- S
- A
- J
- S
- S
- A
- S
- J02:42Just waiting for some map mod to mess up because of it
- A
- J
- S02:43I'll do that now
- A
- S
- A
Replying toSollyDoes it ignore blocks at the bottom of the world rn?
I have not looked at the code in a good few months now02:48But I think no02:48It only does it if it finds void - S
- S
- J03:05I think it'd look nicer empty or blue, but the checkered is kinda weird
- S03:06Create one in vanilla and the parts that aren't filled in are the same
- J03:07I wonder why they did that
- S
- SHere's the code, anyway
@Mixin(FilledMapItem.class) public abstract class FilledMapItemMixin { @Redirect(method = "updateColors", at = @At(value = "FIELD", target = "Lnet/minecraft/block/Blocks;BEDROCK:Lnet/minecraft/block/Block;", opcode = Opcodes.GETSTATIC)) private Block getBottomBlock(World world, Entity entity, MapState state) { return world.getRegistryKey().equals(AetherDimension.AETHER_WORLD_KEY) ? Blocks.AIR : Blocks.BEDROCK; } }03:17Replace Blocks.AIR with another block to change the colour - A
- S
- A
- J
- S
Replying toAzzyypaarasThe mixin feeds it a unique color
Yeah, replacing it with a colour is doable03:41The issue is that then you have to deal with colour ids03:41And since there can only ever be 64 colours, is it really worth wasting one on a background? - A
Replying toSollyAnd since there can only ever be 64 colours, is it really worth wasting one on a…
Yes.03:42We are probably the only persons in the entirety of modded to ever add map colors - S
- A03:43Not a bad idea
- S
- A
- S
- J
- S
- J
- A
- SYou could check the length of the map colour array, and if it's full, set the background colour to white, otherwise add a new colour03:45Want me to add that?
- A
- S
- A
- J
- A
- S03:48Don't
- A
- A
- S
- A
- S






