Skip to content

Commit

Permalink
Merge pull request #2 from maxgamesNL/inDev
Browse files Browse the repository at this point in the history
Added some features
  • Loading branch information
maxgamesNL authored Sep 29, 2021
2 parents a211c05 + d0328a8 commit b0b02cd
Show file tree
Hide file tree
Showing 4 changed files with 116 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@



import me.maxmods.learnfabric.features.module.impl.movement.Freeze;
import me.maxmods.learnfabric.features.module.impl.movement.Hover;
import me.maxmods.learnfabric.features.module.impl.movement.Glide;
import me.maxmods.learnfabric.features.module.impl.hud.Speedometer;
import me.maxmods.learnfabric.features.module.impl.movement.*;

import java.util.ArrayList;
import java.util.List;
Expand All @@ -26,9 +25,14 @@ void register(Module module){
}

void registerModules(){
//movement
register(new Freeze());
register(new Hover());
register(new Glide());
register(new AutoSprint());
register(new Speed());
//hud
register(new Speedometer());
}

public Module getByName(String name){
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package me.maxmods.learnfabric.features.module.impl.hud;

import me.maxmods.learnfabric.features.module.Module;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.text.Text;

public class Speedometer extends Module {
public Speedometer(){super("Speedometer", ": Shows how fast you are going");}


public void enable(){

}
public void disable(){

}
public void tick(){
MinecraftClient.getInstance().player.sendMessage(Text.of("Your speed is: "+MinecraftClient.getInstance().player.getSpeed()), true);
}

@Override
public void renderWorld(MatrixStack stack) {

}

@Override
public void renderHud() {

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package me.maxmods.learnfabric.features.module.impl.movement;

import me.maxmods.learnfabric.features.module.Module;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.network.ClientPlayerEntity;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.text.Text;

public class AutoSprint extends Module {
public AutoSprint(){super(" Autosprint", ": Makes you automatically sprint.");}
ClientPlayerEntity player = MinecraftClient.getInstance().player;


public void enable(){
player.sendMessage(Text.of("Autosprint was toggled!"), false);
}
public void disable(){

}

@Override
public void tick() {
if (player.getSpeed() > 0){
player.setSprinting(true);

}
}

@Override
public void renderWorld(MatrixStack stack) {

}

@Override
public void renderHud() {

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package me.maxmods.learnfabric.features.module.impl.movement;

import me.maxmods.learnfabric.features.module.Module;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.network.ClientPlayerEntity;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.text.Text;

public class Speed extends Module {
public Speed(){super("speed", ": Makes you go brrrrt");}

ClientPlayerEntity player = MinecraftClient.getInstance().player;
float newMovementSpeed = 3f;

@Override
public void enable() {
player.sendMessage(Text.of("Doesnt work yet. :("), false);
}

public void disable(){

}

@Override
public void tick() {
if(player.isSprinting()){

}
}

@Override
public void renderHud() {

}

@Override
public void renderWorld(MatrixStack stack) {

}
}

0 comments on commit b0b02cd

Please sign in to comment.