Skip to content

Instantly share code, notes, and snippets.

View fallenthereaper's full-sized avatar

FallenReaper fallenthereaper

View GitHub Profile
@fallenthereaper
fallenthereaper / ClasspathScanner.java
Created June 10, 2024 23:47
Serializable Functional Interfaces
package com.fallenreaper.insight.core.api.core.reflection;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.util.*;
//10/06/2024
public class ClasspathScanner implements ClassScanner {
@fallenthereaper
fallenthereaper / errors.txt
Last active April 25, 2024 22:33
Game class
Severity Code Description Project File Line Suppression State Details
Error C2039 'Game': is not a member of 'ShopGame' C:\Users\salva\source\repos\_cmake\main\out\build\x64-release\main C:\Users\salva\source\repos\_cmake\main\include\src\core\shop\game_state.h 17
Error C2061 syntax error: identifier 'Game' C:\Users\salva\source\repos\_cmake\main\out\build\x64-release\main C:\Users\salva\source\repos\_cmake\main\include\src\core\shop\game_state.h 17
Error C2061 syntax error: identifier 'Game' C:\Users\salva\source\repos\_cmake\main\out\build\x64-release\main C:\Users\salva\source\repos\_cmake\main\include\src\core\shop\game_state.h 19
Error C2039 'Game': is not a member of 'ShopGame' C:\Users\salva\source\repos\_cmake\main\out\build\x64-release\main C:\Users\salva\source\repos\_cmake\main\include\src\core\shop\game_state.h 20
Error C2061 syntax error: identifier 'Game' C:\Users\salva\source\repos\_cmake\main\out\build\x64-release\main C:\Users\salva\source\repos\_cmake\main\include\src\core\shop\game_
public interface DataSerializer<T> {
/**
* Static factory method to build a {@link DataSerializer} instance.
*
* @param bufferReader Function to read data from a packet buffer.
* @param bufferWriter Function to write data to a packet buffer.
* @param nbtReader Function to read data from NBT.
* @param nbtWriter Function to write data to NBT.
* @param id The key used for accessing
@fallenthereaper
fallenthereaper / build.gradle
Last active November 17, 2023 14:16
build.gradle
buildscript {
repositories {
// These repositories are only for Gradle plugins, put any other repositories in the repository block further below
maven { url = 'https://maven.minecraftforge.net' }
maven { url = 'https://maven.parchmentmc.org' }
maven { url = 'https://repo.spongepowered.org/repository/maven-public/' }
maven {
url "https://oss.sonatype.org/content/repositories/snapshots/"
}
package fallenreaper.fable.core.networking.packets;
import fallenreaper.fable.core.base.blocks.BaseBlockEntity;
import fallenreaper.fable.core.networking.BaseSimplePacket;
import net.minecraft.client.Minecraft;
import net.minecraft.client.multiplayer.ClientLevel;
import net.minecraft.core.BlockPos;
import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraftforge.api.distmarker.Dist;
@fallenthereaper
fallenthereaper / Callbacck.java
Last active April 11, 2023 23:42
Packet code.java
@SubscribeEvent
public void onAddPotionEffect(MobEffectEvent.Added event) {
if (event.getEffectInstance().getEffect() == FableMobEffects.PETRIFIED.get()) {
if (!event.getEntity().level.isClientSide() && event.getEffectSource() instanceof LivingEntity entity) {
PacketsHandler.CHANNEL.send(PacketDistributor.TRACKING_ENTITY_AND_SELF.with(event::getEntity), new PetrifyPacket((LivingEntity) event.getEffectSource(), true));
IPetrified cap = CapabilityManager.getCapability(event.getEntity(), CapabilityManager.PETRIFIED_CAPABILITY);
if (cap != null) {
cap.onPetrified(event.getEntity());
}