-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from PssbleTrngle/develop
Brazier Indicator & Bug Fix
- Loading branch information
Showing
27 changed files
with
346 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,4 +25,6 @@ run | |
forge*changelog.txt | ||
|
||
.bat | ||
**.propertiesr | ||
**.propertiesr | ||
|
||
src/generated/ |
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
src/generated/resources/assets/brazier/blockstates/brazier.json
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
src/generated/resources/assets/brazier/models/item/brazier.json
This file was deleted.
Oops, something went wrong.
31 changes: 0 additions & 31 deletions
31
src/generated/resources/data/brazier/advancements/brazier.json
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
src/generated/resources/data/brazier/loot_tables/entities/crazed.json
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/main/java/com/possible_triangle/brazier/block/LazyTorchBlock.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package com.possible_triangle.brazier.block; | ||
|
||
import net.minecraft.block.BlockState; | ||
import net.minecraft.block.Blocks; | ||
import net.minecraft.block.TorchBlock; | ||
import net.minecraft.particles.IParticleData; | ||
import net.minecraft.particles.ParticleTypes; | ||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.world.World; | ||
import net.minecraftforge.api.distmarker.Dist; | ||
import net.minecraftforge.api.distmarker.OnlyIn; | ||
|
||
import java.util.Random; | ||
import java.util.function.Supplier; | ||
|
||
public class LazyTorchBlock extends TorchBlock { | ||
|
||
private final Supplier<? extends IParticleData> particle; | ||
|
||
public LazyTorchBlock(Supplier<? extends IParticleData> particle) { | ||
super(Properties.from(Blocks.TORCH), null); | ||
this.particle = particle; | ||
} | ||
|
||
@OnlyIn(Dist.CLIENT) | ||
@Override | ||
public void animateTick(BlockState state, World world, BlockPos pos, Random rand) { | ||
double d0 = (double)pos.getX() + 0.5D; | ||
double d1 = (double)pos.getY() + 0.7D; | ||
double d2 = (double)pos.getZ() + 0.5D; | ||
world.addParticle(ParticleTypes.SMOKE, d0, d1, d2, 0.0D, 0.0D, 0.0D); | ||
world.addParticle(this.particle.get(), d0, d1, d2, 0.0D, 0.0D, 0.0D); | ||
} | ||
|
||
} |
36 changes: 36 additions & 0 deletions
36
src/main/java/com/possible_triangle/brazier/block/LazyWallTorchBlock.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package com.possible_triangle.brazier.block; | ||
|
||
import net.minecraft.block.BlockState; | ||
import net.minecraft.block.Blocks; | ||
import net.minecraft.block.TorchBlock; | ||
import net.minecraft.block.WallTorchBlock; | ||
import net.minecraft.particles.IParticleData; | ||
import net.minecraft.particles.ParticleTypes; | ||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.world.World; | ||
import net.minecraftforge.api.distmarker.Dist; | ||
import net.minecraftforge.api.distmarker.OnlyIn; | ||
|
||
import java.util.Random; | ||
import java.util.function.Supplier; | ||
|
||
public class LazyWallTorchBlock extends WallTorchBlock { | ||
|
||
private final Supplier<? extends IParticleData> particle; | ||
|
||
public LazyWallTorchBlock(Supplier<? extends IParticleData> particle) { | ||
super(Properties.from(Blocks.WALL_TORCH), null); | ||
this.particle = particle; | ||
} | ||
|
||
@OnlyIn(Dist.CLIENT) | ||
@Override | ||
public void animateTick(BlockState state, World world, BlockPos pos, Random rand) { | ||
double d0 = (double)pos.getX() + 0.5D; | ||
double d1 = (double)pos.getY() + 0.7D; | ||
double d2 = (double)pos.getZ() + 0.5D; | ||
world.addParticle(ParticleTypes.SMOKE, d0, d1, d2, 0.0D, 0.0D, 0.0D); | ||
world.addParticle(this.particle.get(), d0, d1, d2, 0.0D, 0.0D, 0.0D); | ||
} | ||
|
||
} |
Oops, something went wrong.