Skip to content

Instantly share code, notes, and snippets.

Kristiāns Micītis LatvianModder

Block or report user

Report or block LatvianModder

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View NettyHttpServer.java
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;
View _variants.js
// This is not actually executable code. This just shows that there are different ways to write things, you chose whichever looks best/fits better your needs.
// Items
// If string is used, it parses it as /give would.
'minecraft:stone_sword' // Stone Sword
'minecraft:stone_sword 1 10' // Stone Sword with damage 10
'minecraft:apple 30' // 30 Apples
'minecraft:compass {display:{Name:\"Spawn\"}}' // Compass with display name 'Spawn'
// If {} object is used, item key is required. Optional keys are data, count, nbt, caps.
View truss.json
{
"parent": "block/block",
"credit": "Made with Blockbench",
"textures": {
"0": "minecraft:blocks/iron_block",
"particle": "minecraft:blocks/iron_block"
},
"elements": [
{
"from": [4, 0, 4],
View BlockTruss.java
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;
View LedStrip.java
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 Jun 2, 2018
Code for Arduino to read data from serial and display it on a led strip
View LedStrip.ino
#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 / README.md
Last active Mar 1, 2017
FTBUtilities: Setting up ranks.json
View README.md

Example ranks:

{
    "default_ranks": {
        "player": "player",
        "op": "op"
    },
    "ranks": {
        "player": {
@LatvianModder
LatvianModder / README.md
Last active Aug 26, 2018
FTBLib / FTBUtilities Teams
View README.md

Teams

Teams will now replace previous friends system. That way, it's much easier to manage claimed chunks and other stuff I have planned.

Basics

  • Players start without a team, until they either create or join one
  • Player can only be in one team
  • If you are the owner, you can't leave the team without either giving ownership to another member or kicking everyone out
  • Team can't have multiple owners, only one owner / host / admin
View Context.java
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.
You can’t perform that action at this time.