Skip to content

Commit

Permalink
feat: add decorated pot data
Browse files Browse the repository at this point in the history
  • Loading branch information
gabizou committed Oct 27, 2024
1 parent f402974 commit a257813
Show file tree
Hide file tree
Showing 13 changed files with 1,128 additions and 795 deletions.
5 changes: 4 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,7 @@ max_line_length = 120
tab_width = 4

[*mixins*.json]
indent_size = 4
indent_size = 4

[*.yaml]
indent_size = 2
28 changes: 25 additions & 3 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ name: Build and Deploy

on:
push:
branches: [ 'api-*' ]
branches:
- 'api-*'
- update/*
tags-ignore: [ '**' ]

env:
Expand All @@ -22,13 +24,31 @@ jobs:
publish:
needs: integrationTest
runs-on: ubuntu-22.04
# This enables publishing individual projects in parallel
strategy:
fail-fast: false
matrix:
project:
- vanilla
- forge
- neoforge
include:
- project: vanilla
gradleProject: SpongeVanilla
- project: forge
gradleProject: SpongeForge
- project: neoforge
gradleProject: SpongeNeo
steps:
- name: setup
if: !startsWith(github.ref, 'refs/heads/update/') || matrix.project == 'vanilla'
id: setup
uses: SpongePowered/.github/.github/actions/setup-java-env@master
with:
runtime_version: 21
publishing_branch_regex: ''
- name: setup / minecraft cache
if: !startsWith(github.ref, 'refs/heads/update/') || matrix.project == 'vanilla'
uses: "actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9" # v4.0.2
with:
path: |
Expand All @@ -37,14 +57,16 @@ jobs:
key: "${{ runner.os }}-minecraft-${{ env.CACHE_REV }}-${{ hashFiles('**/*.gradle*') }}"
restore-keys: |
${{ runner.os }}-minecraft-${{ env.CACHE_REV }}-
# We don't need to run tests again, so we just publish
# We don't need to run tests again, so we just publish
- name: setup / workspace
if: !startsWith(github.ref, 'refs/heads/update/') || matrix.project == 'vanilla'
run: |
echo "GIT_COMMIT=${GITHUB_SHA}" >> $GITHUB_ENV
echo "GIT_BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
echo "BUILD_NUMBER=${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV
- name: Publish to Sponge Maven & GitHub Packages
run: ./gradlew -s -Pprojects=vanilla,forge,neoforge :publish :SpongeVanilla:publish :SpongeForge:publish :SpongeNeo:publish
if: !startsWith(github.ref, 'refs/heads/update/') || matrix.project == 'vanilla'
run: ./gradlew -s -Pprojects=vanilla,${{ matrix.project }} :${{ matrix.gradleProject }}:publish
env:
CI_SYSTEM: Github Actions
GITHUB_USERNAME: "${{ github.actor }}"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* This file is part of Sponge, licensed under the MIT License (MIT).
*
* Copyright (c) SpongePowered <https://www.spongepowered.org>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package org.spongepowered.common.accessor.world.level.block.entity;

import net.minecraft.world.level.block.entity.DecoratedPotBlockEntity;
import net.minecraft.world.level.block.entity.PotDecorations;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;

@Mixin(DecoratedPotBlockEntity.class)
public interface DecoratedPotBlockEntityAccessor {

@Accessor("decorations")
void accessor$setDecorations(PotDecorations decorations);
}
Loading

0 comments on commit a257813

Please sign in to comment.