1.2.3
SorceryCraft/pipeline/head This commit looks good Details

Tweak Cooling Spell
Tweak Versioning
This commit is contained in:
TheBrokenRail 2020-03-22 15:25:34 -04:00
parent df3c1dcffd
commit 76f316f7bd
6 changed files with 20 additions and 5 deletions

3
API.md
View File

@ -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```

View File

@ -1,5 +1,9 @@
# Changelog
**1.2.3**
* Tweak Cooling Spell
* Tweak Versioning
**1.2.2**
* Allow ```/spell``` command to work with multiple players

View File

@ -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) {

View File

@ -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

View File

@ -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);
}

View File

@ -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)) {