Everything posted by kyazuki
-
[1.15.2]How do I override vanilla biomes?
My mod add only 1 block. I want to replace all blocks which the game generates for the block.(except fluids, spawners and end portal frames) However, I don't want to override vanilla blocks. Then I hope that the game generates structures.(e.g. Stronghold) And I want to replace blocks of structures. So I think overriding biomes and structures is easier than adding biome. How do I override?
-
(SOLVED)[1.15.2]How do I name chests?
Thanks!! It works!!
-
(SOLVED)[1.15.2]How do I name chests?
Thanks! Then, how do I localize the name?
-
(SOLVED)[1.15.2]How do I name chests?
I think I should add NBT Tag, but I don't know how to do it.
-
(Solved)[1.15.2]Which method does the game use to choose a biome?
I found the method! Thank you!
-
(Solved)[1.15.2]Which method does the game use to choose a biome?
Can anybody help?
-
(Solved)[1.15.2]Which method does the game use to choose a biome?
I want to change conditions of choosing a biome.(e.g. Every chunk is a different biome.) Which class should I extend? And which method should I override?
-
(Solved)[1.15.2]Speed.applyModifier doesn't call FOVUpdateEvent
I'm such an idiot... Thank you very much!
-
(Solved)[1.15.2]Speed.applyModifier doesn't call FOVUpdateEvent
I wrote @Mod.EventBusSubscriber and @SubscribeEvent. Isn't it enough to register?
-
(Solved)[1.15.2]Speed.applyModifier doesn't call FOVUpdateEvent
I want to reset FOV when player is applied speed modifier. The Game doesn't call onFOVChange method... @SubscribeEvent public static void setSpeedPlayer(TickEvent.PlayerTickEvent event) { player_movement_speed = event.player.getAttribute(SharedMonsterAttributes.MOVEMENT_SPEED); player_movement_speed.removeModifier(/*UUID*/); player_movement_speed.applyModifier(new AttributeModifier(/*UUID*/, /*Name*/, speed - 1.0f, AttributeModifier.Operation.MULTIPLY_TOTAL)); } } @SubscribeEvent @OnlyIn(Dist.CLIENT) public void onFOVChange(FOVUpdateEvent event) { LOGGER.debug("ChangeFOV!"); if (event.getEntity() instanceof PlayerEntity) { PlayerEntity player = event.getEntity(); EffectInstance speed = player.getActivePotionEffect(Effects.SPEED); float fov = 0.9f, sprint_fov = 1.02f; if (player.isSprinting()) event.setNewfov(speed != null ? sprint_fov + ((0.104f * (speed.getAmplifier() + 1))) : sprint_fov); else event.setNewfov(speed != null ? fov + (0.08f * (speed.getAmplifier() + 1)) : fov); } }
-
[Solved][1.15.2]Custom command always return error
The game shows my command by auto complete, so I think the game knows my command. However, system always shows "Unknown command". public class SetDistanceCommand { public static void register(CommandDispatcher<CommandSource> dispatcher) { dispatcher.register(Commands.literal("setdistance") .requires(source -> source.hasPermissionLevel(2)) .then(Commands.argument("blocks", IntegerArgumentType.integer())) .executes(context -> { context.getSource().sendFeedback(new TranslationTextComponent("commands.mymod.setdistance"), true); MyModConfig.distanceToNormal = IntegerArgumentType.getInteger(context, "blocks"); return 0; })); } }
-
(Solved)[1.14.4]How do I create an addon mod?
I want to create an addon mod for his luckyblock mod(https://github.com/alexsocha/luckyblock). I have made a small mod, so I have some knowledge of modding. I want to call his methods in my mod.
-
(Solved)[1.14.4]How do I create an addon mod?
I have sources of a base mod from github. Please teach me what do I need to modify. It's solved! I used JitPack.
-
[1.15.2]How do I make player fat?
Can anybody help?
-
(Solved)[1.15.2]setHealth method don't work as I expected
I was mistaken about isRemote method. I reduced their max health in Render Thread( if(isRemote()) ). Thank you very much! Could you answer to this topic?
-
(Solved)[1.15.2]setHealth method don't work as I expected
Hmm... I can't find the method to sync. Can you tell me methods which I should check using the debugger?
-
(Solved)[1.15.2]setHealth method don't work as I expected
I checked by debugger. setHealth method works in Server Thread. Should I check methods in Render Thread? I don't know the method which health synced to the server.
-
(Solved)[1.15.2]setHealth method don't work as I expected
Sorry, I said 20 hearts as max health(include gray hearts)...
-
(Solved)[1.15.2]setHealth method don't work as I expected
applyModifier works, but setHealth didn't works. My mod gradually reduces the max health from 40.0 to 10.0. Then, the player whose max health is 10.0 is killed. I want to reset the player's max health to 40.0. So, I calls my method when the player dies. The method reset their max healths as I expected. However, setHealth doesn't work in the client. Health is same value before they die(ex. 10.0 / 40.0), but LOGGER says 40.0 / 40.0 in Server Thread. Client's health isn't synced to Server's health.
-
(Solved)[1.15.2]setHealth method don't work as I expected
I want to set max health to 40.0f as default value. So I don't use effects of potions and equipments. The game renders 20 hearts. So the client knows my modified max health, didn't it?
-
(Solved)[1.15.2]Custom DeathMessage by onDeath
Sorry, I completely thought I must call language register methods. Thank you for your help!
-
(Solved)[1.15.2]setHealth method don't work as I expected
This cord set max health to 40.0f as I expected, but setHealth don't work. Logger always says "Change to: 40.0 / 40.0" only in Server Thread. I think setHealth calls only in Server Thread. How do I fix? @SubscribeEvent public static void respawnPlayer(PlayerEvent.PlayerRespawnEvent event) { player.getAttribute(SharedMonsterAttributes.MAX_HEALTH).removeModifier(TestMaxHealthUUID); player.getAttribute(SharedMonsterAttributes.MAX_HEALTH).applyModifier(new AttributeModifier(TestMaxHealthUUID, "TestMaxHealth", 2.0f - 1.0f, AttributeModifier.Operation.MULTIPLY_TOTAL)); player.setHealth(40.0f); LOGGER.debug("change to: " + player.getHealth() + " / " + player.getMaxHealth()); }
-
(Solved)[1.15.2]Custom DeathMessage by onDeath
Thanks! Then, how do I change death messages by lang file(en_us.json)?
-
(Solved)[1.15.2]Custom DeathMessage by onDeath
I want to show Custom DeathMessage("%playername died by malnutrition") when player dies by onDeath method. However, onDeath method always shows "%playername died." How do I change this? public static DamageSource Malnutrition = new DamageSource("Malnutrition"); @SubscribeEvent public static void killPlayer(TickEvent.PlayerTickEvent event) { if (!event.player.world.isRemote()) { if (/* check player */) { if (event.player.isAlive()) { event.player.setHealth(0.0f); event.player.onDeath(Malnutrition); } } } }
-
(Solved)[1.15.2]player.onDeath method causes crash
I assume that I must call onDeath in Server Thread... Thanks!!
IPS spam blocked by CleanTalk.