Tweak Cooling Spell Tweak Versioning
This commit is contained in:
parent
df3c1dcffd
commit
76f316f7bd
3
API.md
3
API.md
@ -7,7 +7,8 @@
|
||||
maven { url 'https://jitpack.io' }
|
||||
}
|
||||
dependencies {
|
||||
modImplementation 'com.thebrokenrail:sorcerycraft:1.2.+'
|
||||
modImplementation 'com.thebrokenrail:sorcerycraft:VERSION'
|
||||
// VERSION = "<Mod Version>+<MC Version>", for example "1.2.3+20w12a"
|
||||
}
|
||||
```
|
||||
2. Add Dependency to ```fabric.mod.json```
|
||||
|
@ -1,5 +1,9 @@
|
||||
# Changelog
|
||||
|
||||
**1.2.3**
|
||||
* Tweak Cooling Spell
|
||||
* Tweak Versioning
|
||||
|
||||
**1.2.2**
|
||||
* Allow ```/spell``` command to work with multiple players
|
||||
|
||||
|
@ -9,7 +9,8 @@ compileJava {
|
||||
}
|
||||
|
||||
archivesBaseName = project.archives_base_name
|
||||
version = project.mod_version as Object
|
||||
def mod_version = project.mod_version as Object
|
||||
version = "${mod_version}+${project.minecraft_version}"
|
||||
group = project.maven_group as Object
|
||||
|
||||
minecraft {
|
||||
@ -36,12 +37,12 @@ dependencies {
|
||||
}
|
||||
|
||||
processResources {
|
||||
inputs.property 'version', version
|
||||
inputs.property 'version', mod_version
|
||||
inputs.property 'name', rootProject.name
|
||||
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
include 'fabric.mod.json'
|
||||
expand 'version': version, 'name': rootProject.name
|
||||
expand 'version': mod_version, 'name': rootProject.name
|
||||
}
|
||||
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
|
@ -10,7 +10,7 @@ org.gradle.jvmargs = -Xmx1G
|
||||
fabric_loader_version = 0.7.8+build.189
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 1.2.2
|
||||
mod_version = 1.2.3
|
||||
maven_group = com.thebrokenrail
|
||||
archives_base_name = sorcerycraft
|
||||
|
||||
|
@ -28,6 +28,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class SpellEntity extends ThrownItemEntity {
|
||||
public SpellEntity(EntityType<SpellEntity> entityType, World world) {
|
||||
super(entityType, world);
|
||||
@ -41,6 +42,10 @@ public class SpellEntity extends ThrownItemEntity {
|
||||
super(SorceryCraft.SPELL_ENTITY, x, y, z, world);
|
||||
}
|
||||
|
||||
public SpellEntity(World world) {
|
||||
super(SorceryCraft.SPELL_ENTITY, world);
|
||||
}
|
||||
|
||||
private boolean didSpellSucceed(Map<Identifier, Integer> spells) {
|
||||
return Math.random() > SorceryCraft.getConfig().failureChance || spells.containsKey(Spells.STEADFAST_SPELL);
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import com.thebrokenrail.sorcerycraft.spell.api.Spell;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.state.property.Properties;
|
||||
import net.minecraft.tag.BlockTags;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.hit.BlockHitResult;
|
||||
@ -26,6 +27,9 @@ public class CoolingSpell extends Spell {
|
||||
if (world.getBlockState(blockPos).isIn(BlockTags.FIRE)) {
|
||||
world.removeBlock(blockPos, false);
|
||||
}
|
||||
if (world.getBlockState(blockPos).get(Properties.LIT)) {
|
||||
world.setBlockState(blockPos, world.getBlockState(blockPos).with(Properties.LIT, false));
|
||||
}
|
||||
|
||||
BlockPos sideBlockPos = blockPos.offset(hitResult.getSide());
|
||||
if (world.getBlockState(sideBlockPos).isIn(BlockTags.FIRE)) {
|
||||
|
Reference in New Issue
Block a user