From 9b92e3aee982cdf5c7944a6e4e98f8ff5dba8a0e Mon Sep 17 00:00:00 2001 From: Zereff06 Date: Sat, 28 Jan 2023 23:08:44 +0200 Subject: [PATCH] Disable mob spawn on the chisel blocks --- build.gradle | 2 +- src/main/java/team/chisel/block/BlockCarvable.java | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index c09bee22..19d365b7 100644 --- a/build.gradle +++ b/build.gradle @@ -34,7 +34,7 @@ buildscript { } } dependencies { - classpath 'com.github.GTNewHorizons:ForgeGradle:1.2.7' + classpath 'com.github.GTNewHorizons:ForgeGradle:1.2.13' } } diff --git a/src/main/java/team/chisel/block/BlockCarvable.java b/src/main/java/team/chisel/block/BlockCarvable.java index 573248cd..89f90763 100644 --- a/src/main/java/team/chisel/block/BlockCarvable.java +++ b/src/main/java/team/chisel/block/BlockCarvable.java @@ -7,6 +7,7 @@ import com.cricketcraft.chisel.api.carving.CarvableHelper; import com.cricketcraft.chisel.api.carving.IVariationInfo; import com.cricketcraft.chisel.api.rendering.ClientUtils; +import net.minecraft.entity.EnumCreatureType; import team.chisel.Chisel; import com.cricketcraft.chisel.api.ChiselTabs; import net.minecraft.block.Block; @@ -100,7 +101,7 @@ public class BlockCarvable extends Block implements ICarvable { /** * Creates a SoundType with automatic names for step and break sounds. Sound names dig.soundName and step.soundName must be specified in the sounds.json - * + * * @param soundName * block of the sound. Will automatically be expanded to "mod:dig.soundName" and "mod:step.soundName" respectively) * @param volume @@ -117,7 +118,7 @@ public class BlockCarvable extends Block implements ICarvable { /** * Creates a SoundType with manual names for step and break sounds. Sound names must be specified in the sounds.json - * + * * @param soundNameBreak * block break sound * @param soundNameStep @@ -136,7 +137,7 @@ public class BlockCarvable extends Block implements ICarvable { /** * Creates a SoundType with manual names for step, break and place sounds. Sound names must be specified in the sounds.json - * + * * @param soundNameBreak * block break sound * @param soundNameStep @@ -179,4 +180,8 @@ public class BlockCarvable extends Block implements ICarvable { return this.soundNamePlace; } } + @Override + public boolean canCreatureSpawn(EnumCreatureType type, IBlockAccess world, int x, int y, int z) { + return false; + } }