mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-22 13:19:52 +00:00
Merge pull request #26 from Zereff06/disableMobSpawn
Disable mob spawn on the chisel blocks
This commit is contained in:
5 files changed
+25
No files matched your search
@@ -6,11 +6,13 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EnumCreatureType;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import team.chisel.Chisel;
|
||||
import team.chisel.config.Configurations;
|
||||
|
||||
import com.cricketcraft.chisel.api.ChiselTabs;
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
@@ -168,4 +170,9 @@ public class BlockCarvable extends Block implements ICarvable {
|
||||
else return this.soundNamePlace;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canCreatureSpawn(EnumCreatureType type, IBlockAccess world, int x, int y, int z) {
|
||||
return Configurations.canMobsSpawnOnTheChiselBlocks;
|
||||
}
|
||||
}
|
||||
@@ -28,6 +28,7 @@ public class Configurations {
|
||||
public static boolean enableFMP;
|
||||
public static boolean chiselStoneToCobbleBricks;
|
||||
public static boolean chiselBackToVanillaLeaves;
|
||||
public static boolean canMobsSpawnOnTheChiselBlocks;
|
||||
|
||||
public static int marbleAmount;
|
||||
public static int limestoneAmount;
|
||||
@@ -107,6 +108,9 @@ public class Configurations {
|
||||
false,
|
||||
"If this is true, you can chisel from the chisel leaves back to vanilla ones. If it is false, you cannot.")
|
||||
.getBoolean(false);
|
||||
canMobsSpawnOnTheChiselBlocks = config
|
||||
.get(category, "canMobsSpawnOnTheChiselBlocks", false, "Can mobs Spawn on the Chisel Blocks")
|
||||
.getBoolean();
|
||||
|
||||
/* worldgen */
|
||||
category = "worldgen";
|
||||
|
||||
@@ -8,6 +8,13 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import team.chisel.config.Configurations;
|
||||
import team.chisel.utils.General;
|
||||
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
import com.cricketcraft.chisel.api.carving.IVariationInfo;
|
||||
|
||||
import team.chisel.config.Configurations;
|
||||
import team.chisel.utils.General;
|
||||
@@ -49,5 +56,8 @@ public class ItemCarvable extends ItemBlock {
|
||||
if (var == null) return;
|
||||
|
||||
lines.add(var.getDescription());
|
||||
|
||||
if (!Configurations.canMobsSpawnOnTheChiselBlocks)
|
||||
lines.add(StatCollector.translateToLocal("item.chisel.nomobspawnsonthisblock.desc"));
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,8 @@ stat.blockChiseled=Blocks Chiseled
|
||||
#Entity localizations
|
||||
entity.chisel.snowman.name=Snow Golem
|
||||
|
||||
item.chisel.nomobspawnsonthisblock.desc=Mobs cannot Spawn on this Block
|
||||
|
||||
#Item localizations
|
||||
item.chisel.chisel_iron.name=Chisel
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@ stat.blockChiseled=Блоков обработано
|
||||
#Entity localizations
|
||||
entity.chisel.snowman.name=Снеговик
|
||||
|
||||
item.chisel.nomobspawnsonthisblock.desc=Монстры не могут появляться на этом блоке
|
||||
|
||||
#Item localizations
|
||||
item.chisel.chisel_iron.name=Стамеска
|
||||
|
||||
|
||||
Reference in new issue
Block a user