Reformat Code
All checks were successful
RelicCraft/pipeline/head This commit looks good

This commit is contained in:
TheBrokenRail 2020-06-28 13:41:53 -04:00
parent 137502b603
commit b58f4b0809
18 changed files with 64 additions and 27 deletions

View File

@ -13,9 +13,9 @@ import com.thebrokenrail.reliccraft.block.TeleportationRestrictorBlock;
import com.thebrokenrail.reliccraft.entity.RelicEntity;
import com.thebrokenrail.reliccraft.item.DragonEggHolderBlockItem;
import com.thebrokenrail.reliccraft.item.GenerateRelicItem;
import com.thebrokenrail.reliccraft.item.RelicItem;
import com.thebrokenrail.reliccraft.item.TargetedEnderPearlItem;
import com.thebrokenrail.reliccraft.item.TimeDilaterItem;
import com.thebrokenrail.reliccraft.item.RelicItem;
import com.thebrokenrail.reliccraft.loot.RelicLootTableFunction;
import com.thebrokenrail.reliccraft.mixin.CriteriaRegistryHook;
import com.thebrokenrail.reliccraft.recipe.RevealRelicRecipe;

View File

@ -22,7 +22,8 @@ public class ActivateTeleportationBeaconCriterion extends AbstractCriterion<Abst
@Override
protected AbstractCriterionConditions conditionsFromJson(JsonObject obj, EntityPredicate.Extended playerPredicate, AdvancementEntityPredicateDeserializer predicateDeserializer) {
return new AbstractCriterionConditions(ID, playerPredicate) {};
return new AbstractCriterionConditions(ID, playerPredicate) {
};
}
public void trigger(ServerPlayerEntity player) {

View File

@ -17,7 +17,8 @@ public class ActivateTeleportationRestrictorCriterion extends AbstractCriterion<
@Override
protected AbstractCriterionConditions conditionsFromJson(JsonObject obj, EntityPredicate.Extended playerPredicate, AdvancementEntityPredicateDeserializer predicateDeserializer) {
return new AbstractCriterionConditions(ID, playerPredicate) {};
return new AbstractCriterionConditions(ID, playerPredicate) {
};
}
@Override

View File

@ -22,7 +22,8 @@ public class DilateTimeCriterion extends AbstractCriterion<AbstractCriterionCond
@Override
protected AbstractCriterionConditions conditionsFromJson(JsonObject obj, EntityPredicate.Extended playerPredicate, AdvancementEntityPredicateDeserializer predicateDeserializer) {
return new AbstractCriterionConditions(ID, playerPredicate) {};
return new AbstractCriterionConditions(ID, playerPredicate) {
};
}
public void trigger(ServerPlayerEntity player) {

View File

@ -22,7 +22,8 @@ public class DuplicateTimeDilaterCriterion extends AbstractCriterion<AbstractCri
@Override
protected AbstractCriterionConditions conditionsFromJson(JsonObject obj, EntityPredicate.Extended playerPredicate, AdvancementEntityPredicateDeserializer predicateDeserializer) {
return new AbstractCriterionConditions(ID, playerPredicate) {};
return new AbstractCriterionConditions(ID, playerPredicate) {
};
}
public void trigger(ServerPlayerEntity player) {

View File

@ -22,7 +22,8 @@ public class RevealRelicCriterion extends AbstractCriterion<AbstractCriterionCon
@Override
protected AbstractCriterionConditions conditionsFromJson(JsonObject obj, EntityPredicate.Extended playerPredicate, AdvancementEntityPredicateDeserializer predicateDeserializer) {
return new AbstractCriterionConditions(ID, playerPredicate) {};
return new AbstractCriterionConditions(ID, playerPredicate) {
};
}
public void trigger(ServerPlayerEntity player) {

View File

@ -1,6 +1,5 @@
package com.thebrokenrail.reliccraft.advancement;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonObject;
import com.thebrokenrail.reliccraft.RelicCraft;
import net.minecraft.advancement.criterion.AbstractCriterion;
@ -23,7 +22,8 @@ public class UseTargetedEnderPearlCriterion extends AbstractCriterion<AbstractCr
@Override
protected AbstractCriterionConditions conditionsFromJson(JsonObject obj, EntityPredicate.Extended playerPredicate, AdvancementEntityPredicateDeserializer predicateDeserializer) {
return new AbstractCriterionConditions(ID, playerPredicate) {};
return new AbstractCriterionConditions(ID, playerPredicate) {
};
}
public void trigger(ServerPlayerEntity player) {

View File

@ -22,7 +22,8 @@ public class UseTeleportationBeaconCriterion extends AbstractCriterion<AbstractC
@Override
protected AbstractCriterionConditions conditionsFromJson(JsonObject obj, EntityPredicate.Extended playerPredicate, AdvancementEntityPredicateDeserializer predicateDeserializer) {
return new AbstractCriterionConditions(ID, playerPredicate) {};
return new AbstractCriterionConditions(ID, playerPredicate) {
};
}
public void trigger(ServerPlayerEntity player) {

View File

@ -12,6 +12,7 @@ import net.minecraft.item.Items;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.util.Tickable;
import net.minecraft.util.collection.DefaultedList;
import java.util.Objects;
public class DragonEggHolderBlockEntity extends BlockEntity implements Inventory, Tickable {

View File

@ -5,7 +5,6 @@ import net.fabricmc.fabric.api.block.FabricBlockSettings;
import net.minecraft.block.Material;
import net.minecraft.block.MaterialColor;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.Inventory;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.sound.BlockSoundGroup;
import net.minecraft.util.math.BlockPos;

View File

@ -25,13 +25,38 @@ public class RelicCraftClient implements ClientModInitializer {
q = v * (1 - f * s);
t = v * (1 - (1 - f) * s);
switch ((int) (i % 6)) {
case 0: r = v; g = t; b = p; break;
case 1: r = q; g = v; b = p; break;
case 2: r = p; g = v; b = t; break;
case 3: r = p; g = q; b = v; break;
case 4: r = t; g = p; b = v; break;
case 5: r = v; g = p; b = q; break;
default: throw new UnsupportedOperationException();
case 0:
r = v;
g = t;
b = p;
break;
case 1:
r = q;
g = v;
b = p;
break;
case 2:
r = p;
g = v;
b = t;
break;
case 3:
r = p;
g = q;
b = v;
break;
case 4:
r = t;
g = p;
b = v;
break;
case 5:
r = v;
g = p;
b = q;
break;
default:
throw new UnsupportedOperationException();
}
return rgbToDecimal(Math.round(r * 255), Math.round(g * 255), Math.round(b * 255));
}

View File

@ -38,6 +38,7 @@ public class RelicData {
TARGET,
SELF
}
public String[] actions = new String[0];
public Mode mode = Mode.SELF;
}

View File

@ -16,7 +16,13 @@ import net.minecraft.stat.Stats;
import net.minecraft.text.LiteralText;
import net.minecraft.text.Text;
import net.minecraft.text.TranslatableText;
import net.minecraft.util.*;
import net.minecraft.util.ActionResult;
import net.minecraft.util.Formatting;
import net.minecraft.util.Hand;
import net.minecraft.util.Identifier;
import net.minecraft.util.Rarity;
import net.minecraft.util.TypedActionResult;
import net.minecraft.util.Util;
import net.minecraft.world.PersistentState;
import net.minecraft.world.World;
@ -61,6 +67,7 @@ public class TimeDilaterItem extends Item {
public interface DilatedWorld {
void setTimeSpeed(TimeSpeed speed);
TimeSpeed getTimeSpeed();
}

View File

@ -13,11 +13,8 @@ import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.util.ActionResult;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraft.world.dimension.DimensionType;
import org.spongepowered.asm.mixin.Mixin;
import java.util.Objects;
@SuppressWarnings("unused")
@Mixin(EnderPearlItem.class)
public class MixinEnderPearlItem extends Item {

View File

@ -1,9 +1,7 @@
package com.thebrokenrail.reliccraft.mixin;
import com.thebrokenrail.reliccraft.RelicCraft;
import net.minecraft.util.math.BlockBox;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.ChunkPos;
import net.minecraft.world.ServerWorldAccess;
import net.minecraft.world.chunk.Chunk;
import net.minecraft.world.gen.StructureAccessor;

View File

@ -10,6 +10,7 @@ import net.minecraft.recipe.RecipeSerializer;
import net.minecraft.recipe.ShapelessRecipe;
import net.minecraft.util.Identifier;
import net.minecraft.util.collection.DefaultedList;
import java.util.Random;
public class TimeDilaterRecipe extends ShapelessRecipe {

View File

@ -14,8 +14,6 @@ import net.minecraft.world.gen.chunk.ChunkGenerator;
import net.minecraft.world.gen.feature.DefaultFeatureConfig;
import net.minecraft.world.gen.feature.StructureFeature;
import java.util.Random;
public class TimeTempleFeature extends StructureFeature<DefaultFeatureConfig> {
public TimeTempleFeature(Codec<DefaultFeatureConfig> codec) {
super(codec);

View File

@ -6,7 +6,11 @@ import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.state.property.Property;
import net.minecraft.structure.*;
import net.minecraft.structure.SimpleStructurePiece;
import net.minecraft.structure.Structure;
import net.minecraft.structure.StructureManager;
import net.minecraft.structure.StructurePiece;
import net.minecraft.structure.StructurePlacementData;
import net.minecraft.structure.processor.BlockIgnoreStructureProcessor;
import net.minecraft.util.BlockMirror;
import net.minecraft.util.BlockRotation;