Skip to content
This repository has been archived by the owner on Aug 25, 2024. It is now read-only.

Commit

Permalink
Update to 1.16.1
Browse files Browse the repository at this point in the history
  • Loading branch information
doctor4t committed Jul 14, 2020
1 parent 677530a commit 1ffc8f5
Show file tree
Hide file tree
Showing 6 changed files with 166 additions and 51 deletions.
23 changes: 7 additions & 16 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Illuminations - Changelog

### Illuminations 0.5 - 20w06a
### Illuminations 0.5.1 - 20w06a
- Updated to Minecraft 1.16.1 (thanks to Bulldog83 for the contribution!)

### Illuminations 0.5 - 20w06a
- Updated to Minecraft snapshot 20w06a

### Illuminations 0.4.0 - 1.15.1

### Illuminations 0.4 - 1.15.1
- Reduced firefly AI tasks (light checking, despawn checking)
- Removed firefly render distance limit
- Removed the bug net
Expand All @@ -16,15 +17,13 @@
- Recipe for glow meal now unlocks upon getting lime dye, glowstone dust or bone meal
- Updated to Minecraft 1.15.1

### Illuminations 0.3.0 - 1.14.3

### Illuminations 0.3 - 1.14.3
+ Added glow meal
+ Crafted from a lime dye, bone meal and glowstone dust
+ When used on grass, grows firefly grass
+ Updated to Minecraft 1.14.3

### Illuminations 0.2.0 - 1.14.2

### Illuminations 0.2 - 1.14.2
+ Added Firefly grass (and Firefly tall grass)
+ Generates in the world in plain, swamp, forest, jungle, savanna and river biomes
+ Acts exactly like normal grass and tall grass
Expand All @@ -41,44 +40,36 @@
+ Updated to Minecraft 1.14.2

### Illuminations 0.1.7 - 1.14.1

+ Fixed the bug where mip map levels wouldn't work
+ Completely removeed the experimental items

### Illuminations 0.1.6 - 1.14.1

+ Added Firefly in a bottle
+ Added Bug Net (can be used to capture Fireflies by attacking them)
+ Added Firefly item
+ Removed experimental items (nests, throwable Will o' Wisp...) from the creative inventory
+ Updated to Minecraft 1.14.1

### Illuminations 0.1.5 - 1.14

+ Updated to Minecraft 1.14

### Illuminations 0.1.4 - 19w14b

+ Updated to Minecraft snapshot 19w14b

### Illuminations 0.1.3 - 19w11b

+ Added firefly and lightning bug nests: acts as a spawner for fireflies and lightning bugs during night
+ Updated to Minecraft snapshot 19w11b (thanks Fab!)

### Illuminations 0.1.2 - 19w02a

+ Implemented Will o' Wisps, flaming spirits spawning in swamps at night (experimental)
+ Will o' Wisps are catchable
+ Will o' Wisps (in a player's hand) can be thrown
+ Updated to Minecraft snapshot 19w02a

### Illuminations 0.1.1 - 18w50a

+ Fixed server side crashing on startup

### Illuminations 0.1.0 - 18w50a

### Illuminations 0.1 - 18w50a
+ Ported to Fabric mod loader (only fireflies and lightning bugs)
+ Corrected firefly spawn rates
+ Fireflies now flicker
Expand Down
144 changes: 133 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
plugins {
id 'fabric-loom' version '0.4-SNAPSHOT'
id 'maven-publish'
id 'com.matthewprenger.cursegradle' version '1.4.0'
id 'org.ajoberstar.grgit' version '3.1.1'
id 'com.github.breadmoirai.github-release' version '2.2.9'
id 'com.wynprice.cursemaven' version '1.2.3'
}

sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
// Adds a few utility methods like getProjectProperty
apply from: 'https://raw.githubusercontent.com/NerdHubMC/Gradle-Scripts/master/scripts/utilities.gradle'
apply from: 'https://raw.githubusercontent.com/NerdHubMC/Gradle-Scripts/master/scripts/fabric/publish/changelog.gradle'

archivesBaseName = project.archives_base_name
version = project.mod_version
Expand All @@ -14,16 +21,16 @@ minecraft {
}

dependencies {
minecraft "com.mojang:minecraft:${minecraft_version}"
mappings "net.fabricmc:yarn:${yarn_mappings}:v2"
modCompile "net.fabricmc:fabric-loader:${loader_version}"
//to change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modCompile "net.fabricmc:fabric-loader:${project.loader_version}"

//Fabric api
modCompile "net.fabricmc.fabric-api:fabric-api:${fabric_version}"
// Fabric API. This is technically optional, but you probably want it anyway.
modCompile "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"

compileOnly "org.jetbrains:annotations:${jb_annotations_version}"
compileOnly "com.google.code.findbugs:jsr305:${findbugs_version}"
compileOnly "org.apiguardian:apiguardian-api:${apiguardian_version}"
// PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
// You may need to force-disable transitiveness on them.
}

processResources {
Expand Down Expand Up @@ -59,22 +66,137 @@ jar {
}

// configure the maven publication
publishing {/*
publishing {
publications {
mavenJava(MavenPublication) {
// add all the jars that should be included when publishing to maven
artifact(jar) {
artifact(remapJar) {
builtBy remapJar
}
artifact(sourcesJar) {
builtBy remapSourcesJar
}
}
}*/
}

// select the repositories you want to publish to
repositories {
// uncomment to publish to the local maven
// mavenLocal()
}
}


task checkGitStatus() {
group = 'publishing'
description = 'Checks that the git repository is in a state suitable for release'
doLast {
if (grgit == null) throw new RuntimeException('No git repository')
if (!grgit.status().isClean()) {
throw new RuntimeException("Git repository not ready for release (${grgit.status()})")
}
def currentBranch = grgit.branch.current().getName()
grgit.fetch()
if (grgit.tag.list().any { it.name == project.version }) {
throw new RuntimeException("A tag already exists for ${project.version}")
}
def status = grgit.branch.status(name: currentBranch)
if (status.aheadCount != 0) {
throw new RuntimeException('Some commits have not been pushed')
}
if (status.behindCount != 0) {
throw new RuntimeException('Some commits have not been pulled')
}
}
}

githubRelease {
repo "Illuminations"
token "${getProjectProperty('github_releases_token')}"
// default owner: last component of maven group
// default repo: name of the project
tagName = project.version
targetCommitish = { grgit.branch.current().name }
body = { project.getChangelogText() }

FilenameFilter filter = { dir, filename -> filename.contains(project.version) && !filename.contains('-dev.jar') }
releaseAssets = { jar.destinationDirectory.asFile.get().listFiles filter }
}
tasks.githubRelease.dependsOn(checkGitStatus)

curseforge {

if (project.getProjectProperty('curse_key') != null) {
apiKey = project.getProjectProperty('curse_key')
}

if (project.hasProperty('curseforge_id')) {
project {
id = findProperty('curseforge_id')

releaseType = project.release_type

//usually automatically determined by the CurseGradle plugin, but won't work with fabric
"${project.curseforge_versions}".split('; ').each {
addGameVersion it
}
addGameVersion 'Fabric'

mainArtifact(remapJar) {
displayName = "${project.name}-${project.version}.jar"

if (project.hasProperty('cf_requirements') || project.hasProperty('cf_optionals') || project.hasProperty('cf_embeddeds') || project.hasProperty('cf_tools') || project.hasProperty('cf_incompatibles') || project.hasProperty('cf_includes')) {
relations {
if (project.hasProperty('cf_requirements')) {
"${project.cf_requirements}".split('; ').each {
requiredDependency "${it}"
}
}
if (project.hasProperty('cf_optionals')) {
"${project.cf_optionals}".split('; ').each {
optionalDependency "${it}"
}
}
if (project.hasProperty('cf_embeddeds')) {
"${project.cf_embeddeds}".split('; ').each {
embeddedLibrary "${it}"
}
}
if (project.hasProperty('cf_tools')) {
"${project.cf_tools}".split('; ').each {
tool "${it}"
}
}
if (project.hasProperty('cf_incompatibles')) {
"${project.cf_incompatibles}".split('; ').each {
incompatible "${it}"
}
}
if (project.hasProperty('cf_includes')) {
"${project.cf_includes}".split('; ').each {
include "${it}"
}
}
}
}
}

changelogType = 'markdown'
changelog = project.getChangelogText()

afterEvaluate {
uploadTask.dependsOn remapSourcesJar
}
}
options {
forgeGradleIntegration = false
}
}
}

tasks.curseforge.dependsOn(checkGitStatus)

task release(dependsOn: [tasks.githubRelease, tasks.curseforge]) {
group = 'publishing'
description = 'Releases a new version to Github and Curseforge'
}
17 changes: 13 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,27 @@ org.gradle.jvmargs=-Xmx1G

# Fabric Properties
minecraft_version=1.16.1
yarn_mappings=1.16.1+build.20
loader_version=0.8.8+build.202
yarn_mappings=1.16.1+build.21
loader_version=0.9.0+build.204

#Fabric api
fabric_version=0.14.0+build.371-1.16
fabric_version=0.14.1+build.372-1.16

# Mod Properties
mod_version = 0.7
mod_version = 0.5.1
maven_group = io.github.ladysnake
archives_base_name = illuminations

#Other Dependencies
findbugs_version = 3.0.2
jb_annotations_version = 15.0
apiguardian_version = 1.0.0

#Publishing
owners = Ladysnake
license_header = CC-BY-NC-SA+4.0
curseforge_id = 292908
curseforge_versions = 1.16.1
cf_requirements = fabric-api
release_type = release
changelog_url = https://github.com/Ladysnake/Illuminations/blob/master/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,24 +52,7 @@ public FireflyEntity(World world, double x, double y, double z) {
this(IlluminationsEntities.FIREFLY, world);
this.updatePosition(x, y, z);
}

private DefaultAttributeContainer initAttributes() {
return MobEntity.createMobAttributes()
.add(EntityAttributes.GENERIC_MAX_HEALTH, 1.0)
.add(EntityAttributes.GENERIC_FLYING_SPEED, 0.6)
.add(EntityAttributes.GENERIC_MOVEMENT_SPEED, 0.25)
.add(EntityAttributes.GENERIC_FOLLOW_RANGE, 48.0)
.build();
}

@Override
public AttributeContainer getAttributes() {
if (attributes == null) {
this.attributes = new AttributeContainer(this.initAttributes());
}
return this.attributes;
}


// Getters & setters
public float getScaleModifier() {
return this.scaleModifier;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
package ladysnake.illuminations.common.init;

import ladysnake.illuminations.common.entities.FireflyEntity;
import net.fabricmc.fabric.api.object.builder.v1.entity.FabricDefaultAttributeRegistry;
import net.fabricmc.fabric.api.object.builder.v1.entity.FabricEntityTypeBuilder;
import net.minecraft.entity.EntityDimensions;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.SpawnGroup;
import net.minecraft.entity.attribute.AttributeContainer;
import net.minecraft.entity.attribute.EntityAttributes;
import net.minecraft.entity.mob.MobEntity;
import net.minecraft.util.registry.Registry;

public class IlluminationsEntities {
Expand All @@ -16,6 +21,12 @@ public static void init() {
.dimensions(EntityDimensions.changing(1.0f, 1.0f))
.trackable(64, 1, true)
.build());

FabricDefaultAttributeRegistry.register(FIREFLY, MobEntity.createMobAttributes()
.add(EntityAttributes.GENERIC_MAX_HEALTH, 1.0)
.add(EntityAttributes.GENERIC_FLYING_SPEED, 0.6)
.add(EntityAttributes.GENERIC_MOVEMENT_SPEED, 0.25)
.add(EntityAttributes.GENERIC_FOLLOW_RANGE, 48.0));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import net.minecraft.world.WorldAccess;
import net.minecraft.world.World;

import javax.annotation.Nullable;
import java.util.Random;

public class GlowMealItem extends Item {
Expand Down Expand Up @@ -82,7 +81,7 @@ public static boolean useOnFertilizable(ItemStack itemStack, World world, BlockP
} else return false;
}

public static boolean useOnGround(ItemStack itemStack_1, World world_1, BlockPos blockPos_1, @Nullable Direction direction_1) {
public static boolean useOnGround(ItemStack itemStack_1, World world_1, BlockPos blockPos_1, Direction direction_1) {
return false;
}

Expand Down

0 comments on commit 1ffc8f5

Please sign in to comment.