summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGJ <gjmcferrin@gmail.com>2013-12-10 08:50:35 -0500
committerNate Mortensen <nate.richard.mortensen@gmail.com>2014-01-30 21:44:36 -0700
commit6a0095998059c6d02b903478a600c08d3bab4466 (patch)
tree98c6887f6f526e44c85db20c7795aaa7ba2a83e9 /src
parente4ba663d2a8de53edf25b954ad3dfacfdbf77199 (diff)
downloadcraftbukkit-6a0095998059c6d02b903478a600c08d3bab4466.tar
craftbukkit-6a0095998059c6d02b903478a600c08d3bab4466.tar.gz
craftbukkit-6a0095998059c6d02b903478a600c08d3bab4466.tar.lz
craftbukkit-6a0095998059c6d02b903478a600c08d3bab4466.tar.xz
craftbukkit-6a0095998059c6d02b903478a600c08d3bab4466.zip
Add BlockPressurePlateWeighted.java for diff visibility
Diffstat (limited to 'src')
-rw-r--r--src/main/java/net/minecraft/server/BlockPressurePlateWeighted.java35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/BlockPressurePlateWeighted.java b/src/main/java/net/minecraft/server/BlockPressurePlateWeighted.java
new file mode 100644
index 00000000..70855690
--- /dev/null
+++ b/src/main/java/net/minecraft/server/BlockPressurePlateWeighted.java
@@ -0,0 +1,35 @@
+package net.minecraft.server;
+
+import java.util.List;
+
+public class BlockPressurePlateWeighted extends BlockPressurePlateAbstract {
+ private final int a;
+
+ protected BlockPressurePlateWeighted(String s, Material material, int i) {
+ super(s, material);
+ this.a = i;
+ }
+
+ protected int e(World world, int i, int j, int k) {
+ int l = Math.min(world.a(Entity.class, this.a(i, j, k)).size(), this.a);
+
+ if (l <= 0) {
+ return 0;
+ }
+
+ float f = (float) Math.min(this.a, l) / (float) this.a;
+ return MathHelper.f(f * 15.0F);
+ }
+
+ protected int c(int i) {
+ return i;
+ }
+
+ protected int d(int i) {
+ return i;
+ }
+
+ public int a(World world) {
+ return 10;
+ }
+}