Skip to content

Instantly share code, notes, and snippets.

View LatvianModder's full-sized avatar
🔧
2nd best Minecraft Modder on this planet

Kristiāns Micītis LatvianModder

🔧
2nd best Minecraft Modder on this planet
View GitHub Profile
public void register(CommandDispatcher<CommandSource> dispatcher)
{
LiteralCommandNode<CommandSource> command = dispatcher.register(Commands.literal("ftbteams")
.then(Commands.literal("create")
.then(Commands.argument("name", StringArgumentType.greedyString())
.executes(ctx -> create(ctx.getSource(), string(ctx, "name")))
)
.executes(ctx -> create(ctx.getSource(), ""))
)
.then(Commands.literal("create_server_team")
package dev.latvian.kubejs.documentation;
import io.netty.bootstrap.ServerBootstrap;
import io.netty.buffer.Unpooled;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelOption;
import io.netty.channel.EventLoopGroup;
{
"parent": "block/block",
"credit": "Made with Blockbench",
"textures": {
"0": "minecraft:blocks/iron_block",
"particle": "minecraft:blocks/iron_block"
},
"elements": [
{
"from": [4, 0, 4],
package com.latmod.mods.wallcables.block;
import net.minecraft.block.Block;
import net.minecraft.block.material.MapColor;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.PropertyEnum;
import net.minecraft.block.properties.PropertyInteger;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.EntityLivingBase;
import processing.core.PApplet;
import processing.event.MouseEvent;
import processing.serial.Serial;
/**
* @author LatvianModder
*/
public class LedStrip extends PApplet
{
public static void main(String[] args)
@LatvianModder
LatvianModder / LedStrip.ino
Created June 2, 2018 10:06
Code for Arduino to read data from serial and display it on a led strip
#include "FastLED.h"
#define NUM_LEDS 300
#define DATA_PIN 3
CRGB leds[NUM_LEDS];
void setup() {
FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS);
FastLED.setTemperature(Tungsten100W);
FastLED.setBrightness(30);
@LatvianModder
LatvianModder / ranks_example.json
Last active August 17, 2017 16:42
FTBU's Rank System Example
{
"default_rank": "Player",
"ranks": {
"Player": {
"parent": "",
"color": "white",
"prefix": "",
"badge": "",
"permissions": [
"-ftbu.display.admin_info",
@LatvianModder
LatvianModder / README.md
Last active April 19, 2017 14:16
New FTBUtilities Guide System for 1.9

New FTBUtilities Guide System for 1.9

Online guides

Any modder or modpack author can ask me to add their guide to the repo list, when this new feature is done. If a server wants to make a guide, they can do it from server side. All guides will be hosted online, but could also be downloaded and launched from offline-mode too. Modpacks that need a guide to be installed together with modpack (like FTB Infinity Evolved or Skyblock), can add the guide url / ID in config file OR just drop the guide in modpack/guide/ folder.

What are the advantages?

  1. I would not only make guides for my mods for Minecraft ingame, but I would also develop a web-app And possibly an Android app that would allow to view all guides online without even opening Minecraft
@LatvianModder
LatvianModder / README.md
Last active March 1, 2017 18:12
FTBUtilities: Setting up ranks.json

Example ranks:

{
    "default_ranks": {
        "player": "player",
        "op": "op"
    },
    "ranks": {
 "player": {
@LatvianModder
LatvianModder / Context.java
Last active June 26, 2016 18:47
PermissionAPI
import net.minecraft.entity.Entity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import javax.annotation.ParametersAreNonnullByDefault;
import java.util.HashMap;
import java.util.Map;
/**
* Created by LatvianModder on 26.05.2016.