Skip to content

Commit

Permalink
Properly apply annotations.
Browse files Browse the repository at this point in the history
  • Loading branch information
noobanidus committed Sep 19, 2019
1 parent d179a35 commit 9b0a2a1
Show file tree
Hide file tree
Showing 13 changed files with 32 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ dependencies {
} else {
compile project(':MysticalLib')
}
deobfCompile("jeresources:JustEnoughResources-${minecraft_version}:${jer_version}") {
compileOnly("jeresources:JustEnoughResources-${minecraft_version}:${jer_version}") {
exclude group: 'mezz.jei'
}
deobfCompile "info.tehnut.harvest:Harvest:1.12-1.2.7-20"
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ patchouli_version=1.0-20.108
# Set this to true to enable dependencies
dev_env=true

jer_version=0.8.10.50
jer_version=0.9.2.60

# Dependencies
depends=required-before:mysticallib@[1.3.7,);before:harvest;before:chisel;before:endercore;required:patchouli
1 change: 1 addition & 0 deletions src/main/java/epicsquid/mysticalworld/block/BlockMud.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public BlockMud(@Nonnull Material mat, @Nonnull SoundType type, float hardness,
super(mat, type, hardness, name);
}

@Override
public void onEntityCollision(World worldIn, BlockPos pos, IBlockState state, Entity entityIn) {
entityIn.motionX *= 0.4D;
entityIn.motionZ *= 0.4D;
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/epicsquid/mysticalworld/entity/EntityDeer.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ protected void entityInit() {
this.getDataManager().register(hasHorns, rand.nextBoolean());
}

@Override
protected void initEntityAI() {
this.tasks.addTask(0, new EntityAISwimming(this));
this.tasks.addTask(1, new EntityAIPanic(this, 1.5D));
Expand Down Expand Up @@ -86,6 +87,7 @@ public ResourceLocation getLootTable() {
return LOOT_TABLE;
}

@Override
public float getEyeHeight() {
return this.isChild() ? this.height : 1.3F;
}
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/epicsquid/mysticalworld/entity/EntityFox.java
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ public boolean shouldAttackEntity(EntityLivingBase target, EntityLivingBase owne
}
}

@Override
public boolean canBeLeashedTo(EntityPlayer player) {
return !this.isAngry() && super.canBeLeashedTo(player);
}
Expand Down Expand Up @@ -363,6 +364,7 @@ public EntityAISleep(EntityFox entityIn) {
/**
* Returns whether the EntityAIBase should begin execution.
*/
@Override
public boolean shouldExecute() {
if (!this.tameable.isTamed()) {
return false;
Expand All @@ -384,6 +386,7 @@ public boolean shouldExecute() {
/**
* Execute a one shot task or start executing a continuous task
*/
@Override
public void startExecuting() {
this.tameable.getNavigator().clearPath();
this.tameable.setSleeping(true);
Expand All @@ -392,6 +395,7 @@ public void startExecuting() {
/**
* Reset the task's internal state. Called when this task is interrupted by another one
*/
@Override
public void resetTask() {
this.tameable.setSleeping(false);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ protected void entityInit() {
this.getDataManager().register(variant, rand.nextInt(4));
}

@Override
protected void initEntityAI() {
this.tasks.addTask(0, new EntityAISwimming(this));
this.tasks.addTask(1, new EntityAIPanic(this, 1.5D));
Expand Down Expand Up @@ -99,6 +100,7 @@ public ResourceLocation getLootTable() {
}
}

@Override
public float getEyeHeight() {
return this.isChild() ? this.height : 1.3F;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public EntityAIStalk(EntityCreature creature, double speedIn, boolean useLongMem
/**
* Returns whether the EntityAIBase should begin execution.
*/
@Override
public boolean shouldExecute() {
EntityLivingBase entitylivingbase = this.attacker.getAttackTarget();

Expand Down Expand Up @@ -76,6 +77,7 @@ public boolean shouldExecute() {
/**
* Returns whether an in-progress EntityAIBase should continue executing
*/
@Override
public boolean shouldContinueExecuting() {
EntityLivingBase entitylivingbase = this.attacker.getAttackTarget();

Expand All @@ -95,6 +97,7 @@ public boolean shouldContinueExecuting() {
/**
* Execute a one shot task or start executing a continuous task
*/
@Override
public void startExecuting() {
this.attacker.getNavigator().setPath(this.path, this.speedTowardsTarget);
this.delayCounter = 0;
Expand All @@ -103,6 +106,7 @@ public void startExecuting() {
/**
* Reset the task's internal state. Called when this task is interrupted by another one
*/
@Override
public void resetTask() {
EntityLivingBase entitylivingbase = this.attacker.getAttackTarget();

Expand All @@ -116,6 +120,7 @@ public void resetTask() {
/**
* Keep ticking a continuous task that has already been started
*/
@Override
public void updateTask() {
EntityLivingBase entitylivingbase = this.attacker.getAttackTarget();
if (entitylivingbase == null) return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ public ModelDeer() {
setRotation(horn8, 0F, 0.1745329F, 0.7853982F);
}

@Override
public void render(@Nonnull Entity entity, float f, float limbSwingAmount, float age, float f3, float f4, float f5) {
float sin = (float) Math.sin(age * 0.125f * (Math.PI * 2.0f));
float cos = (float) Math.cos(age * 0.0625f * (Math.PI * 2.0f));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public ModelSprout() {
setRotation(leafBottom, 1.963495F, 0.5235988F, 0F);
}

@Override
public void render(Entity entity, float f, float f1, float age, float f3, float f4, float f5) {
GlStateManager.pushMatrix();
float speed = (float) Math.min(0.25f, ((new Vec3d(entity.motionX, 0, entity.motionZ)).length() * 4.0f));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@ public RenderEndermini(RenderManager rendermanagerIn, ModelBase modelbaseIn, flo
this.addLayer(new LayerHeldBlockMini(this));
}

@Override
public ModelEnderman getMainModel() {
return (ModelEnderman) super.getMainModel();
}

/**
* Renders the desired {@code T} type Entity.
*/
@Override
public void doRender(EntityEndermini entity, double x, double y, double z, float entityYaw, float partialTicks) {
IBlockState iblockstate = entity.getHeldBlockState();
ModelEnderman modelenderman = this.getMainModel();
Expand All @@ -57,6 +59,7 @@ public void doRender(EntityEndermini entity, double x, double y, double z, float
/**
* Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
*/
@Override
protected ResourceLocation getEntityTexture(EntityEndermini entity) {
return ENDERMINI_TEXTURES;
}
Expand All @@ -79,6 +82,7 @@ public LayerEnderminiEyes(RenderEndermini endermanRendererIn) {
this.endermanRenderer = endermanRendererIn;
}

@Override
public void doRenderLayer(EntityEndermini entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) {
this.endermanRenderer.bindTexture(RES_ENDERMAN_EYES);
GlStateManager.pushMatrix();
Expand All @@ -105,6 +109,7 @@ public void doRenderLayer(EntityEndermini entitylivingbaseIn, float limbSwing, f
GlStateManager.popMatrix();
}

@Override
public boolean shouldCombineTextures() {
return false;
}
Expand All @@ -118,6 +123,7 @@ public LayerHeldBlockMini(RenderEndermini endermanRendererIn) {
this.endermanRenderer = endermanRendererIn;
}

@Override
public void doRenderLayer(EntityEndermini entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) {
IBlockState iblockstate = entitylivingbaseIn.getHeldBlockState();

Expand Down Expand Up @@ -147,6 +153,7 @@ public void doRenderLayer(EntityEndermini entitylivingbaseIn, float limbSwing, f
}
}

@Override
public boolean shouldCombineTextures() {
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public HasHorns(boolean inverseIn)
this.inverse = inverseIn;
}

@Override
public boolean testCondition(Random rand, LootContext context)
{
boolean flag;
Expand All @@ -41,11 +42,13 @@ public Serializer()
super(new ResourceLocation("has_horns"), HasHorns.class);
}

@Override
public void serialize(JsonObject json, HasHorns value, JsonSerializationContext context)
{
json.addProperty("inverse", value.inverse);
}

@Override
public HasHorns deserialize(JsonObject json, JsonDeserializationContext context)
{
return new HasHorns(JsonUtils.getBoolean(json, "inverse", false));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public WorldGenMinableDebug(String oreName, IBlockState state, int blockCount) {
this.oreName = oreName;
}

@Override
public boolean generate(World worldIn, Random rand, BlockPos position) {
int generatedCount = 0;
float f = rand.nextFloat() * (float) Math.PI;
Expand Down Expand Up @@ -101,6 +102,7 @@ static class StonePredicate implements com.google.common.base.Predicate<IBlockSt
private StonePredicate() {
}

@Override
public boolean apply(IBlockState p_apply_1_) {
if (p_apply_1_ != null && p_apply_1_.getBlock() == Blocks.STONE) {
BlockStone.EnumType blockstone$enumtype = (BlockStone.EnumType) p_apply_1_.getValue(BlockStone.VARIANT);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,12 @@ private int checkBlockLine(BlockPos posOne, BlockPos posTwo) {
}
}

@Override
public void setDecorationDefaults() {
this.leafDistanceLimit = 5;
}

@Override
public boolean generate(World worldIn, Random rand, BlockPos position) {
this.world = worldIn;
this.basePos = position;
Expand Down

0 comments on commit 9b0a2a1

Please sign in to comment.