Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
9496f14
Fixed doors not placing in extended world heights
mineLdiver Jan 10, 2026
57c1236
Fixed pistons not working in extended world heights
mineLdiver Jan 10, 2026
149e502
Fixed random ticking with custom world height
mineLdiver Jan 10, 2026
58be240
Insane how I missed this one
mineLdiver Jan 14, 2026
d169a89
Better handling of registry entries
mineLdiver Jan 18, 2026
9f87922
LogicalRegistry
mineLdiver Jan 19, 2026
ab5d356
RegistryEvent interacting directly with the registry instance
mineLdiver Jan 19, 2026
e8c7546
RegistryEvent MutableLogicalRegistry subtype
mineLdiver Jan 19, 2026
7aa0a9d
Update buildscript (#246)
ProdOrDev Jan 28, 2026
2f6ec0b
Update README.md
calmilamsy Feb 4, 2026
3ab44ee
Tags getter
mineLdiver Feb 28, 2026
39a1986
VineFlower genSources mixin injection points fixed
mineLdiver Mar 22, 2026
305f953
Stats management v1 (#244)
mineLdiver Mar 22, 2026
f6a075d
fix: bonemeal api in multiplayer (#249)
Lemmmy Mar 29, 2026
b5b91eb
fix: make station-flattening-v0/StatMixin compile (#251)
Lemmmy Mar 31, 2026
f263a8e
fix: memory leak during registry growth (#253)
Lemmmy Apr 4, 2026
e80e2cc
Validate.inclusiveBetween -> Objects.checkIndex
mineLdiver Apr 4, 2026
6f4c93d
setBlockState -> setBlockStateWithoutNotifyingNeighbors
mineLdiver Apr 5, 2026
aac8422
This is what we call a bad idea, use NBT instead
calmilamsy Apr 7, 2026
bdc124a
Fix message object related compile breakage
calmilamsy Apr 10, 2026
3771d4e
Move packet
calmilamsy Apr 10, 2026
f5ea018
Oops
calmilamsy Apr 10, 2026
46fd154
Modern directions
mineLdiver Apr 10, 2026
1650a69
BiomeDataInterpolator cache
mineLdiver Apr 10, 2026
6cb0c73
Paulevs I swear to god
calmilamsy Apr 10, 2026
31d2955
Add ItemCraftedEvent
calmilamsy Apr 12, 2026
5b10bbb
Add better invalid json recipe feedback
calmilamsy Apr 12, 2026
b21a584
Automatically set block and item translation keys on instantiation by…
mineLdiver Apr 13, 2026
18943c0
despair
mineLdiver Apr 14, 2026
55148ce
Oh yeah make ItemUsedInCraftingEvent not fire on null items
calmilamsy Apr 14, 2026
7bcdd73
Add CraftingResultEvent and add other crafting event javadocs
calmilamsy Apr 14, 2026
dd84919
Extract itemstack comparison in recipes to an overridable method
calmilamsy Apr 15, 2026
d7d8d15
Allow for resolving other class' namespace
calmilamsy Apr 19, 2026
6474ea5
Make old mods get fingerpointed at when the game crashes on load
calmilamsy Apr 21, 2026
b70a463
Rename EntityRegister to EntityRegistryEvent
calmilamsy Apr 21, 2026
4908d80
Revert "Rename EntityRegister to EntityRegistryEvent"
calmilamsy Apr 21, 2026
4932416
Make events more consistent and add missing register methods (#256)
DanyGames2014 Apr 21, 2026
5cea7b8
Throw an exception if no valid entity/mob handler was found
calmilamsy Apr 21, 2026
7de78b3
Make EntityRegisterEvent get mad if duplicate entities, remove non-id…
calmilamsy Apr 21, 2026
35b4280
chore: update DFU to v9 (#257)
Lemmmy Apr 28, 2026
6c6ca3d
can't believe it, an actual cal L moment
mineLdiver May 6, 2026
e62f0b6
Convention Tags (#254)
DanyGames2014 May 18, 2026
31cf518
Change version
mineLdiver May 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# StationAPI for Minecraft Beta 1.7.3 Babric

<!---
Buildbot moment.
-->
## For the code in actual releases, see the [main branch](https://github.com/ModificationStation/StationAPI/tree/main)

A general use API for Fabric Loader mods on legacy Minecraft versions.

Expand Down
12 changes: 10 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ allprojects {
maven(url = "https://maven.glass-launcher.net/snapshots")
maven(url = "https://maven.glass-launcher.net/releases")
maven(url = "https://jitpack.io/")

maven("https://libraries.minecraft.net") {
name = "Mojang"
content {
includeModule("com.mojang", "datafixerupper") // https://github.com/Mojang/DataFixerUpper
}
}

mavenCentral()
exclusiveContent {
forRepository {
Expand Down Expand Up @@ -130,7 +138,7 @@ allprojects {

// Include license inside of the mod jar
configure<Jar>("jar") {
from("LICENSE") {
from(rootProject.file("LICENSE")) {
rename { "${it}_${project.properties["archivesBaseName"]}" }
}
}
Expand Down Expand Up @@ -294,4 +302,4 @@ tasks.register<Jar>("testJar") {
// Gradle I swear to fuck stop trying to do bullshit to the maven - calm
tasks.withType<GenerateModuleMetadata> {
enabled = false
}
}
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ fabric.loom.multiProjectOptimisation=true
unsafeevents_version = e31096e
fastutil_version = 8.5.8
caffeine_version = 3.0.5
dfu_version = 6.0.6
dfu_version = 9.1.20
spasm_version = 0.2.2

# Mod Properties
mod_version = 2.0.0-alpha.5.4
mod_version = 2.0.0-alpha.6
maven_group = net.modificationstation
archives_base_name = StationAPI

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import net.modificationstation.sltest.item.ItemListener;
import net.modificationstation.stationapi.api.client.gui.screen.achievement.AchievementPage;
import net.modificationstation.stationapi.api.event.achievement.AchievementRegisterEvent;
import net.modificationstation.stationapi.api.template.achievement.TemplateAchievement;

import static net.modificationstation.sltest.SLTest.NAMESPACE;

Expand All @@ -18,8 +19,8 @@ public class AchievementListener {
@EventListener
public void registerAchievements(AchievementRegisterEvent event) {
testAchievementPage = new AchievementPageTest(NAMESPACE.id("testPage"));
testAchievement = new Achievement(69696969, "sltest.testAchievement", 0, 0, ItemListener.testItem, null);
testAchievementChild = new Achievement(69696970, "sltest.testAchievementChild", 0, 2, Item.GOLDEN_APPLE, testAchievement);
testAchievement = new TemplateAchievement(NAMESPACE.id("test_achievement"), "sltest.testAchievement", 0, 0, ItemListener.testItem, null);
testAchievementChild = new TemplateAchievement(NAMESPACE.id("test_achievement_child"), "sltest.testAchievementChild", 0, 2, Item.GOLDEN_APPLE, testAchievement);
event.achievements.add(testAchievement);
event.achievements.add(testAchievementChild);
testAchievementPage.addAchievements(testAchievement, testAchievementChild);
Expand Down
32 changes: 16 additions & 16 deletions src/test/java/net/modificationstation/sltest/block/Blocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,26 @@

public enum Blocks {

TEST_BLOCK("test_block", "testBlock", id -> new TemplateBlock(id, Material.STONE).setHardness(1)),
TEST_ANIMATED_BLOCK("test_animated_block", "testAnimatedBlock", id -> new ModdedMetaBlock(id, Material.NETHER_PORTAL)),
CUSTOM_MODEL_BLOCK("farlands_block", "farlands_block", id -> new ModdedModelBlock(id, Material.SOIL).setHardness(1)),
FREEZER("freezer", "freezer", id -> new BlockFreezer(id).setHardness(2.5F).setSoundGroup(TemplateBlock.DEFAULT_SOUND_GROUP)),
ALTAR("altar", "altar", id -> new BlockAltar(id, Material.STONE).setHardness(3)),
VARIATION_BLOCK("variation_block", "variationBlock", id -> new VariationBlock(id, Material.STONE).setHardness(.5F).setSoundGroup(Block.DEFAULT_SOUND_GROUP).disableAutoItemRegistration()),
EMISSION_CHECKER("emission_checker", "emissionChecker", LampBlock::new),
INDISPENSABLE_BLOCK("indispensable_block", "indispensableBlock", IndispensableBlock::new),
MODDED_LEAVES("modded_leaves", "moddedLeaves", id -> new TemplateLeavesBlock(id, 52)),
MODDED_LOG("modded_log", "moddedLog", TemplateLogBlock::new),
EFFECT_BLOCK("effect_block", "effectBlock", EffectBlock::new),
EFFECT_BLOCK_INF("effect_block_inf", "effectBlockInf", EffectBlockInf::new),
EFFECT_BLOCK_CLEAR("effect_block_clear", "effectBlockClear", EffectBlockClear::new),
FANCY_WOOD_DOOR("fancy_wood_door_block", "fancyWoodDoor", id -> new TemplateDoorBlock(id, Material.WOOD));
TEST_BLOCK("test_block", id -> new TemplateBlock(id, Material.STONE).setHardness(1)),
TEST_ANIMATED_BLOCK("test_animated_block", id -> new ModdedMetaBlock(id, Material.NETHER_PORTAL)),
CUSTOM_MODEL_BLOCK("farlands_block", id -> new ModdedModelBlock(id, Material.SOIL).setHardness(1)),
FREEZER("freezer", id -> new BlockFreezer(id).setHardness(2.5F).setSoundGroup(TemplateBlock.DEFAULT_SOUND_GROUP)),
ALTAR("altar", id -> new BlockAltar(id, Material.STONE).setHardness(3)),
VARIATION_BLOCK("variation_block", id -> new VariationBlock(id, Material.STONE).setHardness(.5F).setSoundGroup(Block.DEFAULT_SOUND_GROUP).disableAutoItemRegistration()),
EMISSION_CHECKER("emission_checker", LampBlock::new),
INDISPENSABLE_BLOCK("indispensable_block", IndispensableBlock::new),
MODDED_LEAVES("modded_leaves", id -> new TemplateLeavesBlock(id, 52)),
MODDED_LOG("modded_log", TemplateLogBlock::new),
EFFECT_BLOCK("effect_block", EffectBlock::new),
EFFECT_BLOCK_INF("effect_block_inf", EffectBlockInf::new),
EFFECT_BLOCK_CLEAR("effect_block_clear", EffectBlockClear::new),
FANCY_WOOD_DOOR("fancy_wood_door_block", id -> new TemplateDoorBlock(id, Material.WOOD));

private final Runnable register;
private Block block;

Blocks(String id, String translationKey, Function<Identifier, Block> factory) {
this.register = () -> block = factory.apply(of(NAMESPACE, id)).setTranslationKey(NAMESPACE, translationKey);
Blocks(String id, Function<Identifier, Block> factory) {
this.register = () -> block = factory.apply(of(NAMESPACE, id));
}

public Block get() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
import net.minecraft.world.BlockView;
import net.minecraft.world.World;
import net.modificationstation.stationapi.api.block.BlockState;
import net.modificationstation.stationapi.api.util.Identifier;
import net.modificationstation.stationapi.api.state.StateManager.Builder;
import net.modificationstation.stationapi.api.state.property.BooleanProperty;
import net.modificationstation.stationapi.api.template.block.TemplateBlock;
import net.modificationstation.stationapi.api.util.Identifier;
import net.modificationstation.stationapi.api.world.BlockStateView;

public class LampBlock extends TemplateBlock {
Expand Down Expand Up @@ -46,7 +46,7 @@ public int getTexture(int side) {
public boolean onUse(World level, int x, int y, int z, PlayerEntity player) {
BlockState state = level.getBlockState(x, y, z);
state = state.with(ACTIVE, !state.get(ACTIVE));
level.setBlockState(x, y, z, state);
level.setBlockStateWithoutNotifyingNeighbors(x, y, z, state);
return super.onUse(level, x, y, z, player);
}
}
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
package net.modificationstation.sltest.block;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.LivingEntity;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.World;
import net.modificationstation.stationapi.api.block.BlockState;
import net.modificationstation.stationapi.api.util.Identifier;
import net.modificationstation.stationapi.api.state.StateManager;
import net.modificationstation.stationapi.api.template.block.TemplateBlock;
import net.modificationstation.stationapi.api.util.Identifier;
import net.modificationstation.stationapi.api.util.math.Direction;

import static net.modificationstation.stationapi.api.state.property.Properties.HORIZONTAL_FACING;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.LivingEntity;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.World;

public class ModdedModelBlock extends TemplateBlock {

private static final Direction[] DIRECTIONS = new Direction[] { Direction.WEST, Direction.NORTH, Direction.EAST, Direction.SOUTH };
private static final Direction[] DIRECTIONS = new Direction[] { Direction.SOUTH, Direction.WEST, Direction.NORTH, Direction.EAST};

protected ModdedModelBlock(Identifier id, Material material) {
super(id, material);
Expand All @@ -29,7 +28,7 @@ public boolean isOpaque() {

@Override
public void onPlaced(World level, int x, int y, int z, LivingEntity living) {
level.setBlockState(x, y, z, getDefaultState().with(HORIZONTAL_FACING, DIRECTIONS[MathHelper.floor((double)(living.yaw * 4.0F / 360.0F) + 0.5D) & 3]));
level.setBlockStateWithoutNotifyingNeighbors(x, y, z, getDefaultState().with(HORIZONTAL_FACING, DIRECTIONS[MathHelper.floor((double)(living.yaw * 4.0F / 360.0F) + 0.5D) & 3]));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static void changeDispenseBehavior(DispenseEvent event) {
// Make water buckets place water
if (context.itemStack.itemId == Item.WATER_BUCKET.id) {
if (world.getMaterial(facing.x, facing.y, facing.z) == Material.AIR) {
world.setBlockStateWithNotify(facing.x, facing.y, facing.z, Block.WATER.getDefaultState());
world.setBlockState(facing.x, facing.y, facing.z, Block.WATER.getDefaultState());
context.dispenser.setStack(context.slot, new ItemStack(Item.BUCKET));
event.cancel();
}
Expand All @@ -52,7 +52,7 @@ public static void changeDispenseBehavior(DispenseEvent event) {
// Make lava buckets place lava
if (context.itemStack.itemId == Item.LAVA_BUCKET.id) {
if (world.getMaterial(facing.x, facing.y, facing.z) == Material.AIR) {
world.setBlockStateWithNotify(facing.x, facing.y, facing.z, Block.LAVA.getDefaultState());
world.setBlockState(facing.x, facing.y, facing.z, Block.LAVA.getDefaultState());
context.dispenser.setStack(context.slot, new ItemStack(Item.BUCKET));
event.cancel();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package net.modificationstation.sltest.entity;

import net.mine_diver.unsafeevents.listener.EventListener;
import net.modificationstation.stationapi.api.event.entity.EntityRegister;
import net.modificationstation.stationapi.api.event.entity.EntityRegisterEvent;
import net.modificationstation.stationapi.api.event.registry.EntityHandlerRegistryEvent;
import net.modificationstation.stationapi.api.event.registry.MobHandlerRegistryEvent;

Expand All @@ -11,9 +11,9 @@
public class EntityListener {

@EventListener
public void registerEntities(EntityRegister event) {
event.register(TestEntity.class, "sltest:test");
event.register(PoorGuy.class, "GPoor");
public void registerEntities(EntityRegisterEvent event) {
event.register(NAMESPACE.id("test"), TestEntity.class);
event.register(NAMESPACE.id("gpoor"), PoorGuy.class);
}

@EventListener
Expand Down
26 changes: 13 additions & 13 deletions src/test/java/net/modificationstation/sltest/item/ItemListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,20 @@ public void registerItems(ItemRegistryEvent event) {
ToolLevel.GRAPH.putEdge(siblingNode, ToolMaterial.IRON.getToolLevel());
ToolLevel.GRAPH.removeEdge(ToolMaterial.STONE.getToolLevel(), ToolMaterial.IRON.getToolLevel());

testItem = new ModdedItem(NAMESPACE.id("test_item")).setTranslationKey(NAMESPACE, "testItem"); //8475
testItem = new ModdedItem(NAMESPACE.id("test_item")); //8475
testMaterial = ToolMaterialFactory.create("testMaterial", 3, Integer.MAX_VALUE, Float.MAX_VALUE, Integer.MAX_VALUE - 2).toolLevel(siblingNode);
testPickaxe = new ModdedPickaxeItem(NAMESPACE.id("test_pickaxe"), testMaterial).setTranslationKey(NAMESPACE, "testPickaxe"); //8476
testNBTItem = new NBTItem(NAMESPACE.id("nbt_item")).setTranslationKey(NAMESPACE, "nbt_item"); //8477
testModelItem = new ModelItem(NAMESPACE.id("model_item")).setMaxCount(1).setTranslationKey(NAMESPACE, "idkSomething");
ironOre = event.register(NAMESPACE.id("ironOre"), new Item(ItemRegistry.AUTO_ID)).setTranslationKey(NAMESPACE.id("ironOre"));
generatedItem = event.register(NAMESPACE.id("generated_item"), new Item(ItemRegistry.AUTO_ID)).setTranslationKey(NAMESPACE.id("generatedItem"));
variationBlockIdle = new BlockStateItem(NAMESPACE.id("variation_block_idle"), Blocks.VARIATION_BLOCK.get().getDefaultState()).setTranslationKey(NAMESPACE, "variationBlockIdle");
variationBlockPassive = new BlockStateItem(NAMESPACE.id("variation_block_passive"), Blocks.VARIATION_BLOCK.get().getDefaultState().with(VariationBlock.VARIANT, VariationBlock.Variant.PASSIVE)).setTranslationKey(NAMESPACE, "variationBlockPassive");
variationBlockActive = new BlockStateItem(NAMESPACE.id("variation_block_active"), Blocks.VARIATION_BLOCK.get().getDefaultState().with(VariationBlock.VARIANT, VariationBlock.Variant.ACTIVE)).setTranslationKey(NAMESPACE, "variationBlockActive");
testShears = new TestShearsItem(NAMESPACE.id("test_shears")).setTranslationKey(NAMESPACE, "test_shears");
pacifistSword = new PacifistSwordItem(NAMESPACE.id("pacifist_sword")).setTranslationKey(NAMESPACE, "pacifist_sword");
dullPickaxe = new DullPickaxeItem(NAMESPACE.id("dull_pickaxe")).setTranslationKey(NAMESPACE, "dull_pickaxe");
fancyDoor = new TemplateDoorItem(NAMESPACE.id("fancy_wood_door"), Material.WOOD, Blocks.FANCY_WOOD_DOOR.get()).setTranslationKey(NAMESPACE, "fancyWoodDoor");
testPickaxe = new ModdedPickaxeItem(NAMESPACE.id("test_pickaxe"), testMaterial); //8476
testNBTItem = new NBTItem(NAMESPACE.id("nbt_item")); //8477
testModelItem = new ModelItem(NAMESPACE.id("model_item")).setMaxCount(1);
ironOre = event.register(NAMESPACE.id("iron_ore"), new Item(ItemRegistry.AUTO_ID));
generatedItem = event.register(NAMESPACE.id("generated_item"), new Item(ItemRegistry.AUTO_ID));
variationBlockIdle = new BlockStateItem(NAMESPACE.id("variation_block_idle"), Blocks.VARIATION_BLOCK.get().getDefaultState());
variationBlockPassive = new BlockStateItem(NAMESPACE.id("variation_block_passive"), Blocks.VARIATION_BLOCK.get().getDefaultState().with(VariationBlock.VARIANT, VariationBlock.Variant.PASSIVE));
variationBlockActive = new BlockStateItem(NAMESPACE.id("variation_block_active"), Blocks.VARIATION_BLOCK.get().getDefaultState().with(VariationBlock.VARIANT, VariationBlock.Variant.ACTIVE));
testShears = new TestShearsItem(NAMESPACE.id("test_shears"));
pacifistSword = new PacifistSwordItem(NAMESPACE.id("pacifist_sword"));
dullPickaxe = new DullPickaxeItem(NAMESPACE.id("dull_pickaxe"));
fancyDoor = new TemplateDoorItem(NAMESPACE.id("fancy_wood_door"), Material.WOOD, Blocks.FANCY_WOOD_DOOR.get());

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public ItemStack use(ItemStack item, World level, PlayerEntity player) {
MessagePacket message = new MessagePacket(Identifier.of(SLTest.NAMESPACE, "send_an_object"));
hmmSho = new Random().nextInt();
SLTest.LOGGER.info(String.valueOf(hmmSho));
message.objects = new Object[] { new TestNetworkData(hmmSho) };
// message.objects = new Object[] { new TestNetworkData(hmmSho) };
PacketHelper.sendTo(player, message);
}
return super.use(item, level, player);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,24 @@
import net.mine_diver.unsafeevents.listener.EventListener;
import net.modificationstation.sltest.SLTest;
import net.modificationstation.sltest.option.OptionListener;
import net.modificationstation.sltest.packet.MineLMomentPacket;
import net.modificationstation.stationapi.api.client.event.keyboard.KeyStateChangedEvent;
import net.modificationstation.stationapi.api.network.packet.MessagePacket;
import net.modificationstation.stationapi.api.network.packet.PacketHelper;
import net.modificationstation.stationapi.api.util.Identifier;
import org.lwjgl.input.Keyboard;

public class KeyboardListener {

@EventListener
public static void keyStateChange(KeyStateChangedEvent event) {
if (event.environment == KeyStateChangedEvent.Environment.IN_GAME && Keyboard.getEventKey() == OptionListener.testBind.code)
PacketHelper.send(new MessagePacket(Identifier.of(SLTest.NAMESPACE, "give_me_diamonds")));
if (event.environment == KeyStateChangedEvent.Environment.IN_GAME) {
if (Keyboard.getEventKey() == OptionListener.testBind.code) {
PacketHelper.send(new MessagePacket(Identifier.of(SLTest.NAMESPACE, "give_me_diamonds")));
}

if (Keyboard.getEventKey() == OptionListener.mineLMoment.code) {
PacketHelper.send(new MineLMomentPacket(0));
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,12 @@
import net.modificationstation.stationapi.api.block.BlockState;
import net.modificationstation.stationapi.api.block.StationBlock;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import java.awt.image.BufferedImage;
import java.awt.image.DataBufferInt;

@Mixin(ObsidianBlock.class)
public abstract class MixinObsidian implements StationBlock {
@Override
public boolean onBonemealUse(World world, int x, int y, int z, BlockState state) {
world.setBlockState(x, y, z, Block.LOG.getDefaultState());
world.setBlockStateWithoutNotifyingNeighbors(x, y, z, Block.LOG.getDefaultState());
System.out.println(x + " " + y + " " + z);
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@
import net.mine_diver.unsafeevents.listener.EventListener;
import net.minecraft.client.option.KeyBinding;
import net.modificationstation.stationapi.api.client.event.option.KeyBindingRegisterEvent;
import org.lwjgl.input.Keyboard;

public class OptionListener {

public static KeyBinding testBind;
public static KeyBinding mineLMoment;

@Environment(EnvType.CLIENT)
@EventListener
public void registerKeyBindings(KeyBindingRegisterEvent event) {
testBind = new KeyBinding("key.sltest.testBind", 21);
event.keyBindings.add(testBind);
event.register(testBind = new KeyBinding("key.sltest.testBind", 21));
event.register(mineLMoment = new KeyBinding("key.sltest.mine_l_moment", Keyboard.KEY_L));
}

public static KeyBinding testBind;
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ public void handleGiveMeDiamonds(PlayerEntity playerBase, MessagePacket message)
}

public void handleSendCoords(PlayerEntity playerBase, MessagePacket message) {
SLTest.LOGGER.info(String.valueOf(((ModdedItem.TestNetworkData) message.objects[0]).getHmmSho()));
// SLTest.LOGGER.info(String.valueOf(((ModdedItem.TestNetworkData) message.objects[0]).getHmmSho()));
}
}
Loading