Compare commits
6 Commits
1.0.0+1.16
...
master
Author | SHA1 | Date |
---|---|---|
TheBrokenRail | edd88616f3 | |
TheBrokenRail | d33fb21a7b | |
TheBrokenRail | 8c2bcd7ddb | |
TheBrokenRail | b19b22de43 | |
TheBrokenRail | 02989d2e46 | |
TheBrokenRail | 2c23854764 |
12
CHANGELOG.md
12
CHANGELOG.md
|
@ -1,4 +1,16 @@
|
|||
# Changelog
|
||||
|
||||
**1.0.4**
|
||||
* Fix NPE
|
||||
|
||||
**1.0.3**
|
||||
* Fix Bug With ``initEquipment`` Redirect
|
||||
|
||||
**1.0.2**
|
||||
* Improve Versioning
|
||||
|
||||
**1.0.1**
|
||||
* Opt-In To ModUpdater
|
||||
|
||||
**1.0.0**
|
||||
* Initial Release
|
|
@ -21,11 +21,11 @@ dependencies {
|
|||
}
|
||||
|
||||
processResources {
|
||||
inputs.property "version", mod_version
|
||||
inputs.property "version", project.version
|
||||
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
include "fabric.mod.json"
|
||||
expand "version": mod_version
|
||||
expand "version": project.version
|
||||
}
|
||||
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
|
|
|
@ -3,16 +3,16 @@ org.gradle.jvmargs = -Xmx1G
|
|||
|
||||
# Fabric Properties
|
||||
# check these on https://fabricmc.net/use
|
||||
minecraft_version = 1.16-rc1
|
||||
minecraft_version = 1.16.1
|
||||
curseforge_id = 390028
|
||||
simple_minecraft_version = 1.16-Snapshot
|
||||
yarn_build = 4
|
||||
simple_minecraft_version = 1.16.1
|
||||
yarn_build = 1
|
||||
fabric_loader_version = 0.8.8+build.202
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 1.0.0
|
||||
mod_version = 1.0.4
|
||||
maven_group = com.thebrokenrail
|
||||
|
||||
# Dependencies
|
||||
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
|
||||
fabric_api_version = 0.12.5+build.367-1.16
|
||||
fabric_api_version = 0.13.1+build.370-1.16
|
||||
|
|
|
@ -30,7 +30,7 @@ public class GlowingObsidianBlock extends Block {
|
|||
public void onSteppedOn(World world, BlockPos pos, Entity entity) {
|
||||
super.onSteppedOn(world, pos, entity);
|
||||
if (!world.isClient() && entity instanceof LivingEntity) {
|
||||
((ServerWorld) world).spawnParticles(ParticleTypes.SMOKE, pos.getX() + 0.5d, pos.getY() + 1d, pos.getZ() + 0.5d, 3 + world.getRandom().nextInt(3), 0.2d, 0.5d, 0.2d,0.01d);
|
||||
((ServerWorld) world).spawnParticles(ParticleTypes.SMOKE, pos.getX() + 0.5d, pos.getY() + 1d, pos.getZ() + 0.5d, 3 + world.getRandom().nextInt(3), 0.2d, 0.5d, 0.2d, 0.01d);
|
||||
if (entity.age % 10 == 0) {
|
||||
final float amount = 2f;
|
||||
if (entity instanceof Monster) {
|
||||
|
|
|
@ -40,9 +40,9 @@ public class MixinBoatEntity implements BoatUtil {
|
|||
private static final TrackedData<Integer> CHEST_MODE = DataTracker.registerData(BoatEntity.class, TrackedDataHandlerRegistry.INTEGER);
|
||||
|
||||
@Unique
|
||||
private BoatInventory items;
|
||||
private BoatInventory items = null;
|
||||
@Unique
|
||||
private ItemStack stack;
|
||||
private ItemStack stack = ItemStack.EMPTY;
|
||||
|
||||
@Inject(at = @At("RETURN"), method = "initDataTracker")
|
||||
public void initDataTracker(CallbackInfo info) {
|
||||
|
|
|
@ -65,10 +65,11 @@ public class MixinMobEntity {
|
|||
|
||||
@Inject(at = @At("HEAD"), method = "isInDaylight", cancellable = true)
|
||||
public void isInDaylight(CallbackInfoReturnable<Boolean> info) {
|
||||
if (!((MobEntity) (Object) this).getEntityWorld().isClient()) {
|
||||
StageDataComponent component = StageDataComponent.getFromWorld((ServerWorld) ((MobEntity) (Object) this).getEntityWorld());
|
||||
World world = ((MobEntity) (Object) this).getEntityWorld();
|
||||
if (!world.isClient()) {
|
||||
StageDataComponent component = StageDataComponent.getFromWorld((ServerWorld) world);
|
||||
BlockPos blockPos = ((MobEntity) (Object) this).getBlockPos();
|
||||
int stage = component.findEffectiveStageOfChunk((ServerWorld) ((MobEntity) (Object) this).getEntityWorld(), blockPos);
|
||||
int stage = component.findEffectiveStageOfChunk((ServerWorld) world, blockPos);
|
||||
if (stage >= StageUtil.MOBS_NO_LONGER_BURN_IN_SUNLIGHT) {
|
||||
info.setReturnValue(false);
|
||||
}
|
||||
|
@ -77,13 +78,15 @@ public class MixinMobEntity {
|
|||
|
||||
@Redirect(at = @At(value = "INVOKE", target = "Ljava/util/Random;nextFloat()F", ordinal = 0), method = "initEquipment", allow = 1)
|
||||
public float initEquipment(Random random) {
|
||||
StageDataComponent component = StageDataComponent.getFromWorld((ServerWorld) ((MobEntity) (Object) this).getEntityWorld());
|
||||
BlockPos blockPos = ((MobEntity) (Object) this).getBlockPos();
|
||||
int stage = component.findEffectiveStageOfChunk((ServerWorld) ((MobEntity) (Object) this).getEntityWorld(), blockPos);
|
||||
if (stage >= StageUtil.MOBS_GUARANTEED_ARMOR) {
|
||||
return -1f;
|
||||
} else {
|
||||
return random.nextFloat();
|
||||
World world = ((MobEntity) (Object) this).getEntityWorld();
|
||||
if (!world.isClient()) {
|
||||
StageDataComponent component = StageDataComponent.getFromWorld((ServerWorld) ((MobEntity) (Object) this).getEntityWorld());
|
||||
BlockPos blockPos = ((MobEntity) (Object) this).getBlockPos();
|
||||
int stage = component.findEffectiveStageOfChunk((ServerWorld) ((MobEntity) (Object) this).getEntityWorld(), blockPos);
|
||||
if (stage >= StageUtil.MOBS_GUARANTEED_ARMOR) {
|
||||
return -1f;
|
||||
}
|
||||
}
|
||||
return random.nextFloat();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,5 +30,11 @@
|
|||
"fabricloader": ">=0.7.4",
|
||||
"fabric": "*",
|
||||
"minecraft": "1.16.x"
|
||||
},
|
||||
"custom": {
|
||||
"modupdater": {
|
||||
"strategy": "curseforge",
|
||||
"projectID": 390028
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Reference in New Issue