Update Particles
This commit is contained in:
parent
abc16c2bbb
commit
bbfad9303a
@ -1,5 +1,8 @@
|
|||||||
### Changelog
|
### Changelog
|
||||||
|
|
||||||
|
**1.0.9**
|
||||||
|
* Update Particles
|
||||||
|
|
||||||
**1.0.8**
|
**1.0.8**
|
||||||
* Update to 20w10a
|
* Update to 20w10a
|
||||||
* Add the ```/spell learn```, ```/spell add```, and ```/spell remove``` commands
|
* Add the ```/spell learn```, ```/spell add```, and ```/spell remove``` commands
|
||||||
|
19
build.gradle
19
build.gradle
@ -19,20 +19,19 @@ dependencies {
|
|||||||
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
||||||
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
|
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
|
||||||
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
||||||
|
|
||||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
||||||
}
|
}
|
||||||
|
|
||||||
processResources {
|
processResources {
|
||||||
inputs.property "version", version
|
inputs.property 'version', version
|
||||||
|
|
||||||
from(sourceSets.main.resources.srcDirs) {
|
from(sourceSets.main.resources.srcDirs) {
|
||||||
include "fabric.mod.json"
|
include 'fabric.mod.json'
|
||||||
expand "version": version
|
expand 'version': version
|
||||||
}
|
}
|
||||||
|
|
||||||
from(sourceSets.main.resources.srcDirs) {
|
from(sourceSets.main.resources.srcDirs) {
|
||||||
exclude "fabric.mod.json"
|
exclude 'fabric.mod.json'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,14 +39,14 @@ processResources {
|
|||||||
// this fixes some edge cases with special characters not displaying correctly
|
// this fixes some edge cases with special characters not displaying correctly
|
||||||
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
|
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
|
||||||
tasks.withType(JavaCompile) {
|
tasks.withType(JavaCompile) {
|
||||||
options.encoding = "UTF-8"
|
options.encoding = 'UTF-8'
|
||||||
}
|
}
|
||||||
|
|
||||||
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
|
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
|
||||||
// if it is present.
|
// if it is present.
|
||||||
// If you remove this task, sources will not be generated.
|
// If you remove this task, sources will not be generated.
|
||||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||||
classifier "sources"
|
classifier 'sources'
|
||||||
from sourceSets.main.allSource
|
from sourceSets.main.allSource
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -55,10 +54,9 @@ jar {
|
|||||||
from "LICENSE"
|
from "LICENSE"
|
||||||
}
|
}
|
||||||
|
|
||||||
curseforge {
|
if (project.hasProperty('curseforge.api_key')) {
|
||||||
if (project.hasProperty('curseforge.api_key')) {
|
curseforge {
|
||||||
apiKey = project.getProperty('curseforge.api_key')
|
apiKey = project.getProperty('curseforge.api_key')
|
||||||
}
|
|
||||||
project {
|
project {
|
||||||
id = project.curseforge_id
|
id = project.curseforge_id
|
||||||
changelog = 'A changelog can be found at https://gitea.thebrokenrail.com/TheBrokenRail/SorceryCraft/src/branch/master/CHANGELOG.md'
|
changelog = 'A changelog can be found at https://gitea.thebrokenrail.com/TheBrokenRail/SorceryCraft/src/branch/master/CHANGELOG.md'
|
||||||
@ -78,4 +76,5 @@ curseforge {
|
|||||||
options {
|
options {
|
||||||
forgeGradleIntegration = false
|
forgeGradleIntegration = false
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
@ -10,7 +10,7 @@ org.gradle.jvmargs = -Xmx1G
|
|||||||
loader_version = 0.7.8+build.186
|
loader_version = 0.7.8+build.186
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 1.0.8
|
mod_version = 1.0.9
|
||||||
maven_group = com.thebrokenrail
|
maven_group = com.thebrokenrail
|
||||||
archives_base_name = sorcerycraft
|
archives_base_name = sorcerycraft
|
||||||
|
|
||||||
|
@ -16,6 +16,9 @@ import net.minecraft.item.Item;
|
|||||||
import net.minecraft.network.Packet;
|
import net.minecraft.network.Packet;
|
||||||
import net.minecraft.network.packet.s2c.play.EntitySpawnS2CPacket;
|
import net.minecraft.network.packet.s2c.play.EntitySpawnS2CPacket;
|
||||||
import net.minecraft.particle.ParticleTypes;
|
import net.minecraft.particle.ParticleTypes;
|
||||||
|
import net.minecraft.server.command.ParticleCommand;
|
||||||
|
import net.minecraft.server.network.ServerPlayerEntity;
|
||||||
|
import net.minecraft.server.world.ServerWorld;
|
||||||
import net.minecraft.sound.SoundCategory;
|
import net.minecraft.sound.SoundCategory;
|
||||||
import net.minecraft.sound.SoundEvents;
|
import net.minecraft.sound.SoundEvents;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
@ -23,7 +26,9 @@ import net.minecraft.util.hit.EntityHitResult;
|
|||||||
import net.minecraft.util.hit.HitResult;
|
import net.minecraft.util.hit.HitResult;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
public class SpellEntity extends ThrownItemEntity {
|
public class SpellEntity extends ThrownItemEntity {
|
||||||
public SpellEntity(EntityType<SpellEntity> entityType, World world) {
|
public SpellEntity(EntityType<SpellEntity> entityType, World world) {
|
||||||
@ -74,16 +79,6 @@ public class SpellEntity extends ThrownItemEntity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
@Environment(EnvType.CLIENT)
|
|
||||||
public void handleStatus(byte status) {
|
|
||||||
if (status == 0) {
|
|
||||||
for (int i = 0; i < 12; i++) {
|
|
||||||
getEntityWorld().addParticle(ParticleTypes.WITCH, getX(), getY(), getZ(), 0.0d, 0.0d, 0.0d);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void tick() {
|
public void tick() {
|
||||||
super.tick();
|
super.tick();
|
||||||
@ -110,7 +105,10 @@ public class SpellEntity extends ThrownItemEntity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!getEntityWorld().isClient()) {
|
if (!getEntityWorld().isClient()) {
|
||||||
getEntityWorld().sendEntityStatus(this, (byte) 0);
|
List<ServerPlayerEntity> viewers = Objects.requireNonNull(getServer()).getPlayerManager().getPlayerList();
|
||||||
|
for (ServerPlayerEntity viewer : viewers) {
|
||||||
|
((ServerWorld) getEntityWorld()).spawnParticles(viewer, ParticleTypes.WITCH, true, getX(), getY(), getZ(), 8, 0.01d, 0.01d, 0.01d, 0.5d);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user