mirror of
https://github.com/FabricMC/fabric.git
synced 2025-07-28 15:09:35 -04:00
20w19a: Deprecated min/maxDespawnDistance in FabricEntityTypeBuilder as they are no longer applicable to the EntityType.
This was done to keep mod compat and will be removed very shortly. I dont think they were used by many mods (only added in a recent 1.16 snapshot) so I think this is the best course of action.
This commit is contained in:
parent
b4da06fb83
commit
84cce57f4d
6 changed files with 15 additions and 16 deletions
build.gradle
fabric-object-builder-api-v1
build.gradle
src/main/java/net/fabricmc/fabric
fabric-renderer-api-v1
|
@ -12,8 +12,8 @@ plugins {
|
|||
def ENV = System.getenv()
|
||||
|
||||
class Globals {
|
||||
static def baseVersion = "0.10.4"
|
||||
static def mcVersion = "20w18a"
|
||||
static def baseVersion = "0.10.5"
|
||||
static def mcVersion = "20w19a"
|
||||
static def yarnVersion = "+build.1"
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
archivesBaseName = "fabric-object-builder-api-v1"
|
||||
version = getSubprojectVersion(project, "1.0.1")
|
||||
version = getSubprojectVersion(project, "1.1.0")
|
||||
|
||||
dependencies {
|
||||
compile project(path: ':fabric-api-base', configuration: 'dev')
|
||||
|
|
|
@ -43,8 +43,6 @@ public class FabricEntityTypeBuilder<T extends Entity> {
|
|||
private Boolean alwaysUpdateVelocity;
|
||||
private boolean fireImmune = false;
|
||||
private boolean spawnableFarFromPlayer;
|
||||
private int maxDespawnDistance = 128;
|
||||
private int minDespawnDistance = 32;
|
||||
private EntityDimensions dimensions = EntityDimensions.changing(-1.0f, -1.0f);
|
||||
|
||||
protected FabricEntityTypeBuilder(EntityCategory category, EntityType.EntityFactory<T> function) {
|
||||
|
@ -126,26 +124,27 @@ public class FabricEntityTypeBuilder<T extends Entity> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the maximum distance entities of this type can be from a player to possibly despawn.
|
||||
* @deprecated For removal: Gas been moved to EntityCategory
|
||||
*
|
||||
* @param maxDespawnDistance the distance
|
||||
*
|
||||
*
|
||||
* @return this builder for chaining
|
||||
*/
|
||||
@Deprecated
|
||||
public FabricEntityTypeBuilder<T> maxDespawnDistance(int maxDespawnDistance) {
|
||||
this.maxDespawnDistance = maxDespawnDistance;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the minimum distance entities of this type can be from a player to possibly despawn.
|
||||
* @deprecated For removal: Gas been moved to EntityCategory
|
||||
*
|
||||
* @param minDespawnDistance the distance
|
||||
*
|
||||
* @return this builder for chaining
|
||||
*/
|
||||
@Deprecated
|
||||
public FabricEntityTypeBuilder<T> minDespawnDistance(int minDespawnDistance) {
|
||||
this.minDespawnDistance = minDespawnDistance;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -171,7 +170,7 @@ public class FabricEntityTypeBuilder<T extends Entity> {
|
|||
// TODO: Flesh out once modded datafixers exist.
|
||||
}
|
||||
|
||||
EntityType<T> type = new FabricEntityType<T>(this.function, this.category, this.saveable, this.summonable, this.fireImmune, this.spawnableFarFromPlayer, this.maxDespawnDistance, this.minDespawnDistance, dimensions, trackingDistance, updateIntervalTicks, alwaysUpdateVelocity);
|
||||
EntityType<T> type = new FabricEntityType<T>(this.function, this.category, this.saveable, this.summonable, this.fireImmune, this.spawnableFarFromPlayer, dimensions, trackingDistance, updateIntervalTicks, alwaysUpdateVelocity);
|
||||
|
||||
return type;
|
||||
}
|
||||
|
|
|
@ -24,8 +24,8 @@ import net.minecraft.entity.EntityType;
|
|||
public class FabricEntityType<T extends Entity> extends EntityType<T> {
|
||||
private final Boolean alwaysUpdateVelocity;
|
||||
|
||||
public FabricEntityType(EntityType.EntityFactory<T> factory, EntityCategory category, boolean bl, boolean summonable, boolean fireImmune, boolean spawnableFarFromPlayer, int i, int j, EntityDimensions entityDimensions, int maxTrackDistance, int trackTickInterval, Boolean alwaysUpdateVelocity) {
|
||||
super(factory, category, bl, summonable, fireImmune, spawnableFarFromPlayer, i, j, entityDimensions, (maxTrackDistance + 15) / 16, trackTickInterval);
|
||||
public FabricEntityType(EntityType.EntityFactory<T> factory, EntityCategory category, boolean bl, boolean summonable, boolean fireImmune, boolean spawnableFarFromPlayer, EntityDimensions entityDimensions, int maxTrackDistance, int trackTickInterval, Boolean alwaysUpdateVelocity) {
|
||||
super(factory, category, bl, summonable, fireImmune, spawnableFarFromPlayer, entityDimensions, (maxTrackDistance + 15) / 16, trackTickInterval);
|
||||
this.alwaysUpdateVelocity = alwaysUpdateVelocity;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
archivesBaseName = "fabric-renderer-api-v1"
|
||||
version = getSubprojectVersion(project, "0.2.12")
|
||||
version = getSubprojectVersion(project, "0.2.13")
|
||||
|
||||
dependencies {
|
||||
compile project(path: ':fabric-api-base', configuration: 'dev')
|
||||
|
|
|
@ -23,7 +23,7 @@ import java.util.function.Supplier;
|
|||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.render.model.BakedModel;
|
||||
import net.minecraft.client.render.model.BakedQuad;
|
||||
import net.minecraft.client.render.model.json.ModelItemPropertyOverrideList;
|
||||
import net.minecraft.client.render.model.json.ModelOverrideList;
|
||||
import net.minecraft.client.render.model.json.ModelTransformation;
|
||||
import net.minecraft.client.texture.Sprite;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -92,7 +92,7 @@ public abstract class ForwardingBakedModel implements BakedModel, FabricBakedMod
|
|||
}
|
||||
|
||||
@Override
|
||||
public ModelItemPropertyOverrideList getItemPropertyOverrides() {
|
||||
return wrapped.getItemPropertyOverrides();
|
||||
public ModelOverrideList getOverrides() {
|
||||
return wrapped.getOverrides();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue