mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-26 05:08:34 +01:00
finish the time changer
This commit is contained in:
parent
58169599e6
commit
ea54997ae5
12 changed files with 109 additions and 26 deletions
|
@ -6,8 +6,8 @@ import net.minecraft.block.material.Material;
|
|||
|
||||
public class BlockTimeChanger extends BlockContainerImpl {
|
||||
public BlockTimeChanger() {
|
||||
super(Material.WOOD, "time_changer", TileEntityTimeChanger.class, "time_changer");
|
||||
this.setSoundType(SoundType.WOOD);
|
||||
this.setHardness(2);
|
||||
super(Material.ROCK, "time_changer", TileEntityTimeChanger.class, "time_changer");
|
||||
this.setSoundType(SoundType.STONE);
|
||||
this.setHardness(2.5F);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -87,29 +87,21 @@ public class TileEntityTimeChanger extends TileEntityImpl implements ITickable {
|
|||
this.goalTime = 0;
|
||||
this.sendToClients();
|
||||
}
|
||||
} else if (this.goalTime > 0) {
|
||||
if (this.world.getTotalWorldTime() % 5 == 0)
|
||||
NaturesAuraAPI.instance().spawnParticleStream(
|
||||
this.pos.getX() + (float) this.world.rand.nextGaussian() * 5F,
|
||||
this.pos.getY() + 1 + this.world.rand.nextFloat() * 5F,
|
||||
this.pos.getZ() + (float) this.world.rand.nextGaussian() * 5F,
|
||||
this.pos.getX() + this.world.rand.nextFloat(),
|
||||
this.pos.getY() + this.world.rand.nextFloat(),
|
||||
this.pos.getZ() + this.world.rand.nextFloat(),
|
||||
this.world.rand.nextFloat() * 0.07F + 0.07F, IAuraType.forWorld(this.world).getColor(), this.world.rand.nextFloat() + 0.5F);
|
||||
|
||||
if (this.world.rand.nextFloat() >= 0.25F) {
|
||||
int color = this.goalTime % 24000 > 12000 ? 0xe2e2e2 : 0xffe926;
|
||||
NaturesAuraAPI.instance().spawnMagicParticle(
|
||||
this.pos.getX() + this.world.rand.nextFloat(),
|
||||
this.pos.getY() + 1,
|
||||
this.pos.getZ() + this.world.rand.nextFloat(),
|
||||
-0.05F - this.world.rand.nextFloat() * 0.02F,
|
||||
this.world.rand.nextFloat() * 0.25F,
|
||||
this.world.rand.nextGaussian() * 0.02F,
|
||||
color, 1F + this.world.rand.nextFloat() * 2F,
|
||||
this.world.rand.nextInt(100) + 100, 0, true, true);
|
||||
}
|
||||
} else if (this.goalTime > 0 && this.world.rand.nextFloat() >= 0.25F) {
|
||||
double angle = Math.toRadians(this.world.getTotalWorldTime() * 5F % 360);
|
||||
double x = this.pos.getX() + 0.5 + Math.sin(angle) * 3F;
|
||||
double z = this.pos.getZ() + 0.5 + Math.cos(angle) * 3F;
|
||||
int color = this.goalTime % 24000 > 12000 ? 0xe2e2e2 : 0xffe926;
|
||||
NaturesAuraAPI.instance().spawnMagicParticle(
|
||||
x, this.pos.getY() + 0.1F, z,
|
||||
0F, 0.12F, 0F,
|
||||
color, 1F + this.world.rand.nextFloat() * 2F,
|
||||
this.world.rand.nextInt(100) + 100, 0, false, true);
|
||||
NaturesAuraAPI.instance().spawnMagicParticle(
|
||||
x, this.pos.getY() + 0.1F, z,
|
||||
0F, 0F, 0F,
|
||||
IAuraType.forWorld(this.world).getColor(), 1F + this.world.rand.nextFloat(),
|
||||
150, 0, false, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -160,6 +160,10 @@ public final class ModRecipes {
|
|||
new AmountIngredient(new ItemStack(ModItems.INFUSED_IRON, 3)),
|
||||
Ingredient.fromItem(ModItems.CALLING_SPIRIT),
|
||||
new ItemStack(ModItems.SKY_INGOT)).register();
|
||||
new OfferingRecipe(new ResourceLocation(NaturesAura.MOD_ID, "clock_hand"),
|
||||
Ingredient.fromItem(Items.NETHER_STAR),
|
||||
Ingredient.fromItem(ModItems.CALLING_SPIRIT),
|
||||
new ItemStack(ModItems.CLOCK_HAND)).register();
|
||||
|
||||
NaturesAuraAPI.BOTANIST_PICKAXE_CONVERSIONS.put(
|
||||
Blocks.COBBLESTONE.getDefaultState(),
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"forge_marker": 1,
|
||||
"defaults": {
|
||||
"model": "minecraft:cube",
|
||||
"textures": {
|
||||
"particle": "naturesaura:blocks/time_changer",
|
||||
"up": "naturesaura:blocks/time_changer_top",
|
||||
"down": "naturesaura:blocks/time_changer_bottom",
|
||||
"north": "#particle",
|
||||
"east": "#particle",
|
||||
"south": "#particle",
|
||||
"west": "#particle"
|
||||
},
|
||||
"transform": "forge:default-block"
|
||||
},
|
||||
"variants": {
|
||||
"normal": [{}],
|
||||
"inventory": [{}]
|
||||
}
|
||||
}
|
|
@ -43,6 +43,7 @@ tile.naturesaura.auto_crafter.name=Automatic Constructor
|
|||
tile.naturesaura.gold_brick.name=Golden Stone Bricks
|
||||
tile.naturesaura.rf_converter.name=Energetic Aura Forge
|
||||
tile.naturesaura.moss_generator.name=Swamp Homi
|
||||
tile.naturesaura.time_changer.name=Shifting Sundial
|
||||
|
||||
item.naturesaura.eye.name=Environmental Eye
|
||||
item.naturesaura.eye_improved.name=Environmental Ocular
|
||||
|
@ -78,6 +79,7 @@ item.naturesaura.effect_powder.naturesaura:cache_recharge.name=Powder of no Stor
|
|||
item.naturesaura.effect_powder.naturesaura:animal.name=Powder of Chastity
|
||||
item.naturesaura.mover_cart.name=Aura Attraction Cart
|
||||
item.naturesaura.range_visualizer.name=Mystical Magnifier
|
||||
item.naturesaura.clock_hand.name=Hand of Time
|
||||
|
||||
container.naturesaura.tree_ritual.name=Ritual of the Forest
|
||||
container.naturesaura.altar.name=Natural Altar Infusion
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "naturesaura:items/clock_hand"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"name": "Shifting Sundial",
|
||||
"icon": "naturesaura:time_changer",
|
||||
"category": "using",
|
||||
"advancement": "naturesaura:aura_bottle_end",
|
||||
"pages": [
|
||||
{
|
||||
"type": "text",
|
||||
"text": "Certain activities, especially building and hunting for monsters, can only easily be done at certain times. Over the years, magical botanists have tried to find a way to manipulate $(thing)time$() itself for personal gain. The $(item)Shifting Sundial$() has the ability to do exactly that. While quite expensive to set up, it has the ability to fast forward to $(thing)any time of day or night$() with ease."
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"text": "To set it up, all that is required is for the $(item)Shifting Sundial$() to have an $(item)Item Frame$() on it containg a $(item)Hand of Time$(). The $(thing)rotation$() of the hand in the frame will then determine the time that will be skipped to, with the hand pointing to the top corresponding to midnight. To activate a time skip, a regular $(item)Clock$() has to be dropped very close to the sundial.$(br)This, of course, comes at the cost of a large amount of $(aura) - the more time skipped, the more will be consumed."
|
||||
},
|
||||
{
|
||||
"type": "crafting",
|
||||
"text": "Creating the $(item)Shifting Sundial$()",
|
||||
"recipe": "naturesaura:time_changer"
|
||||
},
|
||||
{
|
||||
"type": "naturesaura:offering",
|
||||
"text": "Requesting the $(item)Hand of Time$() with the $(l:practices/offering)Offering to the Gods$()",
|
||||
"recipe": "naturesaura:clock_hand"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
"type": "forge:ore_shaped",
|
||||
"pattern": [
|
||||
" O ",
|
||||
"BCB",
|
||||
" N "
|
||||
],
|
||||
"key": {
|
||||
"C": {
|
||||
"item": "minecraft:clock"
|
||||
},
|
||||
"B": {
|
||||
"item": "naturesaura:infused_brick"
|
||||
},
|
||||
"N": {
|
||||
"type": "minecraft:item_nbt",
|
||||
"item": "naturesaura:aura_bottle",
|
||||
"nbt": {
|
||||
"stored_type": "naturesaura:nether"
|
||||
}
|
||||
},
|
||||
"O": {
|
||||
"type": "minecraft:item_nbt",
|
||||
"item": "naturesaura:aura_bottle",
|
||||
"nbt": {
|
||||
"stored_type": "naturesaura:overworld"
|
||||
}
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "naturesaura:time_changer"
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 625 B |
Binary file not shown.
After Width: | Height: | Size: 764 B |
Binary file not shown.
After Width: | Height: | Size: 701 B |
Binary file not shown.
After Width: | Height: | Size: 283 B |
Loading…
Reference in a new issue