Skip to content

Commit

Permalink
Polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
vlad2305m committed Dec 9, 2021
1 parent 8058e8f commit ec32136
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/main/java/com/sonicether/soundphysics/SoundPhysics.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import com.sonicether.soundphysics.config.MaterialData;
import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;//rm
//import net.minecraft.block.Blocks;//rm
import net.minecraft.client.MinecraftClient;
// import net.minecraft.particle.ParticleTypes;
import net.minecraft.sound.BlockSoundGroup;
Expand Down Expand Up @@ -34,8 +34,8 @@ public class SoundPhysics
public static final Pattern stepPattern = Pattern.compile(".*step.*");
private static final Pattern blockPattern = Pattern.compile(".*block..*");
private static final Pattern uiPattern = Pattern.compile("ui..*");
public static final Map<BlockSoundGroup, BlockSoundGroup> redirectMap = Map.ofEntries( // !!!1 becomes 2!!! //rm
entry(BlockSoundGroup.MOSS_CARPET, BlockSoundGroup.MOSS_BLOCK),
public static final Map<BlockSoundGroup, BlockSoundGroup> redirectMap = /*<editor-fold desc="Map.ofEntries()">*/Map.ofEntries(
entry(BlockSoundGroup.MOSS_CARPET, BlockSoundGroup.MOSS_BLOCK), // first becomes second
entry(BlockSoundGroup.AMETHYST_CLUSTER, BlockSoundGroup.AMETHYST_BLOCK),
entry(BlockSoundGroup.SMALL_AMETHYST_BUD, BlockSoundGroup.AMETHYST_BLOCK),
entry(BlockSoundGroup.MEDIUM_AMETHYST_BUD, BlockSoundGroup.AMETHYST_BLOCK),
Expand Down Expand Up @@ -65,7 +65,7 @@ public class SoundPhysics
entry(BlockSoundGroup.SCAFFOLDING, BlockSoundGroup.BAMBOO),
entry(BlockSoundGroup.LODESTONE, BlockSoundGroup.NETHERITE),
entry(BlockSoundGroup.LADDER, BlockSoundGroup.WOOD)
);
)/*</editor-fold>*/;
//Private fields
// ψ time ψ
//public static double tt = 0;
Expand Down Expand Up @@ -132,7 +132,7 @@ private static MaterialData getBlockMaterialData(final BlockPos blockPos)
String key;

// !!! Middle(wheel)-click "BlockSoundGroup" to see all groups !!! //rm
Blocks b;//rm
//Blocks b;//rm
BlockSoundGroup soundType = blockState.getSoundGroup();
soundType = redirectMap.getOrDefault(soundType, soundType);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public static class Material_Properties {
@ConfigEntry.Gui.CollapsibleObject
public Map<String, MaterialData> reflectivityMap = null;

@Comment("Like block.minecraft.stone")
@Comment("Makes blocks use name (like block.minecraft.stone) instead of sound group to determine material")
@ConfigEntry.Gui.CollapsibleObject
public List<String> blockWhiteList = new ArrayList<>();
}
Expand Down

0 comments on commit ec32136

Please sign in to comment.