Skip to content

Instantly share code, notes, and snippets.

View NimbusFox's full-sized avatar

NimbusFox NimbusFox

  • 05:17 (UTC +01:00)
View GitHub Profile
@NimbusFox
NimbusFox / StaxelnewWebRender.cs
Created July 15, 2019 18:35
An example of the web library I found
private static bool loaded = false;
private static bool renderReady = false;
private static Texture2D _texture;
private static Page page;
private static DeviceContext _context;
private static SpriteBatch spriteBatch;
SetPrivatePropertyValue("BlobStorage", null, typeof(ServerContext), new BlobStorage());
ServerContext.BlobStorage.Initialize();
SetPrivateFieldValue("_universeSettingsStorage", universe, universe.GetType(),
ServerContext.BlobStorage.Fetch(Constants.UniverseSettingsFile,
Path.Combine(_contentFolder.FullName, Constants.UniverseSettingsFile + ".bsdb")));
SetPrivateFieldValue("_settingsStorage", _serverMainLoop, _serverMainLoop.GetType(),
ServerContext.BlobStorage.Fetch("universeSettings",
net.minecraft.util.ReportedException: Ticking block entity
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:771) ~[MinecraftServer.class:?]
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:396) ~[nz.class:?]
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:666) ~[MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:524) [MinecraftServer.class:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_162]
Caused by: java.lang.NoSuchMethodError: crazypants.enderio.api.redstone.IRedstoneConnectable.shouldRedstoneConduitConnect(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/EnumFacing;)Z
at crazypants.enderio.base.conduit.redstone.ConnectivityTool.shouldAutoConnectRedstone(ConnectivityTool.java:35) ~[ConnectivityTool.class:?]
at crazypants.enderio.conduits.conduit.redstone.InsulatedRedstoneConduit.canConnectToExternal(InsulatedRedstoneConduit.java:368) ~[InsulatedR
function acceptCookies() {
$.ajax({
url: "/umbraco/surface/Cookies/Accept",
dataType: "text",
type: "GET",
success: () => {
$("#Cookies").fadeOut(500);
}
});
}
@NimbusFox
NimbusFox / Tile.cs
Created April 2, 2018 00:54
God damn system
Tile? cT = null;
if ((x == cube.Start.X || x == cube.End.X) && (z == cube.Start.Z || z == cube.End.Z)) {
cT = tiles.Line.Y;
}
if (z == cube.Start.Z || z == cube.End.Z) {
if (cT == null) {
cT = tiles.Line.Z;
} else {
{
"Size": {
"X": 132,
"Y": 49,
"Z": 74
},
"Mappings": {
"00000000": {
"Code": "staxel.tile.Sky",
"Roatation": 0
public class CoreHook : IModHookV2 {
public void Dispose() {
}
public void GameContextInitializeInit() { }
public void GameContextInitializeBefore() { }
public void GameContextInitializeAfter() { }
public void GameContextDeinitialize() { }
public void GameContextReloadBefore() { }
static Static() {
var dir = Assembly.GetExecutingAssembly().Location;
foreach (var file in new DirectoryInfo(dir).GetFiles("*.mod")) {
var data = JsonConvert.DeserializeObject<Dictionary<string, object>>(File.ReadAllText(file.FullName));
if (data.Any(x => x.Key.ToLower() == "landclaim")) {
var current = data[data.First(x => x.Key.ToLower() == "landclaim").Key];
if (current is bool b) {
if (b) {