@@ -141,7 +141,6 @@ private void handleWallJump() {
141
141
142
142
clingTime --;
143
143
if (keyTimer > 0 && (keyTimer < 5 || clingTime < -15 ) && canWallCling (this )) {
144
-
145
144
Vec3d previousVelocity = this .getVelocity ();
146
145
double velY = previousVelocity .y ;
147
146
if (velY > -0.75 ) velY = 0.0 ;
@@ -151,34 +150,34 @@ private void handleWallJump() {
151
150
clingX = this .getPos ().getX ();
152
151
clingZ = this .getPos ().getZ ();
153
152
switch (clingDirection ) {
154
- // all these are player's direction from container view
153
+ // all these are player's direction from container view (opposite of player look when looking at wall)
155
154
case NORTH :
156
- clingX + = 0.5 ;
155
+ clingZ - = 0.1 ;
157
156
break ;
158
157
case SOUTH :
159
- clingX += 0.5 ;
158
+ clingZ += 0.1 ;
160
159
break ;
161
160
case EAST :
162
- clingZ += 0.5 ;
161
+ clingX += 0.1 ;
163
162
break ;
164
163
case WEST :
165
- clingZ + = 0.5 ;
164
+ clingX - = 0.1 ;
166
165
break ;
167
166
default :
168
167
break ;
169
168
}
170
169
switch (clingDirection2 ) {
171
170
case NORTH :
172
- clingZ + = 0.7 ;
171
+ clingZ - = 0.1 ;
173
172
break ;
174
173
case SOUTH :
175
- clingZ += 0.3 ;
174
+ clingZ += 0.1 ;
176
175
break ;
177
176
case EAST :
178
- clingX += 0.3 ;
177
+ clingX += 0.1 ;
179
178
break ;
180
179
case WEST :
181
- clingX + = 0.7 ;
180
+ clingX - = 0.1 ;
182
181
break ;
183
182
default :
184
183
break ;
@@ -200,10 +199,12 @@ private static boolean nearWall(Entity entity, double dist) {
200
199
201
200
private static boolean canWallCling (PlayerEntity player ) {
202
201
203
- if (clingTime > -5 /*|| player.canClimb()*/ || player .getHungerManager ().getFoodLevel () < 1 ) return false ;
202
+ if (clingTime > -5 || player .getHungerManager ().getFoodLevel () < 1 ) return false ;
204
203
205
204
if (player .world .getBlockState (new BlockPos (player .getPos ().getX (), player .getPos ().getY () - 0.8 , player .getPos ().getZ ())).isOpaque ()) return false ;
206
205
206
+ if (!player .world .getFluidState (player .getBlockPos ()).isEmpty () || !player .world .getFluidState (player .getBlockPos ().up ()).isEmpty ()) return false ;
207
+
207
208
double dist = 0.4 ;
208
209
Box box = player .getBoundingBox ().shrink (0.2 , 0 , 0.2 );
209
210
Box [] axes = { box .stretch (0 , 0 , -dist ), box .stretch (dist , 0 , 0 ), box .stretch (0 , 0 , dist ), box .stretch (-dist , 0 , 0 ) };
@@ -230,8 +231,8 @@ private static boolean canWallCling(PlayerEntity player) {
230
231
if (SkillCheck .SLIPPERY_BLOCKS .contains (player .world .getBlockState (getWallPos (player )).getBlock ()) ^ SkillCheck .config .invertSlipperyTag
231
232
|| player .world .getBlockState (getWallPos (player )).getBlock () instanceof FluidBlock ) return false ;
232
233
233
-
234
- if (ClassManager . hasClass ( player , SkillCheck . THIEF ) || player . getPos ().getY () < lastJumpY ) return true ; //TODO: change to use levels later?
234
+ //TODO maybe have a higher thief level where you can spam up a wall?
235
+ if (player . getPos ().getY () < lastJumpY ) return true ;
235
236
236
237
if (walls .size () == 1 ) {
237
238
0 commit comments