Skip to content

Commit

Permalink
Ported to 1.18.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Majrusz committed Jul 2, 2022
1 parent 59ccec7 commit 7effff7
Show file tree
Hide file tree
Showing 46 changed files with 218 additions and 349 deletions.
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ plugins {
id 'net.minecraftforge.gradle' version '5.1.+'
}

version = '1.5.0'
version = '1.4.2'
group = 'com.majruszsdifficulty'
archivesBaseName = 'majruszs-difficulty-1.19'
archivesBaseName = 'majruszs-difficulty-1.18.2'

// Mojang ships Java 16 to end users in 1.17+ instead of Java 8 in 1.16 or lower, so your mod should target Java 16.
java.toolchain.languageVersion = JavaLanguageVersion.of(17)

minecraft {
mappings channel: 'official', version: '1.19'
mappings channel: 'official', version: '1.18.2'

accessTransformer = file( 'src/main/resources/META-INF/accesstransformer.cfg' ) // Currently, this location cannot be changed from the default.

Expand Down Expand Up @@ -65,8 +65,8 @@ repositories {
}

dependencies {
minecraft 'net.minecraftforge:forge:1.19-41.0.62'
implementation fg.deobf( 'com.mlib:majrusz-library-1.19:2.8.0' )
minecraft 'net.minecraftforge:forge:1.18.2-40.1.54'
implementation fg.deobf( 'com.mlib:majrusz-library-1.18.2:2.7.2' )
}

// Example for how to get properties into the manifest for reading at runtime.
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Binary file not shown.
3 changes: 3 additions & 0 deletions src/main/java/com/majruszsdifficulty/EnderiumItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
import com.mlib.entities.EntityHelper;
import com.mlib.features.FarmlandTiller;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.TextComponent;
import net.minecraft.network.chat.TranslatableComponent;
import net.minecraft.network.chat.Component;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.effect.MobEffects;
import net.minecraft.world.entity.player.Player;
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/com/majruszsdifficulty/GameStage.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import com.mlib.levels.LevelHelper;
import net.minecraft.ChatFormatting;
import net.minecraft.network.chat.TextComponent;
import net.minecraft.network.chat.TranslatableComponent;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.MutableComponent;
import net.minecraft.server.MinecraftServer;
Expand Down Expand Up @@ -102,7 +104,7 @@ public static double getStageModifier() {
}

private static MutableComponent constructGameStageText( String stage, ChatFormatting color ) {
return Component.translatable( "majruszsdifficulty.stages." + stage ).withStyle( color, ChatFormatting.BOLD );
return new TranslatableComponent( "majruszsdifficulty.stages." + stage ).withStyle( color, ChatFormatting.BOLD );
}

public enum Stage {
Expand Down
11 changes: 7 additions & 4 deletions src/main/java/com/majruszsdifficulty/MajruszsHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@

import net.minecraft.ChatFormatting;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.TextComponent;
import net.minecraft.network.chat.TranslatableComponent;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.MutableComponent;
import net.minecraft.world.item.TooltipFlag;

import java.util.List;

public class MajruszsHelper {
public static void addTranslatableText( List< Component > tooltip, String translationKey ) {
tooltip.add( Component.translatable( translationKey ).withStyle( ChatFormatting.GRAY ) );
tooltip.add( new TranslatableComponent( translationKey ).withStyle( ChatFormatting.GRAY ) );
}

public static void addTranslatableTexts( List< Component > tooltip, String... translationKeys ) {
Expand All @@ -32,19 +35,19 @@ public static void addAdvancedTranslatableTexts( List< Component > tooltip, Tool

/** Returns formatted text with information that item is disabled. */
public static MutableComponent getDisabledItemComponent() {
return Component.translatable( "majruszsdifficulty.items.disabled_tooltip" ).withStyle( ChatFormatting.RED, ChatFormatting.BOLD );
return new TranslatableComponent( "majruszsdifficulty.items.disabled_tooltip" ).withStyle( ChatFormatting.RED, ChatFormatting.BOLD );
}

public static MutableComponent getMoreDetailsComponent() {
return Component.translatable( "majruszsdifficulty.items.advanced_tooltip" ).withStyle( ChatFormatting.GRAY );
return new TranslatableComponent( "majruszsdifficulty.items.advanced_tooltip" ).withStyle( ChatFormatting.GRAY );
}

public static void addMoreDetailsText( List< Component > tooltip ) {
tooltip.add( getMoreDetailsComponent() );
}

public static MutableComponent getEmptyLine() {
return Component.literal( " " );
return new TextComponent( " " );
}

public static void addEmptyLine( List< Component > tooltip ) {
Expand Down
18 changes: 2 additions & 16 deletions src/main/java/com/majruszsdifficulty/Registries.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
import com.majruszsdifficulty.undeadarmy.UndeadArmyConfig;
import com.majruszsdifficulty.undeadarmy.UndeadArmyEventsHandler;
import com.majruszsdifficulty.undeadarmy.UndeadArmyManager;
import com.majruszsdifficulty.world.EntityBiomeModifier;
import com.majruszsdifficulty.world.OreBiomeModifier;
import com.majruszsdifficulty.world.WorldGenHelper;
import com.mlib.commands.IRegistrableCommand;
import com.mlib.registries.DeferredRegisterHelper;
Expand Down Expand Up @@ -58,7 +56,6 @@
import net.minecraftforge.common.ForgeSpawnEggItem;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.loot.GlobalLootModifierSerializer;
import net.minecraftforge.common.world.BiomeModifier;
import net.minecraftforge.event.RegisterCommandsEvent;
import net.minecraftforge.event.entity.EntityAttributeCreationEvent;
import net.minecraftforge.event.world.WorldEvent;
Expand Down Expand Up @@ -90,7 +87,6 @@ public class Registries {
static final DeferredRegister< GlobalLootModifierSerializer< ? > > LOOT_MODIFIERS = HELPER.create( ForgeRegistries.Keys.LOOT_MODIFIER_SERIALIZERS );
static final DeferredRegister< PlacedFeature > PLACED_FEATURES = HELPER.create( Registry.PLACED_FEATURE_REGISTRY );
static final DeferredRegister< ConfiguredFeature< ?, ? > > CONFIGURED_FEATURES = HELPER.create( Registry.CONFIGURED_FEATURE_REGISTRY );
static final DeferredRegister< Codec< ? extends BiomeModifier > > BIOME_MODIFIERS = HELPER.create( ForgeRegistries.Keys.BIOME_MODIFIER_SERIALIZERS );

// Entities
public static final RegistryObject< EntityType< CreeperlingEntity > > CREEPERLING = ENTITY_TYPES.register( "creeperling", CreeperlingEntity.createSupplier() );
Expand Down Expand Up @@ -123,7 +119,6 @@ public class Registries {
public static final RegistryObject< TreasureBagItem > ENDER_DRAGON_TREASURE_BAG = ITEMS.register( "ender_dragon_treasure_bag", TreasureBagItem.EnderDragon::new );
public static final RegistryObject< TreasureBagItem > FISHING_TREASURE_BAG = ITEMS.register( "fishing_treasure_bag", TreasureBagItem.Fishing::new );
public static final RegistryObject< TreasureBagItem > PILLAGER_TREASURE_BAG = ITEMS.register( "pillager_treasure_bag", TreasureBagItem.Pillager::new );
public static final RegistryObject< TreasureBagItem > WARDEN_TREASURE_BAG = ITEMS.register( "warden_treasure_bag", TreasureBagItem.Warden::new );

// Item Blocks
public static final RegistryObject< EndShardOre.EndShardOreItem > ENDERIUM_SHARD_ORE_ITEM = ITEMS.register( "enderium_shard_ore", EndShardOre.EndShardOreItem::new );
Expand Down Expand Up @@ -179,23 +174,15 @@ static Supplier< SpawnEggItem > createEggSupplier( Supplier< ? extends EntityTyp
public static final BasicTrigger BASIC_TRIGGER = BasicTrigger.createRegisteredInstance( MajruszsDifficulty.MOD_ID );

// Configured Feature
public static final RegistryObject< ConfiguredFeature< ?, ? > > ENDERIUM_ORE_SMALL_CONFIGURED = CONFIGURED_FEATURES.register( "enderium_ore_small", ()->WorldGenHelper.getEndConfigured( ENDERIUM_SHARD_ORE, 1, 0.99f ) );
public static final RegistryObject< ConfiguredFeature< ?, ? > > ENDERIUM_ORE_LARGE_CONFIGURED = CONFIGURED_FEATURES.register( "enderium_ore_large", ()->WorldGenHelper.getEndConfigured( ENDERIUM_SHARD_ORE, 2, 0.99f ) );
public static final RegistryObject< ConfiguredFeature< ?, ? > > ENDERIUM_ORE_SMALL_CONFIGURED = CONFIGURED_FEATURES.register( "enderium_ore_small", ()->WorldGenHelper.getEndConfigured( ENDERIUM_SHARD_ORE, 2, 0.99f ) );
public static final RegistryObject< ConfiguredFeature< ?, ? > > ENDERIUM_ORE_LARGE_CONFIGURED = CONFIGURED_FEATURES.register( "enderium_ore_large", ()->WorldGenHelper.getEndConfigured( ENDERIUM_SHARD_ORE, 3, 0.99f ) );
public static final RegistryObject< ConfiguredFeature< ?, ? > > INFESTED_END_STONE_CONFIGURED = CONFIGURED_FEATURES.register( "infested_end_stone", ()->WorldGenHelper.getEndConfigured( INFESTED_END_STONE, 4, 0.0f ) );

// Placed Feature
public static final RegistryObject< PlacedFeature > ENDERIUM_ORE_SMALL_PLACED = PLACED_FEATURES.register( "enderium_ore_small_placed", ()->WorldGenHelper.getEndPlaced( ENDERIUM_ORE_SMALL_CONFIGURED, 16 ) );
public static final RegistryObject< PlacedFeature > ENDERIUM_ORE_LARGE_PLACED = PLACED_FEATURES.register( "enderium_ore_large_placed", ()->WorldGenHelper.getEndPlaced( ENDERIUM_ORE_LARGE_CONFIGURED, 8 ) );
public static final RegistryObject< PlacedFeature > INFESTED_END_STONE_PLACED = PLACED_FEATURES.register( "infested_end_stone_placed", ()->WorldGenHelper.getEndPlaced( INFESTED_END_STONE_CONFIGURED, 128 ) );

// Biome Modifiers
public static final RegistryObject< Codec< OreBiomeModifier > > ORE_MODIFIER = BIOME_MODIFIERS.register( "ores", ()->RecordCodecBuilder.create( builder->builder.group( Biome.LIST_CODEC.fieldOf( "biomes" )
.forGetter( OreBiomeModifier::biomes ), PlacedFeature.CODEC.fieldOf( "feature" ).forGetter( OreBiomeModifier::feature ) )
.apply( builder, OreBiomeModifier::new ) ) );
public static final RegistryObject< Codec< EntityBiomeModifier > > ENTITY_MODIFIER = BIOME_MODIFIERS.register( "entities", ()->RecordCodecBuilder.create( builder->builder.group( Biome.LIST_CODEC.fieldOf( "biomes" )
.forGetter( EntityBiomeModifier::biomes ), MobSpawnSettings.SpawnerData.CODEC.fieldOf( "spawners" ).forGetter( EntityBiomeModifier::spawnerData ) )
.apply( builder, EntityBiomeModifier::new ) ) );

// Sounds
public static final RegistryObject< SoundEvent > UNDEAD_ARMY_APPROACHING;
public static final RegistryObject< SoundEvent > UNDEAD_ARMY_WAVE_STARTED;
Expand Down Expand Up @@ -315,7 +302,6 @@ public static void onLoadingLevel( WorldEvent.Load event ) {
TreasureBagManager.addTreasureBagTo( EntityType.ELDER_GUARDIAN, ELDER_GUARDIAN_TREASURE_BAG.get() );
TreasureBagManager.addTreasureBagTo( EntityType.WITHER, WITHER_TREASURE_BAG.get() );
TreasureBagManager.addTreasureBagTo( EntityType.ENDER_DRAGON, ENDER_DRAGON_TREASURE_BAG.get() );
TreasureBagManager.addTreasureBagTo( EntityType.WARDEN, WARDEN_TREASURE_BAG.get() );
}

public static void onSavingLevel( WorldEvent.Save event ) {
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/majruszsdifficulty/blocks/EndShardOre.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.enchantment.EnchantmentHelper;
import net.minecraft.world.item.enchantment.Enchantments;
import net.minecraft.world.level.LevelReader;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.SoundType;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.Material;
import net.minecraft.world.level.material.MaterialColor;
import net.minecraftforge.fml.common.Mod;
Expand All @@ -25,10 +27,8 @@ public EndShardOre() {
}

@Override
protected void tryDropExperience( ServerLevel level, BlockPos position, ItemStack itemStack, IntProvider intProvider ) {
if( EnchantmentHelper.getItemEnchantmentLevel( Enchantments.SILK_TOUCH, itemStack ) == 0 ) {
this.popExperience( level, position, Random.nextInt( 6, 11 ) );
}
public int getExpDrop( BlockState state, LevelReader world, BlockPos position, int fortuneLevel, int silkTouchLevel ) {
return silkTouchLevel == 0 ? Random.nextInt( 6, 11 ) : 0;
}

public static class EndShardOreItem extends BlockItem {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ public InfestedEndStone() {
}

@Override
public void spawnAfterBreak( BlockState state, ServerLevel worldIn, BlockPos pos, ItemStack stack, boolean p_221364_ ) {
super.spawnAfterBreak( state, worldIn, pos, stack, p_221364_ );
public void spawnAfterBreak( BlockState state, ServerLevel worldIn, BlockPos pos, ItemStack stack ) {
super.spawnAfterBreak( state, worldIn, pos, stack );

GameRules gameRules = worldIn.getGameRules();
if( gameRules.getBoolean( GameRules.RULE_DOBLOCKDROPS ) && EnchantmentHelper.getItemEnchantmentLevel( Enchantments.SILK_TOUCH, stack ) == 0 )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import com.mlib.commands.IRegistrableCommand;
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.network.chat.TextComponent;
import net.minecraft.network.chat.TranslatableComponent;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.MutableComponent;
import net.minecraft.world.phys.Vec3;
Expand Down Expand Up @@ -32,15 +34,15 @@ public class CommandsHelper {
}

public static MutableComponent createGameStageMessage( GameStage.Stage stage, String translationID ) {
return Component.translatable( "commands.gamestage." + translationID, GameStage.getGameStageText( stage ) );
return new TranslatableComponent( "commands.gamestage." + translationID, GameStage.getGameStageText( stage ) );
}

public static MutableComponent createBaseMessageWithPosition( String translationKey, Vec3 position, Object... objects ) {
Object[] copy = new Object[ objects.length + 1 ];
copy[ objects.length ] = getPositionFormatted( position );
System.arraycopy( objects, 0, copy, 0, objects.length );

return Component.translatable( translationKey, copy );
return new TranslatableComponent( translationKey, copy );
}

public static String getPositionFormatted( Vec3 position ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import com.mojang.brigadier.context.CommandContext;
import net.minecraft.ChatFormatting;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.network.chat.TextComponent;
import net.minecraft.network.chat.TranslatableComponent;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.MutableComponent;
import net.minecraft.world.level.Level;
Expand Down Expand Up @@ -36,20 +38,20 @@ public MutableComponent getMessage( Level level, Vec3 position ) {
String clampedRegionalDifficulty = String.format( "%.3f", LevelHelper.getClampedRegionalDifficulty( level, position ) );
String stateModifier = String.format( "%.2f", GameStage.getStageModifier() );
String finalDifficulty = String.format( "%.3f", GameStage.getRegionalDifficulty( level, position ) );
MutableComponent formula = Component.translatable( "commands.clampedregionaldifficulty.formula", stateModifier, finalDifficulty );
MutableComponent formula = new TranslatableComponent( "commands.clampedregionaldifficulty.formula", stateModifier, finalDifficulty );
String positionFormatted = CommandsHelper.getPositionFormatted( position );

switch( GameStage.getCurrentStage() ) {
case MASTER:
formula.withStyle( GameStage.MASTER_MODE_COLOR, ChatFormatting.BOLD );

return Component.translatable( "commands.clampedregionaldifficulty", clampedRegionalDifficulty, formula, positionFormatted );
return new TranslatableComponent( "commands.clampedregionaldifficulty", clampedRegionalDifficulty, formula, positionFormatted );
case EXPERT:
formula.withStyle( GameStage.EXPERT_MODE_COLOR, ChatFormatting.BOLD );

return Component.translatable( "commands.clampedregionaldifficulty", clampedRegionalDifficulty, formula, positionFormatted );
return new TranslatableComponent( "commands.clampedregionaldifficulty", clampedRegionalDifficulty, formula, positionFormatted );
default:
return Component.translatable( "commands.clampedregionaldifficulty", clampedRegionalDifficulty, "", positionFormatted );
return new TranslatableComponent( "commands.clampedregionaldifficulty", clampedRegionalDifficulty, "", positionFormatted );
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import com.mojang.brigadier.CommandDispatcher;
import com.mojang.brigadier.context.CommandContext;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.network.chat.TextComponent;
import net.minecraft.network.chat.TranslatableComponent;
import net.minecraft.network.chat.Component;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.player.Player;
Expand All @@ -18,7 +20,7 @@ protected int handleCommand( CommandContext< CommandSourceStack > context, Comma
Player player = Utility.castIfPossible( Player.class, entity );
if( player != null ) {
LootProgressManager.cleanProgress( player );
source.sendSuccess( Component.translatable( "commands.treasurebag.reset", entity.getName() ), true );
source.sendSuccess( new TranslatableComponent( "commands.treasurebag.reset", entity.getName() ), true );
return 0;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import com.mojang.brigadier.CommandDispatcher;
import com.mojang.brigadier.context.CommandContext;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.network.chat.TextComponent;
import net.minecraft.network.chat.TranslatableComponent;
import net.minecraft.network.chat.Component;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.LivingEntity;
Expand All @@ -23,7 +25,7 @@ protected int handleCommand( CommandContext< CommandSourceStack > context, Comma
int undeadKilled = undeadKilledData.get();
int undeadKilledMax = UndeadArmyConfig.getRequiredKills();

source.sendSuccess( Component.translatable( "commands.undeadarmy.progress", entity.getName(), undeadKilled, undeadKilledMax ), true );
source.sendSuccess( new TranslatableComponent( "commands.undeadarmy.progress", entity.getName(), undeadKilled, undeadKilledMax ), true );
return 0;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import net.minecraft.world.entity.ai.goal.target.NearestAttackableTargetGoal;
import net.minecraft.world.entity.animal.IronGolem;
import net.minecraft.world.entity.monster.Monster;
import net.minecraft.world.entity.monster.warden.Warden;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.state.BlockState;
Expand Down Expand Up @@ -76,11 +75,10 @@ protected void registerGoals() {
this.targetSelector.addGoal( 1, new HurtByTargetGoal( this ) );
this.targetSelector.addGoal( 2, new NearestAttackableTargetGoal<>( this, Player.class, true ) );
this.targetSelector.addGoal( 3, new NearestAttackableTargetGoal<>( this, IronGolem.class, true ) );
this.targetSelector.addGoal( 3, new NearestAttackableTargetGoal<>( this, Warden.class, true ) );
}

@Override
public int getExperienceReward() {
public int getExperienceReward( Player player ) {
return Random.nextInt( 17 );
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
import com.mlib.gamemodifiers.data.OnDeathData;
import com.mlib.gamemodifiers.data.OnDimensionChangedData;
import net.minecraft.ChatFormatting;
import net.minecraft.network.chat.TextComponent;
import net.minecraft.network.chat.TranslatableComponent;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.MutableComponent;
import net.minecraft.server.MinecraftServer;
Expand Down Expand Up @@ -87,7 +89,7 @@ private void startMasterMode( @Nullable MinecraftServer minecraftServer ) {

private static void sendMessageToAllPlayers( PlayerList playerList, String translationKey, ChatFormatting textColor ) {
for( Player player : playerList.getPlayers() ) {
MutableComponent message = Component.translatable( translationKey );
MutableComponent message = new TranslatableComponent( translationKey );
message.withStyle( textColor, ChatFormatting.BOLD );

player.displayClientMessage( message, false );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import com.mlib.levels.LevelHelper;
import net.minecraft.core.Registry;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.tags.StructureTags;
import net.minecraft.tags.ConfiguredStructureTags;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.monster.Illusioner;
import net.minecraft.world.level.Level;
Expand Down Expand Up @@ -42,6 +42,6 @@ private static boolean isVillageNearby( Entity entity ) {
if( !( entity.level instanceof ServerLevel level ) || !LevelHelper.isEntityIn( entity, Level.OVERWORLD ) )
return false;

return level.findNearestMapStructure( StructureTags.VILLAGE, entity.blockPosition(), 10000, false ) != null;
return level.findNearestMapFeature( ConfiguredStructureTags.VILLAGE, entity.blockPosition(), 10000, false ) != null;
}
}
Loading

0 comments on commit 7effff7

Please sign in to comment.