generated from MrSphay/codex-agent-repository-kit
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
*/
|
||||
package com.vinlanx.explosionoverhaul;
|
||||
|
||||
import net.minecraft.core.registries.BuiltInRegistries;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
@@ -85,11 +86,11 @@ import net.neoforged.neoforge.event.server.ServerStartedEvent;
|
||||
import net.neoforged.neoforge.event.server.ServerStoppedEvent;
|
||||
import net.neoforged.bus.api.SubscribeEvent;
|
||||
import net.neoforged.fml.common.Mod;
|
||||
import net.neoforged.fml.common.EventBusSubscriber;
|
||||
import net.neoforged.neoforge.network.PacketDistributor;
|
||||
import net.neoforged.neoforge.registries.ForgeRegistries;
|
||||
import net.neoforged.neoforge.server.ServerLifecycleHooks;
|
||||
|
||||
@Mod.EventBusSubscriber
|
||||
@EventBusSubscriber
|
||||
public class BlockIndexManager {
|
||||
private static volatile MinecraftServer currentServer;
|
||||
private static final Map<ResourceKey<Level>, ConcurrentHashMap<Long, Set<Long>>> indexByDimension;
|
||||
@@ -633,7 +634,7 @@ public class BlockIndexManager {
|
||||
|
||||
private static boolean isGlassBlock(BlockState state) {
|
||||
try {
|
||||
String blockName = ForgeRegistries.BLOCKS.getKey((Object)state.m_60734_()).toString().toLowerCase(Locale.ROOT);
|
||||
String blockName = BuiltInRegistries.BLOCK.getKey(state.m_60734_()).toString().toLowerCase(Locale.ROOT);
|
||||
if (BlockIndexManager.isGlassProtected(blockName)) {
|
||||
return false;
|
||||
}
|
||||
@@ -662,7 +663,7 @@ public class BlockIndexManager {
|
||||
|
||||
public static boolean isReinforcedGlass(BlockState state) {
|
||||
try {
|
||||
String blockName = ForgeRegistries.BLOCKS.getKey((Object)state.m_60734_()).toString().toLowerCase(Locale.ROOT);
|
||||
String blockName = BuiltInRegistries.BLOCK.getKey(state.m_60734_()).toString().toLowerCase(Locale.ROOT);
|
||||
return BlockIndexManager.isGlassProtected(blockName);
|
||||
}
|
||||
catch (Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user