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