Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
ccorp2002 authored Oct 6, 2020
1 parent 10ece63 commit bf53eb7
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 8 deletions.
19 changes: 18 additions & 1 deletion src/main/java/com/ccorp2002/tasks/EntityCalculator.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ public void run() {
Material m = myBlock.getRelative(b.getFacing()).getType();
Material m_TWO = myBlock.getRelative(b.getFacing()).getType();
Material m_THREE = myBlock.getRelative(b.getFacing()).getType();
Material m_FLAK = myBlock.getRelative(b.getFacing()).getType();
Material m_FLAK = myBlock.getRelative(b.getFacing()).getType();;
Material m_MORTAR = myBlock.getRelative(b.getFacing()).getType();
if(m == Material.WOOD_STAIRS || m == Material.SPRUCE_WOOD_STAIRS || m == Material.BIRCH_WOOD_STAIRS || m == Material.JUNGLE_WOOD_STAIRS || m == Material.DARK_OAK_STAIRS || m == Material.ACACIA_STAIRS){
if(!plugin.getConfig().getBoolean("Settings.StairCannon.Enabled")) continue;
if(i instanceof Item){
Expand Down Expand Up @@ -99,6 +100,22 @@ public void run() {
}else{
i.setVelocity(Utils.faceToForce(b.getFacing()).multiply(100 * plugin.getConfig().getDouble("Settings.StairCannonFlak.Force")).add(new Vector(0, 4, 0)));
}
}
if(m_FLAK == Material.PURPUR_STAIRS){
if(!plugin.getConfig().getBoolean("Settings.StairCannonFlak.Enabled")) continue;
if(i instanceof Item){
i.setVelocity(Utils.faceToForce(b.getFacing()).multiply(400 * plugin.getConfig().getDouble("Settings.StairCannonFlak.Force")).add(new Vector(0, 4, 0)));
}else{
i.setVelocity(Utils.faceToForce(b.getFacing()).multiply(100 * plugin.getConfig().getDouble("Settings.StairCannonFlak.Force")).add(new Vector(0, 4, 0)));
}
}
if(m_MORTAR == Material.BRICK_STAIRS){
if(!plugin.getConfig().getBoolean("Settings.StairCannonMortar.Enabled")) continue;
if(i instanceof Item){
i.setVelocity(Utils.faceToForce(b.getFacing()).multiply(175 * plugin.getConfig().getDouble("Settings.StairCannonMortar.Force")).add(new Vector(0, 3, 0)));
}else{
i.setVelocity(Utils.faceToForce(b.getFacing()).multiply(200 * plugin.getConfig().getDouble("Settings.StairCannonMortar.Force")).add(new Vector(0, 2, 0)));
}
}
}else{
if(myBlock.getRelative(BlockFace.DOWN).getType() == Material.IRON_BLOCK && plugin.getConfig().getBoolean("Settings.Repeater.FastEnabled")){
Expand Down
14 changes: 8 additions & 6 deletions src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,17 @@ Settings:
# The force multiplier
Force: 2.0

# The minimum amount of TPS when the plugin should run
MinimumTPS: 7.5

StairCannonFlak:
# PURPUR STAIR RAILGUN/FLAK/CANNONS(s)
Enabled: true
# The force multiplier
Force: 2.7

StairCannonMortar:
# BRICK STAIR RAILGUN/MORTAR/ARTILLERY(s)
Enabled: true
# The force multiplier
Force: 2.5
Force: 1.5

# The minimum amount of TPS when the plugin should run
MinimumTPS: 7.5
# The minimum amount of TPS when the plugin should run
MinimumTPS: 7.5
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Simplestone
main: com.ccorp2002.Simplestone
version: 1.4
version: 1.5
commands:
cleanup:
usage: /<command>
Expand Down

0 comments on commit bf53eb7

Please sign in to comment.